Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Coronel_Niel

Pages: [1] 2
1
Armed Assault 2 / City Life 2
« on: June 18, 2012, 05:18:36 am »
Decided to play City Life 2 legit. Got banned before I even got past the application process for "Having a pirated copy of Arma 2". (Steam are real piraters) Think they banned me for being CoronelNiel, so glad to be famous.

Result:




Worth banning me?

2
Armed Assault 2 / How are you today Tonic?
« on: May 30, 2012, 11:59:12 pm »
^^

3
Off Topic / Forums and Main Site
« on: February 06, 2012, 07:50:05 pm »
Why doesn't the forum section of TKC link back to http://tkc-community.net/blog/?

I doubt many people even knew this existed, and the fact that it isn't linked is why.

Any reasons or just an oversight?

4
Off Topic / World Of Tanks
« on: April 11, 2011, 02:08:55 am »
Anyone playing?

5
Armed Assault 2 / Writing a dialog, useful commands and other random shit
« on: February 10, 2011, 12:23:56 am »
Ahh, seeing as the apocalypse is coming and the end is nigh, it's time to write some tutorials. That people will be able to use for a few days and then will be patched. Happy days.

This is NOT a piece on how to place buttons on a dialog, it is a piece on how to use dialogs to work with the buttons you place.

Parts:
1 - Information
2 - Basic Dialogs
3 - Advanced Dialog
4 - Scripts and Dialog

Part 1: Information (WARNING: TL;DR IS EXPECTED)

Dialogs are great, but they need scripts to support them. Writing scripts is one thing, writing a dialog is anouther, and getting the two to talk to each other is like getting Iraq to talk to America. It'll happen, just with a lot of time.

Dialogs are simple to make. You have buttons laid out for you, lists ect. Dialogs are just making them, positioning them and sometimes making them do stuff (Adding text and other stuff.)

Scripting is also relitivly easy, you just have to know commands. On a side note, BIS is a good friend to hackers. A quick lmgtfy (http://tinyurl.com/694c9ez) shows that this page (http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2) has everything you need.

Now, the hardest part is geting them to talk to each other. Its not even the fact that its hard, its the fact that it doesn't do what it supposed to. Simple things that look like they should work won't, and I find this the hardest part of de-bugging.

Apart from that, creativity is the highest point of what you can do. Multiple dialogs streaming hundreds of buttons are expected and rewarded with a smile. Just look at this happy customer: :icon_biggrin2



Part 2: Basic Dialogs

Dialogs are, almost, pure logic. It is just telling a box where to go on the screen and what to do. Now, I am not here to write about how to put a box on the screen. There are far too many tutorials on how to do that.

To get all your buttons ect, rub together 3 brain cells and take the games buttons or some from a mission. Personally, I take them from Zargabad/Life missions. The file itself is called RscDefines.hpp. Just include this in your config.cpp or .bin and you have all the buttons defined in there ready for use.

BIS tutorials are recommended for anyone struggling at this point. It is just basic dialogs.

At this part, you need to put together a frame (A dialog with all the visual elements in place, but buttons do not do anything ect)

Part 3: Advanced Dialogs (Sexy title for a part isnt realy that special)

3a) Buttons

Simple, effective. Your standard button looks a bit like this:

class Button : RscButton
   {
   x = 0.35;
   y = 0.35;
   w = 0.15;
   h = 0.03;
   text = "Test Button";
   action = "[] execVM ""Test\Test Script.sqf"";";
   };
The X,Y,W,H is the positions and size of the button. Text is self explanitory and the action is what the thing does when you press it. This one just opens a script.

The action to close the dialog is simply:
   action = "[] execVM ""Test\Test Script.sqf"";closedialog 0";

CloseDialog can be used to close any dialog that is open at the time, not just the current open dialog. Replacing 0 with the idc of an open dialog causes that one to be closed instead. 0 means the currently open dialog / the dialog the button is on.

3b) Text/Label

We all need to label somethink, and this is what you use this for. You cant just place text itself, it has to be in a label.
The hight and width of a label cant be seen, but if the text in question stretches past the label's size, it will cut off. Experiment and you will see what I mean.

class Label : RscText {
   x = 0.57;
   y = 0.13;
   w = 0.20;
   h = 0.10;
   text = "Test!";
         };

Labels are very usefull for displaying information. This will be covered later.

3c) Lists

Everyone loves a list. We have shopping lists, or in this case, informational lists. That means, information that is listed! Yay...

To use a list, just place it for now. How to interact the list with scripts will be covered later.

Part 4 - Scripts and Dialog

Dialogs look nice, but need a fair bit of scripting to get them working at their full capacity.

4a) Idc's and You (Could make a song)

Idc's are used to identify buttons. You can't identify a button by anything else but it's idc, but a known idc is a dead give away.
To give a button an idc, you simply use:
   idc = 1;
Yeah. A let-down, a know. Not an amazing command, but a vital one. Otherwise, your scripts cant interact with your dialog.

4b) How to start writing your dialog control scripts

All my dialog control scripts start the same way, by defining two simple commands that can save you a lot on time and effort. This simple starter is:

#define __uiGetVar(uvarname) (uiNamespace getVariable #uvarname)
#define __ctrl(vctrl) _ctrl = _display displayCtrl vctrl

disableSerialization;


A special thanks goes out to domination for this wonderfull and simple definition.
Now your wondering, what the fuck does that do?
This is a lot like a C++ script. The first part is the command used to call the function, and the second part is the command itself.
How to use it:
_display = __uiGetVar(Test_Dialog);
To use this to find your dialog, you will need to add a bit of code to your dialog itself, to make it findable:
onLoad = "uiNamespace setVariable ['Test_Dialog', _this select 0]";
Again, Domination was a big help here. Who would've thought it? This entire sub-secton is dedicated to finds from Domination missions.
Now, _display is now a direct variable that points to your dialog.
How to use __ctrl:
__ctrl(1);
This then sets the variable __ctrl to find the button with the idc of 1. _ctrl now points directly to said button, if the button exists.
So, to change the text of _ctrl:
_ctrl ctrlSetText "Test";

4c) How to populate a list from a arrau=y

Now, a nice look at how to populate a list from a array.
For this you will need to have:
Make a list with an idc that you can call on.
Have a variable you want to call into the list.

I am going to use the Zargabad Life all items array as my example here.

for [{_i=0}, {_i < (count INV_AlleItemsArray)}, {_i=_i+1}] do

{
   
_item         = INV_AlleItemsArray select _i;
_infos        = _item call INV_getitemArray;
_name         = (_infos call INV_getitemName);
_scriptname   = _item call INV_getitemScriptName;

if (_weight != 0) then {
                                                            
_index = lbAdd [999,format ["%1 (%2kg)", _name, (_infos call INV_getitemTypeKg)] ];    

lbSetData [999,_index, format ["%1", _scriptname] ];

};

This will populate the list with idc 999 of all the variables in the all items array, display there name and weight.
Have a look, disect and use. Anyone with an IQ of 100 should be able to work it out.

4d) Changing a label to include information in a variable

This has many uses. My example is going to set label 1000 to display your players name:

__ctrl(1000);
_ctrl ctrlSetText (name player);

Assuming you have defined __ctrl above then this is going to be a walk in the park

To specificaly call things from an array try the following:

name = [name player];

__ctrl(1000);
_ctrl ctrlSetText str(name select 0);

Arrays behave differently. While variables can be put straight in, arrays have to have the prefix str attached and then the array select be put in brackets.

I will probably post more tommorow, and it will also be more coherent (Really, Really tired)

Things to expect:
Practical examples of how this can be used.
Random scripts and debuging techniques.

This is currently a WIP, please don't flame thats its incomplete. A lot of information in this alone, if you can pick it out of the shit jokes and random blabering.

6
Player Zone / TCG TS Irish Guy
« on: January 14, 2011, 01:25:30 am »
http://www.mediafire.com/?bt21bs201coatk7

This guy is the guy who is now the funniest person in the world.

SPOLIER: He gets really pissed just because I am recording, I don't say anything through the whole of this.

7
Armed Assault 2 / What a good read
« on: January 14, 2011, 12:21:56 am »
http://tcgaming.enjin.com/forum/m/679474/viewthread/448036-knobbish-admin-behaviour/page/1

"When one person in the room is calling you an asshole, the problem is probably him. When thirty people in the room are calling you an asshole, the problem is probably you."

This guy is fucking awsome

8
Armed Assault 2 / New Project
« on: January 09, 2011, 08:45:30 pm »


Part of my Multihack (Player Select is chosen from the Multihack main page. You can select anyone connected.)
Takes it directly from the array's so it will work even on updated missions.

Please note that everything in this image was made TODAY.

9
General Modding & Programming / Other Games / Minecraft
« on: January 08, 2011, 03:19:08 am »
An interesting game to hack, I did some stuff with it. Inventory duping, white-list bypassing. Not much you can do, some stuff with Java and hacking your client but that will be detected by the server. The interesting thing is in the inventory packets and getting past the white-lists.

It's nothing special and rather simple if you look at the packets for white-listing. Inventory is the gold mine. Once they get a good economy going the inventory hackers will come out on top.

Also you can do auto-miners and bots rather easily, I was rather happy with pressing a button and it holding down the left mouse button for mining, you just move the mouse.

10
Armed Assault 2 / Skeleton PBO
« on: November 01, 2010, 05:42:59 pm »
Deleated.

Hoped you saved a copy.

11
Armed Assault 2 / [CODING]My Scripts
« on: October 26, 2010, 06:26:48 pm »
DELEATED BITCH.

Hope you saved a copy.

12
Armed Assault 2 / TCG Server - Backdoor
« on: October 17, 2010, 06:04:48 pm »
Here is a nice little backdoor the TCG people nicely put into there mission:

Cop:

Go to "Prison Booking".
Select "Get Code".
Write down this code.
Go To The Co-Ordinates 017 030
Go into the center of the base. There is a notepad. Walk up to it.
Look at the notepad and select "Keypad"
Enter the code you had.
Enjoy the extra benefits that the TCG people put in for there admins.

Civ:

Go to "Market Export". Look for the well behind it.
Select "Get Code".
Write down this code.
Go To The Co-Ordinates 017 030
Go into the center of the base. There is a notepad. Walk up to it.
Look at the notepad and select "Keypad"
Enter the code you had.
Enjoy the extra benefits that the TCG people put in for there admins.

Currently this does nothing, but the baracks door opens and this could be something in "future versions"

13
Armed Assault 2 / Domination admin hack
« on: October 10, 2010, 01:38:02 pm »
Code: [Select]
player setVariable ["d_p_isadmin", true];
[] execVM 'x_client\x_admind.sqf'

OR

Code: [Select]
createDialog "XD_AdminDialog";
However the first way is the correct way, as it fools the script AND calls the script, meaning you have the dialog control as well.
The secound way is a brute force that is not a correct way.

14
Armed Assault 2 / Addon Spoofer - Need Help
« on: September 26, 2010, 01:52:16 pm »
So i've got my ID spoofer done and im working on addon spoofer. I can get WPE to report a fake addon name ect to the server, but there seems to be a client sided check I cant spoof. Help Me Please.

15
Armed Assault 2 / ID Hack
« on: September 26, 2010, 01:34:54 pm »


My Id Is Not 8888888

Took me 5 mins in WPE. :)

Pages: [1] 2