XM

[Encerrado] Trocar sprite no cliente...

Por xmaster0, 20 de fev. de 2013 em Tópicos Sem Resposta

poke
dash
sprite
cliente
editar
rods
vara de pescar
ajudar
resolvido
45
5k
RoksasR
20 de fevereiro de 2013 às 22:34

Eu sei, mas fingindo que fosse tíbia, em q slot fica

xmaster0X
20 de fevereiro de 2013 às 22:45

Eu sei, mas fingindo que fosse tíbia, em q slot fica

 

344uqs3.jpg

 

não leva em consideração o que tah escrito mais sim o slot que tah circulado la em cima o primeiro a esquerda do rop

GabrieltxuG
21 de fevereiro de 2013 às 09:58

Man Não tem como vc Mudar veey o NPC Não consegue Mudar os firstitems vc mesmo que tem que arruma em Mods/firstitems.xml Procura o ID da vara que vc quer Substituir e depois Muda para o ID da Vara que vc quer no Lugar!

xmaster0X
21 de fevereiro de 2013 às 10:14

Man Não tem como vc Mudar veey o NPC Não consegue Mudar os firstitems vc mesmo que tem que arruma em Mods/firstitems.xml Procura o ID da vara que vc quer Substituir e depois Muda para o ID da Vara que vc quer no Lugar!

 

Isso nunca vai ser impossivel eu ja conseguir trocar a rod la de cima , então me explica como o Pstorm conseguiu!!! não é tão dificil e não precisa trocar no first item isso substitui la no spr editor

GabrieltxuG
21 de fevereiro de 2013 às 10:16

Sabe oq Significa Sources? então cara PDA como o Centurion não tem Sources! então Não tem como vc fazer isso ¬¬

BananaFightB
21 de fevereiro de 2013 às 10:26

nem transformeitem não pega ? '='

xmaster0X
21 de fevereiro de 2013 às 12:09

Sabe oq Significa Sources? então cara PDA como o Centurion não tem Sources! então Não tem como vc fazer isso ¬¬

 

ja troqueii!!!

RoksasR
21 de fevereiro de 2013 às 12:36

Lógico que tem como, existe a função chamada

getPlayerSlotItem(cid, slot)

 

Vou providenciar isso, aguarde

xmaster0X
21 de fevereiro de 2013 às 12:41

Lógico que tem como, existe a função chamada

getPlayerSlotItem(cid, slot)

 

Vou providenciar isso, aguarde

 

ei pow vê meu novo tópico que eu to explicando melhor...

 

http://www.xtibia.com/forum/topic/208209-transformar-item-em-outro-na-slot-do-cliente-com-o-npc-poketibia/page__fromsearch__1

RoksasR
21 de fevereiro de 2013 às 12:48

Cara, não crie outro tópico igual, é contra as regras, aqui está. Akele NPC que eu passei, substitua-o por esse, e se não trocar a rod na hora, experimente relogar. Poste resultados ^^

 

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

local addon_state = 0

 

function onThingMove(creature, thing, oldpos, oldstackpos)

end

 

function onCreatureAppear(creature)

end

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye then.')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

local bags = getPlayerSlotItem(cid, 2)

msg = string.lower(msg)

 

if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then

selfSay('Olá ' .. getCreatureName(cid) .. '... eu troco items pela great rod!')

focus = cid

 

talk_start = os.clock()

 

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')

 

elseif focus == cid then

talk_start = os.clock()

if msgcontains(msg, 'great') then

if getPlayerStorageValue (cid,3988) == -1 then

doAddContainerItem(bags.uid, 12246, 1)

setPlayerStorageValue (cid,3988,2)

addon_state = 0

else

selfSay('Você já recebeu sua Rod!')

talk_start = 0

end

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye, ' .. getCreatureName(cid) .. '! Come back soon..')

focus = 0

talk_start = 0

end

end

end

 

function onCreatureChangeOutfit(creature)

end

 

function onThink()

doNpcSetCreatureFocus(focus)

if (os.clock() - talk_start) > 30 then

if focus > 0 then

selfSay('Next Please...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('Good bye then.')

focus = 0

end

end

end

 

xmaster0X
21 de fevereiro de 2013 às 15:24

Cara, não crie outro tópico igual, é contra as regras, aqui está. Akele NPC que eu passei, substitua-o por esse, e se não trocar a rod na hora, experimente relogar. Poste resultados ^^

 

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

local addon_state = 0

 

function onThingMove(creature, thing, oldpos, oldstackpos)

end

 

function onCreatureAppear(creature)

end

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye then.')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

local bags = getPlayerSlotItem(cid, 2)

msg = string.lower(msg)

 

if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then

selfSay('Olá ' .. getCreatureName(cid) .. '... eu troco items pela great rod!')

focus = cid

 

talk_start = os.clock()

 

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')

 

elseif focus == cid then

talk_start = os.clock()

if msgcontains(msg, 'great') then

if getPlayerStorageValue (cid,3988) == -1 then

doAddContainerItem(bags.uid, 12246, 1)

setPlayerStorageValue (cid,3988,2)

addon_state = 0

else

selfSay('Você já recebeu sua Rod!')

talk_start = 0

end

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye, ' .. getCreatureName(cid) .. '! Come back soon..')

focus = 0

talk_start = 0

end

end

end

 

function onCreatureChangeOutfit(creature)

end

 

function onThink()

doNpcSetCreatureFocus(focus)

if (os.clock() - talk_start) > 30 then

if focus > 0 then

selfSay('Next Please...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('Good bye then.')

focus = 0

end

end

end

 

 

agora o npc nao tah pegando o item que é (12239) e nem tah trocando a rod.... e agora o que será???

RoksasR
21 de fevereiro de 2013 às 15:29

Cara, você fala uma hora 12246, outra hora 12239, quais sao os IDS certos. Algum erro no distro?

xmaster0X
21 de fevereiro de 2013 às 15:37

Cara, você fala uma hora 12246, outra hora 12239, quais sao os IDS certos. Algum erro no distro?

 

 

Ei ente

Cara, você fala uma hora 12246, outra hora 12239, quais sao os IDS certos. Algum erro no distro?

 

Entende... 12246 é a rod que ja vem no player .... quando cria ja ela no jogo, a nova rod que é a great rod é 12247 que o player irá conseguir se tiver o item que é 12239 que e a iron bar.... mas isso para acontecer tem que falar com o npc... entendeu AGR

RoksasR
21 de fevereiro de 2013 às 15:39

Sim, já posto a nova resposta. Pensei que a nova rod era 12246 :))

 

@edit

 

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

local addon_state = 0

 

function onThingMove(creature, thing, oldpos, oldstackpos)

end

 

function onCreatureAppear(creature)

end

 

function onCreatureDisappear(cid, pos)

if focus == cid then

selfSay('Good bye then.')

focus = 0

talk_start = 0

end

end

 

function onCreatureTurn(creature)

end

 

function msgcontains(txt, str)

return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))

end

 

function onCreatureSay(cid, type, msg)

local bags = getPlayerSlotItem(cid, 2)

msg = string.lower(msg)

 

if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then

selfSay('Olá ' .. getCreatureName(cid) .. '... eu troco items pela great rod!')

focus = cid

 

talk_start = os.clock()

 

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then

selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')

 

elseif focus == cid then

talk_start = os.clock()

if msgcontains(msg, 'great') then

if getPlayerStorageValue (cid,3988) == -1 then

doAddContainerItem(bags.uid, 12247, 1)

doPlayerRemoveItem(cid,12239,1)

setPlayerStorageValue (cid,3988,2)

addon_state = 0

else

selfSay('Você já recebeu sua Rod ou não tem o item necessario (iron bar)!')

talk_start = 0

end

 

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then

selfSay('Good bye, ' .. getCreatureName(cid) .. '! Come back soon..')

focus = 0

talk_start = 0

end

end

end

 

function onCreatureChangeOutfit(creature)

end

 

function onThink()

doNpcSetCreatureFocus(focus)

if (os.clock() - talk_start) > 30 then

if focus > 0 then

selfSay('Next Please...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 5 then

selfSay('Good bye then.')

focus = 0

end

end

end

 

Editado Fevereiro 21 por Roksas

xmaster0X
21 de fevereiro de 2013 às 15:50

VLW happy.png

 

ei ta dando uns erros o serv naum ta reconhecendo isso ~ o tio ali o serv naum ta reconhecendo