• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 0.X SECURE MODE -- "fist" on/off

@Marko999x I'm using tfs 1.5 nekiro downgrade 8.60, do you know what to do? How to introduce the system secure mode?

Yeah :D
LUA:
    registerMethod("Player", "hasChaseMode", LuaScriptInterface::luaPlayerHasChaseMode);
    registerMethod("Player", "hasSecureMode", LuaScriptInterface::luaPlayerHasSecureMode);
    registerMethod("Player", "getFightMode", LuaScriptInterface::luaPlayerGetFightMode);


Try this:
LUA:
local ec = EventCallback

ec.onTargetCombat = function(self, target)
    if self and self:isMonster() then
        return true
    end
    if self and self:hasSecureMode() then
        if target:isPlayer() then
            return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
        end
    end

    return RETURNVALUE_NOERROR
end

ec:register()
 
this i have to add in data/script
LUA:
local ec = EventCallback

ec.onTargetCombat = function(self, target)
    if self and self:isMonster() then
        return true
    end
    if self and self:hasSecureMode() then
        if target:isPlayer() then
            return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
        end
    end

    return RETURNVALUE_NOERROR
end

ec:register()


what about this?
Code:
    registerMethod("Player", "hasChaseMode", LuaScriptInterface::luaPlayerHasChaseMode);
    registerMethod("Player", "hasSecureMode", LuaScriptInterface::luaPlayerHasSecureMode);
    registerMethod("Player", "getFightMode", LuaScriptInterface::luaPlayerGetFightMode);

sorry for newbish post
 
this i have to add in data/script
LUA:
local ec = EventCallback

ec.onTargetCombat = function(self, target)
    if self and self:isMonster() then
        return true
    end
    if self and self:hasSecureMode() then
        if target:isPlayer() then
            return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
        end
    end

    return RETURNVALUE_NOERROR
end

ec:register()


what about this?
Code:
    registerMethod("Player", "hasChaseMode", LuaScriptInterface::luaPlayerHasChaseMode);
    registerMethod("Player", "hasSecureMode", LuaScriptInterface::luaPlayerHasSecureMode);
    registerMethod("Player", "getFightMode", LuaScriptInterface::luaPlayerGetFightMode);

sorry for newbish post

It's just the functions. You can ignore it :D
 
Back
Top