Macros
From Iris2
Ghoulsblade (Talk | contribs) |
|||
| Line 147: | Line 147: | ||
MacroRead_TargetStat(statname) -- read stats of selected target, statname can be one of curHits,maxHits | MacroRead_TargetStat(statname) -- read stats of selected target, statname can be one of curHits,maxHits | ||
</pre> | </pre> | ||
| + | |||
| + | === journal === | ||
| + | |||
| + | |||
| + | gMyJournal = {} | ||
| + | RegisterListenerOnce("Hook_Text",function (name,plaintext,serial,data) table.insert(gMyJournal,plaintext) ,"My_Hook_Text") | ||
| + | lastid = #gMyJournal | ||
| + | lastline = gMyJournal[#gMyJournal] | ||
| + | |||
=== notes === | === notes === | ||
| Line 167: | 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 === | ||
| + | |||
| + | <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]] | ||
