|
wmmspencer Newbie
Joined: 19 Nov 2011 Posts: 1
|
Posted: Sat Nov 19, 2011 8:56 pm
Need help with a trigger please. |
This draws from a database I have for building and sets everything correctly except the level of the mob. Regardless of what numeric value I give (1-100), if always sets the mob's level as one, and the subsequent fields appropriate for it being level one. Does anyone know why it constantly sets as level 1? Thanks for the help. :)
Code: |
#CLASS {setmob}
#ALIAS setmob {
#var level %1
#IF (@level > 120 | @level < 1) {#say That is not a valid level!} {
#dbget [@level-1]
level %rec.level
hitdice %rec.hitdice
damdice %rec.damdice
armor %rec.acslash %rec.acbash %rec.acpierce %rec.acexotic
#say Level set to %rec.level!
}
}
#CLASS 0
|
|
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Sun Nov 20, 2011 5:03 am |
I'm not sure why you are using square brackets in the #dbget command.
#dbget uses a numerical expression, which should be in parentheses.
#dbget (@level - 1) |
|
|
|
|
|