|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Fri Dec 23, 2011 8:31 pm
Two questions, 1 Alias |
Code: |
<alias name="psi" id="12040">
<value>#if (%-1 = "") {#send psi %item( @ChatDefault, %random( 1, 8))} {#send psi %-1}</value>
</alias> |
First question. How can I expand @ChatDefault without having to tell this alias that I've added something to it? (The 1,8.. can't I use 1,.. and have it automatically use however many items are listed?)
Secondly, I like to type :) or :( etc on the chatlines.. If I pass these, it breaks the alias and results in an error. How can I get it to ignore my entire arg and pass it all?
Thanks. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Fri Dec 23, 2011 8:53 pm |
Try this:
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger type="Command Input" priority="34160" regex="true" copy="yes">
<pattern>^psi(?: (.+))?$</pattern>
<value>#if (%1 = "") {#sub {psi %item( @ChatDefault, %random( 1, %numitems( @ChatDefault)))}} {#sub {psi %1}}</value>
</trigger>
</cmud> |
|
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Fri Dec 23, 2011 9:02 pm |
Okay, that sorta works, but I just realized a problem..
Every time I use the command, an item disappears from my list.. I want to keep the list permanently?
What am I doing wrong?
(It did it in both yours and my alias..) |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Fri Dec 23, 2011 9:15 pm |
There must be some other code doing that, this wouldn't.
|
|
|
|
|
|