TomBartezz
Member
- Joined
- May 29, 2016
- Messages
- 159
- Reaction score
- 17
Can anyone help me make a script if this is not going to bug? I am currently testing monsters in my ot and I want to reset players back to level 8 and other levels, I guess if I have the script for a level 8 I will know how to make the other level resets, when I mean reset, the mana and hp also resets too so it wont bug out the database or anything.
I have something like this so far, but I have no idea how to make a character reset back to level 8 with default mana and hp, and being kicked too after they reset using an item.
I have something like this so far, but I have no idea how to make a character reset back to level 8 with default mana and hp, and being kicked too after they reset using an item.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) == 8 then
doCreatureSay(cid, 'You have reverted to level 8!', TALKTYPE_ORANGE_1)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
return true
else
doCreatureSay(cid, 'You are the lowest level!', TALKTYPE_ORANGE_1)
end
end