Amigo vou tentar te ajudar...
Abra seu creaturescripts e add a tag
<event type="login" name="promotionvip" event="script" value="promotionvip.lua"/>
Use esse scripts
function onLogin(cid)
if isVip(cid) == TRUE then
if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
end
elseif isVip(cid) == FALSE then
if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)-4)
end
end
return TRUE
end
Mude as vocações ao seu ot...
Se tiver duvida acesse seu Data/XML/Vocations...
Resp ++?


info
Grupo: Campones
Registrado: 09/11/05
Posts: 16
Reputação: +2
Olá a todos, fiz um script para mudar vocação quando o player loga.
Explicando melhor, quando a VIP de um jogador acabar, e quando ele for logar, ele verifica se acabou a VIP, caso tenha acabado, ele muda o promotion dele, mudando a vocação.
Mas está dando algum problema, pois ele loga com a vocação promovida...
local tempovip = db.getResult("SELECT IFNULL(`vip_time`,0) FROM `accounts` WHERE `id` = '"..getPlayerAccountId(cid).."';") local viptime = tempovip:getDataInt("IFNULL(`vip_time`,0)") if (viptime == 0) then -- se o jogador tiver dias de VIP, então... if (getPlayerPromotionLevel(cid) == 2) then db.executeQuery("UPDATE `players` SET `promotion` = 1 WHERE `id` = '"..getPlayerGUID(cid).."';") end endSe alguem puder dar uma mão...
esse código esta dentro do login.lua, bem no inicio