Jump to content
  • 0

VOCAÇÃO E SEU OUTFIT


AandersonC

Question

Fala galera do Éks preciso de um script que cada vocação nova ao logar tenha seu propio outfit,sei que é simples porém esse script aqui esta dando erro

local out = {
[1] = 66, -- VOCATION / LOOKTYPE
[2] = 321,
[3] = 321,
[4] = 321,
[5] = 321,
[6] = 321,
[7] = 321,
[8] = 321
}

function onLogin(cid)
if getPlayerStorageValue(cid,23219) < 1 then
doCreatureChangeOutfit(cid,out[getPlayerVocation(cid)])
setPlayerStorageValue(cid,23219,1)
end
return true
end

 

Dá o seguinte erro

 

 

[Error - CreatureScript Interface]
data/creaturescripts/scripts/outfit.lua:onLogin
Description:
attempt to index a number value
stack traceback:
[C]: in function 'doCreatureChangeOutfit'
data/creaturescripts/scripts/outfit.lua:14: in function <data/creaturesc
ripts/scripts/outfit.lua:12>

Edited by Rusherzin
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

 

local out = {
[1] = 66, -- VOCATION / LOOKTYPE
[2] = 321,
[3] = 321,
[4] = 321,
[5] = 321,
[6] = 321,
[7] = 321,
[8] = 321
}
 
function onLogin(cid)
if getPlayerStorageValue(cid,23219) < 1 then
doCreatureChangeOutfit(cid, {lookType =out[getPlayerVocation(cid)]}, -1)
setPlayerStorageValue(cid,23219,1)
end
return true
end
Link to comment
Share on other sites

  • 0

Não funcionou.. Como eu disse acima da esse erro

 

 

 

[Error - CreatureScript Interface]
data/creaturescripts/scripts/outfit.lua:onLogin
Description:
attempt to index a number value
stack traceback:
[C]: in function 'doCreatureChangeOutfit'
data/creaturescripts/scripts/outfit.lua:12: in function <data/creaturesc
ripts/scripts/outfit.lua:12

Edited by Rusherzin
Link to comment
Share on other sites

  • 0

Não tenho certeza que essa outfit 321 existe ai fui la e coloquei todos para 66 que é a outfit do naruto e continuou mesmo erro.


Estranho esse erro que parece ser na função doCreatureChangeOutfit pq na talkaction de transformar está funcionando..


Link to comment
Share on other sites

  • 0

desculpe perguntar mas... tu fechou e abriu o serv denovo pra testar a ediçao do vod? pq parece esta correta...

 

se tu fez isso, to achando q em algum outro script teu deve ter algu como...

voc = xxx

como variavel global* e dai ta dando conflito... mas sei la tb kk'

Edited by Slicer
Link to comment
Share on other sites

  • 0

é que tinha que por tipo

 

outfit = {lookType = out[getPlayerVocation(cid)], lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet } doCreatureChangeOutfit(cid, outfit)

 

ou nao?

local out = {
[1] = 66, -- VOCATION / LOOKTYPE
[2] = 67,
[3] = 68,
[4] = 69,
[5] = 70,
[6] = 71,
[7] = 72,
[8] = 73
}
function onLogin(cid)
if getPlayerStorageValue(cid,23219) < 1 then
outfit = {lookType = out[getPlayerVocation(cid)], lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet }
doCreatureChangeOutfit(cid, outfit)
setPlayerStorageValue(cid,23219,1)
end
return true
end
Edited by Cleberadm
Link to comment
Share on other sites

  • 0

Sim sim eu fechei e abri dnv o servidor e testei.. to usando o nto do robinhood esse é o primeiro script que to colocando nele ;x e nunca vi ninguém que usa ele ter esse erro..

@cleberadm
Why?

não entendi o que você quis dizer..

Edited by Rusherzin
Link to comment
Share on other sites

  • 0

Usei o seu..



local out = {
[1] = 13, -- VOCATION / LOOKTYPE
[2] = 13,
[3] = 13,
[4] = 13,
[5] = 13,
[6] = 13,
[7] = 13,
[8] = 13
}

function onLogin(cid)
if getPlayerStorageValue(cid,23219) < 1 then
outfit = {lookType = out[getPlayerVocation(cid)], lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet }
doCreatureChangeOutfit(cid, outfit)
setPlayerStorageValue(cid,23219,1)
end
return true
end

Vou reportar para que movam


Link to comment
Share on other sites

×
×
  • Create New...