Invulnerable Shopkeepers

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
User avatar
Teph
UOX3 Neophyte
Posts: 32
Joined: Mon Mar 08, 2010 11:05 pm
Location: New Jersey, US
Has thanked: 0
Been thanked: 0

Invulnerable Shopkeepers

Post by Teph »

how can i change the exsistig spawners to make the shopkeepers spawn vulnerable?
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

You can open malevendors.dfn and remove the following highlighted line:

Code: Select all

[basevendor]
{
[color=orange]PRIV=4[/color]
SKINLIST=16
BACKPACK
...
That should cause all new vendors that spawn to become vulnerable. You can also use 'set vulnerable true to make any already saved (if spawned manually or through item-based spawners - npcs spawned through regional spawners aren't saved) vendors vulnerable.
-= Ho Eyo He Hum =-
User avatar
Teph
UOX3 Neophyte
Posts: 32
Joined: Mon Mar 08, 2010 11:05 pm
Location: New Jersey, US
Has thanked: 0
Been thanked: 0

Post by Teph »

hmm thanks, on a related note. corpsers and reapers move, can i use that same mechanism to freeze them upon spawning?
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

There is a way, yes, and this should have been done some time ago:

Copy and paste the below text, and save it in a text-file with the name "static_npc.js" in the UOX3/JS/NPC/AI/ folder:

Code: Select all

// Assigning this script to an NPC will stop
// him from moving upon spawning.

function onCreateDFN( objMade, objType )
{
	if( objMade )
	{
		objMade.wandertype = 0;
		objMade.frozen = true;
	}
}
Next, open JSE_FILEASSOCIATIONS.SCP and add the below highlighted line of text:

Code: Select all

	// AI-Stuff
	3200=npc/ai/cow_tipping.js
	3201=npc/ai/banker.js
	[color=orange]3202=npc/ai/static_npc.js[/color]
Lastly, open UOX3/DFNDATA/NPC/agressiveplants.dfn and add a line saying SCRIPT=3202 to all the NPCs in the file you wish to stop moving permanently.

You might also want to add a line saying FLEEAT=-1, so those NPCs won't try to flee when they get below the default threshold for health-points necessary to attempt to flee from combat (defaults defined in UOX.INI, but can be overriden on a per-NPC basis).

I'll be adding all of this as default setup for future UOX3 versions.
Last edited by Xuri on Sat Mar 13, 2010 7:03 pm, edited 1 time in total.
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hm. Bugger. Turns out this is not fool-proof. The NPCs will start moving occasionally when certain spells are cast on them. Not sure which, yet.
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Ok the above method will work as a temporary work-around most of time.

I'm adding a simpler method, though. A new NPCWANDER mode (5) which will make the NPCs that have it unable to move at all. Ever.

Will be on the CVS next time I commit, and also available in next experimental build - which I'll hopefully get out there one of these days.
-= Ho Eyo He Hum =-
User avatar
Teph
UOX3 Neophyte
Posts: 32
Joined: Mon Mar 08, 2010 11:05 pm
Location: New Jersey, US
Has thanked: 0
Been thanked: 0

Post by Teph »

good stuff, i noticed a cow-tipping.js :o what is that
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Exactly what it sounds like! :D
-= Ho Eyo He Hum =-
Post Reply