![Forum](http://3hforumklasowe.ovh.org/images/signatures/86141147644a789acb8cd1.png) |
Tibia Forum serwisu Tibiafans
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Vepe
Dołączył: 08 Sie 2006
Posty: 30
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Szczecin
|
Wysłany: Śro 9:59, 09 Sie 2006 Temat postu: Diller npc |
|
|
hmm.. jest to skrypt z dillerem narkotykow sprzedaje ecstaze i marysie ![Razz](http://picsrv.fora.pl/images/smiles/icon_razz.gif)
sa tu takie ale wystawiam sowjego skrypta all by me
Wienc wchodzimy w data\\npc Twozymy tam Diller Narkotykow.xml
Otwieramym tego Diller Narkotykow.xml
Wklejamy tam
<?xml version="1.0"?>
<npc name="Diller narkotykow" script="data/npc/scripts/Narkotyki.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="128" head="81" body="98" legs="45" feet="96"/>
</npc>
Potem ... wchodzimy w data\\npc\\scripts
twozymy Narkotyki.lua
Wklejamy tam :
-- the id of the creature we are attacking, following, etc.
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('no tak Spierdalaj.')
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('Siema ' .. creatureGetName(cid) .. '! Sprzedaje narkotyki narazie mam na sprzedaz marysie i ecstaze napisz offer to zobaczysz po ile narkotyki sprzedaje .')
focus = cid
talk_start = os.clock()
end
if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Czekaj pogadam za chwile narazie mam innego klijenta.')
end
if msgcontains(msg, 'offer') and focus == cid then
selfSay('Sprzedaje Ecstaze (200gps) i Marysie (300gps).')
talk_start = os.clock()
end
if msgcontains(msg, 'marysia') and focus == cid then
buy(cid,3067,1,300)
talk_start = os.clock()
end
if msgcontains(msg, 'ecstaza') and focus == cid then
buy(cid,3673,1,200)
talk_start = os.clock()
end
if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
selfSay('Nara, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastempny Prosze...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Narazie ale wroc kiedys .')
focus = 0
end
end
end
no i na koncu wchodzimy w data\\world\\npc
dodajemy tam linijke :
<npc name="Diller narkotykow" x="153" y="32" z="7"/>
w ostatnim punkcie wpiszcie inne dane w 1."x" 2."y" 3."z"
W 100% robilem sam npc tylko z jednym narkotrykiem mialem problem Ecstasy
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
![](http://picsrv.fora.pl/subBlack/images/spacer.gif) |
|
![](http://picsrv.fora.pl/subSilver/images/spacer.gif) |
Ziomex
Administrator
Dołączył: 26 Cze 2006
Posty: 17
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Rybnik
|
Wysłany: Śro 10:21, 09 Sie 2006 Temat postu: |
|
|
Widzialem taki skrypt na [link widoczny dla zalogowanych] ;p
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
![](http://picsrv.fora.pl/subBlack/images/spacer.gif) |
Vepe
Dołączył: 08 Sie 2006
Posty: 30
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Szczecin
|
Wysłany: Śro 10:22, 09 Sie 2006 Temat postu: |
|
|
to dziwne bo zrobilem to sam (no moze pomugl mi muj kuzyn xD)
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
![](http://picsrv.fora.pl/subBlack/images/spacer.gif) |
Ziomex
Administrator
Dołączył: 26 Cze 2006
Posty: 17
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Rybnik
|
Wysłany: Śro 10:24, 09 Sie 2006 Temat postu: |
|
|
Ehh no ale moze ktos tez wpadl na pomysl zeby zrobic taki skrypt ale gz :p
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
![](http://picsrv.fora.pl/subBlack/images/spacer.gif) |
Brock
Administrator
Dołączył: 24 Cze 2006
Posty: 72
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Rybnik
|
Wysłany: Śro 13:34, 09 Sie 2006 Temat postu: |
|
|
Ludzie jak robicie takie coś ajk właśnie kod do NPC to napiszcie do w kodzie np
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
![](http://picsrv.fora.pl/subBlack/images/spacer.gif) |
|
|
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
|