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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Mon Nov 15, 2010 11:24 pm   

[v3.32] - MXP links doesn't work correct in Room triggers.
 
I just noticed that when I enter a room from my map that has a trigger to change text to an MXP link the first time I click it, it doesn't send the correct information.
See the video below:

http://www.youtube.com/watch?v=_z9Q6Iso1YA

Here is the code:
Code:
<trigger priority="590" id="42">
  <pattern>%qfarm%q</pattern>
  <value><![CDATA[#sub {<send 'enter farm' 'Goto farm'><color PaleGreen>farm</color></send><color SlateBlue>(Cherry Blossom Farm)</color>}]]></value>
</trigger>


When I first click the link it sends .(<enter farm>), but when I click it again it sends enter farm.

This only seems to happen with triggers in room for mapping.

I did a little more testing with this. If your remove the command with the sing quotes it sends the default command, but once you put the command in single quotes it echos the .(value) to the screen. If another command is sent to the mud like a direction, it will then do the command inside the single quotes. So it has something to do with the single quotes.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Nov 16, 2010 1:50 pm   
 
I've been doing links similar to this this recently myself, and did not experience the trouble you describe. I don't have access to Cmud here at work, but I'll try testing when I get home.
[edit]My links have not been within room classes, so I'll try to check that later[/edit]

Have you tried the command '#send enter farm' instead of 'enter farm'? I assume the 'enter' is a mud command, not an alias you wrote. Using #send is a bit more reliable for sending raw commands to the mud in a script, since it does not have to pass through the trigger parser.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Nov 16, 2010 2:03 pm   
 
Do you happen to have a path named farm, or enter farm, or anything like that?
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Nov 16, 2010 3:22 pm   
 
Rahab wrote:
Have you tried the command '#send enter farm' instead of 'enter farm'? I assume the 'enter' is a mud command, not an alias you wrote. Using #send is a bit more reliable for sending raw commands to the mud in a script, since it does not have to pass through the trigger parser.


I just tried you suggestion and it still does send the wrong information to the mud the first time you click the link. I definately think it has to do with being a room trigger.
See code:
Code:
#sub {<send '#send enter farm' 'Goto farm'><color PaleGreen>farm</color></send><color SlateBlue>(Cherry Blossom Farm)</color>}


Rahab wrote:
Do you happen to have a path named farm, or enter farm, or anything like that?

Nope. I don't have any paths.

I also moved the trigger outside of the room class and it works fine. So it is a bug in the room classes.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Nov 16, 2010 6:09 pm   
 
There must be some other script interaction going on. Try running the Script Debugger to see exactly what is running.

Here is what I did to try and reproduce this. I have a room with the word "cottage" in the room name. So I clicked on the room in the map, then clicked the Room Properties button. Then clicked the Scripting tab. Then clicked the "Edit scripts for this room" button.

CMUD opened the settings editor and created a room folder called "Room15". I copied your above Trigger in the first post to the clipboard, then right-clicked on the Room15 folder in the tree view on the left and selected Paste. This gave me a trigger within that room folder.

I then just edited the pattern of your trigger and changed "%qfarm%q" to "%qcottage%q" so it would match the name of the room.

Closed the settings editor and moved into the room. The room name in the main session window now shows this:

Nearing a humble farm(Cherry Blossom Farm).

When I hover over the "farm" link it says "Goto farm". When I click the link, it properly sends "enter farm" to the MUD.

So it seems to work just fine for me here. The Room folders in CMUD are no different than any other class folder, and the MXP code certainly doesn't care anything about the room folders. So I have no idea what could cause it to act like this on your system.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Nov 16, 2010 6:32 pm   
 
I wondering now if this is something lingering from my old Shadows of Isildur session. I posted another thread about the multi-state button not working correctly and figured out is was some setting in my session, because when I recreated my script from scratch the problem disappeared. The map I am using was from that older session and is fairly large and I don't want to redo everything again.

I disabled all of my packages so that I didn't have any triggers to fire.
Checked my session window for any triggers. I don't have any. Only thing stored in my session window is classes with aliases or variables for my packages.
Checked to see if there is a alias for farm.. nope.
I did deleted the room trigger and recreated it following your above instructions and it still does the wrong thing.

There has to be something corrupted in my map.


Here is the log from when I enter the room.
Code:

0.0034 | a  Shadowso |<****** / ||||||>
0.3341 | i  Shadowso <<ESC>[36mGrassy Plains Running Alongside Lond Forodren-Annui<ESC>[0m<CR><LF>
0.0000 | <ESC>[36mExits:<ESC>[0m <ESC>[32mnorth<ESC>[0m <ESC>[32meast<ESC>[0m <ESC>[32msouth<ESC>[0m <ESC>[32mwest<ESC>[0m <CR><LF><CR><LF>
0.0001 |    The Pelennor Fields stretch out in all directions here, <CR><LF>
0.0000 | covering the entire countryside between the colossal Mount <CR><LF>
0.0000 | Mindolluin and the Rammas Echor. Far from being one single, flat <CR><LF>
0.0000 | plain, the Pelennor Fields contain within them cool dams and <CR><LF>
0.0000 | small bubbling streams, hillocks and mounds, great fields and <CR><LF>
0.0000 | short-growing grazing land. The occasional farmstead can be seen <CR><LF>
0.0000 | among the Fields, as well as wagons and carts making their way <CR><LF>
0.0000 | across the three roads that cross the landscape, bearing <CR><LF>
0.0000 | travellers and goods from all about Gondor. <CR><LF>
0.0000 |    One such road lies to the west of the Pelennor Fields here, a <CR><LF>
0.0000 | slow but steady stream of traffic moving across it with one such <CR><LF>
0.0000 | farm residing here, near to that road. <CR><LF><CR><LF>
0.0000 | <ESC>[36mThe air here carries the subtle aroma of impending rain.<CR><LF>
0.0000 | <ESC>[0m<CR><LF>
0.0000 | <ESC>[32m<ESC>[36mA blanket of fresh white snow covers the ground.<ESC>[0m<ESC>[0m <CR><LF><CR><LF>
0.0000 | <<ESC>[31m**<ESC>[33m**<ESC>[32m**<ESC>[0m / <ESC>[31m||<ESC>[33m||<ESC>[32m||<ESC>[0m>
0.0091 | a  Shadowso |Grassy Plains Running Alongside Lond Forodren-Annui
0.0035 | a  Shadowso |Exits: north east south west
0.0038 | f  Shadowso |Pattern: Exits:
0.0063 | c  Shadowso |exec : Pattern "Exits:" : #OK
0.0029 | n  Shadowso |Exec Trigger "Exits:"
0.0753 | a  Shadowso |
0.0037 | a  Shadowso |   The Pelennor Fields stretch out in all directions here,
0.0035 | a  Shadowso |covering the entire countryside between the colossal Mount
0.0036 | a  Shadowso |Mindolluin and the Rammas Echor. Far from being one single, flat
0.0120 | a  Shadowso |plain, the Pelennor Fields contain within them cool dams and
0.0035 | a  Shadowso |small bubbling streams, hillocks and mounds, great fields and
0.0040 | a  Shadowso |short-growing grazing land. The occasional farmstead can be seen
0.0044 | a  Shadowso |among the Fields, as well as wagons and carts making their way
0.0053 | a  Shadowso |across the three roads that cross the landscape, bearing
0.0034 | a  Shadowso |travellers and goods from all about Gondor.
0.0075 | a  Shadowso |   One such road lies to the west of the Pelennor Fields here, a
0.0050 | a  Shadowso |slow but steady stream of traffic moving across it with one such
0.0039 | a  Shadowso |farm residing here, near to that road.
0.0031 | f  Shadowso |Pattern: %qfarm%q
0.0042 | c  Shadowso |exec : Pattern "%qfarm%q" : #sub {<send 'enter farm' 'Goto farm'...
0.0047 | n  Shadowso |Exec Trigger "%qfarm%q"
0.0046 | g  Shadowso =farm(Cherry Blossom Farm) residing here, near to that road.
0.0038 | a  Shadowso |
0.0043 | a  Shadowso |The air here carries the subtle aroma of impending rain.
0.0044 | a  Shadowso |
0.0070 | a  Shadowso |A blanket of fresh white snow covers the ground.
0.0039 | a  Shadowso |
0.0066 | a  Shadowso ]<****** / ||||||>
4.2674 | ---
0.0036 | c  Shadowso |[4] ShadowsofIsildur Comline : start :
0.0138 | ---
0.0081 | a  Shadowso |<****** / ||||||> .(<enter farm>)
0.0097 | i  Shadowso >.(<enter farm>)<CR><LF>
0.0053 | d  Shadowso |[4] ShadowsofIsildur Comline : stopped
0.4630 | i  Shadowso <I don't recognize that command.<CR><LF>
0.0039 | a  Shadowso |I don't recognize that command.
0.3192 | i  Shadowso <<CR><LF>
0.0000 | <<ESC>[31m**<ESC>[33m**<ESC>[32m**<ESC>[0m / <ESC>[31m||<ESC>[33m||<ESC>[32m||<ESC>[0m>
0.0053 | a  Shadowso |
0.0035 | a  Shadowso ]<****** / ||||||>
0.0000 |
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Nov 16, 2010 6:45 pm   
 
I just tried the map conversion tool to see if that fixed the issue and is still doing it.

Also I just tried deleting the room from the map and recreating it from scratch with the room trigger and it still is sending the room script incorrectly.

Zugg do you want me to send you my map?
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Nov 16, 2010 10:38 pm   
 
What speedwalk mode are you in? Also what mapper mode (follow/map)? Also, exactly how are you moving to the room. In my case I was using the keypad macro to move manually. I was also in Fast mode.

The fact that CMUD is adding the . to the beginning and enclosing the command with () makes it seem like it is treating your command as a speedwalk command.

If you can reproduce the same problem when Offline and manually moving through your map, then yes, you can send me the map file. But if the problem only happens when connected then that won't help me.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Tue Nov 16, 2010 10:47 pm   
 
Zugg,
Speedwalk mode? Safe walk
mapper mode? I tried it with both ways in follow and map. I was just moving into the room by typing the direction. (n).
I sent you my map. I was able to reproduce it while offline. The map and package was sent to support@zuggsoft.com
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Nov 17, 2010 5:41 pm   
 
You didn't actually send the map file. You sent your package (pkg), layout (xly) and mapper configuration (zfg) but not the actual map database itself *.dbm.
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Wed Nov 17, 2010 5:43 pm   
 
Zugg wrote:
You didn't actually send the map file. You sent your package (pkg), layout (xly) and mapper configuration (zfg) but not the actual map database itself *.dbm.


Oops! Sending the map file now.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Nov 19, 2010 1:00 am   
 
Zugg, Did you get my map database? I sent it to the support email.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Nov 19, 2010 5:27 pm   
 
Yep, got the file but it will be Monday before I can look at it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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