Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="iso-8859-1"?>
- <!DOCTYPE muclient>
- <!-- Saved on maanantai, joulukuu 05, 2011, 1:38 -->
- <!-- MuClient version 4.73 -->
- <!-- Plugin "AffectListChecker" generated by Plugin Wizard -->
- <muclient>
- <plugin
- name="AffectListChecker"
- author="Mort"
- id="8bd1cd60c95b2482fb0a502b"
- language="VBscript"
- purpose="Checks your affect list and notifies of missing ones"
- save_state="y"
- date_written="2011-12-05 01:34:22"
- requires="4.73"
- version="1.0"
- >
- <description trim="y">
- <![CDATA[
- Use the following commands:
- affs add <name of affect>
- affs del <name of affect>
- When you use the affects command, the list gets checked if everything on your own list shows up in it. What doesn't show is announced after the affect list.
- Plugin uses VBscript as its language.
- ]]>
- </description>
- </plugin>
- <!-- Get our standard constants -->
- <include name="constants.vbs"/>
- <!-- Triggers -->
- <triggers>
- <trigger
- match="^\r?\n?$"
- name="affectsEnd"
- regexp="y"
- send_to="12"
- sequence="1"
- >
- <send>world.enabletrigger "affectsEnd", 0
- world.enabletrigger "affectChecker", 0
- dim want, got, i, miss
- got = split(world.getvariable("affects"), ";")
- want = world.getvariable("wantedAffects")
- for i = 0 to ubound(got)
- want = replace(want, ";"&got(i)&";", ";")
- next
- if len(want) > 1 then
- want = left(want, len(want)-1)
- want = right(want, len(want)-1)
- miss = split(want, ";")
- world.ansinote ansi(33) & ansi(1) & "Missing affects: " & ansi(31) & join(miss, ", ")
- world.note ""
- end if</send>
- </trigger>
- <trigger
- keep_evaluating="y"
- match="^.*'(.*)'.*$"
- name="affectChecker"
- regexp="y"
- send_to="12"
- sequence="1"
- >
- <send>world.setvariable "affects", world.getvariable("affects") & "%1;"
- </send>
- </trigger>
- <trigger
- enabled="y"
- match="You are affected by:"
- name="affectsStart"
- regexp="y"
- send_to="12"
- sequence="1"
- >
- <send>world.setvariable "affects", ";"
- world.enabletrigger "affectChecker", 1
- world.enabletrigger "affectsEnd", 1
- </send>
- </trigger>
- </triggers>
- <!-- Aliases -->
- <aliases>
- <alias
- match="affs add *"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>dim v
- v = world.getvariable("wantedAffects")
- if instr(1, v, ";%1;") = 0 then
- v = v & "%1;"
- world.note "Ok, added '%1' to affect check list"
- world.setvariable "wantedAffects", v
- else
- world.note "'%1' already exists or something else went wrong"
- end if
- </send>
- </alias>
- <alias
- match="affs del *"
- enabled="y"
- send_to="12"
- sequence="100"
- >
- <send>dim v
- v = world.getvariable("wantedAffects")
- if instr(1, v, ";%1;") = 0 then
- world.note "'%1' not found in affect check list"
- else
- v = replace(v, ";%1;", ";")
- world.note "Ok, deleted '%1' from affect check list"
- world.setvariable "wantedAffects", v
- end if
- </send>
- </alias>
- </aliases>
- <!-- Variables -->
- <variables>
- <variable name="affects">;</variable>
- <variable name="wantedAffects">;</variable>
- </variables>
- <!-- Plugin help -->
- <aliases>
- <alias
- script="OnHelp"
- match="AffectListChecker:help"
- enabled="y"
- >
- </alias>
- </aliases>
- <script>
- <![CDATA[
- Sub OnHelp (sName, sLine, wildcards)
- world.Note world.GetPluginInfo (world.GetPluginID, 3)
- End Sub
- ]]>
- </script>
- </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement