Difference between revisions of "Journal"
From Wiki
(→Example) |
|||
| Line 3: | Line 3: | ||
==== Example ==== | ==== Example ==== | ||
<pre> | <pre> | ||
| − | + | ; example 1 (old way) | |
| − | + | ||
| + | waitForAttack: | ||
| + | scanjournal 1 | ||
if is_attacking_you in #journal | if is_attacking_you in #journal | ||
| − | + | msg guards $ | |
| − | + | goto waitForAttack | |
| − | + | </pre> | |
| − | + | <pre> | |
| − | + | ; example 2 (new way) (won't skip lines like the old way will) | |
| − | + | ||
| + | set %jrnl #jindex | ||
| + | while true | ||
| + | { | ||
| + | if %jrnl > #jindex | ||
| + | { | ||
| + | set %jrnl %jrnl + 1 | ||
| + | scanjournal %jrnl | ||
| + | if is_attacking_you in #journal | ||
| + | event macro 1 0 Guards | ||
| + | } | ||
| + | } | ||
</pre> | </pre> | ||
{{footer}} | {{footer}} | ||
Revision as of 09:31, 7 February 2007
| ⇒ | The #journal system variable determines the journal line selected using the scanJournal command. |
Example
; example 1 (old way) waitForAttack: scanjournal 1 if is_attacking_you in #journal msg guards $ goto waitForAttack
; example 2 (new way) (won't skip lines like the old way will)
set %jrnl #jindex
while true
{
if %jrnl > #jindex
{
set %jrnl %jrnl + 1
scanjournal %jrnl
if is_attacking_you in #journal
event macro 1 0 Guards
}
}
See also
| Main Page | Documentation |