Commit graph

62 commits

Author SHA1 Message Date
Xoduz
a601de9a5e Small update
Added dictionary entries for single-click name suffixes like tame/bonded/invulnerable/frozen/guarded
2025-07-09 02:09:59 +08:00
Dragon Slayer
1fbd210ad0
Merge branch 'develop' into Pet-Bonding 2025-06-03 18:13:56 -05:00
Xoduz
dcf10ed540 More timer-related tweaks
Got rid of the Overflow() function, which no longer serves a purpose after timers have been upgraded from uint32_t to uint64_t
Unified usage of TIMERVAL (UI64) and TVAL (also UI64) across code base; now only TIMERVAL is used
Updated BuildTimeValue() function parameter from R32 to R64
Updated casting of values passed into BuildTimeValue() across source base
Updated JS Timers and Temp Effects to support starting, saving and loading very long term effect timers; no more 49 days upper limit
Ninja fix for new items added to a container appearing underneath other items in the container instead of over
2025-05-31 01:47:47 +08:00
strattond
91dd763409 Change from 32 bit to 64 bit timer 2025-05-27 08:40:00 +10:00
Dragon Slayer
93df434a2f code upates 2025-05-18 14:45:42 -05:00
Dragon Slayer
8b8ba17cf8 Update cSocket.cpp 2025-05-18 14:26:06 -05:00
Xoduz
82f473f00a Rework of passive stat regeneration
Updated code calculating passive health, stamina and mana regeneration for characters, based on new UOX.INI settings and bonuses from characters/items/races
	Added three new Character/Item/Race DFN tags to grant bonus health/stamina/mana regeneration:
		HEALTHREGENBONUS=# 	// 10 bonus points equates to 0.01 extra hp regen per second, independent of era
		STAMINAREGENBONUS=# // 10 bonus points equates to 0.05 extra stamina regen per second
		MANAREGENBONUS=# 	// 10 bonus point equates to 0.1 extra mana regen per second
		...also available as JS Properties:
			.healthRegenBonus
			.staminaRegenBonus
			.manaRegenBonus
	Updated get/set JS commands to allow getting/setting regen bonuses for health, stamina and mana
	Updated races.dfn to include default +2 health regen bonus for humans, and +2 mana regen bonus for gargoyles.
	Added new UOX.INI settings under [Skills and Stats] section:
		HEALTHREGENMODE=1 	// 0 = no passive health regen, 1 = default passive health regen
		STAMINAREGENMODE=1 	// 0 = no passive stamina regen, 1 = default passive stamina regen (LBR or below), 2 = AoS or beyond, 3 = SA and beyond
		MANAREGENMODE=1 	// 0 = no passive mana regen, 1 = default passive mana regen (LBR or below), 2 = AoS (Pub17), 3 = AoS/SE (Pub18 and beyond), 4 = ML, 5 = KR, 6 = SA and beyond
		HEALTHREGENCAP=#  	// Max cap for Health Regeneration Bonus stat per character
		STAMINAREGENCAP=# 	// Max cap for Stamina Regeneration Bonus stat per character
		MANAREGENCAP=#		// Max cap for Mana Regeneration Bonus stat per character
	Added new UOX.INI section ([default race bonuses]) with the following new settings for the 3 default playable races (only used if nothing else specified in races.dfn):
		HUMANHEALTHREGENBONUS=0 	// default health regen bonus for human race (2 from ML expansion onwards)
		HUMANSTAMINAREGENBONUS=0 	// default stamina regen bonus for human race
		HUMANMANAREGENBONUS=0 		// default mana regen bonus for human race
		ELFHEALTHREGENBONUS=0 		// default health regen bonus for elf race
		ELFSTAMINAREGENBONUS=0 		// default stamina regen bonus for elf race
		ELFMANAREGENBONUS=0 		// default mana regen bonus for elf race
		GARGOYLEHEALTHREGENBONUS=0 	// default health regen bonus for gargoyle race
		GARGOYLESTAMINAREGENBONUS=0 // default stamina regen bonus for gargoyle race
		GARGOYLEMANAREGENBONUS=0 	// default mana regen bonus for gargoyle race (2 from SA expansion onwards)
	Updated UOX3 Documentation with new feature section on Stat Regeneration with details on stat regeneration rules and recommended settings per UO era
	Added support for Medable armors (have no effect on meditation skill and/or passive regen of mana when worn) and Mage Armors (can turn non-medable armor into medable armor)
		These properties are defined per armor piece using the first and second bits of the MORE property:
			MORE=0x1 0x0 0x0 0x0 // Medable Armor
			MORE=0x0 0x1 0x0 0x0 // Mage Armor
		The following armor types have been marked as medable by default:
			leather armor, leather ninja armor, leather samurai armor, leaf armor, gargish cloth armor, gargish leather armor and all hats and masks
	Updated JS Method .Defense() to support optional fourth and fifth parameters - excludeMedableArmor (true/false) and includeShield (true/false)
	Updated CalfDef function to support including shields in the calculations, and updated mana regen code to include shields when checking for equipped armor
	Updated Meditation skill JS script to exclude medable armor from armor check, include shields, and apply different rules for active meditation depending on mana regen mode
	Updated stat window to include defensive rating of shields (based on Parrying skill) and/or elemental resistances (if enabled in ini)
	Added a new property to CRace class, which is automatically set and incremented as UOX3 loads in races from races.dfn: raceID
	Added new Getters/Setters for CRace class to retrieve ID of a specific Race object
	Updated JS property .id for Race JS Object to return new race ID instead of iterating through list of races to compare race object and return index
	Reloading DFNs now also reloads Races
2025-04-20 06:05:44 +08:00
charles
e2cfe011c6 Stream replacement
This changes all routine calls that wanted a specific type of stream ifstream/ofstream to the generic istream/ostream.  So you can use stringstream, or other derived types.
2023-08-27 21:42:47 -04:00
Xoduz
a48d9ee299 UOX3 0.99.6-RC6
Removed arbitrary and hidden restrictions on refreshing list of online players shown with 'wholist command
Fixed an issue where player ghosts that get teleported would not see themselves get updated to new location
Fixed a server crash from clients disconnecting while running server in debug mode
Improved how container updates are sent to players; now only sends to clients that have actually opened the container, and who are still within range
Added more information about UO data files being loaded during server startup
Enhanced the GM 'add menu to allow clicking directly on images of items/npcs to add them, and adjusted size of menus to accommodate this
Fixed an issue with fleeing NPCs that could cause them to attempt to flee across time and space, regardless of distance to target/attacker in combat
Added NPC AI that runs away from players if they get too close (even outside combat). Applied to hind, rabbits, squirrels, ferrets and various birds by default:
	AI_ANIMAL_SCARED (aitype 12)
Fixed issues with NPCs fleeing forever, or getting stuck in flee/don't flee loop, by introducing max fleeing distance (50 tiles) and cooldown (30 sec) on fleeing
Updated onNameRequest JS Event to include third parameter with origin of name request, so script responses can be tailored appropriately:
	onNameRequest( myObj, requestedBy, requestSource )
		Potential values for requestSource:
			0 - Speech/System Messages
			1 - Guild Menus
			2 - Stat Window (self)
			3 - Stat Window (other)
			4 - Tooltip
			5 - Paperdoll Journal
			6 - Paperdoll
			7 - Single Click / All-Names
			8 - System
			9 - Secure Trade Window
Added Adaptive Performance System (APS) that dynamically adjust how often NPC AI/movement is checked based on overall shard performance. If performance drops below defined threshold, UOX3 gradually slows down checks for NPC AI/movement to prioritize player movement/speech/command responsiveness. If performance climbs back up above threshold, slowdowns are gradually removed. The following UOX.INI options have been added under [system] category to support this system:
	APSPERFTHRESHOLD=50 	// Performance threshold (measured in simulation cycles/sec) below which the APS kicks in
	APSINTERVAL=100 		// How often (in milliseconds) the APS checks performance and makes adjustments (if needed) to balance out shard performance
	APSDELAYSTEP=50 		// How much the delay timer is modified by (in milliseconds) each time APS makes adjustments
	APSDELAYMAXCAP=2000 	// Max amount of of delay APS can introduce for NPC AI/movement handling when attempting to restore shard performance
Added new JS Methods for Region objects:
	.GetOrePrefs( oreType )	// Get ore preference data for ore type found in town region. Returned as an array containing the following data:
		orePrefData -> [
			oreName,	// name of ore
			color,		// color of ore
			minskill,	// min skill to mine ore
			ingotName,	// name of ingot created from ore
			makemenu,	// makemenu entry for crafting something from ingot
			oreChance,	// default global chance of finding this ore type
			scriptID 	// script attached to mined ore
		],
		orePrefChance 	// Chance of finding this ore type in given town region
	.GetOreChance() 	// Get base chance of finding any ore in town region
Moved Mining skill plus gravedigging feature from hard code to scripts (js/skill/mining.js) to make it easier to maintain and/or customize, and removed hard coded variants
Gravedigging now relies on the ore resource system behind the scenes to restrict how often graves in a given area can be dug up
Fixed some incorrect references to .worldNumber Character property in misc scripts (should be .worldnumber)
Made some "hard-scripted" system messages in misc scripts use dictionary system instead
Added spawn region for banker NPCs in Serpent's Hold (dfndata/spawn/felucca/spawn_town_serpents_hold.dfn, dfndata/spawn/trammel/spawn_town_serpents_hold.dfn)
Fixed region definition of Ocllo to actually cover the entire town (dfndata/regions/regions.dfn)
Added numerous additional locations accessible with 'goplace # command, for key locations in Ilshenar, Malas, Tokuno Islands and Ter Mur (dfndata/location/location.dfn)
Revised travel-menu portion of GM menu (shortcut: 'travel) to include more travel options based on new locations (dfndata/items/travelmenu.dfn and travelmenu.bulk.dfn)
Fixed an issue where NPCs could attempt to attack targets in other worlds/instances
Added new JS Event that triggers for characters who are about to deal damage in combat. Complimentary to onDamage, which triggers for chars receiving damage:
	onDamageDeal( dmgDealer, dmgReceiver, damageValue, damageType )
Added new JS Event that can trigger in global script upon creation of new player chars. Note that this will trigger in place of onCreateDFN event for player characters:
	onCreatePlayer( pChar )
Added new JS Event that triggers for characters selecting a target with a spell. Complimentary to onSpellTarget, which triggers for targets selected with a spell:
	onSpellTargetSelect( caster, target, spellNum )
Updated onCombatStart and onCombatEnd JS Events to also trigger for the other party in combat
Updated onPickup JS Event to include a third parameter - the potential container item was picked up from. Event now also triggers event in scripts attached to said containers:
	onPickup( iPickedUp, pChar, iCont )
Added tracking of total playtime per individual character, and per account across all characters, and exposed these properties to JS engine:
	.totalPlayTime		// Account property, total playtime across all chars
	.playTime 			// Character property, total playtime on given character only
Added new player-accessible command ('playtime) to spit out the playtime of current character/account as a whole (js/commands/playtime.js)
Implemented first version of Young Player System:
	Replaced the UNUSED9 account flag with YOUNG, to be used by Young/New Player System
	Added new JS Account property that gets/sets whether player account is considered Young:
		.isYoung
	Added new Char timers:
		TIMER_YOUNGHEAL		// Restricts how often Young players are healed by NPC healers
		TIMER_YOUNGMESSAGE	// Restricts how often Young players are warned about dangerous looking monsters in overworld
	Updated GM commands 'get and 'set to get/set .isYoung property of player's account (js/commands/targeting/get.js and set.js)
	Added new UOX.INI setting to enable/disable Young Player System (enabled by default):
		YOUNGPLAYERSYSTEM=1
	If Young Player System is enabled, all newly created player accounts are automatically marked with Young flag
	Added new script to handle various restrictions and functions related to Young characters (js/player/young_player.js):
		Young characters will have [Young] displayed over their head
		Young characters will have their Young status checked and verified on every login + every stat/skill gain, to revoke the Young status if any of the following is true:
			Account has a total playtime of more than 40 hours
			Any character has more than 350 total (base) skill points
			Any character has more than 70 skill points in a single skill
			Any character has more than 150 total stat points
			Any character has more than 80 stat points in a single stat
		Young characters can renounce their Young status manually by saying the words "I renounce my young player status"
		Young characters get two additional items upon creation:
			a new player ticket (can be combined with any other players new player ticket for both players to get a reward)
			a sextant (shows Young players directions to nearest moongate/bank regardless of where they are, as long as outdoors)
		Young characters cannot target other player characters with hostile spells or skills
		Young characters cannot be the target of other player characters' hostile spells or skills
		Young characters can only cast beneficial spells upon themselves or other Young characters
		Young characters can only be the target of beneficial spells from other Young players
		Young players (and their pets/followers) cannot attack or harm any other players (or their pets/followers), nor themselves be attacked or harmed by any other players (or their pets/followers), whether from combat, spells, skills or items
		Young players don't lose any of their items on death, and are teleported to the nearest healer upon death with all their items intact
		Young players receive a warning upon entering dungeons that monsters there will be hostile
	Updated global script (js/server/global.js) to:
		Check/Verify Young status of players upon login
		Attach young player script on login/creation for players on Young accounts
		Give specific items to Young players upon creation
	Added new script (js/item/corpse.js) that is assigned to all freshly created corpses. This script handles restrictions related to Young players interactions with corpses, and the interactions of other players with corpses of Young players
	Updated JS Method .Carve() to return true/false depending on whether carving a corpse was successful
	Updated Healer AI in code to heal nearby injured Young players
	Updated Evil AI and Evil Caster AI in code to avoid selecting Young players as targets in combat outside of dungeons
	Added a new section to UOX.INI - [young player starting locations] - that can be used to define starting locations for Young players. If only one such location is provided, all players start there. Otherwise, it matches the same starting location setup as the regular one - with one entry per town in Britannia.
	Restricted transferring and/or friending of pets (code) and hirelings (hirelings.js) between Young and non-Young players
	Restricted Young players from recalling or gating to Felucca facet
	Young players can instantly logout from anywhere, at any time
2023-07-01 20:02:40 +08:00
Xoduz
6a8c09bb15 Thief Revamp - 0.99.6-RC5
Added script for NPC guildmasters (js/npc/ai/guildmaster.js). Only one NPC guild has been setup in the script so far (more can be easily added) - the Thieves Guild - which if joined grants players the ability to steal from other players and to buy disguise kits
Added two new NPCs, which there will now spawn one of in a random location in each city in Britannia (felucca facet):
	m_thief_guildmaster (dfndata/npc/male_human.dfn)
	f_thief_guildmaster (dfndata/npc/female_Human.dfn)
Added two new character properties to keep track of which NPC guild a player (or NPC) belongs to. These properties have been exposed as the following Character JS properties:
	.npcGuild 		// ID of NPC guild, as defined in script
	.npcGuildJoined // Timestamp for when player joined NPC guild
Added script for Disguise Kits (js/item/disguisekit.js). These allow members of the Thieves Guild to disguise themselves from the prying eyes of other players.
Added two new character properties:
	.isDisguised 	// true/false flag for character being disguised
	.origName 		// used to store character's original name before disguise went into effect
Moved implementation of Stealing skill from code to script (js/skill/stealing.js) and revamped it completely in the process. Changes include:
	New features:
		Town rare stealing - any item marked as "special stealable" with new item property .stealable can be stolen, even if it's locked down by a GM on the ground, or inside a container
		When stealing from item piles, thief can potentially steal the amount of items that makes up the max weight limit for what they can steal, from those piles
		Chance to successfully steal is now affected by whether there are any characters (NPCs or Players) that witness the attempt. Depends on distance to character, and direction character is facing
		Players now become "permagrey" when successfully stealing from another player, regardless of whether it's witnessed
		Players now receive a "stealing" flag when stealing from another player, regardless of whether it's witnessed
		Stolen items cannot be removed from thief's backpack for 30 seconds following the theft of the item (AoS core shard era and above)
		Optional AoS feature to steal special consumable items from monsters
	Updated default stealing rules:
		Updated calculations to determine chance of success when stealing
		Players cannot steal while engaged in combat
		Players are revealed if hidden as soon as they use the stealing skill
		Players can no longer steal items in the secure trade window
		Players can no longer steal items from NPC shopkeepers
		Both hands must be free to steal
		Stealing now checks line of sight to target player/object
		Only members of Thieves Guild (NPC guild) can now steal from other players, unless they are guild enemies
		Players can no longer steal from NPC guards by default
		Players can no longer steal from the same NPC monster more than once
		Only gold and gems can be stolen from innocent players in dungeon/ll areas of Felucca, if core shard era is set to AoS or higher
		Players can no longer steal items held on cursor by other players
		Orcish masks now eplode if player steals from orcs while wearing it
		If core shard era is set to LBR or lower, player is marked as an aggressor if they steal from another player
		Guards can only be called on players that are flagged as criminals within the first 10 seconds of them being flagged
	Stealing script options:
		Allow stealing entire containers (off by default pre-AoS)
		Return stolen items on thief death (off by default)
		Temporarily make stolen items immovable in thief's backpack (on by default post-AoS)
		Temporarily protect traded items (on by default)
		Let dexterity affect chance for successful theft (off by default)
		Let light level affect chance for successful theft (off by default)
		Allow stealing from NPC Guards (off by default)
		Allow stealing special loot from monsters (on by default post-ml)
Moved implementation of Snooping skill from code to script (js/skill/snooping.js), with some changes:
	Players cannot snoop pack animals from inside a house, if the animal is outside
	The deeper inside main backpack a container sits, the harder it becomes to snoop inside it
	Included an optional feature that lets targets of snooping gradually become more aware, increasing the difficulty of succeeding. This awareness fades over time.
	Players have a chance to stay hidden while snooping, based on their Hiding skill
	Karma is now lowered by snooping regardless of success or failure
Added tracking system for "aggressors" in combat. A player attacking someone (regardless of flag status) will be marked as aggressor to that someone for 2 minutes
Added tracking system for "permagrey" flags - these are stored on a per-target basis, so a player can be flagged visibly as permagrey to multiple other players. Persists until player dies.
Player combat targets and war mode are now cleared on logout
Players will now be unable to hide if within visual distance and in line of sight of their attacker or current target in combat
Server leave-announcement now only happens after the logout timer has expired, instead of the exact moment the player presses the logout button
Fixed an issue that could cause swimming NPCs to swim on land
NPCs now have the ability to temporarily ignore unreachable targets in combat. If attacked by someone they are ignoring, they will enter evade state and try to move away from that someone.
SpawnRegions now support NPCLISTS with weighted entries. Example of an NPCLIST with 75% chance of spawning some kind of orc, and 25% chance of spawning a ratman archer:
	[NPCLIST example]
	{
	75|NPCLIST=allorc
	25|ratman
	}
Added 3 additional "all purpose" item properties (.more0, .more1 and .more2) and exposed those to JS engine. These work the same as more/morex/morey/morez
Mark spell now stores a 4th property on recall runes - instanceID. This is stored in the rune's .more0 property.
Recall and Gate spells now check the recall rune (or runebook)'s 4th location property - instanceID - to determine where the player ends up
Fixed a server crash related to equipment being automatically unequipped if character is no longer strong enough to have it equipped
Added new JS Function to check if any characters at specified location potentially block movement:
	DoesCharacterBlock( x, y, z, worldNum, instanceID )	// returns true if a character exists at given coordinate (within z +/- 4)
2023-06-20 02:21:16 +08:00
Xoduz
fa2aae242e UOX3 0.99.6-RC4
Fixed an issue that prevented onBuyFromVendor() and onBoughtFromVendor() JS Events from triggering when attached to NPC shopkeepers
Fixed an issue with help gump that prevented password management section from working as intended (js/server/misc/helpgump.js)
Fixed an issue where UOX3 would fail to load pre-HS multi.mul files
Added chess board to Misc->Games add menu (dfndata/items/ItemMenu.bulk.dfn)
Fixed an issue with 'move (alias for 'telestuff) command that referenced the wrong variable name (js/commands/targeting/tele.js)
When a player is teleported via the GM 'wholist menu, any pets within range are now also brought along for the ride
Consolidated error-reporting for JS Functions, Object Methods and Object Properties to provide more context (scriptID, filename, line number) when something goes wrong
Added some missing shield IDs (0xA649, 0xA64A, 0xA831, 0xA832) to IsShieldType() function
MAXRANGE item property previously only worked for ranged weapons; now it works for melee weapons too, and potentially allows melee weapons with combat range longer than 1 tile
MAXRANGE item property can now be used to define max combat range for melee weapons
Fixed an issue (non-critical) with .PlaceInPack() JS Method that would cause UOX3 to try adding items marked for deletion to refreshQueue and spam console with errors
Added missing AI scripts to summoned Blade Spirits and Energy Vortexes (dfndata/npc/magicsummon.dfn)
Fixed an issue with weight calculation for hireling backpacks (js/npc/ai/hireling.js)
Fixed an issue with the 'fix command, which would in most cases set character's Z to -1 regardless of location, but now adheres to map elevation instead
Fixed an issue with Pack AI (js/npc/ai/pack_ai.js) that prevented pack members from attacking target correctly (thanks Dragon Slayer)
Fixed an issue with DoesMapBlock JS Function that incorrectly checked for 6 function arguments, when it actually requires 8
Fixed an issue with DoesDynamicBlock JS Function that incorrectly checked for 8 function arguments, when it actually requires 9
Fixed an issue with runebook script (js/item/runebook.js) that prevented players from being able to use recall charges without having spellbook with spell in inventory
Fixed issues with placement of tall items on ground/floor, and with stacking of items in houses
Fixed incorrect alias for woodland armor (dfndata/items/gear/armor/other/armor/wood.dfn - thanks Dragon Slayer)
Fixed a critical issue with script context sometimes changing while executing a script, because of events in other scripts being triggered. Affected scripts can be safeguarded against this by the addition of a dummy callback function anywhere in the script: function _restorecontext_() {}
Fixed an issue with non-animal pets not gaining loyalty when being fed (thanks Dragon Slayer)
Added new JS Object Methods for Chars/Items/Multis to fetch list of custom tags associated with object:
	.GetTagMap()		// Gets list of persistent custom tags associated with object
	.GetTempTagMap()	// Gets list of temporary custom tags associated with object
Added new JS commands ('GETTAGMAP and 'GETTEMPTAGMAP) that spits out details of custom tags associated with targeted object (js/commands/custom/misc-cmd.js)
Added new JS command ('USEITEM) that acts as a short-cut for double-clicking on targeted item (js/commands/custom/misc-cmd.js)
Updated 'ADD # and 'ADD ITEM # JS commands to support targeting a container directly and adding the new item inside (js/commands/targeting/add.js)
Updated axe script to only perform lumberjacking skill-check when there's still wood available in a given area, and to play appropriate animations for Gargoyle players (js/item/axe.js)
Updated script for gameboards to make generated pieces newbiefied so they won't appear on ground if board decays (js/item/gameboards.js)
Updated script for stablemasters to avoid relying on global variables (js/npc/ai/stablemaster.js)
Updated names of items crafted with runic hammers to include the material name of the hammers used to craft them (js/skill/craft/crafting_complete.js)
Fixed a small issue with Detect Hidden skill that would return the wrong message if players found anyone hiding nearby (js/skill/detecthidden.js)
Fixed an issue that prevented tile overrides in dfndata/maps/tiles.dfn from loading properly
Added entries for a couple of walls with missing no-shoot flags to tile overrides in dfndata/maps/tiles.dfn
Updated JS Method .SoundEffect() to support optional third argument (creatureSoundNum) to play creature-defined sounds from dfndata/creatures/creatures.dfn. New syntax:
	.SoundEffect( soundID, allHear[, creatureSoundNum] ) // 0=SOUND_STARTATTACK, 1=SOUND_IDLE, 2=SOUND_ATTACK, 3=SOUND_DEFEND, 4=SOUND_DIE
Added new Character JS Methods:
	.SetRandomName( nameListID ) 	// apply a random name from specified namelist to character
	.FindItemSection( sectionID ) 	// find item in player's backpack with specified sectionID
Added new Socket JS Method:
	.OpenContainer()	// Opens specified container for socket
2023-05-30 01:47:26 +08:00
Lloyd Dilley
64a71580d8
More cast, construct, and spacing fixes 2022-11-14 21:12:12 -05:00
Lloyd Dilley
dd873888bb
Fix more compile warnings 2022-11-04 17:12:13 -04:00
Lloyd Dilley
285f06dbd2
Fix compile warnings 2022-11-04 00:52:37 -04:00
Xoduz
0ce39a3410 Couple of small fixes
Fixed an issue with onDyeTarget event where the dyetub and target object parameters were not set properly
Fixed some incorrect casting animation-related variable assignments for AI_HEALER and AI_EVIL_HEALER
Fixed an issue with pets not going wild from lack of loyalty to their owners when at zero loyalty
Addressed issues with idle/fidget animation setup that could cause NPCs to blink out of existence
Removed stray semicolon behind control statement related to triggering of OnFacetChange JS event
Fixed an issue with Bless spell when cast from item
Some minor code cleanup
2022-10-27 00:54:41 +08:00
Xoduz
37a76083de Rest of the changes for 0.99.6-RC1
Misc cleanup and standardization of style and naming conventions in code and scripts
Added missing code for showing race in paperdoll based on ini setting
Players can no longer use Polymorph spell while incognitoed, or while under effect of tribal paint
Players can no longer use Incognito spell while polymorphed, or while under the effects of tribal paint
Facial hair is now removed from players who are under the effects of Incognito spell that changes their gender for female
2022-10-24 18:39:33 +08:00
Xoduz
640ec87362 Misc era-specific INI and combat changes, and other settings-related changes
Added new INI settings:
	SHOWRACEWITHNAME=1 				// If enabled, shows a character's race along with their name. Defaults to 1
	SHOWITEMRESISTSTATS=0/1 		// If enabled, shows item resistance stats in item tooltip. Defaults to 0
	SHOWWEAPONDAMAGETYPES=1/0 		// If enabled, shows weapon damage types in item tooltip. Defaults to 1
	CASTSPELLSWHILEMOVING=0/1 		// If enabled, players can cast spells while moving, without having to stop
	SHOWREPUTATIONTITLEINTOOLTIP=1/0 // If enabled, shows player's reputation title in tooltip. Defaults to 1
	SHOWGUILDINFOINTOOLTIP=1/0 		// If enabled, shows player's guild info in tooltip. Defaults to 1
Renamed 0xf1_connectUOServerPoll.js to 0xf1_freeshardServerPoll.js, and updated script to respond to the "standard" freeshard server poll request rather than the more specific (and now dead) ConnectUO one.
Renamed INI setting CUOENABLED to FREESHARDSERVERPOLL
Renamed INI setting CUOENABLED to FREESHARDSERVERPOLL
Added new INI settings under [expansion settings] section to help shard admins customize some key behaviours of their shard, based on their preferred "era" of UO. Note that a value of "core" means the setting inherits the chosen era from the CORESHARDERA setting:
		CORESHARDERA=pub15
			Defines the "core" era of the shard. Defaults to pub15 (Publish 15).
				any 				- determines which Item/NPC DFNs gets loaded, based on tags like GETT2A, GETPUB15
				uor or later 		- enables bonus hit chance for archery via ARCHERYHITBONUS setting
				pub15 or earlier	- final combat damage value reduced by half
		ARMORCALCULATION=core
			Defines era to base armor calculations on
				pub15 or earlier 	- different armor pieces contribute different percentage of the total Armor Rating
				aos or later 		- each armor piece contribute to sum total of Physical Resistance, and other elemental resistance stats
		STRENGTHDAMAGEBONUS=core
			Defines era to base strength damage bonus on
				uor or earlier 		- 20% damage bonus based on strength, capped at 200 strength
				td or later 		- 35% damage bonus based on strength if 100 strength or more, otherwise 30% damage bonus
		TACTICSDAMAGEBONUS=core
			Defines era to base tactics damage bonus on
				pub15 or earlier 	- bonus = Tactics skill + 50
				aos or later 		- 68.75% damage bonus if GM Tactics, 62.5% bonus if below
		ANATOMYDAMAGEBONUS=core
			Defines era to base anatomy damage bonus on
				uor or earlier 		- bonus = Anatomy / 5 vs NPCs, Anatomy / 2.5 vs Players
				td or later 		- 30% damage bonus at GM anatomy, up to 20% below GM
				ml or later 		- 50% + 5 damage bonus at GM anatomy, up to 50% below GM
		LUMBERJACKDAMAGEBONUS=core
			Defines era to base lumberjacking damage bonus on
				uor or earlier 		- 35% damage bonus at GM skill, up to 25% below GM
				td or later 		- 30% damage bonus at GM skill, up to 20% below GM
				hs or later 		- 10% chance of 100% damage bonus
		RACIALDAMAGEBONUS=core
			Defines era to base racial damage bonus on
				sa or later 		- Gargoyles gain +15% damage bonus per each 20 HP lost
		DAMAGEBONUSCAP=core
			Defines era to base damage bonus cap on
				pub15 or earlier 	- No cap on damage bonus multiplier
				aos or later 		- Total damage bonus multiplier capped at 300% higher than base damage
		SHIELDPARRY=core
			Defines era to base shield parry calculations on
				t2a 				- chance to block is parryskill / 2. shield absorbs damage equivalent of AR/2 for melee, or equivalent of AR for archery
				uor to pub15 		- higher AR equals lower block chance, but more damage absorbed.
				aos or later 		- chance to block dependent on parry skill vs bushido skill, with dex modifier
		WEAPONPARRY=core
			Defines era to base weapon parry calculations on
				aos or later 		- chance to parry with weapon based on parry skill and bushido skill, with a dex modifier, 16.6% chance weapon will take damage from parrying
				ml or later 		- chance to parry with weapon based on parry skill and bushido skill, with a dex modifier, 5% chance weapon will take damage from parrying, or 75% if opponent has mace
		WRESTLINGPARRY=core
			Defines era to base wrestling parry calculations on
				tol or later 		- From 12.5% chance (at GM wrestling, increases with higher skill) that an NPC will parry an attack
		COMBATHITCHANCE=core
			Defines era to base combat hit chance calculations on
				t2a to pub15 		- hit chance based on attacker's skill vs defender's skill. No minimum chance to hit
				uor to pub15 		- Additional bonus hit chance for archery
				aos to tol 			- hit chance based on attacker's skill (and hit chance increase) vs defender's skill (and defense chance increase). Minimum 2% chance to hit
	Supported era values:
		t2a, uor, td, lbr, pub15, aos, se, ml, sa, hs, tol and core (inherits era defined in CORESHARDERA)
Added (optional) new Item/NPC DFN tags to help determine which variants of Items/NPCs to load from DFNs, based on chosen era in CORESHARDERA setting:
	GETT2A=<sectionID>		// Inherit DFN section if core shard era is The Second Age
	GETTD=<sectionID>		// Inherit DFN section if core shard era is Third Dawn
	GETUOR=<sectionID>		// Inherit DFN section if core shard era is UO Renaissance
	GETLBR=<sectionID>		// Inherit DFN section if core shard era is Lord Blackthorn's Revenge
	GETPUB15=<sectionID>	// Inherit DFN section if core shard era is Pub15
	GETAOS=<sectionID>		// Inherit DFN section if core shard era is Age of Shadows
	GETSE=<sectionID>		// Inherit DFN section if core shard era is Samurai Empire
	GETML=<sectionID>		// Inherit DFN section if core shard era is Mondain's Legacy
	GETSA=<sectionID>		// Inherit DFN section if core shard era is Stygian Abyss
	GETTOL=<sectionID>		// Inherit DFN section if core shard era is Time of Legends
2022-10-20 13:12:47 +08:00
Xoduz
68e57b0756 UOX3 0.99.5b-6
Increased world load speed by almost 20% by reducing how often loading progress is written to the console
Increased world save speed by almost 50% through the use of binary mode and buffer tweaks for ofstream combined with a cached newline char and std::to_string instead of static_cast
Fixed a server crash involving killing NPCs of a specific spawn region using the 'spawnkill # command
Fixed a server crash involving moving items from decaying corpses to the ground
Fixed a server crash involving carving up human corpses
Fixed a server crash related to AreaCharacterFunction JS function, which could trigger for any script that potentially kills any NPC this function iterates over (like explosion potions)
Fixed a server crash related to GMs attempting to add items from add-menu while having no backpack
Fixed a client crash issue caused by attempting to sell house deeds back to architect NPCs
Fixed an issue where players would get incorrect amounts of gold for selling house deeds back to architect NPCs
Fixed an issue with characters dying onboard boats which prevented players from packing up the boats later
Added new item property in code (via bools bitset) that can be used to enable/disable maker's mark on crafted items. This property can be set to true for items crafted at exceptional quality by GM craftsmen
Exposed the new item property to JS engine:
	.isMarkedByMaker	 	// If true, maker's mark will be displayed
Updated default item tooltip to display " of exceptional quality" for items crafted with exceptional quality
Updated default item tooltip to display "[Crafted] by [Crafter's Name]" for exceptional quality items crafted by GM craftsmen. The [Crafted] text comes from the MADEWORD defined in dfndata/skills/skills.dfn for the primary skill used to craft the item
Updated old-school single-click names for items (when AoS bit is disabled in client/server features) to display exceptional status and/or maker's mark for appropriate items
Fixed an issue with the display of titles for NPCs that used dictionary lookups for their title
Added new UOX.INI settings under the [settings] section:
	DISPLAYMAKERSMARK=1/0			// Controls if maker's marks on crafted items are shown on a global level
	SHOWNPCTITLESOVERHEAD=1/0 		// Controls whether NPC titles are shown over their heads
	SHOWINVULNERABLETAGOVERHEAD=0/1 // Controls whether invulnerable tags are shown overhead
	GLOBALRESTOCKMULTIPLIER=1.0 	// Global multiplier applied to RESTOCK property of items when loaded from DFNs
Added new UOX.INI settings under the [combat] section:
	PETCOMBATTRAINING=1/0 			// Controls whether pets can gain skills/stats from combat
	HIRELINGCOMBATTRAINING=1/0 		// Controls whether hirelings can gain skills/stats from combat
	NPCCOMBATTRAINING=0/1 			// Controls whether NPCs in general can gain skills/stats from combat
Fixed an issue where a player meeting the exact minimum requirements for crafting an item would always fail
Fixed a bug with teleporting off boats to valid nearby locations when double-clicking boat planks while standing on it
Updated behaviour of planks on boats:
	Boat key can unlock plank, but won't automatically open it
	Boat key used on an open, unlocked plank will lock and automatically close the plank
	Boat key used on an open, locked plank will unlock the plank and leave it open
	Player using an unlocked plank now opens it
	Player using an open plank will disembark (if onboard) or embark (if not) the boat
	Player can always open a locked plank if they're on the boat, even with no key, to allow disembarking the boat.
	Planks that are open, but locked cannot be accessed from outside the boat, and will close automatically after five of seconds
Updated behaviour of Magic Lock/Unlock spells:
	Magic Lock cannot be used on objects inside a multi
	Magic Lock applies difficulty to lock based on caster's Magery skill
	Magic Lock effect will last between 7 to 50 seconds (depending on caster's Magery skill)
	Any object that can be locked via Magic Lock spell can also be unlocked via Magic Unlock spell, if caster has high enough Magery skill
Fixed a bug where certain JS Functions, Methods and Properties would occasionally pass incorrect values to scripts that called upon them. Scripts that rely on the GetCurrentClock() Function, the .GetTimer() Method, .decayTime, .logTime, .oreTime and .fishTime Properties might need to be updated to account for the fix, which causes larger values to be passed in than before.
Fixed a bug related to GetCurrentClock() that caused decay and respawning of dungeon chests from working properly
Fixed a bug related to GetCurrentClock() and .logTime/.fishTime that prevented consumption and regeneration of log/fish resources from working properly
Added a new JS Function:
	GetStartTime()	// Returns a timestamp for when server started up
Fixed a bug related to GetCurrentClock() where server uptime stats in help menu was showing up incorrectly
Fixed a bug related to GetCurrentClock() and purging of registrations of visitors in public houses so their visits can be counted again later
Fixed a bug related to GetCurrentClock() that caused monster speech to not work properly
Fixed a Z-related issue that sometimes prevented players from fishing when standing on the shoreline next to the sea
Fixed an issue with Animal Lore skill that would always return a pet's loyalty level as "Wild"
Increased max range pets can be from their owner in order to still be included in moongate/teleporter travel from 12 to 24 tiles
Fixed an issue where the alchemy bonus damage for explosion potions was off by an order of magnitude
Fixed an issue where food IDs from foodlists referenced by other foodlists was not detected as valid food for tamed pets or NPCs
Fixed an issue where Alchemy crafting skill did not properly check for the existence of the crafting tool before proceeding with the crafting process
Fixed an issue that prevented the Teleport spell from working as intended
Fixed an issue where players would still get 1 gold even if STARTGOLD in uox.ini was set to 0
Fixed an issue with mount restrictions script that prevented players from mounting Unicorns, Ki-rins and Cu Sidhes
Fixed an issue where aggressive creatures wouldn't stop attacking player after being tamed (js/skill/taming.js)
Added a system message to inform the player when they've dropped out of stealth due to taking too many steps
Fixed an issue where hunger level of NPCs instantly dropped upon spawning because hunger timer was not active yet
Fixed a bug where character corpses would appear with a [unidentified] tag attached
Fixed an issue where the [unidentified] tag did not show up for unidentified magic items
Added ANIMAL tag to a small bunch of creature definitions (dfndata/creatures/creatures.dfn)
Fixed an issue with Bowcraft skill where player could not gain enough skill from crafting bows to reach min requirement for crossbows, and similiarly could not reach min requirement for heavy crossbows from crossbows
Updated default value of MURDERDECAYTIMER INI setting from 60 seconds to 28800 seconds (8 hours), to match the amount of time it would take for one (short term) murder count to decay on LBR-era OSI shards.
2022-08-25 02:13:00 +08:00
Xoduz
0941aff27f Misc fixes
Wrapped some debug messages related to sockets in debug defines
Adjusted fix for mining to be more flexible with name of tiles
Fixed an issue that caused double saves on shutdown, with second shutdown wiping out some objects because they'd already been unloaded from system after first save
2022-07-05 01:10:41 +08:00
Charles Kerr
4c8bcdaed1 Cleaned up removal of CPacketStream 2022-06-17 12:54:40 -04:00
Charles Kerr
9d1a21c54a General cleanup 2022-06-08 10:38:16 -04:00
Charles Kerr
d540835eb4 2022 project filters, and name change for strutil 2022-03-04 07:35:46 -05:00
Xoduz
bf65be1c6e Updates to network logging
Updated UOX.INI setting NETWORKLOG to actually control logging of network traffic for all connected clients, without needing each socket to have logging enabled via the manual console command 'Z'. This console command can still be used, however, to override a disabled INI setting and enable network traffic logging for connected clients.
Updated 'get and 'set commands to support getting/setting a range of socket properties for a targeted (online) player:
	tempInt 			// int (temporary value)
	tempInt2 			// int (temporary value)
	xText 				// string (temporary string)
	clickX 				// int (x coordinate of where player clicked with targeting cursor)
	clickY 				// int (y coordinate of where player clicked with targeting cursor)
	clickZ 				// int (z coordinate of where player clicked with targeting cursor)
	walkSequence 		// int (movement sequence number, between 0 and 255)
	currentSpellType 	// int (current spell being cast by a player)
	logging 			// bool (enable to override disabled NETWORKLOG setting)
	pickupX 			// int (x coordinate of where player picked up an item from)
	pickupY 			// int (y coordinate of where player picked up an item from)
	pickupZ 			// int (z coordinate of where player picked up an item from)
	pickupSpot 			// int (0 = nowhere, 1 = ground, 2 = ownpack, 3 = otherpack, 4 = paperdoll, 5 = bank)
	language 			// string (language code)
Fixed an issue where CUSTOMINTTAG in NPC DFNs would not get read properly, but would instead print an (incorrect) warning about how the tag was formatted
2022-03-01 00:18:59 +08:00
Xoduz
a5d4b008b1 Minor update
Fixed a server crash caused by a couple of items in "stone walls 4" section of add-menu that were missing their ID in ItemMenu.bulk.dfn (thanks, Humility)
Fixed an issue where items added to house (multi) definition would not be attached to the house if their coordinates were not within the boundaries of the house. This prevented the usage of house foundation multis with custom stairs, for instance.
2022-02-26 17:02:32 +08:00
Charles Kerr
1fe8f648b0 Error checking for socket sends 2022-02-25 21:16:32 -05:00
Charles Kerr
5c13a51f39 added parenthesis on some simple logical and/or to make clear precedence (and eliminate warnings)
replace int with auto for some results to prevent size casting, across the different platforms (and eliminate warnings).
2022-01-18 12:24:18 -05:00
Xoduz
cb39506820 Addition of client network budgets, minor fixes
Added new system that lets shard admins assign a "network" budget to connected clients, which determines the maximum amount of bytes clients are allowed to send to/receive from server over a period of ten seconds. If a client exceeds these limits three times in the same connected session, they'll receive a temporary ban and get kicked from the server. The following new UOX.INI settings under the [system] section can be used to control this feature:
	MAXCLIENTBYTESIN=25000		// Max bytes client can send to server over 10 seconds
	MAXCLIENTBYTESOUT=100000 	// Max bytes client can receive from server over 10 seconds
	NETTRAFFICTIMEBAN=30 		// Duration (in minutes) of temporary ban for exceeding these limits
Fixed an issue that prevented GMs from using CSTATS and TWEAK buttons in 'wholist
Updated documentation with most recent changes to UOX.INI settings
Minor code cleanup
2021-09-24 08:11:57 +08:00
Xoduz
69a8c090cd 0.99.4x
Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color
Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange
Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items.
Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now
Exposed Item property to JS engine, which contains serial of the creator of an item:
	.creator 	// contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip
Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions.
Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc.
	onTooltip( myObj ) 		// Triggers for objects right before the object's tooltip properties are sent to client
Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients
Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again
Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version
Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion.
	Examples:
		exceedingly accurate war hammer of vanquishing
		substantial, accurate axe of power and Daemon's Breath
		silver long sword
		massive platemail arms of Protection
		metal shield of defense
		durable ringmail tunic of guarding
	All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them!
	Related scripts:
		js/item/magic_armor_equipeffects.js
		js/item/magic_weapon_accbonus.js
		js/item/magic_weapon_equip.js
		js/item/magic_weapon_spell_attack.js
	The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated.
A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents!
Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided
Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash
Added additional object properties to 'get and 'set commands:
	.shouldSave 		// Determines if an item should be saved in worldfiles or not
	.baseRange 			// Determines the base range of a ranged weapon, less than which it becomes less effective
	.maxRange 			// Determines the max range of a ranged weapon, beyond which it cannot reach its target
The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked!
	STATSAFFECTSKILLCHECKS=0/1 	// If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn
Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc)
Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax:
	.Damage( amount )
	.Damage( amount, damageType )
	.Damage( amount, damageType, attacker )
	.Damage( amount, damageType, attacker, doRepsys )
	Supported damageTypes:
		PHYSICAL 	= 1
		LIGHT 		= 2
		RAIN 		= 3
		COLD 		= 4
		HEAT 		= 5
		LIGHTNING 	= 6 // magic damage
		POISON 		= 7
		SNOW 		= 8
Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax:
	onDamage( damaged, attacker, damageValue, damageType )
Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script
Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected.
Added new Character JS property to get/set state of a character's permanent magic reflect ability:
	.permanentMagicReflect 		// 0 = disable, 1 = enable
Added special abilities/effects for the following NPCs:
	Acid Elementals now have a chance to damage the melee weapons of their attackers
	Dull Copper Elementals now explode on death
	Shadow Iron Elemental is immune to targeted spell damage
	Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker
	Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds
	Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker
	Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds
	Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds
	Phoenixes deal passive area damage to nearby players every 5 to 10 seconds
	Pixies have a chance to cast a random spell upon receiving a death blow:
		Bless (target)
		Curse (target)
		Explosion (target)
		Greater Poison (target)
		Greater Heal (self, prevents death)
	Ethereal Warriors will now resurrect dead players with positive karma
	Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit
	Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health:
		Hell Cat, 5 to 8 dmg at max health
		Fire Steed, 6 to 9 dmg at max health
		Hell Hounds, 8 to 11 dmg at max health
		Lava Lizard, 8 to 11 dmg at max health
		Predator Hell Cat, 9 to 14 dmg at max health
		Sea Serpent, 11 to 17 dmg at max health
		Swamp Dragon, 15 to 22 dmg at max health
		Armored Swamp Dragon, 15 to 22 dmg at max health
		Fire Gargoyle, 20 to 30 dmg at max health
		Deep Sea Serpent, 21 to 32 dmg at max health
		Serpentine Dragon, 22 to 32 dmg at max health
		Drake (Gray), 22 to 32 dmg at max health
		Drake (Red), 22 to 32 dmg at max health
		Nightmare, 26 to 39 dmg at max health
		Dark Steed, 26 to 39 dmg at max health
		Silver Steed, 26 to 39 dmg at max health
		Kraken, 39 to 59 dmg at max health
		Dragon (Red), 41 to 62 dmg at max health
		Dragon (Gray), 41 to 62 dmg at max health
		Shadow Wyrm, 50 to 75 dmg at max health
		Reptalon, 51 to 77 dmg at max health
		Skeletal Dragon, 52 to 77 dmg at max health
		Ancient Wyrm, 60 to 90 dmg at max health
Update stats, skills and loot for all currently implemented NPCs
Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3
Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer)
Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early
Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked:
	ARCHERYHITBONUS=10 	// Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10%
Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting:
	ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s
Fixed a bug where players who never entered combat mode could fire ranged weapons while moving
Updated Add-menu with some improvements for usability:
	Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs
	Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options:
		Option to add chosen item at specific location instead of in GM's backpack
		Option to add chosen item repeatedly until cancelled
		Option to automatically reopen Add-menu on last menu that was open when a selection is made
		Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default)
		Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default)
	Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on
Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax:
	.SysMessage( "Text" ) 									// Display "Text" to user as a system message with default system message color from ini
	.SysMessage( "Text %s %s", txtArg1, txtArg2 ) 			// Display "Text" to player with string arguments injected into text
	.SysMessage( txtColor, "Text" ) 						// Display "Text" to user with a specified color
	.SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments
Fixed a bug where hair/beard items could show up inside corpses
Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up
Fixed a bug where players would be unable to pick up a freely movable item from a locked down container
Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages
Added support for new Dictionary language:
	dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0)
Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js)
Added modification of some creatures stats after they've been tamed (js/skill/taming.js)
Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe)
Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem
Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players):
	.GetTempTag( "tagName" )
	.SetTempTag( "tagName", tagValue )
When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match
Fixed a server crash caused by empty speech messages sent from certain clients
Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly
Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal)
The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply:
	If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell)
	If caster's combined skill is higher than 70.2, poison strength equals Greater Poison
	If caster's combined skill is higher than 30.2, poison strength equals Normal Poison
	If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison
	If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level
Fixed an issue that would would let players move faster than they should have been allowed to
Fixed misc issues with Party System:
	Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range
	Players who get disconnected or relog should now find themselves back in the same party they were in previously
	Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging)
World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
Xoduz
557df33fff Fixed an bug that caused segmentation fault on Linux, related to item tooltips and socket language
Fixed an bug that caused segmentation fault on Linux, related to item tooltips and socket language
2021-08-08 02:35:43 +08:00
Xoduz
82a3ef5386 08/08/2021 - Xuri (0.99.4w)
Added support for new Skills DFN tag:
	SKILLDELAY=# 	// Delay in seconds before another skill can be used after using this skill. Overrides global delay from UOX.INI
Updated skill cSkills::SkillUse() to use skill-specific skill delays if set for a given skill, or global delay from ini if not. Also added a check to see if skill delay timer has been modified by onSkill JS event before attempting to set a default timer
Updated skill delays to better match ~pub15 era:
	Reduced global SKILLDELAY setting in UOX.INI from 2 to 1 second
	Detecting Hidden skill now has a default skill delay of 10 seconds
	Herding skill now has a default skill delay of 10 seconds
	Hiding skill now has a default skill delay of 10 seconds, with shorter delays (global skill delay) for trying to hide while in combat or for successfully hiding
	Meditation skill now has a default skill delay of 10 seconds, with shorter delays (global skill delay) for failing due to hands being occupied or already being at max mana
	Peacemaking skill now has a default skill delay of 10 seconds for failed skill checks, and 5 seconds delay for successful ones
	Poisoning skill now has a default skill delay of 10 seconds
	Provocation skill now has a default skill delay of 10 seconds
	Remove Trap skill now has a default skill delay of 10 seconds
	Stealing skill now has a default skill delay of 10 seconds
	Stealth skill now has a default skill delay of 10 seconds
	Tracking skill now has a default skill delay of 10 seconds
	Veterinary skill now has a default skill delay of 10 seconds
Fixed an issue with global JS Timer object that would reference the wrong timerIDs
Extended global JS timer object to include timers from socket as well (marked with SOCK_ prefix):
	.SOCK_SKILLDELAY	// Delay before the next time player can use another skill
	.SOCK_OBJDELAY		// Delay before next time player can use another object
	.SOCK_SPIRITSPEAK 	// Timer that tracks remaining duration of player's Spirit Speak
	.SOCK_TRACKING		// Timer that tracks remaining duration for player's Tracking skill
	.SOCK_FISHING		// Timer that tracks remaining duration for player's Fishing skill
	.SOCK_MUTETIME 		// Timer that tracks remaining duration a player remains muted
	.SOCK_TRACKINGDISPLAY 	// Timer that tracks interval between each time tracking display is updated
Updated various JS scripts to use the new Timer.TIMERNAME with .GetTimer()/.SetTimer() JS Methods for Characters and Sockets
Updated Persecution ability for player ghosts to use the skill delay of the Spirit Speak skill, if set
Updated Persecution ability to base mana damage primarily on player's Spirit Speak skill rather than their Intelligence
In order to cut down on the amount of messages sent from server to players trying to spam-use objects/skills, UOX3 now only sends a maximum of one message for object use delay and one message for skill use delay while the delay timers for these are in effect. This resets on the next successful use of an object or skill. This is tracked via bools in cSocket class:
	bool objDelayMsgShown
	bool skillDelayMsgShown
Converted DELAY tag in spells.dfn to use seconds (with decimals) instead of tenths of a second, which was not precise enough. This controls the cast time of spells. What would previously say DELAY=10 (10/10ths of a second) now says DELAY=1.0 (1 second)
Added support for new Spells DFN tag to control delay until damage takes place after casting a spell, replacing UOX.INI setting COMBATEXPLODEDELAY, which is no longer used:
	DAMAGEDELAY=# 		// Delay in seconds (decimal) until a direct damage spell deals its damage
Added support for a new Spells DFN tag to control cast recovery time, during which additional spells cannot be cast:
	RECOVERYDELAY=# 	// Delay in seconds (decimal) until player can cast another spell
Added new setting in UOX.INI to control whether player spellcasting gets interrupted upon equipping/picking up items:
	ITEMSINTERRUPTCASTING=1 	// If enabled, spellcasting gets interrupted by equipping/picking up items. Defaults to enabled.
All direct damage spells by default have a 1.0s delay before damage (and VFX) is applied, except Explosion which has a 2.5s delay
All spells by default have a cast recovery duration of 1.0s; from the moment a spellcast is completed/moment targeting cursor appears, the player will be unable to cast any other spell for the duration of the cast recovery
Reagent checks and skill-check now take place AFTER the spellcast animation, not before!
Spell cast times now follow this formula, though values set per spell and can be modified: 0.25 + ( spellCircle * 0.25 )
Overhauled spell sound FX and VFX for for all spells
Players can no longer cast spells while holding items on the cursor
Fixed Magic Trap, Magic Untrap, Magic Lock and Magic Unlock not being usable on containers in one's own backpack
Fixed an issue that caused Magic Trap to deal between 50 to 100 damage to the player. New damage: 5 to 10, depending on Magery skill
Fixed an issue where Magic Untrap spell would completely remove traps from spawn containers instead of disable them
Fixed an issue where Telekinesis spell would not set off traps on containers properly
Added additional FX for Teleport spell played at player's original location before the teleport took place
Fixed a bug where creatures summoned with the Summon Creature spell were not dispellable
Fixed an issue where the Reveal spell would not reveal players hidden using the Hiding skill
Dispel and Mass Dispel spells are no longer guaranteed to succeed at dispelling summoned creatures. Instead, the chance to dispel is based on the following simple formula, with dispelChance capped at 95% to always leave some chance for a creature to resist a dispel:
	dispelChance = ( 50 - ( targetResistSkill - casterMagerySkill )) / 1.5
		The targetResistSkill is based on the highest value of the summoned creature's spell resistance skill and the spell resistance skill of its summoner
Fixed an issue where the Create Food spell attempted to create an invalid item
Fixed issue where code that checked for valid drop locations for items didn't allow negative z values (Dragon Slayer)
Fixed issue where players could drop items on blocking map tiles like water or mountains (Dragon Slayer)
Fixed issue where some JS functions like CheckStaticFlag, CheckDynamicFlag, DoesStaticBlock, DoesDynamicBlock and DoesMapBlock would not work correctly when passed negative Z values
Fixed issue where context menu were listing skills to train from NPCs based on effective skill rather than base skill
Fixed issue where NPCs would offer skills for training even if those skills were not above the minimum 60 skillpoints
Updated clilocID used for Gump JS Method AddToolTip - as well as for some item/character tooltip data - from 1050045 to 1042971 for improved client compatibility
Human/Elf/Gargoyle NPCs with spellcasting capabilities will now play a casting animation and briefly stop moving when they cast spells
Updated NPC spellcasting code to help NPCs make a bit better choices of what spells to cast during combat. Now they take their own health percentage into account, and cast more offensive spells when at near full health vs more defensive spells as their health drops
Fixed an issue where Hirelings wouldn't always immediately start following their new owners
Fixed a bug where the Earthquake spell could incorrectly add NPC characters marked for deletion to the refresh queue
Updated skills and stats of all implemented human NPCs (including vendors) to better match the state of those NPCs around the time of Pub15
Fixed SPATTACK values for a couple of NPCs that were still using values based on spell bitmask instead of spell circle value
Updated stats of Jukan and Meer NPCs (dfndata/npc/lbrraces.dfn) to match stats from official LBR guide
Added support for an optional third parameter for Character/Socket JS Method .CustomTarget() to allow highlighting targeting cursors as neutral (0, default aura), harmful (1, red aura), helpful (2, blue aura). A value of 3 will cancel the currently active targeting cursor. New syntax:
	myChar/mySock.CustomTarget( targetID, txtToSay, cursorType ) 	// supported cursorTypes: 0 = neutral, 1 = harmful, 2 = helpful, 3 = cancel current target cursor
Various target cursors triggered by code (like hard-coded spells, some pet commands) also make use of these cursorTypes
2021-08-08 01:57:25 +08:00
Xoduz
f506335c56 Runebooks and misc fixes
Fixed a bug with PACKITEM tag which seeped in with previous commit, which could cause a server crash due to incorrect handling of the tag data
Blank recall runes will no longer have a tooltip with the world the runes were marked in
A west-facing rune with item ID 0x1f17 has been added to represent blank, unmarked runes. This is now the rune that vendors sell, and which can be added through the magic-portion of the 'add menu. Upon being marked by a Mark spell, the rune will change ID to the north-facing one with ID 0x1f14. This is to accommodate the Inscription crafting skill, which will use the blank 0x1f17 runes as a crafting resource.
Inscription skill can now be used to craft Runebooks. In addition to the skill requirement (min 45.0 Inscription), it requires 8 blank scrolls, 1 blank recall rune, 1 Recall scroll and 1 Gate Travel spell.
Added new item type - IT_RUNEBOOK (49)
Added new item definition for Runebook ([runebook]) to dfndata/items/magic/misc_magic.dfn
Integrated a version of the Runebook JS script rewritten from scratch to support all the features that ~pub15 era Runebooks did, including dropping runes and Recall scrolls on the books, recalling/gating directly from the spell icons in the Runebook, and more.
Max charges for a newly crafted Runebook ranges from 5 to 10 depending on the Inscriber's skill (if rank system for crafting is enabled), and is stored in the book's direction property
Newbie/blessed items will now have [Blessed] displayed in the item tooltip
Ghosts can no longer "speedhack" by spamming the tab button to go in and out of combat rapidly
2021-07-31 20:10:23 +08:00
Xoduz
cbd526a813 Fixed a couple of incorrect comparisons (thanks, punt!)
Fixed a couple of incorrect comparisons (thanks, punt!)
2021-07-28 20:06:48 +08:00
Xoduz
c9e4c29367 0.99.4v
Added JS command to reload dictionaries
	'reloaddictionaries
Fixed a server crash related to casting of spells
Fixed some issues with Line-of-Sight checks related to items under/above ground, LoS checks between different floors of buildings, etc.
Updated handling of skill-training keywords to be based on language-independent keyword IDs rather than trying to match player-input text to specific skill-names
Updated animal-trainer/stablemasterscript (js/npc/ai/stablemaster.js) with several changes:
	Fixed an issue where the same pet would be stabled in all available slots if payment was taken from player's bank account instead of their backpack
	Fixed an issue where stablemaster would not pause walking for a while when a player interacts with them
	Converted all system messages and text messages in stablemaster script to dictionary entries
Added new NPC AI type to source - AI_STABLEMASTER (9) - and assigned this to animal trainers. This is used to identify this type of NPCs for the purpose of displaying relevant context menus
Reworked banker AI script (js/npc/ai/banker.js) to use triggerwords from client instead of hard-defined strings, to work better with multiple languages (and work with all relevant triggerwords)
Fixed a bug with banker AI script (js/npc/ai/banker.js) that prevented players from using the "withdraw" command
Re-added NPC AI 8 to banker NPCs (dfndata/npc/male_vendors.dfn and female_vendors.dfn) so code can check for presence of this AI when handling context menus
Removed remaining hard-coded banking functionality - all handled by script anyway
Added new context menu option for NPC bankers - Open Bankbox
Updated code handling of context menus to only show context menus when relevant:
	Open Paperdoll - Shows for all characters with a paperdoll
	Open Backpack - Shows for player's character, pack animals and hirelings
	Open Bankbox - Shows for banker NPCs (if within 8 tiles)
	Buy/Sell - Shows for vendor NPCs (if within 8 tiles, and if they have anything for sale/are buying anything)
Added new context menu entries for pets, which can be used if player is within 12 tiles of pet:
	Command: Kill
	Command: Stop
	Command: Follow
	Command: Stay
	Command: Guard
	Add Friend
	Remove Friend
	Transfer
	Release
Added new context menu entries for stablemasters/animal trainers:
	Claim All Pets
	Stable Pet
Added new context menu entries for Escort Quest NPCs
	Ask Destination (if within 3 tiles)
	Accept Escort (if within 3 tiles)
	Abandon Escort
Added new context menus for NPCs that can teach skills to players (limited to max 10 per NPC)
	Train [skillName]
Added new AI script for NPC hirelings (3204=js/npc/ai/hireling.js), who can be hired to follow the player around for a limited amount of time, and function the same way as pets. In addition to the regular pet commands, these speech commands are supported:
	hire 	// The hireling will respond with the cost to hire them
	dismiss // Replaces the "release" command for pets; will dismiss the hireling
	patrol 	// The hireling will patrol between it's current location and a second targeted location nearby
	move 	// The hireling will try to shuffle out of the way
	fetch 	// The hireling will try to fetch a targeted item
	drop 	// The hireling will drop to the ground all loot they're currently carrying
	report 	// The hireling will report on the remaining time they're hired for
Added new NPC DFN tag used by code to detect hireling NPCs for the purpose of displaying context menus:
	HIRELING 	// No additional value/data needed for tag
Added new context menu entries for Hireling NPCs, in addition to the ones for regular pets:
	Hire 	// Can be used within 3 steps of the hireling, who will respond with cost to hire them
	Dismiss // Replaces the "release" command for pets, will dismiss the hireling
Added HIRELING tag and SCRIPT=3204 to and updated stats of various NPCs that will be hireable:
	m_fighter, f_fighter, m_beggar, f_beggar, m_peasant, f_peasant, m_sailor, f_sailor, m_pirate, f_pirate
Added new hireling NPC:
	m_paladin, f_paladin
Added new UOX ini setting to enable/disable context menus
	CONTEXTMENUS=1/0 (defaults to 1)
Added new Item JS Method to check if an item's ID is on a specified food list
	.IsOnFoodList( foodList )	// Returns true/false if item's ID is on specified foodList
Added new OMNIVORE food list and assigned it to [basehuman] DFN section
Added new Character JS Properties
	.isGuarded 		// Gets/Sets whether character is guarded by a pet/hireling
	.guarding 		// Gets/Sets the object (if any) being guarded by a pet/hireling
Fixed multiple issues with health bars, flagging and character highlighting
Added some crash protection for invalid data used with CUSTOMINTTAG and CUSTOMSTRINGTAG DFN tags for Items, NPCs and Multis
Fixed an issue which prevented hard-coded checks from running when using items
Added new global js object (Timer) to make the use of character timers in JS more robust, with properties matching timer names from enum in source.
	Properties:
		.TIMEOUT 		// Time until next attack can be done in combat
		.INVIS			// Time until invisible character becomes visible
		.HUNGER			// Time until character grows more hungry
		.THIRST			// Time until character grows more thirsty
		.POISONTIME		// Time until next tick of poison damage
		.POISONTEXT		// Time until next message about suffering from poison
		.POISONWEAROFF	// Time until poison wears off
		.SPELLTIME		// Time until spell cast is completed. Can be set to 0 to interrupt
		.ANTISPAM		// Time until next speech message can be sent (for anti spam purposes)
		.CRIMFLAG		// Time until criminal flag runs out
		.MURDERRATE		// Time until next murder count decay
		.PEACETIMER		// Time until character can re-enter combat after being affected by peacemaking
		.FLYINGTOGGLE	// Time until next time flying ability can be toggled for gargoyles
		.MOVETIME		// Time until NPC can move again
		.SPATIMER		// Time until next time NPC can cast a spell
		.SUMMONTIME		// Time until a summoned NPC will vanish
		.EVADETIME		// Time until an NPC will exit evade state
		.LOGOUT			// Time it takes for a player char to vanish after logout
	Examples of use:
		var hungerTimer = myChar.GetTimer( Timer.HUNGER )
		myChar.SetTimer( Timer.HUNGER, 15000 )
Added new Character JS Methods to add, remove and list friends of a pet/hireling:
	.AddFriend( playerToAdd )		// Adds player to friend list
	.RemoveFriend( playerToRemove )	// Removes player from friend list
	.GetFriendList()				// Gets list of friends
	.ClearFriendList()				// Clears list of friends
Added new Character JS Method to fetch a player character's list of pets/followers
	.GetPetList()		// Gets list of pets/followers
Added new persistent NPC property to keep track of a pet's previous owners, whether those tamed the pet or had it transferred to them. Every time a pet is tamed, or is transferred to a new owner, this list is updated:
	GenericList< CChar * >	petOwnerList
Added new Character JS Method to check if a player is on a pet's owner list as a previous owner:
	.HasBeenOwner( mChar )
Previous owners of a pet can re-tame it with guaranteed chance of success
Updated JS Method Refresh() to be usable with both items or characters, to send updated state of object to nearby players
Added character tooltip [Guarded] for characters being guarded by a pet/hireling
Pets/hirelings that are transferred will now immediately start following their new master instead of wandering freely
Pets/hirelings can no longer be transferred between players as long as either party is flagged as a criminal
Pets/hirelings can no longer be transferred to dead players
Pets/hirelings can no longer be transferred to NPCs
Summoned creatures can no longer be transferred to other players
Summoned creatures can no longer have friends
Friend lists of pets/hirelings are now cleared when the pet/hireling is transferred to another player
Added new UOX.INI settings to control how many pets players can have active:
	MAXCONTROLSLOTS=0 	// Maximum number of pet control slots available to player. Disabled if 0
	MAXFOLLOWERS=5 		// Maximum pets/followers a player can have active at the same time. Used if control slots are disabled
	MAXPETOWNERS=5 		// Maximum number of different owners a pet can have over its lifetime before it becomes impossible to retame
Added new NPC property and NPC DFN tag that keeps track of how many pet control slots an NPC would take up if owned by a player:
	UI08 controlSlots 	// source property
	CONTROLSLOTS=# 		// DFN tag
Added new Character JS properties:
	.ownerCount		// Get the total number of owners a pet/hireling has had, based on NPC's petOwnerList
	.controlSlots 	// Get/Set number of pet control slots an NPC will occupy
	.controlSlotsUsed // Get/Set the number of control slots used by a player
Updated get (js/commands/targeting/get.js) and set (js/commands/targeting/set.js) commands to support getting/setting the following character properties:
	deaths
	ownerCount (read only)
	controlSlots
	controlSlotsUsed
Updated NPC DFNs with default CONTROLSLOT=# tags
Increased the max distance from player that onSpeech JS event will trigger from 7 to 12
Updated how "all attack" and "all follow" commands for pets are handled. Now loops through all pets owned by character and executes command for each eligible pet
Fixed an issue where NPCs could follow characters in different worlds/instances than them selves
Updated default max amount of items that can be sold to NPC vendors from 5 to 250
Guards can no longer train players in skills
Updated equipment itemlists (dfndata/items/itemlists/itemlists.dfn) with blank entries to introduce some more variety in the type of clothes NPCs wear in general
Added new NPCs to DFNs (dfndata/npc/undead.dfn) and added them to undead npclist:
	[skeletalmage]		// variation of [bonemage]
	[skeletalknight]  	// variation of [boneknight]
Updated Titles (dfndata/titles/titles.dfn) with up-to-date titles for skills around Pub 15, and added titles for skills added after that. Also added "Elder" and "Legendary" titles for 110 and 120 skillpoints
Updated EQUIPITEM tag in newbie.dfn (dfndata/newbie/newbie.dfn) to support an optional hue parameter (EQUIPITEM=id,hue)
Updated starting equipment for new characters (dfndata/newbie/newbie.dfn), with commented out practice weapons. Uncomment to use
Added item definitions for practice weapons (dfndata/items/gear/weapons/practice_weapons.dfn):
	practice_skinning_knife
	practice_hatchet
	practice_axe
	practice_mace
	practice_longsword
	practice_spear
	practice_bow
	practice_club
	practice_crook
	practice_gnarled_staff
Updated mount statues DFN (dfndata/items/misc/mount-statues.dfn) and JS (js/npc/pets/*.js) files to include pet control slot related stuff
Pets now inherit the karma of their owners, but revert to their original karma upon release
Pets and hirelings will no longer follow the ghosts of their dead owners, but stay to guard their corpse
Added optional 9th parameter for JS Function CreateDFNItem to specify a color for item created. This comes before the other optional parameters - worldNumber and instanceID (which are only used if character is NULL):
	CreateDFNItem( mSock, mChar, sectionName, inPack, iAmount, itemType, iColor, worldNumber, instanceID )
Added ID of Giant Beetle to various pack animal checks
Pack animals will now drop any newbie/blessed items stored in their packs upon death
Added new NPC properties to track pet loyalty, and exposed these as Character JS properties, and NPC DFN tags:
	JS Properties
		.maxLoyalty 	// Defaults to 100
		.loyalty 		// Starts at 25
	DFN Tags
		MAXLOYALTY=# 	// Defaults to 100
		LOYALTY=# 		// Starts at 25
Updated TriggerEvent JS function to support return values (int, bool, string, object) from called script
Updated various JS scripts to make use of new TriggerEvent functionality and reduce reliance on custom tags:
	js/item/archerybutte.js
	js/item/trainingdummy.js
	js/server/data/combatanims.js
	js/server/data/weapontypes.js
Updated archerybutte script to use dictionary for system and text messages
Updated archerybutte script to support increased range, distance penalty and dex/str bonuses when calculating score
Added new UOX.INI settings under [pets and hirelings] section related to pet control and loyalty:
	CHECKPETCONTROLDIFFICULTY=1 	// Enable/Disable pet control difficulty system
	PETLOYALTYGAINONSUCCESS=1 		// Amount of pet loyalty gained on successful pet command use
	PETLOYALTYLOSSONFAILURE=3 		// Amount of pet loyalty lost on failed pet command use
	PETLOYALTYRATE=900 				// Amount of seconds between each time pet loyalty is automatically reduced by 1. Takes 25 hours to deplete completely from max
Added new persistent NPC property that keeps track of the difficulty of taming and controlling a pet, and exposed it as a Character JS property:
	.orneriness
Every time a tamed pet is released or goes wild, its "orneriness" increases, making it more difficult for other players to tame, and more difficult for anyone to control.
Updated CBasePetResponse::canControlPet() function to use pet control difficulty system if enabled, which checks player's animal taming/animal lore skill vs a pet's "orneriness" to determine chance of pet accepting a given pet command
	On successful use of pet command, increases pet loyalty by value defined in PETLOYALTYGAINONSUCCESS ini setting
	On failed use of pet command, decreases pet loyalty by value defined in PETLOYALTYLOSSONFAILURE ini setting
Added new Character JS Method to calculate chance of a player successfully controlling the pet:
	.CalculateControlChance( mChar )	// Returns value between 0 and 1000 indicating chance of success
Feeding a pet will now restore its loyalty to maximum
Pets will now lose loyalty on hunger checks when at maximum hunger
Pets that are maximum hungry will now only have a chance to go wild if loyalty has dropped to zero
Added new DFN tag for creatures.dfn - TYPE - which contains a string describing the type of creature
Added secure pet trading. Players who trade pets will now see a pet transfer deed appear in a secure trade window with the name and type of creature, and upon completion of the trade the associated pet will be instantly transferred to the other player
Updated resource JS scripts (js/server/resource/*) to use dictionaries for all system messages
Updated skill JS scripts (js/skill/*) to use dictionaries for all system messages
Updated housing JS scripts (js/server/house/*) to use dictionaries for all system messages
Updated item JS scripts (js/item/*) to use dictionaries for all system messages
Updated magic JS scripts (js/magic/*) to use dictionaries for all system messages
Updated NPC AI JS scripts (js/npc/ai/*) to use dictionaries for all system messages
Updated command JS scripts (js/commands/*) to use dictionaries for all system messages, gump tooltips, etc
Updated code to use dictionaries for all system messages
Fixed incorrect spelling for UOX.INI setting HIDEW(H)ILEMOUNTED and updated hiding skill (js/skill/hiding.js) to actually allow/disallow hiding while mounted based on this setting
Added new Character JS Method to make it easier to make one NPC initiate combat with another:
	.InitiateCombat( targetChar )	// Character attempts to initiate combat with target character
Updated parrying portion of combat code to be in line with Pub15/pre-AoS parrying mechanics. High AR shields now absorb more damage on a successful parry, while low AR shields have a higher chance of parrying. Shields are also now more effective against archery attacks (full absorption potential) than melee attacks (half absorption potential).
Updated combat damage calculations to be in line with Pub15/pre-AoS damage calculations
Adjusted default value of COMBATNPCDAMAGERATE ini setting (damage divisor when target is a player) from 2 to 1 to account for these changes.
Removed dictionary.UNK, and made dictionary.ZRO the default dictionary used for all unsupported languages
Added dictionary support for additional languages: Portuguese, Italian, Czech
Updated default dictionaries for the following languages: English, French
Added default dictionaries for the following languages: German, Spanish, Portuguese, Italian, Czech (note that translations have been provided by automatic services and will contain inaccuracies!)
Added new UOX.INI setting to allow specifying a default dictionary language for server, which if set will force that language for all dictionary messages, regardless of client settings:
	SERVERLANGUAGE=0 	// Set default server dictionary language. Supported languages: 0 - None/language used by each client, 1 - English, 2 - German, 3 - Spanish, 5 - French, 6 - Portuguese, 7 - Italian, 8 - Czech
Added new function in combat.cpp - AdjustArmorClassDamage() - which adjusts the damage dealt in combat based on whether armour class (AC DFN tag or .ac JS property) of weapon and armour equipped on hit location of target match up. A weapon with armour class 1 would essentially be doubly effective against armour of armour class 1. Allows setting up things like piercing weapons being better against some armor types than mace weapons, etc.
Added new UOX.INI setting under [combat] to enable/disable double damage from armour class bonuses:
	ARMORCLASSDAMAGEBONUS=0/1 //defaults to 0)
2021-07-28 16:02:56 +08:00
Xoduz
c1283e2ae6 0.99.4u
UOX3 now sends the appropriate packets (0x85 and/or 0x86) in response to client requests to delete a character from the char selection screen
Fixed an issue with fetching create entries in JS - was incorrectly limited by number of registered spells!
More code cleanup
2021-07-04 07:57:42 +08:00
Xoduz
6ca9ddc6f2 Various code/warning cleanup
Fixed an issue with ItemID skill where using the skill on a crafted item would not output a result if creator of item was unknown
Command logs now also include any parameters used with a command
Fixed an issue where messages used with CustomTarget JS function would not get truncated properly if longer than the allowed maximum length
Fixed some instances of potential buffer overrun and/or out-of-bounds memory access
Fixed some potential null pointer dereferences
Fixed a couple instances of missing breaks in switch cases
Added [[maybe_unused]] attributes in places where return values are intentionally unused
Added [[fallthrough]] attributes in places where switch case fallthroughs are intentional
Misc minor code cleanup
2021-07-04 02:26:43 +08:00
Xoduz
79447c5e09 Various changes
Fixed an issue with JS Function DeleteFile(), which would stop calling script from working if no file was found for deletion. Could break demolishing of houses, amongst other things
Fixed an issue with DoSEErrorMessage() function that prevented JS function error messages from being displayed in UOX3 console if message size was below 512
Fixed a bug that allowed players to place items on the same slot of walls when using a client that doesn't automatically restrict this
When dropping items, UOX3 will now look for a valid surface to drop them on, and move the item to said valid surface if applicable
Fixed an issue with loading of MultiCollections.uop where max boundaries of each multi was not set on load, preventing features that relied on finding corners of building from working (like automatic ban location detection for houses)
Added new function in mapstuff.cpp to check flags on dynamic items, and exposed it as a JS Function with same name and parameters:
	CheckDynamicFlag( SI16 x, SI16 y, SI08 oldz, UI08 worldNumber, UI16 instanceID, TileFlags toCheck );
Fixed an issue where items were not always properly added to/removed from map regions when picked up or dropped
Added new helper function in dist.cpp to find 3D distance between two points:
	getDist3D( point a, point b )
Added JS Function - DistanceBetween() - to find distance between two sets of coordinates, or two objects:
	DistanceBetween( x1, y1, x2, y2 )
	DistanceBetween( x1, y1, z1, x2, y2, z2 )
	DistanceBetween( sourceObject, targObject )
	DistanceBetween( sourceObject, targObject, checkZ )
Added Item JS Method - GetTileName() - to get name of an item directly from tiledata
Added new UOX.INI setting that defines the lower limit for when a purchase will withdraw money from bank instead of backpack:
	BANKBUYTHRESHOLD=2000
Split the UOX.INI setting CONSOLELOG into three parts, to enable/disable different forms of logging:
	CONSOLELOG=1/0 	// Toggles logging of console messages, warnings and errors
	NETWORKLOG=1/0 	// Toggles logging of network traffic
	SPEECHLOG=1/0 	// Toggles logging of player/staff speech
2021-06-27 23:23:31 +08:00
Charles Kerr
1792bcd1ba initial changes, ConfigOS, nullptr, PLATFORM 2021-06-12 08:02:17 -04:00
Charles Kerr
75fc56b0dd NULL to nullptr 2021-06-12 07:30:23 -04:00
Xoduz
13c53a8e6d Warnings cleanup, couple of fixes
Fixed an issue that could cause player characters created in older versions of UOX3 to end up with backpacks without max item capacity set, thus being unable to add any items to their backpack
More warnings cleanup, and some fixes to address size_t differences between Windows and Unix platforms (punt)

Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2021-06-04 01:20:22 +08:00
Xoduz
343ee8b293 First iteration of support for damageable items/multis
Removed RemoveFromSight() from CItem::Update() in cItem.cpp, to address flickering issues with animated items, and for smoother updates of items on boats when sailing.
Added new flag in CBaseObject - damageable - which determines if an Item or Multi should be considered a damageable object.
Added new DFN tag for Items and Multis to mark objects as damageable objects
	DAMAGEABLE=0/1 // If enabled, allows client to display healthbar for object, using object's hp/maxhp values as basis. Note that any changes to a damageable object's health will not be reflected in the client until a stat update has been sent.
Added new JS Property for Items and Multis and Characters to get/set an object's damageable flag
	.isDamageable // 1 or 0
Added new JS Method for Items, Multis and Characters to force an update of the object's health bar to nearby players:
	.UpdateStats( statType ) // statType can be 0 (Health, only one that works for items), 1 (Mana) or 2 (Stamina)
Updated DFN entries for training dummies (dfndata/items/houseaddons/house_addons.dfn) to include DAMAGEABLE=1 and HP=100 tags, and also updated script for training dummies (js/item/trainingdummy.js) with some extra features for dummies marked as damageable:
	Show damage numbers over the training dummy when hit
	Update health of training dummy based on damage received when hit
	Restore health of training dummy to max after 4 seconds of inactivity
Updated 'fullstats and 'heal commands (js/commands/targeting/stats.js) to support restoring the health of a damageable object
Updated 'get (js/commands/targeting/get.js) and 'set (js/commands/targeting/set.js) commands to support getting and setting the damageable flag on objects
Updated updateStats() in uox3.cpp to work with CBaseObject instead of CChar
Updated statwindow() in CSocket.cpp to work with CBaseObject instead of CChar
Updated CPUpdateStat in CPacketSend.cpp to work with CBaseObject instead of CChar, to support sending packet 0xA1 to client for Items/Multis
Updated CPStatWindow in CPacketSend.cpp to work with CBaseObject instead of CChar, to support sending packet 0x11 to client for Items/Multis
Fixed an issue with outgoing packet 0x11 where a character's current HP might sometimes incorrectly be displayed as zero
Updated CPNewObjectInfo in CPacketSend.cpp to send object information packet 0xF3 to client with datatype set to 0x03 for Items/Multis marked as damageable objects, to enable the client's ability to display health-bars for these items.
Fixed an issue with JS Method for Items - .Refresh() - which previously did nothing, but now instead sends an update of item to all sockets in range
2021-06-03 06:14:56 +08:00
Xoduz
52ed2376f3 Some maintenance changes
Replaced UOX_MIN and UOX_MAX with std::min and std::max (punt)
Moved StringUtility functions into a new namespace: strutil (punt)
2021-05-27 05:42:35 +08:00
Xoduz
18786ff88d CDataList replaced with GenericList
Replaced CDataList with the new GenericList class throughout UOX3, and removed CDataList from the project files
Reverted an earlier change where scriptsections were supposed to be reapplied to items bought from NPC shopkeepers - didn't actually work!
2021-05-07 04:33:13 +08:00
Xoduz
95a606f6b4 More string handling modernization, and a minor fix
Increased default timer for worldsaves from 5 to 10 minutes
Fixed an issue where the tile command could spawn items with incorrect ID because tempInt2 wasn't reset properly
Additional string handling modernization in cAccountClass.cpp, cHTMLSystem.cpp, CResponse.cpp, cServerData.cpp, cServerData.h, cServerDefinitions.cpp, cSocket.cpp, cSpawnRegion.cpp, cSpawnRegion.h, cWeather.cpp, Dictionary.cpp, effect.cpp and uox3.cpp (punt)
2021-04-26 18:26:39 +08:00
Xoduz
108e499115 0.99.4f
Option to define how much memory JS engine should be allowed to allocate before last-ditch GC kicks in has been moved from engine.dat to a new UOX.INI setting under [server]. Note that too low values can lead to server instability, especially if doing a lot of JS engine reloads, so default value has been increased from 16 to 256 MB per JS Runtime:
	JSENGINESIZE=256 // gcMaxBytes limit in MB per JS Runtime. Must be between 16 and 4095
Reduced stackchunksize value provided for JS_NewContext from 0x500000 to the recommended default of 8192
Updated how players are paid for completing NPC escort quests; instead of hard-coded random amount between 0-600 gold, the reward is now based partly on the NPC escort's fame, and partly on the amount of gold the NPC is carrying. The formula for quest rewards thus look like this: rewardAmount = (( totalFame / 100 ) * 50 ) + ( totalGold * 0.25 )
Fixed healthbars of nearby characters not showing correctly for players who have just logged in. Cause seems to have been UOX3 reading more bytes from network buffer than required when (not) handling packets 0xB5 and 0xFB. Added basic handling of these packets to avoid that problem.
Fixed an issue where UOX3 would send full status updates (packet 0x11) for each character on the screen, rather than just sending the minimum required for each character. Client doesn't need to know the weight of an NPC, or how much gold an opponent player is carrying!
Fixed an issue with tooltips for characters and/or items not always appearing, caused by UOX3 not responding correctly to certain tooltip requests (packet 0xD6)
2021-04-13 22:27:24 +08:00
Xoduz
c76a41215f 0.99.4e
Added support for packet 0xE2 (New Character Animation, used to play animations in client v7.0.0.0+) via cEffects::PlayNewCharacterAnimation( CChar *mChar, UI16 actionID, UI16 subActionID, UI08 subSubActionID )
Added support for new animation packet in JS Character method DoAction() using a second parameter that specifies animation variation, which if present forces server to send new animation packet instead of old. This means the 'action/npcaction commands can now be used to play animations on gargoyles/humans in client v7.0.0.0+ using the following syntax: 'action [action subAction]
Created new enums for character actions and sub-actions, and updated code to refer to these instead of using "magic" numbers
Added new options in UOX.INI under [settings] section:
	FORCENEWANIMATIONPACKET=0/1 // If enabled (default), forces the use of the new animation packet for playing various character animations for both NPCs in general and for player characters connected with client v7.0.0.0+
Updated various actions performed by players and NPCs to use new animation packet (combat, spellcasting, mining) if connected with client v7.0.0.0+ and ini setting to force new animation packet is enabled
Added basic support for gargoyle flying ability. Can now use flying ability itself to enter/exit flying state, and the state change will also get sent to nearby players. Flying players are treated the same way as mounted players; polymorph spells will auto-dismounts mounted/flying player, same rules for stealth applies to flying as riding, etc.
Exposed Character property to JS engine:
	.isFlying // returns true if character is flying
Moved Orc and Ratman races from RACE 1 and 2 to RACE 22 and 23 in dfndata/race/races.dfn to make room for two new player races, that are applied to new player characters during character creation:
	[RACE 1] - Elf
	[RACE 2] - Gargoyle
Updated orcs and ratmen in dfndata/npc/humanoids.dfn with race IDs 22 and 23 respectively
Added items in dfndata/items/skills/tools/cooking.dfn to item menu under Skills > Tools > Cooking
Fixed an issue where moving items around within a container at max item capacity was not allowed
The GM command 'set can now modify a character's current mana using 'set mana #
Added JS command to get specific object property values (using same property names as 'set command):
	'get [objectProperty]
Exposed Item/Character properties to JS:
	.oldX // Previous X coordinate for object
	.oldY // Previous Y coordinate for object
	.oldZ // Previous Z coordinate for object
Exposed Character properties to JS:
	.mana // Character's current amount of mana
Updated version of Winsock requested by UOX3 from 2.0 to 2.2
Exposed timer for updating NPC flags to [timers] section of UOX.INI:
	NPCFLAGUPDATETIMER=5 // Interval in seconds between each time NPC flags are updated. Default adjusted down from 30 to 5 seconds
Fixed an issue where UOX3 was trying to output some debug/warning messages to console using the wrong console method
Made some small tweaks to NPC pathfinding to make NPCs more likely to pick a new target location when their old one is blocked
Added HP DFN tag to guard NPCs to prevent them from spawning with half health
Removed -lstdc++fs from Makefile and replaced with special instructions for users of gcc below v9.x
Fixed a buffer overrun issue with tiledata item names
Eliminated a bunch of compilation warnings in VS2017
Updated JS Method CreateDFNItem to allow creating items without referencing a socket/character. Syntax:
	var myItem = CreateDFNItem( null, null, itemSectionID, amount, "ITEM", false, worldNumber, instanceID );
Added functional chessboard that operates on standard chess rules. Pieces cannot be removed from the board, snap to the chessboard grid when dropped, are subject to movement restrictions per chesspiece, will capture opponent pieces if landing on their square. Board can be reset by dragging king-piece off to the side of the board (js/item/gameboards.js and js/item/chesspiece.js)
Added functional checkerboard, with pieces that cannot be removed, can only move in diagonals, can jump across opponent pieces to capture them. Board can be reset by ??? (js/item/gameboards.js and js/item/checkerpiece.js)
Using the 'go command without any additional parameters will now open the GM travel menu (js/commands/go.js)
2021-04-08 18:54:15 +08:00
Xoduz
8c2c1de962 0.99.4d
Added new option in UOX.INI under [settings] section:
	MAPDIFFSENABLED=0/1 // If enabled, server will attempt to load diff files, and send "Enable Map-diff files" packet to client to also load these. Disabled by default.
Server no longer loads map/statics diff files by default, nor does it send packet to client to request loading these files, as only client versions below 7.0.8.2 will actively load these files. Can be re-enabled with new UOX.INI setting mentioned above!
Fixed incorrect ID for gargish dagger in CHandleCombat::getWeaponType()
Added missing weapon entries in CHandleCombat::getWeaponType(): bladed whip, barbed whip, spiked whip, gargish talwar
Fixed an issue that would show the end part of some tiledata names as garbled text instead of cutting off the text(!) at 20 characters
Fixed an issue with advanced character creation template when using ClassicUO client, which sends a profession value of 255 instead of 0 when no profession template has been selected.
Fixed an issue where clones of NPCs that can split in combat didn't get the NPC flag correctly set
Guild titles are now removed for players who leave their guilds
Enabled closing some hard-coded gump menus using right-click (howto, guild, towns, wholist, addmenu, craftmenu, info)
Fixed an issue where adding base items using 'add [itemID] would sometimes get false positive hits from harditems.dfn, depending on the length of the itemID
Fixed an issue where items added using 'add [itemID] would not get names applied properly from harditems.dfn
Item/NPC DFN tag GET can now inherit a random parent by adding additional values separated by spaces. Syntax:
	GET=parent1 parent2 parent3 (etc)
Fixed an issue where NPC backpacks would not have the max item capacity set properly
Added new properties for CItem objects (also exposed as JS Item Properties):
	maxRange // max distance a ranged weapon can fire at (replaces ARCHERRANGE ini setting)
	baseRange // base distance throwing weapons (when implemented) can be used at
Added support for new Item DFN tag that replaces global UOX.INI setting ARCHERRANGE:
	MAXRANGE=# 				// Specifies max range of ranged weapon
Added support for new Item/NPC DFN tags to support randomizing elemental resistances:
	RESISTFIRE=#/# #		// Set NPC's poison resistance; fixed or random value
	RESISTCOLD=#/# #		// Set NPC's poison resistance; fixed or random value
	RESISTLIGHTNING=#/# # 	// Set NPC's poison resistance; fixed or random value
	RESISTPOISON=#/# #		// Set NPC's poison resistance; fixed or random value
Added support for two new DFN tags in dfndata/race/races.dfn that can be used to allow/ban lists of equipment for specific races
	ALLOWEQUIPLIST=#
	BANEQUIPLIST=#
Added support for new section in dfndata/race/races.dfn - [EQUIPLIST #], which can be used to define lists of equipment that is whitelisted or banned for specific races.
Fixed a bug that would report incorrect weight in tooltips for Item/NPC spawner objects
ScriptSections are now reapplied for items bought by players from NPC vendors
Fixed an issue where players could drop an item on the ground and other players would still see the item after it was picked up, because of a failed distance check vs old location coordinates (in pack) instead of vs current location on ground
Fixed a bug with players being able to use last-target macro to target objects picked up and held by other players on their cursor
Updated all references to "devinelock" to be "divinelock" instead - this includes the name of the JS Item property
Fixed house commands triggering (useless) targeting cursors for players onboard boats
Changed default statcap in UOX.INI from 325 to 225
Fixed a out-of-range error for players attempting to combine ore inside their own backpack
Fixed various issues with distance checks and container checks when using/target objects
Added optional 4th "hue" parameter to AddGump JS method
Added JS Function to get total amount of accounts on server - GetAccountCount()
Added JS Function to get total amount of players online - GetPlayerCount()
onSwing JS Event can now trigger in scripts attached to items, not just items attached to characters
Added some JS Functions to expose some hard-coded constants to JS scripts:
	BASEITEMSERIAL() // Base item serial
	INVALIDSERIAL() // Invalid serial
	INVALIDID() // Invalid ID
	INVALIDCOLOUR() // Invalid colour
Fixed an issue where JS character property .colour would modify origSkin property instead of colour
Fixed an issue where JS character property .guildTitle returned the name of the character instead of the guild title
Character JS property .poison can now also be used to set a character's poisoned level, not just read it
Exposed Item property to JS engine:
	.ac // armour class for item (0-128). Primarily used for setting race-restrictions for equippable items, i.e. race X cannot equip items of armour class Y.
	.def // defensive value of item (Physical resistance post-AoS, AR in older UO)
	// NOTE: The following properties don't actually do anything yet, but can still be used in custom JS scripts if desired
	.resistCold // Cold resistance of item 0-1000, where 1000 equals 100.0%
	.resistHeat // Heat/Fire resistance of item 0-1000, where 1000 equals 100.0%
	.resistLight // Light resistance of item 0-1000, where 1000 equals 100.0%
	.resistLightning // Energy/Lightning resistance of item 0-1000, where 1000 equals 100.0%
	.resistPoison // Poison resistance of item 0-1000, where 1000 equals 100.0%
	.resistRain // Rain resistance of item 0-1000, where 1000 equals 100.0%
	.resistSnow // Snow resistance of item 0-1000, where 1000 equals 100.0%
	.damageHeat // Weapon deals Heat/Fire elemental damage (true/false)
	.damageCold // Weapon deals Cold elemental damage (true/false)
	.damageLight // Weapon deals Light elemental damage (true/false)
	.damageLightning // Weapon deals Lightning elemental damage (true/false)
	.damagePoison // Weapon deals Poison elemental damage (true/false)
	.damageRain // Weapon deals Rain/Water elemental damage (true/false)
	.damageSnow // Weapon deals Snow/Ice elemental damage (true/false)
Added new UOX.INI setting under [server] to enable/disable shard response to ConnectUO server polling (disabled by default)
Sub-commands are no longer included when registering packets to be overloaded via RegisterPacket function, as that part was never fully implemented. Packet-hook scripts can be setup for specific packet IDs, but any sub-command checking will need to be done in the script itself
JS Packet Method GetDWord() now uses JS_NewNumberValue instead of INT_TO_JSVAL to read from the socket buffer, to better handle large numbers, which could previously be returned with wrong values.
JS Function CalcItemFromSer() now uses a JS_GetStringBytes() and str_value() combo instead of JSVAL_TO_INT() to read the data provided in the function argument. This allows JS scripts to provide item serials to the function directly without needing to split it into four parts first (though that still works)
Fixed issue where JS properties for multis didn't always return correct values
The 'set command can now be used to set the armour class of items ('set ac #)
Reimplemented 'tweak command in JS engine (js/commands/targeting/tweak.js) - can be used to view and modify properties of characters, character skills, items, multis and regions (target ground)
Added placeholder packet-hook script (js/server/network/0xf1_connectUoServerPoll.js) to handle responses to ConnectUO server polling. By default this script does nothing, but serves as a placeholder for drop-in replacement scripts generated specifically for each shard by the ConnectUO service.
Updated some commands to support an alternate STATIC keyword (can also be ommitted) to add base items:
	'add static itemID
	'tile static itemID
Updated some commands with support for randomization. Provided itemID will be randomized based on provided rndValue:
	/js/commands/targeting/add.js:
		'add itemID rndValue
	cmdtable.cpp and targeting.cpp:
		'tile itemID rndValue
		'tile itemID x1 x2 y1 y2 z rndValue
Updated js/commands/custom/repeatingcmds.js to support 'm delete as an alias for 'rremove
Added 'props as an alias for the 'tweak command
Added 'teleport as an alias for the 'tele command (js/commands/targeting/tele.js)
Added 'shavehair and 'shavebeard as aliases for 'kill hair and 'kill beard (js/commands/targeting/kill.js)
Added 'noinvul and 'mortal aliases for the 'invul false command (js/commands/custom/misc-cmds.js)
Added 'immortal and 'invul (without parameter) as aliases for the 'invul true command
Added 'bringtopack as an alias of 'movetobag command (js/commands/targeting/movetobag.js)
Updated check for cancelling of target cursor in various JS scripts
Minor updates to various JS scripts
Fixed issue where some item definitions in dfndata/harditems/harditems.dfn and dfndata/items/building/lighting.dfn used comma instead of space as delimiter for the VALUE tag, which thus never got applied
Updated all NPC definitions to let NPCs spawn facing in random directions
2021-03-22 05:59:20 +08:00
Xoduz
d7ac5c3218 Housing Revamp and more
Updated JS SysMessage function to accept up to 10 extra, optional arguments, which can be used with dictionary messages that require additional parameters like %s or %i
Added new type of house privilege in cMultiObj.cpp to keep track of friends of the multi - HOUSEPRIV_FRIEND - which is stored during worldsaves as one or more Friend=<player serial> tags in house.wsc
Added new type of house privilege in cMultiObj.cpp to keep track of guests of the multi - HOUSEPRIV_GUEST - which is stored during worldsaves as one or more Guest=<player serial> tags in house.wsc
When items are created for houses upon house placement, a reference to the multi's serial is now stored in the house sign's MORE property to allow easier tracking of which house a particular sign belongs to
Added tracking of new, persistent properties for houses via cMultiObj.cpp/h:
	lockdowns, secure containers, vendors, guests, friends, owners, ban location, public status, number of visits, timestamps
Added a multitude of  new methods in cMultiObj.cpp/h to assist in improving the functionality of houses
Added new tags for houses in house.dfn (default values applied if tag not specified):
	MAXSECURECONTAINERS=4 - Max amount of secure containers allowed in a multi
	MAXLOCKDOWNS=256 - Max amount of lockdowns allowed in a multi
	MAXVENDORS=10 - Max amount of vendors allowed in a multi
	MAXBANS=50 - Max amount of bans in a multi's ban list
	MAXFRIENDS=50 - Max amount of friends in a multi's friend list
	MAXGUESTS=50 - Max amount of guests in a multi's guest list
	MAXOWNERS=8 - Max amount of owners and co-owners in a multi's owner list
	MAXTRASHCONTAINERS=1 - Max amount of trash containers allowed in multi
	SCRIPT=<scriptID> - Assign a JS script-ID directly to a multi
	FRONTDOOR - indicates that a door is the front door of a house. Cannot be locked in public houses!
	INTERIORDOOR - indicates that a door is an interior door of a house. Can be locked in public houses.
	BANX - Location X offset for multi's ban location, if not used, will try to use SE corner of multi instead
	BANY - Location Y offset for multi's ban location, if not used, will try to use SE corner of multi instead
Added JS Event:
	onHouseCommand( tSock, multiObj, cmdID ) - For handling spoken house commands via JS scripts attached to multi.
Updated JS Events:
	onEntrance() - can now trigger both for multi being entered and/or object entering
	onLeaving() - can now trigger both for multi being left and/or object entering
	onSpeech() - can now also trigger for items (in addition to chars) with event & script attached, if UOX.INI setting ITEMSDETECTSPEECH is enabled
Added JS Multi methods:
	.IsBoat() - Returns whether the item (or multi) is a boat
	.IsOwner( playerToCheck ) - Returns whether a player is the owner of a multi
	.IsOnOwnerList( playerToCheck ) - Returns whether a player is on the (co-)owner list of a multi
	.IsOnFriendList( playerToCheck ) - Returns whether a player is on the friend list of a multi
	.IsOnGuestList( playerToCheck ) - Returns whether a player is on the guest list of a multi
	.IsOnBanList( playerToCheck ) - Returns whether a player is on the ban list of a multi
	.AddToFriendList( playertoAdd ) - Adds player to the friend list of a multi
	.RemoveFromFriendList( playertoRemove ) - Removes player from the friend list of a multi
	.AddToGuestList( playertoAdd ) - Adds player to the guest list of a multi
	.RemoveFromGuestList( playertoRemove ) - Removes player from the guest list of a multi
	.ClearOwnerList() - Clears all entries from a multi's (co-)owner list
	.ClearFriendList() - Clears all entries from a multi's friend list
	.ClearGuestList() - Clears all entries from a multi's guest list
	.ClearBanList() - Clears all entries from a multi's ban list
	.SecureContainer( itemToSecure ) - Secures a container in a multi
	.UnsecureContainer( itemToUnsecure ) - Unsecures a container in a multi
	.IsSecureContainer( itemToCheck ) - Checks if specified item is a secure container in a multi
	.LockDownItem( itemToLockDown) - Locks down an item in a multi
	.ReleaseItem( itemToRelease ) - Releases a locked down item in a multi
	.KillKeys() - Deletes ALL keys associated with a multi
	.AddTrashCont( itemToAdd ) - Add trash container to multi's list of trash containers
	.RemoveTrashCont( itemToRemove ) - Remove trash container from multi's list of trash containers
Added JS Item (Multi only) properties:
	.lockdowns - Get the number of lockdowns in a multi
	.maxLockdowns - Get/Set the max number of lockdowns allowed in a multi
	.secureContainers - Get the number of secure containers in a multi
	.maxSecureContainers - Get/Set the max number of secure containers allowed in a multi
	.trashContainers - Get the number of trash containers in a multi
	.maxTrashContainers - Get/Set the max number of trash containers allowed in a multi
	.friends - Get the number of friends in a multi's friend list
	.maxFriends - Get/Set the max number of friends allowed in a multi's friend list
	.guests - Get the number of guests in a multi's guest list
	.maxGuests - Get/Set the max number of guests allowed in a multi's guest list
	.owners - Get the number of owners in a multi's owner list
	.maxOwners - Get/Set the max number of owners allowed in a multi's owner list
	.bans - Get the number of banned players in a multi's ban list
	.maxBans - Get/Set the max number of banned players allowed in a multi's ban list
	.vendors - Get the number of player vendors in a multi
	.maxVendors - Get the max number of player vendors allowed in a multi
	.deed - Get the item sectionID for deed used to place multi
	.isPublic - Get/Set the private/public state of a multi
	.buildTimestamp - Get the timestamp for when the house was originally placed
	.tradeTimestamp - Get the timestamp for when the house was last traded to another player
	.banX - Get/Set the ban location X offset for the multi
	.banY - Get/Set the ban location Y offset for the multi
Added JS Character properties:
	.multi = Get/Set the multi object the character is in
	.accountNum = Get the account number the character belongs to
	.housesOwned = Get a count of houses owned by the character
	.housesCoOwned = Get a count of houses co-owned by the character
Updated JS cBaseObject Methods .FirstItem(), .NextItem() and .FinishedItems() to also support iterating through items in multis
Updated JS multi Methods .FirstChar(), .NextChar() and .FinishedChars() to support an additional parameter to specify what kind of characters to loop through:
	"default" or no parameter - all characters inside the multi
	"owner" - players on multi's owner list
	"friend" - players on multi's friend list
	"guest" - players on multi's guest list
	"banned" - players on multi's ban list
Added new INI tags to a new section of uox.ini called [houses]
	DECAYTIMERINHOUSE=3600 // Decay timer in seconds for non-locked down items inside houses
	PROTECTPRIVATEHOUSES=1 // Toggles whether private houses will automatically boot unauthorized visitors (1) or not (0)
	TRACKHOUSESPERACCOUNT=1 // Toggles whether to track (and restrict) house ownership per account (1) or per character (0)
	MAXHOUSESOWNABLE=1 // Specifies the max amount of houses a player can own per account/char, depending on how house ownership is tracked
	MAXHOUSESCOOWNABLE=10 // Specifies the max amount of houses a player can co-own per character
	CANOWNANDCOOWNHOUSES=1 // Toggles whether players can own and co-own houses at the same time
	COOWNHOUSESONSAMEACCOUNT=1 // Toggles whether characters on same account as house owner will be treated as co-owners
Added new INI tags in [settings] section of uox.ini:
	ITEMSDETECTSPEECH=0 // If enabled, server will search for nearby items with onSpeech JS event running whenever a character speaks. Disabled by default.
	MAXPLAYERPACKITEMS=125 // Defines max item capacity for player (and NPC) backpacks. Defaults to 125.
Moved most of the existing house functionality to JS and expanded upon it to reach feature parity with houses in regular UO around Publish 15/16, with various extras thrown in for good measure and all functionality being customizable:
	js/server/house/house.js (15000) - handles detection of house commands and characters entering/leaving houses
	js/server/house/houseSign.js (15001) - contains and handles all house-related gumps/menus and what is shown when players interact with house sign
	js/server/house/houseCommands.js (15002) - handles functionality of house commands and other functionality such as transfer of ownership, demolishing house, etc.
	js/server/house/houseDeed.js (15003) - handles initial rules that allow/disallow placement of additional houses for players
	All house-related menus now fully handled through JS
	All house commands and other functionality now fully handled through JS
	Removed redundant hard-coded house functionality
	Implemented Co-owners, friends, guests for houses, with access rules in place for entry, lockdowns, house commands, etc.
	Implemented Private and Public houses
	Implemented Secure Containers and Trash Barrels
	Definable max lockdowns, secure containers, player vendors, bans, friends, guests, owners, trash containers and more - per house type
	JS scripts can now be attached directly to houses
	Doors in houses can be marked as front doors or interior doors, and will be treated differently with regards to private and public houses
	Added new item to dfndata/items/containers/misc.dfn - [trashbarrel]
	Added new JS script (js/items/trashbarrel.js) with trash barrel functionality for houses. Trash barrels that are marked as secure containers are only accessible by owners, co-owners and friends of the house. Various options available at top of script.
	Updated js/items/axe.js to support chopping up trash barrels and house add-ons in houses owned by the player
	Fixed an issue with house doors being left behind after demolishing houses while their doors were open
	Fixed an issue where GMs could be banned from player houses
	Added Line of Sight checks to speech, to give players some privacy in their own homes
	Updated house placement code to more accurately check for other multis, dynamic and static objects when placing houses; now requires free space around each house that cannot be blocked by other houses or items that can block player movement, and disallows placement of houses on roads
	Updated house placement code to move characters blocking house placement to SE corner of the house
	Updated house placement code to disallow placing houses in guarded regions, or in dungeons
	Added new DFN tag for regions to enable/disable player houses in specific regions: HOUSING=0/1
	Added new region (247) that covers path to Valley of Eodon in Felucca
	Added new region (248) that covers Valley of Eodon in Ter-Mur, with player housing disabled
	Added new region (249) that covers entire T2A lands, with player housing disabled
	Updated SPACEX and SPACEY values for all houses in dfndata/house/house.dfn to match updated house placement code
	Added new JS property to Regions that can be used to determine or change state of player housing in a region: .canPlaceHouse()
	Updated rules for usage of dye tubs to dye locked down items; now only house owners or co-owners may dye locked down items
	Updated rules for usage of the following locked down items in a house, which are now only usable by house owners and co-owners
		Dyes, Guildstone Deeds, Recall Runes (renaming), Rename Deeds, Townstone Deeds, House Deeds, Boat Models, Player Vendor Deeds, Ore, Hair Dye
	Updated rules for usage of the following locked down items in a house, which are now only usable by house owners, co-owners	and friends:
		Keys, Dye Tubs, Magic Scrolls, Fireworks Wands, Magic Wands, Smithing Tools, Mining Tools, Fishing Poles
	Updated item lockdown rules to allow locking down (and releasing) items in a container as long as the container is locked down, and to only allow releasing a locked down container if it's empty of locked down items
	Updated item lockdown rules to only allow locking down movement-blocking items further than 2 tiles away from doors
	Updated rules for releasing items in houses - now the house owner can release any locked down items, co-owners can release items locked down by themselves or by friends, while friends can release only items locked down by themselves
	Added some feedback to player about why their attempted house placement failed
	Items added by GMs directly into multis will now decay based on the house-specific decay timer instead of the regular one
	Fixed an issue that could cause items to almost instantly decay after being released from lockdown in a house
	Placing house add-ons now properly takes into account SPACEX and SPACEY values when checking if they can fit in selected area of houses
	Re-added SPACEX and SPACEY values for Pentagram and Loom house add-ons
	House add-ons can now be converted back into house add-on deeds by chopping them with an axe
	Added new item type - IT_HOUSEADDON (201) - used by house add-ons placed in player houses
	Fixed a bug where keys would stop working after being added to a keyring, and would turn into blank keys upon release from the keyring
	Added visitor count for public player houses, which keeps track of how many visits a public house has received, with each player counted max 1 time every 24 hours
	Fixed an issue with FindPlayersInOldVisrange() where it didn't take into account that players could see buildings further away than the standard update range. This could cause players to see ghost images of buildings if they were at the "right" distance when the building was being demolished
	Added NODECAY tag to all signs and doors in dfndata/house/house.dfn
	Added FRONTDOOR or INTERIORDOOR (as appropriate) to all doors in dfndata/house/house.dfn
	Added BANX and BANY to specify ban location for some houses in dfndata/house/house.dfn instead of relying on finding SE corner automatically
	Implemented strongboxes (js/server/house/strongbox.js) for co-owners of a house, which can be placed with the house command "i wish to place a strongbox". Max capacity is 25 items
Updated 'REMOVE command to take an optional parameter - itemID. If supplied, the command will remove all items with this itemID from a targeted container
Fixed a bug when checking if dynamic items were blocking valid spawn locations for NPCs, some function arguments were in the wrong order!
Improved code that finds valid spawn locations for items and NPCs spawned via spawn regions. As server gradually builds up lists of valid spawn locations per region over time, it will start using these lists more often, rather than always look for brand new spawn locations.
Fixed a bug with CMulHandler::CheckStaticFlag() that prevented NPCs from spawning inside buildings with no static floors!
Fixed an issue with repeating commands that prevented GMs from being able to cancel them when using the ClassicUO client
Exposed character property .accountNum to JS engine
Extended CDataList class to include a Clear() method for clearing lists
Updated JS File method .Open() to support an optional, third argument - subFolderName - that defines in which sub-folder of UOX3/shared/ to store/look for a file. If no third argument is supplied, UOX3 will default to using the shared folder itself.
Updated JS File method .Length() to return a value of -1 for files that don't exist
Added new code function, exposed to JS engine with same parameters, which simply checks if a given tile ID has a specific flag
	bool CheckTileFlag( UI16 itemID, TILEFLAG flagToCheck )
Added JS function used to find the root container of an item (if any)
	FindRootContainer( itemSerial )
	FindRootContainer( item )
Added new JS function that allows deleting files from UOX3/shared/ folder or subfolders of shared folder. If no subFolderName is provided, looks for file directly in shared folder itself. Restrictions on file- and folder-names apply.
	bool DeleteFile( fileName, subFolderName )
Added new JS functions for checking if a specific client or server feature is enabled. See documentation for full list of client/server features.
	GetClientFeature( bitNum ) // Returns true if specified client feature is enabled on server
	GetServerFeature( bitNum ) // Returns true if specified server feature is enabled on server
Added new JS function for returning the value of almost any server setting from UOX.INI
	GetServerSetting( settingNameInDoubleQuotes )
Updated JS function DoesDynamicBlock() with two new parameters - checkOnlyMultis and checkOnlyNonMultis
Updated JS function DoesMapBlock() with two new parameters - checkMultiPlacement and checkForRoad
Fixed an issue where a LoS check would prevent players from accessing containers in their own backpack
Added new functions in findfuncs.cpp to make it easier to find items near another object or location:
	findNearbyItems( object, distance )
	findNearbyItems( x, y, worldNumber, instanceID, distance )
Added new Item property - maxItems - used by containers to determine their max item capacity
Added new Item property - totalItemCount - used to get total item count in a container (including sub-containers)
Added check for max item capacity when creating new items that are added to a character's backpack - items will be created below character's feet if backpack is full!
Added new DFN tag for items, used by containers to determine item capacity for a given container:
	MAXITEMS=# // 125 is the default for all containers if not set
Added new JS Item properties:
	.maxItems // gets/sets item capacity for a given container
	.totalItemCount // gets total item count in a container, including sub-containers
Updated item tooltips for containers to show accurate total item count, as well as to display max item capacity
Fixed a bug where picking up items from a non-locked down pile of items on the floor inside a multi could cause the remaining pile to be seen as no longer inside the multi, disallowing locking it back down and causing it to decay based on regular decay timer instead of house-specific one
Updated JS command set to allow setting poison-level on items ('set poison #) and hunger-level on characters ('set hunger #)
Fixed an issue with js/item/food.js that prevented poisoned food from poisoning characters when eaten
Fixed an issue with js/skill/poisoning.js that prevented players from poisoning food!
Updated various JS scripts and hardcoded targeting functions to disallow the targeting of locked down resources using skills and tools
Updated JS Method TextMessage() to support three extra, optional parameters. Note that if one optional parameter is included, all preceding optional parameters are also required!
	speechTarget - What kind of target is this message intended for?
		0 - Only visible for sender and receiver of message
		1 - Visible to all players in range
		2 - Visible to all NPCs and players in range
		3 - Visible to all PCs everywhere + NPCs in range
		4 - Visible to all PCs everywhere (broadcast)
		5 - Only visible for the receiver of the message
	speechTargetSerial - The serial of the receiver of the message, used if speechTarget is 0 or 5
	speechFontType - The type of font to display the text in. Defaults to normal.
	    0 - Bold
	    1 - Normal with shadow
	    2 - Bold with shadow
	    3 - Normal
	    4 - Gothic
	    5 - Italic
	    6 - Small, dark
	    7 - Colourful
	    8 - Runic (only works with CAPS)
	    9 - Small, light
Added timestamp to worldsaves in console, to make it easier to see when a particular world-save was done
Added info about compiler/environment displayed at the top of the UOX3 console during startup
Updated dictionary files with new messages primarily related to housing
2020-11-04 02:00:37 +08:00
Xoduz
17947a3cdb Misc fixes - 0.99.3a
Undid dictionary rename from ENG to ENU and FRE to FRA; these are not actual language codes, but groups of language codes - ENU covers all English language codes, FRA covers all French ones.
Refined build notes
Updated Debug Information Format for Debug x64 platform in VS project properties to Program Database for Edit and Continue
Minor fix for a half-broken system (automatic adding of items to add-menu) that needs to be revamped or removed
Commented out some thread-locking code that was causing UOX3 to crash under certain circumstances
Fixed a few cases of threads sleeping for microseconds instead of milliseconds
Replaced all calls to UOXSleep with direct call to std::this_thread::sleep_for(), and removed UOXSleep function from funcdecl.h
Fixed an issue with "Gold" ore/ingot type, which was mislabelled as "Golden" in the ORE_LIST section of skills.dfn
Fixed an issue where crafting skills might consume the wrong resource if additional resources of the same ID but different color were present in player's backpack
Improved AmbientFootsteps feature so footstep sounds are played more in tune with character movement
AmbientFootsteps now also play for NPC movement
Changed how code handles randomizing between MINTIME and MAXTIME values from region spawners; now multiplies values by 60 (to get seconds) before randomizing, instead of after, to make use of full range of seconds between the values (which are in minutes)
Adjusted default global NPC movement speeds in [speedup} section of uox.ini to use less extreme values
Added a DEBUGMOVEMULTIPLIER define in cChar.cpp used to multiply NPC movement delays by the specified value (1.75 by default) when running UOX3 in debug mode, due to reduced server performance in debug mode
Documentation updates:
	Added section on DFN tags for Character, Item, Region, SpawnRegion and Weather DFNs.
	Added Feature documentation for Mining and customizable ores
	Added More details in feature documentation for Spawn Regions
	Updated feature documentation for Dictionaries
	Added more details in UOX3 history section
2020-09-16 02:51:20 +08:00
Xoduz
166d3b0119 Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
	cont		// Targeted item will be made a container, set to nondecay and movable 2
	endfight	// Targeted character (and character being fought) will stop fighting
	getmulti	// Get multiObject for targeted item
	finditem	// Find item at layer X
	movespeed	// Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)

Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
Xoduz
93f306ca48 Improvements to UOP handling, misc fixes
Improvements to handling of UOP format; now takes a cleaner approach, loads files faster (punt)
Fixed a issue in JS/COMMANDS/TARGETING/add.js that would display 'undefined' in system message when adding raw/base items
Updated default jail time in JS/COMMANDS/TARGETING/jail.js (and in code) from 100000 seconds to 86400 seconds (24 hours)
All references in code and scripts to "midi" changed to "music", to reflect fact that modern clients don't actually even have midi files. This change covers both GM commands, DFN tags in regions.dfn and JS methods/properties.
Added new socket property for storing temporary int in JS - tempInt2
Added new socket property for storing temporary object in JS - tempObj2
Expanded XGO command in JS/COMMANDS/TARGETING/x.js to support optional world and instance parameters
Fixed an issue that prevented characters from vanishing from the the sight of players when teleporting to a different instance
Added support for ClassicUO client's WorldMap tracking packet (0xf0) for guildmembers/partymembers. This is the same packet as Razor uses for feature negotiation, so merged the handling of those two packets together into CPIKrriosClientSpecial, which can also be extended to handle other uses of this packet.
Added new UOX.INI setting  whether shard should respond to ClassicUO client's WorldMap tracking packets for guildmembers/partymembers
	CLASSICUOMAPTRACKER=0
2020-08-24 04:25:36 +08:00