Hexes

by Xiel

Back to Mechanic's Corner.

Xiel2007-09-16 04:07:50
So, I have absolutely no clue as to how to code anything at all in Zmud (maybe except for the regular keybindings and whatnot, kinda bad since I wanna be able to at least keep myself alive), and that is why I turn to you oh wise...umm..forum people. My main thing I want to tinker around with right now is to whenever I enter the command hexes to check my hexes, it'd also capture whatever number hexes I have and place them nice and neatly into 6 different variables. This is so that I could hopefully just make some aliases or keybindings using said variables instead of maybe 4 or 5 dozen or so of them with each different type of hex.

CODE
Your agoraphobia hex will last for another 709 seconds.
Your sleep hex will last for another 710 seconds.
Your agoraphobia hex will last for another 712 seconds.
Your sleep hex will last for another 713 seconds.
Your agoraphobia hex will last for another 715 seconds.
Your sleep hex will last for another 717 seconds.


Take for example those six, I want to be able to just check hexes, and then have the script place the words agoraphobia and sleep into 6 variables. Or if I have only 2 hexes, place those into two variables accordingly. This is so that I could hopefully just make a keybinding or something going 'doublewhammy @target with @hex1 @hex2' or hex3 or hex4 or whatever they'd be called. Seeing as how there is no intro line like when you scan you get 'Your trained eyes scan the surrounding area.', I can't even begin to start prodding around with caveman-level coding. Halp me, please. unsure.gif
Aramel2007-09-16 06:47:26
Maybe you could just trigger "hexes" as command input and work from there?
Yrael2007-09-16 07:47:01
Don't quote me, I don't claim to be a coder of any sort. Use a stringlist, though, as your var, and something like this?
#trigger {*our %1 hex will last for anot*} {idon'tknowthecommandstoaddtoastringlist}
Ayridion2007-09-16 08:11:38
As Yrael said, you could use: #trigger {^Your (%w) hex will last for another (%d) seconds.$} {#additem hexlist %1}

Then, to remove an item, use: %item(#,@hexlist). Example: #key KEY1 {doublewhammy @target with %item(1,@hexlist) %item(2,@hexlist)}

---

I prefer using checks , so maybe something like...

CODE
#key KEY1 {#if (%item(1,@hexlist) != %null and %item(2,@hexlist) != %null) {doublewhammy @target with %item(1,@hexlist) %item(2,@hexlist);#delitem hexlist %item(1,@hexlist);#delitem hexlist %item(2,@hexlist)} {#echo You don't have enough hexes prepared.}}


This means, if items 1 and 2 don't exist in the hexlist variable, it won't try to doublewhammy.

There are still flaws in that method, but without more lines there's naught I can really do. Plus it won't make a massive difference. (Flaw being that if the command is sent but cannot be done in Lusternia for some reason , the hexes are still removed from the variable.)

+++

Otherwise:

#alias hexes {#var hexcheck 1;#var hexcount 1;#send {Hexes}}
#trigger {^Your (%w) hex will last for another (%d) seconds.$} {#var %concat("hex",@hexcount) %1;#add hexcount 1}
#key KEY1 {doublewhammy @target with @hex1 @hex2}

---

Just some examples. They're all very rudimentary and prone to having problems...

Hopefully that isn't too confusing! >_>
Shryke2007-09-16 08:12:33
#trigger {^Your (%w) hex will last for another %d seconds.$} {#additem hexlist %1}
%w matches words () makes it store as a wildcard... %d matches digits.
Xiel2007-09-16 08:51:54
QUOTE(Ayridion @ Sep 16 2007, 01:11 AM) 442365
#alias hexes {#var hexcheck 1;#var hexcount 1;#send {Hexes}}
#trigger {^Your (%w) hex will last for another (%d) seconds.$} {#var %concat("hex",@hexcount) %1;#add hexcount 1}
#key KEY1 {doublewhammy @target with @hex1 @hex2}

---

Just some examples. They're all very rudimentary and prone to having problems...

Hopefully that isn't too confusing! >_>


I'm curious about this, actually, and I don't mind having to do HEXES every time I finish doing my combos. Just to make sure I understand though, once I put this in and have a paralyse and anorexia hex already sketched and do hexes, the trigger will place the words paralyse and anorexia into the script to act as the variables for @hex1 and @hex2, right?

And, assuming I'm right, if I have a full set of 6 already sketched, it'll capture the rest into @hex3, @hex4, etc. and that if I decided to keybind say, F2 with doublewhammy @target with @hex3 @hex4, it'll work? Then, even if I do hexes again, the hexes at variables hex5 and hex6 will bump down to hex1 and hex2 and I'll need to press F1 to make the combo work instead of F3.

....man that's a lot of if's, but I hope I'm right >.>
Yrael2007-09-16 09:11:18
You could just track down Tuek's hex system. That worked really well. Someone has a copy. Laysus, I think, assuming he doesn't break it on purpose, being British, and also a tool.
Shryke2007-09-16 09:17:48
Woah, I think you reverse ninja quoted me Ayridion..
Xiel2007-09-16 10:06:27
Oooooh, Ayridion's thing was exactly what I was looking for. Thank you SO much! NOW I can tinker with putting things into my status bar and keybindings... wub.gif
Shamarah2007-09-17 23:06:44
I don't really think it's worth doing, personally. I just made 50 billion aliases and they worked fine! (as long as I didn't forget them)
Xiel2007-09-18 00:46:19
QUOTE(Shamarah @ Sep 17 2007, 04:06 PM) 442697
I don't really think it's worth doing, personally. I just made 50 billion aliases and they worked fine! (as long as I didn't forget them)


Yeah, I have a horrible memory. sad.gif
Krellan2007-09-18 05:45:48
that all seemed like jibberish to me. I do aliases too.
Ayridion2007-09-18 07:45:06
QUOTE(Xiel @ Sep 16 2007, 09:51 AM) 442370
I'm curious about this, actually, and I don't mind having to do HEXES every time I finish doing my combos. Just to make sure I understand though, once I put this in and have a paralyse and anorexia hex already sketched and do hexes, the trigger will place the words paralyse and anorexia into the script to act as the variables for @hex1 and @hex2, right?

And, assuming I'm right, if I have a full set of 6 already sketched, it'll capture the rest into @hex3, @hex4, etc. and that if I decided to keybind say, F2 with doublewhammy @target with @hex3 @hex4, it'll work? Then, even if I do hexes again, the hexes at variables hex5 and hex6 will bump down to hex1 and hex2 and I'll need to press F1 to make the combo work instead of F3.

....man that's a lot of if's, but I hope I'm right >.>


The hexes in hex5 and hex6 will actually remain, which is one of the problems. However, their names will be put in hex1 and hex2 as shown below. To clear that problem, add '#loop 6 {#var %concat("hex",%i) ""}' to the HEXES alias. Here is an example:

QUOTE

Your stupidity hex will last for another 648 seconds.
Hex1: stupidity
Your amnesia hex will last for another 705 seconds.
Hex2: amnesia
Your amnesia hex will last for another 707 seconds.
Hex3: amnesia
Your paralyse hex will last for another 713 seconds.
Hex4: paralyse
Your paralyse hex will last for another 715 seconds.
Hex5: paralyse
Your anorexia hex will last for another 720 seconds.
Hex6: anorexia
*uses first two hexes*

QUOTE

Your amnesia hex will last for another 654 seconds.
Hex1: amnesia
Your paralyse hex will last for another 660 seconds.
Hex2: paralyse
Your paralyse hex will last for another 662 seconds.
Hex3: paralyse
Your anorexia hex will last for another 667 seconds.
Hex4: anorexia
Xiel2007-09-18 08:12:35
Ooh, shiny. I was wondering about that as well, but I was willing to live with it. Thank you for that!