How to Change Class?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

How to Change Class?

#1 Post by Lamkefyned » Fri Jan 03, 2014 6:21 pm

How to Change Class?

How to Change Class Mage - Priest and Priest - Mage?
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to Change Class?

#2 Post by rock5 » Sat Jan 04, 2014 2:27 am

It depends. But if you just have 2 classes and just want to switch between your primary and secondary class, you can use an addon that automates it for you like "streamline". Then all you have to do is target the npc and select the option, eg.

Code: Select all

player:target_NPC("npc name")
RoMScript("ChoiceOption(4)")
If you are going to do any other code in that waypoint you should also do a player:update() before any other code.
  • 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
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: How to Change Class?

#3 Post by BlubBlab » Sat Jan 04, 2014 7:24 pm

If you have the add-on ClassExchangeHelper (support only 3 classes private have more)
Thier is a way to remote control it:

example:

Code: Select all

player:target_NPC("Marliss-Schwester");
	if(my condition)then
		--From class 1/3 to 3/1
		sendMacro("ChoiceOption(3);")
		yrest(500);
		RoMScript("CEH.func.ExchangeClass(CEH.Data.class1.ID,CEH.Data.class2.ID)");	
		yrest(100);
		RoMScript("SwapEquipmentItem(3)");
		yrest(2000);
		player:update() 
	end
the reversed way:

Code: Select all

player:target_NPC("Marliss-Schwester");
	if(my condition)then
		--From class 3/1 to 1/3
		sendMacro("ChoiceOption(3);")
		yrest(100);
		RoMScript("CEH.func.ExchangeClass(CEH.Data.class2.ID,CEH.Data.class1.ID)");	
		yrest(100);
		RoMScript("SwapEquipmentItem(1)");
		yrest(2000);
		player:update() 
	end
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: How to Change Class?

#4 Post by Bill D Cat » Sat Jan 04, 2014 11:36 pm

And if you don't use any add-ons to help with class swapping, you can use this command to swap your current classes. If you want to swap classes with a third class, then you can specify the class names as described in the comments.

Code: Select all

--==[ Simple function to swap classes at housekeeper inside house ]==--
-- mainClass = CLASS_WARRIOR, CLASS_SCOUT, etc. to become your primary class. No quotes around the class name.
-- secClass  = CLASS_WARRIOR, CLASS_SCOUT, etc. to become your secondary class. No quotes around the class name.
-- If no arguments are given, then the player's current classes will be swapped.

function swapClass(mainClass, secClass)
	player:target_NPC(110758) -- ID for housemaid inside house
	yrest(1000)
	ChoiceOptionByName(getTEXT("HOUSE_MAID_HOUSE_CHANGEJOB"))
	yrest(3000)
	player:update()
	local pri, sec
	if mainClass == nil then
		pri = player.Class2 + 1
		sec = player.Class1 + 1
	else
		pri = mainClass + 1
		sec = secClass + 1
	end
	RoMScript("ExchangeClass("..pri..","..sec..")")
end
Example:

Code: Select all

swapClass(CLASS_MAGE,CLASS_WARRIOR)

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to Change Class?

#5 Post by Lamkefyned » Sun Jan 05, 2014 8:05 am

Thank you so much
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to Change Class?

#6 Post by Lamkefyned » Fri Jan 10, 2014 7:06 pm

error

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- Demonstration Battle daily quest -->
<!-- v1.0 -->
<!-- by: lolita -->
<!-- Do Demonstration Battle daily quest in Rorazan, and use daily reset tickets if you have some -->
<onLoad>
settings.profile.mobs = {106474,106475,106476};
function checkCondition()
	queststate = getQuestStatus(425124);
	if queststate == "complete" then
		__WPL:setWaypointIndex(__WPL:findWaypointTag("complete"));
	end
end

function checkLoopCondition()
	queststate = getQuestStatus(425124);
	if queststate ~= "complete" then
	__WPL:setWaypointIndex(__WPL:findWaypointTag("incomplete"));
	end
end

function getclass()
	-- those 3 class can be main or secoundary
	if (player.Class1 == 4 or player.Class2 == 4) then -- mage
		SlashCommand("/cast Fireball")
	elseif (player.Class1 == 2 or player.Class2 == 2) then -- scout
		SlashCommand("/cast Shot")
	elseif (player.Class1 == 3 or player.Class2 == 3)  then 	-- rogue
		SlashCommand("/cast Shadowstab")
	-- class who can do daily
	elseif player.Class1 == 5 then 			-- priest
		SlashCommand("/cast Chain of Light")
	elseif player.Class1 == 6 then 			-- knight
		SlashCommand("/cast Holy Strike")
	elseif player.Class1 == 7 then 			-- warden
		SlashCommand("/cast Charged Chop")
	elseif player.Class1 == 9 then 			-- warlock
		SlashCommand("/cast Surge of Malice")
	-- for those 3 class didnt found useful skill for doing this daily
	-- so you must use them with mage, scout or rogue as secoundary class
	elseif player.Class1 == 8 then 			-- druid
		printf("Pls change your secondary class to Mage or Scout or Rogue");
		player:sleep()
	elseif player.Class1 == 10 then 		-- champion
		printf("Pls change your secondary class to Mage or Scout or Rogue");
		player:sleep()
	elseif player.Class1 == 1 then 			-- warrior
		printf("Pls change your secondary class to Mage or Scout or Rogue");
		player:sleep()
	end
end
function doquest()
	LockedOn = RoMScript("UnitExists('target')")
	enemy = RoMScript("UnitCanAttack('player','target')")
	if (not LockedOn) or (not enemy) then
		for i=1,5 do
			if getQuestStatus(425124) == "complete" then
				break
			end
			RoMScript("TargetNearestEnemy()")
			getclass()
			yrest(500)
		end
	end
end
</onLoad>	
	<!-- #  1 --><waypoint x="-18346" z="-22692" y="469">
	checkCondition()	
	local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
			if 10 == dailyQuestCount then
				if inventory:itemTotalCount(202434) > 0 then
					printf("We will use Daily Quest Reset Ticket");
					inventory:useItem(202434)
					yrest(1000)
					loadPaths(__WPL.FileName)
				elseif inventory:itemTotalCount(202434) == 0 then
					error("Ending script",2)
				end
			else
      			printf("Done "..dailyQuestCount.." of " .. dailyQuestsPerDay ..    " Left " .. dailyQuestsPerDay - dailyQuestCount .. " Quests.");
      		end
			player:target_NPC(119856)
			AcceptQuestByName(425124)
	</waypoint>
	<!-- #  2 --><waypoint x="-18346" z="-22692" y="469" tag="incomplete">
			player:target_NPC(119856)
			sendMacro("ChoiceOption(1);")
	</waypoint>
	<!-- #  3 --><waypoint x="-18331" z="-22677" y="469">
			doquest()
			checkLoopCondition()
	</waypoint>
	<!-- #  4 --><waypoint x="-18346" z="-22692" y="469" tag="complete">	</waypoint>
	<!-- #  5 --><waypoint x="-18356" z="-22767" y="459">	</waypoint>
	<!-- #  6 --><waypoint x="-18405" z="-22943" y="459">	</waypoint>
	<!-- #  7 --><waypoint x="-18263" z="-22960" y="459">	</waypoint>
	<!-- #  8 --><waypoint x="-17936" z="-23020" y="471">	</waypoint>
	<!-- #  9 --><waypoint x="-17610" z="-23325" y="552">	</waypoint>
	<!-- # 10 --><waypoint x="-17601" z="-23528" y="552">	</waypoint>
	<!-- # 11 --><waypoint x="-17264" z="-23427" y="620">
player:target_NPC(120185);
   if(my condition)then
      sendMacro("ChoiceOption(3);")
      yrest(500);
      RoMScript("CEH.func.ExchangeClass(CEH.Data.class1.ID,CEH.Data.class2.ID)");   
      yrest(100);
      RoMScript("SwapEquipmentItem(3)");
      yrest(2000);
      player:update() 
   end
	</waypoint>
	<!-- # 12 --><waypoint x="-17341" z="-23542" y="624">	</waypoint>
	<!-- # 13 --><waypoint x="-18244" z="-23356" y="458">	</waypoint>
	<!-- # 14 --><waypoint x="-18518" z="-23124" y="425">	</waypoint>
	<!-- # 15 --><waypoint x="-18380" z="-22777" y="459">	</waypoint>
	<!-- # 16 --><waypoint x="-18352" z="-22714" y="472">
			player:target_NPC(119856);
			CompleteQuestByName(425124);
	</waypoint>
	<!-- # 17 --><waypoint x="-18095" z="-23006" y="471">	</waypoint>
	<!-- # 18 --><waypoint x="-17759" z="-23134" y="471">	</waypoint>
	<!-- # 19 --><waypoint x="-17634" z="-23378" y="552">	</waypoint>
	<!-- # 20 --><waypoint x="-17610" z="-23546" y="552">	</waypoint>
	<!-- # 21 --><waypoint x="-17262" z="-23415" y="620">
player:target_NPC(120185);
   if(my condition)then
      sendMacro("ChoiceOption(3);")
      yrest(100);
      RoMScript("CEH.func.ExchangeClass(CEH.Data.class2.ID,CEH.Data.class1.ID)");   
      yrest(100);
      RoMScript("SwapEquipmentItem(1)");
      yrest(2000);
      player:update() 
   end
	</waypoint>
	<!-- # 22 --><waypoint x="-17334" z="-23554" y="624">	</waypoint>
	<!-- # 23 --><waypoint x="-18181" z="-23394" y="458">	</waypoint>
	<!-- # 24 --><waypoint x="-18500" z="-23144" y="425">	</waypoint>
	<!-- # 25 --><waypoint x="-18361" z="-22717" y="473">	</waypoint>
</waypoints>
Sin título.png
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to Change Class?

#7 Post by rock5 » Fri Jan 10, 2014 10:34 pm

if(my condition)then
You probably copied this code from some example. "my condition" is supposed to be replaced with your condition, ie. under what circumstances you want to execute that code.
  • 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
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to Change Class?

#8 Post by Lamkefyned » Fri Jan 10, 2014 10:45 pm

And I have to put?

code put it up our friend BlubBlab
If you think something is right just because everyone else believes,you're not thinking.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: How to Change Class?

#9 Post by BlubBlab » Sat Jan 11, 2014 12:50 am

my condition was something like:

Code: Select all

player.Name=="mychar" and player.Level > 70
if you want to use it without any condition simple erase the code around it

Code: Select all

if()then 
.<= Let that stay
.<= until end
end
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to Change Class?

#10 Post by Lamkefyned » Sat Jan 11, 2014 4:55 am

thanks
If you think something is right just because everyone else believes,you're not thinking.

883Dman
Posts: 90
Joined: Sat Dec 08, 2012 9:25 pm

Re: How to Change Class?

#11 Post by 883Dman » Fri Jan 17, 2014 2:51 pm

Been trying to get this work for an hour. Tried half a dozen different methods. I just want to swap between my two classes to turn in drake bones. Dont need to swap gear or mess with skills.

Code: Select all

	<!-- #  1 --><waypoint x="-6621" z="-8128" y="1466">
			
	player:target_NPC("Sahaly Leitin");
   if()then
      
      sendMacro("ChoiceOption(3);")
      yrest(500);
      RoMScript("CEH.func.ExchangeClass(CEH.Data.class1.ID,CEH.Data.class2.ID)");   
      yrest(100);
    
      player:update() 
   end
	</waypoint>
I tried removing the if statement altogether, pasting it exactly as shown above, tried just doing a choose option 3, choose option 2 etc to change class. What's shown just crashes. Doing simple option selection doesn't do anything, which is odd.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: How to Change Class?

#12 Post by BlubBlab » Fri Jan 17, 2014 4:10 pm

Code: Select all

<!-- #  1 --><waypoint x="-6621" z="-8128" y="1466">
         
   player:target_NPC("Sahaly Leitin");
  
     
      sendMacro("ChoiceOption(3);")
      yrest(500);
      RoMScript("CEH.func.ExchangeClass(CEH.Data.class1.ID,CEH.Data.class2.ID)");   
      yrest(100);
   
      player:update()
   
   </waypoint>
you should have deleted if and end completely.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

883Dman
Posts: 90
Joined: Sat Dec 08, 2012 9:25 pm

Re: How to Change Class?

#13 Post by 883Dman » Sat Jan 18, 2014 7:47 pm

I knew it was something simple. Thx.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests