Checking Nature's Power

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
scithen
Posts: 25
Joined: Sun Oct 21, 2012 9:55 pm

Checking Nature's Power

#1 Post by scithen » Tue Nov 13, 2012 11:22 am

I was planning on doing some grinding on my druid, and after last night I learned that
I'll drain my NP very quickly with Earth Chain and Summon Sandstorm. I'd like to be able
to check it after leaving combat, but I've not yet figured out how to check it. I know it's
player.Nature, I'm just not sure how to use it. I know one of these files/posts I've read
had an example, I think using Urgent Heal, but I can't find it for the life of me.

Code: Select all

if ( player.Nature < 3 ) then
   player:cast("DRUID_RESTORE_LIFE");
   else
      if (player.Nature = 0 ) then
   player:cast("DRUID_CURING_SEED");
   player:cast("DRUID_RESTORE_LIFE");
   player:cast("DRUID_RESTORE_LIFE");
      end
end
Sorry in advance if I screwed that up horribly, the last time I did something like that was
when I was using making mob programs with ROM OLC for MUDs. Would that work? I've
got a lot of stuff to get done irl, so no time to test it right now.. but it looks like it'd work
in theory, assuming all of the syntaxes are right. Was planning on putting that in the
onLeaveCombat section, to maintain Nature's Power so Sandstorm and Earth Chain do
their full damage.

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

Re: Checking Nature's Power

#2 Post by rock5 » Tue Nov 13, 2012 12:30 pm

I don't think it's right. It says "if < 3 then cast 1 restore life else if == 0". It wont equal 0 because then it would be < 3 and it would do that part instead. Maybe it's supposed to be "> 3".
  • 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: Checking Nature's Power

#3 Post by lisa » Tue Nov 13, 2012 6:23 pm

Code: Select all

 if (player.Nature = 0 ) then
needs to be

Code: Select all

 if (player.Nature == 0 ) then
as rock said though if Nature < 3 then it could be 0, so the "else if" check will never be 0

if Nature < 3 -- any number smaller than 3
else -- opposite of the previous if check, so it will be for 3 or greater.
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

scithen
Posts: 25
Joined: Sun Oct 21, 2012 9:55 pm

Re: Checking Nature's Power

#4 Post by scithen » Wed Nov 14, 2012 3:49 am

Ah, okay.. the basic idea was that if it was below 3, to just cast one spell for the
point, otherwise if I was empty, to cast those 3, since it was taking me 2 Earth Chains
and 1 Sandstorm to kill a group of mobs. I guess I'm better off just checking if it's
below a certain level, then restoring my NP that way.

Thanks.

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

Re: Checking Nature's Power

#5 Post by rock5 » Wed Nov 14, 2012 4:19 am

So what you want to do is start with "if nature == 0". So I think what you are saying is you want this

Code: Select all

if (player.Nature == 0 ) then
	player:cast("DRUID_CURING_SEED");
	player:cast("DRUID_RESTORE_LIFE");
	player:cast("DRUID_RESTORE_LIFE");
elseif ( player.Nature < 3 ) then
	player:cast("DRUID_RESTORE_LIFE");
end
I hope you realize, though, that if player.Nature = 1 then it will become only 2 after this which is not enough for your 3 skills. Maybe you could add a "if nature < 2".
  • 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

scithen
Posts: 25
Joined: Sun Oct 21, 2012 9:55 pm

Re: Checking Nature's Power

#6 Post by scithen » Wed Nov 14, 2012 9:17 am

Yeah, that looks like what I wanted it to do, just had it backwards apparently. Though
your last comment has me curious. Is the onLeaveCombat code executed one time after
leaving comment? That would make sense, but this will be my first time doing anything
with it, aside from using your catchCavy script. Which I totally love, btw, it makes it
so much easier with those little buggers.

This will help with showing me how to use different variables and whatnot in the future,
but I think I'm going to just keep it simple and do a check for < 3. My gear and level
have gotten a little better, so fewer casts are needed.

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

Re: Checking Nature's Power

#7 Post by lisa » Wed Nov 14, 2012 5:19 pm

just a little FYI thingy, it is better to use > as opposed to < because the < is an opener for < >

So you would just reverse their order,

Code: Select all

elseif ( 3 > player.Nature ) then
Code still does the exact same thing but no chance of the bot thinking the < is opening up a <Stuff> thingy
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

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest