Zirius 1 Posted September 26, 2014 Is there a equivalent function of in_array() in Hercules? I am trying to make a script that records to an array maps at which a character went, then i wanna do a script that triggers if a specific map is inside the array. Thanks! Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted September 26, 2014 (edited) xxxx script xxxx xxx,{.@m$ = strcharinfo(3);for(.@i=0;.@m$ != .yourarray$[.@i] && .@i< .size ; i++);if(.@i<.size) { got it!}Oninit:setarray .yourarray$,"XXX","yyy" "zzz";.size = getarraysize(.yourarray$);} Edited September 26, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
Is there a equivalent function of in_array() in Hercules? I am trying to make a script that records to an array maps at which a character went, then i wanna do a script that triggers if a specific map is inside the array.
Thanks!
Share this post
Link to post
Share on other sites