#1 2008-05-15 21:06:47

Ziele

http://i38.tinypic.com/ztvkat.gif

6868784
Zarejestrowany: 2008-03-26
Posty: 462

[8.10]Barman

Siemka zamieszczam tu skrypt Barman..niewidzialem jeszcze tutaj tego na forum.

Wiec w data/npc/scripts robimy plik alkoholen.lua i wklejamy tam :

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('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('Witaj w mojej karczmie, sprzedaje tu piwo i wino')
          focus = cid
          talk_start = os.clock()

    elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Czekaj, kazdy sie napije !!.')

      elseif focus == cid then
        talk_start = os.clock()

        if msgcontains(msg, 'piwo') then
              selfSay('Moge ci nalac takie piwa: tibijskie, grzane, chlodzone, palone, mocne, light po 10 gp za flaszke!')

          elseif msgcontains(msg, 'tibijskie') then
            buy(cid,2006,3,10)

        elseif msgcontains(msg, 'grzane') then
            buy(cid,2006,3,10)

        elseif msgcontains(msg, 'chlodzone') then
            buy(cid,2006,3,10)

        elseif msgcontains(msg, 'palone') then
            buy(cid,2006,3,10)

        elseif msgcontains(msg, 'mocne') then
            buy(cid,2006,3,10)

        elseif msgcontains(msg, 'light') then
            buy(cid,2006,3,10)

        elseif msgcontains(msg, 'wino') then
                          selfSay('moge ci sprzedac butelke z takimi winami: "komandos" -10gp, "wino marki wino" - 9gp "Vermuth" -20gp "spocony cyklop" -15gp "elficki trunek" -100gp "goblinskie wymiociny" -5gp "trup" -15gp')

        elseif msgcontains(msg, 'komandos') then
            buy(cid,2006,15,9)
        elseif msgcontains(msg, 'wino marki wino') then
            buy(cid,2006,15,9)

        elseif msgcontains(msg, 'vermuth') then
            buy(cid,2006,15,20)

        elseif msgcontains(msg, 'spocony cyklop') then
            buy(cid,2006,15,15)

        elseif msgcontains(msg, 'elficki trunek') then
            buy(cid,2006,15,100)

        elseif msgcontains(msg, 'goblinskie wymiociny') then
            buy(cid,2006,15,5)

        elseif msgcontains(msg, 'trup') then
            buy(cid,2006,15,15)
       
          elseif string.find(msg, '(%a*)bye(%a*)')  and getDistanceToCreature(cid) < 4 then
              selfSay('Do zobaczenia, ' .. creatureGetName(cid) .. '!')
              focus = 0
              talk_start = 0
          end
      end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
      if (os.clock() - talk_start) > 30 then
          if focus > 0 then
              selfSay('Boze tak wczesnie a ten juz nawalony, kto chce piwa?')
          end
              focus = 0
      end
     if focus ~= 0 then
         if getDistanceToCreature(focus) > 5 then
             selfSay('Dobrze ze chociarz zaplacil')
             focus = 0
         end
     end
end

a w  npc robimy npc Barman i wklejamy :

Kod:

<?xml version="1.0"?>
<npc name="Barman" script="data/npc/scripts/alkoholen.lua" access="3">
<look type="128" head="39" body="40" legs="67" feet="76"/>
</npc>

Mam nadzieje ze komus sie przyda ;]

Pzdr


^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^
http://www.pokeplushies.com/images/adoptables/771098.gif
Nakarmisz Mnie ???
www.cs-myp.xt.pl <<<<---- zapraszamy do rejestracjii !!
www.games4you.y0.pl <<<< --------- Również zapraszamy !!!

Offline

 

#2 2008-05-15 21:15:39

 Dimek

http://i50.tinypic.com/242swno.jpg

Zarejestrowany: 2008-04-05
Posty: 1855

Re: [8.10]Barman

spoko skrypt


http://i44.tinypic.com/kd01v7.png
http://www.kiep.pl/img21/2011/03/18/1300408688dance.gif

Offline

 

#3 2008-05-22 15:56:37

~Shikamaru~

http://i37.tinypic.com/2dqpohz.gif

Zarejestrowany: 2008-05-22
Posty: 23

Re: [8.10]Barman

nom spoko skrypt ;] mi sie przyda ;] to juz kolejny fajny skrypt..szkoda ze nie twoj ale luuz wazne ze fajny ;D heh

PzDr


xD....Opisu Nie Ma....xD

Offline

 

#4 2008-05-22 15:58:06

Darx

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

Zarejestrowany: 2008-05-19
Posty: 7

Re: [8.10]Barman

A co ten skrypt robi?? jeśli można wiedziec xd


http://img.userbars.pl/108/21451.png
http://img.userbars.pl/105/20985.png
http://img530.imageshack.us/img530/7889/spamersfx1yg0.gif
http://stats.nachspiel.org/char/12/Tynor+Dark.png
Pomogłem ?? daj Reputa ;]

Offline

 

#5 2008-05-23 10:18:20

Ziele

http://i38.tinypic.com/ztvkat.gif

6868784
Zarejestrowany: 2008-03-26
Posty: 462

Re: [8.10]Barman

sprzedaje wino i piwko ??? tak trudno sie domyslic xD


^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^
http://www.pokeplushies.com/images/adoptables/771098.gif
Nakarmisz Mnie ???
www.cs-myp.xt.pl <<<<---- zapraszamy do rejestracjii !!
www.games4you.y0.pl <<<< --------- Również zapraszamy !!!

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.radiotopmusic.pun.pl www.mojeklasy.pun.pl www.ligipilkarskie.pun.pl www.costam.pun.pl www.teenager-hogwart.pun.pl