Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- CREATE TABLE IF NOT EXISTS `freebie` (
- `account_id` int(11) unsigned NOT NULL default '0',
- `ip` varchar(30) NOT NULL default '0.0.0.0',
- `time` datetime NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (`account_id`)
- ) ENGINE=MyISAM;
- */
- prontera,155,171,5 script Sample 757,{
- mes "Claim Freebie ?";
- if( select( "YES","Cancel" ) == 1 ){
- query_sql( "SELECT `account_id`,`last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1",.@aid,.@ip$ );
- if( query_sql( "SELECT `time` FROM `freebie` WHERE `account_id` = "+.@aid+" OR `ip` = '"+.@ip$+"'",.@time$ ) ){
- mes "You have claimed it on "+.@time$;
- }else{
- query_sql( "INSERT INTO `freebie` VALUES ( "+.@aid+",'"+.@ip$+"',NOW() )" );
- getitem 512,1;
- getitem 512,2;
- getitem 512,3;
- mes "Gained freebies.";
- }
- }
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment