Skip to content

Instantly share code, notes, and snippets.

@WrayOfSunshine
Created April 23, 2020 01:16
Show Gist options
  • Save WrayOfSunshine/563d9c327103b8bf37e2e9cbe7f407ea to your computer and use it in GitHub Desktop.
Save WrayOfSunshine/563d9c327103b8bf37e2e9cbe7f407ea to your computer and use it in GitHub Desktop.
CMUD - RetroMUD - Set PartyList variable
#var pnum 1
#var partylist {""|""|""|""|""|""|""|""}
#trigger grab_party {^\|(\w+)\s*\|\s*HP:\s*(?:-\d+|\d+)/(?:-\d+|\d+)\s*\|$} {
#var partylist %replaceitem( %lower(%1), @pnum, @partylist)
#add pnum 1
} {} regex
pss
#alarm +1 {
#untrigger grab_party
#unvar pnum
}
@WrayOfSunshine
Copy link
Author

Usage: create alias "setparty" in CMUD Package Editor and copy/paste the gist in full.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment