Jump to content
  • 0

Adding buffs/status to monster?


gekigengar

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   2
  • Joined:  08/30/13
  • Last Seen:  

I wanted to add buffs to certain monsters that kills a player from OnPCdeath event (Was that the event name..?), How do I do that?

 

like for example, blessing for 30 minutes or so.

 

I don't think

 

sc_start
 

has a target ID to assign doesn't it?.

 

sc_start <Player/monster ID> <Buff Name> <Duration>

 

It would be nice if this were the case.., or is there a specific function ready for this..?

Edited by gekigengar
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

What your asking for currently isn't possible. Doing so would require either one of 2 different things.

1. Either edit the src to make a custom trigger_event for mob skills which states that X skill is activated upon killing an opponent. (Currently is not available).

OR

2. Create a custom script_command (also requires src edits) that will give X mob Y status effect. This method also requires the need to obtain that specific monsters GID (unique ID given to each entity in RO. Example: Player logs on Char 1, his GID = 1. He logs out, then logs in as Char 2, his GID = 2. Logs out again, then back in as Char 2, his GID = 3.) Granted GID's don't increase in this numerical order, it is safe to say, the GID changes each and every time you log in and out. Lastly each mob has a different GID.

 

So in this case option 1 is currently you best bet. You should take your request to the src_request section.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   2
  • Joined:  08/30/13
  • Last Seen:  

What your asking for currently isn't possible. Doing so would require either one of 2 different things.

1. Either edit the src to make a custom trigger_event for mob skills which states that X skill is activated upon killing an opponent. (Currently is not available).

OR

2. Create a custom script_command (also requires src edits) that will give X mob Y status effect. This method also requires the need to obtain that specific monsters GID (unique ID given to each entity in RO. Example: Player logs on Char 1, his GID = 1. He logs out, then logs in as Char 2, his GID = 2. Logs out again, then back in as Char 2, his GID = 3.) Granted GID's don't increase in this numerical order, it is safe to say, the GID changes each and every time you log in and out. Lastly each mob has a different GID.

 

So in this case option 1 is currently you best bet. You should take your request to the src_request section.

 

Option 1 is not universal, and probably is not what I wanted.

 

I would take option 2.

 

The Idea is, I would like a chance to stun MVPs on each attack instances, when MVP has 50% hp or lower. (2 second stun, based on missing HP %. (stun boss at (100 - ((100 - (remaining hp/maxhp) *100)))) / 10 percentage.)

 

(I am trying to create an OnPCAttack based on this

http://www.eathena.ws/board/index.php?showtopic=205005)

 

and probably, is trying to get even closer to my main idea.

 

(My MVP Battle system is finished except for this feature.., It is a lot different than normal RO, and this feature is absolutely needed.)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I see, well, even if you DO create the OnPCAttack Label, or any of the other 4 listed in that topic, the fact remains you still need the command, which inflicts a status effect upon the target with a % chance calculated using your formula. Best of luck :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   2
  • Joined:  08/30/13
  • Last Seen:  

I see, well, even if you DO create the OnPCAttack Label, or any of the other 4 listed in that topic, the fact remains you still need the command, which inflicts a status effect upon the target with a % chance calculated using your formula. Best of luck :D

 

I notice there is one problem though, that I cannot get "Current HP" of the monster looking at the constants.. or did I overlook something..? :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

No, you can't get current HP of a monster through current means. Which is why you'd need a src edit. Preferably just a custom command that will inflict a status effect at the ratio given by your formula. This would be done on the src side, where the script side, would just require arguments such as this:

sc_mob(<gid>,<status effect>,<duration>); //Gives X mob, Y status effect, for Z duration at the formula listed in the src edit.

Of course there are better ways to go about this, such as fine tuning as well as making commands to fetch current HP of a monster, but for now this seems like the easiest to do.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   2
  • Joined:  08/30/13
  • Last Seen:  

No, you can't get current HP of a monster through current means. Which is why you'd need a src edit. Preferably just a custom command that will inflict a status effect at the ratio given by your formula. This would be done on the src side, where the script side, would just require arguments such as this:

sc_mob(<gid>,<status effect>,<duration>); //Gives X mob, Y status effect, for Z duration at the formula listed in the src edit.

Of course there are better ways to go about this, such as fine tuning as well as making commands to fetch current HP of a monster, but for now this seems like the easiest to do.

 

Src edit, that will be hard to find where to edit on.

 

Hmm, At least I got a clue to move forward to my objective. I Thank you for your supports.

:D

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