|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Wed Jun 25, 2008 7:03 pm
alias isn't setting a variable for some reason.... |
Code: |
#var bsleep 2
#var bdectect 1
#var hit_cur 1001
#alias {act} {#if (@bsleep = 1) {#if (@tick <= 4) {sleep;#var bcombat 0;#var bsleep 10}};#if (@bdetect = 1) {#var buffmove 1;buffme;regenme;healme;#IF (@hit_cur >= 1000) {#local $nextmob $newval;#loopdb @mob_list {#if (%val > 0) {$nextmob = %key;$newval = %val - 1;#addkey mob_list %key $newval;#break}};#if ($nextmob <> "") {#var bdetect 0;#var bmove 0;#var bcombat 1;%concat( @attack, " ", $nextmob)} {#var bmove 1;move}}}} |
With that set up (roughly) it is doing the @attack $nextmob but for some reason, its not setting the variable detect to 0. Which, is critical so that this alias doesn't keep firing. Am I missing something? TIA! |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jun 25, 2008 7:08 pm |
Well, it looks like a simple typo. In your "act" alias, you test the @bdetect variable. But in your second line, you are setting "bdectect" instead.
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Wed Jun 25, 2008 7:15 pm This is what is going on, sorry for the typo |
Code: |
#var bsleep 2
#var bdetect 1
#var hit_cur 1001
#alias {act} {#if (@bsleep = 1) {#if (@tick <= 4) {sleep;#var bcombat 0;#var bsleep 10}};#if (@bdetect = 1) {#var buffmove 1;buffme;regenme;healme;#IF (@hit_cur >= 1000) {#local $nextmob $newval;#loopdb @mob_list {#if (%val > 0) {$nextmob = %key;$newval = %val - 1;#addkey mob_list %key $newval;#break}};#if ($nextmob <> "") {#var bdetect 0;#var bmove 0;#var bcombat 1;%concat( @attack, " ", $nextmob)} {#var bmove 1;move}}}} |
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jun 25, 2008 7:32 pm |
It doesn't seem to effect this particular script, but in general, putting %concat (or any other function or variable) as the first item in a line isn't supported. You need to tell CMUD what you want to do with the result. If you want to send the text to the MUD, use the #SEND command:
#SEND %concat( @attack, " ", $nextmob)
Although I'd need to see the exact way that you are calling your "act" alias and some sample values for other variables used, such as the mob_list and attack variables. Otherwise I can't test it directly here.
When I tried to test it, I did this:
Code: |
attack=kill
#addkey mob_list rat 1
act |
and it properly sent:
Code: |
buffme
regenme
healme
kill rat |
and when I did #SHOW @bdetect it showed that it was properly set to zero. So I can't make it fail here.
Btw, the formatted script for other people who want a more readable version is this:
Code: |
#if (@bsleep = 1) {#if (@tick <= 4) {
sleep
#var bcombat 0
#var bsleep 10
}}
#if (@bdetect = 1) {
#var buffmove 1
buffme
regenme
healme
#IF (@hit_cur >= 1000) {
#local $nextmob $newval
#loopdb @mob_list {#if (%val > 0) {
$nextmob = %key
$newval = %val - 1
#addkey mob_list %key $newval
#break
}}
#if ($nextmob <> "") {
#var bdetect 0
#var bmove 0
#var bcombat 1
%concat( @attack, " ", $nextmob)
} {
#var bmove 1
move
}
}
} |
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Wed Jun 25, 2008 7:51 pm |
Sure...
Code: |
#variable {attack} {vicious fist}
#trig {~[ exits} {#if (@bkill > 0) {#var bkill 1;#variable bdetect 1;#var bcombat 0;#var bmove 1;resetmobs;#add line 1}}
#trig "normal_prompt" {^~[H:&%dhit_cur/&%dhit_max] ~[M:&%dman_cur/&%dman_max] ~[S:&%dspi_cur/&%dspi_max] ~[E:&%dend_cur/&%dend_max]} {#if (@bkill >= 1) {#if (@bcombat = 0) {#if (@bdetect = 1) {#if (@bmove = 0) {act}};#if (@bmove = 1) {move}}}}
#trig "battle_prompt" {^~[h:&%dhit_cur/&%dhit_max] ~[m:&%dman_cur/&%dman_max] ~[s:&%dspi_cur/&%dspi_max] ~[e:&%dend_cur/&%dend_max]} {#if (@bkill >= 1) {#var bdetect 1;#var bmove 0;#var bcombat 1;#if (@battlehealing = 1) {#if (@lag_cur = 0) {#if (@hit_cur < @hit_min) {bheal} {vicious fist}}}}}
#trig {{You hear the screams of a spirit as it flies by you.|(*) falls to the ground! (%w) is dead!}} {#var bcombat 0;#var bdetect 1}
#var {mob_list} {servant=0|female=0|tormented=0|priest=0|old=0}
#trig {^As ancient as time itself, this spirit stares at your soul.$} {#addkey mob_list old 1;#var bdetect 1;#var bmove 0}
#trig {^A spirit, in the form of a regal priest, no longer leads others to his god.$} {#addkey mob_list priest 1;#var bdetect 1;#var bmove 0}
#trig {^This spirit was once a slave to the god of Telgoran.$} {#addkey mob_list servant 1;#var bdetect 1;#var bmove 0}
#trig {^Somehow, this female spirit still holds the beauty of her past life.$} {#addkey mob_list female 1;#var bdetect 1;#var bmove 0}
#trig {^A phantom wears the ragged remains of its worship robe.$} {#addkey mob_list tormented 1;#var bdetect 1;#var bmove 0}
#trig {^A group of ~[ (%d) ~] priests traverse this plane, and others above.$} {#addkey mob_list priest %1;#var bdetect 1;#var bmove 0}
#trig {^A gathering of ~[ (%d) ~] servants still desire to serve Telgoran.$} {#addkey mob_list servant %1;#var bdetect 1;#var bmove 0}
#trig {^A following of ~[ (%d) ~] spirits are cursed to walk this world forever.$} {#addkey mob_list tormented %1;#var bdetect 1;#var bmove 0}
#trig {^A crowd of ~[ (%d) ~] ancient spirits take you in with a glance.$} {#addkey mob_list old %1;#var bdetect 1;#var bmove 0}
#trig {^~[ (%d) ~] female spirits smile at you and whisper to each other.$} {#addkey mob_list female %1;#var bdetect 1;#var bmove 0}
#alias {buffme} {#if (@autobuffrad) {#if (@autorad = 1) {rad;#variable autorad 10}};#if (@autobuffglobe) {#if (@autoglobe = 1) {globe;#variable autoglobe 10}};#if (@autoannstance = 1) {#if (@stanceann = 1) {ann}};#if (@autosymmstance = 1) {#if (@stancesymm = 1) {symm}}}
#alias {healme} {if (@autoheal = 1) {#if (@hit_cur < @hit_min) {#5 heal}}}
#alias {regenme} {#if (@autoregen = 1) {#if (@end_cur < @end_min) {#5 regen}}}
#alias {move} {#if (@bmove = 1) {#var bcombat 0;#var bmove 10;#READ 1 @line}}
|
And here is a sample of what is happening straight from the mud (the bold is what is being sent from me)
A Dilapitated Archway [ exits: east west ]
A following of [ 2 ] spirits are cursed to walk this world forever.
A group of [ 3 ] priests traverse this plane, and others above.
[Lag: 40] [Align: 60] [ 40506207 ] [Reply: Karmova's Orator]
[H:35807/35807] [M:100/100] [S:7166/7166] [E:18140/20070]vici fis tormented
The power of your mystical hands (resisted) SUNDERS (1616) a tormented worshipper!!
You land [ 15 of 15 ] attacks on a tormented worshipper: lacerating (327) damage!
[Lag: 3250] [Sheykh: (perfect condition)] [tormented worshipper: (mortally wounded)]
[h:35807/35807] [m:100/100] [s:7166/7166] [e:18098/20070]
A tormented worshipper misses [ 5 ] attacks on you!
You land [ 3 of 3 ] attacks on a tormented worshipper: DEHISCING (754) damage!!
A tormented worshipper falls to the ground! He is dead!
You receive 1,119,684 (154,912 learn curve, 46,252 role-play) experience.
You get a pile of 39,119 gold.
[Lag: 1000] [Align: 56] [ 41854631 ] [Reply: Karmova's Orator]
[H:35807/35807] [M:100/100] [S:7166/7166] [E:18098/20070]vici fis tormented
The power of your mystical hands (resisted) DISMEMBERS (1495) a tormented worshipper!!
You land [ 14 of 14 ] attacks on a tormented worshipper: lacerating (327) damage!
[Lag: 1640] [Sheykh: (perfect condition)] [tormented worshipper: (near death)]
[h:35807/35807] [m:100/100] [s:7166/7166] [e:18056/20070]
A tormented worshipper misses [ 5 ] attacks on you!
You land [ 6 of 6 ] attacks on a tormented worshipper: MUTILATING (684) damage!!
A tormented worshipper falls to the ground! He is dead!
You receive 1,132,781 (156,615 learn curve, 46,776 role-play) experience.
You get a pile of 40,887 gold.
[Lag: 500] [Align: 52] [ 43221423 ] [Reply: Karmova's Orator]
[H:35807/35807] [M:100/100] [S:7166/7166] [E:18056/20070]vici fis priest
The power of your mystical hands (resisted) DISMEMBERS (1500) a priestly spirit!!
You land [ 15 of 15 ] attacks on a priestly spirit: lacerating (353) damage!
[Lag: 3240] [Sheykh: (perfect condition)] [priestly spirit: (mortally wounded)]
[h:35807/35807] [m:100/100] [s:7166/7166] [e:18014/20070]
A priestly spirit lands [ 1 of 5 ] attacks on you: tickling (1) damage.
You land [ 2 of 2 ] attacks on a priestly spirit: MAIMING (1108) damage!!
A priestly spirit falls to the ground! He is dead!
You receive 1,127,177 (155,887 learn curve, 46,552 role-play) experience.
You get a pile of 30,477 gold.
[Lag: 1000] [Align: 48] [ 44578231 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:7166/7166] [E:18014/20070]vici fis priest
The power of your mystical hands (resisted) SUNDERS (1534) a priestly spirit!!
You land [ 10 of 10 ] attacks on a priestly spirit: MUTILATING (502) damage!!
A priestly spirit falls to the ground! He is dead!
You receive 860,914 (121,281 learn curve, 35,904 role-play) experience.
You get a pile of 21,762 gold.
[Lag: 1025] [Align: 44] [ 45614334 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:7166/7166] [E:17972/20070]invoke 'invigorate'
invoke 'invigorate'
invoke 'invigorate'
invoke 'invigorate'
invoke 'invigorate'
vici fis priest
You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.
[Lag: 1640] [Align: 44] [ 45614334 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:7116/7166] [E:18161/20070]west
You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.
[Lag: 1640] [Align: 44] [ 45614334 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:7066/7166] [E:18350/20070]
You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.
[Lag: 2040] [Align: 44] [ 45614334 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:7016/7166] [E:18539/20070]
You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.
[Lag: 680] [Align: 44] [ 45614334 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:6966/7166] [E:18728/20070]
You assemble the incantation of, 'ob ok raeg.'
A light blue glow fills you with refound energy.
[Lag: 1320] [Align: 44] [ 45614334 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:6916/7166] [E:18917/20070]
The power of your mystical hands (resisted) SUNDERS (1685) a priestly spirit!!
You land [ 12 of 12 ] attacks on a priestly spirit: RUPTURING (435) damage!
A priestly spirit falls to the ground! He is dead!
You receive 1,030,206 (143,290 learn curve, 42,676 role-play) experience.
You get a pile of 34,087 gold.
[Lag: 1040] [Align: 40] [ 46850530 ] [Reply: Karmova's Orator]
[H:35806/35807] [M:100/100] [S:6916/7166] [E:18875/20070]
A Dust Covered Room [ exits: north east south west ]
A phantom wears the ragged remains of its worship robe.
A spirit, in the form of a regal priest, no longer leads others to his god.
A crowd of [ 2 ] ancient spirits take you in with a glance. |
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Thu Jun 26, 2008 2:24 am |
removed post, not SURE if its fixed or not, still troubleshooting... LoL
|
|
|
|
|
|
|
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
|
|