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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  I am very new to using client triggers, alias's, timers, etc.

I am very new to using client triggers, alias's, timers, etc.

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


Pages: 1 2  3  

Posted by SdwSkr   (12 posts)  [Biography] bio
Date Sun 10 Aug 2014 05:31 AM (UTC)
Message
So I am very new to setting up triggers, timers, etc. I am sorry if I posted this in the wrong area but I was looking for someone to be able to tell me hoe to set something up to be able to make my character cast spells till he is out of mana then go to sleep in something and auto wake when his mana is full pick up the object he slept in and start casting spells all over again. I want to be able to have this done without me having to put any input in, want whatever it is i can set up to do all that for me... I know it seems cheap but I have more than one char and i have to spend most my time on another char.... Any help you can give is much appreciated.
Thanks
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Sun 10 Aug 2014 03:13 PM (UTC)

Amended on Sun 10 Aug 2014 03:30 PM (UTC) by Fiendish

Message
Error: insufficient data.

I mean...fundamentally, you need a bunch of triggers that trigger on some stuff and then do some stuff. You maybe need a bunch of variables that keep track of the stuff that you are doing and where you are in the sequences of doing those things. And you may also need some timers or some waits to appropriately delay engagement of the various actions. So, like, there are resources on the forum for how to write triggers and how to use variables and things. And none of us know how your game works other than you, so nobody can coordinate it for you without a lot more information.

You should try something yourself first and then ask more specific questions showing what you tried.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by SdwSkr   (12 posts)  [Biography] bio
Date Reply #2 on Sun 10 Aug 2014 05:19 PM (UTC)

Amended on Sun 10 Aug 2014 05:23 PM (UTC) by SdwSkr

Message
Well the game I play is legendsofkrynn.wolfpaw.net port 6100, you should try it, its an amazing mud with a great staff of Immortals. And to clarify then, I have a trigger that fires off of You dont have enough mana to go to sleep. I have another trigger that fires off You lost your concentration, that makes me cast one spell... What I want to be able to do is sleep and wake up when his mana if full. I also have a trigger that will fire off a successful spell cast to make me cast that same spell. Is this possible? There isnt a output from the mud I can fire off and using a timer doesnt always make me have full mana when I wake. I asked one of the Immortals and they told me to do a tick timer, and so hear I am. I am pretty much trying to spam a spell to get the skill up to a 100% without having to type anything.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #3 on Sun 10 Aug 2014 07:51 PM (UTC)

Amended on Sun 10 Aug 2014 07:58 PM (UTC) by Meerclar

Message
ok, for starters, your prompt should make it fairly simple to know when mana is full.

You'll need a trigger for something like <*hp *m *mv> with a check against %2 for your maximum mana.

You'll probably need a timer (3-5 seconds) to get regular updates, maybe activated when your out of mana trigger puts the character to sleep.

*edit*

So, provided your prompt is set to something like <%h/%Hhp %m/%Mma %v/%Vmv> you should be able to use <*/*hp */*ma */*mv> as your trigger with an if check for %3 against %4 to see if mana is full and wake yourself up.

Yes, I actually created a character so I could see what your prompt options are.

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 Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sun 10 Aug 2014 07:53 PM (UTC)
Message
It sounds to me like you need to wait x seconds (only you will know how long that is) and then have the timer send something to the MUD to find if your mana is full.

If it is full, and if you know you are asleep, then you could wake, otherwise wait a bit longer.

(Like Meerclar said while I was typing this). ;)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sun 10 Aug 2014 07:55 PM (UTC)
Message
There are some videos and tutorials in the "Getting Started" part of the forum which might help you:

http://www.gammon.com.au/forum/index.php?bbtopic_id=120

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SdwSkr   (12 posts)  [Biography] bio
Date Reply #6 on Sun 10 Aug 2014 08:58 PM (UTC)
Message
Ahh yes getting closer, I have done the trigger to fire off when my mana is full and autowake myself but it fires more than one because the prompt inout i get for my mana doesnt go down fast enough for the trigg to stop firing, so now my next question would be how can i make that trigg only fire once without having to re-create it everytime it fires
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Sun 10 Aug 2014 09:20 PM (UTC)
Message
When you go to sleep set a variable.

eg.


asleep = true


When your mana is full check that variable. If you are asleep, wake up and set the variable to false. That way you only do it once.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by SdwSkr   (12 posts)  [Biography] bio
Date Reply #8 on Sun 10 Aug 2014 10:06 PM (UTC)
Message
ok that is where I am lost, how do I know what to set for a variable and how do I set it all up?
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #9 on Sun 10 Aug 2014 11:07 PM (UTC)

Amended on Sun 10 Aug 2014 11:17 PM (UTC) by Meerclar

Message
Ok, this is all concept so please don't try to just copy this and expect it to work. Once you've got some code working we can help you refine it and that link Nick gave you has some excellent help for you.

You don't have enough mana.
sleep -> enable mana timer
timer compares current and max mana
wake at match -> disable timer


It's worth noting that having played for a few levels now, that 3-5 second timer recommendation should probably be more like 30-45 seconds.

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 SdwSkr   (12 posts)  [Biography] bio
Date Reply #10 on Sun 10 Aug 2014 11:39 PM (UTC)

Amended on Sun 10 Aug 2014 11:48 PM (UTC) by SdwSkr

Message
So what is it I need for coding and how do I get it.... This is why I am confused I do not know what I am doing here ^^^^^^COMPLETE NOOB^^^^^^^ and I know no one really likes newbies.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #11 on Sun 10 Aug 2014 11:48 PM (UTC)
Message
I was trying to establish flow of events for the triggers/timers to do what you asked about. As much to help myself lock it in my mind for further discussion as anything else honestly, since I've got poor Elderel basically stopped in any kind of progression now that he's out of newbie school. As nice as the customization is, I'm not really struck by LoK as anything resembling newbie friendly.

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 Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #12 on Mon 11 Aug 2014 12:18 AM (UTC)

Amended on Mon 11 Aug 2014 12:50 AM (UTC) by Meerclar

Message
Ok, not sure what I've got wrong with this, documentation says it should work.


<triggers>
  <trigger
   enabled="y"
   match="You don't have enough mana."
   send_to="10"
   sequence="100"
  >
  <send>sleep
EnableTimer("manacheck", true)</send>
  </trigger>
</triggers>

send to world doesn't recognize the enable (obviously), send to script throws "[string "Trigger: "]:2: '=' expected near 'EnableTimer' ", send to execute does the same thing as send to world.

Here's what I'm thinking for the trigger on the timer - I have it sending look every minute, could be anything really though just to refresh the prompt.


<triggers>
  <trigger
   enabled="y"
   match="&lt;*hp */*ma *mv*&gt;"
   send_to="12"
   sequence="100"
  >
  <send>if %2 == %3
wake
EnableTimer("manacheck", false)
else
break
endif</send>
  </trigger>
</triggers>

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 SdwSkr   (12 posts)  [Biography] bio
Date Reply #13 on Mon 11 Aug 2014 03:00 AM (UTC)
Message
So let me get this straight....
These are scripts... and you wrote them?
Meerclar said:


<triggers>
  <trigger
   enabled="y"
   match="You don't have enough mana."
   send_to="10"
   sequence="100"
  >
  <send>sleep
EnableTimer("manacheck", true)</send>
  </trigger>
</triggers>


<triggers>
  <trigger
   enabled="y"
   match="&lt;*hp */*ma *mv*&gt;"
   send_to="12"
   sequence="100"
  >
  <send>if %2 == %3
wake
EnableTimer("manacheck", false)
else
break
endif</send>
  </trigger>
</triggers>

[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #14 on Mon 11 Aug 2014 04:01 AM (UTC)
Message
Those are triggers rather than scripts but the difference is largely academic for purposes of this discussion. Yes, I wrote them but they're still not quite right and I'm hoping one of the folks who does stuff like this more often than I comes along to point out my mistakes.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[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.


71,461 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

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]