• 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 (TFS 0.4) Rook system in .lua

marek12

Available for sprite works
Joined
Apr 8, 2020
Messages
398
Solutions
4
Reaction score
394
Hi guys.
I am learning lua recently and I noticed I have no rook system in my TFS, so I decided that I will try to make it myself in lua in creaturescripts.
Here is the script. If you see something that is not right, I will be more than happy to know that as I will learn more :D


Lua:
function onPrepareDeath(cid, deathList)
    if getPlayerExperience(cid) < 1500 and getPlayerVocation(cid) > 0 then

            doPlayerSetTown(cid, 19)
        doPlayerAddExperience(cid, -getPlayerExperience(cid))
        doPlayerSetVocation(cid, 0)

        for i = 1, 10 do
            local slotItem = getPlayerSlotItem(cid, i)
            if slotItem.itemid > 0 then
                doRemoveItem(slotItem.uid)

    end
        end
            end
   return true
end
Post automatically merged:

also can someone add to it skills reseting?
 
Back
Top