Hello, I have created a list of all pre-re mvp's to use in the pet system.
I created the eggs in item_db, the descriptions in itemInfo.lua and the settings in pet_db.yml
The eggs are working perfectly, but it is not possible to capture the bosses.
"Q: I un-commented the MVPs/Mini-Bosses, but I still can't capture any! How come?
A: Servers by default do not support capturing Boss Mosters, if you wish to enable this, go to src/map/pet.c [...]"
But I noticed that source is very different, and I need help making this modification ...
can anybody help me?
I believe that this is where the change should be made
emulador/src/map/pet.cpp
/**
* Begin the actual catching process of a monster.
* @param sd : player requesting
* @param target_id : monster ID of pet to catch
* @return 0:success, 1:failure
*/
int pet_catch_process2(struct map_session_data* sd, int target_id)
{
struct mob_data* md;
int pet_catch_rate = 0;
nullpo_retr(1, sd);
md = (struct mob_data*)map_id2bl(target_id);
if(!md || md->bl.type != BL_MOB || md->bl.prev == NULL) { // Invalid inputs/state, abort capture.
clif_pet_roulette(sd,0);
sd->catch_target_class = PET_CATCH_FAIL;
sd->itemid = sd->itemindex = -1;
return 1;
}
//FIXME: delete taming item here, if this was an item-invoked capture and the item was flagged as delay-consume [ultramage]
std::shared_ptr<s_pet_db> pet = pet_db.find(md->mob_id);
// If the target is a valid pet, we have a few exceptions
if( pet ){
//catch_target_class == PET_CATCH_UNIVERSAL is used for universal lures (except bosses for now). [Skotlex]
if (sd->catch_target_class == PET_CATCH_UNIVERSAL && !status_has_mode(&md->status,MD_STATUS_IMMUNE)){
sd->catch_target_class = md->mob_id;
//catch_target_class == PET_CATCH_UNIVERSAL_ITEM is used for catching any monster required the lure item used
}else if (sd->catch_target_class == PET_CATCH_UNIVERSAL_ITEM && sd->itemid == pet->itemID){
sd->catch_target_class = md->mob_id;
}
}
if(sd->catch_target_class != md->mob_id || !pet) {
clif_emotion(&md->bl, ET_ANGER); //mob will do /ag if wrong lure is used on them.
clif_pet_roulette(sd,0);
sd->catch_target_class = PET_CATCH_FAIL;
return 1;
}
pet_catch_rate = (pet->capture + (sd->status.base_level - md->level)*30 + sd->battle_status.luk*20)*(200 - get_percentage(md->status.hp, md->status.max_hp))/100;
if(pet_catch_rate < 1)
pet_catch_rate = 1;
if(battle_config.pet_catch_rate != 100)
pet_catch_rate = (pet_catch_rate*battle_config.pet_catch_rate)/100;
if(rnd()%10000 < pet_catch_rate) {
achievement_update_objective(sd, AG_TAMING, 1, md->mob_id);
unit_remove_map(&md->bl,CLR_OUTSIGHT);
status_kill(&md->bl);
clif_pet_roulette(sd,1);
struct mob_db *mdb = mob_db(pet->class_);
intif_create_pet(sd->status.account_id, sd->status.char_id, pet->class_, mdb->lv, pet->EggID, 0, pet->intimate, 100, 0, 1, mdb->jname);
} else {
clif_pet_roulette(sd,0);
sd->catch_target_class = PET_CATCH_FAIL;
}
return 0;
}
Question
Gladius
Hello, I have created a list of all pre-re mvp's to use in the pet system.
I created the eggs in item_db, the descriptions in itemInfo.lua and the settings in pet_db.yml
The eggs are working perfectly, but it is not possible to capture the bosses.
I was looking for the solution here in the forum and found this topic:
https://rathena.org/board/topic/98804-big-627-pet-pack/ There is a mention in the FAQ:
But I noticed that source is very different, and I need help making this modification ...
can anybody help me?
I believe that this is where the change should be made
emulador/src/map/pet.cpp
Tks
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.