• 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!

Transform System

here you have a simple transform system

transform.lua
Lua:
function onCastSpell(cid, var, player)

local player = Player(cid)

---GOKU---->

if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 50 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,16)
     doCreatureChangeOutfit(cid, {lookType=37})
     doSendMagicEffect(getCreaturePosition(cid), 57)
exhaustion.set(cid,61260,0)
else

end
return true
end

elseif getPlayerVocation(cid) == 16 then
if getPlayerLevel(cid) >= 75 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,17)
     doCreatureChangeOutfit(cid, {lookType=18})
     doSendMagicEffect(getCreaturePosition(cid), 58)
exhaustion.set(cid,61260,0)
else

end
return true
end

elseif getPlayerVocation(cid) == 17 then
if getPlayerLevel(cid) >= 100 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,18)
     doCreatureChangeOutfit(cid, {lookType=71})
     doSendMagicEffect(getCreaturePosition(cid), 59)
exhaustion.set(cid,61260,0)
else

end
return true
end

elseif getPlayerVocation(cid) == 18 then
if getPlayerLevel(cid) >= 150 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,19)
     doCreatureChangeOutfit(cid, {lookType=70})
     doSendMagicEffect(getCreaturePosition(cid), 60)
exhaustion.set(cid,61260,0)
else

end
return true
end

elseif getPlayerVocation(cid) == 19 then
if getPlayerLevel(cid) >= 200 then
if exhaustion.get(cid,61260) == false then
doPlayerSetVocation(cid,20)
     doCreatureChangeOutfit(cid, {lookType=70})
     doSendMagicEffect(getCreaturePosition(cid), 60)
     player:setMaxHealth(player:getMaxHealth() + 20000)
     player:setMaxMana(player:getMaxMana() + 20000)
exhaustion.set(cid,61260,0)
else   
----- END GOKU------

end
return true
end
 
Back
Top