Every now and then I feel like I’m at war with code. Most of the time, I write due to the fact that we actually have more coders than we do writers, and good writers are extremely hard to find. Every now and then I code because sometimes I’ve just got to get down and dirty with the nitty gritty parts of the game. (Also, I don’t want to wait for a coder to get around to adding my stuff into the game.)
Coding really comes in multiple parts:
- Figure out what the end result is going to be.
- Map out how to get there within one’s coding ability.
- Write the code.
- Upload it.
- Begin debugging.
Hopefully, the code will load, and I’m able to skip the very last part. That’s always a wonderful dream for a writer turned coder by necessity.

My victory was over a clan ability spell called inferno that serves as an area of effect spell (AoE) against all foes located in a room. It should have been easy. I based it off of a spell that already works and exists in the game but had been taken out because the base damage was a mess. The trouble began when I had to adjust the timer (how often you can cast a spell) and the casting time (how long it takes to cast the spell) based on the caster’s clan rankings. I had forgotten to define a few variables which broke the spell before it even got the first simple spam (message sent to the player). That’s a pretty newbie mistake to make, honestly, but coding is much like math. If you don’t use it often enough, you forget all the steps.
The spell operates in two parts. The initial casting checks for all the variables such as whether or not the character has enough spell points to cast the spell, whether or not the character’s clan tribute has been paid, whether or not the thing the character is trying to attack is in the room, whether or not the room allows combat, and a multitude of other things. Once the player makes it through all the checks, the casting begins, and the player receives a confirmation message. Then the second step of the spell begins, and this part was a bit more complicated for me.
I needed to pass a bit of information from the first part of the spell to the next part of the spell which occurs 4-6 seconds later. I never find that part easy as all the variables that are passed through have to match. And of course, I end up having problems. See if you can spot the problem:
if( (count/rank) >= 4) call_out("inferno_effect", 4, tp, room, damage);
else call_out("inferno_effect", 6, tp, room, damage);
void inferno_effect(object tp, object victim, int damage) {
It’s a very simple mistake, but it took me a bit to find it. Again, it was a newbie mistake. I finally got it all worked out, and I felt like I’d soloed a raid boss. Of course, it was just one spell in the whole scheme of things.