TinyFugue guild scripts
Posted: 14 Jun 2010 17:08
I have decided to post scripts and triggers for various guilds (not revealing any secret info here or anything). Maybe someone will like them more than their own or maybe they will give them some suggestions on improving their scripts.
If you have any special requests, let me know.
Required files:
alias.tf
Required definitions:
You can change "cyan" to any other color you like.
1. Army of Angmar
Usage:
a) Aliases.
switch - makes you switch between smashing and smacking
b) Definitions.
/smash - turns smashing on/off
/smack - turns smacking on/off
/alternate - alternates between smash and smack during combat when turned on (i. e. instead of smash - smash - smash, you're gonna execute smash - smack - smash when this option is on)
/defend <target> - makes you defend <target> continuously until /defend is typed without target
As you can see, it's simple, yet versatile little script that lets you use all your possible specials in various ways.
2. Mercenaries
Usage:
/mattack - turns automatic mattack on and off
Some words of explanation - how this things work
As you can see, it's just a set of triggers matching patterns in the text sent by MUD to launch your specials automatically.
The x_hold functions are there to prevent spam, and here's how they are called and work piece by piece:
It looks complicated, but it's fairly simple and what it does in reality is prevent spamming of specials.
When several mobs attack you simultaneously, it would otherwise try to launch a special for each instance of mob attack,
with this code it will only launch one special and wait 3 seconds before it will allow you to launch one again.
Example of the trigger without the "hold" function:
Enjoy.
If you have any special requests, let me know.
Required files:
alias.tf
Required definitions:
Code: Select all
/def e = /echo -aBCcyan %{*}
1. Army of Angmar
Code: Select all
;
; Army of Angmar
;
; variables
/set alternate 0
/set smash 1
/set smack 0
/set defend 0
/set defend_target none
; aliases
/alias switch /smash %; /smack
; definitions
/def alternate = \
/if (alternate=1) \
/set alternate=0 %;\
/e @ alternating OFF %;\
/else \
/set alternate=1 %;\
/e @ alternating ON %;\
/endif
/def smash = \
/if (smash=1) \
/set smash=0 %;\
/e @ smashing OFF %;\
/else \
/set smash=1 %;\
/e @ smashing ON %;\
/endif
/def silent_smash = \
/if (smash=1) \
/set smash=0 %;\
/else \
/set smash=1 %;\
/endif
/def smack = \
/if (smack=1) \
/set smack=0 %;\
/e @ smacking OFF %;\
/else \
/set smack=1 %;\
/e @ smacking ON %;\
/endif
/def silent_smack = \
/if (smack=1) \
/set smack=0 %;\
/else \
/set smack=1 %;\
/endif
/def smash_hold = \
/set smash=0 %;\
smash %;\
/repeat -3 1 /set smash=1
/def smack_hold = \
/set smack=0 %;\
smack %;\
/repeat -3 1 /set smack=1
/def silent_switch = \
/if (alternate=1) \
/silent_smash %;\
/silent_smack %;\
/endif
/def defend = \
/set defend_target=%* %;\
/if (defend_target=~"") \
/set defend=0 %;\
/set defend_target=none %;\
/e @ defending OFF %;\
/else \
/set defend_target=%* %;\
/set defend=1 %;\
/e @ defending %defend_target %;\
/endif
/def areset = \
/e @ resetting Angmar variables %;\
/set smash=1 %;\
/set smack=0 %;\
/set defend=0 %;\
/set defend_target=none
; triggers
/def -F -mregexp -t'^You attack' angmar_attack = \
/if (smash=1) \
/smash_hold %;\
/else \
/if (smack=1) \
/smack_hold %;\
/endif %;\
/endif
/def -F -mregexp -t'^You assist' angmar_assist = \
/if (smash=1) \
/smash_hold %;\
/else \
/if (smack=1) \
/smack_hold %;\
/endif %;\
/endif
/def -F -mregexp -t'attacks you!$' angmar_defend = \
/if (smash=1) \
/smash_hold %;\
/else \
/if (smack=1) \
/smack_hold %;\
/endif %;\
/endif
/def -F -mregexp -t'^You turn to attack' angmar_next = \
/if (smash=1) \
/smash_hold %;\
/else \
/if (smack=1) \
/smack_hold %;\
/endif %;\
/endif
/def -F -mregexp -t'^You prepare to smash' smash_underway = \
/if (smash=1) \
/set smash=0 %;\
/repeat -3 1 /set smash=1 %;\
/endif
/def -F -mregexp -t'^You feel relaxed again\.$' = \
/if (smash=1) \
smash %;\
/silent_switch %;\
/else \
/if (smack=1) \
smack %;\
/silent_switch %;\
/endif %;\
/endif
/def -F -mregexp -t'^Whom do you wish to smash\?$' = /set smash=1
/def -F -t'*breath return*' = \
/if (smash=1) \
smash %;\
/else \
/if (smack=1) \
smack %;\
/endif %;\
/endif
/def -F -t'*releases his grip on you*' = \
/if (smash=1) \
smash %;\
/else \
/if (smack=1) \
smack %;\
/endif %;\
/endif
/def -F -t'*recovered your senses*' = \
/if (smash=1) \
smash %;\
/else \
/if (smack=1) \
smack %;\
/endif %;\
/endif
/def -F -mregexp -t'^You stop defending (.*)\.$' auto_defend = \
/if (defend=1) \
defend %defend_target %;\
/endif
a) Aliases.
switch - makes you switch between smashing and smacking
b) Definitions.
/smash - turns smashing on/off
/smack - turns smacking on/off
/alternate - alternates between smash and smack during combat when turned on (i. e. instead of smash - smash - smash, you're gonna execute smash - smack - smash when this option is on)
/defend <target> - makes you defend <target> continuously until /defend is typed without target
As you can see, it's simple, yet versatile little script that lets you use all your possible specials in various ways.
2. Mercenaries
Code: Select all
;
; Mercenaries
;
; variables
/set mattack 1
; definitions
/def mattack = \
/if (mattack=1) \
/set mattack=0 %;\
/e @ mattacking OFF %;\
/else \
/set mattack=1 %;\
/e @ mattacking ON %;\
/endif
/def mattack_hold = \
/set mattack=0 %;\
mattack %;\
/repeat -3 1 /set mattack=1
; triggers
/def -F -mregexp -t'^You attack' mattack_attack = \
/if (mattack=1) \
/mattack_hold %;\
/endif
/def -F -mregexp -t'^You assist' mattack_assist = \
/if (mattack=1) \
/mattack_hold %;\
/endif
/def -F -mregexp -t'attacks you!$' mattack_defend = \
/if (mattack=1) \
/mattack_hold %;\
/endif
/def -F -mregexp -t'^You turn to attack' mattack_next = \
/if (mattack=1) \
/mattack_hold %;\
/endif
/def -F -mregexp -t'^You prepare to mattack\.$' mattack_underway = \
/if (mattack=1) \
/set mattack=0 %;\
/repeat -3 1 /set mattack=1 %;\
/endif
/def -F -mregexp -t'^You feel ready to use Mercenary tactics again!$' = \
mattack
/def -F -mregexp -t'^You aren\'t fighting anyone!$' = /set mattack=1
/def -F -t'*breath return*' = mattack
/def -F -t'*releases his grip on you*' = mattack
/def -F -t'*recovered your senses*' = mattack
/def -F -t'*You are unable to attack your target*' = mattack
/mattack - turns automatic mattack on and off
Some words of explanation - how this things work
As you can see, it's just a set of triggers matching patterns in the text sent by MUD to launch your specials automatically.
The x_hold functions are there to prevent spam, and here's how they are called and work piece by piece:
Code: Select all
; a trigger that matches the regular expression (mregexp), -F indicates that the trigger is "free" - not exclusive to this pattern,
; so you can create more triggers matching "You attack" when needed. -t denotes a trigger, everything between single quote
; marks. ^ means that we will only match it if the pattern is at the beginning of the line. After the single quotes we have the
; trigger name. With \ switch, indicating that the function body continues on another line
/def -F -mregexp -t'^You attack' mattack_attack = \
Code: Select all
; here we check if our automatic mattack is set to on (1) or off (0)
/if (mattack=1) \
Code: Select all
; only if it's set to on (1) we will call for the function "mattack_hold" to execute
/mattack_hold %;\
Code: Select all
; definition with name of a function to be called
/def mattack_hold = \
Code: Select all
; setting mattack to off, %; indicates execution (equal to pressing return)
/set mattack=0 %;\
Code: Select all
; launch the special
mattack %;\
Code: Select all
; set mattack to on again after 3 seconds
/repeat -3 1 /set mattack=1
Code: Select all
; we must also denote where our trigger (checking if mattack is on/off) finishes, otherwise it will produce errors
/endif
When several mobs attack you simultaneously, it would otherwise try to launch a special for each instance of mob attack,
with this code it will only launch one special and wait 3 seconds before it will allow you to launch one again.
Example of the trigger without the "hold" function:
And with it:Orc attacks you!
Second orc attacks you!
Third orc attacks you!
You prepare to mattack.
You are already preparing your attack.
You are already preparing your attack.
Less spam = clear view of the situation and happy lifeOrc attacks you!
Second orc attacks you!
Third orc attacks you!
You prepare to mattack.
Enjoy.