SK

Criador De Montro E Mais

Por skya tura, 24 de set. de 2006 em NPCs, monsters e raids

script
13
4.4k
skya turaS
24 de setembro de 2006 às 19:13

esse npc e em portugues vc chega e fala oi e ele fala um monte de coisas vc fala uma das opçoes e ele obedece (a ue te afeta)

ai vai o codigo do q fica na pasta npc(dados dele)eu sugiro que coloque o nome de monsc.xml:

<?xml version="1.0"?>

<npc name="Criador de Monstros" script="data/npc/scripts/heal2.lua" access="5" lookdir="1">

<health now="9000" max="9000"/>

<look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>

</npc>

se quiser muda o nome dele!

Ai vai o que fica no scripts(fala e etc...)ponha o nome de "heal2.lua"

(obrigatorio):

target = 0

focus = 0

talk_start = 0

function onThingMove(creature, thing, oldpos, oldstackpos)

end

function onCreatureAppear(creature)

end

function onCreatureDisappear(cid, pos)

end

function onCreatureTurn(creature)

end

function onCreatureSay(cid, type, msg)

    msg = string.lower(msg)

    if ((string.find(msg, '(%a*)oi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 5 then

        selfSay('OI ' .. creatureGetName(cid) .. '!Que bicho vc quer q eu sumone como bicho que nao ataca?Demon, Ferumbras?E sem summon?SDemon, SFrumbras?Cuidado eles te atacam em!Se vc quiser ultimate explosion fala ue!Isse do ue e so teste!E se quiser heal fala vida!')

        focus = cid

        talk_start = os.clock()

    elseif (string.find(msg, '(%a*)demon(%a*)') and focus ~= 0) then

        selfSay('/summon demon')

        focus = 0

        talk_start = 0

elseif (string.find(msg, '(%a*)ferumbras(%a*)') and focus ~= 0) then

        selfSay('/summon ferumbras')

        focus = 0

        talk_start = 0

elseif (string.find(msg, '(%a*)sdemon(%a*)') and focus ~= 0) then

        selfSay('/m demon')

        focus = 0

        talk_start = 0

elseif (string.find(msg, '(%a*)sferumbras(%a*)') and focus ~= 0) then

        selfSay('/m demon')

        focus = 0

        talk_start = 0

elseif (string.find(msg, '(%a*)ue(%a*)') and focus ~= 0) then

        selfSay('exevo gran mas vis')

        focus = 0

        talk_start = 0

    elseif (string.find(msg, '(%a*)vida(%a*)') and focus ~= 0) then

        if getPlayerHealth(cid) <= 80 then

            heal(cid, 80)

        else

            selfSay('I cannot heal you.')

        end

    end

end

function onCreatureChangeOutfit(creature)

end

function onThink()

if focus > 0 then

x, y, z = creatureGetPosition(focus)

myx, myy, myz = selfGetPosition()

if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then

      selfTurn(0)

end

if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then

      selfTurn(2)

end

      if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then

      selfTurn(1)

end

if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then

      selfTurn(3)

end

if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then

      selfTurn(1)

end

if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then

        selfTurn(3)

end

if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then

        selfTurn(2)

end

if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then

        selfTurn(0)

end

if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then

        selfTurn(1)

end

if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then

        selfTurn(3)

end

if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then

        selfTurn(2)

end

if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then

        selfTurn(0)

end

if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then

        selfTurn(1)

end

if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then

        selfTurn(3)

end

if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then

        selfTurn(2)

end

if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then

        selfTurn(0)

end

end

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

    if focus > 0 then

    selfSay('Va embor se vc nao pediu nada!Dexa o otro treinar!Se ja pediu ignore!')

    end

    focus = 0

  end

  if focus ~= 0 then

  if getDistanceToCreature(focus) > 5 then

    selfSay('Tiau!Volte sempre que quiser matar monstros!.')

    focus = 0

  end

  end

end

algum bug duvida ou sugestao do npc me fala! :bye:

1 mês depois...
alexjfA
19 de outubro de 2006 às 09:44

Ow manero mesmo vei =D mais me arruma um npc q cria montros para os player so q os player tem q pagar =D vlw

tenta me arruma pls hehehe

LadyeGataL
20 de outubro de 2006 às 19:37

nao gostei mais vlw pela intençao

1 mês depois...
Felipe MoraesF
06 de novembro de 2006 às 18:04

Ficou bom

Pena q os kras tem q pagar pro kra fazer os bixos

Mas vlw ai,a intençao sua foi ajudar

E ficou rox

FoDoXF
08 de novembro de 2006 às 15:01

Muito bom configurado do jeito adequado muito bom mesmo brother continue assim concerta esse npc vai estar no meu ot xD vlws....

Obrigado: By FoDoX

2 meses depois...
NekoN
09 de janeiro de 2007 às 10:20

gostei continue assim parabens pelo seu trbalho xD

3 semanas depois...
PaluboP
25 de janeiro de 2007 às 23:14

ei, otimo NPC viu?

4 meses depois...
skynagerloasS
25 de maio de 2007 às 14:01

Tópico contendo somente 1 NpC,

essa seção é para DataPacks com 3 ou mais Npcs,

~o{Tópico Movido}o~,

Abraços.

2 meses depois...
lucasmlimaL
28 de julho de 2007 às 15:31

Mt bom de acordo com os posts

n testei pq meu tibia deu um problema
mt bom pelo visto
2 meses depois...
08 de setembro de 2007 às 11:17

legal....legal....

4 semanas depois...
IguitoI
29 de setembro de 2007 às 18:57

Ja puz no meu ot

1 mês depois...
13 de outubro de 2007 às 13:08

A intenção foi boa , mas n gosto desse tipu de NPC pq tem akeles cra mancões q ficam sumonando monsters só pra matar alguem ow matar os nubins e acabam zuando o OT , pelo q eu entendi nem tem q pagar né?? pior ainda =/

 

Mais ta valendo :>

 

Flws ;D

3 anos depois...
shardjeffS
07 de março de 2011 às 20:43

Mano eu acho que esse npc pode me ajudar no meu server (não de "Tibia" mas de pokemon online) se vc me ajudar eu dou rep++, é que assim... ele tá ótimo.. mais tinha como ser assim.. se fala "oi", certo.Depois ele pergunta se você tem certeza que quer batalhar.. Ae se dizer "Sim" ele vai sumonando 1 monster de cada vez e só você pode atacar (se for possível) se disser não ele diz "volte quando estiver preparado"... Mano se você conseguir eu sempre que possível te dou REP+++ VIU MANO, VALEU DESDE JÁ!!!!!