Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[DL] Pets system final


kza54

Rekomendowane odpowiedzi

Opublikowano

Pety są ustawione pod id takie jak: 20120, 20126 co u mnie jest to wierzchowiec , oraz mikołaj. Jest możliwość zmiany id aby nie przywoływał mi wierzchowca/mikołaja tylko pety?. Bo nigdzie queście tego nie widzę.

signjpg_swwrens.jpg

  • Odpowiedzi 186
  • Dodano
  • Ostatniej odpowiedzi
Opublikowano

np.

-- Pet 5
PetSystem[5] =
{['Name'] = "Bojowy Pies", ['Level'] = 26, ['Item'] = 53005, ['MaxLevel'] = 110, ['WindowSize'] = 395,
['Skill']= {

 

 

26 zmień na id twojego peta

adam

Opublikowano

np.

-- Pet 5

PetSystem[5] =

{['Name'] = "Bojowy Pies", ['Level'] = 26, ['Item'] = 53005, ['MaxLevel'] = 110, ['WindowSize'] = 395,

['Skill']= {

 

 

26 zmień na id twojego peta

Fakt niby działa , nie pokazują mi się wierzchowiec czy też mikołaj ale wyświetla się komunikat: "Przywołanie konia nie powiodło się!".

signjpg_swwrens.jpg

Opublikowano

Czy potrafiłby ktoś pomóc? , ustawiam w linijce: {['Name'] = "Phoenix de Feu", ['Level'] = 1326, ['Item'] = 53001 gdzie 1326 to pet z npclist, gdy chcę go przywołać piszę: "Przywołanie konia nie powiodło się", natomiast jak zmienię na np. 20-22 to przywołuje mi bengala.

signjpg_swwrens.jpg

Opublikowano

Tu macie difa:

 

Diff game2089 do Pettow :

Ten plik różnica jest stworzony przez The Interactive Disassembler
game_r2089M_32
00035011: 74 0F
00035012: 43 8C
00035013: 66 15
00035014: 3D 01
00035015: 86 00
00035016: 4E 00
00035017: 74 90
00035018: 3D 90
0003501B: 87 B6
00035020: 74 7E
00035022: 66 90
00035023: 3D 90
00035024: 88 90
00035025: 4E 90
00035026: 74 90
00035027: 2E 90
00035028: 66 90
00035029: 3D 90
0003502A: 89 90
0003502B: 4E 90
0003502C: 8D 90
0003502D: 74 90
0003502E: 26 90
0003502F: 00 90
00035030: 74 90
00035031: 24 90
00035032: 66 90
00035033: 3D 90
00035034: 8A 90
00035035: 4E 90
00035036: 74 90
00035037: 1E 90
00035038: 66 90
00035039: 3D 90
0003503A: 8B 90
0003503B: 4E 90
0003503C: 8D 90
0003503D: 74 90
0003503E: 26 90
0003503F: 00 90
00035040: 74 90
00035041: 14 90
00035042: 66 90
00035043: 3D 90
00035044: 8C 90
00035045: 4E 90
00035046: 74 90
00035047: 0E 90
0003504A: 8D B6
00430784: 8B 98
004307B4: 8B 9B
004307E4: 8B 9E
00430814: 8B A1
00430844: 8B A4
00430874: 8B A7
004308A4: 8B AA
004308D4: 8B AD
00430904: 8B B0

Pomogłem? Daj Lubie to! :)

 

2252770056.png

Opublikowano

@up,

To prawda, tematów z downloadem petów od groma i jeszcze trochę, a rzadko można natknąć się na taki, w którym linki nie wygasły..

Lipa ;/

1377019234-U697852.png


Opublikowano

ma może ktoś questa?

@edit

 


 

 

-----------------------------------------------
-- pet_system
------------------------------------------------
quest pet_system begin
state start begin
when 53001.use or 53002.use or 53003.use or 53004.use or 53005.use or 53006.use or 53008.use or 53007.use begin
local ItemValue = item.vnum
for i = 1, table.getn(PetArray), 1 do
if PetArray[1] == ItemValue then
local PetState = PetArray[2]
if pc.getqf("pet_index") == 0 then
if pc.getqf(PetState) == 0 then
local check = inizializza(i)
if check != 0 then return end
pc.setqf(PetState, 1)
end
pc.setqf("pet_index", i)
evoca(i, PET_SUMMON)
else
evoca(i, PET_UNSUMMON)
pc.setqf("pet_index", 0)
end
end
end
end
when 20120.click with pc.getqf("pet_index") == 1 begin show_pet_menu(1) end
when 20121.click with pc.getqf("pet_index") == 1 begin show_pet_menu(1) end
when 20122.click with pc.getqf("pet_index") == 1 begin show_pet_menu(1) end
when 20123.click with pc.getqf("pet_index") == 2 begin show_pet_menu(2) end
when 20124.click with pc.getqf("pet_index") == 2 begin show_pet_menu(2) end
when 20125.click with pc.getqf("pet_index") == 2 begin show_pet_menu(2) end
when 20126.click with pc.getqf("pet_index") == 3 begin show_pet_menu(3) end
when 20127.click with pc.getqf("pet_index") == 3 begin show_pet_menu(3) end
when 20128.click with pc.getqf("pet_index") == 3 begin show_pet_menu(3) end
when 20129.click with pc.getqf("pet_index") == 4 begin show_pet_menu(4) end
when 20130.click with pc.getqf("pet_index") == 4 begin show_pet_menu(4) end
when 20131.click with pc.getqf("pet_index") == 4 begin show_pet_menu(4) end
when 20132.click with pc.getqf("pet_index") == 5 begin show_pet_menu(5) end
when 20133.click with pc.getqf("pet_index") == 5 begin show_pet_menu(5) end
when 20134.click with pc.getqf("pet_index") == 5 begin show_pet_menu(5) end
when 20135.click with pc.getqf("pet_index") == 6 begin show_pet_menu(6) end
when 20136.click with pc.getqf("pet_index") == 6 begin show_pet_menu(6) end
when 20137.click with pc.getqf("pet_index") == 6 begin show_pet_menu(6) end
when 20138.click with pc.getqf("pet_index") == 7 begin show_pet_menu(7) end
when 20139.click with pc.getqf("pet_index") == 7 begin show_pet_menu(7) end
when 20140.click with pc.getqf("pet_index") == 7 begin show_pet_menu(7) end
when 20141.click with pc.getqf("pet_index") == 8 begin show_pet_menu(8) end
when 20142.click with pc.getqf("pet_index") == 8 begin show_pet_menu(8) end
when 20143.click with pc.getqf("pet_index") == 8 begin show_pet_menu(8) end

when kill with pc.getqf("pet_index") != 0 begin
local i = pc.getqf("pet_index")
if pc.get_level() > (npc.get_level() + 15) then
return
end
if pc.get_level() <= npc.get_level() then
PetGiveExp(i, 5)
elseif pc.get_level() <= (npc.get_level() + 5) then
PetGiveExp(i, 4)
elseif pc.get_level() <= (npc.get_level() + 10) then
PetGiveExp(i, 3)
elseif pc.get_level() <= (npc.get_level() + 15) then
PetGiveExp(i, 1)
end
end

when logout with pc.getqf("pet_index") != 0 begin
local i = pc.getqf("pet_index")
evoca(i, PET_UNSUMMON)
pc.setqf("pet_index", 0)
end
when login with pc.getqf("pet_index") != 0 begin
local i = pc.getqf("pet_index")
evoca(i, PET_UNSUMMON)
pc.setqf("pet_index", 0)
end
end
end

dzięki ;)

Opublikowano

 

 

-----------------------------------------------
-- pet_system
------------------------------------------------
quest pet_system begin
state start begin
when 53001.use or 53002.use or 53003.use or 53004.use or 53005.use or 53006.use or 53008.use or 53007.use begin
local ItemValue = item.vnum
for i = 1, table.getn(PetArray), 1 do
if PetArray[i][1] == ItemValue then
local PetState = PetArray[i][2]
if pc.getqf("pet_index") == 0 then
if pc.getqf(PetState) == 0 then
local check = inizializza(i)
if check != 0 then return end
pc.setqf(PetState, 1)
end
pc.setqf("pet_index", i)
evoca(i, PET_SUMMON)
else
evoca(i, PET_UNSUMMON)
pc.setqf("pet_index", 0)
end
end
end
end
when 20120.click with pc.getqf("pet_index") == 1 begin show_pet_menu(1) end
when 20121.click with pc.getqf("pet_index") == 1 begin show_pet_menu(1) end
when 20122.click with pc.getqf("pet_index") == 1 begin show_pet_menu(1) end
when 20123.click with pc.getqf("pet_index") == 2 begin show_pet_menu(2) end
when 20124.click with pc.getqf("pet_index") == 2 begin show_pet_menu(2) end
when 20125.click with pc.getqf("pet_index") == 2 begin show_pet_menu(2) end
when 20126.click with pc.getqf("pet_index") == 3 begin show_pet_menu(3) end
when 20127.click with pc.getqf("pet_index") == 3 begin show_pet_menu(3) end
when 20128.click with pc.getqf("pet_index") == 3 begin show_pet_menu(3) end
when 20129.click with pc.getqf("pet_index") == 4 begin show_pet_menu(4) end
when 20130.click with pc.getqf("pet_index") == 4 begin show_pet_menu(4) end
when 20131.click with pc.getqf("pet_index") == 4 begin show_pet_menu(4) end
when 20132.click with pc.getqf("pet_index") == 5 begin show_pet_menu(5) end
when 20133.click with pc.getqf("pet_index") == 5 begin show_pet_menu(5) end
when 20134.click with pc.getqf("pet_index") == 5 begin show_pet_menu(5) end
when 20135.click with pc.getqf("pet_index") == 6 begin show_pet_menu(6) end
when 20136.click with pc.getqf("pet_index") == 6 begin show_pet_menu(6) end
when 20137.click with pc.getqf("pet_index") == 6 begin show_pet_menu(6) end
when 20138.click with pc.getqf("pet_index") == 7 begin show_pet_menu(7) end
when 20139.click with pc.getqf("pet_index") == 7 begin show_pet_menu(7) end
when 20140.click with pc.getqf("pet_index") == 7 begin show_pet_menu(7) end
when 20141.click with pc.getqf("pet_index") == 8 begin show_pet_menu(8) end
when 20142.click with pc.getqf("pet_index") == 8 begin show_pet_menu(8) end
when 20143.click with pc.getqf("pet_index") == 8 begin show_pet_menu(8) end

when kill with pc.getqf("pet_index") != 0 begin
local i = pc.getqf("pet_index")
if pc.get_level() > (npc.get_level() + 15) then
return
end
if pc.get_level() <= npc.get_level() then
PetGiveExp(i, 5)
elseif pc.get_level() <= (npc.get_level() + 5) then
PetGiveExp(i, 4)
elseif pc.get_level() <= (npc.get_level() + 10) then
PetGiveExp(i, 3)
elseif pc.get_level() <= (npc.get_level() + 15) then
PetGiveExp(i, 1)
end
end

when logout with pc.getqf("pet_index") != 0 begin
local i = pc.getqf("pet_index")
evoca(i, PET_UNSUMMON)
pc.setqf("pet_index", 0)
end
when login with pc.getqf("pet_index") != 0 begin
local i = pc.getqf("pet_index")
evoca(i, PET_UNSUMMON)
pc.setqf("pet_index", 0)
end
end
end

adam

Opublikowano

when 50053.use with horse.get_grade()==1 begin

if PetSystem.IsPetLevel(horse.get_level()) then

say("Vous avez fait n'importe quoi avec les")

say("commande GM. Mettez le niveau du cheval")

say("puis essayez ŕ nouveau.[ENTER]")

return

Ma ktoś sposób na tą część questa ? Bo sporo ludzi nie może przywołać konia, a jak w miejscu say'a dam horse summon to jeżdżą na petach ...

  • 3 tygodnie później...
Opublikowano

Prosze :)

 

 

 

 

 
 
QuestFolder = get_locale_base_path().."/quest/"

-- Classe
PetSystem = {['Folder'] = QuestFolder.."io/pet/", ['ItemExp'] = 4000000, ['UpdateFrequency'] = 30, ['Flag'] = "active_pet", ['ExpFlag'] = "exp_blocked"}
-- Pet 1
PetSystem[1] =
            {['Name'] = "Phoenix de Feu", ['Level'] = 22, ['Item'] = 53001, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=20,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.INT,['name']="Lumičre Divine",['max_points']=10,['min_level']=1,['desc']="+1 INT",['mult']=1,['tag']=" MP"},
                        {['type']=apply.STR,['name']="Force Celeste",['max_points']=10,['min_level']=1,['desc']="+1 STR",['mult']=1,['tag']=" Force"},
                        {['type']=apply.DEX,['name']="Ruse",['max_points']=10,['min_level']=1,['desc']="+1 DEX",['mult']=1,['tag']=" Esquive"},                        
                        {['type']=apply.PENETRATE_PCT,['name']="Precision Fatal",['max_points']=15,['min_level']=60,['desc']="+1% percing hits",['mult']=1,['tag']="% Percing"},
                        {['type']=apply.CRITICAL_PCT,['name']="Precision Mortel",['max_points']=15,['min_level']=80,['desc']="+1% coup critiques",['mult']=1,['tag']="% Critique"},
                        {['type']=apply.ATTBONUS_MONSTER,['name']="Frénésie",['max_points']=10,['min_level']=100,['desc']="+1% anti monstre",['mult']=1,['tag']="% Anti monstre"},
                        {['type']=apply.MOV_SPEED,['name']="Rapidité'",['max_points']=10,['min_level']=100,['desc']="+1% vit. de dplt",['mult']=1,['tag']="% Vit. de dplt"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }
-- Pet 2
PetSystem[2] =
            {['Name'] = "Phoenix de Glace", ['Level'] = 23, ['Item'] = 53002, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=30,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.INT,['name']="Lumičre Divine",['max_points']=15,['min_level']=1,['desc']="+1 INT",['mult']=1,['tag']=" MP"},
                        {['type']=apply.STR,['name']="Force Celeste",['max_points']=15,['min_level']=1,['desc']="+1 STR",['mult']=1,['tag']=" Force"},
                        {['type']=apply.DEX,['name']="Ruse",['max_points']=15,['min_level']=1,['desc']="+1 DEX",['mult']=1,['tag']=" Esquive"},
                        {['type']=apply.PENETRATE_PCT,['name']="Precision Fatal",['max_points']=15,['min_level']=30,['desc']="+1% percing hits",['mult']=1,['tag']="% Percing"},
                        {['type']=apply.CRITICAL_PCT,['name']="Precision Mortel",['max_points']=15,['min_level']=60,['desc']="+1% coup critiques",['mult']=1,['tag']="% Critique"},
                        {['type']=apply.ATTBONUS_MONSTER,['name']="Frénésie",['max_points']=10,['min_level']=90,['desc']="+1% anti monstre",['mult']=1,['tag']="% Anti monstre"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }    
-- Pet 3
PetSystem[3] =
            {['Name'] = "Bébé Renne", ['Level'] = 24, ['Item'] = 53003, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=20,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.INT,['name']="Lumičre Divine",['max_points']=10,['min_level']=1,['desc']="+1 INT",['mult']=1,['tag']=" MP"},
                        {['type']=apply.STR,['name']="Force Celeste",['max_points']=10,['min_level']=1,['desc']="+1 STR",['mult']=1,['tag']=" Force"},
                        {['type']=apply.DEX,['name']="Ruse",['max_points']=10,['min_level']=1,['desc']="+1 DEX",['mult']=1,['tag']=" Esquive"},
                        {['type']=apply.STEAL_HP,['name']="Absorption",['max_points']=10,['min_level']=30,['min_level']=30,['desc']="+1% ass. HP",['mult']=1,['tag']="% Absorption HP"},
                        {['type']=apply.PENETRATE_PCT,['name']="Precision Fatal",['max_points']=10,['min_level']=30,['desc']="+1% percing hits",['mult']=1,['tag']="% Percing"},
                        {['type']=apply.CRITICAL_PCT,['name']="Precision Mortel",['max_points']=10,['min_level']=60,['desc']="+1% coup critiques",['mult']=1,['tag']="% Critique"},
                        {['type']=apply.ATTBONUS_MONSTER,['name']="Frénésie",['max_points']=10,['min_level']=60,['desc']="+1% anti monstre",['mult']=1,['tag']="% Anti monstre"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }
-- Pet 4
PetSystem[4] =
            {['Name'] = "Bébé Azrael", ['Level'] = 25, ['Item'] = 53004, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=30,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.RESBONUS_WARRIOR,['name']="Res. Guerrier",['max_points']=10,['desc']="+1% res. guerrier",['mult']=1,['tag']="% Res. Guerrier"},
                        {['type']=apply.RESBONUS_ASSASSIN,['name']="Res. Ninja",['max_points']=10,['desc']="+1% res. ninja",['mult']=1,['tag']="% Res. Ninja"},
                        {['type']=apply.RESBONUS_SURA,['name']="Res. Sura",['max_points']=10,['desc']="+1% res. sura",['mult']=1,['tag']="% Res. Sura"},
                        {['type']=apply.RESBONUS_SHAMAN,['name']="Res. Shaman",['max_points']=10,['desc']="+1% res. shaman",['mult']=1,['tag']="% Res. Shaman"},
                        {['type']=apply.CAST_SPEED,['name']="Frénésie Magic",['max_points']=15,['desc']="+1% vit. magique",['mult']=1,['tag']="% Vit. Magique"},
                        {['type']=apply.ATTBONUS_HUMAN,['name']="Frénésie Mortale",['max_points']=10,['desc']="+1% DH",['mult']=1,['tag']="% DH"}        
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }
-- Pet 5
PetSystem[5] =
            {['Name'] = "Bébé Sanglier", ['Level'] = 26, ['Item'] = 53005, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=30,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.RESBONUS_WARRIOR,['name']="Res. Guerrier",['max_points']=15,['min_level']=20,['desc']="+1% res. guerrier",['mult']=1,['tag']="% res. Guerrier"},
                        {['type']=apply.ATTBONUS_WARRIOR,['name']="Att. Guerrier",['max_points']=15,['min_level']=20,['desc']="+1 att. contre guerrier",['mult']=1,['tag']="% att. contre Guerrier"},
                        {['type']=apply.CAST_SPEED,['name']="Frénésie Magic",['max_points']=20,['min_level']=40,['desc']="+1% vit. magique",['mult']=1,['tag']="% Vit. magique"},
                        {['type']=apply.ATTBONUS_HUMAN,['name']="Frénésie Mortale",['max_points']=10,['min_level']=60,['desc']="+1% DH",['mult']=1,['tag']="% DH"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }
-- Pet 6
PetSystem[6] =
            {['Name'] = "Bébé Chien", ['Level'] = 27, ['Item'] = 53006, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=30,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.RESBONUS_ASSASSIN,['name']="Res. Ninja",['max_points']=15,['min_level']=20,['desc']="+1% res. ninja",['mult']=1,['tag']="% Res. Ninja"},
                        {['type']=apply.ATTBONUS_ASSASSIN,['name']="Att. Ninja",['max_points']=15,['min_level']=20,['desc']="+1 att. contre ninja",['mult']=1,['tag']="% att. contre Ninja"},
                        {['type']=apply.CAST_SPEED,['name']="Frénésie Magic",['max_points']=20,['min_level']=40,['desc']="+1% vit. magique",['mult']=1,['tag']="% Vit. Magique"},
                        {['type']=apply.ATTBONUS_HUMAN,['name']="Frénésie Mortale",['max_points']=10,['min_level']=60,['desc']="+1% DH",['mult']=1,['tag']="% DH"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }
-- Pet 7
PetSystem[7] =
            {['Name'] = "Bébé Tigre", ['Level'] = 28, ['Item'] = 53007, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=30,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.RESBONUS_SURA,['name']="Res. Sura",['max_points']=15,['min_level']=20,['desc']="+1% res. sura",['mult']=1,['tag']="% Res. Sura"},
                        {['type']=apply.ATTBONUS_SURA,['name']="Att. Sura",['max_points']=15,['min_level']=20,['desc']="+1 att. contre sura",['mult']=1,['tag']="% att. contre Sura"},
                        {['type']=apply.CAST_SPEED,['name']="Frénésie Magic",['max_points']=20,['min_level']=40,['desc']="+1% vit. magique",['mult']=1,['tag']="% Vit. Magique"},
                        {['type']=apply.ATTBONUS_HUMAN,['name']="Frénésie Mortale",['max_points']=10,['min_level']=60,['desc']="+1% DH",['mult']=1,['tag']="% DH"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }
-- Pet 8
PetSystem[8] =
            {['Name'] = "Bébé Lion", ['Level'] = 29, ['Item'] = 53008, ['MaxLevel'] = 99, ['WindowSize'] = 395,
             ['Skill']= {
                        {['type']=apply.MAX_HP,['name']="Sang Vital",['max_points']=30,['min_level']=1,['desc']="+100HP",['mult']=100,['tag']=" HP"},
                        {['type']=apply.RESBONUS_SHAMAN,['name']="Res. Shaman",['max_points']=15,['min_level']=20,['desc']="+1% res. shaman",['mult']=1,['tag']="% res. Shaman"},
                        {['type']=apply.ATTBONUS_SHAMAN,['name']="Att. Shaman",['max_points']=15,['min_level']=20,['desc']="+1 att. contre shaman",['mult']=1,['tag']="% att. contre Shaman"},
                        {['type']=apply.CAST_SPEED,['name']="Frénésie Magic",['max_points']=20,['min_level']=40,['desc']="+1% vit. magique",['mult']=1,['tag']="% Vit. Magique"},
                        {['type']=apply.ATTBONUS_HUMAN,['name']="Frénésie Mortale",['max_points']=10,['min_level']=60,['desc']="+1% DH",['mult']=1,['tag']="% DH"}
                        },
             ['ExpTable'] = {300,600,900,1200,1500,1800,2100,2400,2700,3000,        -- Liv 1-10
                             3300,3600,3900,4200,4500,4800,5100,5400,5700,6000,        -- Liv 11-20
                             6300,6600,6900,7200,7500,7800,8100,8400,8700,9000,        -- Liv 21-30
                             9300,9600,9900,10200,10500,10800,11100,11400,11700,12000,        -- Liv 31-40
                             12300,12600,12900,13200,13500,13800,14100,14400,14700,15000,        -- Liv 41-50
                             15300,15600,15900,16200,16500,16800,17100,17400,17700,18000,        -- Liv 51-60
                             18300,18600,18900,19200,19500,19800,20100,20400,20700,21000,        -- Liv 61-70
                             21300,21600,21900,22200,22500,22800,23100,23400,23700,24000,        -- Liv 71-80
                             24300,24600,24900,25200,25500,25800,26100,26400,26700,27000,        -- Liv 81-90
                             27300,27600,27900,28200,28500,28800,29100,29400,29700,30000,        -- Liv 91-100
                             30300,30600,30900,31200,31500,31800,32100,32400,32700,0            -- Liv 101-110
                            }
            }        
            

--**
--** Menu Pet
--**
function PetSystem.ShowMenu(PetIndex)
    if horse.is_mine() then
        local pet_menu
        if pc.getqf("exp_blocked") == 0 then
            pet_menu = {"Informations","Gestion Habilité'","Bloquer Expérience","Statut Habilité'","Le renvoyer","Rien (Fermer fenętre)"}
        else
            pet_menu = {"Informations","Gestion Habilité'","Débloquer Expérience","Statut Habilité'","Le renvoyer","Rien (Fermer fenętre)"}
        end
        say_title("Familier: "..PetSystem[PetIndex].Name)
        local skill_points, liv, ex = PetSystem.ReadStatus(PetIndex)
        say_light_yellow("Level: "..liv.." / "..PetSystem[PetIndex].MaxLevel.." - Point Habilité: "..skill_points.."")
        if not PetSystem.IsExpBlocked() then
            say_light_yellow("Expérience: "..ex.." / "..PetSystem[PetIndex].ExpTable[liv].." (Débloquer)")
        else
            say_light_yellow("Expérience: "..ex.." / "..PetSystem[PetIndex].ExpTable[liv].." (Bloquer)")
        end
        say("Sélectionnez une opération:")
        say_size(350, 330)
        local s = select_table(pet_menu)
----------********** Informations ***********----------        
        if s == 1 then
            say_title("Informations")
            say("Le Familier et un petit animal qui accompagne le")
            say("personnage durant son aventure. Son")
            say("comportement et semblable ŕ celle du cheval,")
            say("sauf qu'il ne peut pas ętre montés.")
            say("Une fois appelé, il a une autre fonction que")
            say("d'accompagné le personnage. Il dispose d'un systéme")
            say("de compétences que vous trouverez dans")
            say("le menu 'Gestion Habilité'. Comme vous l'animal")
            say("évolue, il prends de l'expériences avec vous et")
            say("monte des niveaux pour gagner des points de compétence.[ENTER]")
            wait()
            say_title("Informations")
            say("Chaque compétence donnera un bonus, qui")
            say("augmentera ŕ chaque point assigner.")
            say("Le nombre maximum de points attribués varie")
            say("d'une compétence ŕ l'autre. Vous pouvez attribuer")
            say("et supprimer des points comme vous le souhaiterez.[ENTER]")
----------********** Gestion Habilité ***********----------            
        elseif s == 2 then
            say_title("Gestion Habilité du Familier: "..PetSystem[PetIndex].Name.."")
            say_orange("Point Habilité disponibilité: "..skill_points.."")
            say("[ENTER]Sélectionnez une opération:[ENTER]")
            local a = select("Augmenter Habilité'","Diminuer Habilité'","Annuler")
            if a == 3 then
                return
            ----------********** Augmenter Habilité' ***********----------
            elseif a == 1 then    
                say_title("Augmenter Habilité'")
                if skill_points == 0 then
                    say("Vous n'avez pas de point(s) pour augmenter une compétence.[ENTER]")
                    return
                end
                local skill_value = {}
                local menu_abi = {}
                skill_value = PetSystem.LoadSkill(PetIndex)
                for i = 1, table.getn(PetSystem[PetIndex].Skill) do
                    if liv >= PetSystem[PetIndex].Skill[i].min_level then
                        table.insert(menu_abi, PetSystem[PetIndex].Skill[i].name..": "..skill_value[i].." point")
                    end
                end                
                table.insert(menu_abi, "Annuler")
                if table.getn(menu_abi) == 1 then
                    say("Il n'est pas possible d'augmenter.[ENTER]")
                    return
                end
                say("Séléctionner une compétence ŕ augmenter:")
                say_size(350, PetSystem[PetIndex].WindowSize)            
                local s = select_table(menu_abi)
                if s == table.getn(menu_abi) then
                    return            
                end
                say_title(PetSystem[PetIndex].Skill[s].name)
                say_orange("Points actuels: "..skill_value[s].." [ENTER]")
                if skill_value[s] == PetSystem[PetIndex].Skill[s].max_points then
                    say("La compétence a atteint le niveau maximum.[ENTER]")
                    return
                end
                say_light_blue("A chaque point: "..PetSystem[PetIndex].Skill[s].desc.."")
                say_light_blue("Nombre maximum de points: "..PetSystem[PetIndex].Skill[s].max_points.."[ENTER]")
                local a = select("Augmenter", "Annuler")
                if a == 2 then
                    return
                end
                say_title(PetSystem[PetIndex].Skill[s].name)
                say("De combien de point voulez-vous augmenter la compétence?[ENTER]")
                local points = tonumber(input())
                say_title(PetSystem[PetIndex].Skill[s].name)
                if points == nil or points < 1 then
                    say("Vous avez entré une valeur incorrecte.[ENTER]")
                    return
                elseif points > skill_points then
                    say("Vous n'avez pas assez de points habilité.[ENTER]")
                    return
                elseif (skill_value[s]+points) > PetSystem[PetIndex].Skill[s].max_points then
                    say("Si vous augmentez la compétence de "..points.." point(s),")
                    say("vous dépasserez la valeurs maximum. Ecrivez")
                    say("une valeur plus petite.[ENTER]")
                    return
                end
                skill_value[s] = skill_value[s]+points
                PetSystem.ChangeSkillPoints(PetIndex, -points)
                PetSystem.SaveSkill(PetIndex, skill_value)
                PetSystem.AddBonus(PetIndex)
                say("La compétence a été augmentée.[ENTER]")
            ----------********** Diminuer Habilité' ***********----------
            elseif a == 2 then
                say_title("Diminuer Habilité'")
                local skill_value = {}
                local menu_abi = {}
                skill_value = PetSystem.LoadSkill(PetIndex)
                for i = 1, table.getn(PetSystem[PetIndex].Skill) do
                    if liv >= PetSystem[PetIndex].Skill[i].min_level then
                        table.insert(menu_abi, PetSystem[PetIndex].Skill[i].name..": "..skill_value[i].." points")
                    end
                end
                table.insert(menu_abi, "Annuler")
                if table.getn(menu_abi) == 1 then
                    say("Il n'est pas possible de diminuer.[ENTER]")
                    return
                end                
                say("Selectionner la compétence ŕ diminuer:")
                say_size(350, PetSystem[PetIndex].WindowSize)                
                local s = select_table(menu_abi)
                if s == table.getn(menu_abi) then
                    return            
                end        
                say_title(PetSystem[PetIndex].Skill[s].name)
                say_orange("Point Habilité actuels: "..skill_value[s].."")
                if skill_value[s] == 0 then
                    say("Vous ne pouvez pas diminuer la compétence.[ENTER]")
                    return
                end
                say("Que faites vous?[ENTER]")
                local b = select("Soustraire 1 point","Supprimer tous les points","Annuler")
                if b == 3 then
                    return
                elseif b == 1 then
                    say_title(PetSystem[PetIndex].Skill[s].name)
                    say("Ętes-vous sur de vouloir retirer un point")
                    say("de compétence?[ENTER]")
                    local c = select("Oui","Non")
                    if c == 2 then
                        return
                    end
                    PetSystem.ChangeSkillPoints(PetIndex, 1)
                    skill_value[s] = skill_value[s]-1
                    PetSystem.SaveSkill(PetIndex, skill_value)
                    PetSystem.AddBonus(PetIndex)
                    say_title(PetSystem[PetIndex].Skill[s].name)
                    say("La compétence a été réduit d'un point.[ENTER]")                    
                elseif b == 2 then
                    say_title(PetSystem[PetIndex].Skill[s].name)
                    say("Ętes-vous sűr de vouloir effacer cette compétence?[ENTER]")
                    local c = select("Oui","Non")
                    if c == 2 then
                        return
                    end
                    PetSystem.ChangeSkillPoints(PetIndex, skill_value[s])
                    skill_value[s] = 0
                    PetSystem.SaveSkill(PetIndex, skill_value)
                    PetSystem.AddBonus(PetIndex)
                    say_title(PetSystem[PetIndex].Skill[s].name)
                    say("La compétence a été remis ŕ zéro.[ENTER]")                    
                end
            end    
----------********** Bloquer/Débloquer Expérience ***********----------
        elseif s == 3 then
            if not PetSystem.IsExpBlocked() then
                say_title("Bloquer Expérience")
                say("Bloquer l'expérience signifie qu'il vous sera ")
                say("impossible de monté ces levels et ces compétences.[ENTER]")
                local a = select("Bloquer","Annuler")
                if a == 2 then
                    return
                end
                say_title("Bloquer Expérience")
                say("L'Expérience de votre familier est bloquer.[ENTER]")
                PetSystem.BlockExp()
            else
                say_title("Sblocca Expérience")
                say("Voulez-vous bloquez l'expérience de votre animal?[ENTER]")
                local a = select("Oui","Non")
                if a == 2 then
                    return
                end
                say_title("Débloquer Expérience")
                say("L'Expérience de votre animal a été débloquer.[ENTER]")
                PetSystem.UnblockExp()
                pc.setqf("current_exp", pc.get_exp())
            end
----------********** Statut Habilité' Pet ***********----------
        elseif s == 4 then
            local skill_value = {}
            skill_value = PetSystem.LoadSkill(PetIndex)        
            say_title("Statut Habilité' - Pet "..PetSystem[PetIndex].Name.."")
            say_light_blue("Santé: "..horse.get_health_pct().."%")
            say("")
            for i = 1, table.getn(PetSystem[PetIndex].Skill) do
                if liv >= PetSystem[PetIndex].Skill[i].min_level then
                    local total = skill_value[i]*PetSystem[PetIndex].Skill[i].mult
                    say_light_yellow(PetSystem[PetIndex].Skill[i].name..": level "..skill_value[i]..". Bonus: "..total..PetSystem[PetIndex].Skill[i].tag)
                end
            end
            say("")    
----------********** Le renvoyer Pet ***********----------            
        elseif s == 5 then
            PetSystem.PetBack()                
        elseif s == 6 then
            return
        end
    end
end

--**
--** Le renvoyer le pet
--**
function PetSystem.PetBack()
    cleartimer("give_exp")
    pet.unsummon()    
    PetSystem.RemoveBonus()
    PetSystem.SetInactive()    
    chat("Vous renvoyez votre familier.")
end
                
--**
--** Carica le abilita' del pet specificato
--**
function PetSystem.LoadSkill(PetIndex)
    local FileName = PetSystem.Folder..pc.get_name().."_"..PetSystem[PetIndex].Name.."_skills"
    local PetSkill = {}
    if io.open(FileName, "r") == nil then
        io.output(FileName)
        for i = 1,table.getn(PetSystem[PetIndex].Skill) do
            io.write("0\n")
            table.insert(PetSkill, 0)
        end
        io.flush()
        io.close()
        return PetSkill
    end
    for line in io.lines(FileName) do
        table.insert(PetSkill, tonumber(line))
    end
    return PetSkill
end

--**
--** Salva le abilita' del pet specificato
--**
function PetSystem.SaveSkill(PetIndex, SkillList)
    local FileName = PetSystem.Folder..pc.get_name().."_"..PetSystem[PetIndex].Name.."_skills"
    io.output(FileName)
    for i,v in ipairs(SkillList) do
        io.write(tostring(v).."\n")
    end
    io.flush()
    io.close()
end

--**
--** Legge lo stato del pet specificato
--**
function PetSystem.ReadStatus(petIndex)
    local FileName = PetSystem.Folder..pc.get_name().."_"..PetSystem[petIndex].Name.."_stats"
    local skill, liv, ex
    if io.open(FileName, "r") != nil then
        io.input(FileName)
        skill = tonumber(io.read())
        liv = tonumber(io.read())
        ex = tonumber(io.read())
        io.input():close()
    else
        io.output(FileName)
        io.write("0\n1\n0\n")
        io.flush()
        io.close()    
        skill = 0
        liv = 1
        ex = 0
    end
    return skill, liv, ex
end

--**
--** Legge il livello del pet specificato
--**
function PetSystem.GetLevel(petIndex)
    local FileName = PetSystem.Folder..pc.get_name().."_"..PetSystem[petIndex].Name.."_stats"
    local liv
    if io.open(FileName, "r") != nil then
        io.input(FileName)
        io.read()
        liv = tonumber(io.read())
        io.input():close()
    else
        liv = 1
    end
    return liv
end

--**
--** Modifica i punti abilitŕ del pet specificato
--**
function PetSystem.ChangeSkillPoints(PetIndex, amount)
    local FileName = PetSystem.Folder..pc.get_name().."_"..PetSystem[PetIndex].Name.."_stats"
    local skill, liv, ex
    if io.open(FileName, "r") != nil then
        io.input(FileName)
        skill = tonumber(io.read())
        liv = tonumber(io.read())
        ex = tonumber(io.read())
        skill = skill+amount
        io.input():close()
    else
        skill = amount
    end
    io.output(FileName)
    io.write(tostring(skill).."\n")
    io.write(tostring(liv).."\n")
    io.write(tostring(ex).."\n")
    io.flush()
    io.close()
end

--**
--** Dŕ Expérience al pet specificato
--**
function PetSystem.GiveExp(petIndex, amount)
    local FileName = PetSystem.Folder..pc.get_name().."_"..PetSystem[petIndex].Name.."_stats"
    local skill, liv, ex
    if io.open(FileName, "r") != nil then
        io.input(FileName)
        skill = tonumber(io.read())
        liv = tonumber(io.read())
        ex = tonumber(io.read())
        ex = ex+amount
        io.input():close()
    else
        skill = 0
        liv = 1
        ex = amount
    end
    if liv == PetSystem[petIndex].MaxLevel then
        return false
    end
    if ex > PetSystem[petIndex].ExpTable[liv] then
        ex = ex-PetSystem[petIndex].ExpTable[liv]
        skill = skill+1
        liv = liv+1
        if liv == PetSystem[petIndex].MaxLevel then
            ex = 0
            chat("L'animal a atteint le niveau maximum!")
        else
            chat("L'animal a atteint le niveau "..liv.."!")
        end
        chat("L'animal a gagné 1 point de compétences")
        if PetSystem.NewSkillLearnt(petIndex, liv) then
            send_letter("Une nouvelle compétence a été débloquer!")
        end
    end
    io.output(FileName)
    io.write(tostring(skill).."\n")
    io.write(tostring(liv).."\n")
    io.write(tostring(ex).."\n")
    io.flush()
    io.close()    
    return true
end

--**
--** Aggiunge i bonus del Pet specificato in base ai Point Habilité assegnati
--**
function PetSystem.AddBonus(PetIndex)
    PetSystem.RemoveBonus()
    local SkillList = {}
    SkillList = PetSystem.LoadSkill(PetIndex)
    for i = 1,table.getn(SkillList) do
        affect.add_hair(PetSystem[PetIndex].Skill[i].type, SkillList[i]*PetSystem[PetIndex].Skill[i].mult, 60*60*24*365)
    end
end

--**
--** Rimuove i bonus del Pet
--**
function PetSystem.RemoveBonus()
    affect.remove(520)
end

--**
--** Imposta nome e livello al cavallo
--**
function PetSystem.SetHorseData(level, name)
    horse.set_name(name)
    horse.set_level(level)
end

--**
--** Controlla se il livello del cavallo e' associato a un pet
--**
function PetSystem.IsPetLevel(level)
    for i = 1,PetSystem.GetPetNumber() do
        if level == PetSystem[i].Level then
            return true
        end
    end
    return false
end

--**
--** Controlla se il pet ha imparato una nuova abilitŕ
--**
function PetSystem.NewSkillLearnt(PetIndex, PetLevel)
    for i = 1,table.getn(PetSystem[PetIndex].Skill) do
        if PetLevel == PetSystem[PetIndex].Skill[i].min_level then
            return true
        end
    end
    return false
end

--**
--** Ritorna il numero totale di pet definiti
--**
function PetSystem.GetPetNumber()
    return table.getn(PetSystem)
end

--** Imposta il pet attivo
function PetSystem.SetActivePet(petIndex)
    pc.setqf(PetSystem.Flag, petIndex)
end

--** Ritorna se il pet system č attivo
function PetSystem.IsActive()
    return (pc.getqf(PetSystem.Flag) > 0)
end

--** Disattiva il pet system
function PetSystem.SetInactive()
    pc.setqf(PetSystem.Flag, 0)
end

--** Ritorna il numero del pet attivo
function PetSystem.GetActivePet()
    return pc.getqf(PetSystem.Flag)
end

--** Blocca l'Expérience al pet
function PetSystem.BlockExp()
    pc.setqf(PetSystem.ExpFlag, 1)
end

--** Sblocca l'Expérience al pet
function PetSystem.UnblockExp()
    pc.setqf(PetSystem.ExpFlag, 0)
end

--** Ritorna se l'Expérience del pet č bloccata
function PetSystem.IsExpBlocked()
    return (pc.getqf(PetSystem.ExpFlag) == 1)
end

--**
--** Stampa a colori
--**

function say_light_yellow(str)
    say(color256(255,255,128)..str..color256(196, 196, 196))
end

function say_yellow(str)
    say(color256(255,255,53)..str..color256(196, 196, 196))
end

function say_orange(str)
    say(color256(255,191,24)..str..color256(196, 196, 196))
end

function say_light_blue(str)
    say(color256(130, 192, 255)..str..color256(196, 196, 196))
end

function say_bonus(str)
    say(color256(167, 255, 212)..str..color256(196, 196, 196))
end
 

 

 

Opublikowano

Przywołalem peta - tylko powiedźcie mi czemu teraz zamiast konia jak przywolam mam lwa?

i jeszcze jedno jak wpisze /m 20120 to pojawia sie lew - bengal... a pety w bazie są dodane jako 20120 normalnie ;p

jeszcze jedno - jak przywolam azraelusia klikam na niego to sie nic nie dzieje

avatarszq.png

Opublikowano

Przywołalem peta - tylko powiedźcie mi czemu teraz zamiast konia jak przywolam mam lwa?

i jeszcze jedno jak wpisze /m 20120 to pojawia sie lew - bengal... a pety w bazie są dodane jako 20120 normalnie ;p

jeszcze jedno - jak przywolam azraelusia klikam na niego to sie nic nie dzieje

 

Masz pomieszane id mobków w db/quest/questlib. Chcac dodać pety z tego tuta musisz przenieść bengale/mikołaja o kilka cyferek

 

 

2vuhg8m.jpg

Opublikowano

DZIEKI DZIEKI !!!!!!

img-Czeres.png


Spodobała ci się moja praca bądź pomogłem ci w czymś bądź człowiekiem i zostaw tego like to nic nie kosztuje a mnie motywuje


Azmal.pl i Theris.pl i iMetin.pl


POLECAM i ZAPRASZAM


Opublikowano

W diffie nie ma id przyzywanych petów tylko quest + questlib ;<

Nie znam się zbytnio na tym ale przepatrzyłem cały quest+questlib bez skutku. To co na końcu questa jest to tylko przyporządkowanie okna menu po kliknięciu na moba. Ogólnie w questlib brakuje funkcji pet.summon która na pewno odpowiada za summon mobów od id 20120 w górę

 

 

@edit

Znalazłem takie info i teraz pytanie jak edytować difa zeby zmienić/dodać(np bambi)

English
Sorry for bad english...

With this dif, we have 9 value that can be used to create new horses (mount that follow us)
To summon the horses, we use the "/horse_level" first...than /horse_summon.
Every level of the horse (up to 21) is connected to a new mount.

HORSE LEVEL-----VALUE MOUNT

22-----20120
23-----20123
24-----20126
25-----20129
26-----20132
27-----20135
28-----20138
29-----20141
30-----20144

Remember that value+1 is the horse of the guild, and value+2 is the horse of the guild leader.
Also remember that you must change the query of database, you can copy the query of the horse (20107) for every new mount.

Now if you do.. "/horse_level 28" and then "/horse_summon"
You summon the mob 20138, that follow you and that it will behave like a horse.
Is a bit confusing, but if you try...you will understand

2vuhg8m.jpg

  • 1 miesiąc temu...
Opublikowano
Hi everyone,

This system is really outdated compared to the new. Can I have a infinite number of pets I can feed them, change their name, make change, and no longer works with the system as the current.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...