MA

Script Transformação

Por matttt, 19 de jun. de 2010 em Archived

otserv
tibia
script
7
1.3k
mattttM
19 de junho de 2010 às 23:10

Olá pessoal do Xtibia eu estou com um problema no meu script e resolvi procurar uma solução aqui.

 

Bom analisem ele

function onSay(cid, words, param)

 

local voce = 213

local lvl = 500

local voc = 350

local outfit = {lookType=28,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50}

local outfitTime = 10999999

local napis = "Transform!!Haaa! "

local effekt = 19

 

----------------------kod-----------------------------

if getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl then

doPlayerSetVocation(cid,voc)

doSetCreatureOutfit(cid, outfit, outfitTime)

doPlayerSay(cid,napis,16)

local pos = getPlayerPosition(cid)

doSendMagicEffect(pos,effekt)

else

doPlayerSendCancel(cid,"Sorry , not possible")

end

return 1

end

 

Intão é o seguinte ele funfa perfeitamente mais tem 1 bug tpw ele transforma mas quando reloga ele volta pra outfit anterior sabe buga a outfit eu queria que quando transformasse ficasse fixo a outfit entendeu relogando , morrendo e etc

 

Obs : quando reloga ainda fica transformado so o outfit q muda e tbm quando morre buga o outfit tbm

 

Meu servidor eh de DBZ mais quase tudo de tibia funciona nele ele eh tipo PO so que de dragon ball ^^

 

Espero que alguem me ajude , abraços !

Editado Junho 19 por Mattt2010

DoidinD
19 de junho de 2010 às 23:37

Cara tenta esse script:

 

-- [( XTibia.com )] --
function onSay(cid, words, param)

local voc1 = 213
local voc2 = 350
local lvl = 500
local outfit = {lookType=28, lookHead=20, lookAddons=0, lookLegs=40, lookBody=30, lookFeet=50}

if getPlayerVocation(cid) == voc1 and getPlayerLevel(cid) >= lvl then
doPlayerSetVocation(cid, voc2)
doCreatureSay(cid, "Transform!! Haaa!!", 19)
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getPlayerPosition(cid), 19)
else
doPlayerSendCancel(cid,"Sorry, is not possible.")
end
return TRUE
end

Abraços...

Editado Junho 19 por DoidinMapper

marcelopopM
19 de junho de 2010 às 23:37

Mas o script que você quer e transformação infinita pois o scrip transforção é so por minutos ou segundos para ficar mais forte

mattttM
21 de junho de 2010 às 15:42

Eu coloquei esse seu script doidinmapper mais nao funciono ta dando um error :

 

attempt to call global 'doCreatureSay' <a nil value>
=/ alguma outra idéia?
DoidinD
21 de junho de 2010 às 16:38

Tenta esse:

-- [( XTibia.com )] --
function onSay(cid, words, param)

local voc1 = 213
local voc2 = 350
local lvl = 500
local outfit = {lookType=28, lookHead=20, lookAddons=0, lookLegs=40, lookBody=30, lookFeet=50}

if getPlayerVocation(cid) == voc1 and getPlayerLevel(cid) >= lvl then
doPlayerSetVocation(cid, voc2)
doPlayerSay(cid, "Transform!! Haaa!!", 16)
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getPlayerPosition(cid), 19)
else
doPlayerSendCancel(cid,"Sorry, is not possible.")
end
return TRUE
end

mattttM
21 de junho de 2010 às 22:09

Agora so a vocação que muda o outfit e o effect nao aparece nem muda

 

attempt to call global 'doCreatureChangeOutfit' <a nil value>

 

=/

7 meses depois...
stiflertechS
14 de janeiro de 2011 às 02:12

Oi vcs poderiao me orientar nessa funçao

 

function onSay(cid, words, param)

local voce = 213
local lvl = 500
local voc = 350
local outfit = {lookType=28,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50}
local outfitTime = 10999999
local napis = "Transform!!Haaa! "
local effekt = 19

----------------------kod-----------------------------
if getPlayerVocation(cid) == voce and getPlayerLevel(cid) >= lvl then
doPlayerSetVocation(cid,voc)
doSetCreatureOutfit(cid, outfit, outfitTime)
doPlayerSay(cid,napis,16)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos,effekt)
else
doPlayerSendCancel(cid,"Sorry , not possible")
end
return 1
end

 

Exemplo :

local voce = 213
local lvl = 500
local voc = 350
local outfit = {lookType=28,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50}
local outfitTime = 10999999
local napis = "Transform!!Haaa! "
local effekt = 19

pra que serve isso?