|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Sun Aug 03, 2003 11:52 pm
MXP Problem... |
I have a really long MXP send command in a #sub and it just prints out the whole damn thing, instead of using it as a right click menu. Now if I use it in a #mxp command to test it, it works just fine, but in the #sub I'm having problems with it. Can it only be so long or something? If you want to see it, let me know...but I believe I've covered the basis of my problem. Thanks to anyone who can help me with my problem.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Aug 04, 2003 4:32 am |
Post up the code, and any output you see. It might be you have a few things getting parsed out or something.
However, if you know already the line is properly tagged, then your problem simply boils down to the fact you're trying to process a secure MXP tag on an unsecure line. This goes against MXP specs, which #SUB now follows. To view the MXP specs, go here.
Unlike #SUBSTITUTE, the #MXP and #WINDOW commands will secure the line so secure tags can be processed. |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Mon Aug 04, 2003 11:10 pm |
Script..
#TRIGGER {~[Area~: (*) Vnum~: (%n)~]~[(*) ~- (*)~]$} {#var Area {%1};#var currentVnum {%2};#var Editor {%3};#var Editing {%4};#if ((@Editor != %null) AND (@Editing != %null)) {#sub {~[%ansi(black,bright)Area~: %ansi(green,bright)~<send "goto|goto @Aelonia|goto @Arcadia|goto @Arcanums_Tribe_La|goto @Arcanum_Overland|goto @Arena|goto @Bruinen|goto @Conclave_Overlands|goto @conclave_tribe_lan|goto @Coraan|goto @Descendents_of_Sam|goto @Descent_to_Hell|goto @Divided_Souls|goto @Djinn_Skies_Lair|goto @Dragons_Lair|goto @Drakyri_Isle|goto @Drow_City|goto @Dwarven_Kingdom|goto @Elemental_Canyon|goto @Elfhain|goto @Elven_Port|goto @Elysium_Gate|goto @Flaming_Tower|goto @Ghost_Town|goto @Goblin_Stronghold|goto @Haven_Lake|goto @Immortal_Compound|goto @Keep_of_MahnTor|goto @Lair_of_Jher|goto @Legends|goto @Limbo|goto @Luxor|goto @Machine_Dreams|goto @Marsh|goto @Merchants_City|goto @Moria|goto @Mos_Eisley|goto @Mount_Doom|goto @Newbie_Town|goto @New_Ofcol|goto @New_Thalos|goto @Orcish_Stronghold|goto @PCHouses|goto @PCStore_Area|goto @Quest_Area|goto @Quest_Extras_Area|goto @Redfernes|goto @Shuttle_Boat|goto @Snow_Drift|goto @The_Greensward|goto @The_North_Village|goto @The_PaRty_HouSe|goto @The_Radaan|goto @The_Rain_Forest|goto @The_Waste_Lands|goto @Tombstone|goto @Transport_Boat|goto @Troy|goto @Volcano|goto @World_Map" "Goto Point|Aelonia|Arcadia|Arcanum's Tribe Lands|Arcanum Overlands|Arena|Bruinen|Conclave Overlands|Conclave Tribe Lands|Coraan|Descendents of Samhain|Descent to Hell|Divided Souls|Djinn Skie's Lair|Dragon's Lair|Drakyri Isle|Drow City|Dwarven Kingdom|Elemental Canyon|Elfhain|Elven Port|Elysium Gate|Flaming Tower|Ghost Town|Goblin Stronghold|Haven Lake|Immortal Compound|Keep of Mahn-Tor|Lair of Jher|Legends|Limbo|Luxor|Machine Dreams|Marsh|Merchants City|Moria|Mos Eisley|Mount Doom|Newbie Town|New Ofcol|New Thalos|Orcish Stronghold|PCHouses|PCStore Area|Quest Area|Quest Extra's Area|Redferne's|Shuttle Boat|Snow Drift|The Greensward|The North Village|The Party House|The Radaan|The Rain Forest|The Waste Lands|Tombstone|Transport Boat|Troy|Volcano|World Map">@Area~</send> %ansi(black,bright)Vnum~: %ansi(green,bright)@currentVnum%ansi(cyan)~]~[%ansi(green,bright)~<send "done|commands" @Editor>@Editor~</send> %ansi(cyan)~- %ansi(green,bright)@Editing%ansi(cyan)~]}} {#sub {~[%ansi(black,bright)Area~: %ansi(green,bright)~<send "goto|goto @Aelonia|goto @Arcadia|goto @Arcanums_Tribe_La|goto @Arcanum_Overland|goto @Arena|goto @Bruinen|goto @Conclave_Overlands|goto @conclave_tribe_lan|goto @Coraan|goto @Descendents_of_Sam|goto @Descent_to_Hell|goto @Divided_Souls|goto @Djinn_Skies_Lair|goto @Dragons_Lair|goto @Drakyri_Isle|goto @Drow_City|goto @Dwarven_Kingdom|goto @Elemental_Canyon|goto @Elfhain|goto @Elven_Port|goto @Elysium_Gate|goto @Flaming_Tower|goto @Ghost_Town|goto @Goblin_Stronghold|goto @Haven_Lake|goto @Immortal_Compound|goto @Keep_of_MahnTor|goto @Lair_of_Jher|goto @Legends|goto @Limbo|goto @Luxor|goto @Machine_Dreams|goto @Marsh|goto @Merchants_City|goto @Moria|goto @Mos_Eisley|goto @Mount_Doom|goto @Newbie_Town|goto @New_Ofcol|goto @New_Thalos|goto @Orcish_Stronghold|goto @PCHouses|goto @PCStore_Area|goto @Quest_Area|goto @Quest_Extras_Area|goto @Redfernes|goto @Shuttle_Boat|goto @Snow_Drift|goto @The_Greensward|goto @The_North_Village|goto @The_PaRty_HouSe|goto @The_Radaan|goto @The_Rain_Forest|goto @The_Waste_Lands|goto @Tombstone|goto @Transport_Boat|goto @Troy|goto @Volcano|goto @World_Map" "Goto Point|Aelonia|Arcadia|Arcanum's Tribe Lands|Arcanum Overlands|Arena|Bruinen|Conclave Overlands|Conclave Tribe Lands|Coraan|Descendents of Samhain|Descent to Hell|Divided Souls|Djinn Skie's Lair|Dragon's Lair|Drakyri Isle|Drow City|Dwarven Kingdom|Elemental Canyon|Elfhain|Elven Port|Elysium Gate|Flaming Tower|Ghost Town|Goblin Stronghold|Haven Lake|Immortal Compound|Keep of Mahn-Tor|Lair of Jher|Legends|Limbo|Luxor|Machine Dreams|Marsh|Merchants City|Moria|Mos Eisley|Mount Doom|Newbie Town|New Ofcol|New Thalos|Orcish Stronghold|PCHouses|PCStore Area|Quest Area|Quest Extra's Area|Redferne's|Shuttle Boat|Snow Drift|The Greensward|The North Village|The Party House|The Radaan|The Rain Forest|The Waste Lands|Tombstone|Transport Boat|Troy|Volcano|World Map">@Area~</send> %ansi(black,bright)Vnum~: %ansi(green,bright)@currentVnum%ansi(cyan)~]~[ %ansi(cyan) ~- %ansi(cyan) ~]}}} "Misc|Triggers" {disable}
----------------------------------------------------------------------------------------
This although works...
#mxp <send "goto|goto @Aelonia|goto @Arcadia|goto @Arcanums_Tribe_La|goto @Arcanum_Overland|goto @Arena|goto @Bruinen|goto @Conclave_Overlands|goto @conclave_tribe_lan|goto @Coraan|goto @Descendents_of_Sam|goto @Descent_to_Hell|goto @Divided_Souls|goto @Djinn_Skies_Lair|goto @Dragons_Lair|goto @Drakyri_Isle|goto @Drow_City|goto @Dwarven_Kingdom|goto @Elemental_Canyon|goto @Elfhain|goto @Elven_Port|goto @Elysium_Gate|goto @Flaming_Tower|goto @Ghost_Town|goto @Goblin_Stronghold|goto @Haven_Lake|goto @Immortal_Compound|goto @Keep_of_MahnTor|goto @Lair_of_Jher|goto @Legends|goto @Limbo|goto @Luxor|goto @Machine_Dreams|goto @Marsh|goto @Merchants_City|goto @Moria|goto @Mos_Eisley|goto @Mount_Doom|goto @Newbie_Town|goto @New_Ofcol|goto @New_Thalos|goto @Orcish_Stronghold|goto @PCHouses|goto @PCStore_Area|goto @Quest_Area|goto @Quest_Extras_Area|goto @Redfernes|goto @Shuttle_Boat|goto @Snow_Drift|goto @The_Greensward|goto @The_North_Village|goto @The_PaRty_HouSe|goto @The_Radaan|goto @The_Rain_Forest|goto @The_Waste_Lands|goto @Tombstone|goto @Transport_Boat|goto @Troy|goto @Volcano|goto @World_Map" "Goto Point|Aelonia|Arcadia|Arcanum's Tribe Lands|Arcanum Overlands|Arena|Bruinen|Conclave Overlands|Conclave Tribe Lands|Coraan|Descendents of Samhain|Descent to Hell|Divided Souls|Djinn Skie's Lair|Dragon's Lair|Drakyri Isle|Drow City|Dwarven Kingdom|Elemental Canyon|Elfhain|Elven Port|Elysium Gate|Flaming Tower|Ghost Town|Goblin Stronghold|Haven Lake|Immortal Compound|Keep of Mahn-Tor|Lair of Jher|Legends|Limbo|Luxor|Machine Dreams|Marsh|Merchants City|Moria|Mos Eisley|Mount Doom|Newbie Town|New Ofcol|New Thalos|Orcish Stronghold|PCHouses|PCStore Area|Quest Area|Quest Extra's Area|Redferne's|Shuttle Boat|Snow Drift|The Greensward|The North Village|The Party House|The Radaan|The Rain Forest|The Waste Lands|Tombstone|Transport Boat|Troy|Volcano|World Map">@Area</send>
-----------------------------------------------------------------------------------
Mud Output when active...
[Area: <send goto|goto @Aelonia|goto @Arcadia|goto @Arcanums_Tribe_La|goto @Arcanum_Overland|goto @Arena|goto @Bruinen|goto @Conclave_Overlands|goto @conclave_tribe_lan|goto @Coraan|goto @Descendents_of_Sam|goto @Descent_to_Hell|goto @Divided_Souls|goto @Djinn_Skies_Lair|goto @Dragons_Lair|goto @Drakyri_Isle|goto @Drow_City|goto @Dwarven_Kingdom|goto @Elemental_Canyon|goto @Elfhain|goto @Elven_Port|goto @Elysium_Gate|goto @Flaming_Tower|goto @Ghost_Town|goto @Goblin_Stronghold|goto @Haven_Lake|goto @Immortal_Compound|goto @Keep_of_MahnTor|goto @Lair_of_Jher|goto @Legends|goto @Limbo|goto @Luxor|goto @Machine_Dreams|goto @Marsh|goto @Merchants_City|goto @Moria|goto @Mos_Eisley|goto @Mount_Doom|goto @Newbie_Town|goto @New_Ofcol|goto @New_Thalos|goto @Orcish_Stronghold|goto @PCHouses|goto @PCStore_Area|goto @Quest_Area|goto @Quest_Extras_Area|goto @Redfernes|goto @Shuttle_Boat|goto @Snow_Drift|goto @The_Greensward|goto @The_North_Village|goto @The_PaRty_HouSe|goto @The_Radaan|goto @The_Rain_Forest|goto @The_Waste_Lands|goto @Tombstone|goto @Transport_Boat|goto @Troy|goto @Volcano|goto @World_Map Goto Point|Aelonia|Arcadia|Arcanum's Tribe Lands|Arcanum Overlands|Arena|Bruinen|Conclave Overlands|Conclave Tribe Lands|Coraan|Descendents of Samhain|Descent to Hell|Divided Souls|Djinn Skie's Lair|Dragon's Lair|Drakyri Isle|Drow City|Dwarven Kingdom|Elemental Canyon|Elfhain|Elven Port|Elysium Gate|Flaming Tower|Ghost Town|Goblin Stronghold|Haven Lake|Immortal Compound|Keep of Mahn-Tor|Lair of Jher|Legends|Limbo|Luxor|Machine Dreams|Marsh|Merchants City|Moria|Mos Eisley|Mount Doom|Newbie Town|New Ofcol|New Thalos|Orcish Stronghold|PCHouses|PCStore Area|Quest Area|Quest Extra's Area|Redferne's|Shuttle Boat|Snow Drift|The Greensward|The North Village|The Party House|The Radaan|The Rain Forest|The Waste Lands|Tombstone|Transport Boat|Troy|Volcano|World Map>Limbo Vnum: 1][ - ]
Basically I want it to allow me to right click, then left click the area name, and goto the first vnum of the area. I've already got all the area variables set up with the correct values inside. |
|
|
|
DeathShadow Adept
Joined: 11 Nov 2000 Posts: 228 Location: USA
|
Posted: Mon Aug 04, 2003 11:16 pm |
quote: Originally posted by MattLofton
Unlike #SUBSTITUTE, the #MXP and #WINDOW commands will secure the line so secure tags can be processed.
As I understand it, #SUB will set the line to secure for secure MXP processing. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Aug 05, 2003 12:43 am |
Best I can say is try single quotes ' instead of double quotes ". Next would be to eliminate the tildes ~ and use double quotes around the entire MXP portion (assumes single quotes within).
Also per the MXP spec you should apply quotes to both the menu and commands portion as they conatian many spaces. I prefer single within MXP, but the spec supports both types. Finally the MXP processing will be the last thing to see the line, so carefully check what is in the variables to assure it does not break the quote pattern you use. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Aug 05, 2003 2:34 am |
Have you considered just making a right-click menu, using the #MENU command?
|
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Aug 05, 2003 3:38 am |
quote: Originally posted by Vijilante
Best I can say is try single quotes ' instead of double quotes ". Next would be to eliminate the tildes ~ and use double quotes around the entire MXP portion (assumes single quotes within).
Also per the MXP spec you should apply quotes to both the menu and commands portion as they conatian many spaces. I prefer single within MXP, but the spec supports both types. Finally the MXP processing will be the last thing to see the line, so carefully check what is in the variables to assure it does not break the quote pattern you use.
This is where I got my current syntax...
Here is a more practical example that a MUD might use if you are in a store trying to buy an item:
#MXP There is some <send "buy bread|examine bread|steal bread" "buy|examine|steal">bread</send> here.
Using MXP in the #SUBSTITUTE command
Instead of using the #MXP command to send Secure MXP commands to the screen, you can also create a trigger and then use the #SUBSTITUTE command to add MXP commands to the text. For example,
#TRIGGER {north} {#SUB {~<send>north~</send>}}
will replace the word "north" whenever it is displayed by the MUD and replace it with the text <send>north</send> which creates a hyperlink. If you click on the "north" hyperlink, the command "north" is sent to the MUD.
-------------------------------------------------------------------
Notice this section work just fine though....
~<send "done|commands" @Editor>@Editor~</send> |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Tue Aug 05, 2003 3:47 am |
Took out all ' in the names of the areas (ie. Redferne's) and now it shows up how I want to, just that is there when I right click is 27000 and goto. So I'm getting closer.
|
|
|
|
|
|