Jump to content
  • 0

Help Need Reward Script


BreakDancer

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  01/22/14
  • Last Seen:  

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 :D

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

I believe there are a few of these around try searching for it.

 

http://lmgtfy.com/?q=rathena+ip+rewards

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

I believe there are a few of these around try searching for it.

 

http://lmgtfy.com/?q=rathena+ip+rewards

 

 

/no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   31
  • Joined:  07/08/14
  • Last Seen:  

That was funny  :lol:

 

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 by Kurofly
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

WHERE `group_id` > '0') group by account_id LIMIT 128

try

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...