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

How to fix PZ, you attack a monster then go Into Pz then u can logout, Need help!

Zt0ffe

New Member
Joined
Sep 26, 2008
Messages
341
Reaction score
4
Location
Sweden
as topic says.. When you for example attack/kill a monster (not players) and go back into PZ then you lose your PZ right away and can logout. Anyone know how to fix this issue? :)

Thanks In advance!
 
Pretty sure this is normal. In real Tibia, it's like this.

Loney, he means that if you attack/kill a monster, you can lose the battle-sign when you enter PZ.
 
I think his problem is something along the lines of, you kill a monster and get pz-locked meaning you shouldn't be able to log out, but when you enter a protection zone, the pz-lock disappears immediately on entrance and you can logout. He is asking if anybody knows how to fix it so that your pz-lock doesn't disappear the moment you enter a protection zone but has to wait awhile.
 
player.cpp
if(getZone() == ZONE_PROTECTION)
{
icons |= ICON_PZ;

// Don't show ICON_SWORDS if player is in protection zone.
if(hasBitSet(ICON_SWORDS, icons))
icons &= ~ICON_SWORDS;

}
 
player.cpp
Code:
  if(getZone() == ZONE_PROTECTION)
   {
     icons |= ICON_PZ;
  
     // Don't show ICON_SWORDS if player is in protection zone.
     if(hasBitSet(ICON_SWORDS, icons))
       icons &= ~ICON_SWORDS;
   }

Thank you very much. I will either try this out or have it as it is. Havent played latest tibia in a while and Im using a 8.6 rev. But IF Im going to change it, what do I change it too in that code? :)

Thanks for all help!
 
I cannot imagine why you wouldn't want someone to be able to log out in PZ.

The reason Cipsoft added it in was - You are completely safe anyway, there is no reason you should be forced to be online and wait when you are in complete safety. The point of Battle Signs was so that you couldn't log out DURING battle, in a Protection Zone it is impossible to battle, so this rule does not apply.
 
in globalevent
Code:
local function cancelConditions(cid)
doRemoveCondition(cid, CONDITION_INFIGHT)
doRemoveCondition(cid, CONDITION_FIRE)
doRemoveCondition(cid, CONDITION_ENERGY)
doRemoveCondition(cid, CONDITION_DRUNK)
doRemoveCondition(cid, CONDITION_PARALYZE)
doRemoveCondition(cid, CONDITION_CURSED)
doRemoveCondition(cid, CONDITION_HUNTING)
doRemoveCondition(cid, CONDITION_BLEEDING)
doRemoveCondition(cid, CONDITION_POISON)
return false
end
function onThink(interval)
for _, cid in ipairs(getPlayersOnline()) do
local pos, tile = getThingPos(cid), getTileThingByPos(getThingPos(cid))
if getTilePzInfo(pos) == true then
cancelConditions(cid)
end
return true
end
end
 
Last edited:
Go to protocolgame.cpp and in this function
C++:
void ProtocolGame::logout(bool displayEffect, bool forced)
search for this part
C++:
                if (!player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) && player->hasCondition(CONDITION_INFIGHT)) {
and change for this
C++:
                if (player->hasCondition(CONDITION_INFIGHT)) {
this should do the trick.
 
Back
Top