onskill for priest/mage

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

onskill for priest/mage

#1 Post by kuripot »

please help me to edit... i got headache because of many times i trying to do this in my onskill

Code: Select all

	   if player.Class1 == 5 and player.Class2 == 4 then -- priest/mage
	      player:cast("PRIEST_RISING_TIDE")
	   end
		if( arg1.Name == "PRIEST_RISING_TIDE" ) then
		yrest(100);
		player:cast("PRIEST_CHAIN_OF_LIGHT");
		end 
		if( arg1.Name == "PRIEST_CHAIN_OF_LIGHT" ) then
		yrest(100);
		player:cast("MAGE_FIREBALL");
		player:cast("MAGE_LIGHTNING");
		end 
		if( arg1.Name == "MAGE_FIREBALL" ) then
		yrest(100);
		player:cast("PRIEST_ICE_FOG");
		end 
		if( arg1.Name == "PRIEST_ICE_FOG" ) then
		yrest(100);
		player:cast("PRIEST_RISING_TIDE");
		end 
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: onskill for priest/mage

#2 Post by lisa »

what exactly are you trying to do?

Because it seems like you want to cast those skills in order regardless of whether you are even targeting a mob or if the mob is already dead.
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
kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: onskill for priest/mage

#3 Post by kuripot »

i want to cast that all skill in sequence if my class is priest/mage and if im scout/priest i will make other skill sequence...if i can make it in my priest/mage... i think i can do it in my priest/scout


im not sure in my onskill... how many "end" i will put..
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: onskill for priest/mage

#4 Post by lisa »

kuripot wrote:i want to cast that all skill in sequence if my class is priest/mage and if im scout/priest i will make other skill sequence...if i can make it in my priest/mage... i think i can do it in my priest/scout


im not sure in my onskill... how many "end" i will put..
So you use 3 class combinations for the 1 character?
P/M
S/P
P/S
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
kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: onskill for priest/mage

#5 Post by kuripot »

as of now i using m/p and p/m maybe p/s in future in 1 char... my onskill is OK if i use p/m but when i swap m/p i got error.. i know even i dont create onskill for m/p as long i doing right in onskill of p/m it will not use onskill of p/m

im not sure in this part.. how many "end' i will use and when i will use "end"

Code: Select all

      if player.Class1 == 5 and player.Class2 == 4 then -- priest/mage
         player:cast("PRIEST_RISING_TIDE")
      end
      if( arg1.Name == "PRIEST_RISING_TIDE" ) then
      yrest(100);
Attachments
chill.JPG
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: onskill for priest/mage

#6 Post by lisa »

well in order for your originally posted code to only be done if P/M you would need to have it like this

Code: Select all

if player.Class1 == 5 and player.Class2 == 4 then -- priest/mage
	player:cast("PRIEST_RISING_TIDE")
	if( arg1.Name == "PRIEST_RISING_TIDE" ) then
		yrest(100);
		player:cast("PRIEST_CHAIN_OF_LIGHT");
	end 
	if( arg1.Name == "PRIEST_CHAIN_OF_LIGHT" ) then
		yrest(100);
		player:cast("MAGE_FIREBALL");
		player:cast("MAGE_LIGHTNING");
	end 
	if( arg1.Name == "MAGE_FIREBALL" ) then
		yrest(100);
		player:cast("PRIEST_ICE_FOG");
	end 
	if( arg1.Name == "PRIEST_ICE_FOG" ) then
		yrest(100);
		player:cast("PRIEST_RISING_TIDE");
	end 
end
I really have no idea how effective this code would be though, if it was me I would make a profile which works for P/M and S/P which would be easy for the same profile and then if needed later to have a P/S I would make another profile (ps.xml) for it and just call the other profile when starting bot

Code: Select all

rom/bot profile:ps path:***
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: onskill for priest/mage

#7 Post by rock5 »

I don't think it would work as intended. I'm pretty sure that a manually cast skill, such as player:cast("PRIEST_RISING_TIDE") does not trigger the on cast event. So the other skills that you want to be cast in sequence, wont be.
  • 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: onskill for priest/mage

#8 Post by lisa »

how well would having a loadprofile() in the onload of a profile work.

Something like this

Code: Select all

	<onLoad><![CDATA[
	if player.Class == CLASS_PRIEST and player.Class2 == CLASS_SCOUT then
		loadProfile("ps")
	end
	]]></onLoad>
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
kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: onskill for priest/mage

#9 Post by kuripot »

right now i using this as my onskillcast

Code: Select all

	if player.Class1 == 5 and player.Class2 == 4 then -- priest/mage
	   player:cast("PRIEST_RISING_TIDE")
	   if( arg1.Name == "PRIEST_RISING_TIDE" ) then
	      yrest(100);
	      player:cast("PRIEST_CHAIN_OF_LIGHT");
		yrest(100);
	   end
	   if( arg1.Name == "PRIEST_CHAIN_OF_LIGHT" ) then
	      yrest(100);
	      player:cast("MAGE_FIREBALL");
		yrest(100);
	      player:cast("MAGE_LIGHTNING");
		yrest(100);
	   end
	   if( arg1.Name == "MAGE_FIREBALL" ) then
	      yrest(100);
	      player:cast("PRIEST_ICE_FOG");
		yrest(100);
	      player:cast("PRIEST_BONE_CHILL");
		yrest(100);
	   end
	   if( arg1.Name == "PRIEST_BONE_CHILL" ) then
	      yrest(100);
	      player:cast("PRIEST_RISING_TIDE");
		yrest(100);
	   end
	end
	if player.Class1 == 4 and player.Class2 == 5 then -- mage/priest
	   player:cast("MAGE_FIREBALL")
	   if( arg1.Name == "MAGE_FIREBALL" ) then
	      yrest(100);
	      player:cast("PRIEST_RISING_TIDE");
	      yrest(100);
	      player:cast("MAGE_LIGHTNING");
		yrest(100);
	   end
	   if( arg1.Name == "PRIEST_RISING_TIDE" ) then
	      yrest(100);
	      player:cast("MAGE_ELEMENTAL_WEAKNESS");
		yrest(100);
	      player:cast("MAGE_FLAME");
		yrest(1000);
	   end
	   if( arg1.Name == "MAGE_FLAME" ) then
	      yrest(1000);
	   end
	   if( arg1.Name == "MAGE_FLAME" ) then
	      yrest(1000);
	      player:cast("PRIEST_RISING_TIDE");
		yrest(100);
	   end
	end
and work fine.. not yet doing for p/s scout not yet leveled... my only question is....
i can use this as onload in my waypoint... so it can use only in specific waypoint
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: onskill for priest/mage

#10 Post by rock5 »

I believe onskill cast is a function that is stored in settings.profile.events.onSkillCast. So you should be able to setup your onskillcast in the onload of your waypoint file like this

Code: Select all

settings.profile.events.onSkillCast = function()
    ... your code
end
  • 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
Post Reply