[ARCHIVED] Archived UOX3 Version (0.98-4.0 - Updated Jan 17th, 2009)

Where we archive the version changelog threads
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 »

Code: Select all

[color=orange]6/08/2007 - Xuri[/color]
	Fixed multiple JS-scripts that would not work correctly with negative Z values (Used GetSByte instead of GetByte)
	Fixed a few "You can't think of a way to use that item"-messages appearing when using certain JS-based items
	Removed rawfish.js and the script entries for it, no longer used.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=orange]6/10/2007 - grimson[/color]
	Modified cMovement::NpcMovement() and cMovement::HandleNPCWander() so that NPCs
	only run while they still have stamina left.
	Added two new settings to the uox.ini, NPCRUNNINGSPEED and NPCFLEEINGSPEED, they
	work the same way as NPCMOVEMENTSPEED.
	Added three new DFN tags for NPCs. WALKINGSPEED, RUNNINGSPEED and FLEEINGSPEED
	they also work the same way as the uox.ini settings, and will override those if
	present.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=orange]6/10/2007 - grimson[/color]
	Allow faster attacks on fleeing NPCs, so they won't be chased without an end.
	Allow following NPCs to run if their target went to far away, so they can catch
	up on it.
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 »

Nice updates, grimson :)

However, it seems the DFN tags for movement speed will only override the INI ones if they are lower.

I.e...
NPCRUNNINGSPEED=0.2
RUNNINGSPEED=2
...works, character runs at speed 2 instead of 0.2

but...
NPCRUNNINGSPEED=2
RUNNINGSPEED=0.5
...doesn't, character still runs at speed 2.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=orange]6/10/2007 - grimson[/color]
	Fix reading of the new SPEED DFN tags for NPCs.
Argh, I was casting an integer into a float. That's what you get from coding near midnight ;).

Try it again.
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 »

Hmmm. Still no go.
NPCMOVEMENTSPEED=0.7
NPCRUNNINGSPEED=0.2
NPCFLEEINGSPEED=0.4

RUNNINGSPEED=0.1
WALKINGSPEED=0.1
FLEEINGSPEED=0.1

But NPC moves at INI speeds.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Double argh, now it is fixed. Must be the heat here :D.
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 »

*cough*
Ah..eh...uhm....I hate to be the bringer of bad news.. but... *wry grin*

NPCMOVEMENTSPEED=0.7
NPCRUNNINGSPEED=0.2
NPCFLEEINGSPEED=0.4

RUNNINGSPEED=1 (or 0.1, doesn't matter)
WALKINGSPEED=1 (or 0.1, doesn't matter)
FLEEINGSPEED=1 (or 0.1, doesn't matter)

Any NPCs with any values defined for those three tags will move at lightspeed :) Couldn't target any of them if I was the fastest gun in the west. :D
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Seems like it isn't my day :D. Try it now...
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 »

It's a fix :D Works perfectly now. Great work :)

Here's a video of the lightspeed-bug, btw:
http://www.xoduz.org/files/uox3/uox3_npcmovement.rar :shock:
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Code: Select all

[color=orange]6/12/2007 - giwo (0.98-3.7p)[/color]
	Added the JavaScript CSocket methods FirstTriggerWord(), NextTriggerWord(), FinishedTriggerWords() to allow handling trigger words sent from the client during speech.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Nice movie, btw.... reminds me of the good old days when I played on OSI with a 33.6k modem....
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. Example of how to use that? =P
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

First you need to get the trigger word ID (much like a packet ID). These can be pulled from the speech.mul with a hex editor.

Below you can see the ones we currently handle in the code

Code: Select all

enum TriggerWords
{
	TW_BALANCE			= 0x0001,		// Balance
	TW_BANK				= 0x0002,		// Bank
	TW_GUARDS			= 0x0007,		// Guard
	TW_QUESTDEST		= 0x001D,		// Destination
	TW_QUESTTAKE		= 0x001E,		// I will take thee
	TW_HOUSELOCKDOWN	= 0x0023,		// I wish to lock this down
	TW_HOUSERELEASE		= 0x0024,		// I wish to release this
	TW_RESIGN			= 0x002A,		// I resign from my guild
	TW_KILLS			= 0x0032,		// I must consider my sins
	TW_HOUSEEJECT		= 0x0033,		// Remove Thyself
	TW_HOUSEBAN			= 0x0034,		// I Ban Thee
	TW_STOP2			= 0x0036,
	TW_VENDORBUY		= 0x003C,		// Vendor Buy
	TW_VENDORVIEW		= 0x003D,		// Vendor View
	TW_VENDORGOLD		= 0x003E,		// Vendor Gold
	TW_VENDORSTATUS		= 0x003F,		// Vendor Status
	TW_VENDORDISMISS	= 0x0040,		// Vendor Dismiss
	TW_SETNAME			= 0x0042,		// Set Name
	TW_BOATFORWARD		= 0x0045,		// Forward
	TW_BOATBACKWARD		= 0x0046,		// Backward
	TW_BOATLEFT			= 0x0047,		// Left
	TW_BOATRIGHT		= 0x0048,		// Right
	TW_BOATSTARBOARD	= 0x0049,		// Starboard
	TW_BOATPORT			= 0x004A,		// Port
	TW_BOATSTOP			= 0x004F,		// Stop
	TW_BOATTURNRIGHT	= 0x0065,		// Turn Right
	TW_BOATTURNLEFT		= 0x0066,		// Turn Left
	TW_BOATTURNAROUND	= 0x0067,		// Turn Around
	TW_BOATUNFURL		= 0x0068,		// Unfurl Sail
	TW_BOATFURL			= 0x0069,		// Furl Sail
	TW_TRAIN			= 0x006C,		// Train, Teach
	TW_FOLLOW2			= 0x00E8,		// Follow
	TW_GOLD				= 0x0134,		// Gold
	TW_VENDORSELL		= 0x014D,		// Vendor Sell
	TW_COME				= 0x0155,		// Come
	TW_FETCH			= 0x0157,		// Fetch
	TW_GET				= 0x0158,		// Get
	TW_BRING			= 0x0159,		// Bring
	TW_FOLLOW			= 0x015A,		// Follow
	TW_FRIEND			= 0x015B,		// Friend
	TW_GUARD			= 0x015C,		// Guard (Pet)
	TW_KILL				= 0x015D,		// Kill
	TW_ATTACK			= 0x015E,		// Attack
	TW_STOP				= 0x0161,		// Stop
	TW_FOLLOWME			= 0x0163,		// Follow Me
	TW_ALLCOME			= 0x0164,		// All Come
	TW_ALLFOLLOW		= 0x0165,		// All Follow
	TW_ALLGUARD			= 0x0166,		// All Guard
	TW_ALLSTOP			= 0x0167,		// All Stop
	TW_ALLKILL			= 0x0168,		// All Kill
	TW_ALLATTACK		= 0x0169,		// All Attack
	TW_ALLGUARDME		= 0x016B,		// All Guard Me
	TW_ALLFOLLOWME		= 0x016C,		// All Follow Me
	TW_RELEASE			= 0x016D,		// Release
	TW_TRANSFER			= 0x016E,		// Transfer
	TW_STAY				= 0x016F,		// Stay
	TW_ALLSTAY			= 0x0170,		// All Stay
	TW_BUY				= 0x0171,		// Buy
	TW_VIEW				= 0x0172,		// View
	TW_COLLECT			= 0x0173,		// Collect
	TW_STATUS			= 0x0174,		// Status
	TW_DISMISS			= 0x0175,		// Dismiss
	TW_SELL				= 0x0177,		// Sell
	TW_COUNT			= 0xFFFF
};
Once you have the ID, you would add this support to the onSpeech() event in place of handling the string directly.

So:

Code: Select all

function onSpeech( myString, myPlayer, myNPC )
{
	var mySock = myPlayer.socket;
	if( mySock != null )
	{
		for( var trigWord = mySock.FirstTriggerWord(); !mySock.FinishedTriggerWords(); trigWord = mySock.NextTriggerWord(); )
		{
			switch( trigWord )
			{
			case 0x0002: // Bank
				DoStuff();
				return 2;
			}
		}
	}
}
Basically it is faster than string handling (as the client is doing all that parsing for you anyway).
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 »

Code: Select all

[color=orange]7/17/2007 - Xuri[/color]
	Added new JS script for moonstones, used to create gates between felucca & trammel
	Added new JS script for spyglasses, used to see the phases of the moons
	Added new DFN item: [moonstone], uses new moonstone JS script
	Removed duplicate spyglass entries in item-DFNs, and added script tag for new spyglass JS script
	Drinking healing potions will no longer also give the user night-sight
	Cure-potions should be working again (stranf)
	Drinking a poison-potion will now poison one's character
	A timer now stops players from using multiple potions rapidly
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Code: Select all

[color=orange]
7/23/2007 - giwo (0.98-3.7q)[/color]
	Added support for updated UOKR packets.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=orange]7/28/2007 - grimson[/color]
	Added a new setting to the uox.ini: BASICTOOLTIPSONLY. If this is set to 1 the
	tooltips will only contain basic information, like the name and the weight of
	an item.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Added a new setting to the uox.ini: BASICTOOLTIPSONLY. If this is set to 1 the
tooltips will only contain basic information, like the name and the weight of
an item.
Grimson, you are my hero! Now Item-ID and some other skills can actually be used again!

Let me know when this experimental update it up so I can test it out.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

stranf wrote:Let me know when this experimental update it up so I can test it out.
Whenever I update the CVS I also put up an updated experimental build, so go ahead and test it out. :)
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=orange]8/12/2007 - grimson[/color]
	Use an enum for racial relations, should help with reading the code.
	Fix a bug where racial allys would attack each other.
Locked