|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed Apr 04, 2007 12:31 am
Need some help with this health script |
It worked in zmud, but doesn't seem to be working in cmud. It's 2 triggers one for characters with mana and the other for those with, if anyone can tell me how to compile it into one that would be awesome, but i really just want to know why its not working in cmud
TRIGGER:
{(}&gpos{)}%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name
VALUE:
#MATH hitper {@hit * 100/ @maxhit}
#MATH hitdif {@hit-@maxhit}
#IF (@hitper >= 95) {
#SU "("@gpos ") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL bold,green
#cap GROUP
}
#IF ((@hitper < 95) and (@hitper >= 91)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL brown
#cap GROUP
}
#IF ((@hitper < 91) and (@hitper >= 81)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL yellow
#cap GROUP
}
#IF ((@hitper < 80) and (@hitper >= 51)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL bold,magenta
#cap GROUP
}
#IF ((@hitper < 51) and (@hitper >= 31)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL magenta
#cap GROUP
}
#IF ((@hitper < 31) and (@hitper >= 1)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, -"@mov"/"@maxmov" move, mana "@name" === "@hitdif" difference"
#COL bold,red
#cap GROUP
}
#IF (@hitper <= 1) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference -= MORTED =-"
#COL blink,bold,red
#cap GROUP
}
TRIGGER:
{(}&gpos{)}%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove,%s&%nmanas/&%dmanab%smana &name
VALUE:
#MATH hitper {@hit * 100/ @maxhit}
#MATH hitdif {@hit-@maxhit}
#IF ((@hitper < 91) and (@hitper >= 81)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL yellow
#cap talk
}
#IF ((@hitper < 80) and (@hitper >= 51)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL bold,magenta
#cap talk
}
#IF ((@hitper < 51) and (@hitper >= 31)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#COL magenta
#cap talk
}
#IF ((@hitper < 31) and (@hitper >= 1)) {
#SU "("@gpos") "@hit"/"@maxhit" hit, -"@mov"/"@maxmov" move, mana "@name" === "@hitdif" difference"
#COL bold,red
#cap talk
}
#IF (@hitper <= 1) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference -= MORTED =-"
#COL blink,bold,red
#cap talk
} |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed Apr 04, 2007 4:02 pm |
NO one can see whats wrong with this script? It worked great in zmud, but it won't work in cmud.
|
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Wed Apr 04, 2007 4:57 pm |
You need to remove the {)} from the trigger pattern. The correct way to escape special characters is using ~
So the patterns are
~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name
~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove,%s&%nmanas/&%dmanab%smana &name |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed Apr 04, 2007 5:10 pm |
Ok it seems to be partially working now with those fixes for the name of it, but something else is wrong in rest of script, here is what my group looks like
Your group consists of:
( Head) 326/326 hit, 164/164 move Ilvest
(Front) 455/455 hit, 154/154 move, Balthis === 455-455 difference
(Front) 485/485 hit, 199/199 move Buve
(Front) 383/383 hit, 170/170 move Marakal
As you can see its trying to work on the Balthis char but off |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed Apr 04, 2007 5:12 pm |
Your group consists of:
( Head) 326/326 hit, 164/164 move Ilvest
(Front) 455/455 hit, 154/154 move, Balthis === 455-455 difference
(Front) 485/485 hit, 199/199 move Buve
(Front) 267/383 hit, 170/170 move Marakal
Here is a 2nd group shot with someone hurt, this person should have the === with the difference qouted there, i'll do some looking through help files and see what i can find. the thing next to balthis isn't right, it should say nothing if its no difference. |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Wed Apr 04, 2007 5:23 pm |
I rearranged the first trigger value a bit to use #SWITCH and to reduce the size slightly by moving about some reused lines. Not sure if it'll fix any problems you're having but might be worth a shot
Code: |
hitper = (100 * @hit/@maxhit)
hitdif = (@hit-@maxhit)
#IF (@hitper > 30) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#SWITCH (@hitper >= 95) {#COL bold,green}
(@hitper > 90) {#COL brown}
(@hitper > 80) {#COL yellow}
(@hitper > 50) {#COL bold,magenta}
(@hitper > 30) {#COL magenta}
} {
#IF (@hitper > 1) {
#SU "("@gpos") "@hit"/"@maxhit" hit, -"@mov"/"@maxmov" move, mana "@name" === "@hitdif" difference"
#COL bold,red
} {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference -= MORTED =-"
#COL blink,bold,red
}
}
#CAP GROUP |
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Wed Apr 04, 2007 5:41 pm |
Your group consists of:
( Head) 935/935 hit, 129/129 move Buv
(Front) 342/342 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 1122/1122 hit, 173/173 move Ranz
(Front) 712/712 hit, 187/187 move Norabi
(Front) 1153/1153 hit, 157/157 move Lazz
(Front) Ceref
(Front) 555/555 hit, 150/150 move a fiery serpent
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 989/989 hit, 137/137 move, 702/702 mana Sashin
(Front) 746/746 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 355/355 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 327/327 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Wed Apr 04, 2007 5:54 pm |
Odd, worked fine for me. Try deleting the trigger and remaking by just pasting the following to the command input
Code: |
#TR {~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name} {
hitper = (100 * @hit/@maxhit)
hitdif = (@hit-@maxhit)
#IF (@hitper > 30) {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference"
#SWITCH (@hitper >= 95) {#COL bold,green}
(@hitper > 90) {#COL brown}
(@hitper > 80) {#COL yellow}
(@hitper > 50) {#COL bold,magenta}
(@hitper > 30) {#COL magenta}
} {
#IF (@hitper > 1) {
#SU "("@gpos") "@hit"/"@maxhit" hit, -"@mov"/"@maxmov" move, mana "@name" === "@hitdif" difference"
#COL bold,red
} {
#SU "("@gpos") "@hit"/"@maxhit" hit, "@mov"/"@maxmov" move, "@name" === "@hitdif" difference -= MORTED =-"
#COL blink,bold,red
}
}
#CAP GROUP
} |
When I did that then tested with
Code: |
#SAY ~( Head~) 935/935 hit, 129/129 move Buv
#SAY ~(Front~) 342/342 hit, 150/150 move a flame salamander
#SAY ~(Front~) 1122/1122 hit, 173/173 move Ranz
#SAY ~(Front~) 712/712 hit, 187/187 move Norabi
#SAY ~(Front~) 1153/1153 hit, 157/157 move Lazz
#SAY ~(Front~) Ceref
#SAY ~(Front~) 555/555 hit, 150/150 move a fiery serpent
#SAY ~(Front~) 989/989 hit, 137/137 move, 702/702 mana Sashin
#SAY ~(Front~) 746/746 hit, 150/150 move a flame salamander
#SAY ~(Front~) 355/355 hit, 150/150 move a flame salamander
#SAY ~(Front~) 327/327 hit, 150/150 move a flame salamander |
Then I got the following
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Fri Apr 06, 2007 6:23 pm |
btw thanks Guinn, ws alot of helps works greaty now
|
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Fri Apr 06, 2007 7:11 pm |
odd so it works for one character, but won't work for another.
|
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Sun Apr 15, 2007 4:38 am |
Ok for some reason now cutting and pasting that in is giving me a parsing error. Trying to put that as a trigger then value is also giving me a compliling error, wonder why it worked once and isn't now.
|
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Sun Apr 15, 2007 5:01 am |
Your group consists of:
( Head) 938/938 hit, 155/156 move Aktosh
(Front) 1718/1718 hit, 254/255 move Banjt
(Front) 1388/1388 hit, 229/230 move Aycer
(Front) 2049/2049 hit, 161/162 move Frenbar
(Front) 1134/1134 hit, 172/172 move Ranz
(Front) 1188/1188 hit, 239/240 move Qito
(Front) 1530/1302 hit, 163/164 move, 1174/1266 mana Skir
(Front) 1051/1051 hit, 216/217 move Shaktii
(Front) 1224/1224 hit, 149/150 move a green dracolich
(Front) 1291/1259 hit, 149/150 move a black dracolich
maybe its the mana for one of the chars throwing it off. |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Sun Apr 15, 2007 5:18 am |
getting this agian,
( Head) 935/935 hit, 129/129 move Buv
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 342/342 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 1122/1122 hit, 173/173 move Ranz
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 712/712 hit, 187/187 move Norabi
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 1153/1153 hit, 157/157 move Lazz
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) Ceref
(Front) 555/555 hit, 150/150 move a fiery serpent
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 989/989 hit, 137/137 move, 702/702 mana Sashin
(Front) 746/746 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 355/355 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
(Front) 327/327 hit, 150/150 move a flame salamander
ERROR: Trigger ~(&gpos~)%s&%nhit/&%dmaxhit%shit,%s&%nmov/&%dmaxmov%smove &name fired but did not compile
TICK IN 5 SECONDS.
pasting in the same thing guinn had from before and thats what pops up |
|
|
|
Ggoss Apprentice
Joined: 01 Nov 2006 Posts: 114
|
Posted: Fri Apr 25, 2008 7:49 pm |
Ok jsut started setting up a cmud on a new computer, this is working agian, but i want it to clear the original stuff so that it doesn't constantly just keep scrolling, how would i code that into the trigger
|
|
|
|
|
|
|
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
|
|