| Author: | Adam |
| Author Website: | EndlessHordes@yahoo.com |
| Script Name: | Check Race/ Set as Enemy |
| Description: | Checks PC's race and makes NPC Friend/Foe. This is great for making other races attack PCs. It becomes important when you set up lots of factions and want different starting towns for each race. Not only do they attack the incoming evil PC they also return to there spawn loc/waypoint after so many seconds. This should prevent them from running to far in large zones. |
| Instructions on Use: | Replace the OnHeartbeat script with the one below. Make a waypoint for your guards return spot, or use the spawner waypoint if you are using a MMORPG spawner. |
Script 1 (OnHeartbeat):
| ///////////////////////////////////////// // Scipt replaces onheatbeat of guard // // Created by: endlesshordes@yahoo.com // // Ver1.0 7/16/02 // ///////////////////////////////////////// void main() { object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);// object oKicker = OBJECT_SELF; if (GetRacialType(oCreature)!=RACIAL_TYPE_DWARF){ // Change DWARF to HUMAN,GNOME,ELF,HALFELF,HALFORC, or HALFLING for desired effect. B) AssignCommand(oKicker, ActionAttack(oCreature, FALSE)); } { DelayCommand(60.0, ActionMoveToObject(GetObjectByTag("DwarfGuard1"))); // NPC tag goes here. Delay is how long NPC chase PC in seconds. } } |