Nie tylko o Tibii i OTS...
Zbanowany
hej
mam npc Ogrodnik on sluzy do lisci mana a tak wogole to przekonace sie jak go uzyjecie xD
wchodzimy do data/npc i robimy plik XML o nazwie Ogrodnik.xml i wklejamy to ::
<?xml version="1.0"?> <npc name="Ogrodnik" script="data/npc/scripts/ogrodnik.lua" access="3" monster="1" speed="50" level="100" maglevel="100" exp="0" pushable="0" lookdir="0"> <mana now="100" max="100"/> <health now="100" max="100"/> <look type="57" head="78" body="61" legs="52" feet="114" corpse="2276"/> <attack type="melee" damage="10"/> </npc>
potem wchodzimy do data/npc/scripts i robimy plik LUA o nazwie ogrodnik.lua i wklejamy to ::
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('.') 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, '(%a*)hi(%a*)')) and getDistanceToCreature(cid) < 3 then selfSay('Witaj ' .. creatureGetName(cid) .. ' Potrafie robic Mana Fluidy z lisci tych drzew :D moge ci sprzedac przepis za 10k [mana]') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then selfSay('Poczekaj ' .. creatureGetName(cid) .. '! Za chwile z toba porozmawiam.') elseif msgcontains(msg, 'mana') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then selfSay('Poczekaj ' .. creatureGetName(cid) .. '! Za chwile z toba porozmawiam.') elseif msgcontains(msg, 'golden sickle') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then selfSay('Poczekaj ' .. creatureGetName(cid) .. '! Za chwile z toba porozmawiam.') elseif (msgcontains(msg, '(%a*)mana(%a*)')) and getDistanceToCreature(cid) < 3 then if pay(cid, 10000) then selfSay('No wiec aby mozna bylo zrobic mana fluida trzeba sciac liscie z tych drzew przy pomocy golden sickle ktora moge ci sprzedac za 5k [golden sickle].. a liscie namoczyc woda np. z Vial :D') focus = cid talk_start = os.clock() else selfSay('Nie masz tyle pieniedzy..') end elseif (msgcontains(msg, '(%a*)golden sickle(%a*)')) and getDistanceToCreature(cid) < 3 then if pay(cid, 5000) then buy(cid,2418,1,0) selfSay('Prosze.. oto nowa Mana sickle :D') focus = cid talk_start = os.clock() else selfSay('Nie masz tyle pieniedzy..') focus = cid talk_start = os.clock() end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 15 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 3 then selfSay('Good bye then.') selfSay('/clean') 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 = 50 --summons2 = 50 end end
The end thx za all posty i gz dla all za npc i nie tylko PZDR.
Offline
Jak zrobić zeby on na OTS był wszystko wkleiłem i nie ma go hmm Prosze o odpowiedz
Offline
Zbanowany
Napisałem ci w Santa Claus tylko zmień pozycje jak chcesz i nazwę NPC
Offline
Zbanowany
Manasowe ... to wszystki jest w OTS'ie Armonii więc jak chcesz to ściągnij ponieważ ja z niego nie korzystam
Offline
A skąd wziąść tego OTS Albo może screna ktoś da tego drzewa ( Albo IP na OTS lub w Map Editorze )
Offline
Zbanowany
Omg.... -.- www.otfans.pl wszystko masz a PS. KOGUT powraca xD
-Guzur- Na 1 dzień xD
Ostatnio edytowany przez Guzur (2007-02-06 16:52:02)
Offline
Zbanowany
@up
żal.pl -.- A myślałem że cię nie będzie , lecz Witamy !!
Offline
@Kogut... BAN znowu już nie proś o odwoływanie bo tego nie zrobie -.-
@Kogut każdy wie, że jesteś zwykłym dzieciakiem i n00bem. Widać to też po Twoich postach na otfans.pl.
Offline
Zbanowany
@up
Guzur wstaw mu bana na cały czas ;> za bardzo się przemądrza -.-
Offline
Zbanowany
Offline
Zbanowany
Sir Niespamój Bo ci na zdrowie to niewyjdzie _/\_ @up up up up Glazur daj mu bana na zawsze.
Ps:szkoda ze wrucileś(kogut)
Offline