|
Firey Wanderer
Joined: 30 Dec 2003 Posts: 61 Location: Norway
|
Posted: Sun May 30, 2004 5:47 pm
eatqueue |
I wonder how I can put stuff first in a stringlist if there's already some other stuff in the Stringlist..
ALIAS:
Name:
Eatq
Value:
#IF ((@eat=0) and (%item( @eatqueue, 1) = "")) {
outr %1
eat %1
#VAR eat 1
} {#IF (%2 = 1) {#VAR eatqueue %concat( %1, "|", @eatqueue)} {#VAR eatqueue %additem( %1, @eatqueue)}}
Trigger:
Pattern:
You are paralysed and unable to do that.
Value:
#cw 900
#echo EB-BLOODROOT
eatq bloodroot
eat bloodroot
That's how it is... how can I make the Eatq bloodroot put bloodroot first in the eatqueue list? |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun May 30, 2004 7:23 pm |
These two functions might help you a little
#HELP %push
#HELP %pop
#IF (%2 = 1) {#VAR eatqueue %push("%1",@eatqueue)} {#VAR eatqueue %additem( %1, @eatqueue)} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun May 30, 2004 10:20 pm |
Do you not understand your own alias? If you want something added to the beginning of the queue, use
eatq bloodroot 1
If you want it added to the end of the queue, use
eatq bloodroot
The alias might need a small modification in order to have items added at the end of the queue. Remove the = 1 after %2.
Value:
#IF ((@eat=0) and (%item( @eatqueue, 1) = "")) {
outr %1
eat %1
#VAR eat 1
} {#IF (%2) {#VAR eatqueue %concat( %1, "|", @eatqueue)} {#VAR eatqueue %additem( %1, @eatqueue)}} |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|