• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Need autoloot system TFS 1.2

willks123

New Member
Joined
Dec 31, 2012
Messages
65
Reaction score
2
Well before you criticize me because there are several topics about autoloot. I apologize because I am a layman in programming.

I need an autoloot script only for Gold Coin to go straight to the Bank. However this system has to be activated by an item and have a duration of 15 days as I will put to sell in the Store.
But I want it to be an item that the player can sell to other players to spin the OT trade.

Well if it is possible that thanks and I give Rep ++ and place the creditoseus by the system on my server.

And sorry for my inglish i'm using tradutor.
 
Then use the search on this forum because someone already made it... Don't just stop looking because its the 1st link you clicked on.
Before telling anyone what to do, understand that they are asking for that because they couldn't find anything. Or PERHAPS they are still looking for it while posting it here in case someone magically links it.
 
if you follow the steps in this tutorial Feature - Auto Loot [TFS 1.3], this can help you ::
Code:
    if (owner->getAutoLootItem(item->getID())) {
        if (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) {
            if (g_game.internalRemoveItem(item) == RETURNVALUE_NOERROR) {
                switch(item->getID())
                {
                    case ITEM_GOLD_COIN: {
                        owner->setBankBalance(owner->getBankBalance() +item->getItemCount());
                        break;
                    }
                    case ITEM_PLATINUM_COIN: {
                        owner->setBankBalance(owner->getBankBalance() +(item->getItemCount() * 100));
                        break;
                    }
                    case ITEM_CRYSTAL_COIN: {
                        owner->setBankBalance(owner->getBankBalance() +(item->getItemCount() * 10000));
                        break;
                    }
                    default:break;
                }
            }
        } else {
            g_game.internalPlayerAddItem(owner, item, true, CONST_SLOT_WHEREEVER);
        }
        autolooted = autolooted + ", " + item->getNameDescription();
    } else if (g_game.internalAddItem(corpse, item) != RETURNVALUE_NOERROR) {
        corpse->internalAddThing(item);
    }
 
Back
Top