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

RevScripts Path Turnning

Syiko

Scripter/Developer
Joined
Aug 28, 2017
Messages
474
Solutions
3
Reaction score
108
I was working with tfs 0.4 develop now if i need to turn to tfs 1.4 and revscripts.
where should i learn revscripts everything about it ?
how to start ?
could everyone tell his story ?
 
What is revscriptsys?
Revscriptsys is a new way to register your scripts in an easy drag and drop way without the need to register it with xml.
Basically you just place your .lua file into data/scripts/ or any subfolder according to your taste, except for monster files, they go into data/monster/.

The files in data/scripts, are loaded automatically on startup (Unless the filename starts with a # symbol, which means the file is disabled).

Revscriptsys supports multiple different interface methods to be used in one file (Actions, Moveevents, GlobalEvents, ...) which comes in hand if you do prolonged quests and such which usually would need to be done in different files.

You might have heard of the TFS 0.4 mods system? This is similar to that, but in pure Lua, no XML!

With Revscriptsys you should design your script in a header and footer way.
Action onUse example:
Lua:
local testAction = Action() -- this would be the "header" first thing we have to write (unless configuration tables and such)

function testAction.onUse(player, item, fromPosition, itemEx, toPosition, isHotkey) -- now we can design the action itself
    return print("We used this item: .." item.itemid)
end

testAction.id(2550) -- the item is a scythe
testAction.register() -- this is our "footer" it has to be the last function executed.
 
Back
Top