Takuyakii Posted October 10, 2019 Group: Members Topic Count: 41 Topics Per Day: 0.02 Content Count: 215 Reputation: 11 Joined: 08/30/19 Last Seen: March 6 Share Posted October 10, 2019 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. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted October 14, 2019 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 01:10 PM Share Posted October 14, 2019 // 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,{ .@aid = getcharid(3); .@cid = getcharid(0); .@ip$ = getcharip(); .@unique_id$ = get_unique_id(); query_logsql("SELECT `id`,`time` FROM `bring_me_event` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$); query_logsql("SELECT COUNT(`id`) FROM `bring_me_event`", .@size); if (.@size >= .max_redeem) { mes "you missed the reward, only "+.max_redeem+" players got the reward."; } else if (.@id) { mes "You've already claimed the rewards on "+.@time$+"."; } 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 ("+.@aid+","+.@cid+",'"+escape_sql(.@ip$)+"','"+escape_sql(.@unique_id$)+"', NOW())"); getitem 501,1; getitem 502,1; getitem 503,1; mes "you are the "+(.@size+1)+"/"+.max_redeem+" players who got the reward"; } } } close; OnInit: .item_id = 512; .amount = 300; .max_redeem = 200; end; } you can try this. 1 1 Quote Link to comment Share on other sites More sharing options...
0 ScarrFace Posted November 6, 2019 Group: Members Topic Count: 17 Topics Per Day: 0.01 Content Count: 66 Reputation: 0 Joined: 10/23/19 Last Seen: August 28, 2024 Share Posted November 6, 2019 On 10/14/2019 at 11:15 AM, Emistry said: // 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,{ .@aid = getcharid(3); .@cid = getcharid(0); .@ip$ = getcharip(); .@unique_id$ = get_unique_id(); query_logsql("SELECT `id`,`time` FROM `bring_me_event` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$); query_logsql("SELECT COUNT(`id`) FROM `bring_me_event`", .@size); if (.@size >= .max_redeem) { mes "you missed the reward, only "+.max_redeem+" players got the reward."; } else if (.@id) { mes "You've already claimed the rewards on "+.@time$+"."; } 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 ("+.@aid+","+.@cid+",'"+escape_sql(.@ip$)+"','"+escape_sql(.@unique_id$)+"', NOW())"); getitem 501,1; getitem 502,1; getitem 503,1; mes "you are the "+(.@size+1)+"/"+.max_redeem+" players who got the reward"; } } } close; OnInit: .item_id = 512; .amount = 300; .max_redeem = 200; end; } you can try this. i have error. how to fix this? add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes. .@unique_id$ = get_unique_id(); Quote Link to comment Share on other sites More sharing options...
0 Gidz Cross Posted January 7, 2024 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 686 Reputation: 89 Joined: 04/07/14 Last Seen: 11 hours ago Share Posted January 7, 2024 On 10/14/2019 at 11:15 AM, Emistry said: // 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,{ .@aid = getcharid(3); .@cid = getcharid(0); .@ip$ = getcharip(); .@unique_id$ = get_unique_id(); query_logsql("SELECT `id`,`time` FROM `bring_me_event` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$); query_logsql("SELECT COUNT(`id`) FROM `bring_me_event`", .@size); if (.@size >= .max_redeem) { mes "you missed the reward, only "+.max_redeem+" players got the reward."; } else if (.@id) { mes "You've already claimed the rewards on "+.@time$+"."; } 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 ("+.@aid+","+.@cid+",'"+escape_sql(.@ip$)+"','"+escape_sql(.@unique_id$)+"', NOW())"); getitem 501,1; getitem 502,1; getitem 503,1; mes "you are the "+(.@size+1)+"/"+.max_redeem+" players who got the reward"; } } } close; OnInit: .item_id = 512; .amount = 300; .max_redeem = 200; end; } you can try this. It works. Can you further enhance this like configurable via in game like your promo code script? Lets talk. Quote Link to comment Share on other sites More sharing options...
Question
Takuyakii
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.
Link to comment
Share on other sites
3 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.