Results 1 to 9 of 9
  1. #1
    Mizzle420420's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    Korriban
    Posts
    838
    Reputation
    18
    Thanks
    1,096
    My Mood
    Twisted

    Cool DayZ SA - SQF Script Bases for use with Necromancy and similar menus

    Thought I would give people a basic format for making your own scripts to use in Necromancy or other menus.

    Code:
    	NonToggleBase = 
    	{
    		hint "Basic NonToggle Command";		
    	        sleep 1;
    	};
    Code:
    	ToggleBase = 
    	{
    	    if (isNil ("ToggleBase1")) then 
    	    {
    		    ToggleBase1 = 0;
    	    };
    	    if (ToggleBase1 == 0) then
    	    { 
    		    hint 'Toggle is ON';
    		    ToggleBase1 = 1;
    	    }
    	    else
    	    {
                        hint 'Toggle is OFF';			
    	            ToggleBase1 = 0;
    	    };
    	    while {n661==1} do 
    	    {
                        hint 'While Toggled do This';	
    	    };
    	};
    Code:
        TargetBase = 
        {
            _entities = (positionCameraToWorld [0,0,0] nearObjects ["SurvivorBase",1000]);
            {
            if (name _x == _this select 0) then
            {
                    createGearDialog [(_x), "RscDisplayGear"];
            };
     
            } forEach _entities;
            hint "do command to target, this example is displaying a player's gear.";
        };
    Last edited by Mizzle420420; 01-30-2015 at 10:31 AM.

  2. The Following 3 Users Say Thank You to Mizzle420420 For This Useful Post:

    denis200191 (05-24-2015),razerd (05-25-2015),WhiteDirt (05-24-2015)

  3. #2
    WhiteDirt's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    Nice release. Will use these!

  4. #3
    denis200191's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    100
    Reputation
    10
    Thanks
    10
    Thank you. very useful for me

  5. The Following User Says Thank You to denis200191 For This Useful Post:

    Mizzle420420 (05-24-2015)

  6. #4
    denis200191's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    100
    Reputation
    10
    Thanks
    10
    right ?

    n17 = {
    if (isNil ("n171")) then
    {
    n171 = 0;
    };
    if (n171==0) then
    {
    hint "Unlimited Ammo ON";
    n171 = 1;
    }
    else
    {
    hint "Unlimited Ammo OFF";
    n171 = 0;
    };
    while {n171==1} do
    {
    (vehicle player) setVehicleAmmo 1;
    sleep 0.01;};
    };
    };

  7. #5
    d1spenser's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    87
    Reputation
    10
    Thanks
    8
    Nice templates, the only thing I'd add is "sleep 1" into toggle base loop, because if you run it the way it is now it's going to be total ear destruction.

    Quote Originally Posted by denis200191 View Post
    right ?

    ...code...
    This script no longer works as far as I'm aware. Most likely because they went on path of synchronizing client data with server data as much as they can. Also you can wrap this text in CODE tags (use "go advanced" option), it'll be easier to read it that way.

  8. The Following 2 Users Say Thank You to d1spenser For This Useful Post:

    denis200191 (06-06-2015),Mizzle420420 (06-06-2015)

  9. #6
    Mizzle420420's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    Korriban
    Posts
    838
    Reputation
    18
    Thanks
    1,096
    My Mood
    Twisted
    Quote Originally Posted by d1spenser View Post
    Nice templates, the only thing I'd add is "sleep 1" into toggle base loop, because if you run it the way it is now it's going to be total ear destruction.
    Yeah I only used hint as an example for a command in the loop, you never put a hint or system chat in a loop unless you want to be spamed like crazy.


    - - - Updated - - -

    Quote Originally Posted by denis200191 View Post
    right ?

    n17 = {
    if (isNil ("n171")) then
    {
    n171 = 0;
    };
    if (n171==0) then
    {
    hint "Unlimited Ammo ON";
    n171 = 1;
    }
    else
    {
    hint "Unlimited Ammo OFF";
    n171 = 0;
    };
    while {n171==1} do
    {
    (vehicle player) setVehicleAmmo 1;
    sleep 0.01;};
    };
    };
    That script no longer works it creates fake bullets in your gun that do no damage or nor have any hit effects.
    Also if that did work you would want to remove the sleep because you want that to run as fast as possible, I used to use oneachframe because it was faster than a while.
    Last edited by Mizzle420420; 06-06-2015 at 08:39 PM.

  10. #7
    Jme's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Location
    Balls Deep
    Posts
    1,214
    Reputation
    35
    Thanks
    9,758
    Quote Originally Posted by d1spenser View Post
    Nice templates, the only thing I'd add is "sleep 1" into toggle base loop, because if you run it the way it is now it's going to be total ear destruction.
    actually, "if" and "while" are different loops. never put something like a hint in a while loop but after an "if" it will run only once, or use hintsilent and problem solved

  11. #8
    Mizzle420420's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    Korriban
    Posts
    838
    Reputation
    18
    Thanks
    1,096
    My Mood
    Twisted
    Quote Originally Posted by Jme View Post


    actually, "if" and "while" are different loops. never put something like a hint in a while loop but after an "if" it will run only once, or use hintsilent and problem solved
    Quote Originally Posted by Mizzle420420 View Post


    Yeah I only used hint as an example for a command in the loop, you never put a hint or system chat in a loop unless you want to be spamed like crazy.


    - - - Updated - - -
    Also the 'While' is obviously its own loop running separately from the 'if' in the same script, it is not in the 'if' which means it runs just fine as intended.

  12. #9
    d1spenser's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Posts
    87
    Reputation
    10
    Thanks
    8
    Quote Originally Posted by Jme View Post


    actually, "if" and "while" are different loops. never put something like a hint in a while loop but after an "if" it will run only once, or use hintsilent and problem solved
    Yea, perhaps I wasn't clear enough, I was talking about the while loop. Learned it the hard way when during a test I forgot to put a delay into a script.

Similar Threads

  1. I need one macro for MG4 for use with click left (X7). Thanks.
    By malpi82 in forum Battlefield 4 Hacks & Cheats
    Replies: 0
    Last Post: 12-20-2014, 03:39 AM
  2. [Release] Update to RIP loader for use with ** MEGA RELEASE ** 17 VIP Aimbots **
    By ArealCoder in forum Other First Person Shooter Hacks
    Replies: 25
    Last Post: 11-08-2013, 03:38 AM
  3. [Patched] (My First Hack) Simple Hack for CFPH - With Key And Sound
    By Jhem in forum CrossFire Philippines Hacks
    Replies: 48
    Last Post: 08-22-2012, 08:09 AM
  4. Hack for BlackHwakDown with TeamSabre and Argus
    By Megamann in forum General Game Hacking
    Replies: 0
    Last Post: 02-03-2006, 03:33 AM