/*
// 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;
}