Jump to content

Summon pet after teleport


Recommended Posts

Hey,

 

as man of you should know some servers (World of Metin, Baria) have a "system" which summons the pet which was summoned last after teleportation.

I tried it using quest flags in the summon quest but it doesn't work because the quest function pet.summon() needs a item which was selected short before.

So here is my question: Does anyone know how to do this via game source or even has a tip where to search? I searched the whole Petsystem.cpp but didn't get any idea where to start.

 

Thanks in advance

Link to comment
Share on other sites

Put a qf when u click the item pet with the vnum ex;

local mob_vnum = pet_info[1] <-- here vnum of pet.

pc.setqf("pet_vnum", mob_vnum)
And other qf when is summon = 1 and unssummon = 0

when login with pc.getqf("pet_summon") == 1 begin
 pet.summon(pc.getqf("pet_vnum"), ......)
end

its just an example, but you can do easy if you play with the qf's.

 

Good luck.

Link to comment
Share on other sites

34 minutes ago, ѕeмa™ said:

Put a qf when u click the item pet with the vnum ex;

local mob_vnum = pet_info[1] <-- here vnum of pet.

pc.setqf("pet_vnum", mob_vnum)
And other qf when is summon = 1 and unssummon = 0

when login with pc.getqf("pet_summon") == 1 begin
 pet.summon(pc.getqf("pet_vnum"), ......)
end

its just an example, but you can do easy if you play with the qf's.

 

Good luck.

That is exactly what I did and I already wrote in this topic that is not working because the Pet Summon function needs to have a selected item which is the seal to summon the pet.

Link to comment
Share on other sites

We accomplished this by adding a pet equipment slot.

If you want to do it without source modification (quest only) you could save the item id in a questflag when summoning the pet in the first place -> item.get_id()

When you'll relog or teleport the questflag will still hold the unique item_id which you can use to set your current used quest item -> item.select(pc.getqf('pet_item_id'))

After that you can just use pet.summon() because CQuestManager::instance().GetCurrentItem() is now returning a valid LPITEM instance (by our previously defined item.select(pc.getqf('pet_item_id')) )

 

 

  • Love 1
Link to comment
Share on other sites

24 minutes ago, Socialized said:

We accomplished this by adding a pet equipment slot.

If you want to do it without source modification (quest only) you could save the item id in a questflag when summoning the pet in the first place -> item.get_id()

When you'll relog or teleport the questflag will still hold the unique item_id which you can use to set your current used quest item -> item.select(pc.getqf('pet_item_id'))

After that you can just use pet.summon() because CQuestManager::instance().GetCurrentItem() is now returning a valid LPITEM instance (by our previously defined item.select(pc.getqf('pet_item_id')) )

 

 

Well I prefer a solution using the source code

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 3

      Crystal Metinstone

    2. 3

      Feeding game source to LLM

    3. 113

      Ulthar SF V2 (TMP4 Base)

    4. 3

      Feeding game source to LLM

    5. 0

      Target Information System

    6. 3

      Feeding game source to LLM

    7. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.