Commit graph

111 commits

Author SHA1 Message Date
Xoduz
7a3f4c5144 Updated calculations of magic and/or poison resistance to also include magic and/or poison resistance from races
Updated calculations of magic and/or poison resistance to also include magic and/or poison resistance from races
2025-07-04 02:10:29 +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
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
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
Geir Ove Alnes
3d1ea6ac00
Merge branch 'develop' into AOS-Properties-Regenation 2025-04-20 07:10:35 +08: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
Dragon Slayer
cb1a3c7471 changes 2025-03-04 15:25:53 -06:00
Dragon Slayer
bccb159a2c couple changes 2025-03-04 14:58:49 -06:00
Dragon Slayer
69cd5a0501 Updated with new ini 2025-02-23 18:10:20 -06:00
Dragon Slayer
9c7217cd80 Damage Increase
Damage Increase Property increase damage by a percentage
2025-02-23 17:11:14 -06:00
Geir Ove Alnes
76ec6add30
Merge branch 'develop' into Hit-Animation-for-Combat 2025-02-23 03:05:27 +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
7fcd614997 small change to arrow shooting 2025-02-16 14:54:40 -06:00
Dragon Slayer
2f41287a3a Added Play Hit Animation 2025-02-16 02:19:02 -06:00
Dragon Slayer
d2348aca19 Corrections 2025-02-11 18:51:04 -06:00
Dragon Slayer
e8ed90d2b2 Updated caps in code
Updated so the caps in code are now getting the cap  from Users skill.
2025-02-10 23:43:54 -06:00
Dragon Slayer
677ff2b5ad update 2025-01-29 09:37:48 -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
Geir Ove Alnes
4f59ae3909
Merge branch 'develop' into onAttack-and-onDefense-Update 2025-01-26 11:54:10 +08:00
Dragon Slayer
21dd165a7d tabs 2025-01-25 17:04:45 -06:00
Geir Ove Alnes
4fb3d038a0
Merge branch 'develop' into Swing-Speed-Increase 2025-01-25 23:55:45 +08:00
Dragon Slayer
d45a00e3ae Update combat.cpp 2025-01-25 08:13:53 -06:00
Geir Ove Alnes
7aa2e8711f
Merge branch 'develop' into special-moves 2025-01-25 17:41:40 +08:00
Geir Ove Alnes
3d33f64157
Merge branch 'develop' into combat-fix 2025-01-25 17:18:28 +08:00
Geir Ove Alnes
c3f153ff3c
Merge branch 'develop' into Hit/Defense-Chance-Bonus 2025-01-25 15:56:06 +08:00
Dragon Slayer
e11e2d62c4 fix tabs 2025-01-24 19:14:57 -06:00
Dragon Slayer
493d237163 small change 2025-01-24 18:56:21 -06:00
Dragon Slayer
492ef70fcb Fix for Defense
Neg Damage Does not take into account the attacker skill no longer. Only the Armor perc
2025-01-21 13:58:04 -06:00
Dragon Slayer
9b9f90d8b0 update 2025-01-14 23:28:03 -06:00
Dragon Slayer
1717709103 Fixed Weapon Swing Delay
Now you can create a curse state with he swing delay to help balance them magic weapons
2025-01-14 23:04:16 -06:00
Dragon Slayer
e56f4391dc Update combat.cpp 2025-01-04 03:48:50 -06:00
Dragon Slayer
375415b0d1 CheckTimeSinceLastCombat
Added CheckTimeSinceLastCombat in (SEFunctions.cpp).
2024-10-14 22:22:57 -05:00
Dragon Slayer
5cd9eb9e27 onAttack/onDefend Updated 2024-08-13 20:15:28 -05:00
Dragon Slayer
ced101feeb fixes 2024-06-16 02:33:09 -05:00
Dragon Slayer
81425cc261 fixed Era 2024-06-16 02:14:38 -05:00
Dragon Slayer
3e7e8bccb3 Swing Speed Increase 2024-06-16 01:37:31 -05:00
Dragon Slayer
363ce296c4 Hit/Defense Chance Properties 2024-06-14 14:38:03 -05:00
Dragon Slayer
affabd2442 New Event
Added OnCombatHit
2024-05-30 21:38:08 -05:00
Dragon Slayer
12d3e6686a Missing Wand ID's 2024-05-27 16:58:40 -05:00
Xoduz
667f948be3 0.99.6-RC6x
Added dummy context restore function to additional scripts
Updated 'go command to support specifying location to teleport to by name, mapped to locations from locations.dfn (Thanks Dragon Slayer!)
Updated Smart Turn script for furniture (js/server/misc/furniture_smartturn.js) with more optimized code (Humility)
Fixed latitude/longitude output of GetMapCoordinates helper function (js/server/data/map_coordinates.js), and updated scripts that relied on it
Fixed an issue where trying to craft fletching tools would produce hatchets instead (js/skill/craft/fletching.js)
Updated js/item/bankcheck.js to display value of checks using onTooltip JS Event, or onNameRequest JS Event if tooltips are disabled
Fixed a couple of DFN formatting issues (thanks, punt)
Fixed an issue where blank deeds (and bank checks) would be pileable if dropped on the same container (dfndata/items/tools/inscription.dfn)
Added dedicated [bankcheck] DFN item (dfndata/items/misc/money.dfn)
Updated Banker AI script (js/npc/ai/banker.js) to use dedicated [bankcheck] item instead of blank deeds as base for bank checks, and to have banker NPCs pause and turn towards player when talked to
Fixed an issue with script for Healing/Veterinary (js/skill/healing.js) which incorrectly used Anatomy as supplementary skill for Veterinary instead of Animal Lore, and which checked dex of wrong character when calculating healing slips
Added two missing tile flags to tileflag enum that threw order of such flags added with HS expansion out of order (thanks, punt)
Fixed an issue with travel-commands in GM menu which handled travelling between facets incorrectly
Added region spawners for dungeons, towns and overworld in Ilshenar facet
Enabled Trammel and Ilshenar facet decorations/spawns by default in admin welcome script (js/server/misc/admin_welcome.js)
Reworked portions of admin welcome gump to display optional "addon" decorations per facet, which might be client/era-specific (js/server/misc/admin_welcome.js)
Added new NPCs to dfndata/npc/femalehuman.dfn: f_executioner, f_chaosdragoon, f_chaosdragoonelite, f_gypsybanker
Added new NPCs to dfndata/npc/femalevendors.dfn: f_gypsymaiden, f_gypsyanimaltrainer, f_gypsyfortuneteller, f_vagabond, f_ironworker
Added new NPCs to dfndata/npc/malehuman.dfn: m_executioner, m_chaosdragoon, m_chaosdragoonelite, m_gypsybanker
Added new NPCs to dfndata/npc/malevendors.dfn: m_gypsyanimaltrainer, m_vagabond, m_ironworker
Added new NPC to dfndata/npc/miscmonsters.dfn: darkwisp
Added new NPC to dfndata/npc/undead.dfn: ancientlich
Added new Item DFNs for "camps" that when spawned will create a camp with specific decorations ([ilsh_orc_camp], [ilsh_healer_camp], [ilsh_mage_camp], [ilsh_banker_camp])
Added scripts for camps (js/item/camps/ilsh_banker_camp.js, js/item/camps/ilsh_healer_camp.js, js/item/camps/ilsh_mage_camp.js, js/item/camps/ilsh_orc_camp.js)
Added new colorlist to dfndata/colors/colors.dfn: [RANDOMCOLOR 33] (Bright Primary Colors)
Fixed an issue with gargish cloth chest DFN which prevented LBR version from working properly (dfndata/items/gear/armor/gargish_armor/gargish_cloth.dfn)
Added a bunch of new NPCLISTS in various npclist DFN files to support regional spawns in Ilshenar
Added missing BACKPACK tag to [golem] NPC DFN (dfndata/npc/clockwork.dfn)
Fixed misspelled section header for Fire Elemental NPC - from firele to fireele (dfndata/npc/elementals.dfn)
Murderous brigand NPCs are no longer willing to teach players skills (dfndata/npc/femalehuman.dfn, dfndata/npc/malehuman.dfn)
Corrected coordinates of Rock Dungeon region (dfndata/regions/regions.dfn)
Added regions for Sea Market (Felucca/Trammel), Blackthorn Dungeon (Felucca/Trammel) and Lakeshire (Ilshenar) (dfndata/regions/regions.dfn)
Fixed an issue with 'radditem and 'raddspawner GM commands which would not correctly set the Z of the added item/spawner to match target location (js/commands/custom/repeatingcmds.js)
Added two new repeating commands (js/commands/custom/repeatingcmds.js):
	'rmovable #	// Repeats bringing up targeting cursor to set movable property on multiple objects
	'rnodecay	// Repeats bringing up targeting cursor to set decayable property to false on multiple objects
Added new areacommand (js/commands/targeting/areacommand.js):
	'areacommand name [string]	// Sets name of all objects within targeted area to [string]
Updated 'decorate command script to better handle flags passed in via admin welcome script for things like facet addons (js/commands/decorate.js)
Updated fire breath script (js/npc/special/fire_breath.js) to get fire breath info per NPC based on their sectionID rather than their base body ID
Updated facet ruleset script (js/server/misc/facetRuleset.js) with an override for GMs trying to snoop players even in places where snooping is disallowed
Updated facet ruleset script (js/server/misc/facetRuleset.js) to allow damage that's not coming from a player/NPC source even in Trammel/Ilshenar
Added teleport locations for entering/leaving Blackthorn Dungeon in Felucca/Trammel (js/teleport.scp)
Updated 'remove and 'rremove commands to release any targeted objects from potential multis they are locked in to properly update lockdown count (js/commands/targeting/remove.js, js/commands/custom/repeatingcmds.js)
Updated felucca/ilshenar world templates with decorations (js/jsdata/worldtemplates/felucca_*/ilshenar_*)
Added world templates with decorations for Trammel (js/jsdata/worldtemplates/trammel_*)
Added DFN entry for Power Generators, and spawn entries for these in Ilshenar (dfndata/item/puzzles/puzzles.dfn, dfndata/spawn/ilshenar/spawn_ilshenar_world_general.dfn)
Added script for Power Generators, which initializes random puzzles on creation and rewards player with diamonds/arcane gems/shadow iron ore when solved, or lightning when failing to solve (js/item/power_generator.js)
Added support for overriding newbie-state of items added to players via dfndata/newbie/newbie.dfn. Supported syntax:
	PACKITEM=sectionID[, amount[, newbieFlag]] 	// To use newbieFlag with PACKITEM, amount must also be specified. Flag can be 0/1
	EQUIPITEM=sectionID[, itemHue[, newbieFlag]	// To use newbieFlag with EQUIPITEM, itemHue must also be specified. Flag can be 0/1
Casting the Earthquake spell will no longer affect the caster, or cause them to become criminal when cast out of town with no impacted targets
Fixed a bug where caster would remain frozen after finishing casting targetless spells like Earthquake
Fixed a bug where caster would remain frozen if spellcast was cancelled half-ways through by picking up or equipping an item
Fixed a bug where caster would remain frozen if spellcast was interrupted by losing concentration from taking melee damage in combat
Fixed a bug where a paralyzed player would remain frozen even if taking magic or poison damage, which releases them from paralyzis
Fixed a bug where target of Paralyze spell would not visually be shown as frozen in target's client
Fixed a bug where a caster frozen while casting a spell could become unfrozen mid-cast because of incoming magic damage
Address overflow issue in MultiMul.cpp (punt)
Address various cast issues (punt)
Corrected jscript project, to not include two files that where for stand alone programs (and resulted in main being added twice in the library (and once was incorrect all ready). (punt)
Replaced RoundNumber with std::round (punt)
The original physical appearance of characters targeted by 'make admin/gm/cns is now kept track of, and restored upon being targeted by 'make player
Fixed an issue where the .HasSpell JS Method was off by 1 when looking for specific spells in player's spellbook, due to 0-based array indexing in code vs 1-based indexing for Spells in DFNs
2023-10-14 05:03:53 +08: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
bf4d4d362e Couple of more fixes
Fixed client freeze after login for sub-7.x clients, caused by sending an unsupported animation packet; FORCENEWANIMATIONPACKET will now not be enabled if support for client versions below 7.x is enabled
Added function _restorecontext_() {} to a couple more scripts:
	js/commands/targeting/set.js
	js/commands/decorate.js
	js/commands/go.js
Fixed an issue with 'xgo command that would prevent it from working properly (js/commands/targeting/x.js)
Fixed an issue with teleport function in help gump which prevented pets from teleporting with player (js/server/misc/helpgump.js)
Fixed an issue with players in some cases getting toggled out of combat mode visually on other clients even though they were still in combat mode (when target dies, resurrection of ghost in combat mode, etc)
Players no longer see a message above their character's head about their own character attacking other characters
2023-06-09 20:20:48 +08:00
Xoduz
c120679695 Pets and followers mini-revamp
Added new protected property for CChar class to track a player's currently controlled pets/followers/summons, and renamed the on tracking all pets owned:
	GenericList<CChar *> activeFollowers
	GenericList<CChar *> petsControlled -> petsOwned
Added new JS Character Methods to view/manipulate follower list:
	GetFollowerList()
	AddFollower( npcObject )
	RemoveFollower( npcObject )
Added new JS Character Property to fetch current count of followers character has:
	.followerCount
Added new GM commands for spitting out information on all pets/followers a player has, in the following format: Name: %s | ID: %i | Serial: %i | x: %i | y: %i | z: %i | world: %i | instanceID: %i
	'listpets
	'listfollowers
Replaced most instances of GetPetList in code and scripts with GetFollowerList, as that's what we actually care about for the most part
Updated code and relevant scripts to make use of AddFollower and RemoveFollower functions where appropriate
Modified code for restoring pet loyalty upon feeding pet; by default it now restores 10/100 loyalty per time pet is fed, while if CoreShardEra setting in UOX.INI is set to AoS expansion or higher, loyalty is instantly restored to max when pet is fed (regardless of amount)
Updated AreaCharacterFunction and AreaItemFunction JS Functions to still work if third parameter (socket) is provided as null
Modified code and relevant scripts that teleport pets/followers along with player to only do so for pets/followers using the "follow" wandermode with player as follow target
Updated some instances of code and script that checked for both controlSlot AND maxFollowers requirements - now only checks maxFollowers if controlSlots is set to 0 in ini
Added function _restorecontext_() {} to a couple more scripts:
	js/commands/targeting/tele.js
Updated error message shown when attempts are made to add deleted objects to refreshQueue, to include name, ID and serial of the object in question
2023-06-02 01:44:40 +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
da4a32c7bd Misc fixes
Fixed an issue where casting Wall of Stone inside a multi would lead to the wall of stone never expiring, because it was not correctly marked as a field spell
Reduced combat message spam; attacking messages now only appear when attacking targets who are not already fighting the attacker
Added a new character state - "passive combat mode" - primarily used by players when they tab out of combat. Tabbing out of combat will prevent the character from retaliating in combat if they're already fighting someone
Fixed several issues with dropping items through floors, tables and generally not being placed correctly when dropped inside multis
Hard-defined the Z-level at which some jewellers in Britain spawn to deny them rooftop access (spawn_felucca_town_britain.dfn and spawn_trammel_town_britain.dfn)
Added system messages informing shard staff with elevated command privileges why they are getting 100% skill check success, and no spellcast delay
2023-03-17 16:01:22 +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