[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  cant get this to work

cant get this to work

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Adam Petersen   (17 posts)  [Biography] bio
Date Wed 14 Jul 2004 04:25 AM (UTC)
Message
ok, whats happening is this:

i get this message:

name is:
affliction 1
affliction 2
affliction 3

i want to be able to see this, and take the name, and then use it to "Heal name affliction"... i have all the triggers set up for all the affliction names, but cant figure out how to store the name so that i can do it for everyone, not just me... so i want it to store the name, then be able to use it in the exsiting trigger i have ex: "Heal me paralysis" to "heal <name from above> paralysis"... possible?
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Wed 14 Jul 2004 04:30 AM (UTC)
Message
So, what actually sets off the heal? Them saying "heal me" or the list of afflictions?

Honestly, I had to read what you wrote three times to quasi understand it. However I guarentee it can be done, relatively easily. I'm just a bit confused as to what youre actually asking for.


~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #2 on Wed 14 Jul 2004 04:34 AM (UTC)
Message
Actually, I think I got it. All you get is the list of afflictions, and you then send back "heal [name] affliction", and you currently have "heal me affliction" triggers.

You'll capture the name in a trigger, then send it to a variable. You can either do that in the trigger (send to:variable) or with world.setvariable.

then, supposing you set the variable to "name" you could send this in a trigger: (also assuming %1 is the afflcition)
heal @name %1
If you have "expand variables" checked, then "@name" becomes the contents of the variable.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #3 on Wed 14 Jul 2004 04:38 AM (UTC)
Message
Presuming you want to trigger on something like:
Tom says, "Heal my paralysis"

You need a trigger similar to:
* says, "Heal my *"

with a reaction similar to:
cast 'cure %2' %1


Now, granted, thats obscenely basic in function and could be expanded into a massively functional script or plugin with relative ease as long as the possible afflictions have standard cures.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #4 on Wed 14 Jul 2004 05:10 AM (UTC)
Message
I dont think he wants that, I think "heal me affliction" was him self-casting.

I think he gets a list of everyone. And needed to store their name to insert it into the spell.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #5 on Wed 14 Jul 2004 07:54 AM (UTC)
Message
I am guessing that he's a priest in a Rapture game. There you have a skill Diagnose, most people can learn it but it only works on the user. You type DIAG ME or DIAGNOSE ME and get back:


<prompt>You are:
affliction1
affliction2
affliction3
afflictionN
<prompt>


Or:


<prompt>You are:
<prompt>


if you have no afflictions. Priests are able to diag others though, and they get essentially the same output only:


<prompt>You are:


looks like:


<prompt>Player is:


when performed on someone is. Prompt text is different throughout the games and between different players (can be customized up to a point). I don't have time to give the full script right now, so I'll just summarize the best technique used for this.

Trigger "^(?:<prompt>|)([A-Z][a-z]+) is\:$" to turn on a group of triggers that match on affliction messages, and a trigger that matches on the prompt. When the prompt trigger matches, disable the affliction message. Save the name of the player in a variable, save the afflictions as a list in another variable (can be same variable really, with the name going in at the first index in the list). On prompt, simply pull apart the list and send, if the list's name is "diag_list" and the players name is in the first index:


for i = 1 to ubound(diag_list)
   world.Send "heal " + diag_list(0) + " " + diag_list(i)
next


I don't think priests ever have people asking them for healing, most just diag the people in their group as they see fit and heal them one by one, so he'd need an alias to initiate that script manually. It would also really help to have a plugin for getting the prompt and capture it inside that script instead of using a trigger, since you'd have to send something after DIAG to make the prompt terminate for the trigger.
[Go to top] top

Posted by Adam Petersen   (17 posts)  [Biography] bio
Date Reply #6 on Wed 14 Jul 2004 04:28 PM (UTC)
Message
ok, great, all i was missing was the @ and expand variables, thanks you guys!

next problem, when i use it on myself, it says "You are:" rather then "Bainz is:" so, how can i set that to "you are:" somehow changes to bainz on the variable?
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #7 on Wed 14 Jul 2004 05:41 PM (UTC)
Message
Dim PlayerName
PlayerName = World.GetAlphaOption("player")
If PlayerName = "" Then PlayerName = "Me"

That is VBS script I use in one of my own plugins. It relies on the player having entered their name in the world configuration connect settings.

As for the specific answer on where to place your IF statement checking to see if yourself is the target... I can't really help ya there.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Adam Petersen   (17 posts)  [Biography] bio
Date Reply #8 on Wed 14 Jul 2004 05:42 PM (UTC)
Message
I dont get that... i have Zero (0) knowledge of how to use scripts. heh thanks
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #9 on Wed 14 Jul 2004 05:54 PM (UTC)
Message
Make another trigger, that triggers on the same match text, with a larger sequence (makes it execute later), and then sets your variable to your name (you can use Magnums code to get your player name, if you use quick connent) and sets it to the variable.

Or you could just set your "player" variable to "bainz" (instead of the complicated script) depending on how portable you want your code to be (and how comfortable you are with coding). It will work fine with just setting it, but if you ever change names (or send it to someone else) youll have to change that.

You might try first getting it it work simply, then adding the script to get the name later.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Adam Petersen   (17 posts)  [Biography] bio
Date Reply #10 on Wed 14 Jul 2004 06:02 PM (UTC)
Message
WOOT! i got it, just needed another trigger, thanks for your help. YAY!
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


27,397 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]