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

PLAYER DONT GET DAMAGE FROM OTHER PLAYERS OR MONSTERS

higormm

New Member
Joined
Jan 19, 2019
Messages
13
Reaction score
0
When I start up my server (Im testing with 3 friends) some of us one or two get "immortal" dont take damage from players or monsters, Idk whats heppening, only whay to kill a player with this 'immortal' bug is with god kill spell

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 178)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, true)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, false)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -99999, 59999, -999996, 199992)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
this is the only thing that does dmg
 
From information you provided i can propose to check each onHealChange script if some is broken
will be nice to know with tfs are you using
Im using tfs 1.0, I'll check them (onHealChange) ty for your time!
me and my friends tried to disable all creaturescripts, all mods, we still have the bug, we tried to log in new accounts same stuff, when server start always someone that logged in get "imortal" and dont take damage from neither players or monsters, so weird

edit: tried to find any onHealChange theres none on server docs
 
Im using tfs 1.0, I'll check them (onHealChange) ty for your time!
me and my friends tried to disable all creaturescripts, all mods, we still have the bug, we tried to log in new accounts same stuff, when server start always someone that logged in get "imortal" and dont take damage from neither players or monsters, so weird

edit: tried to find any onHealChange theres none on server docs

I don't know which functions TFS 1.0 has but maybe check onTargetCombat if it exists
 
I don't know which functions TFS 1.0 has but maybe check onTargetCombat if it exists
I found it on my combat.cpp wich I uploaded as txt file

and also on combat.h

Code:
class TargetCallback : public CallBack
{
    public:
        TargetCallback() {}
        void onTargetCombat(Creature* creature, Creature* target) const;

    protected:
        formulaType_t type;
};

any ideias?
 

Attachments

test
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 178)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, true)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, false)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2, 50, -5, 100)
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
test
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 178)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, true)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, false)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2, 50, -5, 100)
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
you want me to test if damages the "immortal" player thats bugged?
 
onHealChange
What TFS is this? Where did you download it from? Try opening Visual Studio Code program and select the 'your server' folder, then type in the search bar 'onStatsChange' and the result will appear. You'll find and know where it is and where it was made. Remove those scripts through CreatureScript.
 
What TFS is this? Where did you download it from? Try opening Visual Studio Code program and select the 'your server' folder, then type in the search bar 'onStatsChange' and the result will appear. You'll find and know where it is and where it was made. Remove those scripts through CreatureScript.
theres a lot of creaturescripts using onStatsChange , but I already tested and have the same bug with all creaturescripts disabled
tfs 1.0.x

I downloaded a base nto server , but I tried disable all creature scripts and the bug still happen one or two players always get "immortal"

theres also onStatsChange on my src at creatureevent.cpp


Lua:
uint32_t CreatureEvent::executeStatsChange(Creature* creature, Creature* attacker, StatsChange_t type, CombatType_t combat, int32_t value)
{
    //onStatsChange(cid, attacker, type, combat, value)
    if(m_interface->reserveEnv())
    {
        ScriptEnviroment* env = m_interface->getEnv();
        if(m_scripted == EVENT_SCRIPT_BUFFER)
        {
            env->setRealPos(creature->getPosition());
            std::stringstream scriptstream;

            scriptstream << "local cid = " << env->addThing(creature) << std::endl;
            scriptstream << "local attacker = " << env->addThing(attacker) << std::endl;

            scriptstream << "local type = " << (uint32_t)type << std::endl;
            scriptstream << "local combat = " << (uint32_t)combat << std::endl;
            scriptstream << "local value = " << value << std::endl;

            if(m_scriptData)
                scriptstream << *m_scriptData;

            bool result = true;
            if(m_interface->loadBuffer(scriptstream.str()))
            {
                lua_State* L = m_interface->getState();
                result = m_interface->getGlobalBool(L, "_result", true);
            }

            m_interface->releaseEnv();
            return result;
        }
        else
        {
            #ifdef __DEBUG_LUASCRIPTS__
            char desc[35];
            sprintf(desc, "%s", creature->getName().c_str());
            env->setEvent(desc);
            #endif

            env->setScriptId(m_scriptId, m_interface);
            env->setRealPos(creature->getPosition());

            lua_State* L = m_interface->getState();
            m_interface->pushFunction(m_scriptId);

            lua_pushnumber(L, env->addThing(creature));
            lua_pushnumber(L, env->addThing(attacker));

            lua_pushnumber(L, (uint32_t)type);
            lua_pushnumber(L, (uint32_t)combat);
            lua_pushnumber(L, value);

            bool result = m_interface->callFunction(5);
            m_interface->releaseEnv();
            return result;
        }
    }
    else
    {
        std::clog << "[Error - CreatureEvent::executeStatsChange] Call stack overflow." << std::endl;
        return 0;
    }
}
 
Do you want a real tip? Then give up on this TFS and download TFS 1.4.2 from BlackTek, the new one with 1098, or TFS 1.6 with 13.10, or TFS 1.5 (Nekiro/Sarah) downgrade 8.6; it's already solved. 🤷‍♂️
I dont know how to downgrade but ill try this option Im afraid to bug a lot of stuff trying to downgrade a tfs xD cause theres a lot of custom stuff on my src for my NTO server
 
UPDATE: JUST FOUND THE ROOT OF THE PROBLEM

when player get the "imortal" bug if I de equip all the slots (including bag or anything on any slot) he became "mortal" again and can take hits(damage) again, right now I think it can be a bug on the SRC of my TFS because if I put again any item on any slot of the character the bug come back again and he became "imortal" again

all this on the same uptime on server, if i close and open the server again bug moves to other players that log in, its kinda random i guess
Post automatically merged:

UPDATE: JUST FOUND THE ROOT OF THE PROBLEM

when player get the "imortal" bug if I de equip all the slots (including bag or anything on any slot) he became "mortal" again and can take hits(damage) again, right now I think it can be a bug on the SRC of my TFS because if I put again any item on any slot of the character the bug come back again and he became "imortal" again

all this on the same uptime on server, if i close and open the server again bug moves to other players that log in, its kinda random i guess
@Mateus Robeerto @Marko999x @sharinn @abdala ragab any ideias ?
 
Back
Top