//Script Name: Guild Package NPC Giver
//Developer: ShogS
//Description: This NPC will Give a Package for each Guild Member take Note: this NPC will record each player IP address to avoid abuse on players side by getting 2 Package in 1 IP
//Version: 1.0
//Some Explanation: Do not forget to set the items to a not tradeable Sample: 17638,91,99 = Can not be droped,sell,trade
//======================================================================================================
// - SQL TABLE
/*
CREATE TABLE IF NOT EXISTS `guildpack` (
`id` int(11) NOT NULL auto_increment,
`account_id` int(11) NOT NULL default '0',
`name` varchar(23) NOT NULL default '',
`last_ip` varchar(100) NOT NULL default '',
PRIMARY KEY (`account_id`),
KEY (`id`)
) ENGINE=MyISAM;
*/
//======================================================================================================
prontera,130,172,5 script Guild Pack Info 468,{
set .@frnd2$,strcharinfo(0);
if(##Gpack == 1) goto L_AG;
mes "[Guild Pack NPC]";
mes "Hello there, it seems you are claiming for a Guild Pack.";
next;
mes "[Guild Pack NPC]";
mes "Let me gift you a guild pack for joining and";
mes "playing in Lunar RO, we hope you enjoy them.";
next;
mes "These guild pack is not duplicable and not dropable.";
next;
switch(select("Yes:No")) {
case 1:
query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lip$); // recruits ip address
query_sql("SELECT last_ip FROM `guildpack`", .@flip$); // recruiter ip address and information
if ( .@lip$ == .@flip$ ) {
mes "^616D7EIt seems you have same IP Address among Guild Mates: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed.";
close;
}
query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lip$ + "')");
//THIS PART WERE all items they will get
getitem 29828,1;
getitem 29851,1;
getitem 29868,1;
getitem 29834,1;
getitem 29804,1;
getitem 29835,1;
getitem2 5170,1,1,7,0,0,0,0,0;
getitem2 2319,1,1,7,0,4141,0,0,0;
getitem2 2114,1,1,7,0,4058,0,0,0;
getitem2 2528,1,1,7,0,4133,0,0,0;
getitem2 2424,1,1,7,0,4097,0,0,0;
getitem 2607,2;
getitem 4035,5;
getitem 4064,2;
getitem 4079,2;
getitem 14175,1;
getitem 671,1;
getitem 607,300;
getitem 12045,100;
getitem 12060,100;
getitem 12050,100;
getitem 12055,100;
getitem 12065,100;
getitem 12070,100;
set ##Gpack, 1;
warp "prontera",156,172;
close;
case 2:
mes "^616D7ENevermind~, You can come back again later!";
close;
set .@GID,getcharid(2);
if (.@GID <= 0) {
mes "You have no guild!";
close;
}
}end;
L_AG:
mes "^616D7EYou already given a Guild Package";
close;
OnInit:
waitingroom "Guild Package",0;
end;
}
Hi, top is my guild pack script, I have problem about this script. Players can get the guild pack even when they are not in guild. And besides that, players who create another account can get the g.pack as well. I already execute the sql table, anyone please help me yea... I really don't know how to fix this bug~~
Question
fallen0519
Hi, top is my guild pack script, I have problem about this script. Players can get the guild pack even when they are not in guild. And besides that, players who create another account can get the g.pack as well. I already execute the sql table, anyone please help me yea... I really don't know how to fix this bug~~
Link to comment
Share on other sites
8 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.