Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Multiple group kill set-up
Multiple group kill set-up
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Xandler
(52 posts) Bio
|
Date
| Wed 13 Jan 2021 12:01 AM (UTC) Amended on Wed 13 Jan 2021 12:31 AM (UTC) by Xandler
|
Message
| Unfortunately, my previous HDD has died and I'm currently unable to recover the files from it so I need to re-write this entirely from memory (which I'm not good at doing). Basically what it is. One group is a set of mobile names in a list set-up (for like names)that sends commands to kill then disables the group and repeats itself until the room is dead then tracks the next mobile with that name and repeats. What I just can't figure out currently is how to make it move rooms when the last mobile in the list has died in the room.
I will provide the trigger groups so it'll be easier to understand:
This is the list of mobiles it should kill:
<triggers>
<trigger
expand_variables="y"
group="mobstokill"
match="(A Cursed Soul is wandering around the waters here.|A Tranquil Soul is here, at peace with its existance.|A Lost Soul floats in the waters here.)"
regexp="y"
send_to="12"
sequence="100"
>
<send>Send ("@single soul")
Send ("@single")
Send ("alert")
EnableTriggerGroup ("mobstokill", false)</send>
</trigger>
<trigger
expand_variables="y"
group="mobstokill"
match="(A Peaceful Spirit plays around in the waters here.|A Spiteful Spirit is forever cursed to live on in this form.|A Vengeful Spirit looks like it is up to no good.)"
regexp="y"
send_to="12"
sequence="100"
>
<send>Send ("@single spirit")
Send ("@single")
Send ("alert")
EnableTriggerGroup ("mobstokill", false)</send>
</trigger>
</triggers>
This is the trigger set that should move me:
<triggers>
<trigger
expand_variables="y"
group="mobstomove"
match="[Fatigue\:"
name="moveto"
regexp="y"
send_to="12"
sequence="100"
>
<send>EnableTriggerGroup ("mobstokill", true)
EnableTrigger ("moveto", false)
Send 'sense @target'</send>
</trigger>
<trigger
enabled="y"
group="mobstomove"
match="Visible Exits: "
sequence="100"
>
</trigger>
<trigger
expand_variables="y"
group="mobstomove"
match="You let everyone know that you're ready."
send_to="12"
sequence="100"
>
<send>Send 'look'
EnableTriggerGroup ("mobstokill", true)
EnableTriggerGroup ("mobstomove", true)</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
group="mobstomove"
match="That mob does not exist, cannot be sensed, or there is no path to them."
name="spiritlake"
regexp="y"
send_to="12"
sequence="100"
>
<send>clearer = tonumber (GetVariable ("clearer")) or 0
clearer = clearer + 1
SetVariable ("clearer", clearer)
if @clearer == 1 then
SetVariable ("target", "spiteful")
Send 'look'
else
if @clearer == 2 then
SetVariable ("target", "peaceful")
Send 'look'
else
if @clearer == 3 then
SetVariable ("target", "vengeful")
Send 'look'
else
Note ("Spirit Lake is Done.")
Send 'snort'
end
end
end</send>
</trigger>
</triggers>
I think it has something to do with the Fatigue: trigger I have, for some reason it's not matching. which should be
I honestly don't know how to set this up anymore and need some help if it's possible. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 21 Jan 2021 01:06 AM (UTC) |
Message
|
clearer = clearer + 1
SetVariable ("clearer", clearer)
if @clearer == 1 then
...
This is probably not going to do what you expect. The variables inside a trigger like @clearer are evaluated before it starts executing. So @clearer will not change, even if you add one to it inside the script. What would be better is:
clearer = clearer + 1
SetVariable ("clearer", clearer)
if clearer == 1 then
...
That uses the Lua variable (which will have changed) and not the earlier MUSHclient variable. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
8,196 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top