About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
grifterec
Newbie


Joined: 22 Jan 2004
Posts: 2

PostPosted: Thu Jan 22, 2004 11:08 pm   

AutoHeal script?
 
im having trouble making one work. i would for my tank to say heal when his hitpoints go below a certain number wait a few seconds for the heal to register and then say it again if he needs it. Im sure its simple, i just cant code for ****. Any help would be great, by the way, the mud i play on displays this H: M: V: With the proper values in each every few seconds.
Reply with quote
Brujah
Wanderer


Joined: 13 Nov 2002
Posts: 88
Location: USA

PostPosted: Fri Jan 23, 2004 3:59 am   
 
we need more information. at least a line of coding including a prompt and an example of someone saying heal.
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Fri Jan 23, 2004 4:22 am   
 
here is a very simple way to look at
Now this is just an example:

You need to make a trigger for you stats in my game the prompt is my stats and it looks like this...

normal prompt- 700hp 300m 900mv >
trigger prompt- (%d)hp (%d)m>(%d)mv >

now I collect my max stats pretty much the same way by a prompt then a triggedr to chetch it

The as part of the Trigger prompt I gave above you would have it do something like this...

If hp goes lower than lowhp = get help
would look like this.
#if @hp<@lowhp {get help}

now {get help}
could be {Say heal}

Then when your character sees
Tank says 'heal'
your trigger would be
#trigger {Tank says 'heal'} {heal tank}

get it?
Reply with quote
grifterec
Newbie


Joined: 22 Jan 2004
Posts: 2

PostPosted: Fri Jan 23, 2004 7:19 pm   
 
H:1427 M:544 V:452 > say heal
You say 'heal'
--------------------------------
Belgarath says 'heal'
cast 'heal' Belgarath
Reply with quote
marilyn
Newbie


Joined: 01 Jun 2002
Posts: 9
Location: USA

PostPosted: Sat Jan 24, 2004 12:09 am   
 
quote:
Originally posted by megamog75

#if @hp<@lowhp {get help}

now {get help}
could be {Say heal}

Then when your character sees
Tank says 'heal'
your trigger would be
#trigger {Tank says 'heal'} {heal tank}

get it?



Just curious... why create a trigger on stats checks for low hp and have the character {say heal} with yet another trigger on "Yiponi says heal" to {cast heal}? Why not just cast heal in the first place? Unless you are group combatting and want to say OUCH! or Hey guys, I gotta heal! first.

#if @hp<@lowhp {cast heal}

-- or {drink potion} or {say Get up here and heal me, priest!}
Reply with quote
entropyv
Newbie


Joined: 21 Dec 2003
Posts: 3

PostPosted: Sun Jan 25, 2004 8:02 pm   
 
Ok... to add stess to this... what if you're hp is indicated:
Health: <*** >
That's my issue, having trouble using ~~
someone mind showing me an example?
Reply with quote
Yleexotee
Newbie


Joined: 13 Feb 2004
Posts: 2
Location: USA

PostPosted: Fri Feb 13, 2004 10:31 am   
 
I'm trying to work out an auto heal trigger for anyone in the tank position. I do not hps from the mud, but I get a line more like this that appears during combat:
[Lag: 2000] [Drakmorden: (slightly scratched)] [shadow ape: (severely wounded)]

I can't seem to fix a trigger on it, I keep getting loops, or no response at all. Tried using variables for each of the different positions (lag amount-number, tank name-pc, etc). but does not go for some reason.

very frustrated
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Feb 13, 2004 7:11 pm   
 
marilyn: grifterec made it clear in both posts that he is using two characters (at least) and group combatting.

entropyv: Find the location of the first space. Heal when the number goes below whatever threshold you decide on. 1 is the lowest number, 0 means there weren't any spaces.
#TR {Health: ~<(*** )~>} {#IF ((%pos(" ", "%1") < 4) AND (%pos(" ", "%1") > 0)) {heal}}

Yleexotee: Most spells require a few seconds to cast. During this time, you need to disable your trigger so that you don't cast again until you know the results of the spell. There are many methods for doing so. Some of the more popular methods are:
  • #T+/#T- with a trigger ID

  • #T+/#T- with a trigger class

  • #IF with a control variable set to 0 during casting and 1 when ready to cast again


  • Since you have string-values for the tank's condition, you should probably use a stringlist in your pattern.
    ~[Lag: %d~] ~[(%w): ~({slightly scratched|seriously wounded|almost dead}~)~]
    Reply with quote
    Yleexotee
    Newbie


    Joined: 13 Feb 2004
    Posts: 2
    Location: USA

    PostPosted: Fri Feb 13, 2004 8:50 pm   
     
    Thank you for your response Lightbulb. However, I am getting no response at all from the trigger. The issue of a spell taking a few seconds to cast is unrelated at this point, as well as T+ or minus, since I can't get it to cast at all. I have my trigger set up in the manner you have listed, with the string list for the various conditions. There must be something missing about why it won't respond. Thanks for your attempt, do you think it might be related to setting the options. Should it be on prompt instead of newline? of course why isn't it responding either way. (my triggers are enabled in general, as the rest of my scripting is working fine)
    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