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

Solved How to remove noLogout in combat?

whitevo

Feeling good, thats what I do.
Joined
Jan 2, 2015
Messages
3,452
Solutions
1
Reaction score
625
Location
Estonia
I haven't done much of research about that yet, it may be out here somewhere already, but with few tries on search, didn't find any information.

How to make it so? Players can logout where ever they want, regardless are they in combat or not.
Instead when attempting to log out if statement question will come up: (obviously this wouldn't work in sourcecode and I guess it should be done in source)
Code:
if player:getStorageValue(1000) == 1 then
player:sendTextMessage(GREEN, "Can't log out for 15 seconds after taking damage")
return false
end
return true

I already have well planned "combat system" in LUA so it wouldn't be problem to add timed storage value on each hit.
 
group flags and onLogout event
I don't think onLogout can supress logging out in combat, other than editing the sources or editing the player flags as you suggested, pzLocked in config is the only other option.

Or an unconventional approach could be to give them battle signs while setting a minimum pzLocked value.. just throwing ideas out there.. well i am off to work :)
 
Last edited:
I prefer solution in sourcecode. Because I allow players to log out while in combat with monster or when he himself is attacking something 'special'.
Only thing what is asked upon logout is: does he have storage value or not. I will handle the rest with LUA scripts

Question now is where in source code Is this logout handled and how is this if statement written in c++
 
Back
Top