Jump to content
  • 0

Status condition that increases range (SCB_RANGE)?


bodibastos

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   0
  • Joined:  10/13/12
  • Last Seen:  

Hey guys, I've been trying to add a status condition that increases the weapon's range. For the sake of testing I'm currently using SC_TWOHANDQUICKEN.

I went on status.c and tried to add a line below the AC_VULTURE effect, since it's similar to what I want to do:

	if((skill=pc_checkskill(sd,AC_VULTURE))>0) {
#ifndef RENEWAL
		base_status->hit += skill;
#endif
		if(sd->status.weapon == W_BOW)
			base_status->rhw.range += skill;
	}

	if (sc->data[SC_TWOHANDQUICKEN])
		base_status->rhw.range += 4;

But I noticed two issues:

  • First, this is only applying to autoattack range, even though I'm testing on a skill which is supposed to take the Weapon's range. I'd like the status effect to affect both autoattacks AND weapon-range based skills (I have skillrange_from_weapon set on my skill.conf).
  • Second, the range bonus isn't being removed when the status condition ends (presumably because the server isn't refreshing the player's range because there's no reason to). How can I force the server to refresh this when the status ends? I noticed there's an unused SCB_RANGE bonus in the status.c file, so maybe I could use that? I'd appreciate some light on this.

Thanks in advance.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

Are you trying to edit a skill for that purpose? How do you intend to use it? There's a script bonus that does that for you. 

Screenshot_20170615-085729.thumb.png.1246eb45d6ea8f7498a678f3e59bdb6e.png

You can use it via auto attack bonus as well. :)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   0
  • Joined:  10/13/12
  • Last Seen:  

Thanks for the suggestion, but I'm trying to make a status condition, not an item. Unless there's some way I could base the status condition on the bAtkRange code?

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