Archive for the ‘Programming’ Category
Playing around with my healing setup in World of Warcraft. If you have ever healed you might have come across HealBot. Some argue it’s bad, some say it’s good. Some say use Grid + Clique. I myself have a simple healbot setup and I enjoy it just fine with my macros I have setup and my key bindings. I also have it displaying the HoT icons on the bar, as a Paladin I only have SS+FoL now and Gift of the Naaru. Beacon of Light also gets displayed.
The purpose of this post was to inform others how to add a custom HoT (Heal over Time) to be monitored by HealBot. It does a lot of these for you, but I found that it does not monitor the Gift of the Naaru (Draenei Racial) HoT.
Find the file; HealBot_Localization.en.lua it is in the Locale folder. If you use a different language, you may wish to open your own language file instead of .en.
Add the line;
HEALBOT_GIFT_OF_THE_NAARU = "Gift of the Naaru";
In the following section;
HEALBOT_FLASH_HEAL = "Flash Heal";
HEALBOT_FLASH_OF_LIGHT = "Flash of Light";
HEALBOT_GIFT_OF_THE_NAARU = "Gift of the Naaru";
HEALBOT_GREATER_HEAL = "Greater Heal";
HEALBOT_BINDING_HEAL = "Binding Heal"
Make it like so. I added it here just because I copied the line above it for Flash of Light. Save the file.
Open HealBot.lua in the parent folder, and go to Line 1188 which happens to say:
HealBot_Watch_HoT[HEALBOT_FLASH_OF_LIGHT]="C"
Copy that line and paste it, change it to read:
HealBot_Watch_HoT[HEALBOT_GIFT_OF_THE_NAARU]="A"
The few lines should look like this:
HealBot_ShortBuffs[HEALBOT_SEAL_OF_COMMAND]=true
HealBot_ShortBuffs[HEALBOT_SEAL_OF_THE_MARTYR]=true
HealBot_Watch_HoT[HEALBOT_FLASH_OF_LIGHT]="C"
HealBot_Watch_HoT[HEALBOT_GIFT_OF_THE_NAARU]="A"
HealBot_Watch_HoT[HEALBOT_BEACON_OF_LIGHT]="CT"
HealBot_Watch_HoT[HEALBOT_SACRED_SHIELD]="A"
HealBot_Watch_HoT[HEALBOT_LIGHT_BEACON]="A"
Now navigate to line 2933 and 2934, which looks something like:
elseif spellName==HEALBOT_FLASH_OF_LIGHT then
if HealBot_Player_HoT[uscGUID][spellName]<17 then HealBot_Player_HoT[uscGUID][spellName]=17 end
Copy that and paste below it, so the section looks like the following:
if HealBot_Player_HoT[uscGUID][spellName]<17 then HealBot_Player_HoT[uscGUID][spellName]=17 end
elseif spellName==HEALBOT_FLASH_OF_LIGHT then
if HealBot_Player_HoT[uscGUID][spellName]<17 then HealBot_Player_HoT[uscGUID][spellName]=17 end
elseif spellName==HEALBOT_GIFT_OF_THE_NAARU then
if HealBot_Player_HoT[uscGUID][spellName]<17 then HealBot_Player_HoT[uscGUID][spellName]=17 end
elseif spellName==HEALBOT_WILD_GROWTH or spellName==HEALBOT_TRANQUILITY then
HealBot_Watch_AM_HoT=3
Save the file, and open the game, or do a /reload in-game to get the new code loaded. Cast Gift of the Naaru on yourself, or another in your party, and you should now see the HoT icon.
EDIT: As I post this article here and on the HealBot forums, the author has included support for GotN and some others in the newest Beta.
The LUA programming language is a lightweight, reflective, imperative and functional programming language, designed as a scripting language with extensible semantics as a primary goal. As stated by Wikipedia (http://en.wikipedia.org/wiki/Lua_(programming_language)).
The World of Warcraft client uses LUA to design the user interface. This allows third party developers to create unique interface customizations and share them with others, as addons.
I have been playing around with some LUA as it is used in World of Warcraft to change a few things in my client without downloading huge addons that do the same, but offer more features that I don’t want to load. Being that I am trying to be memory efficient and save CPU cycles for the game itself.
Extra WoW Features (3.1 KiB, 362 Downloads)
This will do the following for you:
Move the casting bar down a little (Change inside .lua file, line 21)
Allow you to talk in your second language with a /lan action (Example: “/lan Hello.” Without quotes, will say hello in Draenei if you are Draenei.)
Open all bags when you talk to a ‘vendor’ and close them all when done.
Move your game-tooltips (not items) to the lower right hand corner of the screen.
Add ‘Targeting: Name Here’ to the game-tooltips.
Auto repair when you visit a merchant that is able to repair your gear.
Add tabs to the profession window that allows access to your professions with only one button.
You can of course edit the .lua file yourself and remove anything you don’t want. This is an addon I use for my purposes. Consider this beta code and may or may not work for you.
If you need to take a simple string of values and do something for each of them you can use the explode function in PHP. Below is a list separated with spaces. Your list can be separated with any character, just change the line that contains explode(” “, $list) with a different character between the quotes.
<?php
$list = “me you him john bob mary”;
$names = explode(” “, $list);foreach($names as $name) {
echo $name . “<br />”;
}
?>
Here is a simple example of how to connect to a MySQL server using PHP and pull down some data inside the database.
<?php
// Connect to database server
$hd = mysql_connect(“myhost”, “username”, “password”)
or die (“Unable to connect.”);// Select database
mysql_select_db (“database”, $hd)
or die (“Unable to select database.”);// Execute sample query
$res = mysql_query(“SELECT * FROM customer”, $hd)
or die (“Unable to run query.”);// Query number of rows in rowset
$nrows = mysql_num_rows($res);// Output
echo “The query returned $nrows row(s):<br />”;// Iteration loop, for each row in rowset
while ($row = mysql_fetch_assoc($res))
{
// Assigning variables from cell values
$data1 = $row["title"];
$data2 = $row["fname"];
$data3 = $row["lname"];
$data4 = $row["phone"];// Outputting data to browser
echo “ROW# $nr : $data1 $data2 $data3 $data4 <br />”;
}// Close the MySQL connection
mysql_close($hd);?>
This is my 2004 Grand Prix GTP; it is also the victim of my carputer install. I will start with some information about the car, and then work into the basics of the car computer, and then photos and all that good stuff. So here we go…

Vehicle
Make: (GM) Pontiac
Year: 2004
Model: Grand Prix
Sub-Model: GTP
Engine: GM 3.8L Supercharged (M90) V6
Stock HP: 260
Current HP: ~290 (I have no access to a dyno, but with mods and a strict guess.)
Current Mods: DHP 1.0 ECU (Engine Computer), 3.4 Supercharger Pulley (Stock is 3.8), Boost Bypass Mod, Shift Kit, K&N AirCharger, Replacement Down Pipe, 180° TStat
Future Mods: Received my HP Tuner. Seems like I have a problem though, it does not scan my car correctly, contacted support, need to dump ecu to file and send them logs.
I picked up this car at the Orlando Auto Auction with the help of my neighbor who can get in with dealer access. I first saw the body style in 2004 when the first models came out and fell in love with the body style. I love this vehicles curves.
After I got home the same day of purchase, I started to pull all of the components out of my 2000 Chevy Malibu LS for the carputer that I had installed. Now was the time to recreate everything, clean it up more, and put more time and effort into the install while nothing had been done yet, anything was possible.
Current Carputer Setup
Motherboard: VIA M10000
Memory: Generic Low Profile 512MB DDR
Boot Drive: 512MB Sandisk Compact Flash
USB Drive: 13GB Trash Hard Drive in a USB 2.0 Caddy. (Stores the Music, and Interface Stuff)
Power Supply: Opus 120W
Touch Screen: Lilliput (Older Style)
OS: Windows XP Pro (Trimmed)
OBDII Interface: BR-3 OBD Diagnostics Unit
At the moment, the carputer is hidden away in the trunk, in a small cubby that probably use to hold jumper cables from the factory, or something like that. When I got the car, it was empty, prime location for the motherboard and other system components. Power cables from the battery feed into the trunk for the carputer, amplifiers, and inverter. The inverter does not power any part of the carputer setup, it’s there for emergency situations that I need AC power.
The external drive is placed under the front passenger seat, for easy accessibility if necessary to remove and add music, or update any software on it. I have had this drive under the seat since I placed the carputer in the original car. I have gone over railroad tracks and other rough terrain and have yet to have a problem with this drive. I have planned for this drive to go bad, thats why it’s a ‘trash’ drive. I have tons of these drives lying around, so it can be replaced with anything.
The operating system, Windows XP Pro, sits on the 512MB compact flash card for booting the system, and setting up all that is needed for the system to run. Windows XP takes up approximately 300MB of the 512MB available. All other programs are installed on the external drive. A write filter is loaded at boot to prevent the system from writing to the compact flash, unless I explicitly tell it to do so. This prevents corrupt files from powering off incorrectly, or anything else that might happen… Flash burnout to be exact. My boot times with everything in place, is around 35 to 40 seconds. This time includes the boot process, Windows XP loading, and launching my interface program.
My interface program which I custom made for the CarputerGTP is a simple application made in VB6 (Will explain later) that allows me to touch buttons and have the computer load objects, change song, and all that good stuff. It also drives my external 16 character 2 line LCD module display. Showing the song playing, the play list it’s on and the time remaining and total for the current song. Along with that, the interface program also talks to my OBDII controller and the car itself, reading engine stats and then if I tell the program to do so, display those stats on the external LCD screen. Currently monitored on the small LCD are: Boost, RPM, Engine Load, and Throttle Position. Also, the interface has the popular software MapMonkey embedded, which talks to the GPS unit, providing navigation and such. My program also interfaces with MapMonkey as to take a sample of my current speed, location, and GPS coords and save them to the external drive in a database every 500ms. “Do you know how fast you where going Sir?”, “Yes, Officer. Exactly 45MPH!”.
Little note on the VB6. People always try and say VB6 is horrible and I should use .NET or something like that. Well, yes, I could have. But you know what, I fucking hate installing the .NET framework to run a program that I can create in VB6 and have no extra libraries to install, using up valuable space on the 512MB compact flash card. Yes, .NET is a HUGE framework when it comes to those limited space conditions. Also, I have spent a few hundred hours working on my interface, tweaking memory usage, string handling, garbage stuffs, cpu usage, and IO processes. I know what I’m doing. When doing its’ entire job, the computer uses approximately 45% of the CPU and only 48MB of Memory (According to Task Manager). If you were not following here is a complete list of what the interface does:
1) Touch screen interface to carputer.
2) Controls external Winamp Process. (Pause, Play, Next, Prev)
3) Controls Winamp to load different Play lists.
4) Controls COM1 for Serial Attached 2 Line, 16 Character LCD providing real-time winamp song information.
5) Controls COM2 for OBDII data viewing, data mining, display and record.
6) Combines the above two to show OBDII information on the LCD.
7) MapMonkey integration which along with Destinator allows voice guided navigation.
8) Logging of current location every 500ms to a database on the external drive.
9) Interface has no flashy crap. Just a progress bar for the song position, title playing, OBDII information, and Location information.