// http://hercules.ws/board/topic/8602-gm-shop/
/*
CREATE TABLE IF NOT EXISTS `gm_shop_log` (
`id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`name` VARCHAR(24) NOT NULL DEFAULT '',
`item` VARCHAR(50) NOT NULL DEFAULT '',
`reason` VARCHAR(255) NOT NULL DEFAULT '',
`time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=MyI
*/
// item list
- shop gm_shop_npc -1,607:1,608:2,
prontera,155,181,5 script Sample#gmshop 757,{
if ( getgroupid() < 60 ) end;
callshop "gm_shop_npc",1;
npcshopattach "gm_shop_npc",1;
end;
OnBuyItem:
mes "Why you try to get "+@bought_quantity[0]+" x "+getitemname( @bought_nameid[0] )+"?";
mes " ";
mes "Enter a reason...";
while( input( .@reason$,4,70 ) );
query_sql( "INSERT INTO `gm_shop_log` ( `account_id`,`char_id`,`name`,`item`,`reason`,`time` ) VALUES ( "+getcharid(3)+","+getcharid(0)+",'"+strcharinfo(0)+"','"+@bought_quantity[0]+"x "+getitemname( @bought_nameid[0] )+"',"+.@reason$+",NOW() ) " );
getitem @bought_nameid[0],@bought_quantity[0];
close;
}