Predorio OTS - Oficjalne Forum

Predorio OTS - Oficjalne Forum

  • Nie jesteś zalogowany.
  • Polecamy: Moda

Ogłoszenie

UWAGA!! OTS JUZ CHODZI NA IP: PREDORIO.NO-IP.INFO ACC MAKER NA PASSACH 111111/TIBIA

#1 2007-05-16 17:44:51

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Skrypty.

Tutaj azmieszczajcie swoje propozycje skryptów do naszego otsa. Ja moze zaczne:

Zrobiłem skrypt na swój OTS i przy okazji go udostępnie. Może jest marny ale myśle, że do questów przydatne.
Snake destroyer (opis: kiedy użyjemy runki na głowie smoka, ona znika i pozostają po niej kamienie, które po minucie znowu zamieniają się w głowe, lecz nas teleportuje do wybranego miejsca) [badane na DeadTouch 2.2]:
tworzymy plik snake_destroyer.LUA, a w nim wpisujemy:


Kod:
function onUse(cid, item, frompos, item2, topos)
       
    if item2.itemid == 3712 then
        doTransformItem(item2.uid,3648)
        doDecayItem(item2.uid)
                    doRemoveItem(item.uid, 1)
                  topos = {x=297, y=298, z=7}
                  doTeleportThing(cid,topos)
        else
            doPlayerSendCancel(cid, "You cannot use that object.")
        end
    return 1
endTo co na czerwono należy zmienić. Jedna uwaga: po użyciu runki na głowie, runka się niszczy ! (Można zmienić runke na młotek )

actions.xml:


Kod:
<action itemid="2298" script="snake_destroyer.lua"  />Myślę, że się przydało

@EDIT
Jeszcze jak chcecie to macie tu aby kamyki po minucie zamieniły się w głowę. Otwórzcie items.XML i znajdźcie linike:

Kod:
</item>
<item id="3648" name="stone">
</item>Zamieńcie na:

Kod:
</item>
<item id="3648" name="stone">
    <attribute key="decayTo" value="2298"/>
    <attribute key="duration" value="60"/>
</item>

link do oryginalnego tematu http://www.forum.tibia.org.pl/showthread.php?t=174760
Szukam dalej...
///Pozdrawiam Gremlin


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#2 2007-05-16 17:59:43

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

Sorrka ze pisze next posta ale gdybym edytowal to ten pierwszy post bylby zadlugi wiec do rzeczy:

[7.9] [Talkactions] Karanie za przeklinanie

Skrypt nie mój !

Mamy dwa ostrzeżenia w których zabiera hp,trzecie ostrzeżenie to teleport do sali karnej.
data/talkactions/scripts/ tworzymy cenzura.lua



Cytat:
-- Zakaz przeklinania v.1.0 by Ersiu --
function onSay(cid, words, param)

local salakarna = {x=800, y=800, z=8} -- pozycja sali w ktorej odbywamy kare.
local warnings = getPlayerStorageValue(cid, 9999)

if words == "!opusc" then
if warnings > 3 then
local odsiadka = getPlayerStorageValue(cid, 9998) + 3600
if(os.time() >= odsiadka) then
setPlayerStorageValue(cid, 9998, os.time())
doTeleportThing(cid, getPlayerMasterPos(cid))
setPlayerStorageValue(cid, 9999, 0)
else
doPlayerSendTextMessage(cid, 19, "Twoja kara jeszcze niedobiegla konca.")
end
else
doPlayerSendTextMessage(cid, 19, "Nie jestes w sali karnej.")
end
else
if warnings < 3 then
local warnstatus = (warnings+1)
doPlayerSendTextMessage(cid, 19, "Dostales "..warnstatus.." ostrzezenie za przeklinanie.")
setPlayerStorageValue(cid, 9999, warnings+1)
elseif warnings == 3 then
doPlayerSendTextMessage(cid, 19, "To twoje ostatnie ostrzezenie,konczy sie one sala karna.")
doTeleportThing(cid, salakarna)
local warning = getPlayerStorageValue(cid, 9998)
setPlayerStorageValue(cid, 9998, warning+3600)
end
end
end


w data/talkactions/talkactions.xml dopisujemy;


Cytat:
<talkaction words="!opusc" script="cenzura.lua" />
<talkaction words="kurwa" script="cenzura.lua" />
<talkaction words="chuj" script="cenzura.lua" />
<talkaction words="huj" script="cenzura.lua" />
<talkaction words="pizda" script="cenzura.lua" />
<talkaction words="jebana" script="cenzura.lua" />

Link do oryginalnego tematu: http://www.otfans.pl/forums/showthread.php?tid=13642


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#3 2007-05-16 18:13:11

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

Znowu przepraszac nie bede poprostu w tym temacie mozna pisac post pod postem bo bez sensu zeby byly edity i takie dlugie posty wiec:

a więc postanowiłem zrobić teleport zmiany miast jak w rl tibii,zrobiłem go,obsługuje on 6 miast,jest przeznaczony na ots 7.9 lub nowsze.

a więc tak!
wchodzimy w data/movements/scripts i tworzymy "changetemple.lua"
i wypełniamy je kodem:


Kod:

-- RL TIBIA CHANGE TEMPLE SYSTEM BY Azeroth#24[AZI] --
function onStepIn(cid, item, pos)

local pozycjax = {100, 200, 300, 400, 500, 600} -- pozycja "x" kazdego miasta po kolei
local pozycjay = {100, 200, 300, 400, 500, 600} -- pozycja "y" kazdego miasta po kolei
local pozycjaz = {7, 6, 5, 8, 4, 11} -- pozycja "Z" kazdego miasta po kolei
local tpunique = {6621, 6622, 6623, 6624, 6625, 6626} -- uniqueid teleportu kazde miasto po koeli
local cityname = {miasto1, miasto2, miasto3, miasto4, miasto5, miasto6} -- uniqueid teleportu kazde miasto po koeli

if item.uid == tpunique[1] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[1]..".")
local newpos = {x=pozycjax[1], y=pozycjay[1], z=pozycjaz[1]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[2] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[2]..".")
local newpos = {x=pozycjax[2], y=pozycjay[2], z=pozycjaz[2]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[3] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[3]..".")
local newpos = {x=pozycjax[3], y=pozycjay[3], z=pozycjaz[3]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[4] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[4]..".")
local newpos = {x=pozycjax[4], y=pozycjay[4], z=pozycjaz[4]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[5] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[5]..".")
local newpos = {x=pozycjax[5], y=pozycjay[5], z=pozycjaz[5]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[6] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[6]..".")
local newpos = {x=pozycjax[6], y=pozycjay[6], z=pozycjaz[6]}
doPlayerSetMasterPos(cid, newpos)
doSendMagicEffect(topos, 12)
doTeleportThing(cid, newpos)
end
end
i do data/movements/movements.xml dodajemy:


Kod:

<movevent event="StepIn" itemid="1387" script="changetemple.lua" />

Link do oryginalnego tematu: http://www.otfans.pl/forums/showthread.php?tid=11805
///Pozdrawiam Gremlin


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#4 2007-05-16 19:33:12

Trampek

Super Moderator Predorio Team

9510881
Call me!
Skąd: Bieruń Nowy
Zarejestrowany: 2007-05-11
Posty: 43
Punktów :   

Re: Skrypty.

Gremlin napisał:

Znowu przepraszac nie bede poprostu w tym temacie mozna pisac post pod postem bo bez sensu zeby byly edity i takie dlugie posty wiec:

a więc postanowiłem zrobić teleport zmiany miast jak w rl tibii,zrobiłem go,obsługuje on 6 miast,jest przeznaczony na ots 7.9 lub nowsze.

a więc tak!
wchodzimy w data/movements/scripts i tworzymy "changetemple.lua"
i wypełniamy je kodem:


Kod:

-- RL TIBIA CHANGE TEMPLE SYSTEM BY Azeroth#24[AZI] --
function onStepIn(cid, item, pos)

local pozycjax = {100, 200, 300, 400, 500, 600} -- pozycja "x" kazdego miasta po kolei
local pozycjay = {100, 200, 300, 400, 500, 600} -- pozycja "y" kazdego miasta po kolei
local pozycjaz = {7, 6, 5, 8, 4, 11} -- pozycja "Z" kazdego miasta po kolei
local tpunique = {6621, 6622, 6623, 6624, 6625, 6626} -- uniqueid teleportu kazde miasto po koeli
local cityname = {miasto1, miasto2, miasto3, miasto4, miasto5, miasto6} -- uniqueid teleportu kazde miasto po koeli

if item.uid == tpunique[1] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[1]..".")
local newpos = {x=pozycjax[1], y=pozycjay[1], z=pozycjaz[1]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[2] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[2]..".")
local newpos = {x=pozycjax[2], y=pozycjay[2], z=pozycjaz[2]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[3] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[3]..".")
local newpos = {x=pozycjax[3], y=pozycjay[3], z=pozycjaz[3]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[4] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[4]..".")
local newpos = {x=pozycjax[4], y=pozycjay[4], z=pozycjaz[4]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[5] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[5]..".")
local newpos = {x=pozycjax[5], y=pozycjay[5], z=pozycjaz[5]}
doPlayerSetMasterPos(cid, newpos)
doTeleportThing(cid, newpos)
elseif item.uid == tpunique[6] then
doPlayerSendTextMessage(cid, 20, "You now citizen in "..cityname[6]..".")
local newpos = {x=pozycjax[6], y=pozycjay[6], z=pozycjaz[6]}
doPlayerSetMasterPos(cid, newpos)
doSendMagicEffect(topos, 12)
doTeleportThing(cid, newpos)
end
end
i do data/movements/movements.xml dodajemy:


Kod:

<movevent event="StepIn" itemid="1387" script="changetemple.lua" />

Link do oryginalnego tematu: http://www.otfans.pl/forums/showthread.php?tid=11805
///Pozdrawiam Gremlin

Tego skryptu uzyje nawepno na ots bardzo sie nam przyda


http://images20.fotosik.pl/355/2d23397d3ceb1c02.jpg
http://images21.fotosik.pl/300/5a3766edf44928d6.jpg

Offline

 

#5 2007-05-16 20:44:06

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

Key System by GriZzm0.

w actions.xml

Kod:
<!-- START: Doors and keys -->
<action itemid="1209" script="doors_keys/door_locked.lua" />
<action itemid="1210" script="doors_keys/door_closed.lua" />
<action itemid="1211" script="doors_keys/door_open_vertical.lua" />
<action itemid="1212" script="doors_keys/door_locked.lua" />
<action itemid="1213" script="doors_keys/door_closed.lua" />
<action itemid="1214" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1219" script="doors_keys/door_closed.lua" />
<action itemid="1220" script="doors_keys/door_open_vertical.lua" />
<action itemid="1221" script="doors_keys/door_closed.lua" />
<action itemid="1222" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1231" script="doors_keys/door_locked.lua" />
<action itemid="1232" script="doors_keys/door_closed.lua" />
<action itemid="1233" script="doors_keys/door_open_vertical.lua" />
<action itemid="1234" script="doors_keys/door_locked.lua" />
<action itemid="1235" script="doors_keys/door_closed.lua" />
<action itemid="1236" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1237" script="doors_keys/door_closed.lua" />
<action itemid="1238" script="doors_keys/door_open_vertical.lua" />
<action itemid="1239" script="doors_keys/door_closed.lua" />
<action itemid="1240" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1249" script="doors_keys/door_locked.lua" />
<action itemid="1250" script="doors_keys/door_closed.lua" />
<action itemid="1251" script="doors_keys/door_open_vertical.lua" />
<action itemid="1252" script="doors_keys/door_locked.lua" />
<action itemid="1253" script="doors_keys/door_closed.lua" />
<action itemid="1254" script="doors_keys/door_open_horizontal.lua" />
<action itemid="3535" script="doors_keys/door_locked.lua" />
<action itemid="3536" script="doors_keys/door_closed.lua" />
<action itemid="3537" script="doors_keys/door_open_horizontal.lua" />
<action itemid="3538" script="doors_keys/door_closed.lua" />
<action itemid="3539" script="doors_keys/door_open_horizontal.lua" />
<action itemid="3547" script="doors_keys/door_closed.lua" />
<action itemid="3548" script="doors_keys/door_open_vertical.lua" />
<action itemid="3544" script="doors_keys/door_locked.lua" />
<action itemid="3545" script="doors_keys/door_closed.lua" />
<action itemid="3546" script="doors_keys/door_open_vertical.lua" />
<action itemid="4913" script="doors_keys/door_locked.lua" />
<action itemid="4914" script="doors_keys/door_closed.lua" />
<action itemid="4915" script="doors_keys/door_open_vertical.lua" />
<action itemid="4916" script="doors_keys/door_locked.lua" />
<action itemid="4917" script="doors_keys/door_closed.lua" />
<action itemid="4918" script="doors_keys/door_open_horizontal.lua" />
<action itemid="5082" script="doors_keys/door_closed.lua" />
<action itemid="5083" script="doors_keys/door_open_horizontal.lua" />
<action itemid="5084" script="doors_keys/door_closed.lua" />
<action itemid="5085" script="doors_keys/door_open_vertical.lua" />

<action itemid="2086" script="doors_keys/key.lua" />
<action itemid="2087" script="doors_keys/key.lua" />
<action itemid="2088" script="doors_keys/key.lua" />
<action itemid="2089" script="doors_keys/key.lua" />
<action itemid="2090" script="doors_keys/key.lua" />
<action itemid="2091" script="doors_keys/key.lua" />
<action itemid="2092" script="doors_keys/key.lua" />
<!-- END: Doors and keys -->
w data/actions/scripts: Door_closed.lua

Kod:
-- Door_closed.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doTransformItem(item.uid,item.itemid+1)
return 1
end

w data/actions/scripts: Door_locked.lua

Kod:
-- Door_locked.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doPlayerSendTextMessage(cid,22,"It is locked.")
return 1
end

w data/actions/scripts: Door_open_vertical.lua

Kod:
-- Door_open_vertical.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doorpos = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}
getplayer = getThingfromPos(doorpos)
if getplayer.itemid > 0 then
npos = {x=frompos.x+1, y=frompos.y, z=frompos.z}
doTeleportThing(getplayer.uid,npos)
end
doTransformItem(item.uid,item.itemid-1)
return 1
end

w data/actions/scripts: Door_open_horizontal.lua

Kod:
-- Door_open_horizontal.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doorpos = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}
getplayer = getThingfromPos(doorpos)
if getplayer.itemid > 0 then
npos = {x=frompos.x, y=frompos.y+1, z=frompos.z}
doTeleportThing(getplayer.uid,npos)
end
doTransformItem(item.uid,item.itemid-1)
return 1
end

w data/actions/scripts: key.lua

Kod:
-- Key.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 10000 then
if item2.itemid == 1209
or item2.itemid == 1212
or item2.itemid == 1231
or item2.itemid == 1234
or item2.itemid == 1249
or item2.itemid == 1252
or item2.itemid == 3535
or item2.itemid == 3544
or item2.itemid == 4913
or item2.itemid == 4916 then
doTransformItem(item2.uid,item2.itemid+2)
elseif item2.itemid == 1210
or item2.itemid == 1213
or item2.itemid == 1232
or item2.itemid == 1235
or item2.itemid == 1250
or item2.itemid == 1253
or item2.itemid == 3536
or item2.itemid == 3545
or item2.itemid == 4914
or item2.itemid == 4917 then
doTransformItem(item2.uid,item2.itemid-1)
elseif item2.itemid == 1211
or item2.itemid == 1214
or item2.itemid == 1233
or item2.itemid == 1236
or item2.itemid == 1251
or item2.itemid == 1254
or item2.itemid == 3537
or item2.itemid == 3546
or item2.itemid == 4915
or item2.itemid == 4918 then
doTransformItem(item2.uid,item2.itemid-2)
end
else
if item.actionid == item2.actionid then
if item2.itemid == 1209
or item2.itemid == 1212
or item2.itemid == 1231
or item2.itemid == 1234
or item2.itemid == 1249
or item2.itemid == 1252
or item2.itemid == 3535
or item2.itemid == 3544
or item2.itemid == 4913
or item2.itemid == 4916 then
doTransformItem(item2.uid,item2.itemid+2)
elseif item2.itemid == 1210
or item2.itemid == 1213
or item2.itemid == 1232
or item2.itemid == 1235
or item2.itemid == 1250
or item2.itemid == 1253
or item2.itemid == 3536
or item2.itemid == 3545
or item2.itemid == 4914
or item2.itemid == 4917 then
doTransformItem(item2.uid,item2.itemid-1)
elseif item2.itemid == 1211
or item2.itemid == 1214
or item2.itemid == 1233
or item2.itemid == 1236
or item2.itemid == 1251
or item2.itemid == 1254
or item2.itemid == 3537
or item2.itemid == 3546
or item2.itemid == 4915
or item2.itemid == 4918 then
doTransformItem(item2.uid,item2.itemid-2)
end
elseif item2.itemid >= 1209 and item2.itemid <= 1214 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 1231 and item2.itemid <= 1236 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 1249 and item2.itemid <= 1254 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 3535 and item2.itemid <= 3537 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 3544 and item2.itemid <= 3546 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 4913 and item2.itemid <= 4918 then
doPlayerSendCancel(cid,"The key does not match.")
else
return 0
end
end
return 1
end

moim zdaniem najlepszy Key SYstem!

Link do oryginalnego tematu: http://www.otfans.pl/forums/showthread.php?tid=3128
///Pozdrawiam Gremlin


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#6 2007-05-16 20:59:45

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

Wchodzimy do data/npc/scripts i tworzymy plik addon.lua i wklejamy do niego to:
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
------------------------------ Npc de Addons/Outfits ------------------------------
---------------- Credits do addon.lua: Soulblaster[94%], Zorzin[6%] ---------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local focus = 0
local talk_start = 0
local target = 0
local following = false
local 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 give the all \"addons\" and \"outfits\". If you dont know how to buy, say \"help\".')
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 msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0

elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'addons') then
if isPremium(cid) then
selfSay('You can buy the first and the second addon. I can give you the Citizen, Hunter, Mage, Knight, Nobleman, Summoner, Warrior, Barbarian, Druid, Wizard, Oriental, Pirate, Assassin, Beggar, Shaman addons.')
talk_state = 0
else
selfSay('I have nothing for you.')
talk_state = 0
end
elseif msgcontains(msg, 'outfits') then
if isPremium(cid) then
selfSay('I can give you the Pirate, Assassin, Beggar, Shaman outfits.')
talk_state = 0
else
selfSay('I have nothing for you.')
talk_state = 0
end
elseif msgcontains(msg, 'help') then
if isPremium(cid) then
selfSay('To buy the first addon, say: \"first NAME addon\" and to buy the second addon, say: \"second NAME addon\. You can see the NAMES when you say: \"addons\".')
talk_state = 0
else
selfSay('I have nothing for you.')
talk_state = 0
end
end

------------------------------------start addons-------------------------------------------

if msgcontains(msg, 'first citizen addon') then
if isPremium(cid) then
if haveItem(cid, 5878, 100, 0, 1) == 1 then
selfSay('Did you bring me 100 minotaur leathers?')
talk_state = 1
else
selfSay('I need 100 minotaur leather, to give you the first addon of Citizen Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second citizen addon') then
if isPremium(cid) then
if haveItem(cid, 5890, 100, 0, 1) == 1 and haveItem(cid, 5902, 50, 0, 1) == 1 and haveItem(cid, 2480, 1, 0, 0) == 1 then
selfSay('Did you bring me 100 chicken feathers, 50 honeycombs and 1 legion helmet?')
talk_state = 2
else
selfSay('I need 100 chicken feathers, 50 honeycombs and 1 legion helmet, to give you the second addon of Citizen Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first hunter addon') then
if isPremium(cid) then
if haveItem(cid, 5947, 1, 0, 0) == 1 and haveItem(cid, 5876, 100, 0, 1) == 1 and haveItem(cid, 5948, 100, 0, 1) == 1 and haveItem(cid, 5891, 5, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 and haveItem(cid, 5889, 1, 0, 1) == 1 and haveItem(cid, 5888, 1, 0, 1) == 1 then
selfSay('Did you bring me 1 engraved crossbow, 100 pieces of lizard leather, 100 pieces of red dragon leather, 5 enchanted chicken wings, 1 piece of royal stell, 1 piece of dragonian stell and 1 piece of hell stell?')
talk_state = 3
else
selfSay('I need 1 engraved crossbow, 100 pieces of lizard leather, 100 pieces of red dragon leather, 5 enchanted chicken wings, 1 piece of royal stell, 1 piece of dragonian stell and 1 piece of hell stell, to give you the first addon of Hunter Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second hunter addon') then
if isPremium(cid) then
if haveItem(cid, 5875, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 pair of sniper gloves?')
talk_state = 4
else
selfSay('I need 1 pair of sniper gloves, to give you the second addon of Hunter Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first mage addon') then
if isPremium(cid) then
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone?')
talk_state = 5
else
selfSay('I need 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone, to give you the first addon of Mage Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second mage addon') then
if isPremium(cid) then
if haveItem(cid, 5903, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 ferumbras hat?')
talk_state = 6
else
selfSay('I need 1 ferumbras hat, to give you the second addon of Mage Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first knight addon') then
if isPremium(cid) then
if haveItem(cid, 5880, 100, 0, 1) == 1 then
selfSay('Did you bring me 100 iron ore?') --falta 1 crude iron
talk_state = 7
else
selfSay('I need 100 iron ore, to give you the first addon of Knight Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second knight addon') then
if isPremium(cid) then
if haveItem(cid, 5893, 100, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
selfSay('Did you bring me 100 behemoth fangs, 1 flask of warrior sweat and 1 royal steal?')
talk_state = 8
else
selfSay('I need 100 behemoth fangs, 1 flask of warrior sweat and 1 royal steal, to give you the second addon of Knight Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first nobleman addon') then
if isPremium(cid) then
selfSay('I need 150000gp, to give you the first addon of Nobleman Outfit. Did you bring me 150000gp?')
talk_state = 9
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second nobleman addon') then
if isPremium(cid) then
selfSay('I need 150000gp, to give you the second addon of Nobleman Outfit. Did you bring me 150000gp?')
talk_state = 10
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first summoner addon') then
if isPremium(cid) then
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone?')
talk_state = 11
else
selfSay('I need 1 wand of inferno, 1 tempest rod, 10 magic sulphur, 20 ankhs and 1 soul stone, to give you the first addon of Summoner Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second summoner addon') then
if isPremium(cid) then
if haveItem(cid, 5903, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 ferumbras hat?')
talk_state = 12
else
selfSay('I need 1 ferumbras hat, to give you the second addon of Summoner Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first warrior addon') then
if isPremium(cid) then
if haveItem(cid, 5925, 100, 0, 1) == 1 and haveItem(cid, 5899, 100, 0, 1) == 1 and haveItem(cid, 5884, 1, 0, 0) == 1 and haveItem(cid, 5919, 1, 0, 0) == 1 then
selfSay('Did you bring me 100 hardened bones, 100 turtle shells, 1 fighting spirit and 1 dragon claw?')
talk_state = 13
else
selfSay('I need 100 hardened bones, 100 turtle shells, 1 fighting spirit and 1 dragon claw, to give you the first addon of Warrior Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second warrior addon') then
if isPremium(cid) then
if haveItem(cid, 5880, 100, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
selfSay('Did you bring me 100 iron ore and 1 royal stell?')
talk_state = 14
else
selfSay('I need 100 iron ore and 1 royal stell, to give you the second addon of Warrior Outfit. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first barbarian addon') then
if isPremium(cid) then
preco_addon = 90000
addon_id = 1
outfit_id = 8
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second barbarian addon') then
if isPremium(cid) then
preco_addon = 110000
addon_id = 2
outfit_id = 8
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end


elseif msgcontains(msg, 'first druid addon') then
if isPremium(cid) then
preco_addon = 110000
addon_id = 1
outfit_id = 9
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second druid addon') then
if isPremium(cid) then
preco_addon = 130000
addon_id = 2
outfit_id = 9
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first wizard addon') then
if isPremium(cid) then
preco_addon = 170000
addon_id = 1
outfit_id = 10
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second wizard addon') then
if isPremium(cid) then
preco_addon = 200000
addon_id = 2
outfit_id = 10
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first oriental addon') then
if isPremium(cid) then
preco_addon = 160000
addon_id = 1
outfit_id = 11
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second oriental addon') then
if isPremium(cid) then
preco_addon = 170000
addon_id = 2
outfit_id = 11
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end


elseif msgcontains(msg, 'first pirate addon') then
if isPremium(cid) then
preco_addon = 210000
addon_id = 1
outfit_id = 12
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second pirate addon') then
if isPremium(cid) then
preco_addon = 220000
addon_id = 2
outfit_id = 12
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end


elseif msgcontains(msg, 'first assassin addon') then
if isPremium(cid) then
preco_addon = 190000
addon_id = 1
outfit_id = 13
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second assassin addon') then
if isPremium(cid) then
preco_addon = 200000
addon_id = 2
outfit_id = 13
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first beggar addon') then
if isPremium(cid) then
preco_addon = 175000
addon_id = 1
outfit_id = 14
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second beggar addon') then
if isPremium(cid) then
preco_addon = 190000
addon_id = 2
outfit_id = 14
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'first shaman addon') then
if isPremium(cid) then
preco_addon = 210000
addon_id = 1
outfit_id = 15
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end

elseif msgcontains(msg, 'second shaman addon') then
if isPremium(cid) then
preco_addon = 230000
addon_id = 2
outfit_id = 15
if getPlayerMoney(cid, preco_addon) == 1 then
selfSay('Did you bring me '.. preco_addon ..' gold coins?')
talk_state = 89
else
selfSay('I need '.. preco_addon ..' gold coins, to give you this addon. Come back when you have them.')
end
else
selfSay('Sorry, you need a premium account to get addons.')
talk_state = 0
end
end

------------------------------------start outfits-------------------------------------------

if msgcontains(msg, 'pirate outfit') then
if isPremium(cid) then
if haveItem(cid, 6096, 1, 0, 0) == 1 and haveItem(cid, 6095, 1, 0, 0) == 1 and haveItem(cid, 5918, 1, 0, 0) == 1 and haveItem(cid, 5462, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 pirate hat, 1 pirate shirt, 1 pirate knee legs and 1 pirate boots?')
talk_state = 31
else
selfSay('I need 1 pirate hat, 1 pirate shirt, 1 pirate knee legs and 1 pirate boots, to give you the Pirate Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end

elseif msgcontains(msg, 'assassin outfit') then
if isPremium(cid) then
if haveItem(cid, 2420, 1, 0, 0) == 1 and haveItem(cid, 5898, 30, 0, 1) == 1 and haveItem(cid, 5948, 10, 0, 1) == 1 and haveItem(cid, 5881, 30, 0, 1) == 1 and haveItem(cid, 5895, 20, 0, 1) == 1 and haveItem(cid, 5905, 20, 0, 1) == 1 and haveItem(cid, 5906, 10, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 then
selfSay('Did you bring me 1 machete, 30 beholder eyes, 10 red dragon scale, 30 lizard scale, 20 fish fin, 20 vampire dust, 10 demon dust and 1 flask of warrior sweat?')
talk_state = 32
else
selfSay('I need 1 machete, 30 beholder eyes, 10 red dragon scale, 30 lizard scale, 20 fish fin, 20 vampire dust, 10 demon dust and 1 flask of warrior sweat, to give you the Assassin Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end

elseif msgcontains(msg, 'beggar outfit') then
if isPremium(cid) then
if haveItem(cid, 5878, 50, 0, 1) == 1 and haveItem(cid, 5921, 30, 0, 1) == 1 and haveItem(cid, 5913, 20, 0, 1) == 1 and haveItem(cid, 5894, 10, 0, 1) == 1 then
selfSay('Did you bring me 50 minothaur leather, 30 heaven blossoms, 20 brown pieces of cloth and 10 bat wings?')
talk_state = 33
else
selfSay('I need 50 minothaur leather, 30 heaven blossoms, 20 brown pieces of cloth and 10 bat wings, to give you the Beggar Outfit. Come back when you have them.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end

elseif msgcontains(msg, 'shaman outfit') then
if isPremium(cid) then
if getPlayerStorageValue(cid,6000) == 1 then
selfSay('Me truly proud of you, friend. You learn many about plants, charms and ape people. Me want grant you shamanic power now. You ready?')
talk_state = 34
else
selfSay('You have not complete the quest.')
talk_state = 0
end
else
selfSay('Sorry, you need a premium account to wear new outfits.')
talk_state = 0
end
end

------------------------------------message confirmation-------------------------------------------

if msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
selfSay('Ok than.')
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 1 then
talk_state = 0
if haveItem(cid, 5878, 100, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 1, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5878, 100) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 2 then
talk_state = 0
if haveItem(cid, 5890, 100, 0, 1) == 1 and haveItem(cid, 5902, 50, 0, 1) == 1 and haveItem(cid, 2480, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 1, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5890, 100) == 1 and doPlayerRemoveItem(cid, 5902, 50) == 1 and doPlayerRemoveItem(cid, 2480, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 3 then
talk_state = 0
if haveItem(cid, 5947, 1, 0, 0) == 1 and haveItem(cid, 5876, 100, 0, 1) == 1 and haveItem(cid, 5948, 100, 0, 1) == 1 and haveItem(cid, 5891, 5, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 and haveItem(cid, 5889, 1, 0, 1) == 1 and haveItem(cid, 5888, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 2, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5947, 1) == 1 and doPlayerRemoveItem(cid, 5876, 100) == 1 and doPlayerRemoveItem(cid, 5948, 100) == 1 and doPlayerRemoveItem(cid, 5891, 5) == 1 and doPlayerRemoveItem(cid, 5887, 1) == 1 and doPlayerRemoveItem(cid, 5889, 1) == 1 and doPlayerRemoveItem(cid, 5888, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 4 then
talk_state = 0
if haveItem(cid, 5875, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 2, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5875, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 5 then
talk_state = 0
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 3, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 2183, 1) == 1 and doPlayerRemoveItem(cid, 2187, 1) == 1 and doPlayerRemoveItem(cid, 5904, 10) == 1 and doPlayerRemoveItem(cid, 2193, 20) == 1 and doPlayerRemoveItem(cid, 5809, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 6 then
talk_state = 0
if haveItem(cid, 5903, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 3, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5903, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 7 then
talk_state = 0
if haveItem(cid, 5880, 100, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 4, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5880, 100) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 8 then
talk_state = 0
if haveItem(cid, 5893, 100, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 4, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5893, 100) == 1 and doPlayerRemoveItem(cid, 5885, 1) == 1 and doPlayerRemoveItem(cid, 5887, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 9 then
talk_state = 0
if getPlayerMoney(cid, 150000) == 1 then
xx = doPlayerAddAddon(cid, 5, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveMoney(cid, 150000) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have enought money.')
end

elseif msgcontains(msg, 'yes') and talk_state == 10 then
talk_state = 0
if getPlayerMoney(cid, 150000) == 1 then
xx = doPlayerAddAddon(cid, 5, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveMoney(cid, 150000) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have enought money.')
end

elseif msgcontains(msg, 'yes') and talk_state == 11 then
talk_state = 0
if haveItem(cid, 2183, 1, 0, 0) == 1 and haveItem(cid, 2187, 1, 0, 0) == 1 and haveItem(cid, 5904, 10, 0, 1) == 1 and haveItem(cid, 2193, 20, 0, 0) == 1 and haveItem(cid, 5809, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 6, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 2183, 1) == 1 and doPlayerRemoveItem(cid, 2187, 1) == 1 and doPlayerRemoveItem(cid, 5904, 10) == 1 and doPlayerRemoveItem(cid, 2193, 20) == 1 and doPlayerRemoveItem(cid, 5809, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 12 then
talk_state = 0
if haveItem(cid, 5903, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 6, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5903, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 13 then
talk_state = 0
if haveItem(cid, 5925, 100, 0, 1) == 1 and haveItem(cid, 5899, 100, 0, 1) == 1 and haveItem(cid, 5884, 1, 0, 0) == 1 and haveItem(cid, 5919, 1, 0, 0) == 1 then
xx = doPlayerAddAddon(cid, 7, 1)
if xx == 1 or xx == 3 then
if doPlayerRemoveItem(cid, 5925, 100) == 1 and doPlayerRemoveItem(cid, 5899, 100) == 1 and doPlayerRemoveItem(cid, 5884, 1) == 1 and doPlayerRemoveItem(cid, 5919, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 14 then
talk_state = 0
if haveItem(cid, 5880, 100, 0, 1) == 1 and haveItem(cid, 5887, 1, 0, 1) == 1 then
xx = doPlayerAddAddon(cid, 7, 2)
if xx == 2 or xx == 3 then
if doPlayerRemoveItem(cid, 5880, 100) == 1 and doPlayerRemoveItem(cid, 5887, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 31 then
talk_state = 0
if haveItem(cid, 6096, 1, 0, 0) == 1 and haveItem(cid, 6095, 1, 0, 0) == 1 and haveItem(cid, 5918, 1, 0, 0) == 1 and haveItem(cid, 5462, 1, 0, 0) == 1 then
if doPlayerAddExtraOutfit(cid, 1) == 1 then
if doPlayerRemoveItem(cid, 6096, 1) == 1 and doPlayerRemoveItem(cid, 6095, 1) == 1 and doPlayerRemoveItem(cid, 5918, 1) == 1 and doPlayerRemoveItem(cid, 5462, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this outfit.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 32 then
talk_state = 0
if haveItem(cid, 2420, 1, 0, 0) == 1 and haveItem(cid, 5898, 30, 0, 1) == 1 and haveItem(cid, 5948, 10, 0, 1) == 1 and haveItem(cid, 5881, 30, 0, 1) == 1 and haveItem(cid, 5895, 20, 0, 1) == 1 and haveItem(cid, 5905, 20, 0, 1) == 1 and haveItem(cid, 5906, 10, 0, 1) == 1 and haveItem(cid, 5885, 1, 0, 0) == 1 then
if doPlayerAddExtraOutfit(cid, 2) == 1 then
if doPlayerRemoveItem(cid, 2420, 1) == 1 and doPlayerRemoveItem(cid, 5898, 30) == 1 and doPlayerRemoveItem(cid, 5948, 10) == 1 and doPlayerRemoveItem(cid, 5881, 30) == 1 and doPlayerRemoveItem(cid, 5895, 20) == 1 and doPlayerRemoveItem(cid, 5905, 20) == 1 and doPlayerRemoveItem(cid, 5906, 10) == 1 and doPlayerRemoveItem(cid, 5885, 1) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this outfit.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 33 then
talk_state = 0
if haveItem(cid, 5878, 50, 0, 1) == 1 and haveItem(cid, 5921, 30, 0, 1) == 1 and haveItem(cid, 5913, 20, 0, 1) == 1 and haveItem(cid, 5894, 10, 0, 1) == 1 then
if doPlayerAddExtraOutfit(cid, 3) == 1 then
if doPlayerRemoveItem(cid, 2878, 50) == 1 and doPlayerRemoveItem(cid, 5921, 30) == 1 and doPlayerRemoveItem(cid, 5913, 20) == 1 and doPlayerRemoveItem(cid, 5894, 10) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this outfit.')
end
else
selfSay('Sorry, you dont have these items.')
end

elseif msgcontains(msg, 'yes') and talk_state == 89 then
talk_state = 0
if getPlayerMoney(cid, preco_addon) == 1 then
xx = doPlayerAddAddon(cid, outfit_id, addon_id)
if xx == addon_id or xx == 3 then
if doPlayerRemoveMoney(cid, preco_addon) == 1 then
selfSay('Here you are.')
end
else
selfSay('Sorry, you already have this addon.')
end
else
selfSay('Sorry, you dont have enought money.')
end

elseif msgcontains(msg, 'yes') and talk_state == 34 then
talk_state = 0
if doPlayerAddExtraOutfit(cid, 4) == 1 then
selfSay('Here you are.')
else
selfSay('Sorry, you already have this outfit.')
end
end
end
end


function onCreatureChangeOutfit(creature)
end


function onThink()
if focus > 0 then
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
--npc by Soulblaster and Zorzin--

if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(1)
end
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(3)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(0)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(2)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(0)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(3)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(1)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(2)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(0)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(3)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(1)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(2)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(0)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(3)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(1)
end
end

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) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end

Potem tworzymy Npc  wchodzimy do data/npc i robimy Varkhal.xml, a do niego wklejamy:


<?xml version="1.0"?>
<npc name="Varkhal" script="data/npc/scripts/addon.lua" access="5" lookdir="2">
    <mana now="800" max="800"/>
    <health now="200" max="200"/>
<look type="134" head="78" body="88" legs="0" feet="88"/>
</npc>

Npc dla otsów Evolution, jak macie coś innego 7.8+ wystarczy zmienić access dla npc.

Link do oryginalnego tematu: http://www.tibia11.pun.pl/viewtopic.php?id=164
///Pozdrawiam Gremlin


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#7 2007-05-16 21:01:34

Trampek

Super Moderator Predorio Team

9510881
Call me!
Skąd: Bieruń Nowy
Zarejestrowany: 2007-05-11
Posty: 43
Punktów :   

Re: Skrypty.

POwiem tak
Szukaj NPC TYLKO POD JIDDO NPC SYSTEM PONIEWAZ ODPALAM NA EVOLUTION 0.7.8.


http://images20.fotosik.pl/355/2d23397d3ceb1c02.jpg
http://images21.fotosik.pl/300/5a3766edf44928d6.jpg

Offline

 

#8 2007-05-16 21:13:16

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

Czekaj nie kapuje Ciebie
jaki system bo ja NPC robilem zawsze normalnie w *.xml...
najlepiej wejdz na GG i mi wytlumacz
///Pozdrawiam Gremlin


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#9 2007-05-16 21:33:22

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

[Musisz być zalogowany, aby przeczytać ukrytą wiadomość]


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#10 2007-05-19 12:51:18

Gremlin

Administrator

5023875
Skąd: Kołobrzeg
Zarejestrowany: 2007-05-11
Posty: 48
Punktów :   
WWW

Re: Skrypty.

[Musisz być zalogowany, aby przeczytać ukrytą wiadomość]


http://images21.fotosik.pl/300/5a3766edf44928d6.jpg
http://www.upshit.project13.pl/szkola/szkola.jpg
///Pozdrawiam Gremlin - Kazdy pyta sie czemu tak pisze??;>
Odpowiedz jest prosta... Te trzy ukosniki to trzy "paski" czyli ADIDAS zawsze oryginalne
GG: 5023875 <-- jesli piszesz??... To sie PRZEDSTAW

Offline

 

#11 2007-05-20 18:32:11

Roszko

Czlonek Predorio Team

status MialemKiedys
9360423
Call me!
Skąd: Łódź
Zarejestrowany: 2007-05-16
Posty: 22
Punktów :   

Re: Skrypty.

Ja mam takie pytanko:

Dlaczego jakl sie wejdzie na www.forum.tibia.org.pl i dobrze poszuka to wiekrzosc tych skryptow mozna znalesc?


//PzDr.

http://images21.fotosik.pl/300/9ca34095303c4556.jpg
http://images21.fotosik.pl/300/37bfa4daee11ce2a.jpg

Tylko orginalne ubrania:
http://images21.fotosik.pl/300/69101af7d11058e1.jpghttp://images21.fotosik.pl/300/ea725a989cbffabc.jpghttp://images20.fotosik.pl/356/27eba240f93e9fde.jpg

Offline

 

#12 2007-05-21 16:11:20

Trampek

Super Moderator Predorio Team

9510881
Call me!
Skąd: Bieruń Nowy
Zarejestrowany: 2007-05-11
Posty: 43
Punktów :   

Re: Skrypty.

Chyba pisze że szuka na tibia.org.pl i daje nawed link do tematu .. Naprawde nauczmy się czytać ze zrozoumieniem


http://images20.fotosik.pl/355/2d23397d3ceb1c02.jpg
http://images21.fotosik.pl/300/5a3766edf44928d6.jpg

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
GotLink.pl