Ir para conteúdo

[Arquivado]Trem Fantasma


Andre Miles

Posts Recomendados

  • Respostas 33
  • Created
  • Última resposta

Top Posters In This Topic

so iniciante em dexar msg por isso n sei arruma

minhas coisas tipow nome e talz....

mas entendo mto de scripts

ahh

vo mata a fome d vcs...

tah ai eu passei ele intero

 

 

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
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)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 3 then
selfSay('Oi ' .. creatureGetName(cid) .. '!  Tah afim de dar uma voltinha com o medo? Diga Trem')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Jah falo com vc em um minutinhu.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'trem') then
selfSay('Quer ir mesmo?')
talk_state = 1
elseif msgcontains(msg, 'sair') then
selfSay('Quer sair daqui?')
talk_state = 2 
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,0) then
travel(cid, 1122, 875, 6)
doSetSwimEffect(cid, "Carrinho2", 31536000000)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)
else
selfSay('Sorry, you don\'t have enough money.')
end
end
talk_state = 0
elseif talk_state == 2 then
if msgcontains(msg, 'yes') then
if pay(cid,0) then
travel(cid, 998, 1080, 6)
doSetSwimEffect(cid, "Citizen", 10000)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)
doPlayerSendTextMessage(cid,22,"Redefina seu outfit.")
else
selfSay('Sorry, you don\'t have enough money.')
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 3 then
selfSay('Tchau, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 15 then
if focus > 0 then
selfSay('Afk man...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 3 then
selfSay('Tchau Tchau amigo.')
focus = 0
end
end
end

 

fike na paix.... :smile_positivo:

fuis...

 

so iniciante em dexar msg por isso n sei arruma

minhas coisas tipow nome e talz....

mas entendo mto de scripts

ahh

vo mata a fome d vcs...

tah ai eu passei ele intero

 

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

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)

msg = string.lower(msg)

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

selfSay('Oi ' .. creatureGetName(cid) .. '! Tah afim de dar uma voltinha com o medo? Diga Trem')

focus = cid

talk_start = os.clock()

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

selfSay('Sorry, ' .. creatureGetName(cid) .. '! Jah falo com vc em um minutinhu.')

elseif focus == cid then

talk_start = os.clock()

if msgcontains(msg, 'trem') then

selfSay('Quer ir mesmo?')

talk_state = 1

elseif msgcontains(msg, 'sair') then

selfSay('Quer sair daqui?')

talk_state = 2

elseif talk_state == 1 then

if msgcontains(msg, 'yes') then

if pay(cid,0) then

travel(cid, 1122, 875, 6)

doSetSwimEffect(cid, "Carrinho2", 31536000000)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)

else

selfSay('Sorry, you don\'t have enough money.')

end

end

talk_state = 0

elseif talk_state == 2 then

if msgcontains(msg, 'yes') then

if pay(cid,0) then

travel(cid, 998, 1080, 6)

doSetSwimEffect(cid, "Citizen", 10000)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)

doPlayerSendTextMessage(cid,22,"Redefina seu outfit.")

else

selfSay('Sorry, you don\'t have enough money.')

end

end

talk_state = 0

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

selfSay('Tchau, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

end

end

function onCreatureChangeOutfit(creature)

end

function onThink()

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

if focus > 0 then

selfSay('Afk man...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 3 then

selfSay('Tchau Tchau amigo.')

focus = 0

end

end

end

 

fiek na paix :smile_positivo:

 

so iniciante em dexar msg por isso n sei arruma

minhas coisas tipow nome e talz....

mas entendo mto de scripts

ahh

vo mata a fome d vcs...

tah ai eu passei ele intero

 

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

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)

msg = string.lower(msg)

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

selfSay('Oi ' .. creatureGetName(cid) .. '! Tah afim de dar uma voltinha com o medo? Diga Trem')

focus = cid

talk_start = os.clock()

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

selfSay('Sorry, ' .. creatureGetName(cid) .. '! Jah falo com vc em um minutinhu.')

elseif focus == cid then

talk_start = os.clock()

if msgcontains(msg, 'trem') then

selfSay('Quer ir mesmo?')

talk_state = 1

elseif msgcontains(msg, 'sair') then

selfSay('Quer sair daqui?')

talk_state = 2

elseif talk_state == 1 then

if msgcontains(msg, 'yes') then

if pay(cid,0) then

travel(cid, 1122, 875, 6)

doSetSwimEffect(cid, "Carrinho2", 31536000000)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)

else

selfSay('Sorry, you don\'t have enough money.')

end

end

talk_state = 0

elseif talk_state == 2 then

if msgcontains(msg, 'yes') then

if pay(cid,0) then

travel(cid, 998, 1080, 6)

doSetSwimEffect(cid, "Citizen", 10000)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)

doPlayerSendTextMessage(cid,22,"Redefina seu outfit.")

else

selfSay('Sorry, you don\'t have enough money.')

end

end

talk_state = 0

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

selfSay('Tchau, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

end

end

function onCreatureChangeOutfit(creature)

end

function onThink()

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

if focus > 0 then

selfSay('Afk man...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 3 then

selfSay('Tchau Tchau amigo.')

focus = 0

end

end

end

 

fike na paix :smile_positivo:

 

so iniciante em dexar msg por isso n sei arruma

minhas coisas tipow nome e talz....

<-----------

mas entendo mto de scripts

ahh

vo mata a fome d vcs...

tah ai eu passei ele intero

 

 

 

local focus = 0

local talk_start = 0

local target = 0

local following = false

local attacking = false

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)

msg = string.lower(msg)

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

selfSay('Oi ' .. creatureGetName(cid) .. '! Tah afim de dar uma voltinha com o medo? Diga Trem')

focus = cid

talk_start = os.clock()

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

selfSay('Sorry, ' .. creatureGetName(cid) .. '! Jah falo com vc em um minutinhu.')

elseif focus == cid then

talk_start = os.clock()

if msgcontains(msg, 'trem') then

selfSay('Quer ir mesmo?')

talk_state = 1

elseif msgcontains(msg, 'sair') then

selfSay('Quer sair daqui?')

talk_state = 2

elseif talk_state == 1 then

if msgcontains(msg, 'yes') then

if pay(cid,0) then

travel(cid, 1122, 875, 6)

doSetSwimEffect(cid, "Carrinho2", 31536000000)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)

else

selfSay('Sorry, you don\'t have enough money.')

end

end

talk_state = 0

elseif talk_state == 2 then

if msgcontains(msg, 'yes') then

if pay(cid,0) then

travel(cid, 998, 1080, 6)

doSetSwimEffect(cid, "Citizen", 10000)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_SOUND_WHITE)

doPlayerSendTextMessage(cid,22,"Redefina seu outfit.")

else

selfSay('Sorry, you don\'t have enough money.')

end

end

talk_state = 0

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

selfSay('Tchau, ' .. creatureGetName(cid) .. '!')

focus = 0

talk_start = 0

end

end

end

function onCreatureChangeOutfit(creature)

end

function onThink()

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

if focus > 0 then

selfSay('Afk man...')

end

focus = 0

end

if focus ~= 0 then

if getDistanceToCreature(focus) > 3 then

selfSay('Tchau Tchau amigo.')

focus = 0

end

end

end

 

fike na paix :smile_positivo:

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 weeks later...

André no meu msn vc está offline mais mesmo assim vocÊ poderia me diser porque quando eu vo cria o npc ele fala que não consegue achar o trem.lua ?

 

(ARRUMEI )

 

EDITED (QUANDO EU FALO YES PRO NPC ELE NÃO FAZ NADA E DA UM ERRO NO CONTROL)

Editado por NightWiizard
Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...
  • 5 weeks later...

Ja fiz : NPC , Carrinho, e Move...

 

Ai falo hi trem yes e sou teleportado para o local mas não viro o carrinho.. Pq ? :cry:

 

e Ta dando erro nessa parte que axo q transforma o player em carrinho..

"attemp to call global 'doSetSwinEffect' <a nil value>

Editado por gustavocordeiro
Link para o comentário
Compartilhar em outros sites

  • 4 months later...
Ja fiz : NPC , Carrinho, e Move...

 

Ai falo hi trem yes e sou teleportado para o local mas não viro o carrinho.. Pq ? :cry:

 

e Ta dando erro nessa parte que axo q transforma o player em carrinho..

"attemp to call global 'doSetSwinEffect' <a nil value>

 

Versão 8.0- seu ot? Usa Aries?

 

Se não, use Aries 8.1+

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.

×
×
  • Criar Novo...