change Lootomatic Setting at start Macro

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

change Lootomatic Setting at start Macro

#1 Post by Ballerlocke » Tue Jul 31, 2012 3:37 pm

change Lootomatic Setting at start Macro (In Onload)


i have search for the setting and how i can take her in a macro but i dont get it start.
i wont a standart setting if i start a specific macro with this settings

Lootomatic = Enabled
Roll: Normal
Autoloot: rare/loot Boss
Autopass: Never
Autogreed: Rare

thanks for help

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

Re: change Lootomatic Setting at start Macro

#2 Post by rock5 » Wed Aug 01, 2012 8:53 am

I think they might be

Code: Select all

RoMScript("} 
    Lootomatic_Settings.Enabled = true;
    Lootomatic_Settings.Roll = 3; -- 'Normal'
    Lootomatic_Settings.AutoLoot = 5; -- 'Rare'
    Lootomatic_Settings.AutoLootBoss = true;
    Lootomatic_Settings.AutoPass = 1; -- 'never'
    Lootomatic_Settings.AutoGreed = 5; -- 'Rare'
a={")
I think that should work.
  • 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

Ballerlocke
Posts: 12
Joined: Sat Jul 23, 2011 7:22 pm

Re: change Lootomatic Setting at start Macro

#3 Post by Ballerlocke » Wed Aug 01, 2012 3:18 pm

no Rock if i copie this in the ONLOAD Line he brakes up when i load the macro

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

Re: change Lootomatic Setting at start Macro

#4 Post by lisa » Thu Aug 02, 2012 6:16 am

Ballerlocke wrote: if i copie this in the ONLOAD Line he brakes up when i load the macro
When you say macro do you mean when you start the bot?

what do you mean by "he brakes up"

Also maybe try it without the comments

Code: Select all

RoMScript("} 
    Lootomatic_Settings.Enabled = true;
    Lootomatic_Settings.Roll = 3;
    Lootomatic_Settings.AutoLoot = 5;
    Lootomatic_Settings.AutoLootBoss = true;
    Lootomatic_Settings.AutoPass = 1;
    Lootomatic_Settings.AutoGreed = 5;
a={")  
Does it stay under the 255 characters ?
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: change Lootomatic Setting at start Macro

#5 Post by rock5 » Thu Aug 02, 2012 7:13 am

lisa wrote:Does it stay under the 255 characters ?
Good point. I believe with comments it is well over 255. Without comments it should be about 230-240.
  • 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: change Lootomatic Setting at start Macro

#6 Post by lisa » Thu Aug 02, 2012 7:26 am

could always just do it in 2 lots

Code: Select all

RoMScript("} 
    Lootomatic_Settings.Enabled = true;
    Lootomatic_Settings.Roll = 3;
    Lootomatic_Settings.AutoLoot = 5;
a={")  

Code: Select all

RoMScript("} 
    Lootomatic_Settings.AutoLootBoss = true;
    Lootomatic_Settings.AutoPass = 1;
    Lootomatic_Settings.AutoGreed = 5;
a={")  
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

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: change Lootomatic Setting at start Macro

#7 Post by Jandrana » Wed Aug 15, 2012 3:09 am

Hm - the above examples did not work for me. I even don't understand parts of the code. Why this:
a={
at the end of the assignments?

But I found another solution. Add this function to the end of main.lua of the lootomatic addon:
function Lootomatic.Func.Enable(aBool, roll, autoloot, autolootBoss, autopass, autogreed)
Lootomatic_Settings.Enabled = aBool;
Lootomatic_Settings.Roll = roll;
Lootomatic_Settings.AutoLoot = autoloot;
Lootomatic_Settings.AutoLootBoss = autolootBoss;
Lootomatic_Settings.AutoPass = autopass;
Lootomatic_Settings.AutoGreed = autogreed;
end;
Then you can put something like this in your MM scripts:

Code: Select all

RoMScript("Lootomatic.Func.Enable(true,3,5,true,3,1);")

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

Re: change Lootomatic Setting at start Macro

#8 Post by lisa » Wed Aug 15, 2012 3:19 am

making your own function would work =)


As for the a ={

you can easily call functions but if you want to change in game variables you need to have them between this

Code: Select all

}
--some variable
a={
As to why it didn't work did you try just changing a couple at a time, there is a 255 character limit for macros.
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: change Lootomatic Setting at start Macro

#9 Post by rock5 » Wed Aug 15, 2012 4:00 am

Jandrana wrote:Hm - the above examples did not work for me. I even don't understand parts of the code. Why this:
a={
at the end of the assignments?
Basically, when you run a RoMScript, the commands get put into a table as part of it's code and then the values in the table get returned. eg.

Code: Select all

RoMScript("GetZoneID()")
will equate to

Code: Select all

a = {GetZoneId()}
which works fine because GetZoneID() will return a value that will be placed in the table.

If on the other hand you try to run some code eg.

Code: Select all

RoMScript("SomeVariable = true")
What happens then is this

Code: Select all

a = {SomeVariable = true}
Which will simple create a sub value to a a.SomeVariable = true which is not what we want.

To execute any code you need to prefix with } and end with a={ . So

Code: Select all

RoMScript("} SomeVariable = true a={")
equates to

Code: Select all

a={} SomeVariable = true a={}
which is valid code that assigns true to SomeVariable.

If you want to return any value, you have to assign it to a in a table because that is the value it returns. For example my old ItemQueusCount function that counts the items in the incoming item queue.

Code: Select all

function ItemQueueCount()
	return RoMScript("} a = 20 while GetItemQueueInfo(a) == nil do a=a-1 if a==0 then break end end a ={a} z={")
end
This loops through each item until it finds how many items there are. It puts a in a table and because we don't want to wipe the value in a we use another variable to close the } bracket by using z={

That's fairly technical. All you need to know is if you want to change a value in game you have to start the RoMScript command with a } and end with a a={
  • 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

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: change Lootomatic Setting at start Macro

#10 Post by Jandrana » Wed Aug 15, 2012 7:50 am

Thank you for your explanation, rock!

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: change Lootomatic Setting at start Macro

#11 Post by kuripot » Wed Aug 15, 2012 7:00 pm

Code: Select all

function Lootomatic.Func.Enable(aBool, roll, autoloot, autolootBoss, autopass, autogreed)
Lootomatic_Settings.Enabled = aBool;
Lootomatic_Settings.Roll = roll;
Lootomatic_Settings.AutoLoot = autoloot;
Lootomatic_Settings.AutoLootBoss = autolootBoss;
Lootomatic_Settings.AutoPass = autopass;
Lootomatic_Settings.AutoGreed = autogreed;
end;
how can i make it userfunction?? so i dont need to put whole function in onload...

i just to paste inside .Lua file? nad rename like this?? "userfunction_lootomatic.lua" ??

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

Re: change Lootomatic Setting at start Macro

#12 Post by lisa » Wed Aug 15, 2012 7:48 pm

kuripot wrote:i just to paste inside .Lua file? nad rename like this?? "userfunction_lootomatic.lua" ??
Nope

What Jandrana did was edit the actual addon files, you could probably make up a userfunction to do it, it would be similar to the code I posted earlier just doing some RoMScript
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: No registered users and 1 guest