Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- 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;
- */
- //============================================================
- amatsu,232,216,3 script Unique ID Recorder 4_F_TELEPORTER,{
- .@name$ = "[^FF8000" + strnpcinfo(NPC_NAME) + "^000000]";
- mes .@name$;
- mes "Would you like to check";
- mes "if your IP Address has";
- mes "been recorded by me?";
- next;
- if (select(
- "^777777Truncate Table.^000000",
- "^FF0000Check recorded information.^000000"
- ) == 1)
- {
- mes .@name$;
- mes "This action will truncate";
- mes "the guildpack table, clearing";
- mes "all of its contents.";
- next;
- query_sql("TRUNCATE TABLE `guildpack`");
- mes .@name$;
- mes "Done. Check your recorded";
- mes "information to confirm";
- mes "action.";
- close;
- }
- .@myip$ = getcharip();
- if (callsub(S_Check_IP))
- {
- mes .@name$;
- mes("^616D7EIt seems I have already recorded your IP Address: ^ff0000" + .@myip$ + "^000000.");
- close;
- }
- query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(CHAR_ID_ACCOUNT) + ",'" + escape_sql(strcharinfo(PC_NAME)) + "','" + .@myip$ + "','" + .@uid$ + "')");
- mes .@name$;
- mes "This is the first time I have recorded your information.";
- close;
- // Checks IP Address
- S_Check_IP:
- return query_sql("SELECT 1 FROM `guildpack` join login on login.`last_ip` = `guildpack`.`last_ip` where login.account_id = "+ getcharid(CHAR_ID_ACCOUNT), .@tmp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement