Title check.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Title check.

#1 Post by ZZZZZ »

Could anyone with Fire Training and/or Soldier's Attack run this in commandline?

Code: Select all

	totalTitles = RoMScript("GetTitleCount()"); for i=1, totalTitles do; titleName, titleId = RoMScript("GetTitleInfoByIndex("..i..")"); if titleName ~= nil then; if titleName == "Vanguard Field Marshal" then cprintf(cli.yellow,"\nFireTraining - Index: "..i..", ID: "..titleId.."\n") elseif titleName == "Resplendent Carnival Viscount" then cprintf(cli.yellow,"\nSoldier's Attack - Index: "..i..", ID: "..titleId.."\n") end end end
And tell me what the yellow print's are? Thanks :) ~~ It may take a while to run through.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Title check.

#2 Post by rock5 »

I don't have them but my guess is the title ids are as follows.
  • Vanguard Field Marshal - 530467
    Resplendent Carnival Viscount - 530538
I got the ids using the Rom Language File Converter. http://solarstrike.net/phpBB3/viewtopic ... 258#p22258

If you were after the index numbers, I can't help you there.
  • 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
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Title check.

#3 Post by ZZZZZ »

All good. Got a few friends to run it for me, found the index numbers depend on when you got the title....which sucks. I was hoping I would be able to simply check what titles a player had (Fire Training or Soldiers attack) by going through the index number :( Instead just making it use

Code: Select all

RoMScript("SetTitleRequest(530467)"); 
yrest(500); 
if RoMScript("GetCurrentTitle()") == 530467 then
 hasFireTraining = true;
to check...can't think of any other way.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Title check.

#4 Post by rock5 »

I used some code for getting a title in my ElementConverter script. Let me get it out.

Code: Select all

local HaveFailureTitle = RoMScript("} for i = 0, GetTitleCount() do name, titleID, geted = GetTitleInfoByIndex(i) if titleID == 530897 then a = {geted} end end z= {")
Because it does only one RoMScript, it's very fast.
  • 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
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Title check.

#5 Post by ZZZZZ »

Oh, I didn't know you could do RoMScript like that ^.^ Will keep that noted :D
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Title check.

#6 Post by ZZZZZ »

How do I make this break sequence

Code: Select all

for k,v in pairs(settings.profile.skills) do
			if v.Name=="ALL_FIRE_TRAINING" then		
				RoMScript("SetTitleRequest(530467)");
				cprintf(cli.blue,"\nWill use Fire Training!\n")
				break
			else
				FireTraining = false
			end
		end
I want it to break the loop if firetraining is in profile. Does the 'break' have to be inside the main loop and not the if statement inside loop

Code: Select all

for k,v in pairs(settings.profile.skills) do
break
end
etc for it to work?

Also I know its off-topic but how do you get a macro to work with /wait in it? eg

Code: Select all

RoMScript('CastSpellByName("Shot"); /wait 2;CastSpellByName("Shot"); /wait 2;CastSpellByName("Shot")');
tried with sendMacro as well but just comes up with IGF (ingamefunctions) error.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Title check.

#7 Post by rock5 »

break breaks from loops only. So the break in the if statement will break out of the for loop.

/wait is not a function, it's a slash command. You can't include that on a line with other code. Can you have a line in a macro with

Code: Select all

/wait 2; CastSpellByName("Shot")
I'm not sure but I don't think so.

I think /wait has to be on it's own line and you can't use RoMScript or sendMacro because they are for normal code that will be preceded with /script.

You have to use SlashCommand. If I remember correctly I added support for multiline slash commands. Here's the comment in the 758 changelog
- Modified the IGF to be able to run multiline slash commands.
  • So now you can effectively run macros from the bot without having to use a SlashCommand per line. Eg.

    Code: Select all

    SlashCommand("/script TargetNearestFriend()/script UseSkill(1,1)/Script ChoiceOption(8)")
Note: if you are using SlashCommand everything has to be a slash command. So normal functions have to be preceeded be /script as per the example above. So something like this should work.

Code: Select all

SlashCommand('/script CastSpellByName("Shot"); /wait 2 /script CastSpellByName("Shot"); /wait 2 /script CastSpellByName("Shot")')
So effectively every slash is treated like a new like in a macro.
  • 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