/*
// add this sql table
CREATE TABLE IF NOT EXISTS `guild_package_log` (
`id` int(11) unsigned NOT NULL,
`guild_id` int(11) unsigned NOT NULL,
`name` varchar(30) NOT NULL DEFAULT '',
`account_id` int(11) unsigned NOT NULL,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY ( `id` )
) ENGINE=MyISAM;
*/
/*
in your guild package script...
BEFORE they claimed the guild package, add this line
*/
mes "Claim Guild Package";
query_sql( "SELECT `account_id`,`master`,`time` FROM `guild_package_log` WHERE `guild_id` = "+.@guild_id+" LIMIT 1",.@aid,.@master$,.@time$ );
if( !.@aid ){
// get guild packet
getitem 512,1;
getitem 512,2;
getitem 512,3;
query_sql( "INSERT INTO `guild_package_log` VALUES ( "+gettimetick(0)+","+.@guild_id+",'"+escape_sql( strcharinfo(0) )+"',"+getcharid(3)+",NOW() )" );
}
else{
mes "Already claimed by "+.@master$+" on "+.@time$;
}