Forum Tibia Strona Główna
FAQ Profil Szukaj Użytkownicy
Grupy

Prywatne Wiadomości

Rejestracja Zaloguj
Galerie
[7.92][NPC] Bp run
Zobacz poprzedni temat | Zobacz następny temat >

Napisz nowy temat Odpowiedz do tematu
Tibia > Skrypty

Autor Wiadomość
Desir
Administrator
Administrator



Dołączył: 14 Cze 2007
Posty: 75
Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Gdańsk

[7.92][NPC] Bp run    

Mam dla was skrypt npc który spszedaje runy w bp w wersji polskiej...(niewidziałem takiego skryptu na forum)
no to zaczynamy :
Tworzymy plik Meler.lua w data/npc
i wpisujemy tu

UWAGA REHOST Z POWODU BLENDU
[link widoczny dla zalogowanych]
Lub tutaj juz poprawiony.



quote:
<?xml version="1.0"?>

<npc name="Meler" script="data/npc/scripts/bp_run.lua" access="3" lookdir="2" autowalk="1">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="134" head="114" body="113" legs="113" feet="113"/>
</npc>


Następnie tworzymy plik bp_run.lua w data/npc/scripts
i wpisujemy tu



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

if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 4 then
selfSay('Siema ' .. creatureGetName(cid) .. '! Selluje bp run (bp runes).')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and focus ~= cid and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! czekaj minute.')

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

if msgcontains(msg, 'backpacks') or msgcontains(msg, 'bp runes') then
selfSay('Selluje bp hmm (20k), bp uh (20k), bp gfb (20k), bp explosion (20k), bp sd (20k), bp mwall(20k).')

elseif msgcontains(msg, 'bp sd') then
buyContainer(cid,2003,2268,100,20000)
elseif msgcontains(msg, 'bp hmm') then
buyContainer(cid,1998,2311,100,20000)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid,2002,2273,100,20000)
elseif msgcontains(msg, 'bp gfb') then
buyContainer(cid,2000,2304,100,20000)
elseif msgcontains(msg, 'bp explosion') or msgcontains(msg, 'bp explo') then
buyContainer(cid,2001,2313,100,20000)
elseif msgcontains(msg, 'bp mwall') then
buyContainer(cid,1999,2293,100,20000)

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



Mam nadzieję, że się wam to pszyda Wink


Post został pochwalony 0 razy
Post Nie 1:28, 08 Lip 2007
 Zobacz profil autora
Klimko
Go



Dołączył: 08 Lip 2007
Posty: 9
Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Katowice

   

oO całkiem niezły skrypt działa znakomicie bez zadnych problemow Gz 10/10 Smile

Post został pochwalony 0 razy
Post Nie 1:33, 08 Lip 2007
 Zobacz profil autora
Dabek
Hisayuki



Dołączył: 08 Lip 2007
Posty: 14
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

   

skrypty to tam sa ale na runy poco

Post został pochwalony 0 razy
Post Nie 13:53, 08 Lip 2007
 Zobacz profil autora

Napisz nowy temat Odpowiedz do tematu
Forum Jump:
Skocz do:  

Wszystkie czasy w strefie EET (Europa).
Obecny czas to Pią 22:38, 19 Kwi 2024
  Wyświetl posty z ostatnich:      


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB: © 2001, 2002 phpBB Group
Template created by The Fathom
Based on template of Nick Mahon
Regulamin