Hallo erstmal, habe folgendes problem...
Meine Pet´s kann jeder Char außer Krieger nutzen, es steht nur da das er die Vorraussetzungen nicht erfüllt.
Wo könnten diese Vorraussetzungen definiert sein ?
Hier meine quest:
Code
- quest pet_system begin
- state start begin
- function get_pet_info(itemVnum)
- pet_info_map = {
- -- [ITEM VNUM] MOB_VNUM, DEFAULT NAME, buff_idx, spawn_effect_idx
- [53001] = { 34001, "'s Feuerphönix", 0},
- [53003] = { 34003, "'s Eisphönix", 0},
- [53017] = { 34016, "'s Jadephönix", 0},
- [53002] = { 34002, "'s Rentierjunges", 0},
- [53007] = { 34010, "'s Bambi", 0},
- [53005] = { 34004, "'s Baby-Azrael", 0},
- [53006] = { 34009, "'s Baby-Azrael (gold)", 0},
- [53010] = { 34008, "'s Leonidas", 0},
- [53011] = { 34007, "'s Khan", 0},
- [53012] = { 34005, "'s Porkie", 0},
- [53013] = { 34006, "'s Rufus", 0},
- [53009] = { 34012, "'s Bao Bao", 0},
- [53008] = { 34011, "'s Knuud", 0},
- [53016] = { 34015, "'s Boney", 0},
- [53014] = { 34013, "'s Dickes Henkerchen", 0},
- [53015] = { 34014, "'s Dickes Henkerchen (gold)", 0},
- [53020] = { 34017, "'s Polar-Porkie", 0},
- [53019] = { 34019, "'s Arktis-Khan", 0},
- [53018] = { 34020, "'s Schnee-Leonidas", 0},
- [53022] = { 34021, "'s Sheldon", 0},
- [53023] = { 34022, "'s Cooper", 0},
- [53024] = { 34023, "'s Pantherbaby", 0},
- [53025] = { 34024, "'s Leopardenbaby", 0},
- [53021] = { 34018, "'s Frost-Rufus", 0},
- [53223] = { 34027, "'s Kleiner Feger", 0},
- [53222] = { 34026, "'s Kleiner Feger", 0},
- [53224] = { 34028, "'s Flöckchen", 0},
- [53225] = { 34029, "'s Glöckchen", 0},
- [53226] = { 34030, "'s Cupido", 0},
- [53227] = { 34031, "'s Zorniges Herz", 0},
- [53228] = { 34032, "'s Blaues Mondsichelchen", 0},
- [53229] = { 34033, "'s Rotes Mondsichelchen", 0},
- [53240] = { 34063, "'s Mondlaterne (orange)", 0},
- [53241] = { 34062, "'s Mondlaterne (blau)", 0},
- [53232] = { 34039, "'s Baby-Huashin", 0},
- [53233] = { 34055, "'s Bruce", 0},
- [53234] = { 34056, "'s Wayne", 0},
- [53235] = { 34057, "'s Robin", 0},
- [53238] = { 34058, "'s Valentino", 0},
- [53239] = { 34059, "'s Valentinia", 0},
- [53231] = { 34035, "'s Blauer Widder", 0},
- [53230] = { 34034, "'s Weiße Schnucke", 0},
- [55701] = { 34041, "'s Kleiner Affe", 0},
- [55702] = { 34045, "'s Kleine Spinne", 0},
- [55703] = { 34049, "'s Kleiner Razador", 0},
- [55704] = { 34053, "'s Kleiner Nemere", 0},
- [55705] = { 34036, "'s Kleiner Drache", 0},
- [55706] = { 34064, "'s Meleys Baby", 0},
- [55721] = { 34042, "'s Kleiner Affe Held", 0},
- [55722] = { 34046, "'s Kleine Spinne Held", 0},
- [55723] = { 34050, "'s Kleiner Razador Held", 0},
- [55724] = { 34054, "'s Kleiner Nemere Held", 0},
- [55725] = { 34037, "'s Kleiner Drache Held", 0},
- [55726] = { 34065, "'s Meleys Baby Held", 0},
- }
- itemVnum = tonumber(itemVnum)
- return pet_info_map[itemVnum]
- end
- function get_spawn_effect_file(idx)
- effect_table = {
- [0] = nil,
- [1] = "d:\\\\ymir work\\\\effect\\\\etc\\\\buff\\\\buff_item3.mse",
- }
- return effect_table [idx]
- end
- when 53001.use or 53003.use or 53017.use or 53002.use or 53007.use or 53005.use or 53006.use or 53010.use or 53011.use or 53012.use or 53013.use or 53009.use or 53008.use or 53016.use or 53014.use or 53015.use or 53020.use or 53019.use or 53018.use or 53022.use or 53023.use or 53024.use or 53025.use or 53021.use or 53223.use or 53222.use or 53224.use or 53225.use or 53226.use or 53227.use or 53228.use or 53229.use or 53240.use or 53241.use or 53232.use or 53233.use or 53234.use or 53235.use or 53238.use or 53239.use or 53231.use or 53230.use or 55701.use or 55702.use or 55703.use or 55704.use or 55705.use or 55706.use or 55721.use or 55722.use or 55723.use or 55724.use or 55725.use or 55726.use begin
- local pet_info = pet_system.get_pet_info(item.vnum)
- if null != pet_info then
- local mobVnum = pet_info[1]
- local petName = pet_info[2]
- local spawn_effect_file_name = pet_system.get_spawn_effect_file(pet_info[3])
- if true == pet.is_summon(mobVnum) then
- if spawn_effect_file_name != nil then
- pet.spawn_effect (mobVnum, spawn_effect_file_name)
- end
- pet.unsummon(mobVnum)
- syschat("Du hast dein Haustier weggeschickt.")
- else
- if pet.count_summoned() < 1 then
- pet.summon(mobVnum, petName, false)
- syschat("Du hast dein Haustier erfolgreich gerufen.")
- else
- syschat("Du hast schon ein Haustier gerufen.")
- end
- if spawn_effect_file_name != nil then
- pet.spawn_effect(mobVnum, spawn_effect_file_name)
- end
- end -- if pet.is_summon
- end -- if null != pet_info
- end -- when
- end -- state
- end -- quest