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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  A very hard trigger

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

A very hard trigger

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Jcet   USA  (25 posts)  [Biography] bio
Date Mon 29 Oct 2001 08:54 PM (UTC)  quote  ]
Message
ok, let me explain it all
first, when you techblock someones attack, you sometimes get a stun, and when u do so, they cant do anything for about 3 seconds
sometimes when u get a stun, you get a combination, and it looks like this:

TECH BLOCK bonus! Jcet is stunned!
Combination! ( lp rp s r )

thats with a combo, without one it looks just like:

TECH BLOCK bonus! Jcet is stunned!

ok, i need to make a script that sets a variable when it sees the Combination! ( lp rp s r ), and when it doesnt see it, it starts a roundhouse(i kno how to get it to do a roundhouse) but what i need is for it, IF it doesnt show the combo line, then it will start a roundhouse automaticly.
The getvariable script(VBScript, thats what im working with)
it doesnt have enough info, can it only check to see if the variable is there? or if its empty??

-Jcet
See no good, hear no good, be no good, kill all good!
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 01 Nov 2001 03:39 AM (UTC)  quote  ]
Message
It is kind-of hard to make a trigger that matches on a line not being received, but what I would do is this...



  1. Make a trigger that matches on "TECH BLOCK bonus!". This trigger would call a script that - in addition to anything else you want it to do - would remember the line number of this trigger, eg. something like this:


    world.setvariable "techblock", cstr (world.GetLineCount())


  2. Make another trigger that matches on the "Combination!" line, and does what you want it to do

  3. Make another trigger that matches on everything (eg. matching on "*"). This will be to catch the cases where you don't get the combination trigger. Make it a higher sequence (eg. 120) so it gets matched last. In this trigger you would compare to see if this is the very next line after the "techblock" trigger. eg.


    if world.GetLineCount() = cint (world.getvariable ("techblock")) + 1 then
    ' ... do your processing here ...
    end if




What the third trigger will effectively do is check to see if a line arrives directly after the "tech block" line, that is not the "combination" line.




- Nick Gammon

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

Posted by Jcet   USA  (25 posts)  [Biography] bio
Date Reply #2 on Sun 04 Nov 2001 12:44 AM (UTC)  quote  ]

Amended on Sun 04 Nov 2001 07:01 AM (UTC) by Jcet

Message
nick you are a genuis

-Jcet
See no good, hear no good, be no good, kill all good!
[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.


1,644 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]