caspa Posted February 20, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share 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 Link to comment Share on other sites More sharing options...
Euphy Posted February 20, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share 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 Link to comment Share on other sites More sharing options...
caspa Posted February 20, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
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 )
Link to comment
Share on other sites
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.