#1 2007-08-27 21:06:29

piotres62

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

Zarejestrowany: 2007-07-27
Posty: 14

[8.0] [NPC] Atter

A więc mam tutaj NPC Atter sprzedaje on różne dziwne itemy ozdobne typu:
-Głłowa hydry
-kilka kolorów magic sulphur
-Fire bug
i takie inne dziwne
data/npc/scripts

ocus = 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 ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I selling obsidian knife,ice cubes,shard,hydra,and sulphur(you can select yellow blue red green and pink),aslo i offer fire bug')
focus = cid
talk_start = os.clock()

if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
end
elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'obsidian') then
buy(cid,5908,1,10000)
elseif msgcontains(msg, 'ice') then
buy(cid,7441,1,500)
elseif msgcontains(msg, 'shard') then
buy(cid,7290,1,3000)
elseif msgcontains(msg, 'hydra') then
buy(cid,7250,1,40000)
elseif msgcontains(msg, 'yellow') then
buy(cid,5904,5,5000)
elseif msgcontains(msg, 'blue') then
buy(cid,5905,5,6000)
elseif msgcontains(msg, 'red') then
buy(cid,5906,5,7000)
elseif msgcontains(msg, 'green') then
buy(cid,7251,5,8000)
elseif msgcontains(msg, 'pink') then
buy(cid,6548,5,8000)
elseif msgcontains(msg, 'fire') then
buy(cid,4568,1,100)

elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Bywaj, ' .. 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 plx...')
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

Teraz tworzymy plik o nazwie Atter.xml w data/npc
a w nim:

<?xml version="1.0"?>

<npc name="Atter" script="data/npc/scripts/rares.lua" access="3" lookdir="1">
<health now="1" max="1"/>
<look type="129" head="95" body="116" legs="121" feet="115"/>
</npc>

Skrypcik nie moj
Testowane jest to na Devlandzie i dziala
Jak by co to prosze o pozytywne ocenkki...


Jak komus pomoglem niech da reputka

Offline

 

#2 2007-08-27 21:18:56

Rotni

http://i38.tinypic.com/2ni1vub.gif

Skąd: Szczecin
Zarejestrowany: 2007-06-26
Posty: 78
Nick: Rotni Knajt
Profesja: Secura
Server: 14 skilluje xd

Re: [8.0] [NPC] Atter

) 8/10 )


http://r3.fodey.com/16459176a016e4b7fb13e6b0c014d3d1e.1.gif
http://mojchuj.ofingo.com/gif.php?id=12088
Pomóż dobić do 100cm.!

Offline

 

#3 2007-08-27 21:25:17

UFOLAZU

http://i37.tinypic.com/sb1sbd.jpg

Skąd: Zielona Góra
Zarejestrowany: 2007-07-27
Posty: 172
Nick: zgadnij nie uwierzysz na pewno
Profesja: zgaduj se...
Server: 256
WWW

Re: [8.0] [NPC] Atter

e takie sobie 6+/10


________________________________________
http://gwnoland.miniville.fr/    wlazcie pomuzcie rozbudowac miasto wystarczy ze raz dzienie wejdziesz a duzo pomozesz temu miasteczku  =]
http://img165.imageshack.us/img165/8341/ufolazuwojownikzu9.png

Offline

 

#4 2007-08-28 10:15:12

Tenktowlasnieja

http://i38.tinypic.com/2ni1vub.gif

status 8560857
8560857
Call me!
Skąd: Warszawa
Zarejestrowany: 2007-07-05
Posty: 78
Nick: Lord karolak
Profesja: celesta
Server: 203

Offline

 

#5 2008-03-08 17:11:00

 DaVo

http://i35.tinypic.com/71u5wo.gif

Zarejestrowany: 2008-02-03
Posty: 1053
WWW

Re: [8.0] [NPC] Atter

9\10 ;]


<<

http://img835.imageshack.us/img835/1563/franklampard.png

Offline

 

Stopka forum

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

[ Generated in 0.017 seconds, 7 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
badania słuchu lublin, protetyka słuchu