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

milbradt

New Member
Joined
Dec 25, 2011
Messages
177
Solutions
1
Reaction score
4
Hello guys.

What are the features I have with this command? (getCreatureCondition(cid, feature, etc..)

If you want to check a parameter within the attribute, how use?
getCreatureCondition(cid, CONDITION_PARAM_SKILL_SWORD, ?) ?

Help, plz. Thanks
 
Hello guys.

What are the features I have with this command? (getCreatureCondition(cid, feature, etc..)

If you want to check a parameter within the attribute, how use?
getCreatureCondition(cid, CONDITION_PARAM_SKILL_SWORD, ?) ?

Help, plz. Thanks

Since you didn't follow the rules and post your server version ill just guess it's TFS 1.3.

getCreatureCondition returns a boolean value (true or false) if it's active or not.

You got these functions aswell; forgottenserver/luascript.cpp at master · otland/forgottenserver · GitHub
Look closer at these functions;
C++:
registerMethod("Condition", "getSubId", LuaScriptInterface::luaConditionGetSubId);
registerMethod("Condition", "getType", LuaScriptInterface::luaConditionGetType);
 
Since you didn't follow the rules and post your server version ill just guess it's TFS 1.3.

getCreatureCondition returns a boolean value (true or false) if it's active or not.

You got these functions aswell; forgottenserver/luascript.cpp at master · otland/forgottenserver · GitHub
Look closer at these functions;
C++:
registerMethod("Condition", "getSubId", LuaScriptInterface::luaConditionGetSubId);
registerMethod("Condition", "getType", LuaScriptInterface::luaConditionGetType);

Sry, tfs 0.3.6

I think there is no way to return true / false for parameters. Not even in TFS1.3
I think I need to do something like this:
Code:
 registerMethod("Condition", "getParameter", LuaScriptInterface::luaConditionGetParameter);

Thank you for your help.
 
Sry, tfs 0.3.6

I think there is no way to return true / false for parameters. Not even in TFS1.3
I think I need to do something like this:
Code:
 registerMethod("Condition", "getParameter", LuaScriptInterface::luaConditionGetParameter);

Thank you for your help.

Not sure if 0.x has those functions, check your source code to be sure.
 
Back
Top