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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
tyh
Beginner


Joined: 01 Feb 2004
Posts: 24
Location: United Kingdom

PostPosted: Wed Mar 02, 2005 2:29 pm   

getting the rooms vnum and triggering a variable
 
Hi

Is there any way to store or retrieve the current marvnum of the room your in or more specifically passing through. I trigger off of the exits line already and store the %mapvnum() value in a variable each time but as I want to fast speedwalk this number very soon becomes the final destination rooms vnum and this value is captured for each room I pass through. I have a slowwalk search function but some paths are long.

Also I want to sometimes look out for mobs on certain speedwalks so I can say at the end of the walk if there was one that I passed by. I've been trying to send a variable to a trigger to record this, such as :
#trig {@Questmob} {@mobpresent = @currentvnum}
where I set the mob Im loking for in Questmob and later interogate currentvnum to see if its alive and where it is.
This has proved to be a bit fiendish to set up and I cant even set up testing triggers to trigger off of a variable. The documentation briefly mentions putting it in quotes or something but I'm not sure how to do that as concat doesnt fire the trigger.
_________________
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Mar 04, 2005 3:32 pm   
 
first making a list of what you want to do and in what order step by step and post that here
use your var names and give a small example of what you would like each step to do.
Then I am sure anyone here can help you further.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
tyh
Beginner


Joined: 01 Feb 2004
Posts: 24
Location: United Kingdom

PostPosted: Sat Mar 05, 2005 9:02 am   
 
ok
I want to have the ability to:
give one command alias and parameter and walk to a given location on the map from anywhere, long distances included
arrive actually where i wanted to be and not wind up in an obscure corner of the world getting a red nose
goto a mob directly by feeding in a location or list of locations , also to detect if I find the mobs other than the locations given.

I have two ways of doing this so far, both probably horribly conveluted, #al gotoloc goes to a location and gotomob uses a database record to go to a mob.
GotoLoc:
Code:

#va dest %1
#va walkingLocation 1
#va cleanwalk 0
#if (@dest) {
  #ala arewethereyet *30 {#if (not @incombat) {#if (@beenincombat) {Recover} {#if (@dest = %mapvnum) {yesweare}}}}
  #walk @dest
  }

the destination map vnum is stored in dest, walkinglocation can be used to flag the walk is in operation and tested in while loops for instance, cleanwalk isnt implemented yet and is part of what i want to do. incombat is a flag set when the char is in combat and beenincombat is another part of my attempt at the solution which is set if combat has occured. Recover is an alias that will do a Recall and a #te to recall but I seek improvement on this method. Yesweare is the alias with commands when the destination is reached. The real unsatisfactory part is the arbitary length of the alarm trigger, and this can cause all the problems Im trying to solve.

GotoMob
Code:

loadmob
#va GMob @getmobname(%-1)
#va gmoblstring %db( @GMob, "look string")
#class mobidentifier 1
#if (@GMob.Location = 0) {
  loadwaypoint
  #va GWaypoints @getarec(@GMob.Waypoints)
  RunWay @GWaypoints
  } {gotoloc @GMob.Location}
#wait 1000
#while (@walkingLocation) {#noop}


Gotomob interrogates my database from a passed mob name (name the mud calls the mob) and either goes to its location using gotoloc or gets more information from a waypoint record. The waypoint procedure RunWay Gotoloc 's to the first waypoint and then slowwalks around. The gmoblstring I set contains the text displayed for the mob if they are in the room, I currently use this in a trigger in the mobidentifier class I turn on.

Code:

#trig {(*)} {#if (%literal( %1) = @gmoblstring) {
  atthemob
  #ala +1 {#class mobidentifier 0}
  }}


This trigger fires on colored lines from the mud also. atthemob is a procedure to handle things when were there and I also turn the class off.
This trigger has been painstakingly developed over the last few days :) and just about works now how I want.

So as you see I can do what I want to given a following wind and tons of patience, but I want to be able to goto a mob by simply typing gotomob mob or gotoloc smithy and not get lost on the way.
_________________
Reply with quote
tyh
Beginner


Joined: 01 Feb 2004
Posts: 24
Location: United Kingdom

PostPosted: Sat Mar 05, 2005 11:26 am   
 
hooking in with my other thread on finding the romm vnum which should help alot, i can map on default and see:


The Commons
Visible Exits: N E S

People from all over town come here to talk to the leaders of town and to
talk of problems or to discuss current news issues. Travellers from far
away lands may tell of their travels. You also might find a few of the
local merchants peddling their goods.
<557/557/0hp 850/850/0sp 531/532/0st> s



The Commons
Visible Exits: N E S

People from all over town come here to talk to the leaders of town and to
talk of problems or to discuss current news issues. Travellers from far
away lands may tell of their travels. You also might find a few of the
local merchants peddling their goods.
<557/557/0hp 850/850/0sp 530/532/-1st>

as i move
The prompt is a script prompt but the mapper works fine off of reconfigure or new settings menu items

a mob might be:

A castle guard is here checking to make sure nothing illegal is going on.

which the mud calls 'A castle guard', and I call guard in my mob database in fields name , short and look string
_________________
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sun Mar 06, 2005 2:59 pm   
 
whenever I want to goto a spicificplace and not get involved in other stuff I have a #alias that suhts down my active combat script while I am in route, if I run into a mob I have a trigger that pauses my step. I have found that slow walk works best for this. Unless I know the route is clear of danger then I speed walk.

#alias TownSquare {#t- combat;e;e;e;d;n;n;n;n;n;#t+ combat}

you can also take the time to do a temp re-route

where you get the room vnum then check it against the list of directictios (store those in a var) then pick up where you left off
this way you can stop and pick fights

Also I am not sure I have to look into it, but you could get the vnum of where you are going and where your at and use a plot to get there.
But this might take work.
_________________
megamog75 Smile
I will do this.Nothing in my life matters except this.No moment in my life exists except this moment.I am born in this moment, and if I fail, I will die in this moment. Raistlin Majere
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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