Register forum user name Search FAQ

Gammon Forum

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 ➜ Lua ➜ Kill List Issues

Kill List Issues

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


Posted by Warbit   USA  (47 posts)  Bio
Date Tue 30 Aug 2011 07:52 AM (UTC)

Amended on Tue 30 Aug 2011 08:30 AM (UTC) by Warbit

Message
I am trying to create a kill list.

Basically a list of mobs, I want to find and kill after I kill a mob.

What I wanted triggers to do was
1. after i receive exp send tells to all the mobs, i want to kill.
2. if i got a response back meaning
(Ex: You tell a dog 'I am coming for you !!!')
it means the dog has repopped and is a good target to find.
3. So after receiving a response i wanted to track that mob.
4. I ordered my kill list from lowest priority to highest.
because i wanted to kill the targets that gave me the greatest reward, first and move onto a target of lesser value if the ones higher where not available.

I get this error when triggers fire.
Error number: 0
Event:        Compile error
Description:  [string "Trigger: "]:1: 'then' expected near 'snow'
Called by:    Immediate execution

this is my sent tells to all choice mobs trigger and fires after i kill a mob.

<triggers>
  <trigger
   enabled="y"
   match="Total exp for kill is*"
   sequence="100"
  >
  <send>drop corpse
get all corpse
sac corpse

look
tell rodent I am coming for you !!!
tell cobalt-tiger I am coming for you !!!
tell goblin-girl I am coming for you !!!

tell electric-eel I am coming for you !!!

tell thoughful-elf I am coming for you !!!
tell young-punk I am coming for you !!!


tell servant-blaster I am coming for you !!!
tell oaf I am coming for you !!!
tell young-cleric I am coming for you !!!
tell hunting-tiger I am coming for you !!!



</send>
  </trigger>
</triggers>

This trigger should fire when I get the response. You tell <mud name for mob> You are coming for you !!!

<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="You tell * 'I am coming for you !!!'"
   send_to="12"
   sequence="100"
  >
  <send>if %1 =="a rodent" then
SetVariable("trackie","rodent")
elseif %1 =="a cobalt tiger" then
SetVariable("trackie","cobalt-tiger")
elseif %1 =="a goblin girl" then
SetVariable("trackie","goblin-girl")
elseif %1 =="an electric eel" then
SetVariable("trackie","electric-eel")
elseif %1 =="a thoughtful elf" then
SetVariable("trackie","thoughtful-elf")
elseif %1 =="a young gang member" then
SetVariable("trackie","young-punk")
elseif %1 =="a servant of Blaster" then
SetVariable("trackie","servant-blaster")
elseif %1 =="a big oaf" then
SetVariable("trackie","oaf")
elseif %1 =="a young cleric" then
SetVariable("trackie","young-cleric")
elseif %1 =="a hunting tiger" then
SetVariable("trackie","hunting-tiger")
end--if


Send("track @trackie")</send>
  </trigger>
</triggers>

I then track with <a name the mud's tracking function can use. It should begin tracking the mob lowest on the list.
Cant you tell me why i am getting the error and how to fix it. If only one of the two, i would rather just know how to fix it.

Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 30 Aug 2011 08:56 AM (UTC)
Message
Template:faq=32 Please read the MUSHclient FAQ - point 32.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Warbit   USA  (47 posts)  Bio
Date Reply #2 on Tue 30 Aug 2011 12:05 PM (UTC)
Message
Thanks Nick !!!
adding "" around the %1 fixed it.

Here is the working code.


<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="You tell * 'I am coming for you !!!'"
   send_to="12"
   sequence="100"
  >
  <send>if "%1" =="a rodent" then
SetVariable("trackie","rodent")
elseif "%1" =="a cobalt tiger" then
SetVariable("trackie","cobalt-tiger")
elseif "%1" =="a goblin girl" then
SetVariable("trackie","goblin-girl")
elseif "%1" =="an electric eel" then
SetVariable("trackie","electric-eel")
elseif "%1" =="a thoughtful elf" then
SetVariable("trackie","thoughtful-elf")
elseif "%1" =="a young gang member" then
SetVariable("trackie","young-punk")
elseif "%1" =="a servant of Blaster" then
SetVariable("trackie","servant-blaster")
elseif "%1" =="a big oaf" then
SetVariable("trackie","oaf")
elseif "%1" =="a young cleric" then
SetVariable("trackie","young-cleric")
elseif "%1" =="a hunting tiger" then
SetVariable("trackie","hunting-tiger")
end--if


Send("track @trackie")</send>
  </trigger>
</triggers>

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.


12,442 views.

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

Go to topic:           Search the forum


[Go to top] top

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