Nethran Novice
Joined: 25 Apr 2011 Posts: 32
|
Posted: Fri Jan 06, 2012 2:47 am
Copying the Values of a String List Variable to Another String List Variable |
I'm making a script to move track the levels of people in my formation and auto-congratulate those who've leveled. Not track, really, just to notice a difference.
Anywho, I can't get the values of one of my variables to move over. Here's what I have:
Code: |
#CLASS {Scripts|Leveling|Irda|Levels}
#ALIAS levelcompare {#LOO %numitems(@dioform) {#IF (@looper<%eval(%numitems(@dioform)+1)) {#IF (%eval(%eval(%concat("@",diolevels2,".",@looper))-%eval(%concat("@",diolevels1,".",@looper)))!=0) {ft |cCongratulations to |W%eval(%concat("@",dioform,".",@looper)) |cfor leveling from |W%eval(%concat("@",diolevels1,".",@looper)) |cto |W%eval(%concat("@",diolevels2,".",@looper))|c!!;#ADD looper {1}}}};#ALARM +2 {diolevels1=@diolevels2}}
#VAR dioform {Lierra|Aphk|Slyax|Coaa|Hong}
#VAR looper {1}
#VAR diolevels1 {166|169|166|164}
#VAR diolevels2 {166|164|168|170|175}
#TRIGGER {~[*:(%n) *~] ~[(%w)*~] ~[*/*~] ~[*/*~] ~[*/*~]} {#VAR diolevels2 {};#VAR dioform {};#VAR looper {1};#ALARM +1 {#VAR diolevels2 {%additem(%1,@diolevels2)};levelcompare;#ALARM +2 {#ADDITEM dioform %2;#SAY %ansi(bright,yellow)~* %ansi(bright,blue)Notice: %ansi(bright,white)%2 %ansi(bright,blue)has been added to the formation.;#VAR diolevels1 {}}}}
#TRIGGER {has been slain!} {fo rep}
#CLASS 0
|
My latest effort is at the end of the alias.
Code: |
diolevels1=@diolevels2
|
Previous to that I had:
Code: |
#FORALL @diolevels2 {#VAR diolevels1 {%additem(%i,@diolevels1)}}
|
As you can see, the values don't match. So it's not working.
Also, if you can point out anything else I'm doing wrong, feel free! |
|