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


Joined: 09 Jan 2006
Posts: 86

PostPosted: Sat Feb 11, 2006 6:09 pm   

follow while mapping
 
#TRIGGER {(%w) leaves (%w)} {#IF (%1=@following) {#MAKE %2;#MER;#MOVE %2}}

this is what i use to follow someone while mapping. i want to make my map follow the person(@following) and if i don't have the room the person goes into, i want to map it. for some reason #MAP doesn't really work very well. it gets stuck. does anyone know a better way?
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Sat Feb 11, 2006 8:28 pm   
 
realy you shouldnt map like this there well always be something going rong if your not there makeing shur it gose right.
with that said it is possible todo but we would need all the lines you would see for folowing someone a few rooms as your going to need to capture alot more stuff to variables to use the #Make properly. makeing shur the roomnames and exits load properly then set your location so you can continue to folow... i have not done this before but did had the same idea long ago, i just decided it wasnt worth the truble as there is always going to be something bug out with the other exits and extra comands also im not shur how fast this scripting well run so if your leader runs 10 rooms fast that you have yet to map its shur to bug out and who knows what it well do...
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Sun Feb 12, 2006 5:14 pm   
 
hmm, i just use the #MAKE incase my leader runs into a room i haven't made yet. so this is what i see when i'm following someone. i'm sav, leader is bara. thanks

Bara leaves south.
Sav leaves following Vas.

Southview street (n,s,w,e)
A tall street light.
Bara leaves north.
Sav leaves following Vas.

The Center of Town (n,s,w,e,omp,jump)
The 3-K Kill List.
A Banner Honoring the Gentech Guild.
A Statue of Cancer the King.
A tall street light.
Bara leaves south.
Sav leaves following Vas.

Southview street (n,s,w,e)
A tall street light.
Bara leaves north.
Sav leaves following Vas.

The Center of Town (n,s,w,e,omp,jump)
The 3-K Kill List.
A Banner Honoring the Gentech Guild.
A Statue of Cancer the King.
A tall street light.
Bara leaves north.
Sav leaves following Vas.

North of Center (n,s,w,e)
A tall street light.
Bara leaves west.
Sav leaves following Vas.

North lane (n,w,e)
Bara leaves east.
Sav leaves following Vas.
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Mon Feb 13, 2006 7:05 pm   Best i can come up with
 
ok this is it but i cant seem to get it to load up the other exits (out or enter) in the room along with the main exits (e w n s) but it well follow through an other exit and create it but just makes a null link back so youll have to fix that your self + the other exit room it makes is placed were ever the map decides to put it so you could end up with a messy map after words i set a bug list here so maby some of the wizards can help
ALSO you should Note that i put a variable in this class with the name "Following" now i dont know how you set your "following" variable up so youll need to get your set up eather useing this var in this class or delete the following var in this class and make shur it can use the one you have made (meaning that class its in is on) with out it the trigger well not fire rendering all this code usless

bug list:
1 mapper cant figure out what the link back through and "other exit" is
2 mapper wont know were to place a room when it finds it follows through an other exit (this well make a mess of rooms im shur)
3 when making a room that contains other exits it wont auto make the exits in the room even though the variable to load exits contains the other exits

Code:
#CLASS {FollowMapping}
#ALIAS MakeRoom {#NOOP %maplocked( 0);#T+ RoomLoading}
#VAR Following {Bara} {}
#VAR Direction {} {}
#TRIGGER {^@Following leaves (%w).$} {#VARIABLE Direction %1;#IF {%roomlink( ,@Direction)>0} {#MOVE @Direction} {MakeRoom}}
#CLASS 0
#CLASS {FollowMapping|RoomLoading} {disable}
#VAR RoomName {} {}
#VAR RoomExits {} {}
#TRIGGER {^(*)~((*)~)$} {#VARIABLE RoomName "%1";#VARIABLE RoomExits %replace( "%2", ",", "|");#MAKEROOM @Direction {@RoomName};#MOVE @Direction;#NOOP %roomexit( ,@RoomExits);#NOOP %maplocked( 1);#VARIABLE RoomName "";#VARIABLE RoomExits "";#T- RoomLoading}
#CLASS 0
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Mon Feb 13, 2006 9:46 pm   
 
ok thanks. so what will happen to my map if i follow someone into a place where i've already mapped? will it still get updated?
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Mon Feb 13, 2006 10:30 pm   
 
nothing well happen if you have mapped it it just moves you to that room... this script is made thinking if you have mapped it then its mapped right. i coded it this way so your computer isnt working at 100%cpu power for the hole time your following somone it just starts off with a simple check to see if the link your following has been mapped and if it has then moves you and waits for the next move if the link has'nt been mapped it then turns on the mapping, captures the room name, exits, creates the room, moves you there, and then gose back into follow mode. this also well make it so you wont have overlapping rooms and dont need the #merge also you dont need to leave the mapper in "mapping mode" but rather leave it in "follow mode"
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
Reply with quote
Dodgester
Wanderer


Joined: 17 Nov 2005
Posts: 65

PostPosted: Tue Feb 14, 2006 4:32 am   
 
I should forewarn you though, while this sort of thing works for grid like areas, for those areas that aren't grid like, this can be a royal pain to deal with. I have had thoughts of doing that, but decided not to cause of this very issue, which I often times have to already manually make adjustments to my maps, which I have done quite a bit of mapping to the point that certain other players on their respective sites often times come to me for help with it comes to knowing how to get to certain places. There's certain things that I would like to see more enhancements such as when #Walk I would like the option rather to attempt to get by locked doors or to find some other way around them as on some sites/levels, it's not that bad getting by locked doors, but on others, it's not that easy to get by.

Sincerely,

Dodgester
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Tue Feb 14, 2006 6:02 am   
 
yeah, shouldn't be a problem,
sorry, but which part of the code shows changing between follow mode and mapping mode?
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Tue Feb 14, 2006 8:14 am   
 
ok just tested it, works fine. except when the @Direction is portal
for some reason when the @Direction is portal, it doesn't work. as in, i have mapped the place already, but for some reason i make a new room, and don't #MOVE portal. any ideas?
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Tue Feb 14, 2006 3:54 pm   
 
to be honest with you i know nothing about the portals in zmud. i dont use them never have i just use zones and link them also use triggers and teleport. so honestly i dont even know what the portals are used for but im shur i can look into it and figure it out adding a if to the first if in the code to check for portals and follow it. ill let you know what i come up with

also
#NOOP %maplocked( 1) this is follow mode
#NOOP %maplocked( 0) this is mapping mode

for some reson it dosent look like it on the gui mapper interface but it dose change the map mode
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Tue Feb 14, 2006 4:53 pm   with portals
 
here it checks for a portal first and if its a portal it then teleports you there... im just gessing that you auto follow your leader through a portal and dont have the enter the text to the mud to follow your leader if you have the enter the text to follow your leader then it well have to be changed again also as i had no text to work with to see what happens when you follow someone through a portal so i dont know if you see something differnt or if its the same "Bara leaves portal" witch is all this is coded to follow.

Code:

#CLASS {FollowMapping}
#ALIAS MakeRoom {#NOOP %maplocked( 0);#T+ RoomLoading;#VARIABLE PortalNumber ""}
#ALIAS Teleporting {#TELEPORT @PortalNumber;#VARIABLE PortalNumber "";#VARIABLE Direction ""}
#VAR Following {} {}
#VAR Direction {} {}
#VAR PortalNumber {0} {0}
#TRIGGER {^@Following leaves (*).$} {#VARIABLE Direction "%1";#VARIABLE PortalNumber %portal( @Direction);#IF {@PortalNumber>0} {Teleporting} {#IF {%roomlink( ,@Direction)>0} {#MOVE @Direction} {MakeRoom}}}
#CLASS 0
#CLASS {FollowMapping|RoomLoading} {disable}
#VAR RoomName {} {}
#VAR RoomExits {} {}
#TRIGGER {^(*)~((*)~)$} {#VARIABLE RoomName "%1";#VARIABLE RoomExits %replace( "%2", ",", "|");#MAKEROOM @Direction {@RoomName};#MOVE @Direction;#NOOP %roomexit( ,@RoomExits);#NOOP %maplocked( 1);#VARIABLE RoomName "";#VARIABLE RoomExits "";#T- RoomLoading}
#CLASS 0
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
Reply with quote
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Tue Feb 14, 2006 5:41 pm   
 
ok, i've already mapped both sides of the portal. and the text when following through the portal is exactly the same as the rest of the following text.
Bara leaves portal.
that's why i don't understand why i don't follow through. i don't use portals or teleport. when i go through portals, my Other Com is portal. that's it.
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Wed Feb 15, 2006 1:46 am   
 
oh ok i know whats going on just going to take a bit to figure out away around this or find the built in func for otherexits (portal) changed into reg exits meaning you push keypad 8 for north but its been changed to portal as the cmd.
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
Reply with quote
Dodgester
Wanderer


Joined: 17 Nov 2005
Posts: 65

PostPosted: Wed Feb 15, 2006 3:24 am   
 
I'm not sure what the zMUD equivalent code is for this, but within the MDB file, you can look for ExitTbl!FromID to locate all exits going from that room, and the field, ExitTbl!DirType will have a value of 10 in most cases. The value of 10 is for "Other Exit". Why I say in most cases, you can have cases where any one of the other 10 directions can be used, but still have to type in a different exit name in order to get into the next room using that direction. In either case, the value of the field, ExitTbl!Name will be something other than "".

Sincerely,

Dodgester
Reply with quote
Istroath
Novice


Joined: 11 Feb 2005
Posts: 39

PostPosted: Wed Feb 15, 2006 9:47 pm   Finaly
 
well this is it finaly.. i hope... it well still be buggy with that past bugs mentioned but it well now follow your other exits you have already mapped and only make a room when it finds a null link.
Code:

#CLASS {FollowMapping}
#ALIAS MakeRoom {#NOOP %maplocked( 0);#T+ RoomLoading}
#ALIAS MoveDir {#MOVE @Direction;#VARIABLE Direction ""}
#VAR Following {} {}
#VAR Direction {} {}
#TRIGGER {^@Following leaves (*).$} {#VARIABLE Direction "%1";#IF {%roomportal( ,@Direction, ,)>0} {MoveDir} {#IF {%roomlink( ,@Direction)>0} {MoveDir} {MakeRoom}}}
#CLASS 0
#CLASS {FollowMapping|RoomLoading} {disable}
#VAR RoomName {} {}
#VAR RoomExits {} {}
#TRIGGER {^(*)~((*)~)$} {#VARIABLE RoomName "%1";#VARIABLE RoomExits %replace( "%2", ",", "|");#MAKEROOM @Direction {@RoomName};#MOVE @Direction;#NOOP %roomexit( ,@RoomExits);#NOOP %maplocked( 1);#VARIABLE RoomName "";#VARIABLE RoomExits "";#VARIABLE Direction "";#T- RoomLoading}
#CLASS 0
_________________
Lord of the Rings, The Two Towers mud. http://www.t2tmud.org/
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