Well he uses var %sword $rand(1,9999999) because he want\'s to show some random damage :)
And if it\'s lower than 9000 it doesn\'t kill him :)
So if you use another var for damage only and 1,2 for the output, it wouldn\'t fit right.
But indeed he should have done if (%sword =< 9000)
Nontheless I would do it different as well :)