Ir para conteúdo

Featured Replies

Postado
  • Autor
  Em 07/02/2015 em 14:43, xBlackWolf disse:

O primeiro erro eu arrumei... já o segundo, não tenho idéia, porque no meu ot 10.35 funciona normal e é script de 8.60... tenta agora e ve se da erro.

 

Mostrar conteúdo oculto

 

 

vlw parceiro, está funcionando agora

 

só tem um problema, ele fala no Default, nao fala no chat npc, teria como ver isso pra mim ?  

 

OBS: outra coisa que acabei de ver, quando um jogador free fala que quer ir pra cidade vip, ele não responde, poderia botar ele pra falar que não é possivel por qe ele não eh vip ?

poderia botar tbm pra confimar a viagem ?

exp: hi, yalahar, yes

 

ele tah teleportando só em falar o nome da cidade

 

Darei REP+ ><"

Editado por subhe (veja o histórico de edições)

n35408.gif

  • Respostas 34
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • No caso do NPC Chat, o probema é simples: Pegue por exemplo essa fala de seu NPC: selfSay("Sorry, you don\'t have enough money.") Agora pegue como exemplo essa outra mensagem: selfSay('Sorry, you

  • O primeiro erro eu arrumei... já o segundo, não tenho idéia, porque no meu ot 10.35 funciona normal e é script de 8.60... tenta agora e ve se da erro.  

  • Flavio S. Cabral
    Flavio S. Cabral

    isso é minha assinatura se não percebeu rsrsrs

Postado

É só o meu NPC que está falando no default? 

 

Segue com mensagem para free: 

Mostrar conteúdo oculto

xBlackWolf

THX @Storm Night

Best Avatar Ever

 

9p0FoTd.png

Postado
  • Autor
  Em 07/02/2015 em 15:11, xBlackWolf disse:

 

É só o meu NPC que está falando no default? 

 

Segue com mensagem para free: 

Mostrar conteúdo oculto

 

 

sim, somente o seu npc que fala no Default

 

irei test aqui jaja edito

 

Ediit: não funcionou, ficou do mesmo jeito

 

Jogador Free (cidade vip)

  Citar

 

13:24 Master Of Puppets [12]: hi

13:24 Sparrow: Hiho Master Of Puppets! Anda logo, me diga a onde deseja ir
13:24 Master Of Puppets [12]: alfon

ele não responde nada depois disso

 

Jogador vip, a mesma fala, só que ele é teleportado

 

 

Arrumei essa parte do npc responder o player free, quando tenta ir pra cidade vip

 

só falta 2 coisinhas

 

o npc continua falando no default, e queria tbm que botasse uma confimação na hora que for viajar

 

Voce quer viajar para x cidade por x gold coins?

 

 

OBS: percebi uma coisa agora, o npc fala no default, mais se eu abrir manualmente o chat do npc, ele fala tbm, mais não no chat, no default

 

exemplo: eu falo no chat npc, ele responde no default

e não no chat npc ;x

 

OBS: acho que esse erro do npc nao falar pelo default, é por que o seu ot eh versão 10.x

e o meu eh 8.6, muda algumas funcões

poderia adaptar pra 8.6 ?

Editado por subhe (veja o histórico de edições)

n35408.gif

Postado

Desculpe, mas enfrento o mesmo problema no meu OT, estou pesquisando e tentando aprender a adaptar para utilizar o NPC Chat. Vou ficar te devendo.

 

Não sei como ficou seu script dps que vc arrumou, mas segue agora com confirmação:

Mostrar conteúdo oculto

 

Faça suas modificações, e me fala se está funcionando. Não testei. E também se não soube modificar posta seu script que eu ponho a confirmação.

 

Abrs,

xBlackWolf

THX @Storm Night

Best Avatar Ever

 

9p0FoTd.png

Postado
  • Autor

testei o seu script, ele nao funcionou, está dando aquele mesmo erro do incio, quando vc fala o nome da cidade, ele fala 

  Citar

 

 

'how? I do not understand!

 

e não responde mais nada

irei postar o meu script aqui, pq nao consegui fazer as alterações

 

  Citar

 

---- NPC DE BARCO, FEITO POR XBLACKWOLF P\ TIBIAKING.

 
---- EDITAR APENAS AS POSIÇÕES E AS PALAVRAS MÁGICAS: if msgcontains(msg, 'town 1 free') then
 
---- NO CASO 'TOWN 1 FREE'
 
 
 
 
 
town1free = {x=1555, y=2576, z=6}
 
town2free = {x=430, y=420, z=6}
 
town3free = {x=400, y=482, z=6}
 
town4free = {x=518, y=439, z=6}
 
town5free = {x=568, y=465, z=7}
 
town6free = {x=434, y=618, z=7}
 
town7free = {x=573, y=694, z=7}
 
 
 
town1 = {x=114, y=282, z=6}
 
town2 = {x=600, y=1052, z=7}
 
town3 = {x=423, y=1010, z=7}
 
 
 
 
 
local focus = 0
 
local talk_start = 0
 
local target = 0
 
local following = false
 
local attacking = false
 
 
 
function onThingMove(creature, thing, oldpos, oldstackpos, cid, item, frompos, item2, topos)
 
 
 
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)
 
msg = string.lower(msg)
 
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
 
selfSay('Olá ' .. getCreatureName(cid) .. '! Anda logo, me diga a onde deseja ir')
 
focus = cid
 
talk_start = os.clock()
 
 
 
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
 
selfSay('espera, ' .. getCreatureName(cid) .. '!porra.')
 
 
 
elseif focus == cid then
 
talk_start = os.clock()
 
 
 
if msgcontains(msg, 'yalahar') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town1free)
 
doSendMagicEffect(town1free,10)
 
selfSay("Vai")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
elseif msgcontains(msg, 'town 2 free') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town2free)
 
doSendMagicEffect(town2free,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
elseif msgcontains(msg, 'town 3 free') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town3free)
 
doSendMagicEffect(town3free,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
elseif msgcontains(msg, 'town 4 free') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town4free)
 
doSendMagicEffect(town4free,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
elseif msgcontains(msg, 'town 5 free') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town5free)
 
doSendMagicEffect(town5free,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
elseif msgcontains(msg, 'town 6 free') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town6free)
 
doSendMagicEffect(town6free,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
elseif msgcontains(msg, 'town 7 free') then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town7free)
 
doSendMagicEffect(town7free,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money.")
 
end
 
 
 
 
 
------------------------------------------ VIP Travel -----------------------------------
 
 
 
elseif msgcontains(msg, 'alfon') then
 
if(getPlayerVipDays(cid) > 0) then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town1)
 
doSendMagicEffect(town1,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money or VIP Time.")
end
 
else
 
selfSay("Você não tem VIP!")
 
end
 
 
 
elseif msgcontains(msg, 'town 2') then
 
if(getPlayerVipDays(cid) > 0) then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town2)
 
doSendMagicEffect(town2,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money or VIP Time.")
end
 
else
 
selfSay("Você não tem VIP!")
 
end
 
 
 
elseif msgcontains(msg, 'town 3') then
 
if(getPlayerVipDays(cid) > 0) then
 
if(doPlayerRemoveMoney(cid, 50) == TRUE) then
 
doTeleportThing(cid,town3)
 
doSendMagicEffect(town3,10)
 
selfSay("Let's GO")
 
focus = 0
 
talk_start = 0
 
else
 
selfSay("Sorry, you don\'t have enough money or VIP Time.")
end
 
else
 
selfSay("Você não tem VIP!")
 
end
 
 
 
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
 
selfSay('Bye ' .. getCreatureName(cid) .. ', go back.')
 
focus = 0
 
talk_start = 0
 
elseif msg ~= "" then
 
selfSay('how? I do not understand!')
 
talk_state = 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
 
talk_start = 0
 
end
 
if focus ~= 0 then
 
if getDistanceToCreature(focus) > 5 then
 
selfSay('Good Bye')
 
focus = 0
 
talk_start = 0
 
end
 
end
 
end

 

por favor, me ajuda nessa parte da confirmação, irei dar mts rep+ pra vc, por ter me ajudado mt ><'

n35408.gif

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo