|
Bruner Beginner
Joined: 17 Dec 2002 Posts: 18 Location: USA
|
Posted: Sun Oct 05, 2003 6:30 am
Substitution and variables. |
I'm trying to write a trigger with some variables that will basically leave a line untouched, but add something right after it.
The output from the mud is:
--------------------------------------------------------
Your height is 5 feet, 7 inches, and you weigh 163.0 lbs.
You are carrying 0.0 lbs and wearing 55.2 lbs, very light.
Your base abilities are: Str:99 Int:50 Wil:50 Dex:99 Con:99.
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75
Your mood is: Pansy. You will flee below: 30 Hit Points
Your armor absorbs about 21% on average.
--------------------------------------------------------
What I'm using right now is this:
========================================================
#TRIGGER {Offensive bonus~: (%d), Dodging bonus~: (%d), Parrying bonus~: (%d)} {#VAR OB %1;#VAR DB %2;#VAR PB %3;#MATH DEF @DB+@PB;#PSUB {Offensive bonus: @OB, Dodging bonus: @DB, Parrying bonus: @PB Total Def Is @DEF}}
========================================================
I am wondering if that trigger will trigger everytime, and if the variables in the @PSUB will expound right.
This is what I would like to happen:
--------------------------------------------------------
Your height is 5 feet, 7 inches, and you weigh 163.0 lbs.
You are carrying 0.0 lbs and wearing 55.2 lbs, very light.
Your base abilities are: Str:19 Int:12 Wil:12 Dex:15 Con:19.
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def is 129
Your mood is: Wimpy. You will flee below: 30 Hit Points
Your armor absorbs about 21% on average.
--------------------------------------------------------
And this is what happens when it runs:
--------------------------------------------------------
You are a 17 year old male barbie hunter.
Your height is 5 feet, 7 inches, and you weigh 163.0 lbs.
You are carrying 0.0 lbs and wearing 53.2 lbs, very light.
Your base abilities are: Str:99 Int:50 Wil:55 Dex:99 Con:99.
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129The wind causes the grass to part here and
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129grasses. Each delicate little plant holds a
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129blossoms on its red veined branch, blossoms
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129stretch on in all directions in an endless A
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129Khane the Seanchan is standing here, riding
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129The curious traveler must take caution in
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129growing in thick profusion are large is a
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129plants stems are about an inch long and a
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129underfoot is damp and soggy, imprinted with
Offensive bonus: 113, Dodging bonus: 54, Parrying bonus: 75 Total Def Is 129The grass has thinned out enough in this
---------------------------------------------------------
I don't know why that happens the way it does. Any help would be Great!
Thanks
Bruner |
|
|
|
Davos Adept
Joined: 30 Jan 2003 Posts: 228 Location: USA
|
Posted: Sun Oct 05, 2003 6:46 am |
Looks to me like your only messup is in your #PSUB
Should be...
#PSUB "Offensive bonus: @OB, Dodging bonus: @DB, Parrying bonus: @PB Total Def Is @DEF"
The only problem -I- encounter when testing this is the line after the triggered line wraps up to the triggered line right behind the newly substituted line, you can correct this by putting %lf in the value of your trigger after your #PSUB, if you get the same thing happening on yours. |
|
|
|
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Sun Oct 05, 2003 6:55 am |
I got it to work fine just using #SUB instead of #PSUB.
|
|
|
|
Bruner Beginner
Joined: 17 Dec 2002 Posts: 18 Location: USA
|
Posted: Sun Oct 05, 2003 7:46 am |
Thanks guys. It was just the #PSUB that screwed me up. I used #sub, and it works great. Seems like a lot of explaining for a simple problem. :)
Thanks again
Bruner |
|
|
|
|
|
|
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
|
|