[HELP]OFFİCİAL PET SYSTEM

06/28/2013 14:48 bakam321#1
help does not work

PHP 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 Fire Phoenix", 0},
                [
53002]     = { 34002, "'s Baby Reindeer", 0},
                [
53003]     = { 34003, "'s Ice Phoenix", 0},
                [
53004]     = { 34001, "'s Fire Phoenix", 0},
                [
53005]     = { 34004, "'s Baby Gahnasel", 1},
                [
53010]     = { 34008, "'s Leonidas", 0},
                [
53011]     = { 34007, "'s Khan", 0},
                [
53012]     = { 34005, "īs Porky", 0},
                [
53013]     = { 34006, "īs Rufus", 0},
                [
53007]     = { 34010, "'s Bambi", 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\\\\appear_die\\\\npc2_appear.mse",
            }
            return 
effect_table [idx]
        
end
        when 53007.
use or 53013.use or 53012.use or 53011.use or 53010.use or 53005.use or 53004.use or 53003.use or 53002.use or 53001.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)
                else
                    if 
pet.count_summoned() < 1 then
                        pet
.summon(mobVnum, petName, false)
                    else
                        
syschat("You already summoned a pet.")
                    
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 
06/28/2013 14:50 Metin2 Team#2
you have to have the mobs in your mob_proto with the right vnums

34001
34002
....
34010

btw, Wrong Section next time post [Only registered and activated users can see links. Click Here To Register...]
06/28/2013 14:51 thehero09#3
I tried, but I can not run. One of my friends is working, but he does not know how it is working. :D
06/28/2013 14:51 Aze /..#4
Reading is hard, hmm?

[Only registered and activated users can see links. Click Here To Register...]
06/28/2013 14:52 bakam321#5
Quote:
Originally Posted by .AweZome' View Post
Reading is hard, hmm?

[Only registered and activated users can see links. Click Here To Register...]
yardım edin :)
06/28/2013 14:53 thehero09#6
Quote:
Originally Posted by Metin2 Team View Post
you have to have the mobs in your mob_proto with the right vnums

34001
34002
....
34010

btw, Wrong Section next time post [Only registered and activated users can see links. Click Here To Register...]
it is the right vnums.
06/28/2013 14:54 #SoNiice#7
"I can not run" - This is worst error text I've ever read here. Tell us your problem or we can't help u.
06/28/2013 14:57 bakam321#8
Quote:
Originally Posted by SoNiice View Post
"I can not run" - This is worst error text I've ever read here. Tell us your problem or we can't help u.
What's wrong?
06/28/2013 15:00 .aNNdii##9
#moved
06/28/2013 15:02 thehero09#10
Quote:
Originally Posted by SoNiice View Post
"I can not run" - This is worst error text I've ever read here. Tell us your problem or we can't help u.
Sorry, my english is very bad. :D