Simple Scripts: Level Rewards, Pet Heal, Player List

I’m trying to learn more about the 3.3.5a code base, so I’ve been writing some simple scripts, and I thought I’d share. These have undoubtedly been done before, so don’t expect anything revolutionary.

custom_level_rewards.cpp gives players some money and a random dungeon bag when they level. It also gives most classes most of their spells for that level automagically. I still have to fix paladins and shamans.

[ATTACH]2335._xfImport[/ATTACH] heals your hunter pet when you feed it, similar to the post-cataclysm behavior. I’m an impatient hunter who doesn’t like to wait for his pet to recover.

[ATTACH]2334._xfImport[/ATTACH] writes a csv file of all the characters online at the moment, whenever anyone logs in/out. I use this with a couple of web server scripts to monitor activity.

I hesitate to post this one, since it’s kind of cheesy, but it works for me. [ATTACH]2361._xfImport[/ATTACH] just increases the damage players deal and reduces the damage they take in dungeons, if they’re solo or in a small group. It does the same to experience gained. I like this better than changing the elite difficulty configuration, for dungeons with lots of non-elite nuisances. I also prefer it to npc bots.

Warning. I’ve already discovered and fixed two server-crashing bugs in this one. Use it with caution.

Following oxl0c0xo’s excellent example, I’ve changed [ATTACH]2359[/ATTACH] to mail the items if the player’s bags are full.

Looks awesome. One thing I noticed when using the script is that it didn’t auto learn parry on my paladin. Instead of trying to figure out how to fix it, or seeing if there were other spells that didn’t work, I just removed the feature. I planned on looking into it, but i’m not much of a scripter, so i figured I would just try and figure it out and make it into a completely separate script. Might be cool to add some true/false configurations for each feature of the script so that someone really inexperienced could enable/disable things as they please. Thank for the excellent examples to get me started scripting in c++!

Paladins and shamans have those faction-specific spells, so there’s not a simple query to pull their list. I keep meaning to fix that, but I haven’t got to it yet.