yuhsing

Untitled

Oct 14th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. /*
  2. CREATE TABLE IF NOT EXISTS `freebie` (
  3. `account_id` int(11) unsigned NOT NULL default '0',
  4. `ip` varchar(30) NOT NULL default '0.0.0.0',
  5. `time` datetime NOT NULL default '0000-00-00 00:00:00',
  6. PRIMARY KEY (`account_id`)
  7. ) ENGINE=MyISAM;
  8. */
  9.  
  10. prontera,155,171,5 script Sample 757,{
  11. mes "Claim Freebie ?";
  12. if( select( "YES","Cancel" ) == 1 ){
  13. query_sql( "SELECT `account_id`,`last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1",.@aid,.@ip$ );
  14. if( query_sql( "SELECT `time` FROM `freebie` WHERE `account_id` = "+.@aid+" OR `ip` = '"+.@ip$+"'",.@time$ ) ){
  15. mes "You have claimed it on "+.@time$;
  16. }else{
  17. query_sql( "INSERT INTO `freebie` VALUES ( "+.@aid+",'"+.@ip$+"',NOW() )" );
  18. getitem 512,1;
  19. getitem 512,2;
  20. getitem 512,3;
  21. mes "Gained freebies.";
  22. }
  23. }
  24. close;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment