Rage Guy Posted May 2, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Share Posted May 2, 2013 (edited) I Need A Prize npc that got a Privet Prizes for only 1 player and i can send to every one online on the server prizes Edited May 3, 2013 by SpongeBOB Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: Sunday at 01:45 AM Share Posted May 2, 2013 (edited) Try this; prontera,200,180,4 script Prize Sender Test 123,{ if(!getgmlevel())end; set .@itemtoonlineplayers$,strcharinfo(0); mes "Input Item ID"; Input .@item; if (getitemname(.@item) == "null") { mes "Invalid Item ID"; close; } mes "Input Amount"; input .@inum; if( .@inum <= 0 ) { mes "Invalid Amount"; close; } while( .@V < $PlayerNumber ){ set .@V,.@V+1; message getd("$RecordAID"+.@V),"[[[ System ]]] : "+.@itemtoonlineplayers$+" give you "+getitemname(.@item)+"x"+.@inum; getitem .@item,.@inum,getd("$RecordAID"+.@V); } close; } - script PrizeSenderEvent -1,{ OnInit: if(!getusers(1))while($PlayerNumber)setd "$RecordAID"+(set($PlayerNumber, $PlayerNumber-1)+1),0; end; OnPCLoginEvent: setd "$RecordAID"+set(@AIDNumber,set($PlayerNumber,$PlayerNumber+1)),getcharid(3); end; OnPCLogoutEvent: setd "$RecordAID"+@AIDNumber,getd("$RecordAID"+(set(.@AIDNumber,set($PlayerNumber, $PlayerNumber-1)+1))); attachrid getd("$RecordAID"+@AIDNumber); setd "$RecordAID"+@AIDNumber,0; set @AIDNumber,.@AIDNumber; } Edited May 2, 2013 by Anakid Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: Sunday at 01:45 AM Share Posted May 2, 2013 Try Item Rewards by Euphy; http://pastebin.com/raw.php?i=wTG07rbs Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted May 2, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted May 2, 2013 i rlly dont understand it o.O input name , pakage number . i dont understand what do he mean ? Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: Sunday at 01:45 AM Share Posted May 2, 2013 Set the prizes first. setarray .Package1[0],501,1,502,2,503,3; setarray .Package2[0],601,5,602,10; setarray .Package3[0],607,10; Talk to the npc then input the player name then select the package. After that; the player need to talk to the NPC to get the reward. Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted May 2, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted May 2, 2013 == Am Searching for the NPC That Can Send to every online Player To Only online Players Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 3, 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 May 3, 2013 mes "Input an item ID."; input .@item; if (getitemname(.@item) == "null") { mes "Invalid item "+.@item+"."; close; } mes "Input an amount."; input .@amount; if (.@amount == 0 || .@amount > 30000) { mes "Invalid amount "+.@amount+"."; close; } mes " "; mes "Giving "+.@amount+"x "+getitemname(.@item)+" to all players."; close2; set .@size, query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1",.@aid); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { getitem .@item,.@amount,.@aid[.@i]; } end; Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted May 3, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted May 3, 2013 prontera,200,180,4 script Prize Sender Test 123,{ if(!getgmlevel())end; set .@itemtoonlineplayers$,strcharinfo(0); mes "Input an item ID."; input .@item; if (getitemname(.@item) == "null") { mes "Invalid item "+.@item+"."; close; } mes "Input an amount."; input .@amount; if (.@amount == 0 || .@amount > 30000) { mes "Invalid amount "+.@amount+"."; close; } mes " "; mes "Giving "+.@amount+"x "+getitemname(.@item)+" to all players."; close2; set .@size, query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1",.@aid); for(set .@i,0; .@i<.@size; set .@i,.@i+1) { getitem .@item,.@amount,.@aid[.@i]; } end; not working with me both didn't work no no its working thannks guys Quote Link to comment Share on other sites More sharing options...
Euphy Posted May 3, 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 May 3, 2013 @Anakid: For the record, you really should not use that method of storing names; there's absolutely no reason to use permanent variables for every player (they'll slow down the server by constantly syncing with your `mapreg` table). Performing a single query is far more efficient. Quote Link to comment Share on other sites More sharing options...
Question
Rage Guy
I Need A Prize npc
that
got a Privet Prizes for only 1 player
and i can send to every one online on the server prizes
Edited by SpongeBOBLink to comment
Share on other sites
8 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.