Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna
FAQ Szukaj Użytkownicy Grupy Profil Zaloguj się, by sprawdzić wiadomości
Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna  Zaloguj  Rejestracja
All amulety 7.6

 
Napisz nowy temat   Odpowiedz do tematu    Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna -> Publikacje do OTS'ów
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Adminjacek
Administrator
Administrator



Dołączył: 28 Paź 2006
Posty: 58
Przeczytał: 0 tematów

Ostrzeżeń: 0/10

PostWysłany: Czw 21:44, 09 Lis 2006    Temat postu: All amulety 7.6

Zmień zawartość aol.lua na to:

Cytat:

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('Hello ' .. creatureGetName(cid) .. '! Hi i sell aol (10k), ancient amulet (1.6k), broken amulet (20k), bronze amulet (100gps), bronzen necklace (300gps), crystal necklace (250gps), dragon necklace (400gps), garlic necklace (450gps), golden amulet (3k), platinum amulet (3.5k), protection amulet (300gps), elven amulet (500gps), ruby necklace (2k), scarab amulet (1.3k), scarf (500gps), silver amulet (300gps), silver necklace (1k), star amulet (1.2k), stone skin amulet (3k), strange symbol (200gps), strange talisman (350gps) and wolves teeth chain (50gps).')
selfLook(cid)
focus = cid
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, 'amulets') then
selfSay('I sell aol (10k), ancient amulet (1.6k), broken amulet (20k), bronze amulet (100gps), bronzen necklace (300gps), crystal necklace (250gps), dragon necklace (400gps), garlic necklace (450gps), golden amulet (3k), platinum amulet (3.5k), protection amulet (300gps), elven amulet (500gps), ruby necklace (2k), scarab amulet (1.3k), scarf (500gps), silver amulet (300gps), silver necklace (1k), star amulet (1.2k), stone skin amulet (3k), strange symbol (200gps), strange talisman (350gps) and wolves teeth chain (50gps).')



elseif msgcontains(msg, 'amulet of loss') or msgcontains(msg, 'aol') then
buy(cid,2173,1,10000)

elseif msgcontains(msg, 'ancient amulet') then
buy(cid,2142,1,1600)

elseif msgcontains(msg, 'broken amulet') then
buy(cid,2196,1,20000)

elseif msgcontains(msg, 'bronze amulet') then
buy(cid,2172,1,100)

elseif msgcontains(msg, 'bronzen necklace') then
buy(cid,2126,1,300)

elseif msgcontains(msg, 'crystal necklace') then
buy(cid,2125,15,250)

elseif msgcontains(msg, 'dragon necklace') then
buy(cid,2201,15,400)

elseif msgcontains(msg, 'garlic necklace') then
buy(cid,2199,10,450)

elseif msgcontains(msg, 'golden amulet') then
buy(cid,2130,6,3000)

elseif msgcontains(msg, 'platinum amulet') then
buy(cid,2171,6,3500)

elseif msgcontains(msg, 'protection amulet') then
buy(cid,2200,15,300)

elseif msgcontains(msg, 'elven amulet') then
buy(cid,2198,4,500)

elseif msgcontains(msg, 'ruby necklace') then
buy(cid,2133,5,2000)

elseif msgcontains(msg, 'scarab amulet') then
buy(cid,2135,1,1300)

elseif msgcontains(msg, 'scarf') then
buy(cid,2135,1,500)

elseif msgcontains(msg, 'silver amulet') then
buy(cid,2170,1,300)

elseif msgcontains(msg, 'silver necklace') then
buy(cid,2132,1,1000)

elseif msgcontains(msg, 'star amulet') then
buy(cid,2131,1,1200)

elseif msgcontains(msg, 'stone skin amulet') then
buy(cid,2197,1,3000)

elseif msgcontains(msg, 'strange symbol') then
buy(cid,2319,1,200)

elseif msgcontains(msg, 'strange talisman') then
buy(cid,2161,1,350)

elseif msgcontains(msg, 'wolves teeth chain') then
buy(cid,2129,1,50)
elseif msgcontains(msg, 'bye') 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
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 = 30
--summons2 = 30
end
end


Myślę, że się przyda =].


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum ...::[2e]::...::[2e]::...::[2e]::... Strona Główna -> Publikacje do OTS'ów Wszystkie czasy w strefie CET (Europa)
Strona 1 z 1

 
Skocz do:  
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign
Regulamin