Falae gente .... Estou aqui por que quero uma ajudinha na TalkAction!!Vamos la , eu tenho o seguinte script :
function onSay(cid, words, param) local outfit ={lookType=37,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50} local outfit2 ={lookType=71,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50} local outfit3 ={lookType=70,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50} if getPlayerVocation(cid) == 1 and getPlayerLevel(cid)>=50 then doPlayerSetVocation(cid,2) doSetCreatureOutfit(cid, outfit, 1000000) elseif getPlayerVocation(cid) == 2 and getPlayerLevel(cid)>=100 then doPlayerSetVocation(cid,3) doSetCreatureOutfit(cid, outfit2, 1000000) elseif getPlayerVocation(cid) == 3 and getPlayerLevel(cid)>=150 then doPlayerSetVocation(cid,4) doSetCreatureOutfit(cid,outfit3,1000000) else doPlayerSendCancel(cid,"Voce não pode se transformar") end end
Ele funciona perfeitamente...so tem 2 problemas :
.Quando voce da logout e depois login ele vai para a vocation 0
..Quando voce da logout e depois login ele volta para a outfit que ele tava antes de usar qualquer transformaçao
Testa esse e me fala:
function onSay(cid, words, param, var)
if (getPlayerVocation(cid) == 1) and (getPlayerLevel(cid) >= 50) then
doPlayerSetVocation(cid, 2)
local outfit = {lookType = 37}
doCreatureChangeOutfit(cid, outfit)
doPlayerSendCancel(cid, "Nao foi possivel!")
elseif getPlayerLevel(cid) < 50 then
doPlayerSendCancel(cid, "Nao foi possivel!")
else
if (getPlayerVocation(cid) == 2) and (getPlayerLevel(cid) >= 100) then
doPlayerSetVocation(cid, 3)
local outfit = {lookType = 71}
doCreatureChangeOutfit(cid, outfit)
doPlayerSendCancel(cid, "Nao foi possivel!")
elseif getPlayerLevel(cid) < 100 then
doPlayerSendCancel(cid, "Nao foi possivel")
else
if (getPlayerVocation(cid) == 3) and (getPlayerLevel(cid) >= 150) then
doPlayerSetVocation(cid, 4)
local outfit = {lookType = 70}
doCreatureChangeOutfit(cid, outfit)
doPlayerSendCancel(cid, "Nao foi possivel!")
elseif getPlayerLevel(cid) < 150 then
doPlayerSendCancel(cid, "Nao foi possivel!")
end
end
end
return true
end




info
Grupo: Campones
Registrado: 11/03/09
Posts: 23
Reputação: +24
Falae gente .... Estou aqui por que quero uma ajudinha na TalkAction!!Vamos la , eu tenho o seguinte script :
function onSay(cid, words, param) local outfit ={lookType=37,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50} local outfit2 ={lookType=71,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50} local outfit3 ={lookType=70,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50} if getPlayerVocation(cid) == 1 and getPlayerLevel(cid)>=50 then doPlayerSetVocation(cid,2) doSetCreatureOutfit(cid, outfit, 1000000) elseif getPlayerVocation(cid) == 2 and getPlayerLevel(cid)>=100 then doPlayerSetVocation(cid,3) doSetCreatureOutfit(cid, outfit2, 1000000) elseif getPlayerVocation(cid) == 3 and getPlayerLevel(cid)>=150 then doPlayerSetVocation(cid,4) doSetCreatureOutfit(cid,outfit3,1000000) else doPlayerSendCancel(cid,"Voce não pode se transformar") end endEle funciona perfeitamente...so tem 2 problemas :
.Quando voce da logout e depois login ele vai para a vocation 0
..Quando voce da logout e depois login ele volta para a outfit que ele tava antes de usar qualquer transformaçao
Editado Julho 24 por galaverna