• 0
Sign in to follow this  
Takuyakii

Custom bring me event

Question

Hello, can i request for an script 

 

Mechanics:

  You need to register to npc first, then after registrating,

you are now qualified to the quest,

 

First 200 Player That Bring you Example item Apple With quantity of 300,

will get reward example poring coin.

And once you done, you cannot repeat the quest.

1 Char per account.

Thank you.

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
// https://rathena.org/board/topic/121262-custom-bring-me-event/

/* 
CREATE TABLE IF NOT EXISTS `bring_me_event` (
	`id` int(11) unsigned NOT NULL auto_increment,
	`aid` int(11) unsigned NOT NULL default '0',
	`cid` int(11) unsigned NOT NULL default '0',
	`last_ip` varchar(100) NOT NULL default '',
	`last_unique_id` varchar(100) NOT NULL default '',
	`time` datetime NOT NULL,
) ENGINE=MyISAM;
*/

prontera,0,0,0	script	Sample	444,{
	[email protected] = getcharid(3);
	[email protected] = getcharid(0);
	[email protected]$ = getcharip();
	[email protected]_id$ = get_unique_id();
	
	query_logsql("SELECT `id`,`time` FROM `bring_me_event` WHERE `aid` = "[email protected]+" OR `last_ip` = '"+escape_sql([email protected]$)+"' OR `last_unique_id` = '"+escape_sql([email protected]_id$)+"' LIMIT 1", [email protected], [email protected]$);
	query_logsql("SELECT COUNT(`id`) FROM `bring_me_event`", [email protected]);
	if ([email protected] >= .max_redeem) {
		mes "you missed the reward, only "+.max_redeem+" players got the reward.";
	}
	else if ([email protected]) {
		mes "You've already claimed the rewards on "[email protected]$+".";
	}
	else {
		mes "Bring me "+.amount+"x "+getitemname(.item_id);
		if (countitem(.item_id) >= .amount) {
			if (select("Okay","Cancel") == 1) {
				delitem .item_id, .amount;
				query_logsql("INSERT INTO `bring_me_event` (`aid`,`cid`,`last_ip`,`last_unique_id`,`time`) VALUES ("[email protected]+","[email protected]+",'"+escape_sql([email protected]$)+"','"+escape_sql([email protected]_id$)+"', NOW())");
				getitem 501,1;
				getitem 502,1;
				getitem 503,1;
				mes "you are the "+([email protected]+1)+"/"+.max_redeem+" players who got the reward";
			}
		}
	}
	close;
	
	OnInit:
		.item_id = 512;
		.amount = 300;
		.max_redeem = 200;
		end;
}

you can try this.

Share this post


Link to post
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.

Loading...
Sign in to follow this