rage detection?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

rage detection?

#1 Post by botje »

anybody knows what i need to do to detect current rage level?

i want to let my char use a rage potion when its below 10, but i dont even know how to

find it xd

tried checking in player.lua, but it didnt show up there :S

thanx in advance guys ^^

Botje
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rage detection?

#2 Post by lisa »

rage is for warrior right and starts at 0 and builds up during battle?
If you set it to use the pot anytime its under 10 it would constantly use pots.

Tha game itself designates what ever the character uses to power it's spells to be mana. They have a Manatypeid, rage = 2.

So

Code: Select all

UnitMana("player")
would technically get the value u want if you are after the value for Class1, it's a romscript though so need to use sendmacro.

As for rombot itself, I couldn't find any reference to rage. Maybe admin or rock5 could comment if rage is treated same as mana when it comes to getting values.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rage detection?

#3 Post by rock5 »

It looks like player.MP holds the level of whatever power your class uses but it is also copied to the relevant variable.

So for example, for warriors, player.MP is copied to player.Rage. For magic users player.MP is copied to player.Mana, etc.

So as a warrior you can check player.MP or player.Rage. They are the same.

As to continuously using the potion, you could check whether you are in battle as well as if your rage is below 10.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rage detection?

#4 Post by lisa »

rock5 wrote:As to continuously using the potion, you could check whether you are in battle as well as if your rage is below 10.
Wouldn't it use a pot at the start of all combat, assuming your rage went to 0 between battles. I know my rage on warr is used up completely anytime it has rage.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rage detection?

#5 Post by botje »

well, ofcourse i would only let it use it in battle :)

and thanx guys, im gonna check if i can get something to work ^^

Botje
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: rage detection?

#6 Post by rock5 »

lisa wrote:
rock5 wrote:As to continuously using the potion, you could check whether you are in battle as well as if your rage is below 10.
Wouldn't it use a pot at the start of all combat, assuming your rage went to 0 between battles. I know my rage on warr is used up completely anytime it has rage.
Well yeh. He said he wanted to use the potions when his rage was below 10. Maybe that's the way he wants to use it.

In the end, if you can think how and when to use the potion then there is a way to write it up.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rage detection?

#7 Post by botje »

exactly, im sure i can think of something :)

and dont forget the potions have a minute cooldown, so it wont be like all the time using it anyway ^^

Botje
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rage detection?

#8 Post by botje »

Code: Select all

if( 10 < player.Rage ) then
	inventory:useItem("Rage Potion") -- the name of the potion
end
this should work then right?

Botje
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rage detection?

#9 Post by lisa »

if you wanted to use a potion anytime you have more than 10 rage then.

Code: Select all


if(  player.Rage > 10 ) then
   inventory:useItem("Rage Potion") -- the name of the potion
end

try not to use < in code as it can mess things up, I didn't test this but it should work, should.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rage detection?

#10 Post by botje »

it should actually use it UNDER 10 rage

how would that be then?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rage detection?

#11 Post by lisa »

botje wrote:

Code: Select all

if( 10 > player.Rage ) then
	inventory:useItem("Rage Potion") -- the name of the potion
end
this should work then right?

Botje
Pretty much what you had but with the > instead of <.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: rage detection?

#12 Post by botje »

cool, thank you :)

Botje
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: rage detection?

#13 Post by lisa »

happy to help =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Post Reply