Jump to content
  • 0
Sign in to follow this  
Hadeszeus

Lower the chance of summoning MVP

Question

Can someone help me on how to lower the chance of summoning MVP's using ABRACADABRA skill? This can be spam on any server. Thanks in advance!

 

		case SA_ABRACADABRA:			{				int abra_skill_id = 0, abra_skill_lv, abra_idx;				do {					abra_idx = rnd() % MAX_SKILL_ABRA_DB;					abra_skill_id = skill->abra_db[abra_idx].skill_id;				} while (abra_skill_id == 0 ||					skill->abra_db[abra_idx].req_lv > skill_lv || //Required lv for it to appear					rnd()%10000 >= skill->abra_db[abra_idx].per				);				abra_skill_lv = min(skill_lv, skill->get_max(abra_skill_id));				clif->skill_nodamage (src, bl, skill_id, skill_lv, 1);				if( sd )				{// player-casted					sd->state.abra_flag = 1;					sd->skillitem = abra_skill_id;					sd->skillitemlv = abra_skill_lv;					clif->item_skill(sd, abra_skill_id, abra_skill_lv);				}				else				{// mob-casted					struct unit_data *ud = unit->bl2ud(src);					int inf = skill->get_inf(abra_skill_id);					if (!ud) break;					if (inf&INF_SELF_SKILL || inf&INF_SUPPORT_SKILL) {						if (src->type == BL_PET)							bl = (struct block_list*)((TBL_PET*)src)->msd;						if (!bl) bl = src;						unit->skilluse_id(src, bl->id, abra_skill_id, abra_skill_lv);					} else {	//Assume offensive skills						int target_id = 0;						if (ud->target)							target_id = ud->target;						else switch (src->type) {							case BL_MOB: target_id = ((TBL_MOB*)src)->target_id; break;							case BL_PET: target_id = ((TBL_PET*)src)->target_id; break;						}						if (!target_id)							break;						if (skill->get_casttype(abra_skill_id) == CAST_GROUND) {							bl = map->id2bl(target_id);							if (!bl) bl = src;							unit->skilluse_pos(src, bl->x, bl->y, abra_skill_id, abra_skill_lv);						} else							unit->skilluse_id(src, target_id, abra_skill_id, abra_skill_lv);					}				}			}			break;

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Guest

db/abra_db.txt

 

// Structure of Database://        SkillID,DummyName,RequiredHocusPocusLevel,Rate//// 01. SkillID                  Skill ID to be casted by hocus pocus.// 02. DummyName                Name of the skill (informative, not used by server).// 03. RequiredHocusPocusLevel  Minimum skill level of hocus pocus for the current skill to be selected.// 04. Rate                     Chance at which a skill is selected (1 = 0.01%, 10000 = 100%).

 

This could be intressting for you, @skill 292, Summon Monster :)

Edited by Guest

Share this post


Link to post
Share on other sites
  • 0

db/abra_db.txt

 

// Structure of Database://        SkillID,DummyName,RequiredHocusPocusLevel,Rate//// 01. SkillID                  Skill ID to be casted by hocus pocus.// 02. DummyName                Name of the skill (informative, not used by server).// 03. RequiredHocusPocusLevel  Minimum skill level of hocus pocus for the current skill to be selected.// 04. Rate                     Chance at which a skill is selected (1 = 0.01%, 10000 = 100%).

 

This could be intressting for you, @skill 292, Summon Monster :)

Dunno about this haha keep looking in the source :D Thanks buddy!

Share this post


Link to post
Share on other sites
  • 0
Guest

 

db/abra_db.txt

 

// Structure of Database://        SkillID,DummyName,RequiredHocusPocusLevel,Rate//// 01. SkillID                  Skill ID to be casted by hocus pocus.// 02. DummyName                Name of the skill (informative, not used by server).// 03. RequiredHocusPocusLevel  Minimum skill level of hocus pocus for the current skill to be selected.// 04. Rate                     Chance at which a skill is selected (1 = 0.01%, 10000 = 100%).

 

This could be intressting for you, @skill 292, Summon Monster :)

Dunno about this haha keep looking in the source :D Thanks buddy!

No problem, glad that i helped you :)

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.