function onLogin(cid)
if vip.hasVip(cid) == TRUE then
if(isInArray({1, 2, 3, 4, 5, 6, 7, 8}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)+12)
end
elseif vip.hasVip(cid) == FALSE and vip.getVip(cid) == 0 then
if(isInArray({13, 14, 15, 16}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)-12)
end
end
return TRUE
end
SP
pedido
Alteração Script de Mudar Vocação VIP
Por Spik3ex, 13 de jun. de 2013 em Scripts
tibia
script
otserv
6
967
13 de junho de 2013 às 15:33
Editado Junho 13 por Enself
13 de junho de 2013 às 16:09
function onLogin(cid) if vip.hasVip(cid) == TRUE then if(isInArray({1, 2, 3, 4, 5, 6, 7, 8}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)+12) end elseif vip.hasVip(cid) == FALSE and vip.getVip(cid) == 0 then if(isInArray({13, 14, 15, 16}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)-12) end end return TRUE end
Não da certo isso já tentei, se eu colocar isso o jogador que tiver a promotion 1, quando ele deslogar e logar ele volta sem vocação.
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

13 de junho de 2013 às 16:45
Lol, usa getPlayerPromotionLevel(cid).
function onLogin(cid)
if getPlayerPromotionLevel(cid) == 1 then
setPlayerPromotionLevel(cid, 0)
end
if(vip.hasVip(cid)) then
if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid) + 12)
end
elseif(not vip.hasVip(cid) and vip.getVip(cid) == 0) then
if(isInArray({13, 14, 15, 16}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid) - 12)
end
end
return true
end
Editado Junho 13 por Skymagnum
13 de junho de 2013 às 16:56
RESOLVIDO, REFIZ TOTALMENTE O SCRIPT.



info
Grupo: Banidos
Registrado: 06/06/13
Posts: 66
Reputação: +14
Hi All
Eu preciso que alguem que entende mesmo me ajude na alteração desse script.
O script funciona normalmente, porém, se o player estiver "Promotion = 1" na database, a vocação não muda, ela só muda se estiver promotion 0.
Eu quero que ele funcione dos dois metodos, tanto com promotion 1 tanto como promotion 0, se o player for VIP, que mude de qualquer jeito, entende-me?!
TIVE UMA IDÉIA AQUI SE NÃO FOR POSSIVEL COLOCAR PRAS DUAS PROMOTION, SE FIZESTE ASSIM:
Primeiro ele checa e ve se o player é VIP, certo? se o Player for VIP ele altera a tabela promotion do jogador para 0, Pronto? Beleza, aí depois ele altera a vocação do VIP, and Works
Ou se der pra colocar as duas promotion 0 e 1 nesse script mesmo, também agradeço![/indent]
Alguem que saber fazer isso nesse script, me de uma luz, REP ++ and Enjoy e Works!
Editado Junho 13 por Spik3ex