VOCAÇÃO E SEU OUTFIT

AandersonC
em Scripts

AandersonC

Throw Away Your Television
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/11Posts: 70

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>

Att: Rusherzin

 

 

 

 

Vodkart

Sumus Validus
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 21/05/10Posts: 3406Gênero: Masculino

 

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

bossisg.png

AandersonC

Throw Away Your Television
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/11Posts: 70

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

Att: Rusherzin

 

 

 

 

Vodkart

Sumus Validus
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 21/05/10Posts: 3406Gênero: Masculino

existe esa out 321 nos eu ot?

bossisg.png

AandersonC

Throw Away Your Television
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/11Posts: 70

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..


Att: Rusherzin

 

 

 

 

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

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'

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Session Start

cleber.16mb.com
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 25/04/12Posts: 752Gênero: Masculino

é 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

AandersonC

Throw Away Your Television
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/11Posts: 70

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..

Att: Rusherzin

 

 

 

 

AandersonC

Throw Away Your Television
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/11Posts: 70

Tipo eu dei uma noobeada básica e confundi looktype com outfit..
Agora funcionou ;D

Thanks for all

Att: Rusherzin

 

 

 

 

Session Start

cleber.16mb.com
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 25/04/12Posts: 752Gênero: Masculino

<p>Se usou o que eu fiz ali funcionou sim...-.-</p>

<p> </p>

<p>posta o script para caso outras pessoas precisarem ele estiver aqui :D</p>

AandersonC

Throw Away Your Television
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/07/11Posts: 70

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


Att: Rusherzin

 

 

 

 

Skymagnum

Hamburguer
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 02/08/12Posts: 1025Char no Tibia: Maurolkit

Tópico movido para a seção de dúvidas e pedidos resolvidos.

jeoz.png