|
igorshadow Newbie
Joined: 02 Jun 2006 Posts: 9 Location: Kansas
|
Posted: Sun Jul 09, 2006 1:14 am
Autosplit coins |
Does anyone have the triggers to set up an autosplit of loot when in a team?
Thank You,
Louis |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jul 09, 2006 3:07 am |
I do, but they are never going to do you a lick of good since I'm on a very customized mud.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jul 09, 2006 12:56 pm |
To expand on what MattLofton said, unless you provide us with more information about your particular MUD and the text that you see, we won't be able to properly help you.
|
|
_________________ Kjata |
|
|
|
igorshadow Newbie
Joined: 02 Jun 2006 Posts: 9 Location: Kansas
|
Posted: Mon Jul 10, 2006 11:24 pm |
Ok when I pick up coins this is what I see.
5 gold coins: Ok.
when I sell stuff
a big machete: You get 6 gold coins.
I would like to have it so I can enter the players in my team to split with.
Thank you,
Louis |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Jul 11, 2006 2:49 am |
I'll assume:
a) your split command is "split <amount>"
b) the space after the periods is mud output
c) you only get gold coins.
#TRIGGER {: You get (%d) gold coins. $} {split %1}
#TRIGGER {^(%d) gold coins~: Ok. $} {split %1} |
|
|
|
phranq Beginner
Joined: 11 Jul 2006 Posts: 13
|
Posted: Tue Jul 11, 2006 3:01 pm |
#CLASS goldsplitter
#AL splitter {#ADDITEM splitters %1}
#TRIGGER {%d gold coins~: OK.} {#ADD goldcoins %1}
#TRIGGER {You get %d gold coins.} {#ADD goldcoins %1}
#AL split {#VAR splitgold=@goldcoins/%numitems(splitters);#REPEAT @splitters {give @splitgold gold to %pop(splitters)}}
#CLASS 0
So I'm 99% sure this won't work without someone coming here and fixing it. I don't have anything to test it on, but that might be able to give you an idea. I've never used %pop, but it seemed like a good idea, heh.
Basically, you should enter "splitter jim" with no quotes, to the prompt to add jim to the list of splitters. If you want yourself to be included just splitter me (and I assume that your mud will just think you're stupid when it tries to "give gold to me" and let you keep it.
In theory, when you're getting money the goldcoins variable should be going up, then when you perform the alias "split" it should create the splitgold variable and make it "the gold you have" / "the number of people in the list of splitters you made by using the alias 'splitter'". Then it should repeat give (the amount of gold from the equation) for everyone in your party that you've made, and as you give them gold it should delete them from the list until the list is empty and everyone has gold...
All of that is in theory, but I just sort of made that up while here at work.
Edit: And I'm not sure what the command to give people gold is in your MUD, so you'd have to change it or give me the message. I'll try and test the at home tonight...and work out the bugs I'm sure it has. |
|
|
|
igorshadow Newbie
Joined: 02 Jun 2006 Posts: 9 Location: Kansas
|
Posted: Tue Jul 11, 2006 9:11 pm |
Thanks for the reply
I had to change this line to this get it to work
#TRIGGER {^(%d) gold coins~: Ok.} {#ADD goldcoins %1}
This trigger is not working getting an error
Variable splitgold=500/1 not defined
#AL split {#VAR splitgold=@goldcoins/%numitems(splitters);#REPEAT @splitters {give @splitgold gold to %pop(splitters)}}
also I think %pop will have to be changed I have to search the help files to see what will work
Louis |
|
|
|
phranq Beginner
Joined: 11 Jul 2006 Posts: 13
|
Posted: Tue Jul 11, 2006 10:30 pm |
#CLASS {goldsplitter}
#ALIAS splitter {#ADDITEM splitters %1}
#ALIAS split {
#VAR splitgold [@goldcoins/%numitems( @splitters)]
#FORALL @splitters {give @splitgold gold to %i}
}
#VAR splitters {}
#VAR goldcoins {}
#VAR splitgold {}
#TRIGGER {%d gold coins~: OK.} {#ADD goldcoins %1}
#TRIGGER {You get %d gold coins.} {#ADD goldcoins %1}
#CLASS 0
Should be completely fixed...just add in your exact commands...and that should do it. I didn't remember the #FORALL command, woot. To make an alias to reset the list just do
#AL resetsplitter {#VAR splitters {};#VAR goldcoins {}; #VAR splitgold {}}
Have fun |
|
|
|
phranq Beginner
Joined: 11 Jul 2006 Posts: 13
|
Posted: Tue Jul 11, 2006 10:46 pm |
All you should have to do is outlined in the first paragraph...since pop didn't want to work you just have to manually reset your list with that command I added to the bottom. splitters <name> and then get the messages correct and you should have a pretty functional script there.
|
|
|
|
igorshadow Newbie
Joined: 02 Jun 2006 Posts: 9 Location: Kansas
|
Posted: Wed Jul 12, 2006 3:05 am |
Thank you for the help, this is what I ended up with for the split alias
#var who %numitems( @splitters)
#Math splitgold @goldcoins/@who
#FORALL @splitters {give @splitgold coins to %i}
#var goldcoins 0
And I added a buttone to turn it on and off and I added an alias to remove players
Once again Thank You for the help
Louis |
|
|
|
|
|