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

Lua Compability struggles. TFS 0.3.6 --> otx 3.5

Animera

* * * * *
Joined
Dec 9, 2008
Messages
2,449
Solutions
5
Reaction score
618
Location
ANIMERARPG.ONLINE
Basic information:
Server: OTX 3_5 (based on TFS 1.2 right?)
Client: 10.94


Dear people,

I recently moved from TFS 0.3.6(8.54) -> OTX 3.5(10.94)
And i am having some compatibility issues.

As i am new to the newer servers and barely played the newer clients, It is hard for me to tell, which functions changed and how far it changed (just the function? or parameters aswell? etc.) Also which features are needed, or could be performed without?


1. What is secondarygroup? For what i would need to use this? Same with the spellid. I guess the spellid is the icon on tibia hotkey? Do i need those to make spells function or does it bring any difference in their functions?
Code:
instant group="attack" secondarygroup="special" spellid="150"


2. What changes has been done to animated spells? Are these things still in use?
Code:
local function onCastSpell1(parameters)
    doCombat(parameters.cid, combat1, parameters.var)
end

Code:
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)

3. What changes have functions been gone through? e.g.
Code:
getCreatureTarget(cid)
I noticed(by checking the resources forum) these days we got "Player", "Caster", "Player:Getlevel?"
I've checked the library but i couldn't see the list containing the functions.

Aside that i was wondering what is the easier way to compile the scripts to the newer versions?
At this moment i am using mass file editor of notepad++

Code:
setCombatParam(combat,
Replace with
Code:
combat:setParameter(

It worked for most edits but some require some manual edits. Which makes me wondering what is the best way to get through all of it.

As i noticed certain spells/runes has this:
Code:
function onCastSpell(creature, variant)
Code:
function onCastSpell(creature, variant, isHotkey)


And so there are other changes which are unclear to me. I hope someone can help/assist me through here, skype and/or discord.
 
Back
Top