Commit graph

122 commits

Author SHA1 Message Date
Xoduz
a1fee724c6 Version number and tag
Bumping version number to tag develop branch before merge of big spidermonkey upgrade
2026-08-13 14:56:35 +08:00
Dragon Slayer
142ce0567e refactor(magic): match reagents by section id 2026-07-24 15:27:40 -05:00
Dragon Slayer
34170ca116 docs(js): replace legacy spell reagent properties 2026-07-22 19:58:54 -05:00
Dragon Slayer
2df6c41673 docs(magic): document extensible spell effects
Document script-owned temporary effect callbacks and effect 44 parameters, add the new events to JavaScript definitions, and describe the REAGENT and SPELLBOOKDATA DFN syntax and compatibility behavior.
2026-07-22 17:22:54 -05:00
Dragon Slayer
8027f925ba
Merge branch 'develop' into Player-Vendor-Upgrade 2026-05-05 21:01:20 -05:00
Xoduz
9f768a467c Fixed issue with NPCs returning to bounding box, added new Character JS properties
- [ADD] The original spawn location is now stored for NPCs when they spawn
- [ADD] Added new character JS properties: .spawnX, .spawnY and .spawnZ. These are primarily used to store original spawn location of NPCs.
- [FIX] Fixed an issue where NPCs would fail in many cases to pathfind back to their bounding box after leaving it. They now pathfind back to original spawn location instead.
2026-04-27 04:12:54 +08:00
Xoduz
d355c4d946 Pathfinding update
- [UPD] UOX3 now supports Z as a third dimension for NPC pathfinding; automatically used in most places in code, it can also be triggered via .WalkTo() and .RunTo() JS Methods, which have been updated to support target Z coordinate. This means NPCs can now navigate up and down stairs, move between floors of buildings, etc.
- [UPD] NPCs will recalculate their path less often now in situations with little-to-no change since last they got a valid path, if they still have remaining steps in their previously calculated path. However, the more time passes from the original pathfind calculation, the more likely it is to retrigger.
- [UPD] Updated 'xwalk and 'xrun GM commands (js/commands/targeting/xwalk.js), hireling AI (js/npc/ai/hireling.js) and Herding skill (js/skill/herding.js) to make use of "3D pathfinding"
- [FIX] Fixed some issues with pathfinding code that could result in invalid results for what should be valid paths
2026-04-26 21:13:48 +08:00
Dragon Slayer
53787b82bd Player Vendor AI 2026-03-12 11:01:58 -05:00
Dragon Slayer
e27338e0f7 Update jsdocs.html 2026-03-12 10:13:13 -05:00
Dragon Slayer
41a13549c6 update docs 2026-03-12 10:08:34 -05:00
Dragon Slayer
4332c49b9c
Merge branch 'develop' into Pet-Bonding-Fixes 2026-03-08 22:05:58 -05:00
Dragon Slayer
ea214d8b55 Added new priv 2026-03-08 18:17:11 -05:00
Dragon Slayer
a57eee1020 Update jsdocs.html 2026-03-08 12:09:59 -05:00
Dragon Slayer
32ee5f989c Update jsdocs.html 2026-03-08 12:02:11 -05:00
Dragon Slayer
1dd354e072 Update jsdocs.html 2026-03-08 11:57:42 -05:00
Dragon Slayer
8635c45cb0 Update jsdocs.html 2026-03-08 01:30:37 -06:00
Dragon Slayer
25df60b6be Update jsdocs.html 2026-03-08 01:28:43 -06:00
Dragon Slayer
2eb77d40c1 Update jsdocs.html 2026-03-08 01:27:36 -06:00
Dragon Slayer
83d559d5b5 Updates/Changes
- [ADD] Added nonMouseClickEvent boolean parameter to onCharDoubleClick() so scripts can detect non-mouse/client-generated character double-click events.
- [ADD] Added new onPaperDoll() JavaScript event for handling paperdoll opening separately from onCharDoubleClick().
- [UPDATE] Updated dismountetherealmount.js, petbonding.js, cow_tipping.js, and mount_restrictions.js for the new onCharDoubleClick() event signature.
- [UPDATE] Updated scripting docs, definitions.d.ts, and event metadata for onCharDoubleClick() and onPaperDoll().
- [FIX] Fixed cases where onCharDoubleClick() scripts could unintentionally react to non-mouse/client-generated self double-click events.
2026-03-08 00:35:13 -06:00
Dragon Slayer
07d10bd246 Update jsdocs.html 2026-03-05 10:55:42 -06:00
Dragon Slayer
fdb86e7656 Update jsdocs.html 2026-03-05 10:34:39 -06:00
Dragon Slayer
34c0235afd couple changes 2026-03-01 22:23:13 -06:00
Dragon Slayer
5da7266503 New Functions and Script Tag
[ADD] Added new DFN tag for spawn regions: ADDSCRIPT
Allows region-based scripts to be attached and executed on spawn events
[ADD] Added new script events:
onSpawn — triggered when an object or character is spawned via a spawn region script
onKill — triggered when a character kills another character
[UPD] Updated documentation to include the new script events and DFN tags
2026-02-18 12:56:17 -06:00
Dragon Slayer
57f0fb8353 Update jsdocs.html 2026-02-14 11:13:33 -06:00
Dragon Slayer
e9e66f672d Update jsdocs.html 2026-02-14 11:11:51 -06:00
Xoduz
38557dc4bc Merge branch 'develop' into pr/511 2026-02-14 14:45:43 +08:00
Dragon Slayer
e20e074810 Misc Changes
[FIX] Resolved socket-related errors in petbonding.js that could cause script failures during bonding interactions.

[ADD] Added missing JavaScript API documentation entries for Console Functions: RegisterConsoleFunc, DisableConsoleFunc, and EnableConsoleFunc.

[ADD] Added missing JavaScript API documentation entries for Town Functions: GetTownRegionFromXY.

[ADD] Added missing JavaScript API documentation entries for Misc Functions: GetMoongateFacetStatus, SetMoongateFacetStatus, GetCharacterCount, GetItemCount, GetMultiCount, GetServerVersionString, and EraStringToNum.
2026-02-13 23:01:07 -06:00
Xoduz
771a56881d PR iteration
- [UPD] Updated FindItem() and FindItemBySection() JS Functions to also find items that are within +/- 5 Z of target location; Z no longer acts as an absolute condition
Added back in the dictionary entries for Dawn's Music Box, which somehow got lost in the first submission
Moved several Event Manager object properties from script to DFN
Added in typedef comments for functions in event manager script
Added in missing code to properly trigger onScriptLoad after script reloads
2026-02-12 02:33:30 +08:00
Xoduz
2ae1b42c08 Event Manager, onScriptLoad, onStart, FindItemBySection
- [ADD] Added new JS Event that runs once for all scripts after shard has fully started up:
  - onScriptLoad()
- [ADD] Added new JS Event that runs for all instances of scripts attached to objects after shard has fully started up:
  - onStart( myObj ) // myObj can be a Character, Item or TownRegion
- [ADD] Added new JS Function to find nearest item with a specific section ID at a given location:
  - FindItemBySection( x, y, z, world, sectionId, [instanceId] )
- [ADD] Added new Event Manager system that initializes on shard startup, which listens to event registrations from other scripts and schedules these events to be run once, a number of times with an interval, or recurring on specific day(s)/time of the week. See UOX3 documentation for full details. System can be enabled or disabled via a new setting in uox.ini:
  - EVENTMANAGERSYSTEM=0/1 // Defaults to enabled
- [ADD] Added a global JS constant to detect in scripts whether UOX3 runs in debug mode:
  - UOX_DEBUG_MODE // Ex: if( UOX_DEBUG_MODE )
- [FIX] Fixed an incorrectly named socket variable in js/item/potion.js
2026-02-07 19:11:59 +08:00
Xoduz
00b50a4123 Extended DoMovingEffect, Updated GetSpawnRegions, Added showspawnregions command
- [ADD] Added new GM command 'showspawnregions (js/commands/targeting/showspawnregions.js) which will visualize all spawn regions within range of targeted location for a short duration
- [ADD] Added new GM command 'spawnregionadmin (js/commands/spawnregionadmin.js) which shows a filterable list of all spawn regions in the game. Clicking the name of the spawn region in the menu will open up the tweak menu for said spawn region. Note that all changes done to spawn regions are temporary in nature, and only last until the next server restart (where it again reads from spawn region DFN files)
- [UPD] Updated 'tweak command to support modifying (temporary) of Spawn Regions. Can be accessed via spawnregionadmin command
- [UPD] Extended JS Function DoMovingEffect to support another optional parameter, a flag to specify if effect is stationary (true) at source location or not (false, default). Updated syntax:
  - DoMovingEffect( srcObject, trgObject, effect, speed, loop, explode, [hue], [renderMode], [stationaryFX] )
  - DoMovingEffect( srcObject, targX, targY, targZ, effect, speed, loop, explode, [hue], [renderMode], [stationaryFX] )
  - DoMovingEffect( srcX, srcY, srcZ, targX, targY, targZ, effect, speed, loop, explode, [hue], [renderMode], [stationaryFX] )
- [UPD] JS Function GetSpawnRegion has been split into two, one that accepts a singular spawn region ID param, and one that accepts coordinates for a location and returns all spawn regions found there:
  - GetSpawnRegion( spawnRegionID ) // Returns reference to specificed spawn region
  - GetSpawnRegions( x, y, worldnumber, instanceID ) // Returns list of references to all spawn regions at specified area
- [UPD] IterateOverSpawnRegions JS function now supports an optional socket parameter, which becomes available as a parameter in OnIterateSpawnRegion event if included
- [FIX] Fixed an issue with Spawn Region JS Objects where the .y1 property would return the same value as .x2
- [FIX] Fixed an issue with js/npc/pets/petbonding.js that prevented successful script compilation
2026-02-03 06:50:42 +08:00
Xoduz
c690738db3 Fix for AddXMFHTMLTok
- [FIX] Fixed a client crash related to AddXMFHTMLTok Gump Method not sending correct number of non-empty cliloc arguments with gump command
2026-02-01 04:07:10 +08:00
Dragon Slayer
db47082ec8 Document Adjustment
-{FIX] Changed few words to match up with there function name and method
2026-01-21 23:42:00 -06:00
Xoduz
4a0b678787 Implementation of speedhack anti-cheat system
- [ADD] Introduction of speedhack anti-cheat system which can detect when players are moving faster than intended and throttle them (default) while also allowing custom reactions via JS events. This system is governed by the following new settings in [anticheat] section of uox.ini:
  - SPEEDHACKDETECTION=1 // Enables/disables speedhack detection system
  - SPEEDHACKTHROTTLEPENALTY=2000 // Movement throttle penalty (in ms) applied when speedhack is detected
  - SPEEDHACKMAXDEBT=350 // Max movement debt (in ms) player can accumulate before throttling occurs
  - SPEEDHACKMAXDEBTAVG=0.5 // Max (moving) average debt as a factor of SPEEDHACKMAXDEBT player can accumulate before triggering logging for suspicious activity
  - SPEEDHACKMAXCREDIT=-75 // Movement credit (in ms) that acts as buffer for regular players against jitter, lag, etc
  - SPEEDHACKGRACETHRESHOLD=2000 // Grace threshold to handle large server/network lag spikes.
- [ADD] Added new JS Events that allow reactions to detection/suspicion of speedhacking:
  - onSpeedHackDetection( pChar, deltaTime ) // Triggers when a player has crossed max threshold for speedhack detection
  - onSpeedHackSuspicion( pChar, rawMoveDebt, deltaTime ) // Triggers when a player has consistently crossed threshold for speedhack suspicion
- [ADD] New JS Socket Properties:
  - .moveDebt // Accumulated time debt in ms indicating whether player's movement packets arrive early (potential speeding) or late (lag)
  - .moveDebtAvg // Accumulated time debt in ms, on average over at least 100 samples
  - .moveBurstAllowance // Number of upcoming movement steps that will be processed without incurring debt or penalty
  - .nextMoveTime // Timestamp in ms for when next valid movement packet is expected to arrive
- [ADD] Added new system timers for Sockets and exposed to JS:
  - TIMER.SPEEDHACKPENALTY // Time until next time player is allowed to move after getting throttled by anti-cheat
  - TIMER.SPEEDHACKLOGGED // Time until next time suspicious speed-hack related behavior is logged
- [FIX] Fixed a 20+ year old movement desynch bug that would cause players to start rubberbanding after taking ~255 steps
- [UPD] Updated UOX3 and JS documentation with entries related to the new anti-cheat system,
- [UPD] Updated dictionary files with new system message for anticheat, and addressed some duplicate ID issues
2025-12-13 01:31:17 +08:00
Dragon Slayer
6ed54b1c2d List of JS Updates Part 2
- [UPD] updated documents was missing .karmaLock
- [FIX] Fixed potion.js had decay when should of been decable.
- [UPD] Updated many JavaScript scripts to use consistent socket naming — standardized all instances to pSocket instead of variations like psock or socket.
- [FIX] Fixed Shrine Script to use the correct karmaLock instead of karmaLocked.
- [ADD] Added null socket checks in scripts to prevent crashes when socket is unavailable.
2025-11-11 17:14:48 -06:00
Dragon Slayer
b4ffe16c18 Update fixes 2025-11-10 21:31:23 -06:00
Dragon Slayer
ecccaa3e2b updates 2025-11-09 16:44:30 -06:00
Dragon Slayer
d6707831ef Update jsdocs.html 2025-11-09 16:32:47 -06:00
Dragon Slayer
bdebed60e7 Update jsdocs.html 2025-11-05 20:43:01 -06:00
Xoduz
9359970ba0 Added server restart functionality
- [ADD] Added functionality to trigger a server restart from within UOX3, either via console ('R'), command ('restart) or JS Console Method (.BeginRestart()). This will first perform a world save, then do a clean shut down before restarting UOX3 in a new process
2025-10-24 16:13:17 +08:00
strattond
298ae2f553 Add onProfile* events. Update JS documentation 2025-08-21 20:47:00 +10:00
Xoduz
bcf1ba09a4 Merge branch 'Guild-Methods' of https://github.com/DragonSlayer62/UOX3 into pr/362 2025-08-05 04:06:07 +08:00
Xoduz
3c4b014d92 Guild-specific updates
- [ADD] Integrated FindGuildId( const CGuild* ) in guild relation functions for better JS mapping (Thanks to Xuri for the base implementation)
- [ADD] Added new JS Function:
 - CreateNewGuild() // Returns the guild object for further setup
- [ADD] Added new Guild JS Methods: .AddMember( targChar ), .AddRecruit( targChar ), .RemoveRecruit( targChar ), .RemoveMember( targChar ), .RecruitToMember( targChar ), .IsAtWar( targetGuild ), .IsAlly( targetGuild ), IsNeutral( targetGuild )
	Added documentation entries for all new guild/character functions and methods
- [ADD] New JS Event that triggers when GUILD button in paperdoll is pressed:
 - onGuildButton( mChar )
- [ADD] Added new Guild JS Property: .id (guild number)
- [ADD] Added new Character JS Property: .guildNumber
- [UPD] Updated Guild JS Methods and renamed them:
 - Renamed .NewMember( trgChar ) to .AddMember( trgChar )
 - Renamed .NewRecruit( trgChar ) to .AddRecruit( trgChar )
 - Renamed .GuildIsAtWar( targetGuild ) to .IsAtWar( targetGuild )
 - Renamed .GuildIsAlly( targetGuild) to .IsAlly( targetGuild )
 - Renamed .GuildIsNeutral( targetGuild ) to .IsNeutral( targetGuild )
- [UPD] Removed Character JS Method .CheckGuild(). Can be checked via .guild and/or .guildNumber properties
- [UPD] 'get command can now be used to fetch guild information for characters. Example: 'get guild / 'get guildnumber
- [UPD] Updated 'add item sectionID command to support optional amount. New syntax: 'add item sectionID amount
- [FIX] Fixed an issue with 'wholist command where characters with serials in the millions would not show up in the list
2025-08-05 04:05:43 +08:00
GO
ee1be12391
Merge branch 'develop' into Guild-Methods 2025-08-05 03:35:21 +08:00
Xoduz
6d383dcfc9 Merge preparation
- [UPD] Updated documentation, readme.md, version number
2025-08-05 03:16:54 +08:00
GO
ddb937e7d8
Merge branch 'feature/GECKO20b12_2011022218_RELBRANCH' into Guild-Methods 2025-07-21 17:24:35 +08:00
Xoduz
e9a74e5f03 UOX3 v0.99.7
Bumped up version number
Added workflow file (github-releases-to-discord.yml) that will publish UOX3 GitHub releases to Discord
Updated UOX3Build.yml workflow file to ignore pushes with "-release" version tags
Updated CMakeLists.txt to include installation rules for creating release packages
Updated readme.md with some up-to-date details and fix for broken build-status badges
2025-07-19 01:11:38 +08:00
Geir Ove Alnes
d5094195d4
Merge branch 'develop' into Pet-Bonding 2025-07-04 03:59:21 +08:00
Xoduz
79694a4e14 Last fix
Excluded player pets from MONSTERSVSANIMALS/ANIMALATTACKCHANCE ini settings; player pets are now always valid targets in combat for NPCs (unless player is a Young character)
2025-07-04 03:16:28 +08:00
Xoduz
2e0af73968 Poison fixes
Fixed an issue with poison damage in combat where the poison resist of the attacker was checked instead of that of the defender
Fixed an issue where the poison details in tooltip of an item would only be visible when equipped, and not visible when kept in backpack
Fixed an issue where if a weapon was destroyed due to corrosion damage, it would not unset the poison strength on the character who wielded it
Added new Character/Item property to track the source (serial) of poison applied to an object. This is available as a JS Char/Item property:
	.poisonedBy // serial of character who applied poison to an object. Set to 0xFFFFFFFF/SE_INVALIDSERIAL() to clear
Updated all code and scripts related to setting/unsetting poison effect on objects to also update the .poisonedBy property
Serial of character who poisoned a character who died while poisoned is now stored on the corpse
Added third optional parameter to Character JS Method .SetPoisoned() that can be used to specify source char of applied poison. New syntax:
	.SetPoisoned( poisonLevel, wearOffTime[, poisonSourceChar ])
2025-07-04 01:17:04 +08:00
Xoduz
98596b9f78 Some minor fixes and updates
Updated UOX3 & JS documentation
Added new JS command: 'seeryell [text] // broadcast message to all with seer privs or higher privs
Added new privilege flag for characters:
	0x20000 - Seer (Character is a Seer)
Fixed an issue where Young players could not direct hirelings to attack valid targets (js/npc/ai/hireling.js)
When buying items from NPC shopkeepers worth more than the BUYTHRESHOLD in uox.ini, the player's backpack is first checked for the required amount of gold, before their bankbox is checked. A new message is displayed about any gold withdrawn from player's bank.
When selling items to NPC shopkeepers that are worth more than the BUYTHRESHOLD in uox.ini, the gold is now deposited directly into the player's bankbox, instead of to their backpack. A new message is displayed about any gold deposited to the player's bank.
Fixed an issue with Shopkeeper AI (js/npc/ai/shopkeeper.js) where the NPC would incorrectly assume player was member of the same NPC guild as them, and provide them with an unwarranted bonus to trade prices as a result
Fixed an issue that prevented players from being able to apply poison to weapons (js/skill/poisoning.js)
Fixed incorrect NPC spawn entry in Khaldun spawn region DFNs: spectralarmour -> spectralarmor
Added entries for Orc Caves/Khaldun to GM travel menu (dfndata/items/travelmenu.dfn and travelmenu.bulk.dfn)
Fixed an issue that sometimes prevented admin characters from seeing offline GMs
Added support for reading SKILLCAPSINGLE ini setting with GetServerSetting() JS function
Fixed issue where animal trainers would give players a random ostard when buying a desert ostard (js/npc/pets/static_ostard.js and dfndata/items/misc/mount-statues.dfn)
Added DFN entries for additional ostard-mount-statues (not sold by animal trainer) that can give user a random ostard, forest ostard or frenzied ostard respectively (dfndata/items/misc/mount-statues.dfn)
Player pets are no longer safe from being attacked from monsters. This also addresses an issue with tamed pets being able to freely attack monsters if player gets the monster's attention first and then kites the monster around while pet kills it. Now monster will properly re-focus to nearest attacker (including pets) if original target is too far away
Fixed incorrect command-levels for GMs for hard-coded commands listed in commands.dfn
Added support for specifying minEra,maxEra value pair for teleport locations in js/teleport.scp. These can be used to define the minimum and maximum era a given teleport entry should be active for. The values for these default to -1, unless otherwise specified. Updated teleport entry format:
	sourceX, sourceY, sourceZ, targX, targY, targZ, [sourceWorld, targWorld[, minEra, maxEra]]
Updated teleport entries for Yew <-> Heartwood to only be active for ML era shards and above (js/teleport.scp)
Updated regions for Moonglow and Skara Brae to properly cover dock areas (dfndata/regions/regions.dfn)
Added missing dictionary entries related to poison/corrosion update
Added some missing details for poisoning skill (js/skill/poisoning.js) and arms lore skill (js/skill/armslore.js)
Added missing details for 'tweak (js/commands/targeting/tweak.js), 'get and 'set (js/commands/targeting/get.js and set.js) commands related to poison charges and poison strength on items
Updated poison strength of poison elementals [poisonele] from 4 to 5 (dfndata/npc/elementals.dfn)
Fixed an issue with Spawner Object Editor where state of "Use Spawnlist" checkbox would not be read correctly if no "Spawner Type" radio buttons were selected (js/server/misc/spawner_editor.js)
2025-07-02 03:11:29 +08:00