Soll2005-05-09 15:27:11
Basically, I'm playing around with some variables trying to gather a decent-ish way to sort hexes. I've got this:
At the moment that works fine, everything gets put in 'hexesdrawninlist' like:
Variable: hexesdrawninlist worms|amnesia|dizzy|vapors|masochism|reckless
But if I try:
It only goes: Variable: hexesdrawninlist worms
Is it possible to force the variable to take more than one 'worms', so that I get 'Variable: hexesdrawninlist worms|worms|worms|worms|worms|worms'
?
Thanks.
QUOTE
Your worms hex will last for another 473 seconds.
Your amnesia hex will last for another 474 seconds.
Your dizzy hex will last for another 475 seconds.
Your vapors hex will last for another 476 seconds.
Your masochism hex will last for another 477 seconds.
Your reckless hex will last for another 478 seconds.
Your amnesia hex will last for another 474 seconds.
Your dizzy hex will last for another 475 seconds.
Your vapors hex will last for another 476 seconds.
Your masochism hex will last for another 477 seconds.
Your reckless hex will last for another 478 seconds.
At the moment that works fine, everything gets put in 'hexesdrawninlist' like:
Variable: hexesdrawninlist worms|amnesia|dizzy|vapors|masochism|reckless
But if I try:
QUOTE
Your worms hex will last for another 473 seconds.
Your worms hex will last for another 474 seconds.
Your worms hex will last for another 475 seconds.
Your worms hex will last for another 476 seconds.
Your worms hex will last for another 477 seconds.
Your worms hex will last for another 478 seconds.
Your worms hex will last for another 474 seconds.
Your worms hex will last for another 475 seconds.
Your worms hex will last for another 476 seconds.
Your worms hex will last for another 477 seconds.
Your worms hex will last for another 478 seconds.
It only goes: Variable: hexesdrawninlist worms
Is it possible to force the variable to take more than one 'worms', so that I get 'Variable: hexesdrawninlist worms|worms|worms|worms|worms|worms'
?
Thanks.
Nayl2005-05-09 15:52:41
I want to know too
Daganev2005-05-09 16:12:48
I know its possible becauese I did that once when I wasn't trying to... it was some sort of bug for me, but I can't remember what I did 'wrong'
Sylphas2005-05-09 16:15:13
Trigger it to do this: #VA hexesdrawninlist %additem(%1, @hexesdrawninlist)
%additem allows duplicates, #ADDITEM doesn't. Same with %delitem and #DELITEM.
%additem allows duplicates, #ADDITEM doesn't. Same with %delitem and #DELITEM.
Soll2005-05-09 17:12:14
Ohhh, thanks.
Nayl2005-05-09 17:29:46
Appreciated, Sylphas
Drago2005-05-09 23:06:07
Couldn't have asked that when I was actually online *eyes all the hexes stuff he made*
Unknown2005-05-10 03:47:24
Or you could just ask me for my system to manage hexes.
Nayl2005-05-10 06:45:13
Tuek, could I grab your system to manage hexes?
Unknown2005-05-10 10:46:18
CODE
#CLASS {Hexesclass}
#ALIAS hc {hexes;hexes=""}
#REGEX {Your (.+) hex will last for another (.+) seconds\\.} {hexes=%additem( %1, @hexes)}
#TRIGGER {You throw a hex at @target} {#deln hexes 1}
#KEY F1 {draw hex anorexia}
#KEY SHIFT-F1 {draw hex amnesia}
#KEY SHIFT-F2 {draw hex sleep}
#KEY F2 {draw hex asthma}
#KEY F3 {draw hex impatience}
#KEY F4 {draw hex paralyse}
#KEY F5 {draw hex stupidity}
#KEY F6 {draw hex epilepsy}
#KEY F7 {draw hex vapors}
#KEY F8 {draw hex dementia}
#KEY F9 {draw hex masochism}
#KEY F10 {draw hex healthleech}
#KEY F12 {draw hex sensitivity}
#KEY F11 {draw hex pox}
#KEY SHIFT-F5 {draw hex addiction}
#KEY SHIFT-F6 {draw hex peace}
#KEY SHIFT-F7 {draw hex reckless}
#KEY SHIFT-F8 {draw hex clumsy}
#KEY SHIFT-F3 {draw hex paranoia}
#KEY SHIFT-F4 {draw hex dizzy}
#KEY SHIFT-F9 {draw hex scabies}
#KEY SHIFT-F10 {draw hex vomiting}
#CLASS 0
#CLASS {Hexesclass|Hexcheck}
#CLASS 0
#CLASS {Hexesclass|Hexcheck|Hex1} {enable}
#KEY INS {hc;#class hex2 1;#class hex1 0;#class hex3 0}
#CLASS 0
#CLASS {Hexesclass|Hexcheck|Hex2} {disable}
#TRIGGER {Your %1 hex will last for another %d seconds.} {}
#COND {%dh, %dm} {nexthex=%item( @hexes, 1);hex @target with @nexthex;#class hex2 0;#class hex3 1;#class hex1 0} {nocr|prompt}
#TRIGGER {There are no hexes here.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {You must regain %1 first.} {#cla hex2 0;#cla hex3 0;#cla hex1 1}
#CLASS 0
#CLASS {Hexesclass|Hexcheck|Hex3} {disable}
#TRIGGER {You do not know that hex.} {#class hex1 1;#class hex2 0;#class hex3 0}
#TRIGGER {There is none of your %1 hexes here. You must draw one first.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {You detect nothing here by that name.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {I do not recognize anything called that here.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {You cannot see that being here.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {Nothing can be seen here by that name.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {Ahh, I am truly sorry, but I do not see anyone by that name here.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#TRIGGER {Alas, your mana reserves are too low for that.} {#cla hex1 1;#cla hex2 0;#cla hex3 0}
#KEY INS {nexthex=%item( @hexes, 1);#IF {%null( @nexthex)=1} {hc;#class hex3 0;#class hex2 1;#class hex1 0} {hex @target with @nexthex}}
#CLASS 0
#CLASS {Hexesclass|Hexdirections}
#KEY CTRL-KEY7 {hc;hexdir=nw;#cla hexpush 1}
#KEY CTRL-KEY8 {hc;hexdir=n;#cla hexpush 1}
#KEY CTRL-KEY9 {hc;hexdir=ne;#cla hexpush 1}
#KEY CTRL-KEY6 {hc;hexdir=e;#cla hexpush 1}
#KEY CTRL-KEY3 {hc;hexdir=se;#cla hexpush 1}
#KEY CTRL-KEY2 {hc;hexdir=s;#cla hexpush 1}
#KEY CTRL-KEY1 {hc;hexdir=sw;#cla hexpush 1}
#KEY CTRL-KEY4 {hc;hexdir=w;#cla hexpush 1}
#KEY CTRL-SUB {hc;hexdir=u;#cla hexpush 1}
#KEY CTRL-ADD {hc;hexdir=d;#cla hexpush 1}
#CLASS 0
#CLASS {Hexesclass|Hexdirections|Hexpush} {disable}
#TRIGGER {%dh, %dm} {#forall @hexes {push hex %i @hexdir};#cla hexpush 0;hexes=""} "" {nocr|prompt}
#CLASS 0
That's what I use right there. The F-keys 1-12 and the Shift F-keys 1-10 is how I draw all my hexes. You can remove that if you prefer some other way to draw your hexes. The insert key checks the hexes in the room, and adds them to a list. Each successive press of the Insert key will toss the next drawn hex till they are all completely gone (or if it runs into a hex not present, or the target moves, etc), in which case it will restart, checking HEXES and tossing the first hex, then tossing each additional one after that. F-keys to draw, and just the Insert key to throw. Additionally, I use CTRL-numpad keys to push every hex in a room in one direction, which is the Hexdirections and Hexpush subclass.
Edit: Oh, and I recovered a bug recently, where in a very specific situation it can get stuck. Just use the HC alias to reset it. I also don't recommend shadowdancers use it in choke, due to the fact that it checks hexes to see what hexes are there. Instead you should use a more manual setup.
Edit 2: Some extra things removed that relate to my system only, and are specific to my set up.