Serverstatus Script
Filed in scripting, server admin, May 30, 2006, 2:00 amIt displays some basic information about a multiplayer NWN server. Providing it is visible over the internet, then there are no extra requirements (ie no database or special router settings) needed. The script needs to know the address of the server, so its address needs to be fixed, either by using a fixed IP address or a DNS service (we use dyndns). I decided to stick the script here after this thread on the BioBoards, which is why the code uses that server’s address.
Example output:
Server Address: legacyofnetheril.servegame.org:5121
Server Status: Online
Players: 3 / 24
ECL for playable races
Filed in prc, May 12, 2006, 11:52 pmThe list is made from the PRC’s ECL.2da with the blank playable races added in.
| Race | LA | Racial HD | Monster Race | ECL |
|---|---|---|---|---|
| Aasimar | 1 | 1 | ||
| Air Genasi | 1 | 1 | ||
| Aquatic Elf | 1 | 1 | ||
| Arctic Dwarf | 0 | 0 | ||
| Avariel | 3 | 3 | ||
| Azer | 4 | 2 | outsider | 6 |
| Brownie | 4 | 4 | ||
| Bugbear | 1 | 3 | humanoid | 4 |
| Deep Halfling | 0 | 0 | ||
| Deep Imaskari | 0 | 0 | ||
| Drow Female | 2 | 2 | ||
| Drow Male | 2 | 2 | ||
| Duergar | 1 | 1 | ||
| Dwarf | 0 | 0 | ||
| Earth Genasi | 1 | 1 | ||
| Elf | 0 | 0 | ||
| Fey’ri | 3 | 3 | ||
| Fire Genasi | 1 | 1 | ||
| Forest Gnome | 0 | 0 | ||
| Ghostwise Halfling | 1 | 1 | ||
| Githyanki | 2 | 2 | ||
| Githzerai | 2 | 2 | ||
| Gnoll | 1 | 2 | humanoid | 3 |
| Gnome | 0 | 0 | ||
| Goblin | 0 | 0 | ||
| Gold Dwarf | 0 | 0 | ||
| Gray Orc | 1 | 1 | ||
| Half Drow | 1 | 1 | ||
| Half Elf | 0 | 0 | ||
| Half Ogre | 1 | 1 | ||
| Half Orc | 0 | 0 | ||
| Halfling | 0 | 0 | ||
| Hobgoblin | 1 | 1 | ||
| Human | 0 | 0 | ||
| Illithid | 7 | 8 | aberration | 15 |
| Kobold | 0 | 0 | ||
| Lizardfolk | 1 | 2 | humanoid | 3 |
| Minotaur | 2 | 6 | monstrous humanoid | 8 |
| Neraphim | 0 | 0 | ||
| Ogre | 2 | 4 | giant | 6 |
| Orc | 0 | 0 | ||
| Orog | 2 | 2 | ||
| Pixie | 4 | 4 | ||
| Rakshasa | 7 | 7 | outsider | 14 |
| Rock Gnome | 0 | 0 | ||
| Shadowswyft | 1 | 1 | ||
| Strongheart Halfling | 0 | 0 | ||
| Sun Elf | 0 | 0 | ||
| Svirfneblin | 3 | 3 | ||
| Tallfellow Halfling | 0 | 0 | ||
| Tanarukk | 3 | 5 | outsider | 8 |
| Tiefling | 1 | 1 | ||
| Troll | 5 | 6 | giant | 11 |
| Urdunnir | 4 | 4 | ||
| Water Genasi | 1 | 1 | ||
| Wemic | 3 | 4 | monstrous humanoid | 7 |
| Wild Dwarf | 0 | 0 | ||
| Wild Elf | 0 | 0 | ||
| Wood Elf | 0 | 0 | ||
| YuanTi Pureblood | 2 | 4 | monstrous humanoid | 6 |
MySQL version of the PRC precacher data
Filed in database, prc, May 11, 2006, 11:05 pmUpdated: Tue 3rd October 2006
After it choking on a few Bioware 2da files that were badly formed and having to start again each time, I got the out.sql file finally. I only needed to make minor changes to for it work with mySQL. I tested it by importing it into a mySQL database. I didn’t bother to do anything with the Bioware 2da files it didn’t like, most were empty anyway.
Syntax Highlighting?
Filed in scripting, , 9:10 pmAs NWscript is supposed to use C syntax, I’ll try that and see if it is nicer than PHP.
PHP
//:://///////////////////////////////////////////// //:: Confusion Heartbeat Support Script //:: NW_G0_Confuse //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* This heartbeat script runs on any creature that has been hit with the confusion effect. */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Sept 27, 2001 //::////////////////////////////////////////////// #include "x0_inc_henai" void main() { SendForHelp(); //Make sure the creature is commandable for the round SetCommandable(TRUE); //Clear all previous actions. ClearAllActions(TRUE); int nRandom = d10(); //Roll a random int to determine this rounds effects if(nRandom == 1) { ActionRandomWalk(); } else if (nRandom >= 2 && nRandom <= 6) { ClearAllActions(TRUE); } else if(nRandom >= 7 && nRandom <= 10) { ActionAttack(GetNearestObject(OBJECT_TYPE_CREATURE)); } SetCommandable(FALSE); }
Download code: nw_g0_confuse.nss
C
//:://///////////////////////////////////////////// //:: Confusion Heartbeat Support Script //:: NW_G0_Confuse //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* This heartbeat script runs on any creature that has been hit with the confusion effect. */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Sept 27, 2001 //::////////////////////////////////////////////// #include "x0_inc_henai" void main() { SendForHelp(); //Make sure the creature is commandable for the round SetCommandable(TRUE); //Clear all previous actions. ClearAllActions(TRUE); int nRandom = d10(); //Roll a random int to determine this rounds effects if(nRandom == 1) { ActionRandomWalk(); } else if (nRandom >= 2 && nRandom <= 6) { ClearAllActions(TRUE); } else if(nRandom >= 7 && nRandom <= 10) { ActionAttack(GetNearestObject(OBJECT_TYPE_CREATURE)); } SetCommandable(FALSE); }
Download code: nw_g0_confuse.nss
Now those are some interesting colours.