 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Thu Jan 09, 2003 4:25 am
MXP and the right clicky thingy |
I am using MXP to make links so I can right click and choose one of the options. It is working wonders, I am using this code.
#SUB {~<send ~"take @name right hand|take @name right hand scar|take @name right hand internal|take @name right hand int scar~" ~"Right-click for options|Fresh|Scar|Internal|Internal Scar~"~>Wounds to the RIGHT HAND~</send~>}
But in the game there are alot of parts of the body so I made that for all the parts....Still works great....BUT
the wounds aren't always there. Sometimes there are just fresh wounds, sometimes scars and internals, and sometimes all 4. Like so:
Wounds to the BACK:
Fresh External: cuts and bruises about the back -- more than minor
Scars External: minor scarring along the back -- minor
Fresh Internal: slightly tender -- negligible
Scars Internal: minor internal scarring -- negligible
Wounds to the LEFT EYE:
Scars Internal: minor internal scarring -- insignificant
I want it to be able see if there is fresh, scars, fresh internals, or scars internals under then change the MXP accordingly. So in this case BACK would be MXPed and I could right click it and have all 4 things on it. But LEFT EYE would only have Scar Internal on it.
Is this at all possible?
Thank you much |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Thu Jan 09, 2003 4:52 am |
Also, is it possible to have this do it in a new window. So when I look at them it will open a new window....and have something like the following
BACK: <u>Fresh Internal</u>,<u>Scars External</U>, etc
LEFT EYE: <u>Scars Internal</U>
then I could just fix them up from there,,,,, |
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 09, 2003 1:39 pm |
The other window idea is better because doing it in the main window would require gagging all the output, processing it and the writing it again, which can get a bit complicated.
A trigger would fire on the line that tells you you have a wound and then capture the following four lines. It then checks these lines to see if they are a type of wound and if so, it adds it to the list:
#WIN Wounds
#VAR woundtypes {Fresh External|Scars External|Fresh Internal|Scars Internal}
#VAR woundcom {take %literal(@name) part|take %literal(@name) part scar|take %literal(@name) part internal|take %literal(@name) part int scar}
#TRIGGER {Wounds to the (*):$(*)$(*)$(*)$(*)} {#VARIABLE commands "";#VARIABLE hints "Right-click for options";#VARIABLE lines {%2|%3|%4|%5};#VAR abort 0;#FORALL @lines {#IF (((%begins( %i, "Fresh")) or (%begins( %i, "Scars"))) and (!@abort)) {#ADDITEM commands {:%char:%replace(%item( @woundcom, %ismember( %copy( %i, 1, 14), @woundtypes)), "part", %lower("%1"))};#ADDITEM hints {%copy( %i, 1, 14)}} {#VAR abort 1}};:Wounds:#MXP <send "@commands" "@hints">%1</send>}
The syntax checker has a problem with the last line of the tirgger, but it still works fine.
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Thu Jan 09, 2003 6:52 pm |
PROBLEM!!!!!
The Wounds window opens and then this happened:
send ::take Etrina right hand internal
send ::take Etrina right hand internal
send ::take Etrina right hand internal
send ::take Etrina right hand internal HAND/send
send ::take Etrina right hand internal LEG/send
send ::take Etrina right hand internal LEG/send
send ::take Etrina right hand internal ARM/send
send ::take Etrina right hand internal ARM/send
send ::take Etrina right hand internal
send ::take Etrina right hand internal
It did make the right hand into a link but it had all 4 options available but yet under Right Hand she was only hurt external wound. So it should only show external wound in the right click |
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Jan 09, 2003 7:33 pm |
Disable Allow <> for expand in the Preferences and then try copy and pasting the script again into the command line.
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Thu Jan 09, 2003 11:44 pm |
Ok, I now have all the body parts that are injured showing in the Wound window. Looks good. But if I right click it only shows one option Fresh Internal even if they don't have fresh external wrong with them.
There should be 4 it could be
Fresh External
Fresh Internal
Scars External
Scars Internal
sometimes a body part has none, sometimes it has 3 or all 4
One last thing. If I do the right click command, It does TAKE ETRINA RIGHT HAND even if I click on her head but it also does it in the wound window, not the mud input window.
Is there any easy way to fix it?
So I touch them.
It adds the wounds to the Wounds window
If I right click the wound it will tell me if it is fresh internal, etc.
Then if I click on an option (for instance the head) it will:
Take Etrina head
Take Etrina head scar
Take Etrina head int
or Take Etrina head scar int
The Etrina part is a name that I already have captured when I touch them
Thank you for your help |
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 10, 2003 12:34 am |
I can't get it to fail. Post some outputs that makes it fail for me to test.
About it not sending the command to the right window, do this in the command line:
#SAY %char
Look at what is displayed and then do:
#NAME outputFromAbove
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jan 10, 2003 1:51 am |
When i touch her I get this
Etrina's injuries include...
Wounds to the HEAD:
Fresh Internal: slightly tender -- insignificant
Scars Internal: minor internal scarring -- insignificant
Wounds to the NECK:
Fresh Internal: slightly tender -- insignificant
Scars Internal: minor internal scarring -- insignificant
Wounds to the RIGHT ARM:
Fresh Internal: slightly tender -- insignificant
Scars Internal: minor internal scarring -- insignificant
Wounds to the LEFT ARM:
Fresh Internal: slightly tender -- negligible
Scars Internal: minor internal scarring -- negligible
Wounds to the RIGHT LEG:
Fresh Internal: slightly tender -- insignificant
Scars Internal: minor internal scarring -- insignificant
Wounds to the LEFT LEG:
Fresh External: deep cuts across the left leg -- harmful
Scars Internal: minor internal scarring -- negligible
Wounds to the LEFT HAND:
Scars Internal: minor internal scarring -- insignificant
Wounds to the CHEST:
Scars External: severe scarring along the chest area -- harmful
Scars Internal: an occasional twitching in the chest area -- more than
minor
Wounds to the ABDOMEN:
Fresh Internal: slightly tender -- negligible
Scars Internal: minor internal scarring -- negligible
Wounds to the BACK:
Fresh Internal: slightly tender -- negligible
Scars Internal: minor internal scarring -- insignificant
Wounds to the LEFT EYE:
Fresh Internal: slightly tender -- insignificant
Wounds to the SKIN:
Fresh Internal: slightly tender -- insignificant
In the wounds window this comes up
BACK
ABDOMEN
CHEST
LEFT HAND
LEFT LEG
RIGHT LEG
LEFT ARM
RIGHT ARM
NECK
HEAD
But if I right click any of them I get FRESH EXTERNALS in the right hand menu but if I then click on FRESH EXTERNALS it sends this: take Etrina right hand internal
to the Wound window |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jan 10, 2003 3:26 am |
Just a small bumb in hopes someone can help
|
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jan 10, 2003 12:55 pm |
another little bump to the top
|
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 10, 2003 1:42 pm |
I edited the script above to fix the problem where it adds wounds from another body part. Also, it no longer uses right hand for all body parts.
To fix the problem where the commands are sent to the Wounds window and not your main window, look at my previous reply. Follow those steps to solve it.
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jan 10, 2003 6:54 pm |
It still only shows that there are fresh internal wounds only. Also with the exception of SKIN when I do the option, it outputs: Take Etrina Back Internal. The Skin one only shows fresh internals but with that it DOES show correctly. It output Take Etrina Skin Internal
|
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 10, 2003 10:10 pm |
Sorry, I can't reproduce it. Using version 6.40, I open a blank window by hitting ESC in the Character Select Window, make sure that Allow <> for expand is disabled, copy and paste the script into the command line and hit Enter. I then copy the sampel output your provided into the command line, make sure that every line is preceded by a #SH and add three "#SH test" at the end (the trigger looks for four lines after each wound). When I hit Enter, all the wounds appear in the Wounds window as a link with the correct options in the menu. Also, all the commands are sent correctly.
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jun 13, 2003 4:37 am |
Ok, I got this finally working but one last thing is messing up.
Say There is a back injury and then left eye injury. The first time I touch them the back injury is the only one that goes to the window. If I touch them again to see the wounds then both the back and left eye go to the window....BUT....They are doing it in opposite order.
Wyndlia's injuries include...
Wounds to the BACK:
Fresh External: cuts and bruises about the back -- more than minor
Scars External: minor scarring along the back -- minor
Fresh Internal: slightly tender -- negligible
Scars Internal: minor internal scarring -- negligible
Wounds to the LEFT EYE:
Scars Internal: minor internal scarring -- insignificant
Wyndlia has normal vitality.
That is what happens when I touch them
But the first time I do I only get
BACK
Then the second time I do it is
LEFT EYE
BACK
Might you know how to fix it? |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jun 13, 2003 4:54 am |
Ok, in testing it worked wonderfully but now I am in the game it is a bit screwy. I touch someone and everything goes according to plan. Their injuries are listed in the wound window. But if I right click any of the things they are all the same thing and they are all the first thing that was listed in the injury window....for instance...
Sebestyen's injuries include...
Wounds to the LEFT ARM:
Fresh External: light scratches -- insignificant
Fresh Internal: slightly tender -- insignificant
Wounds to the RIGHT LEG:
Fresh External: light scratches -- insignificant
Fresh Internal: slightly tender -- insignificant
Wounds to the LEFT HAND:
Fresh External: light scratches -- insignificant
Fresh Internal: slightly tender -- insignificant
Wounds to the ABDOMEN:
Fresh External: light scratches -- insignificant
Fresh Internal: slightly tender -- insignificant
Sebestyen has normal vitality.
THAT IS WHEN I TOUCH HIM
THIS IS WHAT I GET IN THE WOUNDS WINDOW
ABDOMEN
LEFT HAND
RIGHT LEG
LEFT ARM
THIS IS WHAT I GET IF I RIGHT CLICK ANY OF THEM
Fresh External.
I know they all have fresh externals but I have tried this on more then one person and the right click is always the first thing on the list. Also. If I do pick any of them they will also be what the first option would have been. If I pick abdomen it put Take Sebe Abdomen. If I click his left hand I get the same thing, etc |
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jun 13, 2003 12:03 pm |
Try enclosing the whole script in the trigger in a #PRIORITY command.
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jun 13, 2003 7:23 pm |
One last thing... This is working so good I can cry but is there any way to get it to print out the body parts one after another
So instead of
NECK
RIGHT ARM
LEFT ARM
etc
It would be
NECK, RIGHT ARM, LEFT ARM |
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jun 13, 2003 8:03 pm |
The problem is that the script is not able to know when the output has finished to add a newline at the end.
If the problem is that the window is not cleared each time you receive a new list of injuries, then you can add this command at the start of the trigger to clear it:
:Wounds:#CLR
If you still want it all in one line, then reply here and I'll work on it.
Kjata |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Fri Jun 13, 2003 9:06 pm |
All that in one line would be great. As it stands now the wounds window is big and fills almost half my screen and I got a high res too. I know it can scroll up and down but I am trying to make it that I don't have too. If it was all on one or two lines then it would solve this,
|
|
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sat Jun 14, 2003 1:11 pm |
May I ask what mud this is and if you know all of the body parts that may be affected?
I'd like to work on a script for this but go about it differently. |
|
|
|
 |
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Sat Jun 14, 2003 2:11 pm |
This is dragonrealms, www.dragonrealms.com
The parts affected CAN be
head
right eye
left eye
neck
chest
right arm
left arm
right hand
left hand
abdomen
back
right leg
left leg
skin
nerves |
|
|
|
 |
|
|
|