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

Lua TFS Api of combat

vichoko

Member
Joined
Oct 9, 2008
Messages
128
Reaction score
6
Location
Santiago, Chile
Hello, now i'm learning more programation i'm a lot more interested in learning the capabilities of tfs lua.

I had this list of functions: www.cec.uchile.cl/~vicente.oyanedel/tibia/media/funcioneslua.txt


but this list doesn't include ut for example, when editing a spell a combat object is usually instantiated like:
Local combat = combat()

Then the entire spell uses this object to build itself.
The question is, where can i see all the methods that combat have?
Considering that the list i posted doesn't include this type of object methods.

Thanks for reading! Any help will be thanked :)
(Sry for my english errors)
 
look in the luascript.cpp file

On TFS 1.x you will find these lines:

Code:
    // Combat
    registerClass("Combat", "", LuaScriptInterface::luaCombatCreate);
    registerMetaMethod("Combat", "__eq", LuaScriptInterface::luaUserdataCompare);

    registerMethod("Combat", "setParameter", LuaScriptInterface::luaCombatSetParameter);
    registerMethod("Combat", "setFormula", LuaScriptInterface::luaCombatSetFormula);

    registerMethod("Combat", "setArea", LuaScriptInterface::luaCombatSetArea);
    registerMethod("Combat", "setCondition", LuaScriptInterface::luaCombatSetCondition);
    registerMethod("Combat", "setCallback", LuaScriptInterface::luaCombatSetCallback);
    registerMethod("Combat", "setOrigin", LuaScriptInterface::luaCombatSetOrigin);

    registerMethod("Combat", "execute", LuaScriptInterface::luaCombatExecute);
 
Back
Top