Search the Community
Showing results for tags 'variable'.
Found 4 results
-
Hello, I want to set a permanent character variable that calls from an array. For example, my variable set up: setarray(variable$[0], "value_1", "value_2", "value_3" ); And then call array to set the variable: variable$[2] = 1; It seems to work okay...but when scripts reload, values are cleared. Any help? Thanks.
-
Hello, I have created a script which will assign an account-wide delay timer to those who log out to avoid the warp-out NPC which I have variables attached to. My problem is the 'ins_nyd2 value - it always returns 0. [Warning]: script_get_val: cannot access instance variable ''ins_nyd2', defaulting to 0 The script works fine if I removethe if ('ins_nyd2 < 4) end; line, but there are cases when players genuinely disconnect, which would lock them out of finishing the instance. - script nyd_logout_exploit FAKE_NPC,{ OnPCLogoutEvent: if (!compare(strcharinfo(PC_MAP), "2@nyd")) end; getmapxy (@map$,@x,@y,UNITTYPE_PC); if ('ins_nyd2 < 4) end; if ((@x >= 100 && @x <= 300) && (@y >= 255 && @y <= 390)) #nyd_nest = gettimetick(2) + ( 60 * 60 * 24 * 3); // 3 Days end; }
-
Example: I want the variable L_CanTalk to be placed on the character Test Character. by using a script. E.g. an NPC GMs can use to set the variable to a character of their choice. Is this possible?
-
Hi, I'm trying to make an NPC which players can donate zeny to, and the zeny count is for every player - as in when one player donates, it updates a tally for everyone else (stored in NPC). If I use .server_donate (as shown in example below), will it disappear when I restart my server? Thank you in advance. prontera,150,150,3 script Server Donation NPC 4_F_TELEPORTER,{ mes "Players have donated " + .server_donate + " zeny."; mes "How much zeny do you want to donate?"; next; input .@donate; if (Zeny < .@donate) { mes "You need more zeny"; close; } else { Zeny -= .@donate; .server_donate += .@donate; mes "You donated " + .@donate + " z."; close; } }