#1 2008-01-17 19:28:11

dark camo

http://i38.tinypic.com/19pb0n.gif

7111818
Skąd: Trachy
Zarejestrowany: 2007-12-09
Posty: 19
Nick: Heo
Profesja: DBworld
Server: 100

Kto umie zrobic NPC Sprzedawajcy Czary

Bardzo Prosze o skrypt do NPC sprzedawajcy czary!PLX

Ostatnio edytowany przez dark camo (2008-01-17 20:22:34)


http://www.mFoto.pl/uploads/1769/img_14516_normal_0bba9.gif
http://www.mFoto.pl/uploads/1769/img_14781_normal.gif_6b199.jpg
http://www.mFoto.pl/uploads/1769/img_14529_normal.gif_1f60a.png

Offline

 

#2 2008-01-17 22:27:39

cVS

http://i34.tinypic.com/28ko5qb.gif

Zarejestrowany: 2007-12-25
Posty: 52
Nick: Dragg Blooder
Profesja: Nerana
Server: 21

Re: Kto umie zrobic NPC Sprzedawajcy Czary

jest ten sam NPC co u niego różdżki kupujesz, i runy... tyle ze musisz mieć w config.lua zeby Ci kupował czary;P


"Ja Tam Jeżdżę Swoim Tempem"
http://img.userbars.pl/126/25135.png
http://img.userbars.pl/121/24170.jpg
http://www.otofotki.pl/obrazki/wqdz690429546a.GIF Piszę poprawnie po polsku.

Offline

 

#3 2008-01-18 12:29:24

dark camo

http://i38.tinypic.com/19pb0n.gif

7111818
Skąd: Trachy
Zarejestrowany: 2007-12-09
Posty: 19
Nick: Heo
Profesja: DBworld
Server: 100

Re: Kto umie zrobic NPC Sprzedawajcy Czary

a powesz jak ustawic?


http://www.mFoto.pl/uploads/1769/img_14516_normal_0bba9.gif
http://www.mFoto.pl/uploads/1769/img_14781_normal.gif_6b199.jpg
http://www.mFoto.pl/uploads/1769/img_14529_normal.gif_1f60a.png

Offline

 

#4 2008-01-18 12:49:48

JaroSS

http://i33.tinypic.com/21bk4jn.jpg

435840
Zarejestrowany: 2007-12-28
Posty: 161

Re: Kto umie zrobic NPC Sprzedawajcy Czary

Masz npc np:

Kod:

<?xml version="1.0"?>

<npc name="Malak" script="data/npc/scripts/runes.lua" access="3" lookdir="1">
          <health now="1000" max="1000"/>
<look type="130" head="132" body="116" legs="116" feet="76"/>
</npc>

No to po 1 w npc musisz mieć data/npc/scripts/runes.lua<-----------szukasz tego i w tym powinno byc :

Kod:

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)
            local msg = string.lower(msg)

            if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 4 then
                      selfSay('Hello ' .. creatureGetName(cid) .. '! I sell runes, wands and rods.')
                      selfSay('Focus before greeting: '.. focus ..'.')
                      focus = cid
                      selfSay('Focus after greeting: '.. focus ..'.')
                      talk_start = os.clock()

            elseif msgcontains(msg, 'hi') and focus ~= cid and getDistanceToCreature(cid) < 4 then
                      selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

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

                    if msgcontains(msg, 'runes') then
                              selfSay('I sell hmms (50gps), uhs (150gps), gfbs (100gps), explosions (150gps), sds (200gps), Mana Runes (20k) and blank runes (5gps).')
                    elseif msgcontains(msg, 'wands') then
                              selfSay('I sell wand of inferno (15k), plague (5k), cosmic energy (10k), vortex (500gp) and dragonbreath (1k).')
                    elseif msgcontains(msg, 'rods') then
                              selfSay('I sell quagmire (10k), snakebite (500gp), tempest (15k), volcanic (5k) and moonlight rod (1k).')

                    elseif msgcontains(msg, 'inferno') then
                              buy(cid,2187,1,15000)
                    elseif msgcontains(msg, 'plague') then
                              buy(cid,2188,1,5000)
                    elseif msgcontains(msg, 'cosmic energy') then
                              buy(cid,2189,1,10000)
                    elseif msgcontains(msg, 'vortex') then
                              buy(cid,2190,1,500)
                    elseif msgcontains(msg, 'dragonbreath') then
                              buy(cid,2191,1,1000)

                    elseif msgcontains(msg, 'quagmire') then
                              buy(cid,2181,1,10000)
                    elseif msgcontains(msg, 'snakebite') then
                              buy(cid,2182,1,500)
                    elseif msgcontains(msg, 'tempest') then
                              buy(cid,2183,1,15000)
                    elseif msgcontains(msg, 'volcanic') then
                              buy(cid,2185,1,5000)
                    elseif msgcontains(msg, 'moonlight') then
                              buy(cid,2186,1,1000)

                    elseif msgcontains(msg, 'hmm') then
                              buy(cid,2311,getCount(msg),40)

                    elseif msgcontains(msg, '100 mana rune') then
                              buy(cid,2281,10,20000)
                    elseif msgcontains(msg, '10 mana rune') then
                              buy(cid,2281,10,2000)                              
                    elseif msgcontains(msg, 'mana rune') then
                              buy(cid,2281,1,200)

                    elseif msgcontains(msg, '100 uh') then
                              buy(cid,2273,100,4000)
                    elseif msgcontains(msg, '10 uh') then
                              buy(cid,2273,10,400)
                    elseif msgcontains(msg, 'uh') then
                              buy(cid,2273,1,40)

                    elseif msgcontains(msg, '100 gfb') then
                              buy(cid,2304,100,2000)
                    elseif msgcontains(msg, '10 gfb') then
                              buy(cid,2304,10,200)
                    elseif msgcontains(msg, 'gfb') then
                              buy(cid,2304,3,60)

                    
                    elseif msgcontains(msg, '100 explosion') then
                              buy(cid,2313,100,2000)
                    elseif msgcontains(msg, '10 explosion') then
                              buy(cid,2313,10,200)
                    elseif msgcontains(msg, 'explosion') then
                              buy(cid,2313,3,60)

                    
                    elseif msgcontains(msg, '100 sd') then
                              buy(cid,2268,100,9000)
                    elseif msgcontains(msg, '10 sd') then
                              buy(cid,2268,10,900)
                    elseif msgcontains(msg, 'sd') then
                              buy(cid,2268,1,90)

                    elseif msgcontains(msg, 'blank') then
                              buy(cid,2260,100,5)

                    elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then
                              selfSay('Good bye, ' .. 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('Next Please...')
                      end
                              focus = 0
            end
           if focus ~= 0 then
                     if getDistanceToCreature(focus) > 5 then
                               selfSay('Good bye then.')
                               focus = 0
                     end
           end
end

i np blank runa którą masz podaną wyzej:

Kod:

                    elseif msgcontains(msg, 'blank') then<----(msg,'blank')<----to za pomocą jakiego słowa ją kupisz może np. być (msg,'nic') i w tedy w rozmowie z npc piszesz buy nic i kupujsz blank rune
(cid,2260<----to jest ip runy,100,<---a to w jakiej ilości ma byc sprzedawana,5<--ta ostatnia liczba to cena w jakiej ma byc sprzedawana.

Tłumaczenie by JaroSS

Ostatnio edytowany przez JaroSS (2008-01-18 12:51:53)

Offline

 

#5 2008-01-18 17:26:48

dark camo

http://i38.tinypic.com/19pb0n.gif

7111818
Skąd: Trachy
Zarejestrowany: 2007-12-09
Posty: 19
Nick: Heo
Profesja: DBworld
Server: 100

Re: Kto umie zrobic NPC Sprzedawajcy Czary

Dzienki:)


http://www.mFoto.pl/uploads/1769/img_14516_normal_0bba9.gif
http://www.mFoto.pl/uploads/1769/img_14781_normal.gif_6b199.jpg
http://www.mFoto.pl/uploads/1769/img_14529_normal.gif_1f60a.png

Offline

 

#6 2008-01-18 17:34:05

dark camo

http://i38.tinypic.com/19pb0n.gif

7111818
Skąd: Trachy
Zarejestrowany: 2007-12-09
Posty: 19
Nick: Heo
Profesja: DBworld
Server: 100

Re: Kto umie zrobic NPC Sprzedawajcy Czary

Ja nie umie tego zrobic ja jestem żółty w tych sprawach;/musial bym miec juz gotowy skrypt:P

Ostatnio edytowany przez dark camo (2008-01-18 17:40:04)


http://www.mFoto.pl/uploads/1769/img_14516_normal_0bba9.gif
http://www.mFoto.pl/uploads/1769/img_14781_normal.gif_6b199.jpg
http://www.mFoto.pl/uploads/1769/img_14529_normal.gif_1f60a.png

Offline

 

Stopka forum

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

[ Generated in 0.022 seconds, 7 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
przegrywanie kaset vhs łódź