Swapping Classes
Swapping Classes
Hi,
I was wondering if has any1 ever done a script to change the class, I was wanting to put that in my project but I could search the forum because "class" and "Change" and too common words and the search just won't take them!
So is there a way to change classes already?
Thanks in advance
I was wondering if has any1 ever done a script to change the class, I was wanting to put that in my project but I could search the forum because "class" and "Change" and too common words and the search just won't take them!
So is there a way to change classes already?
Thanks in advance
Last edited by jduartedj on Wed Dec 01, 2010 9:07 am, edited 1 time in total.
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Swapping Classes
Obviously to change class all you need to do is talk to your house maid and select the right option.
Unfortunately rombot doesn't normally change it's skill set. You could probably reload the profile like you do when you relog although I haven't tried it. Do a search for posts about reloging or changing character.
The good news is, my latest update has me thinking about changing class, so I will be working on an update that will change the skill set and recheck the action keys when it detects a change in class.
Unfortunately rombot doesn't normally change it's skill set. You could probably reload the profile like you do when you relog although I haven't tried it. Do a search for posts about reloging or changing character.
The good news is, my latest update has me thinking about changing class, so I will be working on an update that will change the skill set and recheck the action keys when it detects a change in class.
- 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
Re: Swapping Classes
I tried a profile change with:
and it works, but it will use all skills twice, and when it's switch again, it will use skills triple times etc.
Code: Select all
player = CPlayer.new();
settings.load();
settings.loadProfile("priest");
Re: Swapping Classes
I tested it, you are right.
I don't understand why, but this doesn't work. I would have thought resetting the skills would work.
The only way I could get it to work was to add the "settings.profile.skills = {}" to the actual part of the loadprofile function in settings.lua that loads the skills.
Add it between these 2 lines around line 670. I'll include it the next time I commit changes.
I don't understand why, but this doesn't work. I would have thought resetting the skills would work.
Code: Select all
player = CPlayer.new();
settings.load();
settings.profile.skills = {}
settings.loadProfile("priest");
Add it between these 2 lines around line 670. I'll include it the next time I commit changes.
Code: Select all
local loadSkills = function(node)
settings.profile.skills = {}
local elements = node:getElements();
- 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
Re: Swapping Classes
I have just tested it, and it works now, thank you
Re: Swapping Classes
Nice! dudely noted!raff wrote:I have just tested it, and it works now, thank you
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Swapping Classes
I have just noticed, that the <onLevelup> code in the new loaded profile won't work
Re: Swapping Classes
I have to admit I'm getting a little annoyed with comments like this. "won't work" could mean anything. Did it just not execute the code? Did it do an error? Did it do some other unexpected behavior? What happened when you noticed it didn't work?raff wrote:I have just noticed, that the <onLevelup> code in the new loaded profile won't work
I think maybe the administrator need to add a new forum rule for this. He already has one for creating informative titles, he should also have one saying "When reporting a problem, be informative. Was there an error message? What were you doing at the time? What happened? etc. Don't just put 'this isn't working'".
Sorry, raff, for bringing this up on your post.
- 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
Re: Swapping Classes
Totally agree!rock5 wrote:I have to admit I'm getting a little annoyed with comments like this. "won't work" could mean anything. Did it just not execute the code? Did it do an error? Did it do some other unexpected behavior? What happened when you noticed it didn't work?raff wrote:I have just noticed, that the <onLevelup> code in the new loaded profile won't work
I think maybe the administrator need to add a new forum rule for this. He already has one for creating informative titles, he should also have one saying "When reporting a problem, be informative. Was there an error message? What were you doing at the time? What happened? etc. Don't just put 'this isn't working'".
Sorry, raff, for bringing this up on your post.
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Swapping Classes
Sorry, in my <onLevelup>..</onLevelup> code in the switched profile, I have:
So, I let the bot ran this night, he leveled the first class to level 10, switches the class and levels the second class also to lvl 10, and when I woke up and checked, the second class has not level up the skills. When I load the priest profile manually, it will level up the skills without problems.
But I found out, that you can "pre skill" your skills with SetSpellPoint( 2, 2 ), so I let the bot run this command 10 times on a specific waypoint as a workaround for this. When the priest then level ups, the skill is instantly maxed, without doing anything.
Code: Select all
...
elseif( player.Level == 2 ) then
elseif( player.Level == 2 ) then
sendMacro("SetSpellPoint( 2, 2 );");
sendMacro("SetSpellPoint( 2, 2 );");
printf("Adding skill points to Urgent Heal\n");
But I found out, that you can "pre skill" your skills with SetSpellPoint( 2, 2 ), so I let the bot run this command 10 times on a specific waypoint as a workaround for this. When the priest then level ups, the skill is instantly maxed, without doing anything.
Re: Swapping Classes
Are you reloading the profile as part of your script when you change class? That might be the problem because it would have the wrong skill set loaded.raff wrote:Sorry, in my <onLevelup>..</onLevelup> code in the switched profile, I have:
So, I let the bot ran this night, he leveled the first class to level 10, switches the class and levels the second class also to lvl 10, and when I woke up and checked, the second class has not level up the skills. When I load the priest profile manually, it will level up the skills without problems.Code: Select all
... elseif( player.Level == 2 ) then elseif( player.Level == 2 ) then sendMacro("SetSpellPoint( 2, 2 );"); sendMacro("SetSpellPoint( 2, 2 );"); printf("Adding skill points to Urgent Heal\n");
But I found out, that you can "pre skill" your skills with SetSpellPoint( 2, 2 ), so I let the bot run this command 10 times on a specific waypoint as a workaround for this. When the priest then level ups, the skill is instantly maxed, without doing anything.
- 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
Re: Swapping Classes
any chance of someone making a user function to swap classes?
Botje
Botje
Re: Swapping Classes
ah that could it berock5 wrote: Are you reloading the profile as part of your script when you change class? That might be the problem because it would have the wrong skill set loaded.
I have a waypointfile that runs to varanas, learns priest, go to logar, and then
Code: Select all
player = CPlayer.new();
settings.load();
settings.profile.skills = {}
settings.loadProfile("priest");
loadPaths("priest_start.xml");
Code: Select all
<waypoints type="RUN" >
<!-- # 24 --><waypoint x="-1160" z="-5561"> </waypoint>
<!-- # 25 --><waypoint x="-1199" z="-5787"> </waypoint>
<!-- # 26 --><waypoint x="-1165" z="-5906"> </waypoint>
<!-- # 27 --><waypoint x="-1093" z="-5968"> </waypoint>
<!-- # 28 --><waypoint x="-934" z="-5977"> </waypoint>
<!-- # 29 --><waypoint x="-689" z="-5965"> </waypoint>
<!-- # 30 --><waypoint x="-446" z="-5977"> </waypoint>
<!-- # 31 --><waypoint x="-437" z="-5963">
player:target_NPC("Meydo");
if (player.Class2 == CLASS_PRIEST ) then
sendMacro("ChoiceOption(2);");yrest(3000);
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");
end
</waypoint>
...
botje wrote:any chance of someone making a user function to swap classes?
Botje
Code: Select all
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");
Code: Select all
sendMacro("SwapEquipmentItem();");
Re: Swapping Classes
Funny, when it came up in a previous post that skills get duplicated when you reload the profile, I tried using "settings.profile.skills = {}" like that but it didn't work. The only way I could make it work was to add it inside the loadprofile function. Are you sure that's working for you?raff wrote:Code: Select all
player = CPlayer.new(); settings.load(); settings.profile.skills = {} settings.loadProfile("priest"); loadPaths("priest_start.xml");
- 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
Re: Swapping Classes
ok, so when we put:
in a user function, we can swap both with one easy call?
Botje
Code: Select all
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");
sendMacro("SwapEquipmentItem();");
Botje
Re: Swapping Classes
You forgot:botje wrote:ok, so when we put:
in a user function, we can swap both with one easy call?Code: Select all
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)"); sendMacro("SwapEquipmentItem();");
Botje
Code: Select all
player:target_NPC("Meydo");
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Swapping Classes
Yes it seems everthing is working now, my priest_start.xml now looks like this:rock5 wrote: Funny, when it came up in a previous post that skills get duplicated when you reload the profile, I tried using "settings.profile.skills = {}" like that but it didn't work. The only way I could make it work was to add it inside the loadprofile function. Are you sure that's working for you?
Code: Select all
<waypoints type="RUN" >
<!-- # 1 --><waypoint x="-1160" z="-5561"> </waypoint>
<!-- # 2 --><waypoint x="-1199" z="-5787"> </waypoint>
<!-- # 3 --><waypoint x="-1165" z="-5906"> </waypoint>
<!-- # 4 --><waypoint x="-1093" z="-5968"> </waypoint>
<!-- # 5 --><waypoint x="-934" z="-5977"> </waypoint>
<!-- # 6 --><waypoint x="-689" z="-5965"> </waypoint>
<!-- # 7 --><waypoint x="-446" z="-5977"> </waypoint>
<!-- # 8 --><waypoint x="-437" z="-5963">
player:target_NPC("Meydo");
if (player.Class2 == CLASS_PRIEST ) then
sendMacro("ChoiceOption(2);");yrest(3000);
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");yrest(3000);
sendMacro("SwapEquipmentItem();");
end
player = CPlayer.new();
settings.load();
settings.profile.skills = {}
settings.loadProfile("priest");
loadPaths("priest_start.xml");
__WPL:setWaypointIndex(9);
</waypoint>
<!-- # 9 --><waypoint x="-467" z="-5991"> </waypoint>
...
Code: Select all
Engaging enemy [Fungus] in combat.
Use 1: SCOUT_VAMPIRE_ARROWS=> Fungus (111/111)
Use 4: PRIEST_BONE_CHILL => Fungus (111/111)
Use 2: SCOUT_SHOT => Fungus (105/111)
Use 3: PRIEST_RISING_TIDE => Fungus (105/111)
Use 6: PRIEST_REGENERATE => Fungus (68/111)
Use 2: SCOUT_SHOT => Fungus (60/111)
Use 3: PRIEST_RISING_TIDE => Fungus (60/111)
Use 2: SCOUT_SHOT => Fungus (14/111)
Use 3: PRIEST_RISING_TIDE => Fungus (12/111)
Use 5: PRIEST_URGENT_HEAL => Fungus (0/111)
Fight finished. Killed 7 Fungus. (fight #7 / runtime 21521816 minutes)
Durability:99.99
Use MACRO: Looting target in distance 10.
Clearing target.
Equipment update took: 1
Use MACRO: Executing RoMScript "SetSpellPoint( 2, 2 );".
Use MACRO: Executing RoMScript "SetSpellPoint( 2, 2 );".
Adding skill points to Urgent Heal.
Moving to waypoint #5, (-3571, -7559)
Stopping waypoint: Target acquired.
you can use this for a function:botje wrote:ok, so when we put:
in a user function, we can swap both with one easy call?Code: Select all
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)"); sendMacro("SwapEquipmentItem();");
Botje
Code: Select all
function swapClass(npc, choice)
player:target_NPC(npc);yrest(1000)
sendMacro("ChoiceOption("..choice..");");yrest(1000);
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");
sendMacro("SwapEquipmentItem();");
end
Code: Select all
swapClass("Meydo", 2)
Re: Swapping Classes
Thx this is perfect. One note though, Indent the code! :draff wrote:
you can use this for a function:
usage:Code: Select all
function swapClass(npc, choice) player:target_NPC(npc);yrest(1000) sendMacro("ChoiceOption("..choice..");");yrest(1000); sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)"); sendMacro("SwapEquipmentItem();"); end
meydo is the npc name and 2 is choiceoption 2, I dont know if its always the sameCode: Select all
swapClass("Meydo", 2)
Code: Select all
function swapClass(npc, choice)
player:target_NPC(npc);yrest(1000)
sendMacro("ChoiceOption("..choice..");");yrest(1000);
sendMacro("ExchangeClass(EXCHANGECLASS_SUBCLASS, EXCHANGECLASS_MAINCLASS)");
sendMacro("SwapEquipmentItem();");
end
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Who is online
Users browsing this forum: Ahrefs [Bot] and 47 guests