BreakDancer Posted May 29, 2015 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 34 Reputation: 0 Joined: 01/22/14 Last Seen: August 3, 2022 Share Posted May 29, 2015 hi all ,,, i need rewards script give prizes for all online players and give only 1 time for the same ip "if can " and i talk to npc "with my gm " to give prize and i put id,amount any one can give me this script ? and thanks Quote Link to comment Share on other sites More sharing options...
Skorm Posted May 29, 2015 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted May 29, 2015 I believe there are a few of these around try searching for it. http://lmgtfy.com/?q=rathena+ip+rewards Quote Link to comment Share on other sites More sharing options...
Elsa Mist Posted May 29, 2015 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 387 Reputation: 60 Joined: 10/08/13 Last Seen: July 14, 2022 Share Posted May 29, 2015 I believe there are a few of these around try searching for it. http://lmgtfy.com/?q=rathena+ip+rewards Quote Link to comment Share on other sites More sharing options...
Kurofly Posted May 29, 2015 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted May 29, 2015 (edited) That was funny I think he's not looking for a daily reward system. - script reward npc -1,{ OnInit: bindatcmd "reward",strnpcinfo(0)+"::OnReward",40; end; OnReward: .@nb = query_sql ("SELECT `name` FROM `ragnarok`.`char` WHERE `online` = '1' AND `account_id` NOT IN (SELECT `account_id` FROM `ragnarok`.`login` WHERE `group_id` > '0') LIMIT 128",.@players$); mes "["+strnpcinfo(0)+"]"; if (.@nb == -1) { mes "No player is connected.." ; close; } if (.@nb == 128) { mes "There are too many players for me to handle.." ; close; } mes "Hi there!","I can give items to every players connected","","Players connected : ^0000ff"+.@nb+"^000000"; next; if (select("Give items:Leave") == 2) end; while (!.@ok) { mes "["+strnpcinfo(0)+"]"; mes "please ^0000ffinput the id of the item^000000 you want to give to players."; input .@id,501; mes "","Item selected : ^ff0000"+getitemname(.@id)+"^000000"; .@s = select("Next:Change item:Leave"); next; if (.@s == 3) end; if (.@s == 1) .@ok = 1; } while (!.@ok2) { mes "["+strnpcinfo(0)+"]"; mes "please ^0000ffinput the amount^000000 you want to give to players."; input .@amount,1; mes "","Amount : ^ff0000"+.@amount+"^000000"; .@s = select("Next:Change amount:Leave"); next; if (.@s == 3) end; if (.@s == 1) .@ok2 = 1; } mes "["+strnpcinfo(0)+"]"; mes "Do you want to announce something?"; next; .@s = select("Custom announce:Automatic announce:No announce:Leave"); if (.@s == 4) end; if (.@s == 3) .@noannounce = 1; if (.@s == 1) { mes "["+strnpcinfo(0)+"]"; mes "Please input your announce."; input .@announce$; } close2; if (!.@noannounce) { if (.@announce$ != "") announce .@announce$,0; else announce "Here for you all! Hope you enjoy!",0; } for (.@i = 0 ; .@i < .@nb ; .@i++) if (attachrid(getcharid(3,.@players$[.@i]))) getitem .@id,.@amount; } Don't know if you found something already but if you didn't you can use this. type '@reward' in-game and you will be able to give items to all players online. Note for SQL pros ^^: I couldn't find a way to select names with distinct account_id with my query so if someone know how to do so I'm really curious please tell me Even so I don't think it's a problem since you shouldn't be connected with more than one of your characters. Edited May 29, 2015 by Kurofly Quote Link to comment Share on other sites More sharing options...
Capuche Posted May 30, 2015 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 May 30, 2015 WHERE `group_id` > '0') group by account_id LIMIT 128 try Quote Link to comment Share on other sites More sharing options...
Question
BreakDancer
hi all ,,,
i need rewards script
give prizes for all online players
and give only 1 time for the same ip "if can "
and i talk to npc "with my gm " to give prize and i put id,amount
any one can give me this script ?
and thanks
Link to comment
Share on other sites
4 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.