Tibia Forum
Forum o Tibii.
FAQ
Szukaj
Rejestracja
Profil
Użytkownicy
Grupy
Galerie
Zaloguj się, by sprawdzić wiadomości
Zaloguj
Forum Tibia Forum Strona Główna
->
Skrypty do OTS
Napisz odpowiedź
Użytkownik
Temat
Treść wiadomości
Emotikony
Więcej Ikon
Kolor:
Domyślny
Ciemnoczerwony
Czerwony
Pomarańćzowy
Brązowy
Żółty
Zielony
Oliwkowy
Błękitny
Niebieski
Ciemnoniebieski
Purpurowy
Fioletowy
Biały
Czarny
Rozmiar:
Minimalny
Mały
Normalny
Duży
Ogromny
Zamknij Tagi
Opcje
HTML:
TAK
BBCode
:
TAK
Uśmieszki:
TAK
Wyłącz HTML w tym poście
Wyłącz BBCode w tym poście
Wyłącz Uśmieszki w tym poście
Kod potwierdzający: *
Wszystkie czasy w strefie EET (Europa)
Skocz do:
Wybierz forum
Zasady Forum
----------------
Regulamin
Ogólne
----------------
Niusy
O wszystkim i o niczym
Pomoc w Tibii
Przygody
Poradniki
Open Tibia Server
----------------
Mapy
Skrypty do OTS
Prywatne OTServery
Problemy Techniczne
Zdjęcia
----------------
Artyści
Polowania
Zabawne
Inne
Fotomontaże
Handel
----------------
Przedmioty
Postacie
Przegląd tematu
Autor
Wiadomość
Exkalibur
Wysłany: Czw 18:36, 28 Gru 2006
Temat postu:
Ale down z ciebie nie umiesz sam pisać skryptów to na kij ściągasz od innych niewieżycie???????
<a hreff="http://www.mariusz.fastnet.pl/forum/viewtopic.php?t=21">Zobacz NooBie</a>
Xarin
Wysłany: Śro 16:30, 08 Lis 2006
Temat postu: Obsidian Knife
[/font]daje wam Skrypt na Obsidian Knife :
Wejdz w data/actions/scripts i zrób nowy plik o nazwie obsidian.lua i umieść w nim to :
Cytat:
function onUse(cid, item, frompos, item2, topos)
pos = getPlayerPosition(cid)
--minosy-------
if item2.itemid == 2830 or item2.itemid == 2866 or item2.itemid == 2871 or item2.itemid == 2876 then
rand = math.random(1, 5)
if rand == 1 then
doPlayerAddItem(cid,5878,1)
doSendMagicEffect(pos, 14)
else
doSendMagicEffect(topos,2)
end
if item2.itemid == 2876 then
doTransformItem(item2.uid,2877)
elseif item2.itemid == 2866 then
doTransformItem(item2.uid,2867)
elseif item2.itemid == 2871 then
doTransformItem(item2.uid,2872)
else
doTransformItem(item2.uid,2831)
end
---zielony smok----
elseif item2.itemid == 3104 then
rand = math.random(1, 5)
if rand == 1 then
doPlayerAddItem(cid,5877,1)
doSendMagicEffect(pos, 14)
else
doSendMagicEffect(topos,2)
end
doTransformItem(item2.uid,2845)
----drgon lord ---
elseif item2.itemid == 2881 then
rand = math.random(1, 5)
if rand == 1 then
doPlayerAddItem(cid,5948,1)
doSendMagicEffect(pos, 14)
else
doSendMagicEffect(topos,2)
end
doTransformItem(item2.uid,2882)
---Lizardy---
elseif item2.itemid == 4256 or item2.itemid == 4259 or item2.itemid == 4262 then
rand = math.random(1, 5)
if rand == 1 then
doPlayerAddItem(cid,5876,1)
doSendMagicEffect(pos, 14)
else
doSendMagicEffect(topos,2)
end
if item2.itemid == 4256 then
doTransformItem(item2.uid,4257)
elseif item2.itemid == 4259 then
doTransformItem(item2.uid,4260)
else
doTransformItem(item2.uid,4263)
end
---koniec---
else
return 1
end
return 1
end
Jak to zrobisz ,dodaj do actions.xml (data/actions) Linijke:
Cytat:
<action itemid="5908" script="obsidian.lua" />
Obsidian Knife MOzna Wyczarowac GM ( ID 5908 )
Dam NPC Który skupuje skurki
wejdz w data/npc/script i zrub plik o nazwie trafs.lua i wklej tam 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) .. '! I buy trafs and sell Obsidian knife.')
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, 'lizard leather') then
sell(cid,5876,1,300)
elseif msgcontains(msg, 'green dragon leathers') then
sell(cid,5877,1,200)
elseif msgcontains(msg, 'minotaur leather') then
sell(cid,5878,1,150)
elseif msgcontains(msg, 'giant spider silk') then
sell(cid,5879,1,500)
elseif msgcontains(msg, 'iron ore') then
sell(cid,5880,1,100)
elseif msgcontains(msg, 'lizard scale') then
sell(cid,5881,1,350)
elseif msgcontains(msg, 'red dragon scale') then
sell(cid,5882,1,600)
elseif msgcontains(msg, 'ape fur') then
sell(cid,5883,1,700)
elseif msgcontains(msg, 'chicken feather') then
sell(cid,5890,1,100)
elseif msgcontains(msg, 'behemoth fang') then
sell(cid,5893,1,1000)
elseif msgcontains(msg, 'bat wing') then
sell(cid,5894,1,70)
elseif msgcontains(msg, 'fish fin') then
sell(cid,5895,1,800)
elseif msgcontains(msg, 'bear paw') then
sell(cid,5896,1,150)
elseif msgcontains(msg, 'wolf paw') then
sell(cid,5897,1,50)
elseif msgcontains(msg, 'beholder eye') then
sell(cid,5898,1,250)
elseif msgcontains(msg, 'honaycomb') then
sell(cid,5902,1,200)
elseif msgcontains(msg, 'vampire dust') then
sell(cid,5905,1,550)
elseif msgcontains(msg, 'white piece of cloth') then
sell(cid,5909,1,250)
elseif msgcontains(msg, 'green piece of cloth') then
sell(cid,5910,1,300)
elseif msgcontains(msg, 'red piece of cloth') then
sell(cid,5911,1,350)
elseif msgcontains(msg, 'blue piece of cloth') then
sell(cid,5912,1,400)
elseif msgcontains(msg, 'brown piece of cloth') then
sell(cid,5913,1,150)
elseif msgcontains(msg, 'yellow piece of cloth') then
sell(cid,5914,1,500)
elseif msgcontains(msg, 'dragon claw') then
sell(cid,5919,1,500)
elseif msgcontains(msg, 'green dragon scale') then
sell(cid,5920,1,500)
elseif msgcontains(msg, 'heaven blessom') then
sell(cid,5921,1,250)
elseif msgcontains(msg, 'holy orchid') then
sell(cid,5922,1,900)
elseif msgcontains(msg, 'behemoth claw') then
sell(cid,5930,1,1200)
elseif msgcontains(msg, 'red dragon leather') then
sell(cid,5948,1,650)
elseif msgcontains(msg, 'demon horn') then
sell(cid,5954,1,2000)
elseif msgcontains(msg, 'obsidian knife') then
buy(cid,5908,1,10000)
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) > 3 then
selfSay('Good bye then.')
focus = 0
end
end
--nothing special has happened
--but perhaps we want to walk around a bit?
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,50)
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)
end
end
Potem Zrob plik nazwij go Jack Sparrow.xml wklej go do (data/npc) :
Cytat:
<?xml version="1.0"?>
<npc name="Jack Sparrow" script="data/npc/scripts/trafs.lua" access="3">
<look type="151" head="0" body="114" legs="76" feet="57" addon="3" know="3"/>
</npc>
Koments PLSS
fora.pl
- załóż własne forum dyskusyjne za darmo
Powered by
phpBB
© 2001, 2002 phpBB Group
Arthur Theme
Regulamin