Nie tylko o Tibii i OTS...
Zbanowany
Hej!.
Wchodzimy do data/npc i robimy plik XML o nazwie Rings.xml i wklejamy to ::
<?xml version="1.0"?>
<npc name="Rings" script="data/npc/scripts/rings.lua" access="3">
<look type="131" head="57" body="57" legs="57" feet="57"/>
</npc>
potem wchodzimy do data/npc/scripts i robimy plik LUA o nazwie rings.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('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) .. '! I buy energy rings (1k), time rings (1k), sword rings (750gp), club rings (500gp), axe rings (500gp), dwarven rings (100gp), ring of healings (1,5k), life rings (750gp), might rings (1k), stealth rings (2k), power rings (200gp) I am alsobuying Stone skin amulets (2,5k)')
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, 'energy ring') then
sell(cid,2167,1,1000)
elseif msgcontains(msg, 'time ring') then
sell(cid,2169,1,1000)
elseif msgcontains(msg, 'sword ring') then
sell(cid,2207,1,750)
elseif msgcontains(msg, 'club ring') then
sell(cid,2209,1,500)
elseif msgcontains(msg, 'axe ring') then
sell(cid,2208,1,500)
elseif msgcontains(msg, 'dwarven ring') then
sell(cid,2213,1,100)
elseif msgcontains(msg, 'ring of healing') then
sell(cid,2214,1,1500)
elseif msgcontains(msg, 'life ring') then
sell(cid,2168,1,750)
elseif msgcontains(msg, 'might ring') then
sell(cid,2164,1,1000)
elseif msgcontains(msg, 'stealth ring') then
sell(cid,2165,1,2000)
elseif msgcontains(msg, 'power ring') then
sell(cid,2166,1,200)
elseif msgcontains(msg, 'stone skin amulet') then
sell(cid,2197,1,3000)
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) > 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.')
focus = 0
end
end
end
mam nadzieje ze sie przyda ;p
Ostatnio edytowany przez SakerZiom (2006-11-30 15:34:15)
Offline
Muszę Cię nauczyć robić ramki bo widze że z tym masz kłopoty xD
Na początku piszesz zdanie, które chcesz umieścić w ramce np. "Forum www.TiBiA11.Pun.Pl".
Następnie zaznaczasz całość tekstu.
I jak podświetlony masz tekst klikasz: #
Całość wygląda tak:
Forum www.TiBiA11.Pun.Pl
Offline
Zbanowany
dzieki ziomek xD ale skrypty mogą być ??
Offline
Skrypty Good tylko na Forum mało ludzi ;/ Jakbyś miał jak to próbuj je gdzieś zareklamować ;D
Jeżeli będziesz tak dalej uczestniczył na tym forum to dam Ci Modka i umieszcze Twojego OTS'a na tym forum jako oficjalny server naszego forum
Offline
Zbanowany
oki xD hehe loozik i GZ dla twojego forum xD bardzo mi sie podoba ;p
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 i nazwe NPC a wklejać tak samo.
Offline
Dlaczego jak kupuje u tego npc to wszystko ma 1 charges. Mimo że zmieniałem w items.xml to dalej jest 1.
Offline
Rozumiem, że nie uzyskam tu odpowiedzi.
Offline
Ściągnij innego OTS może masz zrypane items.xml.
Myślałem, że sam do tego dojdziesz.
Offline
Ja miałem to samo z tymi pierścionkami ale nie korzystałem z nich i nigdy nie próbowałem tego naprawiać.
Poszukaj w config.lua może będzie jakaś linijka odpowiadająca za to lub w /data jakiś folder z itemami np. pierścionkami.
Offline
Dobra w sumie racja, nie bardzo się tego używa.
P.S. Fajnie, że grasz na Candii, ja też
Offline
Sułtan łechtaczek
Może mi sie zdaje ale wygląda ten npc jak z illusion bo go testowałem ale może sie myle
Jeśli się myle to przepraszam
Offline
ALE CO Z TEGO!? PRZECIEŻ NIE ZAMIESZCZAMY TU TYLKO SWOICH SKRYPTÓW!
Sory, że się tak uniosłem ale wkurza mnie to
Offline