View Single Post
  #2  
Old 01-29-2014, 11:59 AM
Township EQ
Hill Giant
 
Join Date: Sep 2013
Posts: 118
Default

Quote:
Originally Posted by brokentechnology View Post
Hello!

I'm working on an epic quest that is laid out as follows:

You either align yourself with Freeport / Qeynos (EQ2-like) and the quest will you take through a story line of which faction controls the city.

So Freeport could control Qeynos and Qeynos to Freeport. When this happens, I would like to change the guards to match their respective colors (Pretty much a database appearance update)

Is anything like this even possible? I know you can change some stats but not sure if the quest system can interact with the database doing a mass change.
Code:
sub EVENT_SPAWN {
$npc_name = $npc->GetCleanName();
	if($npc_name=~/freeport/i) {
		$npc->SetRace(1);	     #:: Set NPC Race - Qeynos Citizen: 71 | Freeport Guards: 44
		$npc->SetTexture(1);        #:: Set NPC Texture
	}
	if($npcname=~/qeynos/i) {
		$npc->SetRace(1);		
		$npc->SetTexture(1);
	}
}
Pretty simple an easy thing to do.. you'll have to figure out which texture is the actual guard on both of those races.. but that's just a matter of #showstats'ing one of the existing ones.

You can add this into your global default.pl or you can just put the one on the bottom into each individual script.

Code:
sub EVENT_SPAWN {
	$npc->SetRace(1);	#:: Set NPC Race - Qeynos Citizen: 71 | Freeport Guards: 44
	$npc->SetTexture(1);        #:: Set NPC Texture
}
Another non-perl way of doing it is to #npcedit race/texture the NPC in-game.. or change its information in the npc_types table in your database.
Reply With Quote