My flee code

Scripts and support for your favorite MUD client.
Shaiith
Sojourner
Posts: 33
Joined: Tue Feb 15, 2005 2:07 pm

My flee code

Postby Shaiith » Mon Jul 13, 2009 11:12 pm

Here's the code I use to expedite movement while in combat, ever wish you could flee until successful, return to the same room, and then execute a command? "fr backstab izel" does exact what you'd expect.

All of the flee attempts flee until successful or you fail flee_max_try times (10 by default).

f means flee
r means return
a means abort

They can be combined into commands as af, afr, f, fr, and r. All of those commands take an argument that defines the actions to take after the a, f, and/or r have finished.

f m would flee and memorize spells assuming that was aliased to m

f {rest;mem} would also do the same thing

fr bs izel would flee, return and initiate a backstab on izel assuming bs = backstab and not barkskin

f {hide;sneak on;r say can you see me now} would flee, hide, turn sneak on (not sure if this is the right syntax), return to the room and taunt everyone with a very annoying Verizon ripoff. You could even define #ali fsr {f {hide;sneak on;r %0}} to flee, hide, sneak back, and do whatever.

fr enter portal is good for when you enter a portal to the wrong location.

Lots of possiblities

Also after a flee you can do r to go back
f m to flee out and mem
later
r ds tank to return and dragonscale the tank

As a note, fr {s;m} is faster than retr s;m, and quite likely just as safe assuming you have a lowish ping.

Get caught memming out by a walkin? fr {return to main combat dir} to drag the mobs to the group (if that's ok, if the group would rather you die I didn't suggest this)



from elsewhere

Code: Select all

#ali pound_send #send %0;


Code: Select all

#var flee_in_process 0

#var flee_fails 0;
#var flee_max_try 10
#ali flee_hook #nop

#var flee_should_return 0
#var flee_return_dir #nop
#ali flee_return_hook #nop

#var flee_rev_north south
#var flee_rev_east  west
#var flee_rev_south north
#var flee_rev_west  east
#var flee_rev_up    down
#var flee_rev_down  up

#ali af {abort;flee %0}
#ali afr {abort;fr %0}

#ali f    flee %0
#ali fl   flee %0
#ali fle  flee %0

#ali flee {
  #if {${flee_in_process} == 0} {
    stand;
    pound_send flee;

    #var flee_in_process 1;
    #var flee_fails 0;
    #if {"%0"!=""}
    {
      #ali flee_hook %0;
    } {
      #ali flee_hook #nop;
    };

    #var flee_should_return 0;
    #var flee_return_dir #nop;
  }
}
     
#ali flee_repeat {
  incr flee_fails;

  #if {${flee_fails} < ${flee_max_try}}
  {
    pound_send flee;
  } {
    #var flee_in_process 0;
  };
}

#ali r {
  #if {${flee_in_process} == 1}
  {
    #var flee_should_return 1;
    #ali flee_hook #nop;

    #if {"%0"!=""}
    {
      #ali flee_return_hook %0;
    } {
      #ali flee_return_hook #nop;
    };
  } {
    stand;
    ${flee_return_dir};
    flee_return_hook;

    #var flee_return_dir #nop;
    #ali flee_return_hook #nop;
  };
}

#ali fr {
  flee;

  #var flee_should_return 1;

  #if {"%0"!=""}
  {
    #ali flee_return_hook %0;
  } {
    #ali flee_return_hook #nop;
  };
}

#nop reflee in these two cases
#act {^You scramble madly to your feet!} {flee_repeat} 2
#act {^PANIC!  You couldn't escape!} {flee_repeat} 2

#act {^You flee %1ward!} {
  #var flee_in_process 0;

  flee_hook;

  #var flee_return_dir ${flee_rev_%1};

  #if {${flee_should_return} == 1}
  {
    r;
  };

  #var flee_should_return 0;
  #ali flee_hook #nop;
}
Harlindral group-says 'but, im very powerful'

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 18 guests