Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
I didn't know what was what, so I just posted the basic macros.
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#11 |
Member
Join Date: Oct 2016
Posts: 39
|
I just needed the syntax from a fresh pair of eyes
|
#12 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
You can thank ShadowChemosh, he showed me that macrio a while back.
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#13 |
Member
Join Date: Oct 2016
Posts: 39
|
ok so how do I use this
~ abText begins with "The brown dog is jumping on the brown boat." field[abText].text = replace(field[abText].text, "brown", "red", 1) ~ Result is "The red dog is jumping on the brown boat." to replace 1d6 with 2d6 at level 11? once I get these Field associations down, I'll be good lol previous code: if (#totallevelcount[] >= 8) then #extradamage[hero.child[iThaas], " plus 1d6 radiant", field[thingname].text] endif Last edited by Mjolnirh; November 4th, 2016 at 09:18 PM. Reason: adding context |
#14 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
The following code should do what you want:
Quote:
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! Last edited by Mergon; November 4th, 2016 at 09:53 PM. |
|
#15 |
Member
Join Date: Oct 2016
Posts: 39
|
ok that worked for those two so I thought I'd try a select case for multiple entries, lol didn't work
var iLevel as number var sText as string iLevel = #totallevelcount[] Select Case ilevel Case >= 8 sText = "1d6" Case >= 11 sText = "2d6" Case >= 16 sText = "3d6" Case >= 20 sText = "4d6" Case else sText = "1d6" end select |
#16 |
Member
Join Date: Oct 2016
Posts: 39
|
ok I got it oddly enough here are the scripts that worked.
var bonbon as number if (#totallevelcount[] >= 8) then bonbon = 1 endif if (#totallevelcount[] >= 12) then bonbon = 2 endif if (#totallevelcount[] >= 17) then bonbon = 3 endif hero.child[iThaas].field[Bonus].value = hero.child[iThaas].field[Bonus].value + bonbon var iLevel as number var sText as string iLevel = #totallevelcount[] if (iLevel >= 8) then sText = "1d6" endif if (iLevel >= 11) then sText = "2d6" endif if (iLevel >= 16) then sText = "3d6" endif if (iLevel >= 20) then sText = "4d6" endif sText = " plus " & sText & " radiant" #extradamage[hero.child[iThaas], sText, field[thingname].text] |
#17 |
Senior Member
Lone Wolf Staff
Join Date: Aug 2012
Posts: 779
|
Quote:
Code:
if (iLevel >= 20) then sText = "4d6" elseif (iLevel >= 16) then sText = "3d6" elseif (iLevel >= 11) then sText = "2d6" elseif (iLevel >= 8) then sText = "1d6" endif sText = " plus " & sText & " radiant" #extradamage[hero.child[iThaas], sText, field[thingname].text] |
|
#18 |
Member
Join Date: Oct 2016
Posts: 39
|
Yeah I tried the elseif statement but it would not update with level up
One thing I do notice different about your code than the one I tried though is that you put the higher numbers first |
#19 |
Thread Tools | |
Display Modes | |
|
|