viewing paste item log | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 
/*
    // load this SQL table
    
        CREATE TABLE IF NOT EXISTS `scroll_usage_log` (
          `account_id` int(11) unsigned NOT NULL default '0',
          `char_id` int(11) unsigned NOT NULL default '0',
          `name` varchar(30) NOT NULL default '',
          `item` int(11) unsigned NOT NULL default '0',
          `count` int(11) unsigned NOT NULL default '0',
          PRIMARY KEY  ( `account_id`,`char_id`,`item` )
        ) ENGINE=MyISAM;
 
    // item_db.txt  or npc script..add this
    
        callfunc( "scroll_usage_log",rand( 501,503 ) );
        
*/      
 
function    script  scroll_usage_log    {
    query_sql( "INSERT INTO `scroll_usage_log` VALUES ( "+getcharid(3)+","+getcharid(0)+",'"+strcharinfo(0)+"',"+getarg(0)+",1 ) ON DUPLICATE KEY UPDATE `count` = `count` + 1" );
    return;
}
 
Viewed 1062 times, submitted by Emistry.