gday, i was wondering if someone could give me a hand with my autoroller. I've got it working (its different to the plugin because i use a different mud), but i'd like to tidy it up, but im not quite sure how.
basically i want to set my arrays of values up in functions to make it neater and easier to change, e.g.:
function strength
Stre(1) =" Child"
Stre(2) =" Wimpy"
Stre(3) ="Pencil-neck"
Stre(4) =" Weak"
Stre(5) =" Pipsqueak"
end function
and then call this in my script:
sub autoroller(strName, strLine, aryWildcards)
dim stre
'some line to get & set stre array
'my code to check the value:
streVar = aryWildcards (1) 'this gets the rolled stat
streMin = world.getvariable ("StreMin") 'this gets the mimimum stat
dim streTmp 'this is a temp variable
for i=0 to 20
if streVar = stre(i) then
streTmp = i
world.setvariable "streTmp", streTmp
end if
next
'more code to check values and things....
end sub
basically all i need help with is:
'some line to get & set stre array
thanks a lot ppl..
basically i want to set my arrays of values up in functions to make it neater and easier to change, e.g.:
function strength
Stre(1) =" Child"
Stre(2) =" Wimpy"
Stre(3) ="Pencil-neck"
Stre(4) =" Weak"
Stre(5) =" Pipsqueak"
end function
and then call this in my script:
sub autoroller(strName, strLine, aryWildcards)
dim stre
'some line to get & set stre array
'my code to check the value:
streVar = aryWildcards (1) 'this gets the rolled stat
streMin = world.getvariable ("StreMin") 'this gets the mimimum stat
dim streTmp 'this is a temp variable
for i=0 to 20
if streVar = stre(i) then
streTmp = i
world.setvariable "streTmp", streTmp
end if
next
'more code to check values and things....
end sub
basically all i need help with is:
'some line to get & set stre array
thanks a lot ppl..