Rage Guy Posted June 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 June 2, 2013 i nEeed a npc that gives every online players a prize with gm only that allowed to send prizes working 100% - Tested . Quote Link to comment Share on other sites More sharing options...
Jaburak Posted June 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted June 2, 2013 http://www.eathena.ws/board/index.php?showtopic=268497 Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted June 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 June 2, 2013 where to put thise //Version : (2011/5/27-22:46) - script fi -1,{ OnWhisperGlobal: if(!getgmlevel()) end; if(@whispervar0$=="all") callfunc "itemforall",strcharinfo(0),atoi(@whispervar1$),atoi(@whispervar2$); if(@whispervar0$=="map") callfunc "itemforallmap",strcharinfo(0),atoi(@whispervar1$),atoi(@whispervar2$),@whispervar3$; end; } function script itemforallmap { getmapxy(.@N$,.@B,.@C,0); if( getitemname(getarg(1)) == "null" ){ announce "error id 1-1",bc_self,0x00FFFF; end; } if( getarg(1) <= 0 ){ announce "error id 2-1",bc_self,0x00FFFF; end; } while( .@V < $PlayerNumber ){ set .@V,.@V+1; getmapxy(.@N123$,.@B,.@C,0,rid2name(getd("$RecordAID"+.@V))); if( .@N$ == .@N123$ && getarg(3) == "" )||( getarg(3) != "" && getarg(3) == .@N123$ ){ message rid2name(getd("$RecordAID"+.@V)),getarg(0)+" give you "+getitemname(getarg(1))+"x"+getarg(2); getitem getarg(1),getarg(2),getd("$RecordAID"+.@V); } } return; } function script itemforall { if( getitemname(getarg(1)) == "null" ){ announce "error id 1-2",bc_self,0x00FFFF; end; } if( getarg(1) <= 0 ){ announce "error id 2-2",bc_self,0x00FFFF; end; } while( .@V < $PlayerNumber ){ set .@V,.@V+1; if( isloggedin(getd("$RecordAID"+.@V)) ){ message rid2name(getd("$RecordAID"+.@V)),getarg(0)+" give you "+getitemname(getarg(1))+"x"+getarg(2); getitem getarg(1),getarg(2),getd("$RecordAID"+.@V); } } return; } - script BlackHoleEvent -1,{ OnPCLoginEvent: setd "$RecordAID"+set($PlayerNumber,$PlayerNumber+1),getcharid(3); end; OnInit: OnTimer5000: initnpctimer; for(set .@i,1;.@i<=$PlayerNumber;set .@i,.@i+1) { if(!isloggedin(getd("$RecordAID"+.@i))) { if(!getd("$RecordAID"+.@i)) { set $PlayerNumber,0; break; } setd "$RecordAID"+.@i,getd("$RecordAID"+(.@i+1)); setd "$RecordAID"+(.@i+1),0; set .@i,.@i-1; } } end; } Quote Link to comment Share on other sites More sharing options...
Jaburak Posted June 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted June 2, 2013 npc/custom Quote Link to comment Share on other sites More sharing options...
Diss Posted June 2, 2013 Group: Members Topic Count: 67 Topics Per Day: 0.02 Content Count: 207 Reputation: 1 Joined: 05/01/13 Last Seen: July 23, 2016 Share Posted June 2, 2013 thnx its works fine to me Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 2, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 2, 2013 You already made a topic about that here. Please refrain for doing multi-topic. Thanks you. Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted June 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 June 2, 2013 its not working with large amount players pls fast the players are waiting for the prize sending == Quote Link to comment Share on other sites More sharing options...
Jaburak Posted June 2, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted June 2, 2013 prontera,155,170,5 script Gift 87,{ if( getgmlevel() < 60 ) end; if( select( "Give an item", "Leave" ) -1 ) end; input .@item_id; if( getiteminfo( .@item_id,0 ) == -1 ) { mes "Unknown item id."; close; } input .@amount; if( .@amount <= 0 ) { mes "Invalid Amount"; close; } set .@item_name$, getitemname( .@item_id ); set .@gm_name$, strcharinfo(0); do { set .@size, query_sql( "SELECT `account_id` from `char` where `online` = '1' order by `account_id` desc limit "+ ( .@loop *128 ) +", 128", .@account_id ); for( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) { getitem .@item_id, .@amount, .@account_id[.@i]; message rid2name( .@account_id[.@i] ), "You get an "+ .@item_name$ +" from "+ .@gm_name$ +"."; } set .@loop, .@loop +1; } while( .@size ); mes "Done."; close; } Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted June 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 June 2, 2013 thise one when i use it the server like i used @reloadscript but never walk again -== Quote Link to comment Share on other sites More sharing options...
Question
Rage Guy
i nEeed a npc that gives every online players a prize
with gm only that allowed to send prizes
working 100% - Tested .
Link 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.