Forum nie tylko o Tibii i OTS...

Nie tylko o Tibii i OTS...

  • Nie jesteś zalogowany.
  • Polecamy: Komputery

#1 2006-11-30 15:40:56

SirChiracle

Zbanowany

Zarejestrowany: 2006-10-27
Posty: 1132
WWW

Ogrodnik

hej
mam npc Ogrodnik on sluzy do lisci mana a tak wogole to przekonace sie jak go uzyjecie xD

wchodzimy do data/npc i robimy plik XML o nazwie Ogrodnik.xml i wklejamy to ::

Kod:

<?xml version="1.0"?>

<npc name="Ogrodnik" script="data/npc/scripts/ogrodnik.lua" access="3" monster="1" speed="50" level="100" maglevel="100" exp="0" pushable="0" lookdir="0">
          <mana now="100" max="100"/>
          <health now="100" max="100"/>
          <look type="57" head="78" body="61" legs="52" feet="114" corpse="2276"/>
          <attack type="melee" damage="10"/>       
</npc>

potem wchodzimy do data/npc/scripts i robimy plik LUA o nazwie ogrodnik.lua i wklejamy to ::

Kod:

focus = 0
talk_start = 0
target = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
            if focus == cid then
          selfSay('.')
          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, '(%a*)hi(%a*)')) and getDistanceToCreature(cid) < 3 then
                                selfSay('Witaj ' .. creatureGetName(cid) .. ' Potrafie robic Mana Fluidy z lisci tych drzew :D moge ci sprzedac przepis za 10k [mana]')
                                focus = cid
                                talk_start = os.clock()

          elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
                      selfSay('Poczekaj ' .. creatureGetName(cid) .. '! Za chwile z toba porozmawiam.')

          elseif msgcontains(msg, 'mana') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
                      selfSay('Poczekaj ' .. creatureGetName(cid) .. '! Za chwile z toba porozmawiam.')

          elseif msgcontains(msg, 'golden sickle') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
                      selfSay('Poczekaj ' .. creatureGetName(cid) .. '! Za chwile z toba porozmawiam.')
            elseif (msgcontains(msg, '(%a*)mana(%a*)')) and getDistanceToCreature(cid) < 3 then
                    if pay(cid, 10000) then
                                selfSay('No wiec aby mozna bylo zrobic mana fluida trzeba sciac liscie z tych drzew przy pomocy golden sickle ktora moge ci sprzedac za 5k [golden sickle].. a liscie namoczyc woda np. z Vial :D')
                                focus = cid
                                talk_start = os.clock()
                    else
                              selfSay('Nie masz tyle pieniedzy..')
                    end
            elseif (msgcontains(msg, '(%a*)golden sickle(%a*)')) and getDistanceToCreature(cid) < 3 then
                    if pay(cid, 5000) then
                              buy(cid,2418,1,0)
                              selfSay('Prosze.. oto nowa Mana sickle :D')
                                focus = cid
                                talk_start = os.clock()
                    else
                              selfSay('Nie masz tyle pieniedzy..')
                                focus = cid
                                talk_start = os.clock()
                    end
            end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
            if (os.clock() - talk_start) > 15 then
                      if focus > 0 then
                                selfSay('Next Please...')
                      end
                                focus = 0
            end
           if focus ~= 0 then
                     if getDistanceToCreature(focus) > 3 then
                               selfSay('Good bye then.')
                                selfSay('/clean')
                               focus = 0
                     end
           end
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,20)
if randmove == 1 then
nx = cx + 1
end
if randmove == 2 then
nx = cx - 1
end
if randmove == 3 then
ny = cy + 1
end
if randmove == 4 then
ny = cy - 1
end
if randmove == 5 then
nx = cx
ny = cy
end
moveToPosition(nx, ny, cz)
--summons = 50
--summons2 = 50
end
end

The end thx za all posty i gz dla all za npc i nie tylko PZDR.


WYJEBANE W TO FORUM - - -- - -- - - - -- -- -- --  -- ---------------------------------------------------------------------------------------------------------------------------------------------------

Offline

 

#2 2006-12-31 11:46:34

wrobelek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2006-12-31
Posty: 7

Re: Ogrodnik

Jak  zrobić zeby on na OTS był wszystko wkleiłem i nie ma go hmm Prosze o odpowiedz

Offline

 

#3 2007-01-01 13:43:39

SirChiracle

Zbanowany

Zarejestrowany: 2006-10-27
Posty: 1132
WWW

Re: Ogrodnik

Napisałem ci w Santa Claus tylko zmień pozycje jak chcesz i nazwę NPC


WYJEBANE W TO FORUM - - -- - -- - - - -- -- -- --  -- ---------------------------------------------------------------------------------------------------------------------------------------------------

Offline

 

#4 2007-01-01 18:09:21

wrobelek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2006-12-31
Posty: 7

Re: Ogrodnik

Jakie drzewo trzeba tam wkleić

Offline

 

#5 2007-01-01 19:44:16

SirChiracle

Zbanowany

Zarejestrowany: 2006-10-27
Posty: 1132
WWW

Re: Ogrodnik

Manasowe ... to wszystki jest w OTS'ie Armonii więc jak chcesz to ściągnij ponieważ ja z niego nie korzystam


WYJEBANE W TO FORUM - - -- - -- - - - -- -- -- --  -- ---------------------------------------------------------------------------------------------------------------------------------------------------

Offline

 

#6 2007-01-02 17:53:00

wrobelek

http://i37.tinypic.com/okc0lk.gif

Zarejestrowany: 2006-12-31
Posty: 7

Re: Ogrodnik

A skąd wziąść tego OTS Albo może screna ktoś da tego drzewa ( Albo IP na OTS lub w Map Editorze )

Offline

 

#7 2007-02-06 14:26:05

Kogut

Zbanowany

Zarejestrowany: 2006-11-23
Posty: 21

Re: Ogrodnik

Omg.... -.- www.otfans.pl wszystko masz a PS. KOGUT powraca xD


-Guzur- Na 1 dzień xD

Ostatnio edytowany przez Guzur (2007-02-06 16:52:02)

Offline

 

#8 2007-02-06 15:22:01

SirChiracle

Zbanowany

Zarejestrowany: 2006-10-27
Posty: 1132
WWW

Re: Ogrodnik

@up
żal.pl -.- A myślałem że cię nie będzie , lecz Witamy !!


WYJEBANE W TO FORUM - - -- - -- - - - -- -- -- --  -- ---------------------------------------------------------------------------------------------------------------------------------------------------

Offline

 

#9 2007-02-06 16:49:29

Guzur

http://i34.tinypic.com/3321jrs.gif

Zarejestrowany: 2006-04-17
Posty: 1526
WWW

Re: Ogrodnik

@Kogut... BAN znowu już nie proś o odwoływanie bo tego nie zrobie -.-
@Kogut każdy wie, że jesteś zwykłym dzieciakiem i n00bem. Widać to też po Twoich postach na otfans.pl.


"Oczywiście, że wiem kim jesteś... Moją pracą jest wiedzieć"

"Gdyby byki i konie miały ręce i mogły nimi malować i tworzyć dzieła, jak ludzie, to konie malowały by postacie bogów podobne do koni, i takież ciała im dawały, a byki podobne do byków"

Offline

 

#10 2007-02-06 17:46:56

SirChiracle

Zbanowany

Zarejestrowany: 2006-10-27
Posty: 1132
WWW

Re: Ogrodnik

@up
Guzur wstaw mu bana na cały czas ;> za bardzo się przemądrza -.-


WYJEBANE W TO FORUM - - -- - -- - - - -- -- -- --  -- ---------------------------------------------------------------------------------------------------------------------------------------------------

Offline

 

#11 2007-11-26 22:44:05

JaNo Mapper

Zbanowany

6073717
Skąd: Rio
Zarejestrowany: 2007-11-24
Posty: 94
Nick: Wiesiu
Profesja: Guardia
Server: 139
WWW

Re: Ogrodnik

-Guzur- Na 1 dzień xD


Tibia see you!

http://r3.fodey.com/1dbc9b6767ec1486eb59c11bd0a608f87.1.gif

Offline

 

#12 2007-12-27 09:19:38

Vasyl

Zbanowany

Zarejestrowany: 2007-12-25
Posty: 89

Re: Ogrodnik

Sir Niespamój Bo ci na zdrowie to niewyjdzie _/\_ @up up up up Glazur daj mu bana na zawsze.

Ps:szkoda ze wrucileś(kogut)

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
BetonovĂŠ dvoukomorovĂŠ jĂ­mky jsou vyrobeny przegrywanie kaset vhs łódz