Imagine Nation Forums
[Razor] Bales of Cotton to Bolts of Cloth Macro - Printable Version

+- Imagine Nation Forums (https://in-uo.net/forums)
+-- Forum: Imagine Nation: Xtreme archive (https://in-uo.net/forums/forumdisplay.php?fid=5)
+--- Forum: Player Guides (https://in-uo.net/forums/forumdisplay.php?fid=20)
+--- Thread: [Razor] Bales of Cotton to Bolts of Cloth Macro (/showthread.php?tid=3434)



[Razor] Bales of Cotton to Bolts of Cloth Macro - Eighty Swords - 04-06-2009

Here's a macro to help anyone doing tailoring and collecting the cotton themselves instead of buying cloth.

Description:
This macro will spin a bale of cotton on a loom and while that is going (this takes about 3 seconds), the macro will run 5 threads through a loom to give you a bolt of cloth.

Update:

I revised the macro a little bit since I find this works better. Open it up in Razor to check it out. Revised macro posted below.

I also added a weight check to the macro so when you hit 430 stones or more the macro just stops. If you want to recall and deposit your bolts of cloth in the bank use the macro in this post.

Main Macro:

Quote:!Loop
Assistant.Macros.IfAction|5|1|430
Assistant.Macros.HotKeyAction|1083|
Assistant.Macros.EndIfAction
Assistant.Macros.ElseAction
Assistant.Macros.ForAction|6
Assistant.Macros.DoubleClickTypeAction|3577|True
Assistant.Macros.IfAction|4|0|no item of type bale%s% of cotton (0df9) found!
Assistant.Macros.HotKeyAction|0|Play: Skill Training\Crafting\Threads to Cloth
Assistant.Macros.ElseAction
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|4117
Assistant.Macros.SpeechAction|0|52|3|ENC|2|16|7|guards
Assistant.Macros.ForAction|5
Assistant.Macros.DoubleClickTypeAction|4000|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|4194
Assistant.Macros.PauseAction|00:00:00.5000000
Assistant.Macros.EndForAction
Assistant.Macros.EndForAction

Notes on the main macro:
  1. For some reason the line where the macro says guards is adding a space in the middle of the word so make sure this isn't there when you copy it.

  2. You'll have 1 leftover thread for each bale of cotton and we take care of all those leftovers with these two lines:

    Quote:Assistant.Macros.IfAction|4|0|no item of type bale%s% of cotton (0df9) found!
    Assistant.Macros.HotKeyAction|0|Play: Threads to Cloth

    The line that says: "Assistant.Macros.HotKeyAction|0|Play: Threads to Cloth" points to this next macro that loops threads to bolts of cloth. I added this as a second macro since it's a little faster then going through the if statements of the main macro and going through the for loop.

Secondary Macro:

Quote:!Loop
Assistant.Macros.DoubleClickTypeAction|4000|True
Assistant.Macros.IfAction|4|0|no item of type spool%s% of thread (0fa0) found!
Assistant.Macros.HotKeyAction|1083|
Assistant.Macros.ElseAction
Assistant.Macros.TargetTypeAction|False|4194

Let me know if you have any trouble with these macros or suggestions.

Go to the Macros folder in the Razor folder (a common place for Razor is C:\Program Files\Razor), make 2 New Text Documents and change the extension to ".macro" instead of ".txt". Copy the macros above in the quotes into the new files and save and close the file. Restart Razor and your new macros should be there.


[Razor] Bales of Cotton to Bolts of Cloth Macro - imported_Odium - 04-06-2009

[COLOR="RoyalBlue"]instead of for 6 and for 5 i have a better solution sadly i cant see my macro as im at work. but basically...

create 2 diffrent macros
- one to create threads from bales
- one to create cloth from threads

the first one
loops untill you got 5 threads
when that is true it executes your second macro
and have a check fot the sysmessage "the world will save in ..." if thats true it do a pause for 20sec.

then the second macro kicks in and play till -> sysmessage you create a bolt of cloth..

(this would prevent your macro from going berserk during worldsaves)
when thats true it start macro nr 1 again

you should also execute a healthcheck macro in your regular macros if your not macroing at home
that checks for health and if less than 100 say guards use bandage till health = 100.


executing other macros within your macro is one of the most powerfull and usable thing u can do in razor, also the sysmessage chek is simply awesome aswell[/COLOR]


[Razor] Bales of Cotton to Bolts of Cloth Macro - Eighty Swords - 04-06-2009

Thanks for the input Odium!

At first I was doing a few separate macros as you suggested. Here's what it kind of looked like...

PHP Code:
CottonToThreads:
Double-click Cotton
Target Spinning Wheel
Pause 3.0 seconds
if weight 400
{
    
recall to bank
    deposit threads
    restock on recall regs
}
else
if 
system message "no more cotton..."
    
play ThreadsToCloth

ThreadsToCloth
:
Double-click Cotton
Target Loom
if system message "no more threads..."
{
    
recall to bank
    restock on threads 
and recall regs
    
if system message "restocked 3 items"//only restocks regs and not threads
        
Play Tailoring


This would convert all cotton to threads, bank as you get over weight, then convert all threads to cloth and restock as needed. Once it's used all your threads it would start making bandanas, which I had set in my tailoring macro. What I found with this was that whenever Razor reached the end of my tailoring macro it would start over at the CottonToThreads macro instead of looping the final part

In the end it just got too long and complicated for my likes.

That's when I thought of doing the cotton to cloth portion in one macro that turned out to be really efficient because once you do 1 cotton yourself to start, you save the 3 second pause you would normally need to spin the cotton and just run the threads in that period.

You can tweak this macro however you like; add weight checks or health checks, recalling, banking, restocking, etc. This is just a base that I thought could help some people.


[Razor] Bales of Cotton to Bolts of Cloth Macro - Eighty Swords - 04-19-2009

If you want to make the main macro recall when you get overweight use this macro instead. The macro in my first post will just stop when you go over weight.

Quote:!Loop
Assistant.Macros.IfAction|5|1|430
Assistant.Macros.MacroCastSpellAction|32
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.AbsoluteTargetAction|0|0|1078721252|121|129|0|7956
Assistant.Macros.PauseAction|00:00:03
Assistant.Macros.SpeechAction|0|52|3|ENC|2|16|2|bank
Assistant.Macros.PauseAction|00:00:01
Assistant.Macros.HotKeyAction|0|Organizer Agent-4
Assistant.Macros.MacroCastSpellAction|32
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.AbsoluteTargetAction|0|0|1078721252|121|129|0|7956
Assistant.Macros.PauseAction|00:00:03
Assistant.Macros.EndIfAction
Assistant.Macros.ElseAction
Assistant.Macros.ForAction|6
Assistant.Macros.DoubleClickTypeAction|3577|True
Assistant.Macros.IfAction|4|0|no item of type bale%s% of cotton (0df9) found!
Assistant.Macros.HotKeyAction|0|Play: Skill Training\Crafting\Threads to Cloth
Assistant.Macros.ElseAction
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|4117
Assistant.Macros.SpeechAction|0|52|3|ENC|2|16|7|guards
Assistant.Macros.ForAction|5
Assistant.Macros.DoubleClickTypeAction|4000|True
Assistant.Macros.WaitForTargetAction|30
Assistant.Macros.TargetTypeAction|False|4194
Assistant.Macros.PauseAction|00:00:00.5000000
Assistant.Macros.EndForAction
Assistant.Macros.EndForAction

A few notes:
  1. For some reason the lines where the macro says bank or guards is adding a space in the middle of the words so make sure this isn't there when you copy it.
  2. Retarget the first absolute target to point to a rune marked at a bank
  3. Retarget the second absolute target to point to a rune marked at a tailor shop by the loom and spinning wheel.
  4. Add bolts of cloth to your organize agent and set the hotbag as a bag in your bank.

Let me know if you have any problems with this macro or suggestions.