caspa Posted February 20, 2013 Posted February 20, 2013 I would like to request an NPC where if you click him he would ask for an item id and if you enter 7227 he would ask next how many...... after you put the amount all the online player will recieve the item.... ( vendor and afk included ) Quote
Euphy Posted February 20, 2013 Posted February 20, 2013 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; 2 Quote
caspa Posted February 20, 2013 Author Posted February 20, 2013 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; thank you sir euphy [ SOLVED ] Quote
Question
caspa
I would like to request an NPC where if you click him he would ask for an item id and if you enter 7227 he would ask next how many...... after you put the amount all the online player will recieve the item.... ( vendor and afk included )
2 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.