how can I make this script work? when it reach 100players online it will automatically give an item.. hope that someone can help me? thanks in advance..
mes "Input item ID:";
input .@item;
if (getitemname(.@item) == "null") {
mes "Invalid ID "+.@item+".";
close;
}
mes "Input quantity:";
input .@count,0,30000;
if (.@count == 0) {
mes "Invalid quantity 0.";
close;
}
set .@j, query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1",.@aid);
for(set .@i,0; .@i<.@j; set .@i,.@i+1)
getitem .@item,.@count,.@aid[.@i];
mes "Gave item "+getitemname(.@item)+" x"+.@count+" to "+.@j+" players.";
close;
Question
blakbord
how can I make this script work? when it reach 100players online it will automatically give an item.. hope that someone can help me? thanks in advance..
Edited by blakbordLink to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.