/*
CREATE TABLE IF NOT EXISTS `gm_shop_log` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`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=MyIsam;
*/
que_house_s,12,50,4 script GM Private Shop#gmshop 757,{
if ( getgroupid() < 4 ) end;
switch(select("Weapon:Armor:Other")) {
case 1: // Weapon
callshop "gm_shop_npc_weapon",1;
npcshopattach "gm_shop_npc",1;
end;
case 2: // Armor
add as above..
case 3: // Other
add as above...
}
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 logs.`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;
}
// item list
- shop gm_shop_npc_weapon -1,20036:1,20213:2,20075:3,20037:4
add shops ass above