LE
pedido

transform 8.6

Por leoperez011, 24 de jan. de 2013 em Scripts

5
745
leoperez011L
24 de janeiro de 2013 às 20:56

Teria como colocar para quando o player quando deslogar n voltar para a primeira vocacão somente quando usar a magia de reverter ?

 

 

function onCastSpell(cid, var)

local config = {

[1] = {level = 50, newvoc = 2, outfit = 37, eff = 56},

[2] = {level = 100, newvoc = 3, outfit = 18, eff = 57},

[3] = {level = 150, newvoc = 4, outfit = 71, eff = 58},

[4] = {level = 200, newvoc = 5, outfit = 70, eff = 59}

}

trans = config[getPlayerVocation(cid)]

if not trans then

doPlayerSendCancel(cid, "You can not transform.") return false

elseif getPlayerLevel(cid) >= trans.level then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.")

end

doSetCreatureOutfit(cid, {lookType = trans.outfit}, -1)

doPlayerSetVocation(cid, trans.newvoc)

doSendMagicEffect(getCreaturePosition(cid), trans.eff)

doPlayerSendCancel(cid, "You Transformed!")

return true

end

kriller12K
24 de janeiro de 2013 às 21:19

esperimenta fazer assim, não sei se vai funcionar mais n custa tentar....

 

local config = {

--[iD] = { lvl, novo id, looktype, Efeito}

[1] = {level = 50, newvoc = 2, outfit = 37, eff = 56},

[2] = {level = 100, newvoc = 3, outfit = 18, eff = 57},

[3] = {level = 150, newvoc = 4, outfit = 71, eff = 58},

[4] = {level = 200, newvoc = 5, outfit = 70, eff = 59}

}

function onSay(cid, words, param, channel)

doPlayerSay(cid, "transform")

local voc = config[getPlayerVocation(cid)]

if voc then

if getPlayerLevel(cid) >= voc[1] then

doPlayerSetVocation(cid, voc[2])

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You Transform!")

local outfit = {lookType = voc[3]}

doCreatureChangeOutfit(cid, outfit)

doSendMagicEffect(getCreaturePosition(cid), voc[4])

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You need level " .. voc[1] .. " to transform.")

end

else

doPlayerSendCancel(cid, "You not use to transform!")

end

return true

end

LostzeraL
24 de janeiro de 2013 às 21:47

axo que teria que fazer script que mexa no sql, não tenho conhecimento

 

Abraço

leoperez011L
24 de janeiro de 2013 às 22:04

DEixa pra la meu amigo ja arrumei o meu script por favor alguem fecha esse topico ?

Editado Janeiro 25 por leoperez011

MattziinM
28 de janeiro de 2013 às 00:05

Acrédito q isso é em vocations.

fromvoc