|
...{chris}... Novice
Joined: 11 Apr 2005 Posts: 31 Location: Yucaipa, Ca
|
Posted: Sat Apr 16, 2005 10:00 pm
#IF |
Hello once again. I have a a question or two:
1) I have a script running that will tell me how much I have till my next level, and how many kills it will take, based off the last kill's exp. I need haste from one item for killing, but I need the stats from the other item for the level itself. Now I took the variable from the script that puts the tnl @ how many kills on my status bar and I made an #if statement.
Code: |
#class lvl
#if {@EXPTNL < 20000} {remove scarf; wear pend}
#class 0
|
Now my question is this; Why wont this work? It doesnt show up in the class i told it to, and when my exp is lower than 20000 it wont remove the scarf and equip the pendant. Should I put this #if into the other class, the class with the status bar script?
2) Is this even how it should be set up?
Thanks.
-ChRiS |
|
_________________ My signature is better than yours. |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Sat Apr 16, 2005 10:10 pm |
Well you didn't create anything but a statement thats gonna be evaluated once and thats it.
put that if statement inside the trigger that is changing the value of @EXPTNL so it gets evaluated whenever the value EXPTNL changes
Edit:
woops ignore that previous if you read it, expressional triggers didn't work the way i believed
Just in case i wasnt clear if you read your script in as you had it, zmud would test your IF statement right then and there , but wouldnt create an alias/trigger etc.
Cheers |
|
_________________ I love deadlines. I like the whooshing sound they make as they fly by. |
|
|
|
...{chris}... Novice
Joined: 11 Apr 2005 Posts: 31 Location: Yucaipa, Ca
|
Posted: Sat Apr 16, 2005 10:56 pm |
So how do I get zMUD to remove one item and wear the other when my exp is less than 20000?
|
|
_________________ My signature is better than yours. |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Sat Apr 16, 2005 11:12 pm |
It would help if you could supply a copy of your prompt or wherever it shows your experience tnl.
|
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
...{chris}... Novice
Joined: 11 Apr 2005 Posts: 31 Location: Yucaipa, Ca
|
Posted: Sat Apr 16, 2005 11:30 pm |
Sorry, lacking much sleep and not all there. Here it is.
Code: |
#VAR EXPTNL
#VAR Level
#VAR Exp
#VAR Tnl
#VAR QP
#VAR Complete
#TRIGGER {* You have * experience points and need (*) to advance.} {@EXPTNL = %replace( "%1", ",")}
#TRIGGER {Total Level: (%d)} {#MATH Level (%1 + 1)}
#TRIGGER {You receive (*) experience points.} {@Exp = %replace( "%1", ",");#MATH Tnl (@EXPTNL/@Exp);#MATH EXPTNL (@EXPTNL-@Exp)}
#TRIGGER {Quest Points: (*) ~((*) quests~)} {@QP = %replace( "%1", ",");@Complete = %replace( "%2", ",")}
#ST Experience needed to level @Level~: @EXPTNL I will get there in @tnl kills. @QP Quest Points
|
-Chris |
|
_________________ My signature is better than yours. |
|
|
|
Cyril Beginner
Joined: 16 Apr 2005 Posts: 12
|
Posted: Sun Apr 17, 2005 12:01 am |
Why not put #IF () instead of {}....
#IF (@tnl < 10000)...etc. Proper syntax? |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Sun Apr 17, 2005 12:02 am |
Hrmm... you obviously wouldn't want it going off every time you saw your exp and it was lower than that 20000, so you'd have to put in some stops. Something like this might work:
#ALIAS checkxp {
#IF ((@exptnl < 20000) AND (%null(@expchange))) {
remove scarf
wear pend
#VARIABLE expchange 1
}
}
#VARIABLE expchange {}
#TRIGGER {TEXT YOU RECEIVE WHEN YOU LEVEL UP} {#VARIABLE expchange {}}
Fill in the trigger text, and then add to the end of your two experience triggers checkxp:
#TRIGGER {* You have * experience points and need (*) to advance.} {@EXPTNL = %replace( "%1", ",");checkxp}
#TRIGGER {You receive (*) experience points.} {@Exp = %replace( "%1", ",");#MATH Tnl (@EXPTNL/@Exp);#MATH EXPTNL (@EXPTNL-@Exp);checkxp} |
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
...{chris}... Novice
Joined: 11 Apr 2005 Posts: 31 Location: Yucaipa, Ca
|
Posted: Sun Apr 17, 2005 12:27 am |
Thanks.
-Chris |
|
_________________ My signature is better than yours. |
|
|
|
|
|