• 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 Simple Script

When you open your server, the very first line that appears in your console will advise of your TFS version.
Can you reply or edit your first post with your TFS version?
Without knowing your TFS version, scripts provided in subsequent posts may not work as intended.

Additionally,
If you require help with an existing script that has an issue, post it in support.
If you want someone to make or help you make a script, post it in requests.

If you feel this thread is in the wrong section, report your own post and ask for a moderator to move it.

Cheers!

Xikini
 
Programming a npc it's very different in old and newer TFS.
In old TFS you can use something like this:
Code:
if getPlayerItemById(cid, ITEMID, COUNT) then
doPlayerRemoveItem(cid, ITEMID, COUNT)
setPlayerStorageValue(cid, STORAGE, VALUE)
return TRUE
end
Of course this is only the part that removes the item. You must add the rest.
 
Back
Top