Jump to content
  • 0

Slave Summon Same as Master HP


Bringer

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  742
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

 

			int summons[5] = { 1661, 1643, 1640, 1644 };
			int class_ = skill_id == AM_SPHEREMINE ? MOBID_MARINE_SPHERE : summons[skill_lv - 1];
			enum mob_ai ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
			struct mob_data *md;

			// Correct info, don't change any of this! [celest]
			md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src), class_, "", SZ_SMALL, ai);
			if (md) {
				md->master_id = src->id;
				md->special_state.ai = ai;
				if (md->deletetimer != INVALID_TIMER)
					delete_timer(md->deletetimer, mob_timer_delete);
				md->deletetimer = add_timer(gettick() + skill_get_time(skill_id, skill_lv), mob_timer_delete, md->bl.id, 0);
				mob_spawn(md); //Now it is ready for spawning.
			}
		}
		break;

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.03
  • Content Count:  112
  • Reputation:   9
  • Joined:  09/22/19
  • Last Seen:  

Look in status.cpp for this:

 

Spoiler

switch(ud->skill_id) {
                case AM_SPHEREMINE:
                    status->max_hp =

And then switch max health to what you want. I think I've gotten closer to cracking it, but I haven't figured out how the blocklist is setup for mob spawns. On mercs, elementals, and pets, it's probably quite a bit easier (my mercs read my base level and increase stats accordingly when they first spawn). For mob slaves, it probably has something to do with this:
 

Spoiler

((TBL_MOB*)mbl)->master_id

My guess is that you have to figure out how the block list is setup so that you can then go from master_id to the master's stats to pull out the max_hp data. I just wish I knew enough about C++ to see what was included in mob_data table.

For how I have my mercs set up- that adjust their health to be a little more balanced based on what my base level is- you can see that here:

Spoiler

status->max_hp += ((((TBL_MER*)bl)->master->status.base_level) - ((TBL_MER*)bl)->db->lv ) * 200;
        status->max_hp = cap_value(status->max_hp, 0, SHRT_MAX);

This takes their standard max health, say 2000 at whatever level they might be at, then it subtracts their base level from mine and multiplies it by 200. If I'm lv. 100 and I'm using a lv. 20 merc, it gives the merc a bonus 80*200 HP  (+16,000 HP).

Edited by Humble_Bee
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  742
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

@Humble_Bee i will to make like i have 1m HP or 5HP will be = of the owner summoner

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...