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

Posted by Jis99sij on Mon 05 Aug 2013 04:26 AM — 8 posts, 29,661 views.

#0
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.
Amended on Mon 05 Aug 2013 05:02 AM by Jis99sij
#1
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?
USA Global Moderator #2
Define "split" in this context.
#3
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.
Australia Forum Administrator #4
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.
#5
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.
#6
then my next command i type is

split 35 coins
Australia Forum Administrator #7
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.