Is a script like that possible?

Xilefenko
01 Oct 2016, 20:11Is a script like that possible?
If Object.Atribute is greater than 5 then......
Is something like that possible and if yes, how do I type that?
The Pixie
01 Oct 2016, 20:50Like this:
if (Object.attribute > 5) {
msg("It is greater than 5.")
}

Anonynn
01 Oct 2016, 21:17Or you can do...
if (Object.attribute >= 5) {
msg("It is 5 or greater.")
}
and less than.
if (Object.attribute <= 5) {
msg("It is 5 or less.")
}

Xilefenko
01 Oct 2016, 21:55Thanks
hegemonkhan
03 Oct 2016, 04:50and you can do multiple conditionals too, for examples:
if (player.strength >= 90 and player.endurance >= 90) {
// Script(s)
}
which is the (for the most part anyways) same as this:
if (player.strength >= 90) {
if player.endurance >= 90) {
// Script(s)
}
}
and, you can use these two methods together too:
if (player.strength >= 90 and player.endurance >= 90) {
if (player.intelligence >= 90 and player.spirituality >= 90) {
// Script(s)
}
}