Macros

From Iris2

Jump to: navigation, search
(notes)
 
Line 176: Line 176:
for complex script see [[Scripting]]
for complex script see [[Scripting]]
 +
 +
 +
easyuo ids : 
 +
if (item.artid == easy2open("POF")) then ... end
 +
 +
 +
helpful to reload your macros on hotkey :
 +
<pre>SetMacro("ctrl+f9",function() dofile(gMacroPathFile)  MacroCmd_RiseText(1,1,0,"reload") end)</pre>
=== example : bandage-loop ===
=== example : bandage-loop ===
-
<pre>job.create(function()  
+
<pre>
-
   while (true) do MacroCmd_BandageSelf() job.wait(3*1000) end  
+
 
-
end)</pre>
+
SetMacro("f3", function()  gMyBandageLoopActive = not gMyBandageLoopActive    end)
 +
 
 +
job.create(function()  
 +
   while (true) do  
 +
    if (gMyBandageLoopActive) then MacroCmd_BandageSelf() end
 +
    job.wait(3*1000)  
 +
  end  
 +
end)
 +
 
 +
</pre>
 +
 
 +
== more ==
 +
 
 +
please visit [[Scripting_TippsAndTricks]]

Current revision as of 14:58, 29 November 2011

Personal tools