Jump to content
  • 0

Checking Skill Level on Mobs


Humble_Bee

Question


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

I know that pc_checkskill works on players to find out what level of a skill they have learned (if at all), and I'm looking for a similar function for mobs. If one doesn't exist, does anyone know the path the src would check? Is it something like "mob_skill[skill_id].skill_lv"? I tried coding:

 

int skill_checklevel(struct block_list *src, uint16 skill_id) {

	if (src->type == BL_MOB){
		
		struct mob_data *md = (struct mob_data*)src;
		struct mob_skill *ms;
		int i;
		int level = 0;
	
		nullpo_ret(ms = md->db->skill);

		for (i = 0; i < MAX_MOBSKILL; i++){
			if(ms[i].skill_id == skill_id){
			level = ms[i].skill_lv;
		    break;
			}
			else{
			level = 0;
			}

		}
			
	return level; 
	
	}
}


And it didn't work. I've also tried a few other variations, and they didn't work either. If I knew the path the src followed, I could probably figure it out, but I haven't yet. I want to be able to make passive boosts for mobs based on skill level known, but have been stumped.

Edited by Humble_Bee
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...