viewing paste Unknown #19746 | 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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
/*
 
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
 
Viewed 1037 times, submitted by Guest.