Hello otland users, eh created by a friend who helped me a lot ^ ^, but I get an error in console: S
my creaturescripts xml:
Error;
Code:
local m = {
back = {x=1050, y=987, z=z}, --- primera ciudad
to = { x = 1045, y = 920, z = 7} -- segunda
}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL then
if newLevel > oldLevel and newLevel == 15 then
doTeleportThing(cid, m.to)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Has sido enviado a una nueva ciudad!")
doPlayerSetTown(cid, TOWNID) -- no se cual es el townID de la nueva ciudad
elseif oldLevel > newLevel and newLevel < 15 then
doTeleportThing(cid, m.back)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Has sido enviado a tu vieja ciudad por que tu level es muy bajo")
doPlayerSetTown(cid, TOWNIDvieja) -- townID de la primera ciudad
end
end
return true
end
my creaturescripts xml:
Code:
<event type="onadvance name="onAdvance" event="script" value="main.lua"/>
Error;