BreakDancer Posted May 29, 2015 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
Skorm Posted May 29, 2015 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
Elsa Mist Posted May 29, 2015 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
Kurofly Posted May 29, 2015 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
Capuche Posted May 30, 2015 Posted May 30, 2015 WHERE `group_id` > '0') group by account_id LIMIT 128 try Quote
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
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.