TinyFugue guild scripts

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
User avatar
Rhaegar
Legend
Posts: 960
Joined: 13 May 2010 06:22

TinyFugue guild scripts

Post by Rhaegar » 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:

Code: Select all

/def e = /echo -aBCcyan %{*}
You can change "cyan" to any other color you like.

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
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

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
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:

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
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:
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.
And with it:
Orc attacks you!
Second orc attacks you!
Third orc attacks you!
You prepare to mattack.
Less spam = clear view of the situation and happy life :)

Enjoy.
Last edited by Rhaegar on 30 Jun 2010 11:28, edited 4 times in total.
I fear no evil for I am fear incarnate.

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: TinyFugue guild scripts

Post by Tarax the Terrible » 14 Jun 2010 17:13

This is a nice effort.
And not much is secret these days.

But do you not think that these very specific to a certain guild scripts sort of give away guild abilities?
Perhaps a guild library or private section of the forum would be better.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

User avatar
Rhaegar
Legend
Posts: 960
Joined: 13 May 2010 06:22

Re: TinyFugue guild scripts

Post by Rhaegar » 14 Jun 2010 17:18

Nowadays almost everyone knows guild abilities. Or you can read about them in their guildhall or on the webpage.
I'm not going to post 'secretive guilds' scripts (ie: Rangers, SU etc.), just the guilds that are relatively common and usually fairly easy to join (ie: AA, DAs, Mercs, Glads and so on).
Still, it's more of a curio, as there's maybe 10 people I know who're still using TF after all this years (props to them).
I fear no evil for I am fear incarnate.

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: TinyFugue guild scripts

Post by Tarax the Terrible » 14 Jun 2010 17:24

I'd remove the highlights at least.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

User avatar
Rhaegar
Legend
Posts: 960
Joined: 13 May 2010 06:22

Re: TinyFugue guild scripts

Post by Rhaegar » 14 Jun 2010 17:29

Tarax the Terrible wrote:I'd remove the highlights at least.
Deal.
I fear no evil for I am fear incarnate.

User avatar
Rhaegar
Legend
Posts: 960
Joined: 13 May 2010 06:22

Re: TinyFugue guild scripts

Post by Rhaegar » 30 Jun 2010 11:06

Updated with mercenaries as they seem to be the most popular guild and their script can be easily changed into any other basic one, like Gladiators in a couple of simple ways:

1. Replacing all instances of "mattack" with "charge" and changing the "you can use again" trigger.
2. Changing the aforementioned trigger and just making alias mattack = charge.

I also added some explanation as to how this things work and what they do.
I fear no evil for I am fear incarnate.

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: TinyFugue guild scripts

Post by Tarax the Terrible » 30 Jun 2010 16:33

I like the added hold feature..
I use the deactivate attack triggers, #alarm +2 {reactivate them} to do the same thing in zmud.
And #gag any spam I can't be bothered avoiding.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

Knuffel
Wanderer
Posts: 56
Joined: 04 Mar 2010 23:05

Re: TinyFugue guild scripts

Post by Knuffel » 03 Jul 2010 21:32

Still think this is *over* the top as even if I could walk in the guild halls of AA or Mercenary and consult the books and learning about the training, this is making it TOO easy, and takes away the magic of what guilds offers as specials.

In the same idea you can start listing all the spells of spellcaster, and revealing all the secrets of how knights can turn their horses in deadly assault weapons with the hattack command.

Not happy, and think it is *over* the top ...

User avatar
Rhaegar
Legend
Posts: 960
Joined: 13 May 2010 06:22

Re: TinyFugue guild scripts

Post by Rhaegar » 03 Jul 2010 22:45

What do you mean by revealing guild abilities? Everyone knows they can smash, smack and a couple of other things.
The script itself doesn't reveal any internal working of the specials themselves, it's just triggers to launch them, not tracking damage dealt, special land and cooldown times or anything like that.
Besides, I'm not going to reveal any secret info or the specials of the guilds that are secretive. AA is hardly secretive as you can even read the list of their members with their current rank and who's currently logged in by just reading the book in their guildhall.
If a member of AA (Tarax?) would like me to remove it, I will do so.
I fear no evil for I am fear incarnate.

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/