Creaturescripts.xml:
Login.php:
Script 1:
Script 2:
Script 1: When player reach level 19, say msg for he, prepare, in level 20 you go to one quest (teleported to one quest).
Script 2: Teleport player to position, and say one msg.
but script don't work, player take lvl 19 and script not send msg to he, he take lvl 20 and not be teleported. help plx.
PHP:
<event type="advance" name="advance" script="promotion.lua"/>
<event type="advance" name="advance1" script="promotion1.lua"/>
Login.php:
PHP:
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "advance1")
Script 1:
PHP:
local config = {
promoLevel = 1, -- promotion level : )
needLevel = 19, -- level to get promotion
needPremium = "no" -- need premium (YES/NO)? :D
}
function onAdvance(cid, skill, oldlevel, newlevel)
if (skill == 0) and (newlevel >= config.needLevel and getPlayerPromotionLevel(cid)<config.promoLevel) then
if(string.lower(config.needPremium) == "yes" and isPremium(cid) == TRUE) or (string.lower(config.needPremium) == "no") then
doPlayerSendTextMessage(cid, 22, "Você alcançou o nível 19 ! Atenção recarregue seus POTIONS AGORA! , Pegue o level 20 e terá uma missão de imediato!")
end
end
return TRUE
end
Script 2:
PHP:
local config = {
promoLevel = 1, -- promotion level : )
needLevel = 20, -- level to get promotion
needPremium = "no" -- need premium (YES/NO)? :D
}
function onAdvance(cid, skill, oldlevel, newlevel)
if (skill == 0) and (newlevel >= config.needLevel and getPlayerPromotionLevel(cid)<config.promoLevel) then
if(string.lower(config.needPremium) == "yes" and isPremium(cid) == TRUE) or (string.lower(config.needPremium) == "no") then
doTeleportThing(cid,{x=1869, y=1344, z=6})
doPlayerSendTextMessage(cid, 22, "Agora você irá fazer uma quest para pegar a 2° JOB de " .. getVocationInfo(getPlayerVocation(cid)).name .. ", Boa Sorte!")
end
end
return TRUE
end
Script 1: When player reach level 19, say msg for he, prepare, in level 20 you go to one quest (teleported to one quest).
Script 2: Teleport player to position, and say one msg.
but script don't work, player take lvl 19 and script not send msg to he, he take lvl 20 and not be teleported. help plx.