• 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!

playerRequestTrade { evolution } bug

El Man

«لَا إِلَٰهَ إِلَّا ٱللَّٰهُ»
Joined
Mar 23, 2013
Messages
161
Reaction score
33
C++:
bool Game::playerRequestTrade(Player* player, const Position& pos, uint8_t stackPos,
uint32_t playerId, uint16_t spriteId)
{
OTSYS_THREAD_LOCK_CLASS lockClass(gameLock, "Game::playerRequestTrade()");
if(player->isRemoved())
return false;
Player* tradePartner = getPlayerByID(playerId);
if(!tradePartner || tradePartner == player) {
player->sendTextMessage(MSG_INFO_DESCR, "Sorry, not possible.");
return false;
}

if(!Position::areInRange<2,2,0>(tradePartner->getPosition(), player->getPosition())){
std::stringstream ss;
ss << tradePartner->getName() << " tells you to move closer.";
player->sendTextMessage(MSG_INFO_DESCR, ss.str());
return false;
}
Item* tradeItem = dynamic_cast<Item*>(internalGetThing(player, pos, stackPos, spriteId, STACKPOS_USE));
if(!tradeItem || tradeItem->getClientID() != spriteId || !tradeItem->isPickupable()) {
player->sendCancelMessage(RET_NOTPOSSIBLE);
return false;
}
else if(player->getPosition().z > tradeItem->getPosition().z){
player->sendCancelMessage(RET_FIRSTGOUPSTAIRS);
return false;
}
else if(player->getPosition().z < tradeItem->getPosition().z){
player->sendCancelMessage(RET_FIRSTGODOWNSTAIRS);
return false;
}
else if(!Position::areInRange<1,1,0>(tradeItem->getPosition(), player->getPosition())){
player->sendCancelMessage(RET_TOOFARAWAY);
return false;
}
std::map<Item*, unsigned long>::const_iterator it;
const Container* container = NULL;
for(it = tradeItems.begin(); it != tradeItems.end(); it++) {
if(tradeItem == it->first ||
((container = dynamic_cast<const Container*>(tradeItem)) && container->isHoldingItem(it->first)) ||
((container = dynamic_cast<const Container*>(it->first)) && container->isHoldingItem(tradeItem)))
{
player->sendTextMessage(MSG_INFO_DESCR, "This item is already being traded.");
return false;
}
}
Container* tradeContainer = tradeItem->getContainer();
if(tradeContainer && tradeContainer->getItemHoldingCount() + 1 > 100){
player->sendTextMessage(MSG_INFO_DESCR, "You can not trade more than 100 items.");
return false;
}
return internalStartTrade(player, tradePartner, tradeItem);
}
 
Last edited:
There are 2 problems:
  • it's engine from 2006, it's not like there is 1 crash reason, now someone abuse trade, when you fix it, they will abuse another bug of 50 bugs found in last 15 years
  • without gdb report we won't find why it crashes

in my opnion or as i see on another source its need add exhausted only in request trade
Exhaust does not fix anything. Engine must be stable, no matter how fast players do actions.
 
There are 2 problems:
  • it's engine from 2006, it's not like there is 1 crash reason, now someone abuse trade, when you fix it, they will abuse another bug of 50 bugs found in last 15 years
  • without gdb report we won't find why it crashes


Exhaust does not fix anything. Engine must be stable, no matter how fast players do actions.
you are right
 
You shouldn't be tagging random people to help you out, that's rude. Also it breaks the rules of the Support Board.

10. Tagging Users:

- Please refrain from tagging specific users in your posts unless you have their permission to do so.

Also as Gesior said, your sources are VERY outdated so there's no point on fixing that since there's plenty of crash bugs you can reproduce in your server. If you still want to fix that I would recommend to generate a dump report so you can see exactly where's the error, fix, recompile and enjoy, if you don't know how to generate a dump check out this thread: How to make crash report(OTServ and Tfs) (https://otland.net/threads/how-to-make-crash-report-otserv-and-tfs.59083/)
 
Multi accounts, Spamming (BUMPing), Invalid title format, Incomplete Problem Description, Scripts without code/PHP tags, and as Loney mentioned Tagging Users.
All those broken rules are repeatedly made by the same members almost daily and they still haven't learned how to create a proper thread and will never learn how to do.
I am not sure why this thread is still there and the other threads too. The same goes for the thread OP who's using different OTLand accounts, I am not sure why he is still there.
I havent solved it yet
i got Script trade Ammo fast and accpt server Crash
So you both have been crashing all 8.10 servers for months using that script just to get 2-3 more online players on your stolen servers and now when someone started doing the same you're here to beg again for help?
I was trying to help a friend who you both were crashing his server continuously and because I couldn't find a solution, I just disabled his trade system to avoid your hate/greed.
 
Last edited:
Multi accounts, Spamming (BUMPing), Invalid title format, Incomplete Problem Description, Scripts without code/PHP tags, and as Loney mentioned Tagging Users.
All those broken rules are repeatedly made by the same members almost daily and they still haven't learned how to create a proper thread and will never learn how to do.
I am not sure why this thread is still there and the other threads too. The same goes for the thread OP too who's using different OTLand accounts, I am not sure why he is still there.


So you both have been crashing all 8.10 servers for months using that script just to get 2-3 more online players on your stolen servers and now when someone started doing the same you're here to beg again for help?
I was trying to help a friend who you both were crashing his server continuously and because I couldn't find a solution, I just disabled his trade system to avoid your hate/greed.
multi account lol.. i dont intersted about your post + i wont your help. i solved it !
Post automatically merged:

Close thread
SOLVED !
 
One more rule is broken, You should post the solution.
8. Removing Solved Content:
  • If you solved your problem, post the solution, do not remove the content in your posts. Instead write the solution you found. This can help other users with the same problem.
  • Threads with removed content are useless and are seen as spam.
  • If you were able to solve the issue yourself, post the solution and report your own post so a moderator can tag it as the "Best Answer".
 
One more rule is broken, You should post the solution.
as you said in the top. disabled his trade !
C++:
bool Game::playerRequestTrade(Player* player, const Position& pos, uint8_t stackPos,
    uint32_t playerId, uint16_t spriteId)
{
}

bool Game::internalStartTrade(Player* player, Player* tradePartner, Item* tradeItem)
{
    if(player->tradeState != TRADE_NONE && !(player->tradeState == TRADE_ACKNOWLEDGE && player->tradePartner == tradePartner)) {
        player->sendCancelMessage(RET_YOUAREALREADYTRADING);
        return false;
    }
    else if(tradePartner->tradeState != TRADE_NONE && tradePartner->tradePartner != player) {
        player->sendCancelMessage(RET_THISPLAYERISALREADYTRADING);
        return false;
    }
   
    player->tradePartner = tradePartner;
    player->tradeItem = tradeItem;
    player->tradeState = TRADE_INITIATED;
    tradeItem->useThing2();
    tradeItems[tradeItem] = player->getID();

    player->sendTradeItemRequest(player, tradeItem, true);

    if(tradePartner->tradeState == TRADE_NONE){
        std::stringstream trademsg;
        trademsg << player->getName() <<" wants to trade with you.";
        tradePartner->sendTextMessage(MSG_INFO_DESCR, trademsg.str());
        tradePartner->tradeState = TRADE_ACKNOWLEDGE;
        tradePartner->tradePartner = player;
    }
    else{
        Item* counterOfferItem = tradePartner->tradeItem;
        player->sendTradeItemRequest(tradePartner, counterOfferItem, false);
        tradePartner->sendTradeItemRequest(player, tradeItem, false);
    }

    return true;

}
Multi accounts, Spamming (BUMPing), Invalid title format, Incomplete Problem Description, Scripts without code/PHP tags, and as Loney mentioned Tagging Users.
All those broken rules are repeatedly made by the same members almost daily and they still haven't learned how to create a proper thread and will never learn how to do.
I am not sure why this thread is still there and the other threads too. The same goes for the thread OP who's using different OTLand accounts, I am not sure why he is still there.


So you both have been crashing all 8.10 servers for months using that script just to get 2-3 more online players on your stolen servers and now when someone started doing the same you're here to beg again for help?
I was trying to help a friend who you both were crashing his server continuously and because I couldn't find a solution, I just disabled his trade system to avoid your hate/greed.
This is the only solution for her in this evolution source
* As the saying goes: whoever helps you is the one who steals you *
 
Last edited:
Do you have a solution, someone has fixed the problem and no one is responding to me
We are not trying to find any solution
Why are we here? There are people who use evolution and treat some
 
Do you have a solution, someone has fixed the problem and no one is responding to me
We are not trying to find any solution
Why are we here? There are people who use evolution and treat some
valantia.pl
valantia.pl hasn't fixed it, I logged in and took a quick look, He just lowered the maxPacketsPerSecond so every time you spam trade you get kicked.
 
Back
Top