You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Sunday, July 14th 2013, 5:22pm

UnProcess Mats

If someone can help:

I want to undo/unprocess stacks of mats, so far I can do it one at a time with :

/run UseItemByName("Nocturnal Lantern Grass Sap")


But how would I get it to repeat till there is none left to unprocess.

If I try a /run for i=1,99 UseItemByName("Nocturnal Lantern Grass Sap") end
I only get one done, if I try add a wait 2 in there before end it doesnt unprocess that mat. Im guessing you can't have extra commands in the one loop. I am probably thinking it needs to be in an LUA but that is beyond me for now.

Anyone got some advice how to do this

This post has been edited 1 times, last edit by "Gorgar" (Jul 14th 2013, 5:52pm)


2

Monday, July 15th 2013, 4:13am

You can't use 'repeat' lines in macro's, they disabled it due to it being classed as boting blah blah blah
Cammo (82 M/82 W/82 R) 116,147 unbuffed Matk :D (95k pa - r/m)
Livia (82 P/77 K/75 S) wisdom O.o wtf is that...
~~ retired - Thanks to gameforge for that. ~~

Istalantar

Allrounder

Posts: 20

Location: Germany

  • Send private message

3

Wednesday, July 17th 2013, 2:34pm

'repeat' does work, if you just want to count something e.g. a countdown-macro before a bossfight.
The problem here is the 'UseItemByName()' function, this requires a keyboard action. So this will neither work in a macro nor in LUA.

karmakarma

Master Procrastinator

Posts: 442

Location: Miami

Occupation: Diesel Mechanic (semi-trucks/tractor-trailers)

  • Send private message

4

Thursday, July 18th 2013, 1:05pm

UseItemByName() works just fine in both lua and a macro. However it won't do what you want because you have to right click the material you want to disassemble. You could however make a custom function/addon to do what you need and you can make it as long or short as you want including adding a wait timer into it.

Peryl has a tutorial for making custom functions somewhere on the forums and also romwiki has lots of info including more tutorials and functions that are part of the game itself.

Pretty much it can be done. It takes time and patience to get it working correctly. Take your time doing research and look how other addons are coded to find the easiest way for you to make one that you need
LifeFire - Eternal - Grimdal
Mage/Priest/Knight
82/82/82

Give a macro, Take a Macro
Lifefire's Collections

This post has been edited 1 times, last edit by "karmakarma" (Jul 18th 2013, 1:45pm)


karmakarma

Master Procrastinator

Posts: 442

Location: Miami

Occupation: Diesel Mechanic (semi-trucks/tractor-trailers)

  • Send private message

5

Thursday, July 18th 2013, 2:15pm

Forgot to add a sample and don't feel like editing the last post.

You could do something like this to make it really simple on yourself. Make the addon files and add a function like this...

Place a herb or other mat on your action bar in slot 1 for example then make this function

function UP()
UseAction(1)
end

Then in a macro create something like this...

/run UP
/wait 1
/run UP
/wait 1


You can probably get up to 12 to 15 mats disassembled with 1 click of the macro and just wait til its finished then click it again also dont copy and paste any of this cuz i wrote it on my phone so its not aligned correctl and wont work with out having the correct tabs.
LifeFire - Eternal - Grimdal
Mage/Priest/Knight
82/82/82

Give a macro, Take a Macro
Lifefire's Collections

Istalantar

Allrounder

Posts: 20

Location: Germany

  • Send private message

6

Thursday, July 18th 2013, 3:52pm

UseItemByName() works just fine in both lua and a macro.


I didn't say this function doesn't work, I meant it won't work in a repeat. And that's what's the problem here.

function UP()
UseAction(1)
end

Then in a macro create something like this...

/run UP
/wait 1
/run UP
/wait 1


This will disassemble exaclty one material, because as I said UseItemByName() needs keyboard activity and same for UseAction().

If you wrote /run UseAction(1) in your chat window an push enter nothing will happen, because enter is not a valid key stroke for RoM, so its like using a macro without pushing a key.
Then put this text in a macro, drag it to your action bar an push the button or click it with your mouse, and just like magic now it works :)
So you can't really doing any action in the game with lua or macro without pushing keyboard or mouse.

Edit: And by the way, there is no need for tabs, you could write everything in one line i you wanted, this is just to give it a clear structure

karmakarma

Master Procrastinator

Posts: 442

Location: Miami

Occupation: Diesel Mechanic (semi-trucks/tractor-trailers)

  • Send private message

7

Thursday, July 18th 2013, 4:15pm

From how I read the OP's post was he wanted to make it so he clicks less not so he doesn't have to click at all cuz I'm sure he is aware it would be considered botting of course. However I recommend the custom function because it allows you to dramatically shorten the length of each line in the macro allowing for more commands.

Any attempt to unproccess mats must be done through either the keyboard or through clicks unless you go into extreme detail making an addon with a few timers and onupdate functions that constantly update every second or 2 after the function has started.

However I forgot to mention the easiest way to do it lol

Get a gaming mouse or keyboard "logitech" works best. Set it to repeat the last button pressed every 1.2 seconds and leave it where it is supposed to click and watch the magic unfold
LifeFire - Eternal - Grimdal
Mage/Priest/Knight
82/82/82

Give a macro, Take a Macro
Lifefire's Collections

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

8

Thursday, July 18th 2013, 7:26pm

If I try a /run for i=1,99 UseItemByName("Nocturnal Lantern Grass Sap") end
I only get one done, if I try add a wait 2 in there before end it doesnt unprocess that mat. Im guessing you can't have extra commands in the one loop. I am probably thinking it needs to be in an LUA but that is beyond me for now.

Anyone got some advice how to do this
That for loop is the basic idea, but you have the problem that this runs to fast. You can't make it work slower while keeping the mouse click context from within Lua. So it won't work in a nice way with one click for a full stack and detection whether there are items left, etc...

UseItemByName() works just fine in both lua and a macro. However it won't do what you want because you have to right click the material you want to disassemble.
Rightcklicking is basically the same as UseItemByName, just inventory index based (UseBagItem).

You could however make a custom function/addon to do what you need and you can make it as long or short as you want including adding a wait timer into it.
The first part is correct, but at the second you have to keep in mind that timing stuff in LUA causes usage of OnUpdate due to which you will loose the mouse click context. This would break everything here.

Place a herb or other mat on your action bar in slot 1 for example then make this function

function UP()
UseAction(1)
end

Then in a macro create something like this...

/run UP
/wait 1
/run UP
/wait 1
This is correct again and you can use UseItemByName, ord UseBagItem, or ... instead of UseAction. It works because the wait is in the macro and not in the function. But this prevents the usage of loops, because there are no loops in macros, just Lua.

From how I read the OP's post was he wanted to make it so he clicks less not so he doesn't have to click at all cuz I'm sure he is aware it would be considered botting of course. However I recommend the custom function because it allows you to dramatically shorten the length of each line in the macro allowing for more commands.
Looking at the code he posted, he had a "one click for a full stack solution" in mind, which will not work.

Any attempt to unproccess mats must be done through either the keyboard or through clicks unless you go into extreme detail making an addon with a few timers and onupdate functions that constantly update every second or 2 after the function has started.
I guess 99% that this won't work.

Get a gaming mouse or keyboard "logitech" works best. Set it to repeat the last button pressed every 1.2 seconds and leave it where it is supposed to click and watch the magic unfold
Well, eventhough this will work it is not allowed, as you are using 3rd party software to automate stuff. It's basically (and considered as) botting.


Something I have written about a macro for repairing items, to which similar stuff applies:
The reason why you have to use this slash command instead of getting your equip automatically repaired is simple: Gameplay relevant stuff has to be initiated by a player's keystroke or mouse click. To implement time delays in addons, developers do NOT have any wait-like function you would have in a macro. Because of that developers basically use something, just that I do not want to go too deep into details, called "OnUpdate" which is triggerd every new frame drawn on your screen to get the elapsed time and basically create timers with that. But once you are using OnUpdate you will loose the keystroke or mouse click context and thus are not able to execute some stuff. As far as I know using items like potions and repair hammers is, just like casting spells, blocked from being used in a OnUpdate.

9

Friday, July 19th 2013, 2:37am

Well thanks everyone for your input. I ask about this not for botting or cheating, but I have arthritus, and it isn't comfortable at all holding a mouse still clicking the same spot over and over for hours. But well done everyone.

10

Wednesday, August 14th 2013, 3:23pm

RoM should add this to the crafting interface, where you could choose how many you want to disassemble. But, it seems like it would be a fairly simple addon to create. I don't know anything about creating addons, but seems simple. Anyone know if someone has already done this? And, RoM, can you please add this ability to the crafting interface. Most of crafting is "AFK" activity, anyway, and this is just another piece of crafting. Doesn't make much sense to me to make us have to sit and right-click something over and over and over and over(repeat many many times). I have a macro that does UseItemByName, wait 1.2, but can only do 6 per click, if i spam click the macro, maybe 10 get disassembled.