DI

[Pedido] Talkaction De Promotion

Por Diego Rulez, 24 de abr. de 2012 em Scripts

otserv
tibia
script
17
2.5k
jhon992J
26 de abril de 2012 às 10:22

Pra funcionar certinho essa essa talk de promotion aqui:

function onSay(cid, words, param, channel)
   local configs = {
   cost = 20000,
   level = 20
   }

   if isVip(cid) then
    if getPlayerLevel(cid) >= configs.level then
	    if getPlayerPromotionLevel(cid) == 1 then
		    if configs.cost <= 0 or doPlayerRemoveMoney(cid, configs.cost) then
			    setPlayerPromotionLevel(cid, 2)
		    else
			    doPlayerSendCancel(cid, "Voce nao tem o dinheiro suficiente que é " .. configs.cost .. " gold coins.")
		    end
	    else
		    doPlayerSendCancel(cid, "Voce ja é promoted.")
	    end
    else
	    doPlayerSendCancel(cid, "Voce precisa ser level " .. configs.level .. " ou maior para adiquirir a promotion.")
    end
   else
    doPlayerSendCancel(cid, "Voce precisa ser vip para adiquirir a promotion.")
   end
return TRUE
end

 

Para funcionar o player tem que estar com a primeira promotion jah, e nos vocations.xml os fromvoc="idvocação" devem estar corretos.

Diego RulezD
26 de abril de 2012 às 13:03

Agora sim, funcionou perfeitamente. Obrigado