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
also can someone add to it skills reseting?
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
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?