Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Drakmorden
Novice


Joined: 14 Dec 2000
Posts: 34
Location: USA

PostPosted: Sat May 05, 2001 6:29 pm   

Random Direction Mob Hunter.
 
I was going through old posts, and saw one that wanted a random direction script to attack mobs when they were there. It is a little late, but this is a script that I use for an unmappable area called The Abyss at Nodeka. It will kill all of the mob type you are hunting in that room before it attempts to move. This script works on one target type only, but with a little modification, it could do more.

*A main drawbak to this script is that it does run into walls ocassionally, when this happens, the script treats it as if it actually did move, tries to attack the target and if now is found it will try another random direction.

nok will stop the script, resume restarts after a nok stop, and goabyss (or whatever you edit it to) will initially start it.

(also, these movs "can" throw, so the 'hurls you' trigger is to keep it moving should that happen.)
#CLASS {autoabyss}

#ALIAS ud1 {%item(@dirList,%random(1,6));#va move ud1}

#ALIAS autok {#class autoabyss;#VAR dirList {n|e|s|w|u|d};#alias n {north;t};#alias s {south;t};#alias e {east;t};#alias w {west;t};#alias u {up;t};#alias d {down;t};#trigger {DEAD!} {get all, corpse;sac corpse;t}}

#ALIAS goabyss {#class autoabyss;autok;#var move ud1;t;#trigger {There is no one here} {%item( @dirList, %random( 1, 6))}}

#ALIAS nok {#echopr %ansi( yellow) Abyss Halted!!!;#alias n {north};#alias s {south};#alias e {east};#alias w {west};#alias u {up};#alias d {down}

#ALIAS t {stoicism demon}

#var {resume} {@move}

#TRIGGER { a pile of} {get all.coin}

#TRIGGER {HURLS you into the air!} {t}

Drakmorden Har'luth
Reply with quote
Drakmorden
Novice


Joined: 14 Dec 2000
Posts: 34
Location: USA

PostPosted: Thu May 24, 2001 4:11 am   
 
and stoicism can be changed to a spell... that is just the skill I use to attack (in the t alias).

http://www.geocities.com/beyondnumb/Drakmorden.gif
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Mon Jan 23, 2006 6:08 pm   
 
So... Ok. This is an older post. But... I wanted to put my update. My script, is for the area Glades. Its got lots of aggro, and I didn't feel like maping it out, so... I made an r-walker. It doesn't run into the walls, and it also doesn't walk back on itself. IE go back to the same room it just came from. Its only keeps a one move history... Something I'd like to work on sometime. And SOMETIMES if you go into a room with one exit, it might lock up. Anyways. Here it is. Mind you that some of the variables, and spells, and checks and what not are for a Monk.

#CLASS {My Stuff|RandomMovementScripts}
#ALIAS gotopool {#3 n;e;n;#12 e;#4 n;#6 e;n;e;n;e;s}
#VAR rscriptcheck {0} {0}
#CLASS 0
#CLASS {My Stuff|RandomMovementScripts|Glades}
#TRIGGER {~[Lag: (%d)~]} {#IF (@moveto = "north") {#VARIABLE badmove south};#IF (@moveto = "south") {#VARIABLE badmove north};#IF (@moveto = "east") {#VARIABLE badmove west};#IF (@moveto = "west") {#VARIABLE badmove east};#IF (@moveto = "up") {#VARIABLE badmove down};#IF (@moveto = "down") {#VARIABLE badmove up};#IF (@fighting = 0) {#IF (@goforheal = 1) {#IF (@hit_cur < @hps_pool) {zmh;#VARIABLE goforheal 0}}};#IF (@fighting = 0) {#IF (@goforregal = 1) {#IF (@end_cur < @end_pool) {zin;#VARIABLE goforregal 0}}};#IF (@fighting = 0) {#IF (@autorad = 1) {rad def;#VARIABLE autorad 0}};#IF (@fighting = 0) {#IF (@autoglobe = 1) {globe;#VARIABLE autoglobe 0}};#IF (@hit_cur > @hps_pool) {#IF (@end_cur > @end_pool) {#IF (@autorad = 0) {#IF (@autoglobe = 0) {#IF (@movenow = 1) {#VARIABLE movenow 0;@moveto}}}}};#IF (@fighting = 1) {@attck @target;#IF (@autostance = 1) {#IF (@stance_combat = 1) {@usestance}};vic;#VARIABLE fighting 5}}
#TRIGGER {~[ exits~: &dirlist ~]$} {#VARIABLE totalexit {%numwords( @dirlist)};#VARIABLE movenow 1;#VARIABLE fighting 0;#VARIABLE dirlist {%replace( @dirlist, " ", "|")};#IF (@totalexit > 1) {#IF (%ismember( @badmove, @dirlist)) {#DELITEM dirlist {@badmove};#ADD totalexit -1};#VARIABLE movenum {%random( 1, @totalexit)};#ADD movenum -1;#VARIABLE moveto %item( @dirList, %random( 1, @movenum))} {#VARIABLE moveto @dirlist}}
#CLASS 0
#CLASS {My Stuff|RandomMovementScripts|Glades|Triggers}
#TRIGGER {^Isles of Drale} {say Whoops! Left Glades... Gotta restart script...;#T- Glades}
#TRIGGER {^Your alignment is outside the boundaries of your class, action failed.} {#VARIABLE moveto %item( @dirList, %random( 1, @totalexit));#VARIABLE movenow 0;movedirection} "" {disable}
#TRIGGER {^You receive} {look;#VARIABLE fighting 10}
#TRIGGER {^Your meditation heals your wounds.} {#VARIABLE goforheal 1}
#TRIGGER {^A light blue glow fills you with refound energy.} {#VARIABLE goforregal 1}
#CLASS 0
#CLASS {My Stuff|RandomMovementScripts|Glades|Variables}
#VAR attck {vic fis}
#VAR badmove {west} {west}
#VAR dirList {south}
#VAR endpool {4000}
#VAR fighting {0} {0}
#VAR movenow {} {}
#VAR moveto {south}
#VAR target {piranha}
#VAR totalexit {1} {1}
#VAR goforheal {1}
#VAR goforregal {1}
#VAR movenum {0}
#CLASS 0
#CLASS {My Stuff|RandomMovementScripts|Glades|Aliases}
#ALIAS movedirection {@moveto}
#CLASS 0
#CLASS {My Stuff|RandomMovementScripts|Glades|Triggers|Mobs}
#TRIGGER {^a blood-starved piranha is here, fighting (*)!!} {#VARIABLE target piranha;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A blood-starved piranha swims about searching for its next meal.} {#VARIABLE target piranha;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A cook is here cowering in the corner.} {#VARIABLE target cook;#VARIABLE fighting 1;#VARIABLE movenow 0}
#TRIGGER {^A flock of ~[ (%d) ~] red cranes extend their wings to approaching danger.} {#VARIABLE target crane;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^a goufra fisherman is here, fighting (*)!!} {#VARIABLE target fisherman;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^a Goufra slumber guard is here, fighting YOU!!} {#VARIABLE target guard;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A Goufra slumber guard stands protectively over its mentor.} {#VARIABLE target guard;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A group of ~[ (%d) ~] naked Klierd'n pirates are here.} {#VARIABLE target pirate;#VARIABLE fighting 1;#VARIABLE movenow 0}
#TRIGGER {^A group of ~[ (%d) ~] slumber guards stand in a defensive formation around their mentor.} {#VARIABLE target guard;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A herd of ~[ (%d) ~] water buffalo wander about aimlessly.} {#VARIABLE target buffalo;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A large crane extends its wings to approaching danger.} {#VARIABLE target crane;#VARIABLE fighting 1;#VARIABLE movenow 0}
#TRIGGER {^a large red crane is here, fighting YOU!!} {#VARIABLE target crane;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A large water buffalo wanders about aimlessly.} {#VARIABLE target buffalo;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^a naked Klieard'n pirate is here, fighting (*)!!} {#VARIABLE target pirate;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A naked Klieard'n pirate cowers when he sees you.} {#VARIABLE target pirate;#VARIABLE fighting 1;#VARIABLE movenow 0}
#TRIGGER {^A school of ~[ (%d) ~] blood-starved piranha attack its prey in unison.} {#VARIABLE target piranha;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^A whale bobs in and out of the Drale sea, blowing water from its blowhole.} {say Kill the whale! Stopping script till dead....;#T- Glades}
#TRIGGER {^an ancient Klieard'n whale is here, fighting YOU!!} {say DIE!}
#TRIGGER {^an angry water buffalo is here, fighting YOU!!} {#VARIABLE target buffalo;#VARIABLE movenow 0;#VARIABLE fighting 1}
#TRIGGER {^These ~[ (%d) ~] Goufra are intent on not leaving their fishing boat.} {#VARIABLE target fisherman;#VARIABLE fighting 1;#VARIABLE movenow 0}
#TRIGGER {^This Goufra man keeps an eye out for fish as he mans his boat.} {#VARIABLE target fisherman;#VARIABLE fighting 1;#VARIABLE movenow 0}
#CLASS 0
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net