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

Param tutorial

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi my dear friends,

Could someone give me a short tutorial of parameters or give me a link to help me understand?

Thanks.
 
Solution
Yes, to use for example.. !food buy, meat or !food sell, meat, 50
In TFS 1.2 you have the "separator" in the talkaction but it will only separate the first occurance so if you have separator=" " and use:
/command buy 1 2 3

You will have as "param": "buy 1 2 3" then you have to use the function "string.split" provided in the library to separate those " ". You can see how to do this in lots of default talkactions tfs for example:
https://github.com/otland/forgottenserver/blob/master/data/talkactions/scripts/create_item.lua
Couldn't find any illustrations :(
So I made one :)
NKgOqil.png
 
Yes, to use for example.. !food buy, meat or !food sell, meat, 50
In TFS 1.2 you have the "separator" in the talkaction but it will only separate the first occurance so if you have separator=" " and use:
/command buy 1 2 3

You will have as "param": "buy 1 2 3" then you have to use the function "string.split" provided in the library to separate those " ". You can see how to do this in lots of default talkactions tfs for example:
https://github.com/otland/forgottenserver/blob/master/data/talkactions/scripts/create_item.lua
 
Solution
Back
Top