Register for your free account! | Forgot your password?

You last visited: Today at 21:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Pet System With Name .

Discussion on [Release]Pet System With Name . within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
[Release]Pet System With Name .

Hallo



Will I Don't Know What I Have To Say , Just This System Made By Saud bin abdullah & MrLibya





Note : You Have To Add [ Credit to : lollo_9_1 // epvp ]

Note2 : First Quest Have Arabic Pet Names , Change It To You Lang

Note3: The System Is Read Normal Pet Names From The Quest , But When You Use The Tool You Will Have To Put Your New Pet Name ,And That Is What You Pet Will Be

Note4 : Well This Is Import For Who Want Too Look As Gunis If You Shorten The Quest somehow Don't Share It Here Let It To You Salf :angry: If You Want To Look like the Best Quest Writer Then Why You did'nt you Make The Quest By You Self

Note4 : Sorry For My Bed Eng :d




Quest Was Tested And Work 100%



pet_system :

Code:
-- Pet Name System
-- By Saud bin abdullah & MrLibya
-- www.Arab-Dev.Org
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, " عنقاء النار ", 0},
                [53002]     = { 34002, " صغير الرنة ", 0},
                [53003]     = { 34003, " عنقاء الثلج ", 0},
                [53004]     = { 34001, " عنقاء النار ", 0},
                [53005]     = { 34004, " صغير فرعائيل ", 1},
                [53006]     = { 34009, " صغير فرعائيل ", 0},    -- Baby Azrael (gold)
                [53007]     = { 34010, " بامبي ", 0},
                [53008]     = { 34011, " كنود ", 0},            -- Knuud
                [53009]     = { 34012, " باو باو ", 0},        -- Bao Bao
                [53010]     = { 34008, " ليوندس ", 0},
                [53011]     = { 34007, " خان ", 0},
                [53012]     = { 34005, " بوركي ", 0},
                [53013]     = { 34006, " ريوفوس ", 0},    
                [53016]     = { 34015, " العظمي ", 0},
                [53017]     = { 34016, " عنقاء الغابة ", 0},
                [71171]     = { 34013, " Redthief young", 0},
                [71172]     = { 34014, " Redthief young", 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 53001.use or 53002.use or 53003.use or    53004.use or 53005.use  or 53006.use or 53007.use or 53008.use or 53009.use or 53010.use or  53011.use or 53012.use or 53013.use or 53016.use or 53017.use or  71171.use or 71172.use begin
            local pet_info = pet_system.get_pet_info(item.vnum)
            local name = pc.get_name()
            
            if null != pet_info then
                if game.get_event_flag(""..name.."pet") == 1 then

                
                 local res1, Pname = mysql_direct_query("select * from  player.pet_system where id = "..pc.get_player_id().." limit 1;")
                local mobVnum = pet_info[1]
                local petName = Pname[1].pet_name
                local petNameO = 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, "'s - "..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
            else
                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
                end -- if pet.is_summon
            end  -- if null != pet_info
        end -- when
    end -- state
end -- quest
Pet Name:

Code:
-- Pet Name System
-- By Saud bin abdullah & MrLibya
-- www.Arab-Dev.Org
quest pet_system_name begin
    state start begin        
        when 71055.use begin
             say_title(" Pet Name ")
             say(" You  Want Change Your Pet Name ?  ")
             local s = select(" Yes "," No ")
             if s == 2 then return end
             say_title(" Pet Name ")
             say(" Write New Name ")
             local NewPetNm = input()
             if NewPetNm == "" then
             say_title(" Pet Name ")
             say("")
             say_reward(" Write Some Thing ")
             say("")
    return
end
             if string.len(NewPetNm) < 1 or string.len(NewPetNm) > 20 then
             say_title(" Pet Name ")
             say("")
             say_reward(" It's Too Long ")
             say("")
        return
end  
                say_title(" Pet Name ")
                say(" Your New Pet Name Set OK  ")
            if pc.getqf ("pet_name_new") == 0 then
             local name = pc.get_name()
            mysql_direct_query("select * from player.pet_system;")
             mysql_direct_query("INSERT INTO `pet_system` (`id`,  `pet_name`) VALUES ('"..pc.get_player_id().."', '"..NewPetNm.."');")
             game.set_event_flag(""..name.."pet", 1)
             pc.setqf("pet_name_new", 1)
             syschat(" Your New Pet Name Set OK ")
            
             else
             local name = pc.get_name()
             local res1, res2 = mysql_direct_query("select * from player.pet_system;")
             mysql_direct_query("UPDATE `pet_system` SET `pet_name`='"..NewPetNm.."' WHERE id='"..pc.get_player_id().."';")
             game.set_event_flag(""..name.."pet", 1)
             syschat("Your Pet Name Has Been Update ")
             end -- when
        end
    end -- state
end -- quest
Sql : Put It In Player

Code:
[B][COLOR=#800000]SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `pet_system`
-- ----------------------------
DROP TABLE IF EXISTS `pet_system`;
CREATE TABLE `pet_system` (
  `id` int(11) NOT NULL,
  `pet_name` varchar(12) NOT NULL DEFAULT 'NONAME',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
MrLibya is offline  
Thanks
11 Users
Old 11/15/2014, 22:16   #2

 
AntikerGolem's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 2,125
Received Thanks: 844
Cool, but thats the Offizial Gameforge pet system quest..
AntikerGolem is offline  
Old 11/15/2014, 22:21   #3
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
This Is THe Official :
Code:
quest pet_system begin
    state start begin
        function get_pet_info(itemVnum)
            pet_info_map = {
            --  [ITEM VNUM] MOB_VNUM, DEFAULT NAME
                [53001]     = { 34001, gameforge.pet_system._010_say ,0},
                [53002]     = { 34002, gameforge.pet_system._020_say ,0},
                [53003]     = { 34003, gameforge.pet_system._040_say ,0},
                [53005]     = { 34004, gameforge.pet_system._050_say, 1},
                [53006]     = { 34009, gameforge.pet_system._050_say, 1},
                [53010]     = { 34008, gameforge.pet_system._060_say, 0},
                [53011]     = { 34007, gameforge.pet_system._070_say, 0},
                [53012]     = { 34005, gameforge.pet_system._080_say, 0},
                [53013]     = { 34006, gameforge.pet_system._090_say, 0},
                [53007]     = { 34010, gameforge.pet_system._100_say, 0},
                [53008]     = { 34011, gameforge.pet_system._110_say, 0},
                [53009]     = { 34012, gameforge.pet_system._120_say, 0},
                -- GF specials
                [38200]     = { 34006, gameforge.pet_system._090_say, 0},
                [38201]     = { 34006, gameforge.pet_system._090_say, 0},
                [53014]     = { 34013, gameforge.pet_system._130_say, 0},
                [53015]     = { 34014, gameforge.pet_system._140_say, 0},
                [53016]     = { 34015, gameforge.pet_system._150_say, 0},
                [53017]     = { 34016, gameforge.pet_system._160_say, 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 38200.use or 38201.use or 53007.use or 53013.use or 53012.use or 53011.use or 53010.use or 53006.use  or 53005.use or 53002.use or 53001.use or 53003.use or 53008.use or 53009.use or
             53014.use or 53015.use  or 53016.use or 53017.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(gameforge.pet_system._030_chat)
                    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
MrLibya is offline  
Old 11/15/2014, 22:24   #4

 
AntikerGolem's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 2,125
Received Thanks: 844
And whats wrong with this one?
AntikerGolem is offline  
Old 11/15/2014, 22:28   #5
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Nothing
The First , I Edit IT and Make Pet name system
the 2th it's official quest without edit .


MrLibya is offline  
Old 11/15/2014, 22:30   #6
 
-Zhui-'s Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
Quote:
Originally Posted by MrLibya View Post
This Is THe Official :
Code:
quest pet_system begin
    state start begin
        function get_pet_info(itemVnum)
            pet_info_map = {
            --  [ITEM VNUM] MOB_VNUM, DEFAULT NAME
                [53001]     = { 34001, gameforge.pet_system._010_say ,0},
                [53002]     = { 34002, gameforge.pet_system._020_say ,0},
                [53003]     = { 34003, gameforge.pet_system._040_say ,0},
                [53005]     = { 34004, gameforge.pet_system._050_say, 1},
                [53006]     = { 34009, gameforge.pet_system._050_say, 1},
                [53010]     = { 34008, gameforge.pet_system._060_say, 0},
                [53011]     = { 34007, gameforge.pet_system._070_say, 0},
                [53012]     = { 34005, gameforge.pet_system._080_say, 0},
                [53013]     = { 34006, gameforge.pet_system._090_say, 0},
                [53007]     = { 34010, gameforge.pet_system._100_say, 0},
                [53008]     = { 34011, gameforge.pet_system._110_say, 0},
                [53009]     = { 34012, gameforge.pet_system._120_say, 0},
                -- GF specials
                [38200]     = { 34006, gameforge.pet_system._090_say, 0},
                [38201]     = { 34006, gameforge.pet_system._090_say, 0},
                [53014]     = { 34013, gameforge.pet_system._130_say, 0},
                [53015]     = { 34014, gameforge.pet_system._140_say, 0},
                [53016]     = { 34015, gameforge.pet_system._150_say, 0},
                [53017]     = { 34016, gameforge.pet_system._160_say, 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 38200.use or 38201.use or 53007.use or 53013.use or 53012.use or 53011.use or 53010.use or 53006.use  or 53005.use or 53002.use or 53001.use or 53003.use or 53008.use or 53009.use or
             53014.use or 53015.use  or 53016.use or 53017.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(gameforge.pet_system._030_chat)
                    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
Its like 90% the same..

//Edit: Now I get it, its with a Name quest. Its okay thank you.
-Zhui- is offline  
Old 11/15/2014, 22:34   #7
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Read Good

Quote:
Originally Posted by -Zhui- View Post

//Edit: Now I get it, its with a Name quest. Its okay thank you.
+ In The Topice Not Bed
MrLibya is offline  
Old 11/16/2014, 12:01   #8
 
[SA]Hylight's Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 164
Received Thanks: 34
But why with mysql_direct_query what is the differed to mysql_query
don't understand..

can i edit the mysql_direct_query to mysql_query in the quest without errors by Compiling?
[SA]Hylight is offline  
Old 11/16/2014, 12:24   #9
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Well I Use Source So I Use mysql_direct_query . becous i ssee that mysql_query crep .

Try Maybe It's Well Work
MrLibya is offline  
Old 11/16/2014, 19:36   #10
 
iWizz's Avatar
 
elite*gold: 0
Join Date: Aug 2013
Posts: 116
Received Thanks: 73
Quote:
Originally Posted by MrLibya View Post
Well I Use Source So I Use mysql_direct_query . becous i ssee that mysql_query crep .

Try Maybe It's Well Work
mysql_query function will work for that.

Why?
Code:
mysql_direct_query("select * from  player.pet_system where id = "..pc.get_player_id().." limit 1;")
it's not an loop... modify in:
Code:
mysql_direct_query("select * from  player.pet_system where id = "..pc.get_player_id()..";")
Evite to use flags for that modify in pc.setf will be better.
iWizz is offline  
Old 11/16/2014, 20:01   #11
 
MrLibya's Avatar
 
elite*gold: 30
Join Date: Mar 2012
Posts: 517
Received Thanks: 339
Quote:
Originally Posted by iWizz View Post
mysql_query function will work for that.

Why?
Code:
mysql_direct_query("select * from  player.pet_system where id = "..pc.get_player_id().." limit 1;")
it's not an loop... modify in:
Code:
mysql_direct_query("select * from  player.pet_system where id = "..pc.get_player_id()..";")
Evite to use flags for that modify in pc.setf will be better.
Well It's Not Problem . All Ways Work Then Do It By The Way You Want
MrLibya is offline  
Old 12/05/2014, 12:27   #12
 
fannan10's Avatar
 
elite*gold: 0
Join Date: Apr 2013
Posts: 130
Received Thanks: 16
good job brother
fannan10 is offline  
Thanks
1 User
Old 12/07/2014, 01:37   #13
 
.Λnvil's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 97
Received Thanks: 103
Thanks! This is what i search!
.Λnvil is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release] Iphone-System (Offline Message System)
04/19/2013 - Metin2 PServer Guides & Strategies - 74 Replies
Da ich dafür kein nutzen mehr habe und dies nun alles per Python geregelt habe (ein Dankeschön an .Nova, der mir dabei geholfen hat). Release ich mein iPhone System. mit dem konnte man Nachrichten ingame an andere Spieler senden. Lief knapp halbes (server ist seit 2 monaten down) jahr und bisher tratt auch nie ein Fehler auf... Quest ist im Anhang sowie die Datenbank... Fuktionen:
[Release] Taiwan Server files [New Global Chat,new party system,new guild system]
10/24/2012 - SRO PServer Guides & Releases - 80 Replies
those files used by creddy online :) USE IN YOUR OWN RISK server files --removed--- DB http://www.mediafire.com/?3ocz3a0adsazsf6



All times are GMT +1. The time now is 21:25.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.