Commit graph

110 commits

Author SHA1 Message Date
Geir Ove Alnes
d5094195d4
Merge branch 'develop' into Pet-Bonding 2025-07-04 03:59:21 +08:00
Xoduz
e38be292e3 0.99.6d
Cleaned up an issue with last commit where wrong npclists were used in some spawn regions
Made a few additional adjustments to the new spawn regions in Lost Lands/New Haven
Included more changes related to poison updates that should've been in previous commit (like the complete UOX.INI support for POISONCORROSIONSYSTEM setting)
Adjusted region setup for New Haven to set the individual "building" regions within as a sub-region of the main town (regions.dfn)
Fixed an issue where the displayed HP of an equipped item would not update correctly
Further updates to convert timers 32-bit to 64-bit. This affects and addresses some potential issues with: Character creation/NPC guild-join timestamps, NPC movement, combat timers, idle timeouts, item decay, spellcasting
Added support for new JS Events that can trigger from global script, and can be used to store persistent custom entries in players' paperdoll profiles:
	onProfileRequest( socket, profileOwnerChar ) - Triggers when client requests data for a paperdoll profile
	onProfileUpdate( socket, updatedText ) - Triggers when client sends updated data from paperdoll profile
Added two new helper functions in code that allows faster (but very slightly less accurate) distance checks between two points: 	GetApproxDist( Point3_st a, Point3_st b )
	GetApproxDist( CBaseObject *a, CBaseObject *b )
Improved pathfinding for NPCs attempting to follow another character, by adopting a system of weighted variables to help the NPC determine when to recalculate the path vs when to stick with the old, combined with faster distance checks via GetApproxDist(). The end result of this is faster, smarter and more responsive NPC followers and NPC opponents in combat. The variables influencing this include: how far the target has moved from last pathfind target location, whether NPC is heading in the overall right direction or not, time since last path calculation and some small randomization to avoid edge case jitters.
Updated default command levels in commands.dfn, code and scripts to support the Seer role and make space for some custom roles. These are the new defaults as listed in commands.dfn, which should not be changed as they are linked to specific enums in code. Do take note that this might invalidate command levels for existing GMs/Seers/Counselors, who might need another round of 'make gm/seer/cns from an admin:
	ADMIN - command level 10
	GM - command level 9
	SEER - command level 7
	CNS - command level 4
	PLAYER - command level 0
Updated how UOX3 makes use of the account-level flags 0x2000 (Seer) and 0x4000 (Counselor). If either of these flags are set on an account, all new characters created on the accounts will automatically receive the relevant command privileges.
Fixed an issue with 'wholist command that prevented admin characters from seeing characters with lower privilege levels in the list (js/commands/wholist.js)
Fixed an issue with hiding/GM hide that prevented admin characters from seeing hidden characters with lower privilege levels in the world
UOX3 now includes the cross-platform, header-only utf8cpp library found at https://github.com/nemtrif/utfcpp and freely available under Boost Software License v1.0. The immediate use-case for this is in code right now is to better handle strings related to custom paperdoll profiles, but will also look to make more heavy use of this in future updates
2025-06-28 22:37:42 +08:00
Xoduz
30ddfefd51 Small update
Fixed an issue with an internal movement check that prevented characters from moving in valid map areas in Felucca/Trammel from X 6144 to X 7168
Fixed an issue where .instanceID property was misspelled in 'xgo GM command script, causing characters to be teleported to an out of bounds area where they would no longer be saved (js/commands/targeting/x.js)
Added some additional error-checking to .Teleport()/.SetLocation() JS Method to prevent script-accidents from sending characters out of bounds.
Updated Poisoning skill to add poison-charges to weapons being poisoned. Charges are consumed when applying poison in combat (js/skill/poisoning.js)
Updated combat code to consume poison-charges if a poisoned weapon is used to poison an opponent
Updated shoplists for Blacksmiths and Weaponsmiths - they now buy/sell longswords (dfndata/items/shoplist.dfn)
Updated MageShopping shoplist for mage vendors - they now buy/sell mass curse scrolls (dfndata/items/shoplist.dfn)
Added new Spawn Region DFN tag that can specify which era or eras of UO (Multiple comma-separated entries supported) a given spawn region is valid for. Spawn region not valid for core shard era will be ignored. Syntax:
	ERAS=UO,T2A,UOR,LBR,AOS,SE,ML,SA,HS,TOL
Added new Spawn Region DFN tag that allows using another spawn region as a "parent". All properties of this parent will be inherited except for these, which are ignored: ERAS, NPCLIST, ITEMLIST, NPC and ITEM. Syntax for new tag:
	GET=# // Inherit a specified spawn region
Added spawn region for animal trainer vendor in Vesper stable
Added spawn region for fur trader/tanner vendors in The Best Hides of Britain
Added spawn region for spinner vendor in The Lord's Clothier's and The Right Fit shops in Britain
Added spawn region for tanner NPC to Nujel'm Tannery (and fixed leatherworker spawn region for same area)
Added spawn regions for banker NPCs in East Bank of Britain, First Bank of Moonglow, Jhelom Bank and Jeweler, Bank of Skara Brae
Added spawn regions for stables, tailor and blacksmith inside Castle British
Added spawn regions for mage shops, mage guilds and farm houses in Moonglow
Added spawn regions for misc vendors and townfolk in multiple cities
Added spawn regions for Fire Island
Updated spawn regions for Dagger Isle/Ice Island
Added spawn regions for forests and jungles in southern Britannia and on various islands including Bucc's Den, Moonglow, Serpent's Hold, and misc unpopulated islands
Added spawn regions for area east of Skara Brae, around Hedge Maze and south of Britain
Added spawn regions for wandering healers outside every dungeon entrance in Britannia and Lost Lands
Re-integrated ocean spawn regions for ocean creatures (dolphin, walrus, water elemental, sea serpent) from the original community-based spawn file
Added reagent spawns in overworld spawn regions in Britannia/Lost Lands
Added special reagent spawns in swamp areas
Added additional overworld spawn regions in Britannia/Lost Lands
Added spawn regions for Khaldun dungeon that spawn some new and some old NPCs:
	Old: Zombies, skeletons, skeletal mages, skeletal knights, ancient liches
	New: Cursed (and named) NPCs, shadowfiends, zealots of khaldun (knights/summoners), tentacles of the harrower
Updated size and positions of some existing overworld spawn regions
Fixed incorrect spawn region size for small island south of Trinsic
Added switch/door puzzle functionality in Khaldun dungeon using new switch/door combo script (js/item/dungeons/switch_door_combo.js)
Added "smart objects" in Khaldun dungeon that activate when you come close enough (js/item/dungeons/smart_activate_item.js)
Added teleport locations within Khaldun dungeon (js/teleport.scp)
Added custom AIs to existing NPC spawning in Khaldun dungeon:
	Ancient Lich (summons other undead, and can turn into one of them for disguise)
Added DFN entries for new NPCs spawning in Khaldun dungeon, some with custom AIs:
	[tentacles_of_the_harrower] -> Tentacles of the Harrower (life steal)
	[shadowfiend] -> Shadowfiends (seek out and reveal hidden players)
	[zealot_knight]/[zealot_summoner] -> Zealots of Khaldun (turn into undead on death, male/female variants)
	[cursed] -> Cursed (male/female variants)
	[spectralarmor] -> Spectral Armor
Added DFN entries for new (named) NPCs spawning in Khaldun dungeon:
	[lysander_gathenwale] -> Lysander Gathenwale
	[grimmoch_drummel] -> Grimmoch Drummel
	[morg_bergen] -> Morg Bergen
	[tavara_sewel] -> Tavara Sewel
Added new NPC DFN entries:
	[leatherworker] -> alias for male/female leatherworker vendors
	[mapmaker] -> alias for male/female mapmaker vendors
Added new Race DFN entries:
	[RACE 29] -> Cursed (enemies of RACE 30)
	[RACE 30] -> Zealots (enemies of RACE 29)
Added new book DFN entries for Khaldun journals of Lysander, Tavara and Grimmoch - available as loot from the respective NPCs (dfndata/misc/books.dfn and dfndata/items/misc/books.dfn)
Added 25% chance for hit-animations and hit-SFX to play for targets in combat, instead of playing every time - can get very spammy
Monsters with actual weapons equipped (like Ophidian Enforcer with Halberd/Bardiche) will now get appropriate combat SFX for hitting with that weapon
Updated Healing skill to base cure/resurrection skill requirements on the calculated skill, rather than base skill (js/skill/healing.js)
Fixed an issue where healing with bandages and dying in the process would not properly reset the healing-related tags and skills used
Updated healing script to show a resurrection confirmation menu for players targeted with bandages for resurrect (js/skill/healing.js)
All skill usage states now reset on death, to prevent cases of players being "busy" while trying to use skills that got stuck due to script bugs.
The 'regspawn GM command now supports a new parameter called "max". Updated command syntax:
	'regspawn # // perform a single respawn cycle in a specific spawn region
	'regspawn all // perform a single respawn cycle across all spawn regions
	'regspawn max // respawn ALL spawn regions to MAX capacity in one go
Added new UOX.INI setting that determines the maximum range at which NPCs can initiate attacks on players/NPCs (the old MAXRANGE=10 setting now instead defines max range at which players can initiate attacks on players/NPCs):
	MAXNPCAGGRORANGE=10
Optimized performance by significantly reducing the number of line-of-sight checks performed by characters, especially in combat scenarios, or when evaluating potential targets for NPC AIs. The amount of checks done is also affected by the new ini setting for max aggro range.
Fixed an issue where both NPC and player characters would instantly drop one hunger level (from 6 to 5) upon creation since hungerrate was not initialized until after first hunger-event
Updated character priv property from UI16 to UI32, and added a new flag that determines if fame/karma title is hidden for character:
	HIDEFAMEKARMATITLE (0x10000)
NPCs will no longer aggro other NPCs if the Z difference between them is greater or equal to 20 (i.e. they're on different floors), unless both are using ranged weapons and both are in range
Fixed an issue where players could get discounts from shopkeepers even though neither player nor shopkeeper were members of a NPC guild (js/npc/ai/shopkeeper.js)
Fixed an issue where the "premium" a player would get when selling items to a shopkeeper in the same NPC guild as them would be 110% extra on top of the item's value, instead of the intended 10% (js/npc/ai/shopkeeper.js) (Thanks, cobrag0318!)
Added missing tall straw hat to tailoring crafting scripts (Thanks, Dragon Slayer!)
Improved error reporting during compilation of individual scripts being reloaded - will now show more context and line number
onCombatEnd JS Event now also triggers when NPCs ignore their target and/or evade during combat
Updated 'decorate command to support saving/loading custom tags on items for world templates. These are stored after a @ symbol in the world template, each custom tag separated by a | symbol, and with each custom tag saved using this syntax: key$type$value
Updated resource-harvesting scripts to use script-specific global (const) variables, to avoid interference between different scripts (js/server/resource/*)
Added new resource-harvesting scripts and added spawn regions for these in fields on farms all over Britannia/Lost Lands
	cabbages (js/server/resource/cabbages.js)
	canteloupes (js/server/resource/canteloupes.js)
	carrots (js/server/resource/carrots.js)
	garlic (js/server/resource/garlic.js)
	gourds (js/server/resource/gourds.js)
	honeydew melons (js/server/resource/honeydewmelon.js)
	onions (js/server/resource/onions.js)
	pumpkins (js/server/resource/pumpkins.js)
	squashes (js/server/resource/squashes.js)
	turnips (js/server/resource/turnips.js)
	watermelons (js/server/resource/watermelon.js)
Updated CSpawnRegion::FindItemSpotToSpawn() function in cSpawnRegion.cpp to prevent duplicate spawning of exact same item in exact same location
Updated sectionid of all potion and scroll aliases to match main item, so they'll get correctly picked up by NPC shopkeepers (dfndata/items/magic/potions.dfn and scrolls.dfn)
Specified sectionid for backpacks, so it also gets applied to packs added using the alias [backpack] (dfndata/items/misc/provisions.dfn)
Fixed a code issue that prevented players from selling empty containers to NPC shopkeepers willing to buy such containers
Fixed an issue where field-spells (wall of stone, poison field, etc) would ignore dynamic/static items that should block these
Fixed an issue where field-spells could be cast into houses from the outside by standing next to a wall and targeting self
Fixed a War/Peace-mode desync between client and server by having server always notify client (using war-toggle packet) when the "at war" flag is toggled for player character
Fixed an issue with hiding skill that wouldn't allow player to hide after having acquired self as target in combat (through spellcasting, for instance) (Thanks, Dragon Slayer!)
Fixed an issue where mana/reagents were consumed and skillcheck performed before all spellcast-validations had succeeded, resulting in the occasional loss of reagents/mana when spellcasting was disallowed (code and js/magic/clumsy.js and level1targ.js)
Fixed an issue with lack of criminal-flagging for casting of hostile spells scripted in JS (clumsy, magic arrow, feeblemind) vs blue targets (js/magic/clumsy.js and level1targ.js)
Fixed some issues with Line-of-Sight checking code that returned incorrect results, which amongst other things affected spellcasting in areas with uneven terrain
Fixed some issues with movement code and climbing of ladders, in particular the rope ladder in the 2-story log cabin. Code now sets a "is climbing" flag when character steps onto a rope ladder, and uses that to help resolve some edge cases, and then unsets it when they step off.
Renamed section headers of some map-items in DFNs from "locationname" to "locationnamemap" for clarity (example: "britain" to "britainmap")
Fixed broken "map wrapping" when sailing to edges of map in Felucca or Trammel
Fixed a server crash related to attempts at reading data from invalid map tiles
2025-06-27 09:04:16 +08:00
Dragon Slayer
83740cf5d0 Updates 2025-05-18 20:07:19 -05:00
Xoduz
8394c056c1 WIP
WIP
2025-05-10 18:27:06 +08:00
Xoduz
223c557e2c Couple of new JS events, crash fix
Added new JS Event that triggers when dismounting
		onDismount( pUser, npcMount )
	Added four new JS Methods for Characters/Items:
		.PauseTempEffect( tempEffectID ) // pauses selected temp effect indefinitely until resumed/killed
		.ResumeTempEffect( tempEffectID ) // resumes selected temp effect, if paused, and extends original effect timer to account for paused time
		.PauseJSTimer( timerID, scriptID ) // pauses JS timer based on provided timerID and scriptID
		.ResumeJSTimer( timerID, scriptID ) // resumes JS timer based on provided timerID and scriptID
	Renamed previously added JS Method RevertEffect to RevertTempEffect	(code change only, script was always the latter)
	Fixed issue that prevented 'xrun command from working (js/commands/targeting/xwalk.js)
	Fixed an exception related to loading in data from jails.wsc on startup
	Fixed an exception related to periodic check/release of prisoners from jail
2025-05-08 00:57:18 +08:00
Xoduz
29ac82cc21 Misc fixes
Fixed an error on shutdown when running UOX3 in debug mode in VS due to CCommands constructor attempting to unnecessarily clear CommandMap, TargetMap and JSCommandMaps
	Fixed an issue in Portuguese dictionary where a commented line was lacking a forward slash
	Fixed some soft exceptions related to loading of dictionary files
	Fixed soft exceptions related to checking file sizes of potentially non-existing worldfiles on startup
	Fixed some soft exceptions related to loading of regions from DFNs and townregions from WSC
	Fixed misordered datatype entries in dfnDataTypes for DFNTAG_DYEHAIR and DFNTAG_DEFENSECHANCE
	Fixed double "GET" entry in strToDFNTag mapping. One of them should've been "GETUO"
	Fixed strToDFNTag mapping error for "LOYALTY" DFN tag, which was being incorrectly mapped to DFNTAG_MAXLOYALTY
	Added missing strToDFNTag entry for WILLTHIRST DFN tag
	Removed unknown and unused DFN tag/mapping named SKILLVAR
	Fixed misordered DFNTAG_SWINGSPEEDINCREASE entry in DFNTAGS enum, which caused tags following it to be associated with incorrect datatypes
	Fixed some crash/slowdown issues with reloading of all JS scripts (console menu option 8), especially noticable in VS debug mode
	Fixed an issue where shopkeepers would sometimes fail to recognize items they should want to buy from players due to section ID case sensitivity
2025-05-04 01:54:56 +08:00
Xoduz
b129521c9e Wholist updated, menus to manage npcs and spawn objects, misc
Revamped 'wholist GM command entirely in JS, now comes with filters for names, online/offline status, sorting by name or last online date, quick-buttons to tweak/teleport/inspect, etc. Updated syntax:
	'wholist [on]
	'wholist off
	'wholist force
	Also available under alias 'playeradmin, with the same parameters
Added new JS command for GMs to assist managing NPCs, using updated wholist menu as basis: 'npcadmin
Added new JS command for GMs to assist managing object-based Spawners, using updated wholist menu as basis: 'spawnadmin
Exposed the following character properties to JS engine:
	.lastOn // String-formatted timestamp of last time character was oniline
	.lastOnSecs // Timestamp of last time character was online, expressed as seconds since Unix epoch
Added some validation (and re-synching) of lastOn vs lastOnSecs player character properties - only active when running in debug mode
Updated onBoatTurn JS Event to support a 4th parameter - a reference to the boat's tillerman:
	onBoatTurn( iBoat, oldDir, newDir, iTiller )
Added (missing from last commit) JS Method for boats to fetch tillerman reference: .GetTiller()
Updated JS Docs with details about onBoatTurn JS event, .GetTiller() method and .lastOn/.lastOnSecs properties
Added some console output with details about time taken for each regionspawn cycle
Added some new tiledata override entries for some tiles (stairs/platforms) missing NoShoot flag in some older clients (dfndata/maps/tiles.dfn)
2025-04-27 09:18:09 +08:00
Xoduz
5fbeb04f2b Misc Fixes and Updates
Added support for MAXWEIGHTBONUS DFN tag for races, to allow increasing weight that can be carried by specific race, and a new GetWeightMax() code function to do the necessary calculations on demand
Updated [default race bonuses] UOX.INI section with the following new settings for the 3 default playable races (only used if nothing else specified in races.dfn):
	HUMANMAXWEIGHTBONUS=0
	ELFMAXWEIGHTBONUS=0
	GARGOYLEMAXWEIGHTBONUS=0
Added support for ALLSKILLSG and ALLSKILLSL DFN tags for races, which allow defining skill bonus or loss across all skills for a given race
Added new Character JS Method for adding skill points without triggering skillchange JS Events:
	.AddSkill( skillID, skillAmt, triggerEvents[true/false] )
Added new Boat JS Property to allow getting/setting movement types for Boats via scripts:
	.moveType // See UOX3 JS Engine Docs > JS Object Properties > Multi Properties for a detailed list of all supported movement types
Added new Boat JS Method to allow turning boats via scripts:
	.TurnBoat( turnDir ) // 0 = straight (no turning), 1 = turn left, 2 = turn right, 3 = flip around
Updated IterateOver/OnIterate JS Function/Event to support passing in optional socket parameter. New syntax:
	IterateOver( objectType[, socket ]);
	.OnIterate( sourceObject, targetObject, socket )
Updated Character/Item JS Method .Refresh() to support an optional socket argument, to specify which player to refresh the object for. New syntax:
	.Refresh( [socket] )
Added support for new region setting that can define a region as disabled/enabled via DFN (tag) or script (JS property). Disabled regions will be ignored by UOX3:
	DISABLED=0/1 // Region DFN tag
	.isDisabled // Region JS Property
Fixed issue where JS tags and temporary JS tags would not be copied over when duplicating a character or item
Removed strength requirements from base shield definitions - stats like these are handled per era (dfndata/items/gear/armor/base_armor.dfn)
Fixed an issue where necromancer newbie armor would incorrectly inherit base versions of leather armor without stats (dfndata/items/gear/armor/leather_armor/leather.dfn)
Fixed an issue where players would not correctly leave combat after hiding (js/skill/hiding.js)
Fixed an issue with Healing skill where skill-checks for healing/veterinary would fail due to a misspelled variable (js/skill/healing.js)
Updated smart-turn furniture script to prevent players from being able to turn furnitures that are occupied by characters (js/server/misc/furniture_smartturn.js)
Updated Buff-bar script to only add buffs for client versions higher than 5.0.2, the client patch where this feature was added (js/server/network/0xDF_buffBar.js)
Updated Vendor BDO Dispenser script to add alternative reward-table for AoS era (js/npc/ai/vendor_bdo_dispenser.js)
Cleaned up some code (spaces to tabs, indentation, spacing)
2025-04-23 00:01:53 +08:00
Dragon Slayer
fafa924bed fixed animation
remove oncombathit custom function wasnt needed in uox3 was from distantland
2025-02-22 12:17:49 -06:00
Dragon Slayer
4eb0033ddf
Merge branch 'develop' into checktimesincelastcombat-function 2025-01-28 19:51:18 -06:00
Dragon Slayer
d0af0441a5
Merge branch 'develop' into InstalogOut-function 2025-01-27 21:25:49 -06:00
Dragon Slayer
be72c74ff9
Merge branch 'develop' into checktimesincelastcombat-function 2025-01-27 21:17:26 -06:00
Geir Ove Alnes
276fae3eed
Merge branch 'develop' into special-moves 2025-01-27 02:33:51 +08:00
Dragon Slayer
f46862aacc
Merge branch 'develop' into TurnBoat-Event 2025-01-25 22:26:32 -06:00
Dragon Slayer
dfd702083e tab fixes 2025-01-24 19:27:34 -06:00
Dragon Slayer
e11e2d62c4 fix tabs 2025-01-24 19:14:57 -06:00
Dragon Slayer
062463abf4 Fixed Event
Fixed Oncombathit
2025-01-04 03:42:27 -06:00
Dragon Slayer
375415b0d1 CheckTimeSinceLastCombat
Added CheckTimeSinceLastCombat in (SEFunctions.cpp).
2024-10-14 22:22:57 -05:00
Dragon Slayer
ad394e1f0c CheckInstaLog Added
Added the CheckInstaLog function to check if a specific location is within an instant logout zone (SEFunctions.cpp).
2024-10-14 19:54:36 -05:00
Dragon Slayer
aa0c7c04af onTurnBoat Event
Added new onEvent for Uox3 Js
2024-09-27 22:24:08 -05:00
Dragon Slayer
5cd9eb9e27 onAttack/onDefend Updated 2024-08-13 20:15:28 -05:00
Dragon Slayer
affabd2442 New Event
Added OnCombatHit
2024-05-30 21:38:08 -05:00
Xoduz
4b381eb811 Some minor code style updates
Some minor code style updates
2023-12-18 10:20:26 +08:00
Dragon Slayer
a0dfe5b38f Context Menu Addition 2023-12-17 14:40:23 -06:00
Dragon Slayer
4c533dbbf2 update
Added Features:

Implemented Travel Restriction (js file): Introduced a new JavaScript file to manage travel restrictions within the game. This feature ensures that players adhere to specific limitations when moving between regions.

Reagent Check (js file): Added a JavaScript file to perform reagent checks during gameplay. This functionality enhances the game's mechanics by validating the availability and correct usage of reagents for specific actions.

Check Teleport (js file): Introduced a JavaScript file responsible for validating teleportation mechanics. This addition ensures that teleportation features operate smoothly and efficiently within the game environment.

Updated Dictionaries: Enhanced game dictionaries to improve data accuracy and provide a more seamless gaming experience. The updates include refined descriptions, optimized search functionalities, and improved data retrieval.

Acknowledgments:

Extended thanks to Xuri: Gratitude expressed to Xuri for contributions to the core C++ functionality. Specifically, Xuri's work on the core for GetRegionXY has significantly improved the overall performance and reliability of the game.
Bug Fixes:

[If applicable] Fixed Magic Weapons Damage Calculation (js Magic_Items): Resolved an issue where the damage calculation for Magic Weapons was not set correctly during generation. This fix ensures that Magic Weapons now accurately calculate damage based on the specified settings.
These changes aim to enhance the overall gaming experience, improve system functionalities, and address any existing issues reported by the community.
2023-12-10 21:25:46 -06:00
Dragon Slayer
875a8618a0 Added MoongateFacets Settings
This will add the Moongate Facet Settings to the ini file this also gives use a option to get and set the ini file with a js script.
2023-11-16 20:29:55 -06:00
Lloyd Dilley
bdf3e2192c
Fix compile warnings 2023-07-08 14:25:04 -04:00
Xoduz
7a4a95cd8d Misc minor fixes, network performance increase on Windows
Cleaned up a couple of warnings highlighted by static code analysis
Fixed an issue with NPC evasion pathfinding where the direction wasn't always set correctly
Fixed an issue with onNameRequest JS Event where the size of param jsval (2) didn't match actual number of parameters provided (3)
Removed setting uoxTimeout.tv_usec to 1 in CNetworkStuff::CheckLoginMessage() to address slower core loop iterations on Windows, due to differences in timer resolutions supported by WinSock2 function select() on different platforms - tv_usec 1 is treated as 1 microsecond on Linux/macOS, but as 1 millisecond on Windows
2023-07-02 19:23:21 +08: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
e55eff568e Another small bunches of updates
Fixed an issue with patrolling-portion of hireling script - was incorrectly using Z coordinate as a parameter of WalkTo - should be maxSteps (js/npc/ai/hireling.js)
Added error checking to .WalkTo() and .RunTo() JS Methods that cancels pathfinding attempt if maxSteps provided is zero
Swapped around order of arguments in ScriptError() function in cScript.cpp, so the const char used by va_start() is now the last named argument (thanks ldilley!)
Fixed a socket error with 'move command alias in js/commands/targeting/tele.js (thanks Dragon Slayer!)
2023-06-05 23:14:49 +08:00
Xoduz
3ffbb2b07a Misc fixes for stablemaster script
Fixed status window sex flag not being correctly sent for player characters of a Gargoyle nature (Dragon Slayer)
Fixed some issues with static pet scripts (js/npc/pets/*) that would allow players to exceed max number of followers and/or controlslots when buying animals from animal trainer
Updated OnBuyFromVendor, onBoughtFromVendor, onSellToVendor and onSoldToVendor JS Events to include a fourth parameter - iAmount - the number of items bought/sold
Fixed some issues with stabling and claiming pets from animal trainer NPCs (js/npc/ai/stablemaster.js)
2023-05-30 08:14:36 +08:00
Xoduz
1efce7c7d1 Couple of minor changes 2023-05-30 02:05:37 +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
Xoduz
2958e34dbb Updates to PvP ruleset script and associated changes
Added initial pass for supporting Trammel PvP ruleset, which can be applied to and/or customized per facet and optionally overridden per region via js/server/misc/facetRulset.js (Dragon Slayer)
Misc script cleanup and extension of pvp ruleset script to include target handling for Blade Spirits/Energy Vortex, as well as the Provoke barding skill (Xuri)
Added custom AI scripts for summoned Blade Spirits (js/npc/ai/summon/blade_spirit.js) and Energy Vortexes (js/npc/ai/summon/energy_vortex.js) with updated target selection rules (based on target stats) and checks for active pvp ruleset (Xuri)
Added JS Function to check for existence of a JS event in another file (Xuri):
	DoesEventExist( scriptID, eventToCheck )
Updated scripted magic spells to check for facet ruleset before allowing casting hostile and/or beneficial spells on other players (Xuri)
Added new JS Method for Guilds to check if they are "at peace", i.e. NOT at war with any other guilds (Xuri):
	.IsAtPeace()	// Returns true if guild is at peace, and not at war with any other guilds
Added support for triggering onPickup JS event for Characters, and not just items (Xuri)
2023-05-21 02:14:17 +08:00
Xoduz
b5a7ee9000 BOD System
Created framework, gumps, initial system for Bulk Order Deeds (Dragon Slayer)
Expanded BOD system to include gold, fame and special item rewards (Xuri)
Added optional support for triggering BOD offers from shopkeepers via context menus (Xuri)
Added new UOX.INI section with settings for Bulk Order System: (Xuri)
	OFFERBODSFROMITEMSALES=1 	// If enabled, shopkeepers might offer BODs when players sell items to them
	OFFERBODSFROMCONTEXTMENU=0 	// If enabled, shopkeepers might offer BODs via context menu option
	BODSFROMCRAFTEDITEMSONLY=0 	// If enabled, only selling of crafted items will trigger BOD offers
	BODGOLDREWARDMULTIPLIER=1 	// Reward multiplier for Gold given for completing a BODs - defaults to 1.0
	BODFAMEREWARDMULTIPLIER=1 	// Reward multiplier for Fame given for completing a BOD - defaults to 1.0
Updated smithing-related create DFNs (dfndata/create/*) with proper names for entries (Xuri)
Added special BOD item rewards: (Xuri)
	Sturdy Pickaxe - More uses than normal pickaxes
	Sturdy Shovel - More uses than normal shovels
	Mining Gloves +1/+3/+5 - Boosts mining skill when equipped
	Runic Hammers - Adds bonuses to crafted weapons and armors, applied after crafting the items (js/skill/craft/crafting_complete.js)
	Colored Anvils - No unique property other than color, but can be added to houses as decoration/functional anvils
	Ancient Smithy Hammers +10/+15/+30/+60 - Boosts blacksmithy skill when equipped
	(Not fully implemented, AoS feature) Gargoyle's Pickaxe
	(Not fully implemented, AoS feature) Prospector's Tool
	(Not fully implemented, AoS feature) Powder of Temperament
	(Not fully implemented, AoS feature) Blacksmith Power Scrolls +5/+10/+15/+20
Updated onMakeItem() JS event to always include the create entry ID as a parameter, even when crafting an item failed (Xuri)
2023-03-17 15:51:56 +08:00
Xoduz
6282f976cf Fixes for issues that can lead to server crashes
Fixed an issue where EraStringToNum JS Function would return incorrect values and lead to unexpected behaviour
Added some safeguards against server crashes in onNameRequest() and onTooltip() JS Events
2023-03-10 22:38:53 +08:00
Xoduz
b27d60c1b8 UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
	EraStringToNum( eraString )	// Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
	Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
	GETUO=<sectionID>		// Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
	.hairStyle
	.hairColour
	.beardStyle
	.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
	onMultiLogout( iMulti, cPlayer ) 	// Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
	Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
	SAFECOOWNERLOGOUT=1 	// Allow co-owners to safely and instantly log out inside house
	SAFEFRIENDLOGOUT=1 		// Allow friends to safely and instantly log out inside house
	SAFEGUESTLOGOUT=1 		// Allow guests to safely and instantly log out inside house
	KEYLESSOWNERACCESS=1 	// Allow owner of house to use locked doors in house without key in pack
	KEYLESSCOOWNERACCESS=1 	// Allow co-owners of house to use locked doors in house without key in pack
	KEYLESSFRIENDACCESS=1 	// Allow friends of house to use locked doors in house without key in pack
	KEYLESSGUESTACCESS=0 	// Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
Xoduz
61a2da3501 Misc updates
Extended GetSpawnRegion JS Function to fetch spawn region reference based on a set of coordinates. Supported syntax are now:
	GetSpawnRegion( spawnRegionID )
	GetSpawnRegion( x, y, worldNum, instanceID )
Added new DFN tags for Items and NPC:
	SECTIONID	// Override which [sectionID] is stored for an object
	ORIGIN		// Store reference to which expansion/era of UO an item/NPC originated in
Added new Item/Character JS property:
	.origin 	// Get reference to expansion/era of UO an item/NPC originated in
Fixed an issue with IsInBuilding JS Function which could only handled a limited subset of instance ID values
Corrected name of tag used to attach scripts to ore types - from SCRIPTID to SCRIPT
2022-12-31 18:07:42 +08:00
Xoduz
c531a39b4d Misc updates
Updated dictionary files,
Fixed a bug with the potionKeg script
Fixed an issue with onToolTip function introduced with previous commit
2022-11-27 14:59:31 +08:00
Xoduz
1af502e837 Potion Keg stuff
Implemented potion kegs; these can be crafted by carpenters/tinkerers, and can be used to store potions at a fraction of their original weight (Dragon Slayer)
Only the owner (if locked down), the current holder (if in backpack) or someone who have previously taste identified a potion keg may add additional potions to it (Xuri)
Potions dropped from monsters and bought from stores are unidentified by default, but can be identified by players using the taste identification skill. (Xuri)
Potions crafted by players are identified by default for all to see (Xuri)
Releasing locked down items in houses now set the items as movable (1) instead of client default (0) (Xuri)
Added socket as another parameter to the onToolTip JS event
2022-11-27 14:09:35 +08: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
101ceb679c New JS stuff, creating multis from scripts
Added new JS Events:
	onCarveCorpse( pUser, iCorpse )				// Triggers for iCorpse when being carved by pUser
	onFacetChange( mChar, oldFacet, newFacet ) 	// Triggers for character when moving between facets
	onDyeTarget( pUser, dyeTub, targItem ) 		// Triggers for dyeTub when player tries dying an item
Added new JS Functions to create houses (from house.dfn) and base multis (using raw multi IDs):
	CreateHouse( houseID, x, y, z, worldNum, instanceID );
	CreateBaseMulti( multiID, x, y, z, worldNum, instanceID );
Added new JS Character/Item Method:
	.HasScriptTrigger( scriptID )	// Returns true if script with scriptID is present on object
Added new JS commands for GMs in js/commands/custom/misc-cmd.js
	'addhouse houseID 	// Add house from house.dfn at target location
	'addmulti multiID 	// Add base multi from client multi files at target location
2022-10-20 05:12:13 +08:00
Xoduz
94233bfd52 Fix for help menu script - UOX3 0.99.5b-7
Fixed a missing definition for GetStartTime JS function which would cause an error in the help menu script
Tweaked some messages output to the UOX3 console during startup for improved clarity
2022-08-26 23:15:13 +08:00
Charles Kerr
a9c30281ef char* to string 2022-06-15 19:19:40 -04:00
Charles Kerr
01b46f26db STRINGLIST modernization
NOte, many method calls are passing copies of collections. Did not change, as that could change functionality (unlikely), but this is a syntax only exerersize.

Just changing value (copes) to reference (and provide a const/nonconst method) would see a  noticeable speed difference.
2022-06-06 11:27:53 -04:00
Charles Kerr
d90e16af86 changed defined FALSE/TRUE to intrinsic false/true 2022-06-06 03:55:13 -04:00
Charles Kerr
ba5a763033 Warning changes 2022-03-05 09:12:21 -05:00