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 ➜ General ➜ ArcticMud how can i create a script for autolooting and splitting coins?

ArcticMud how can i create a script for autolooting and splitting coins?

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


Posted by Jis99sij   (5 posts)  Bio
Date Mon 05 Aug 2013 04:26 AM (UTC)

Amended on Mon 05 Aug 2013 05:02 AM (UTC) by Jis99sij

Message
I have tried and when i do a regular expression it has to be that exact mob. "A wealthy dwarf is dead! R.I.P."
i've tried putting in <A-Z><a-z> but it doesn't work. any help would be appreciated.
Top

Posted by Jis99sij   (5 posts)  Bio
Date Reply #1 on Mon 05 Aug 2013 06:06 AM (UTC)
Message
so, nvm on how to autoloot. figured it out by looking at a tic time.

^(The|A|An) ([A-Za-z \,\.\-\']+) is dead\! R\.I\.P\.$

is the expression needed and then you can set your action underneath. Now the next part i'm trying to do is to autosplit the coins.

There were 6 coins. is what comes up when you collect. how do i set variable for 6 coins to know how much to split?
Top

Posted by Fiendish   USA  (2,558 posts)  Bio   Global Moderator
Date Reply #2 on Mon 05 Aug 2013 06:11 AM (UTC)
Message
Define "split" in this context.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Jis99sij   (5 posts)  Bio
Date Reply #3 on Wed 07 Aug 2013 02:59 AM (UTC)
Message
ok, the mud has kw of split to split coins among however many people are in your group. So, for example lets say you take all.coins corpse. the response would be: "There were 16 coins." I need it to be able to read that number and more than anything. So whether it be 16 or 500 and use the command split however many coins it was.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 07 Aug 2013 04:54 AM (UTC)
Message
Can you copy and paste some output including the part about how many coins there are?

It sounds like you need to match on:


There were * coins.


Then you could get than number and do whatever to it.

- Nick Gammon

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

Posted by Jis99sij   (5 posts)  Bio
Date Reply #5 on Fri 09 Aug 2013 01:29 AM (UTC)
Message
take all corpse
You get a red longsword from the corpse of Liran Red Thorn.
You get a red longsword from the corpse of Liran Red Thorn.
You get a suit of padded red leather armor from the corpse of Liran Red Thorn.
You get a thorn key on a small chain from the corpse of Liran Red Thorn.
You get a pile of coins from the corpse of Liran Red Thorn.
There were 35 coins.
Top

Posted by Jis99sij   (5 posts)  Bio
Date Reply #6 on Fri 09 Aug 2013 01:29 AM (UTC)
Message
then my next command i type is

split 35 coins
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #7 on Tue 13 Aug 2013 06:51 AM (UTC)
Message
Something like this should do it:


<triggers>
  <trigger
   enabled="y"
   match="^There were (\d+) coins\.$"
   regexp="y"
   sequence="100"
  >
  <send>split %1 coins</send>
  </trigger>
</triggers>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

- 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.


28,102 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.