viewing paste Unknown #5730 | Text

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
/*==========================================
 * @autotrade by durf [Lupus] [Paradox924X]
 * Turns on/off Autotrade for a specific player
 *------------------------------------------*/
ACMD(autotrade) {
    nullpo_retr(-1, sd);
    
    if( map[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) {
        clif->message(fd, msg_txt(1179)); // Autotrade is not allowed on this map.
        return false;
    }
    
    if( pc_isdead(sd) ) {
        clif->message(fd, msg_txt(1180)); // You cannot autotrade when dead.
        return false;
    }
    
    if( !sd->state.vending && !sd->state.buyingstore ) { //check if player is vending or buying
        clif->message(fd, msg_txt(549)); // "You should have a shop open to use @autotrade."
        return false;
    }
    //BEGIN Addition by Moi (Autotrade time restrictions)
    if (agit_flag == 1 || agit2_flag == 1) {
        clif->message(fd, "You cannot use @autotrade while WoE is on.");
        return 0;
    }
    time_t time_server;
    struct tm *datetime; // <--- complaining
Viewed 735 times, submitted by Xgear.