Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,570
- Solutions
- 6
- Reaction score
- 437
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello guys !
I've made a code for the famous "Rook System", but I don't know why isn't working, maybe I did something or I'm fucking blind .
I'm using OTServ_SVN 0.6.3, can you guys help me with that ?
Check the code below:
I've made a code for the famous "Rook System", but I don't know why isn't working, maybe I did something or I'm fucking blind .
I'm using OTServ_SVN 0.6.3, can you guys help me with that ?
Check the code below:
Code:
function sendToRook(cid)
if getPlayerLevel(cid) < 6 and getPlayerVocation(cid) ~= 0 then
for i = 1, 10 do
local slotItem = getPlayerSlotItem(cid, i)
if slotItem.itemid > 0 then
doRemoveItem(slotItem.uid)
end
end
setPlayerStorageValue(cid, STORAGE_ROOK, 1)
doPlayerSetVocation(cid, 0)
doPlayerSetTown(cid, 11)
db.executeQuery("UPDATE `players` SET `level` = '1', `experience` = '0', `health` = '150', `healthmax` = '150', `mana` = '0', `manamax` = '0', `maglevel` = '0', `manaspent` = '0', `soul` = '100', `cap` = '400', `skull_type` = '0', `skull_time` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1;")
db.executeQuery("UPDATE `player_skills` SET `value` = '10', `count` = '0' WHERE `player_id` = " .. getPlayerGUID(cid) .. " LIMIT 7;")
if(getPlayerSex(cid) == 0) then
lookOutfit = 136
else
lookOutfit = 128
end
doCreatureChangeOutfit(cid, {lookType=lookOutfit, lookHead=78, lookBody=69, lookLegs=58, lookFeet=76})
doTeleportThing(cid, {x = 32097, y = 32219, z = 7})
end
return true
end