Dates are in DD/MM/YYYY format.

---- 0.56d (former eXperimental branch, now simply Sphere-X, forked from 0.56d) --------------------------------------------------------------
---- 11/04/2016

10-04-2016, Coruja
- Changed: Food level won't decrease on GM chars anymore.
- [sphere_msgs.scp]: Removed messages 'npc_text_murd_*'.
- [sphere_speech.scp]: Moved hardcoded speech commands 'I must consider my sins', 'I resign from my guild' and 'I resign from my town' to scripts.
	IMPORTANT: It's HIGHLY recommended update this script, or these speech commands will stop working.

18-04-2016, XuN
- Removed TAG.OVERRIDE.MAXWEIGHT and added ModMaxWeight on it's place for Banks and Corpses.
- Fixed stackable items not checking maxweight on corpses.
- Removed all references to MEMORY_WAR_TARG since they are not needed anymore, targets are handled by 'Attacker' now.
- Added back old HitChance formula under CombatDamageEra = 0
- Updated checks on @NotoSend trigger: it will not check anymore if ARGN1 > NOTO_INVUL, so you can create custom notoriety.

19-04-2016, Coruja
- Fixed: Protection spell not working correctly if COMBAT_ELEMENTAL_ENGINE combat flag is disabled.


---- X1 (Milestone 1 opened) ------------------------------------------------------------------------------------

14-05-2016, XuN
- Fixed: Pets not gaining Karma (it can be blocked through @KarmaChange trigger, no reason to stop it from the source).
- Fixed: Killing pets and/or bonded pets not giving karma (same reason as above).
- Fixed: Hits being canceled when going out of range and COMBAT_STAYINRANGE was enabled, it should happen when it is disabled.
- Fixed: Attack delay broken when COMBAT_PREHIT is disabled because of using as SetTimeOut animDelay instead of iSwingDelay.
- Fixed: Weird crash related to a change on CChar:OnTick()
	(Not really fixed, just reverted the code because I couldn't track what is exactly causing it and seems to happen when there are ~100 clients
	 online, so I'm not going to mess a lot with it, it's not cool to use 100 players to do tests :) ).
- Attempt to log and stop a crash related to the CNetworkOutput.
- Fixed: NPC_FightMagery not correctly checking if the NPC can use magic skills and creating some infinite loops under certain circumstances.

15-05-2016, XuN
- Updated Fight_IsActive function with NPC's skills and one Attacker's check.
- Fixed: NPCs not ending combat when their target is far away from them and calling Attacker_Delete() @CombatDelete with argn=2 (Distance) to give control over it.
- Fixed: GUARD ME making pet following you instead of guarding you (Thanks Shamino).
- Fixed: NPCs being dumb before they reach their target.
- Updated a bit CChar::OnTick.

17-05-2016, Nolok
- Fixed: speech color for NPCs on Enhanced Clients being always "yellow". Achieved this by forcing (only for EC) system (0) talkmode instead of say (3).
	This workaround works only if the speech packet sent by Sphere is Unicode (instead of ASCII), so you'll need to set SAY_DEF_UNICODE in sphere_msgs.scp to 1.
- Added: SpeechColorOverride property (players only, R/W) to override client speech hue. (CHANGED in 01/11/2018)
	This will not affect Words of Power hue, you can use spell triggers for this (WOP hue on Enhanced Client will still be set by the client, regardless of the hue sent by the server).
	SpeechColorOverride = 52 (or 0x34), which is the default yellow hue for player speech, disables the override.
	Remember: SpeechColor property is read-only for players and R/W for NPCs. For players, it contains the last speech hue sent by the client. For NPCs, its value
		will be used to set their speech hue.
- Fixed: SpeechColor not overriding the speech hue for NPCs. SpeechColor = 946 (or 0x382), which is the default gray hue for NPC speech, disables the override.
- Changed: If a hue is not specified, SAY and MSG will use SpeechColor or, if set, SpeechColorOverride.

19-05-2016, Nolok
- Fixed: wrong parsing when an unicode prompt response packet is received.

29-05-2016, Kaylala (Khaos)
(Source)
Gump Enums, New Container Defines, Misc Switches from Prop Attributes to Flags, Added AlterItem Prop.

- Added: uofiles_enums.h - New Gump Enums for several new containers, cards, and other miscellaneous assets.
- Added: CContainer.cpp - definitions for the new Container Gump assets.
- Updated: Tables - Removed Only<Race/Sex> as these are unused.
	Split the NoDropTrade back into separate flags as they also have separated CliLocs.
	Moved over Balanced, BattleLust, and BloodDrinker as they are now being checked as Item Attributes.
	These all are now stored on Items only.
	cItemBase_props.tbl had AlterItem added to it.
- Updated: Several old Props that are checked in Can's and Attr.
	These got a minor update switching the checks to force any 1 set in individual props to just work with those Can's and Attr's.
- Added: New Attr list from base pack reflecting EA attributes and changes from some props to a more appropriate Attr setting where no values are truly needed.
	This should save on some memory consumption.
Note: More needs to be switched over and I am trying to get this and the Base Packs completely up to date and somewhat synchronized with the most efficient methods Xun and I can think of.

30-05-2016, XuN
- Fixed CanUse not inheriting from the higher item (ie: i_boomerang_blah not inheriting CanUse from i_boomerang).
- Fixed Statf_War not clearing in every situation when calling Attacker_Clear().
- Added RecipeAlchemy,RecipleBlacksmith, RecipeBowcraft, RecipeCarpentry, RecipeCartography, RecipeCooking, RecipeInscription,
	RecipeTailoring, RecipeTinkering (all of the current SKF_CRAFT skills).
- Changed back Region Flags to dword, they do not need to store higher values yet.
- Added PayGold() method to control payment values with it's own trigger:
  ON=@PayGold:
	Argn1 = Gold to pay.
	Argn2 = Payment type ( 0 = Train, 1 = Buy , 2 = Hire).
	src = The NPC receiving the money.
	argo(if any) = The stack of gold used to pay (ie: training)

- OWNER is now RW, it can be used to set NPC's owner directly without the need of custom functions.
- Added NEWSUMMON, working as NEWNPC and NEWITEM, eg:
	serv.newsummon=c_ogre,15
	new.p=<p>	// Will summon an ogre for 15 seconds on your position, not giving
  the second param will result in default timer according to your magery skill.

29-05-2016, Kaylala (Khaos)
- Updated: Tables - Removed Balanced, BloodDrinker, and BattleLust from BaseBaseDef tables
  and CObjBase tables since they were moved. Moved Bane and SplinteringWeapon to CItem tables.
- Added: Attr_SplinteringWeapon to CItem.h.
- Added: SplinteringWeapon, Balanced, and Bane to Item Properties and removed them from Obj
  handling. All now use ATTR_*.
- Added: Missing recipes: RecipeMasonry and RecipeGlassblowing. They might not have their
  craft skills, but they have recipes and synergy with Carpentry and Alchemy. Separated as
  they would on EA for others using a custom system.

30-07-2016, Nolok
- Updated the README.md file with fundamental informations about this fork.
- Fixed: REGIONTYPE section could not accept landtile types with index > 163. Extended this limit to 255.
	This also extends the maximum number of pages in a book.
- Fixed: Sphere crashing sometimes just before saying Defmessages: npc_generic_gone_1 and npc_generic_gone_2.
- Changed: The redefinition of a resource will always be notified, even without DEBUGF_SCRIPTS enabled in Sphere.ini.

 30-12-2016, Nolok
 - Fixed EFFECT duration (bLoop variable) on Enhanced Client. Given the same bLoop or the same packet, Enhanced Client shows the effect for a much shorter amount of time
	than Classic Client. To be the EFFECT statements more portable between the two clients, if the client is the EC then bLoop is multiplied by 3.

10-05-2017, Nolok
- Fixed: Resources page not being stored correctly. This solves a bug with books and REGIONTYPEs.
- Fixed: <ACTION> returned the skill defname but its value could only be set via the skill key
	(example: <ACTION> returns skill_hiding, but ACTION=skill_hiding didn't activate the skill, you need to use ACTION=hiding).
	Solved this dicrepancy making ACTION return the skill key. Compatibility with older scripts is
	not broken, since the skill key or defname can be compared regardless to both another key or defname.
	-> This fixes also ACTION being stored in saves (via skill defname) but not set at the server startup.
- Changed: ACT and ACTP are now stored in the save files, in order not to break actions performed during the save process
	at the server restart.
- Fixed: TAG.MATOVERRIDE containing wrong or no defname.
- Fixed: Server crashed when calling some functions with invalid argument (IsDigit, IsSpace, IsAlpha, IsAlnum).
- Changed: Added/removed some debug and warning messages; updated some other messages and enabled them also in non-debug builds.
	-> Consider now the debug build as usable (it's pretty useful for finding bugs in the source or in the scripts).
- Changed: Increased the text capacity of the console on Windows.

12-05-2017, Nolok
- Fixed: PARTY.CREATE wasn't working properly.

13-05-2017, Nolok
- Added: Now BOUNCE calls triggers @DropOn_Self and @ItemDropOn_Self on the char's backpack.
	If a RETURN 1 is performed and a new CONT has not been set via scripts on the trigger call, the item is dropped on ground,
	otherwise the item is left in the new CONT.
- Fixed: Item drop sound not being played if BOUNCE dropped item on ground.

16-05-2017, Nolok
- Added: Now FACE can also accept the coordinates of the point towards which the char should look.
- Added: Now ACTP behaves like every other point (so you can also extract x, y, z, statics, etc).
- Fixed: RESMAKE returning val and key without a space character to separate them (e.g.: 2Logs).

20-05-2017, Nolok
- Added: Print the stack trace when an ASSERT fails, in order to ease the debug process.
- Changed: Better formatting of the stack trace.

22-05-2017, Nolok
- Fixed: Garbage Collection deleting (and reporting) only a fraction of the unplaced objects. Fixed also incorrect formatting of the "invalid code".
- Added: Now the Garbage Collection report prints the script file name and the line where the object was created.
	This only works for objects added in the scripts through the keywords: NEWITEM, NEWNPC, NEWSUMMON, NEWDUPE, DUPE (and ITEM/ITEMNEWBIE since 24/09/2017).

04-07-2017, Nolok
- Fixed: random ranges ( e.g.: {i_dagger 1 i_gold 1} ) sometimes returned a totally random and unexpected value.
	If the value was used to create an item, it could either create a random item or not create it at all, without logging any error.
- Fixed: vendors couldn't re-sell the items bought from the players.
- Fixed: with the current User Interface (the blue one, not the orange which is older) of the Enhanced Client, in the buy gump
	the paperdoll of the vendor often was missing on the left.

	IMPORTANT: with the same UI of the EC the buy gump may not work, because it doesn't show the items in stock.
		This occurs with the new UI (blue) and not with the old (orange) because the new one wants the vendor to have
		its name inclusive of the title. If the "the" keyword and the following title aren't found, the code of the interface
		generates an internal error and halts the execution of the remaining code (which renders the items in the list).
		As example: if the vendor name is Greg the items don't show, but if you set the NAME (and not the TITLE property)
		to Greg the Butcher ("the" word is mandatory) the items are finally shown.
		Since the client retrieves the name with the tooltip data (Cliloc 1042971) the server sends, if you want a workaround
		to this requirement, you can leave untouched the NAME property and send a custom name cliloc which contains also the work/trade title:
			ADDCLILOC 1042971, <NAME> The <QVAL <ISEMPTY <TITLE>> ? Vendor : <TITLE>>

- Fixed: Tracking skill could not track brain_berserk npcs.
- Changed: updated error and warning messages related to resources redefinition.

04-09-2017, Nolok
- Added: the ID of an item can be overridden after its creation by a random template (which must return a non-container type item).
	Remember though that this is inefficient and that the preferred way is to use a { } random range.

20-09-2017, Nolok
- Fixed: very old bug which caused arguments of scripts instructions being silently parsed in the wrong way (if they
	contained a {} range) and generating unwanted behaviour. Example: parsing "SOUND {2 3}, 1" resulted in reading 3 arguments
	"{2", "3}", "1", instead of 2 "{2 3}" and "1".
- Changed: removed the '-' symbol as a range argument separator.
- Updated: now, when parsing weighted ranges, only the randomly extracted argument will be completely parsed and resolved,
	instead of parsing recursively each argument of the range. Maybe, this can reduce the cpu usage on big servers by a little.

21-09-2017, Nolok
- Fixed: getting the name from a name pool sometimes failed.

22-09-2017, Nolok
- Fixed: since adding an item to an NPC triggers @(Item)EquipTest trigger, doing RETURN 1 in @EquipTest or @ItemEquipTest resulted in the object created
	but not placed in the world. Now, if the character is an NPC, the item is automatically bounced into the pack even if doing RETURN 1.
- Changed: @EquipTest and @ItemEquipTest triggers are now called only when trying to equip equippable items. Before, they were called also when dropping or
	creating an item to be equipped or bounced to the pack of a NPC.

24-09-2017, Nolok
- Fixed: TDATA3 and TDATA4 for t_container were not working.
	TDATA3 stores the minimum X of an object placed inside a container as the first 16 bits, while the last 16 bits store the minimum Y.
	TDATA4 stores the maximum X and maximum Y in the same way. Example:
	TDATA3=((45 << 16) | 65)	// MinXY = ((X << 16) | Y)
	TDATA4=((100 << 16) | 100)	// MaxXY
- Added: the Garbage Collection report prints the script file name and the line where the object was created also for items created with ITEM or ITEMNEWBIE keywords.
- Fixed: Linux console not showing colored text.
- Fixed: Linux version crashing during the shutdown cleanups.

29-09-2017, Nolok
- Fixed: ACTARG1/2/3 values being zeroed or corrupted after the execution of any skill trigger.
	Now they are zeroed before the @PreStart trigger (so after @Select) and	when we are done with the skill (success, abort, failure).
	! As of r2567 (of 05-10-2017) this cleanup isn't done anymore before the @PreStart trigger but only at the end of the skill!
	Also ACTDIFF is now set and cleared in the same situations of ACTARGs.
- Fixed: FORCONT, FORCONTID, FORCONTTYPE second argument (the maximum number of subcontainers to be searched in) could only be a plain number, not an expression.
- Fixed: for crafting skills, crafting difficulty didn't increase with the required skill value.
- Added: for skills Enticement, Peacemaking and Provocation, if ACTARG1 is set to the UID of the instrument to play, it will be played the sound of that instrument.
- Added: TAG.BARDING.DIFF is now used to determine the difficulty of Enticement, Peacemaking and Provocation skills. If this tag isn't set, the old behaviour is used.

10-10-2017, Nolok
- Fixed: object created but not placed in the world when trying to make a player equip non-equippable items; now they are bounced to the pack.
	This fixes also the items in the NEWBIE section not being added (sometimes, and for some kind of items) at the character creation.
- Fixed: bug occurring when doing REMOVE and RETURN 1 in @(Item)EquipTest trigger fired on an NPC.
- Changed: ACTARG1/2/3 values are now cleared only when we are done with the skill (success, abort, failure).

21-10-2017, Nolok
- Fixed: if the client's LIGHT property was set, the Night Sight flag was ignored when calculating the light level to send to the client.
- Fixed: the client didn't get the new light level nor when the sector's LIGHT property was overridden, neither when the client's LIGHT property was changed.
- Added: warning message if AllowLightOverride ini flag is set to 0 but we are trying to manually set the sector's LIGHT property.

22-10-2017, Nolok
- Fixed: when using the meditation skill, if the SKF_NOSFX flag was set, the bufficon wasn't added.
- Fixed: ACTARG1/2/3 weren't zeroed at skill success, abort or failure if the SKF_SCRIPTED was set.
- [Port from 0.56d, 13-02-2017, Coruja] Changed: Spellbooks now store spell offset / max spells using TDATA3/TDATA4 instead MOREZ/MOREX.
- [Port from 0.56d, 21-04-2017, Coruja] Changed: Mount memories now can have their own i_mt_* ITEMDEFs instead use DEFNAME=i_mt_* directly on base items (usually 'boat parts').

23-10-2017, Drk84
- [Port from 0.56d, 14-02-2017, Coruja] Fixed: Combat Hit Chance formulas incorrectly assuming that defender is always using the same combat skill as the attacker.

24-10-2017, Drk84
- [Port from 0.56d, 19-09-2017, Coruja] Fixed: Client 'Open Spellbook' macro making the client crash if it tries to open the requested spellbook gump when the spellbook item is not loaded yet.

24-10-2017, Nolok
- Fixed: using ADDCIRCLE without the second argument caused sphere to crash. Also, its use on non t_spellbook items was incorrectly allowed.
- Fixed: MODMAXWEIGHT of a new player or item was a random number instead of zero.
- Fixed: corpse MORE2 held an invalid UID instead of the killer's.
- [Port from 0.56d, 15-10-2017, Coruja]
	Fixed: MODMAXWEIGHT property not working correctly.
	Changed: Updated 'weight' tooltip on containers.

24-10-2017, Drk84
- [Port from 0.56d, 27-09-2016, Coruja] Fixed: Worldsave not saving DAM/ARMOR properties set manually on chars/items already placed on world.

28-10-2017, Drk84
- [Port from 0.56d, 08-05-2016, Coruja] Fixed: Explosion potions not working correctly.
- [Port from 0.56d, 07-02-2017, Coruja] Fixed: Hidden/Invisible chars not getting revealed when being stumbled.

29-10-2017, Nolok
- Added: now the logout console message shows also the character's name.

30-10-2017, Drk84
- [Port from 0.56d, 17-10-2016, Coruja] Fixed: NPCs losing 'statf_spawned' flag after server restart.
- [Port from 0.56d, 30-01-2017, Coruja] Fixed: ML/SA/HS/TOL doors not working correctly.

01-11-2017, Drk84
- [Port from 0.56d, 12-01-2017, Coruja] Fixed: Char death counting kill/fame/karma gain for killers that started the attack but don't have caused any damage yet.

05-11-2017, Drk84
- Added SkillAdjusted commmand, returns the skill value adjusted by the stat bonus.
  The stat bonus are BONUS_STR, BONUS_DEX, BONUS_INT and BONUS_STATS and they can be found in sphere_skills.scp
  Normally you can see the skill values adjusted by the stats bonues by checking the value of the skill in the Skill Menu when the "Show Real" option is turned OFF,
  The adjusted skill value is used by Sphere for calculating the chance of success for NON-combat skills (and also ResistingSpells), in the scripts there was no
 "short-way" to display the correct chance of success unless using a lot of multiplication and division.
  Usage:   SkillAdjusted.skillnumber or SkillAdjusted.skillkey (Example: SkillAdjusted.1 or SkillAdjusted.Anatomy)
  Example calculating chance of success by scripts:
  ON=@SkillStart
	local.skillFlag =<serv.skill.<argn1>.flags>
	if !(<local.skillFlag>&SKF_FIGHT)
		if <actdiff> >= <skilladjusted.<argn1>>
			sysmessage @50 <serv.skill.<argn1>.name>: <fval randbell(<eval (<skilladjusted.<argn1>>) - <actdiff>>,100)>%
		else
			sysmessage @50  <serv.skill.<argn1>.name>: <fval 1000 -  randbell(<eval (<skilladjusted.<argn1>>) - <actdiff>>,100)>%
		endif
	endif

06-11-2017, Nolok
- Changed: renamed CLIENTISSA command to CLIENTISENHANCED.
- Fixed: BADSPAWNS not working.
- Fixed: using SKILLCHECK, SEX, ANIM, MAKEITEM without proper arguments could not work or even crash the server.

07-11-2017, Nolok
- Fixed: beard not added at the character creation with the 2D client.
- Fixed: character creation on the Enhanced Client didn't add the face or the gargoyle horns.

08-11-2017, Drk84
- Fixed: wrong sound played when a human male character get hit.
- Fixed: monsters and animal sometimes executing the wrong animation when attacking.

09-11-2017, Nolok
- Fixed: RAND(x) not returning a value between 0 and x - 1 (instead it returned a value between 0 and x).

09-11-2017, Drk84
- [Port from 0.56d, 12-03-2017, Coruja] Added: Basic internal packet filters that will make Sphere avoid crash or consume excessive resources when under DDoS attack.

10-11-2017, Nolok
- Updated NPC ally groups. Before this commit, they included the creatures up only to the LBR expansion. This affects the NPC hostility
	calculations and the Provocation skill.
- Added: override for an hardcoded behaviour of Provocation. If the provoked character is in the same ally group of the targeted character, at the skill @Success
	the skill execution was (and still is) aborted. Now on skill @Start trigger ACTARG3 is set to 1 if the characters are in the same ally group, otherwise it's 0.
	Then, if you want to always allow the Provocation, put ACTARG3=0 in @Start or @Success.
- [sphere_msgs.scp] Added: PROVOCATION_KIND defmessage to be shown if the Provocation skill is aborted due to provoked and target characters being in the same ally group.

12-11-2017, Nolok
- Fixed: nested random ranges not being parsed correctly.
- Fixed: random ranges ignoring the last element-weight couple.
- Changed: ADD command does not show anymore the console error if the argument is invalid. The sysmessage is still displayed.

05-12-2017, Drk84
- [Port from 0.56d, 05-09-2016, Coruja] Fixed: TimerCall setting on sphere.ini using wrong time format (hours instead minutes) to call f_onserver_timer function

13-12-2017, Drk84
- Possible fix for stat cap issue when the sum of the players stats are at StatCap -1.

23-12-2017, Nolok
- Added: trigger @NPCActWander. It is called each step an NPC does while wandering. ARGN1 = 0 if it will continue to wander, 1 if randomly deciding to stop, 2 if deciding to stop because
	after looking around it found something interesting; ARGN2 = 1 if it's returning to home, 0 otherwise.
	RETURN 1 stops decisions for this step, so it will not return to home, do another step or stop wandering (again, for this step).
- Updated: NPCs when wandering around now do "look around", doing in fact some AI checks.
	This also makes the trigger @NpcLookAtChar fire more times than before.
- Updated: if DEBUGF_ADVANCE_STATS is enabled in the .ini, the gain chance will be shown also on non-debug builds.

29-12-2017, Nolok
- Fixed: wrong sound played when using BARK, shrinking/unshrinking a pet, pet receiving a speech command.
- Fixed: playable characters (men, elves and gargoyles) NPCs should not make random noises when wandering around.
- Added: debug message when trying to retrieve the SOUND property from an NPC whose property wasn't set.

29-12-2017, Drk84
- Fix for the spellchanneling item property.

03-01-2018, Drk84
- (Source) Added missing parenthesis to MulDivLL and MulDiv.

03-01-2018, Nolok
- Fixed: when playing a sound from a character from Samurai Empire and later expansions, it was chosen the wrong sound ID for the given action. This is caused by the different
	order of IDs in the sound file after that expansion. Also, updated the script pack (sphere_defs.scp and sphere_monsters.scp) with a lot of new and corrected old sounds.
	Still, some sounds are missing.
- Fixed: some rare combat-related crashes.
- Added: SOUNDACT_RAND, SOUNDACT_IDLE, SOUNDACT_NOTICE, SOUNDACT_HIT, SOUNDACT_GETHIT, SOUNDACT_DIE defs to the scripts. They are meant to be used with BARK,
	which has always accepted as parameter the sound type (even if the wiki at this day doesn't say so), not the sound ID (use SOUND for this).
- Updated: now when an NPC is looking around it can play different sounds depending on its AI choices.

05-01-2018, Nolok
- Added: SOUNDIDLE, SOUNDNOTICE, SOUNDHIT, SOUNDGETHIT, SOUNDDIE CharDef properties. When a creature emits a sound linked to an action, the sound ID of	the corresponding override,
	if set, will be used instead of obtaining it from the SOUND property. Set one of these overrides to -1 if you don't want that action-related sound to be played.

14-01-2018, Drk84
- Fixed: The effect value of spells that equips a "memory item" on a character (Bless, Curse and so on) was calculated twice, also causing to ignore the
	value of local.effect.

25-01-2018, Nolok & Drk84
- Changed the way ACTARG1/ACTARG2/ACTARG3 are saved, they will be saved only if their value is different from 0 and the character's action is a valid skill or is one
	of the action that uses ACTARG1/ACTARG2/ACTARG3 (NPCACT_FLEE, NPCACT_TALK, NPCACT_TALKFOLLOW, NPCACT_RIDDEN).
- Reverted the following changes made in a precedent commit for avoiding conflict with Spellcasting or custom scripts.
	Removed the call to Skill_CleanUp method inside the trigger checks in Skill_UseQuick.
	Removed the reset of ACTARG1/ACTARG2/ACTARG3 inside the Skill_CleanUp method.

27-01-2018, Nolok & Drk84
- Fixed: crash occurring when an NPC cleared its Attackers.
- Fixed: magic-capable NPCs often did not attack or cast spells when they should instead start to attack.

29-01-2018, Nolok
- Added: ini setting MaxLoopTimes is now controlling also the TIMERF executions. If too many TIMERFs are executed in the current tick, the loop will be aborted and a warning will be issued.
	If it value is 0, there will be no limit (still it is suggested to set a value, even very high, because have just a distraction when writing some kind of scripts and you can cause a deadlock).

31-01-2018, Drk84
- Fixed: when a character started to attack, the first swing was started after an incorrect amount of time.
	This was done by reverting an old supposed (and broken) fix for a combat exploit, which we couldn't recreate.

31-01-2018, Nolok
- Fixed the multi-threading and async networking system, which was disabled long time ago because of its instability.
- Added ini flags: NetworkThreads (specify how many new network threads do you want), NetworkThreadPriority (priority of the dedicated networking threads),
	UseAsyncNetwork (enable/disable asynchronous packet sending).

02-02-2018, Drk84
- [Port from 0.56d, 22-01-2018, Coruja] Fixed: Spells being disturbed even when they have INTERRUPT=0.0 set.

14-02-2018, Nolok
- Fixed: ARGN2 of @Login trigger storing a wrong value.
- Changed: like Source, also this branch now uses 64 bits internal tick count, instead of the old 32 bits.
- Updated SphereCrypt.ini.
- [Port from 0.56d, 20-03-2017, Coruja] Fixed: Message 'World save completed in X seconds' not showing correct timing precision on Linux builds.
- [Port from 0.56d, 01-10-2017, Coruja] Fixed: Lightsource items not updating tooltip after toggle light state.
- [Port from 0.56d, 03-10-2017, Coruja]
	Fixed: AutoTooltipResend .ini setting not working on equipped items.
	Fixed: Summoned NPCs not showing smoke effect when they got released.
- [Port from 0.56d, 26-12-2017, Coruja] Fixed: 'memory_guard' memories not being removed after its linked item get deleted.
- [Port from 0.56d, 27-01-2018, Coruja] Fixed: Items placed on char backpack not checking char weight limit correctly before get equipped.
- [Port from 0.56d, 30-01-2018, Coruja] Fixed: Items not getting amount stacked when dropped on ground.

16-02-2018, Nolok
- Updated: VisualRange maximum value is now 24 (this maximum value is valid for Classic Clients 7.0.55.27+ and probably all the Enhanced Client versions;
	prior client versions support a maximum value of 18).
- Changed: DistanceTalk, DistanceWhisper, DistanceYell ini settings can now have two special values: if -1 it will never be heared, if 0 it will be heared
	if the distance from the source to the listener is <= the listener's VisualRange.
- Fixed: multi placement is now checking if there's enough space around the target using the multi size instead of a fixed size area of 18 tiles.
- Fixed: internal CAN checks not working for high value CAN flags.
- Fixed: rare time overflows in internal checks.

17-02-2018, Nolok
- Fixed: items not being dropped on ground and being kept on the dragging layer when dragging an item too heavy and aborting the dragging action.

18-02-2018, Nolok
- Fixed: when an overloaded player drags an equippable item on himself, it returned to its previous location on the ground instead of at the player's feet.

24-02-2018, Drk84
- Fixed: Unhandled [TYPEDEF 40] error when creating a "chair" item, this was caused by the removal of typedef t_chair in the scripts pack.

07-03-2018, Nolok
- Fixed: light sources didn't change their light type according to their MOREZ.
	Remember: a light source needs the CAN_I_LIGHT CAN flag and the LightSource Tiledata flag.
- Fixed: characters always had the CAN flag MT_EQUIP, even when it wasn't set in the script.
- Fixed: a lot of buggy internal CAN checks.
- Added: CANMASK item and char property. This property is a bitmask, like the CAN property, and stores the CAN flags to be dynamically switched on or off from the base CAN property.
    When retrieving the CAN property, now it is first XORed with CANMASK (the return value will be CAN ^ CANMASK), so in other words:
        If a flag set in the CANMASK is also set in CAN, the flag is ignored;
        If a flag set in the CANMASK isn't set in CAN, the flag is considered as set.
- Changed: the CAN property now is READ-ONLY and can be set only in the ITEMDEF/CHARDEF sections.
    This change ensures that the CAN property of an object will always be synchronized with the current ITEMDEF/CHARDEF.
    Retrieving the CAN value (<CAN>) will return the ITEMDEF/CHARDEF CAN modified with the CANMASK.
    To retrieve the base CAN value, use <SERV.ITEMDEF(defname).CAN> or <SERV.CHARDEF(defname).CAN>.

08-03-2018, Nolok
- Fixed #28: skills not failing correctly when ACTDIFF was -1. Among the other bugs, this also permitted to spam spells without delay.

11-03-2018, Nolok
- Fixed #30: player couldn't move items in the backpack.

13-03-2018, Nolok
- Fixed: BOUNCE (and commands like MAKEITEM which at some point bounce some items) did not check if the container could actually hold the item, so ignoring
	the maximum items count, the maximum weight of its content, the size of the item, etc.

15-03-2018, Nolok
- Fixed: a GM could shoot through impassable items (like walls) with ranged weapons.
- Fixed: couldn't shoot through windows with ranged weapons when the Advanced LOS algorithm was on.

16-03-2018, Nolok
- Fixed: NPCs could move to points they shouldn't be able to reach/walk on.
- Fixed: characters couldn't equip some items.

19-03-2018, Nolok
- Fixed: summoned monsters with BRAIN_BERSERK didn't decrease owner's CurFollower property when killed.
- Fixed: BRAIN_BERSERK monsters hitting more times than normal during combat.
- Fixed: bonded pets losed their pet status and their master after they died.
- Fixed: corpses being always created with the front falling animation, never with the backwards falling one.

20-03-2018, Nolok
- Added: .ADD command accepts as a second parameter the amount of the item to create. Usage: .add i_gold, 500
- Fixed: starting locations of the Enhanced Client's character creation wasn't working.
- [Port from 0.56d, 27-11-2016, Coruja]
	Added: Support for items health bar on HS clients >= 7.0.30.0. Added the CAN flag 'can_i_damageable' to enable health bar on items (MORE1L = cur hitpoints / MORE1H = max hitpoints).
- [Port from 0.56d, 30-11-2016, Coruja]
	Fixed: Server crash when custom clients connect using invalid client version.
- [Port from 0.56d, 22-12-2016, Coruja]
	Fixed: Enhanced clients not able to login on accounts with no created chars.
- [Port from 0.56d, 24-12-2016, Coruja]
	Added: Support for character face style on enhanced clients. It works like hairs/beards, just create the item and equip it on character.
	[Sphere.ini] Added: new FEATURE_EXTRA_ROLEPLAYFACES feature to enable extra roleplay face styles on character creation
- [Port from 0.56d, 25-12-2016, Coruja]
	Removed: Support for CHARLIST function on enhanced clients, they don't have support for this packet anymore, so disabling it will prevent client crash.
- [Port from 0.56d, 17-01-2017, Coruja]
	Fixed: Functions SYSMESSAGELOC / SYSMESSAGELOCEX using wrong default color.
- [Port from 0.56d, 16-06-2017]
	Added: New item property PICKUPSOUND to override default pickup sound for items (it can be used together with DROPSOUND).
- [Port from 0.56d, 02-01-2018, Coruja]
	Fixed: ENHANCEPOTIONS item property only working when FEATURE_AOS_UPDATE_B .ini feature is enabled.
- [Port from 0.56d, 19-02-2018, Coruja]
	Fixed: Sphere console not closing correctly when it get closed before load startup files.
	Fixed: Multis (houses/boats) not being loaded at proper distance when client is walking.
- [Port from 0.56d, 14-03-2018, Coruja]
	Fixed: Server function 'f_onaccount_connect' not being called correctly when AccApp=2 (free/auto account) is set on sphere.ini.
- [Port from 0.56d, 19-03-2018, Coruja]
	Fixed: Multi placement making players get stuck when place the multi over his own char.
	Fixed: Multi placement being incorrectly blocked by region flags region_flag_underground, region_flag_guarded, region_flag_safe.

23-03-2018, Nolok
- Fixed: ATTACK command didn't set maximum priority to attacking the specified character over the others.
- Added: .ini setting CombatArcheryMovementDelay. If the COMBAT_ARCHERYCANMOVE CombatFlag isn't set, use that value to set the seconds after which a player, after he stopped moving,
	can start again a new combat swing with	a ranged weapon.
- [Port from 0.56d, 19-04-2016, Coruja] Fixed: Protection spell not working correctly if COMBAT_ELEMENTAL_ENGINE combat flag is disabled.
- [Port from 0.56d, 21-04-2016, Coruja] Added: New guild functions ISALLY/WEALLIANCE/THEYALLIANCE, they work exactly in the same way as ISENEMY/WEWAR/THEYWAR but used to set alliances instead of wars.
- [Port from 0.56d, 29-04-2016, Coruja]
	Fixed: Hidden (statf_hidden|statf_invisible) chars not being revealed when others chars walk over him.
	Fixed: Vendor buy menu showing wrong char 'gold available' value.

25-03-2018, Nolok
- Added: .ini option flag OF_NoPaperdollTradeTitle. If set, the trade title will not be shown on the paperdoll.
- Fixed #32: GOLD function wasn't working correctly for values > 65535.
- Fixed: some exceptions were sometimes generated when an NPC looked around for the best character to attack.
- Fixed: some noto checks weren't considering the Incognito status of the character.
- Fixed: green noto was sent for party members only if tag.PARTY_CANLOOTME == 1.
- Changed: '?' console command shows better informations.
- [Port from 0.56d, 08-05-2016, Coruja] Fixed: Functions SKILLLOCK/STATLOCK not updating the lock icon on client skills/stats window.
- [Port from 0.56d, 07-06-2016, Coruja]
	Added: Missing features on Incognito spell
		- It will change char name to a random human/elf/gargoyle male/female name instead of using always Man/Woman.
		- It will change char body/hair/beard to a random color temporarily.

28-03-2018, Nolok
- Fixed: combat animation now has the same duration as the combat swing (before, it had a fixed duration of ~ 0.7 s). On the 2D/Classic Clients, the Gargoyle playable character animations still have
	a fixed duration, because to show those animations we need to send a new animation packet, which doesn't support a variable duration. On Kingdom Reborn and Enhanced Clients, the animation still has
	a fixed duration, because both the old and the new packets generates here a fixed duration animation.
- Fixed #33: CanSeeLOS not parsing correctly the char UID when passed as argument.
- Fixed #36: Poison spell extremely bugged when MAGICF_OSIFORMULAS was enabled.
- Changed: added upper limit (65535) to the .ini setting ItemsMaxAmount.
- Fixed: GOLD, NEWGOLD ignoring the ItemsMaxAmount .ini setting.
- Fixed: duped char not inheriting the brain.

31-03-2018, Drk84
-Fixed: "CRIMINAL 0" not removing the criminal memory item.

01-04-2018, Nolok
- [sphereCrypt.ini]: Added encryption key for Classic Client 7.0.62.x and Enhanced Client 4.0.62.x.
- Changed: added a limit of 25.000.000 to GOLD and NEWGOLD functions, to avoid making sphere hang or crash when using too high values.
- Fixed: the new animation packet wasn't working properly when attacking with a bow or a crossbow.
- Fixed: temporarily animated items, when their timer reached zero, never appeared to return to their original state (even if they actually did) when using some clients.
- Fixed: some items (like lanterns, fruits, crops...) accepted as valid MORE1/2 or TDATA1/2/3/4 only an item ID and generated an error if that was a defname.
- [Port from 0.56d, 02/06/2017, Coruja] Changed: Misc fixes and improvements on training items (Training Dummy, Pickpocket Dip and Archery Butte).
- [Port from 0.56d, 06/06/2017, Coruja]
	Fixed: Throwing weapons not working correctly.
	Added: Missing animation of throwing weapons returning after throwing them.
- [Port from 0.56d, 16/06/2017, Coruja] Improved Throwing weapons returning animation.
- [Port from 0.56d, 02-01-2018, Coruja] Changed: Improved how ranged weapons handle ammo.

04-04-2018, Nolok
- Fixed: wrong NEWBIE set added at the character creation (gargoyle in place of the human one, if the player was a human).
- Changed: a client now logouts instantly if its account PLEVEL is >= 2, that is, starting from the the Counselor priv.
	Before this change, it logged out instantly only if the GM mode was activated, regardless of the plevel.

10-04-2018, Nolok
- Added: SERV.TILEDATA to read directly from the tiledata.mul the item properties.
	Use SERV.TILEDATA.TERRAIN(id).property to get a specific property for a given landtile id. Retrievable properties: FLAGS, UNK, INDEX, NAME.
	Use SERV.TILEDATA.ITEM(id).property to get a specific property for a given item id. Retrievable properties: FLAGS, UNK5, WEIGHT, LAYER, UNK11, ANIM, UNK19, HEIGHT, NAME.
	Probably the most useful usage of these keywords is to retrieve the paperdoll gump id of an item: <SERV.TILEDATA.ITEM(<DISPIDDEC>).ANIM> + offset,
	where the offset is 50000 for male gumps and 60000 for female gumps.
- Fixed: .show command sometimes showing a truncated command argument.

14-04-2018, Nolok
- Fixed: MEMORY function was overwriting the old memory flags, instead of adding new ones.
- Fixed: Client sometimes didn't receive an update when a char notoriety flag changed.
- Changed: removed CHARGESCUR and CHARGESMAX item properties, which were only partially supported. Use USESCUR and USESMAX instead.

15-04-2018, Nolok
- Fixed: tooltips sometimes not being updated.
- Fixed: t_crops and t_foliage weren't working correctly.

20-04-2018, Nolok
- Fixed: some functions (like SKILLCHECK, TEXTF and others) didn't parse the arguments correctly.
- Fixed: setting P for an item or a char didn't send an updated position to clients.

28-04-2018, Nolok
- Added: CombatParryingEra ini flag. It controls the parrying behaviour:
   01 = pre-SE parrying chance formula (not using the Bushido skill). Mutually exclusive with 02 flag.
   02 = SE parrying chance formula (using the Bushido skill). Mutually exclusive with 01 flag.
   010 = can parry with a shield
   020 = can parry with a one-handed weapon without a shield
   040 = can parry with two handed weapons
- Fixed: parrying chance was too high if the Parrying skill was > 100.0.

29-04-2018, Nolok
- Fixed: parrying chance didn't scale correctly with Dexterity.
- [Port from 0.56d, 18-04-2018, Coruja] Changed: Small improvements on tooltip engine (containers weren't resending their tooltip after their weight changed,
    and some tooltips weren't updated for items with an expired timer).

30-04-2018, Drk84
- Added behaviour for the Focus skill, the skill is used automatically and only when FEATURE_AOS_UPDATE_B is enabled.
  The Focus skill increase, passively, the amount of stamina gained by 1 for each 10% points of skill value and increase by 1 the amount of mana gained for
  each 20% points of skill value.

02-05-2018, XuN
(Source)
Added the basics of an ECS: CEntity and CComponent so we can split into modules (components) the core of the current big classes (CObjBase, CItem, CChar).

 - CEntity act as a wrapper for CObjBase (at the moment) storing a list of CComponent* inside and redirecting some basic code to all of them (r_Write, r_WriteVal, r_Load, r_LoadVal, r_Verb and r_GetRef) and provides also a GetComponent(COMP_TYPE) for external interaction.
 - CComponent acts as a wrapper for each module of code and, as abstract, class requires the above functions to be on them for overriding (these must return true if something was executed on them, so CEntity will stop to try them on other CComponents or false if not so the loop continues). For items these components must be added on CItem::CreateBase, eg:
         case IT_SPAWN_CHAMPION:
        {
            pItem = new CItem(id, pItemDef);
            pItem->SubscribeComponent(new CCSpawn(pItem));
            pItem->SubscribeComponent(new CCChampion(pItem));
            break;
        }
Changed CItemSpawn into a CComponent 'CCSpawn'
Changed CItemChampion into a CComponent 'CCChampion'
Changed CCFaction into a CComponent.

(Server)
Fixed NPCs not casting/fighting continuously and going to wander randomly (CChar::NPC_Act_Idle()), also reformatted some files.
Fixed some Spell's related stuff not returning correctly the spell required for NPCs.

(Scripts)
SPAWNS:
	-Added Keywords SpawnID, TimeLo, TimeHi and MaxDist, explained below.
	-Changed AT* to r_GetRef so it finds out the object on the n position and works over it.

*There were no major changes on Spawns however i'll leave here a brief explanation of how they work along the new keywords and the updated AT* behaviour.

-TYPES = t_spawn_item, t_spawn_char. Each one generates a different type of objects in the game (it may be revised in the future to merge both*, not soon anyway).
-SPAWNID/MORE/MORE1(R/W) = spawn's ID (can be an Item/Template of items(for t_spawn_item) or a Char/Template of chars(for t_spawn_char)).
NOTE:MORE2 works different for each spawn type.
-MORE2/COUNT(R) on t_spawn_char: returns the total spawned characters.
-MORE2/PILE(R/W) on t_spawn_item: Total amount of items that may be generated at once.

-MOREX/TIMELO(R/W) = Minimum spawn time in minutes.
-MOREY/TIMEHI(R/W) = Maximum spawn time in minutes.
-MOREZ/MAXDIST(R/W) = Maximum spawn distance (for both distance away of the spawn (for Items and Chars) when created and max distance to get away from spawn(for NPCs)).
-MOREP(R/W) = the three MOREX,MOREY,MOREZ grouped as one prop (same as TIMELO,TIMEHI,MAXDIST).

-AT*(R/W) = Access the object in the N position and reads/writes/executes the given text, eg: at.0.remove, <at.0.str>...
-AMOUNT(R/W) = Total amount of objects this spawn can have at the same time.
-ADDOBJ(W) = Adds to the spawn an object with the given uid (must be a valid uid).
-DELOBJ(W) = Deletes from the spawn an object with the given uid (must be a valid uid).
-START(W) = Forces the spawn to start spawning.
-STOP(W) = Stops the spawn and removes everything it created.
-RESET(W) = Froces an STOP and then START it again.

Simple explanation:
1) When double clicking on an STOPPED spawn (nothing has yet spawned from it) START is called.
2) One object is generated within a distance of MOREZ/MAXDIST.
	-For t_spawn_item the amount of items generated each time is equal to a random value between 1 and PILE.
	-for t_spawn_item the maximum distance the NPC can wander away is set equal to MAXDIST
3) The spawn's timer is set to a value (in minutes) between MOREX and MOREY (TIMELO and TIMEHI).
4) 2 and 3 are repeated while COUNT < AMOUNT, when COUNT reachs or surpases (it may happen with custom behaviours added from scripts) AMOUNT only 3 will be repeated (nothing will be spawned but the timer will be set again).


05-05-2018, XuN:
[Port from 0.56d, 20-01-2017, Coruja]
Added: New function MAPWAYPOINT to add/remove waypoints on client radar map (enhanced clients only).
	Syntax: MAPWAYPOINT ObjectUID, WaypointType
	Waypoint types:
		0 = Remove waypoint
		1 = Corpse
		2 = Party Member
		4 = Quest Giver
		5 = New Player Quest
		6 = Healer
		11 = Shrine
		12 = Moongate
		14 = Green Dot
		15 = Green Dot (flashing)

[Port from 0.56d, 02-04-2018, Coruja]
Added: New char trigger @UserUltimaStoreButton, fired when click on 'Ultima Store' button on new clients 7.0.62+

06-05-2018, XuN
Added Damageable Items functionality allowing them to have HP bars, only for items that have CAN_I_DAMAGEABLE flag on CAN or CANMASK properties and for clients 7.0.30+
To modify their HP use HITS and MAXHITS on them
[Sphere.ini]
-Added RegenItemHits to control the update period of those items' hp.

08-05-2018, Drk84
- Fixed #79: Protection spell AR stacking when COMBAT_ELEMENTAL_ENGINE is disabled.

08-05-2018, XuN
House triggers:
    -Added @HouseDesignCommitItem for each commited item, with args:
        local.id=ID of the item
        local.p.x=x location
        local.p.y=y location
        local.p.z=z location
        local.visible=0 or 1 (non-visible items are things like doors and signs)
        return false will remove this item from the commit.*
    *if not return false a local.MaxZ will check the P.Z value of the item and update it if it's higher than the old one.
    -Changed @HouseDesignCommit: added local.MAXZ(Read Only) returning the value of the top placed item.

Added character storage for it's own houses:
	- Added AddHouse uid(WO): Adds the given uid to the player's house.
		If the player current count of houses is greater than the limit he has, the house will be redeeded.
	- Added DelHouse uid(WO): Deletes the given uid from the player's list (Will not delete the house)(-1 clears the whole list).
	- Added Houses(RO): Return the houses on the player's list.
    - Added GetHousePos uid(RO): Returns the position of the given UID on the houses list (-1 if not found).
	- Added MaxHouses(RW) to Accounts and Chars, when created they read this new setting from the sphere.ini (if values on sphere.ini change, they will not reflect on already created accounts/chars).
	- Added REF to 'HOUSE.x' to access the house in the Nth position, eg: house.3.Redeed, local.house_p=<house.1.p>
    Note: Houses generated before this change will not be updated on the player's list, instead the player will still have the memory with color=MEMORY_GUARD (0x100)
    linked to the house,since there was no default behaviour other than this and each house script handles it differently, there will be no hardcoded update
    to the new system, each house system should be updated according to it's behaviour (ie: removing the memory and setting AddHouse <HouseUID>)

    -Added MaxHouses(RW) property for accounts, Default = Serv.MaxHousesAccount.
    -Added MaxHouses(RW) property for chars (meant for players), Default = Serv.MaxHousesPlayer.
    * Setting MaxHouses = 0 for Players will skip the setting and read it from it's Account.
    * Setting MaxHouses = 0 for Players and Accounts will allow to build without limit.

Massive changes on multis (houses for now).

[sphere.ini]:
    - Added MaxHousesAccount = Max houses an account can have (default 1).
    - Added MaxHousesPlayer = Max houses one player can have (default 1).
    - Added AutoHouseKeys = 1 to generate keys for multis on creation, 0 to disable.

Updated [sphere_def.scp]:
    [DEFNAME house_types]
    house_private=0
    house_public=1
    house_guild=2
    [DEFNAME house_transfer_types]
    transfer_nothing	= 0		// Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
    transfer_lockdowns	= 01	// Transfer LockDowns
    transfer_addon		= 02	// Transfer Addons
    transfer_all		= 04	// Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.

Updated [sphere_defs_types_hardcoded.scp]
    [TYPEDEFS]:
    t_multi_addon=201   // AddOns, the deed must have attr_magic to bypass placement checks and allow the addon to be placed inside houses.

New keys added to [MULTIDEF ] (and updated [multis_houses.scp] with them):
-BaseStorage (RW): Base limit of item storage for this multi.
-BaseVendors (RW): Base limit of vendor capacity for this multi.
-LockdownsPercent (RW): Base LockdownsPercent value for this multi.
(Read the House Storage support revisions for more info.)

Added internal storage for Owner, Coowners, Friends, Bans, Locked down items (Lockdowns), Vendors and House Components.

-House Permissions:
	// Owner
    - Added SetOwner uid(WO): Sets the owner's uid to the new one (will remove the House from previous owner (if any) and delete his keys for this house).
		Forces AddHouse <multi_uid> on the Owner
    - Added IsOwner uid(RO): Returns 1 if the given uid is the owner.
	// Coowners
    - Added AddCoowner uid(WO): Adds the given character uid to the coowner list.
	- Added DelCoowner uid(WO): Deletes from the coowners list the given uid (-1 to clear the whole list)*.
    - Added GetCoownerPos uid(RO): Returns the position of the given UID on the coowners list (-1 if not found).
	- Added Coowners(R): Returns the total count of Coowners.
	// Friends
    - Added AddFriend uid(WO): Adds the given character uid to the friend list.
	- Added DelFriend uid(WO): Deletes from the friend list the given uid (-1 to clear the whole list).
    - Added GetFriendPos uid(RO): Returns the position of the given UID on the friend list (-1 if not found).
	- Added Friends(R): Returns the total count of friends.
	// Bans
	- Added AddBan uid(W): Adds a char with the given UID to the Ban list.
	- Added DelBan uid(W): Deletes from the Ban list the given UID (-1 clears the whole list)*.
	- Added GetBanPos uid(R): Returns the position of the given uid on the Bans list (-1 if not found).
	- Added Bans(R): Returns the total count of Components.
	// Locked down items
    - Added LockItem uid: Adds the given UID to the LockDown*
    - Added UnlockItem uid: Removes the given UID from the LockDown list (-1 clears the whole list)*.
    - Added GetLockedItemPos uid(R): Returns the position of the given UID on the Components list (-1 if not found).
	- Added Lockdowns(R): Returns the total count of Lockdowns.
	// Vendors
    - Added AddVendor uid: Adds the given UID to the Vendors' list.
    - Added DelVendor uid: Removes the given UID from the Vendors' list (-1 clears the whole list)*.
    - Added GetVendorPos uid(R): Returns the position of the given UID on the Vendors list (-1 if not found).
	- Added Vendors(R): Returns the total count of Vendors.
	// Components
	- Added AddComponent uid(W): Adds a Component with the given UID.
	- Added DelComponent uid(W): Deletes from the Components list the given UID (-1 clears the whole list)*.
	- Added GetComponentPos uid(R): Returns the position of the given UID on the Components list (-1 if not found).
	- Added Components(R): Returns the total count of Components.
	- Added GenerateBaseComponents(W): Regenerates the components the house has on the [MULTIDEF ] (this does NOT delete current components nor recode/remove current keys).
	- Added DeleteAllComponents(W): Removes all current components.


* Passing as param -1 (or 0FFFFFFF) will clear those lists but nothing more, it won't remove the objects, clear; attrs, props, events, etc; applied, it must be done before clearing the list.
- Added REF to OWNER, COOWNER.x, FRIEND.x, BAN.x, LOCKDOWN.x, VENDOR.x, COMPONENT.x, to access the objects inside and work on them, eg: OWNER.say I'm da Boss!, local.coowner=<coowner.13.uid>, etc

-Keys management:
	- Added AutoHouseKeys setting on sphere.ini to set wether the multis should generate keys automatically or not.
    - Added AddKey uid(RW),fDupeOnBank:
        uid: The uid of the char to give this key to.
        fPlaceOnBank: if set to 1 will place the key in the char's bank, otherwise it will be bounced to the backpack.
        (When reading it, eg: ref1=<AddKey uid>) returns the UID of the generated key.
    - Added RemoveKeys uid(WO): Removes all the keys linked to this house for the character with the given uid.

-Moving Crate support:
    - Added MovingCrate(RW):
     When setting to a container's UID, if there was any other existing MovingCrate, it's contents will be transfered to new crate.
     When the multi is being deleted all linked items will be transfered to the current Moving Crate and the crate to the owner's bank (if any),
     a TAG.MULTI_UID with the multi's uid will be set on the crate.
	 When accessing to the Moving Crate via script a new one will be created if the existing does not exist.
	 Moving Crates created by the server will have 't_moving_crate' TYPEDEF event applied.
	- Added MoveLocksToCrate: Moves all Locked Down items to the Moving Crate (Faster than MoveAllToCrate uid,x,TRANSFER_LOCKDOWNS).
	- Added MoveAllToCrate iTransferType(WO):
        Moves to the Moving Crate all the items inside the multi that meets the following requirements:
            A) Are linked to the multi.
            B) Are not multi's components.
        If a container's uid is given, the Moving Crate will be transfered to that container.
        iTransferType: Type of items being transfered:
            TRANSFER_NOTHING  = 0x0 // Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
            TRANSFER_LOCKDOWNS= 0x1 // Transfer LockDowns, if there's only need of transfering lockdowns use MoveLocksToCrate)
            TRANSFER_ADDON    = 0x2 // Transfer Addons
            TRANSFER_ALL      = 0x4 // Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.


AddOns support:
    -Added t_multi_addon: Works like current multis&addons but will not count towards the House's limit.
	It's just a type definition to alter how these items works inside 'real' multis, but the current items using it (ie: m_fountain_white) will work the same excepting that they won't create keys by default.

- Redeeding
	-Houses with search for TAG.DEED_ID to generate the new deed, if not value is set i_deed will be used, i_deed will be set by default on new placed multis.
    -Added Redeed(WO) fShowMsg, fMoveToCrate: Redeeds the multi to the OWNER's backpack (if there is no owner, there is no redeed).
        fShowMsg: if true shows the Bounce Msg for the deed.
        fMoveToCrate: if true places the Moving Crate item in the owner's bank instead of on his backpack.
    -Removing a t_multi or t_multi_addon will move all of it's items to the Moving Crate, move it to owner's Bank and Redeed the multi to it's owner's backpack.

-House Storage support:
    -BaseStorage(RW): Limit of storage allowed by default = 489 (Max 65535).
    -IncreasedStorage(RW): Increased % of storage allowed (Max 65535%).
    -MaxStorage(RO): Returns the maximum storage allowed: BaseStorage + ((BaseStorage / IncreasedStorage)/100) (Max 65535).
    -CurrentStorage(RO): Returns the current storage used.

    -BaseVendors(RW): Limit of Vendors allowed by default = 10 (Max 255).
    -MaxVendors(RO): Returns the maximum Vendors allowed: BaseVendors + ((BaseVendors / IncreasedStorage)/100) (Max 255).

    -LockdownsPercent(RW): Base percent of allowed Lockdowns (Max 255).
    -MaxLockdowns(RO): Total Lockdowns allowed based on MaxStorage: + ((MaxStorage / LockdownsPercent)/100) (Max 65535).
    eg:
        - Base Storage = 400
        - IncreasedStorage = 20%
        - MaxStorage = 480 (BaseStorage + ((BaseStorage / IncreasedStorage)/100))

        - LockdownsPercent = 25
        - MaxLockdowns = 240 MaxStorage - ( MaxStorage - ((MaxStorage * LockdownsPercent)/100))


-Added HouseType(RW): Set/Gets the house type (0 = private, 1 = public, 2 = guild)

-Doors placed as components now have t_house_door TYPEDEF applied as event.
-Containers placed as components now have t_house_container TYPEDEF applied as event.
-All components of each house now have t_house_component TYPEDEF applied as event.
-t_house_lockdown is added/removed from items when locking/unlocking them from the house.
Note: These events are applied on house COMPONENTS read from [MULTIDEF ], if you add any component ingame with AddComponent you will have to set them too.

Updated [sphere_defs.scp]:
    [TYPEDEFS]:
    t_multi_addon=201   // AddOns, the deed must have attr_magic to bypass placement checks and allow the addon to be placed inside houses.
    [DEFNAME house_types]
    house_private=0
    house_public=1
    house_guild=2
    [DEFNAME house_transfer_types]
    transfer_nothing	= 0		// Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
    transfer_lockdowns	= 01	// Transfer LockDowns
    transfer_addon		= 02	// Transfer Addons
    transfer_all		= 04	// Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.

Added to [MULTIDEF ]:
-BaseStorage (RW): Homologue to the House property BaseStorage.
-BaseVendors (RW): Homologue to the House property BaseVendors.
-LockdownsPercent (RW): Homologue to the House property LockdownsPercent.

-Changed: now t_multis will be saved too in spheremultis.scp along with t_multi_custom.

10-05-2018, Drk84
- Added @EffectRemove trigger for characters,
	Argo: the spell item.
	Src: the caster.
	Default object: the target of the spell.
	Argn1: the spell number.
	Return 0: remove the spell memory item but don't execute the default spell behaviour when the spell item is removed.

  The trigger works similarly to @EffectAdd but is fired  when a spell memory item is removed (and after the @Destroy trigger of the item)
  The trigger is needed if you plan to use return 0 in the @EffectAdd trigger, otherwise the default spell behaviour will be executed when the spell item get removed.
  Example
	I cast a curse spell and I have a return 0 in my @EffectAdd trigger, no default curse effect are applied but when the spell expires the curse item
	will be removed and the spell target will get the additional stats from the expired curse! Using return 0 in @EffectRemove will prevent this
  Additional notes:
	Both @EffectAdd and @EffectRemove with return 0 can conflict with Poison and Poison Fields spells or scripts that call the poison function, that's because the
	poison status and effect is applied no matter what.
	For Summoning spells, returning 0 in @EffectRemove will prevent the summon to disappear.

10-05-2018, Nolok
- Fixed: false-positive speedhack check when trying to walk on a disabled map.

11-05-2018, XuN
- [Port from 0.56d, 07-02-2017, Coruja]:
- Fixed: Char flag 'statf_hovering' (gargoyle fly ability) not clearing when gargoyle chars polymorph into non-gargoyle char ID.

11-05-2018, Nolok
- Changed: disabled the usage of FORINSTANCES without an argument, since that's an unclear and error prone way to use it.
- Updated: Sphere now has a better logging of standard C++ exceptions, meaning better informations in the case of a pure C++ error.

12-05-2018, XuN
Expanded some Ship new features to Ships:
- Added AddShip uid(WO): Adds the given uid to the player's ship.
	If the player current count of ships is greater than the limit he has, the ship will be redeeded.
- Added DelShip uid(WO): Deletes the given uid from the player's list (Will not delete the ship)(-1 clears the whole list).
- Added Ships(RO): Return the ships on the player's list.
- Added GetShipPos uid(RO): Returns the position of the given UID on the ships list (-1 if not found).
- Added MaxShips(RW) to Accounts and Chars, when created they read this new setting from the sphere.ini (if values on sphere.ini change, they will not reflect on already created accounts/chars).
- Added REF to 'SHIP.x' to access the ship in the Nth position, eg: ship.3.Redeed, local.ship_p=<ship.1.p>
Note: Ships generated before this change will not be updated on the player's list, instead the player will still have the memory with color=MEMORY_GUARD (0x100)
linked to the ship,since there was no default behaviour other than this and each ship script handles it differently, there will be no hardcoded update
to the new system, each ship system should be updated according to it's behaviour (ie: removing the memory and setting AddShip <ShipUID>)

- Added MaxShips(RW) property for accounts, Default = Serv.MaxShipsAccount.
- Added MaxShips(RW) property for chars (meant for players), Default = Serv.MaxShipsPlayer.
* Setting MaxShips = 0 for Players will skip the setting and read it from it's Account.
* Setting MaxShips = 0 for Players and Accounts will allow to build without limit.


Houses and Ships:
Added a new ITEMDEF property MultiCount. Setting it to 0 will add no value towards the house limit (the house will be still present but not counted) and setting it to 3 (eg for castles) will count more for placement checks, etc

Cleaned up multi's placement checks and commented them.
Updated the checks too to work OSI like:
 - No chars can be inside the multi's rectangle.
 - The multi must have nothing blocking it in a +1 radius of its base rectangle
 - Additionally a +5 tiles check must be done on Top and Bottom preventing this house to block the entry of others (or the others to block this).

 13-05-2015, XuN
- Added support for CItemStone* (Guild and Towns) on multis.
- Added CMultiStorage to CItemStone so guilds/towns can have houses and ships (same syntax than for chars).
- Expanded key's generation to ships with a new ini setting.

- Added to sphere.ini:
	// Do ships generate keys automatically?
	AutoShipKeys=1

	// Max houses a guild can have (default 1).
	MaxHousesGuild = 1

	// Max ships a guild can have (default 1).
	MaxShipsGuild = 1

14-05-2018, Nolok
- Fixed: multiple party related exceptions.
- Fixed: calling RESTEST on a container item caused an exception.

15-05-2018, XuN
- Added suport for Secured Containers, added some ADDTOCALLSTACKs and removed fUpdateFlags from Un/LockItem.

- Added t_house_secure to Secured containers.

- Added Secure uid(WO): Adds the given uid to the Secure Containers list.
- Added Release(RO): Deletes the given uid from the Secure Containers' list (Will not delete the container)(-1 clears the whole list).
- Added GetSecuredContainerPos uid(RO): Returns the position of the given UID on the secure containers list (-1 if not found).
- Added GetSecuredContainers(RO): Returns the total count of secured containers.
- Added GetSecuredItems(RO): Returns the count of items inside all the secured containers (Just inside secured containers, not on locked containers).
- Added REF to 'SECURED.x' to access the secured container in the Nth position, eg: secured.3.count, local.access=<secured.1.tag0.access>

17-05-2018, XuN
- Fixed attr decay not being removed from locked/secured items, fixed wrong cals for SecuredContainersCount and SecuredItemsCount from their script counterpars and now locked items that are placed where a component is added via customize are moved to the Moving Crate.
- Added AddOn list and basic support like for the rest of the lists:
    - Added AddAddon uid(WO): Adds the given uid to the addon's list.
    - Added DelAddon(RO): Deletes the given uid from the addon's list (Will not delete the addon)(-1 clears the whole list).
    - Added GetAddonPos uid(RO): Returns the position of the given UID on the addon's list (-1 if not found).
    - Added GetAddonCount(RO): Returns the total count of addons.
    - Added REF to 'ADDON.x' to access the addon in the Nth position, eg: addon.3.components, local.id=<addon.1.defname>

Added @Redeed trigger for multis (t_multi, t_ship, t_multi_custom, t_addon)
    argn1=ID of the deed (Default=i_deed)
    argn2=1 (Default = 1). If set to 1 all items will be moved to the Moving Crate (and Addons redeeded).
    argn3=1 If set to 1 the Moving Crate will be transfered to Owner's Bank (if there is any).
        Note: the crate is moved to the OWNER's bank, not SRC.
        If argn2 = 0 then argn3 will be not used regardless of the value it has.
    SRC = Player doing the redeed (If Any). When the multi is being removed there is no SRC (also when an Addon is being redeeded from internal functions).
    ARGO = The deed.
    return 1 will prevent the deed from being created, but will not block the code from argn2 and argn3

Added @HouseDesignBegin trigger for t_multi_custom, called when the player enters on design mode
    argn1: If set to 1 Redeeds all addons on the multi. (Default = 1)
    argn2: If set to 1 Transfer all Locked Items and Secured containers to the Moving Crate (default = 0)
    argn3: If set to 1 Ejects from the house all chars inside the house excepting the player entering in design mode,
            if set to 2 Ejects everyone from the house
            if set to 0 doesn't eject anyone.
            All chars ejected will be moved to the House sign.
    return 1: Forces the char to exit Customize mode.
    WARNING: Forcing the char to exit here and setting argn1=0 in @HouseDesignExit will make it enter in customize mode, exit, enter... infinitelly, hence crashing the server with an infinite loop.

17-05-2018, Nolok
- Fixed: FORCONTTYPE wasn't working (issue #100).

20-05-2018, Nolok
- Fixed: triggers @UserUltimaStoreButton, @UserVirtue, @UserVirtueInvoke and @UserWarMode weren't firing (issue #102).

20-05-2018, XuN
Redeed now creates the deed before calling the @Redeed trigger and the deed gets renamed automatically.
- Added ARGO to @Redeed trigger, being argo the deed.
- added to sphere_msgs 'DEED_NAME': "Deed to a %s"
- Fixed placed houses being moved 1 tile east from where they should.

22-05-2018, Nolok
- Fixed: FORINSTANCES caused an exception in Nightly builds, but not in the Debug ones (issue #88).

25-05-2018, Drk84
- Changed: The defmessage DEFMSG_COMBAT_ATTACKO (*%s is attacking %s!*) will use the EMOTE_DEF_COLOR setting found in sphere_msgs.scp instead of always use the gray color hue.

26-05-2018, Nolok
- Fixed: COMBATF_PREHIT didn't fire the triggers in the correct order, also fixed a possible exploit while using PreHit (issue #108)
- Added: COMBATF_PREHIT_NORANGE to allow starting the close-combat swing at distance; the blow will still be landed only when entering in range.
- Fixed: After each combat hit the current combat skill was halted (actually it failed), then the same action was started again. This resulted in
	the @Fail, @SkillFail, @Start, @SkillStart triggers to be fired at each hit.
- Fixed: NPCs doing extra AI actions (wandering, food, etc checks) after each hit in combat. This caused sometimes the current combat action to be resetted
	and then forced again, erasing the NPC combat data, which ultimately results in the NPC hitting twice in a few tenths of seconds.

13-06-2018, Nolok
- Changed: reverted the combat animation to not being "smooth". Now by default the swing animation has a fixed duration of 1 second (minimum anim delay/duration possible) and then the char waits the recoil time
	before being able to start again the combat swing. This is done to match OSI style. The "underground" work is different now and it is working in this way: first a timer is started to wait for
	the recoil time	(ARGN1 in @HitTry). When the timer has ended, the combat swing animation starts, also the timer is started again, but to wait for the animation to end (anim and timer duration are equal to
	LOCAL.AnimDelay in @HitTry, and the default value is 1 second). Ended this second timer, the damage is dealt (Issue #111).
- Added: .ini CombatFlag COMBAT_ANIM_HIT_SMOOTH to enable the old smooth combat. There's no delay between hits (in @HitTry LOCAL.AnimDelay is = 0), but the swing animation duration
	(ARGN1 in @HitTry) is in this case equal to the delay you should have waited before starting a new swing.
- Fixed: COMBAT_PREHIT wasn't working correctly (Issue #113, #108).
- Changed: .ini CombatFlag COMBAT_PREHIT_NORANGE renamed to COMBAT_SWING_NORANGE, to avoid confusion with COMBATF_PREHIT.
- Added: LOCAL.Swing_NoRange to @HitCheck trigger. -1 force disables the Swing_NoRange behaviour for the current hit, 0 leaves it dependent to the COMBAT_SWING_NORANGE ini CombatFlag,
	while 1 force enables the Swing_NoRange behaviour (Issue #112).
- Added: RETURN -2 into @HitCheck trigger continues the execution of the default combat code. This is useful if you want to use @HitCheck to only change LOCAL.Swing_NoRange.

20-07-2018, XuN
Multis:
- Changed COMPONENTS to COMPS (and all the relative keywords: getcomponentpos -> getcomppos, component.x -> comp.x, etc)
- Fixed Components from multis messing with Components from multidefs, hence crashing when trying to access them(like when deleting the multi).
- Fixed nuke/remove doing random crashes on multis: Redeed is not being called when removing the multi anymore, if you want a full redeed call it before removing.
- Added House_Priv defnames:
    HP_NONE         = 0
    HP_OWNER        = 1
    HP_COOWNER      = 2
    HP_FRIEND       = 3
    HP_ACCESSONLY   = 4
    HP_BAN          = 5
    HP_VENDOR       = 6
    HP_GUILD        = 7
- Changed AddHouse and AddShip to accept a second parameter as HOUSE_PRIV, default HP_OWNER, to have control over the privileges (this affects new saves).
    To change a priv from OWNER to COOWNER (as example) use AddHouse house_uid, HP_COOWNER (or AddShip), it will replace the current value with the new one.
- Changed Seting MovingCrate / Owner / Guild to 0 will empty the house value also for list-based values: Coowners, Friends, Bans, Vendors, Accesses ...
- Removed the needing of @Destroy for several house related items (Comps, MovingCrate, LockDowns, Secured Containers...) to delete the item from the house list by adding pointers back on CItem,
    CItemStone and the update to CHouseStorage
- Added 'e_house_priv' for chars who have any kind of priv on any house, also e_ship_priv for ships.
- Added RevokePrivs char_uid for multis (house and ships) to revoke any House_Priv to that char on the multi (excepting, of course HP_GUILD).
- Fixed when setting a new priv RevokePrivs will be called and then the privs will be added, in order to remove the char from previous list (if had any privilege before on this multi).

23-07-2018, Drk84
- Added: effectLocation command, similar to the EFFECT command but instead of an object it takes a terrain location as a target.(Thanks to XuN for the help)
	Some of the new spells use effects that are placed  on the ground (not field items) for simulating an area of effect.
	Usage: effectLocation x,y,z,type,itemid,speed,loop,explode,color,render
	Examples:
	//Simulate the Consacrate Weapon Chivalry spell effect, a sword appearing from the ground and going upward.
	[FUNCTION testLocationZ]
	effectLocation <p.x>,<p.y>,<height>+1,0,i_sword_long,1,0,0,colors_red,3

	//Simulate a field of energy centered at the target.
	//argv0 x offset, argv1 y offset
	[FUNCTION testLocationField]
	if <isempty <args>>
		args = 1,1
	endif
	local.pX = <p.x>
	local.pY = <p.y>
	local.pZ = <p.z>
	FOR X <eval <local.pX> - <argv0>> <eval <local.pX> + <argv1>>
		FOR Y <eval <local.pY> - <argv0>> <eval <local.pY> + <argv1>>
			effectLocation <local.x>,<local.Y>,<local.pZ>+<argv2>,2,i_fx_energy_field,1,0,0,colors_red,3
		ENDFOR
	ENDFOR
  Notes:
  If the effect Type is 1 (Lightning) or 3 (Effect at object level) the effect will not be played, only effect 0(bolt) and 2(ground level) seems valid, probably
  cause they don't accept a map point.

- Added: Spells with the LAYER property set to >= LAYER_SPELL_STATS will automatically equip the spell memory item found in the RUNE_ITEM property.
	Before this commit, if you wanted to make a custom spell (or scripts the chivalry, mysticm, spelleweaving spells) you had to manually equip the memory item
	causing the triggers @EffectAdd  and @EffectRemove to never be fired.
- Changed: Meditation skill now take in consideration the EFFECT property of the skill, if the EFFECT property is not present the default value of 1 is used.
- Added: Added new flag value 080 for CombatParryingEra, setting this flag will allow to use the following parrying skill behaviour:
	The flag will enable the old AR parrying formula, instead of gaining  a flat 7% of the Shield Armor value the Parrying skill of the character is taken in consideration according to the
	following formula:
	Displayed AR = ((Parrying Skill * Base AR of Shield) ÷ 200) + 1
	The maximum AR reachable is: Base AR of Shield / 2.
	More information: http://web.archive.org/web/20000306210936/http://uo.stratics.com:80/parr.htm
	Notes
	By default the ARMOR value of the Shields item is commented, so you need to uncomment them.
	The formula works only with Combat Elemental Engine disabled.
	Setting or unsetting this flag while the server is running will update the character armour value only when the Parrying skill changes or the shield item is equipped/unequiped.

28-07-2018, Nolok
- Added: LASTEVENTWALK read-only client property, to retrieve the time in ticks (SERV.TIME) of the last allowed walk request from the client.
- Added: CONTAINERMAXITEMS ini setting. It holds the maximum number of items inside a container, which is by default (and can be at most) 255. Higher values are unsupported by the Classic Client
	and the older 2D client versions. The Enhanced Client supports a maximum af 125 items per container, so it's suggested to update this setting if you are going to use that client.
- Fixed: Switching weapon while attacking didn't abort the previous swing (Issue #108).
- Fixed: Hit chance (ACTDIFF) wasn't recalculated after each combat swing (Issue #116).

01-08-2018, XuN
- Changed BonusHits/Stam/Mana to increase ModHits/Stam/Mana instead of the real stats
- Fixed tooltips not sending data
- Fixed ship redeeds creating normal deeds instead of ship plans.

02-08-2018, Nolok
- Fixed: File I/O functions messing up line numbers, for example reading the wrong line (Issue #95).

04-08-2018, Nolok
- Fixed: Shop items' name shown with the wrong language if the client localization wasn't english.

06-08-2018, Nolok
- Fixed: Spells with SPELLFLAG_TARG_XYZ had a different target maximum range (14) than spells with other TARG spellflags (caster's VisualRange) (Issue #117).

08-08-2018, Nolok
- Fixed: When the date changed, a new log file wasn't created (Issue #114).
- Added: Tooltips for items with attr_NoDrop and attr_NoTrade.
- [Port #53 from Source, 17-06-2016, Coruja] Fixed: Paralyze / Paralyze Field making NPCs flood too many attack actions.
- [Port #54 from Source, 22-06-2016, Coruja] Added: Support for colored multis on target functions (only compatible with HS clients 7.0.9.0+)
	-Target functions can set the multi color using TARGETM [multiID, color] and TARGETFM [function, multiID, color]
	-Target will inherit the deed color when got triggered from a deed

15-08-2018, Nolok
- Added: now sphere caches tiledata.mul content into memory at startup. This avoids reading an enormous amount of times the file on the disk, which is a slow operation,
	giving a significant performance boost. This is especially true in crowded areas, where a lot of Line of Sight checks are done.
- Fixed: the script caching wasn't working as intended, now the scripts and saves loading and the scripts execution is a lot faster. Technical details are on git commits descriptions.

16-08-2018, Nolok
- Added: the world save and the deletion of the previous save is now skipped if there's not enough available space (at least 20% of the previous saves size).
	This avoids the corruption or loss of old saves if there's not enough space on the disk.
- Fixed: multi (ships or houses) keys were only added to the bank, without adding a copy on the backpack.

22-08-2018, XuN
WARNING: The part of this commit regarding TIMERs has been reverted because of the big timers overhaul started with the 28-09-2018 commit.
[
- Changed tick periods from 0.1s to 0.25s, read https://github.com/Sphereserver/Source-experimental/issues/125 for more information.
- DEPRECATED TIMERD, a warning will be shown each time it's used.
- ADDED TIMERT timing each TICK.
	WARNING! TIMERD is NOT the same as TIMERT, while TIMERD=10 was meant to tick in one second, TIMERT=10 will tick in 4 seconds, so it should be TIMERT=4 to tick in a second (0.25*4)
]

- Removing multis now removes all of it's components by default (doors, signs, tiller, etc) but not lockdowns or other personal items.

22-08-2018, roberpot
- Added REVEALF_OSILIKEPERSONALSPACE: If set, invis characters will be not revealed when another character enters personal space, and no message will be sended to character who entered.

23-08-2018, XuN
- Changed HOUSE_TRANSFER definitions, reordered them for better compatibility over time and added a new TRANSFER_SECURED for secured containers:
[DEFNAME house_transfer_types]
transfer_nothing	= 0		// Do not transfer any item to the Moving Crate, the crate will still be moved if uid is given.
transfer_all		= 01	// Transfer LockDowns, Addons and every other item found inside a house that is not a component of it.
transfer_lockdowns	= 02	// Transfer LockDowns.
transfer_addon		= 04	// Transfer Addons.
transfer_secured	= 08	// Transfer Secured Containers.

- Extended Multi_IsPartOf() method to accept items on lists and not only linked items.
- Improved TransferToCrate function:
    - It now moves every item stored in all lists before doing the raw area search (some new lists added before the method were not added).
    - Also improved the checks on the search function to do the most probable finds first.
    - Added new param TRANSFER_SECURED for Secured Containers.
    - It only has one parameter: transfer_flags
- Fixed <MovingCrate 1> not creating a new Moving Crate, hence all the custom <MovingCrate*> code not working because there's no way to create a new one.
- Fixed Custom Multis crashing the server on loading.

24-08-2018, XuN
- Added missing 7Gold currency on status when FEATURE_TOL_VIRTUALGOLD is enabled.
- GOLD and <GOLD> will work as VirtualGold and <VirtualGold> when FEATURE_TOL_VIRTUALGOLD is enabled (but the real money chars had before, if any, will not be removed).
- Fixed wrong char sent on PacketObjectStatus when opening a new shop menu, hence not correctly showing the player's gold until a new packet updated the status.
- Added region change support for ships, @Enter and @Exit will be fired on the regions they enter and leave (only them not characters inside, as always they will get it when landing from the ship)
- Added @RegionEnter and @RegionLeave trigger for ships and the homologue @itemRegionEnter and @itemRegionLeave for chars BUT only working for ships.

28-08-2018, XuN & Nolok
- Changed: IMPORTANT! Due to a recent change of the tooltip engine, which grants better performance, the tooltips are now cached on the character or item instead of being
	generated each time for each player. This means that ADDCLILOC needs to be called on the object, instead of on the player. So in the scripts, in the @ClientTooltip trigger,
	calls to SRC.ADDCLILOC have to be changed to ADDCLILOC; in @ItemClientTooltip and @CharClientTooltip, ACT.ADDCLILOC has to be used instead.

30-08-2018, Nolok
- Changed: Sphere internal clock now stores the time in milliseconds, instead of in tenth of second (which was good until the amount of ticks per second was fixed to 10).
	This makes the internal timer independent from the ticks per second and also should solve Issue #132.
	SERV.TIME is still returning the internal time in tenth of seconds, to keep backwards compatibility.
- Added: SERV.TIMEHIRES, which returns the internal timer in milliseconds.
- Added: SERV.TICKPERIOD, to show how much server ticks are in a real-world second.
- Fixed: ShipSpeed.period (tenths of second between each ship movement) not working as expected.
- Fixed: While sailing on the debug build, flashing spots were supposed to be shown where the next movement would move the ship
	(so, if moving on those tiles would make a valid movement).
- Changed: Made Read-Only SERV.CREATE, SERV.LASTVALIDDATE, SERV.LASTVALIDTIME, CREATE char and item property.

18-09-2018, XuN
- Added: TIMERMS to set an object timer to elapse after the given number of milliseconds.

28-09-2018, XuN
- Updated the whole code to cleanup latest changes regarding timers.
- Added new CTimedObject class to control the whole timer's behaviours from now on.
- Updated some classes (CObjBase, CChar, CItem (and it's childrens)) to inherit from CTimedObject (still more to come ... CTimedFunction, CMapBlockCache, etc).
- Updated world's ticking procedure:
    Removed the old world->maps->sectors->items/chars huge loop for ticks
    CTimedObject add/deletes the objects into a new listing with msec precision timers which CWorld reads constantly looping only throught what really needs to tick.
- Updated some code messing with timers on latest commits and making them behave wrongly.
- Changed sector's behaviour to be ticked until their SectorSleep period (if any) has passed and pausing/resuming all items/chars timers inside (similar to what it did before).
- Splitted CChar's ticks into the real ticks (the code relying on SetTimeout) and the periodic tickings (into a new OnTickPeriodic) involving stats regens, death check, steps on items, etc
- Added a new list on CWorld for chars inserting all npcs by default on their create and players when login, and removing them when proceed, to do constant updates on hits, etc.
- Fixed regens ignoring the delay set.

01-10-2018, XuN
- Fixed some crashes and removed some debug msgs from last commit(s).
- Changed Ship's movement to a new CCMultiMovable class
- Added CCMultiMovable class to all multi objects so now every multi can move like a ship without external scripts.
    - In order to move, all movable multis need ShipSpeed.period and ShipSpeed.tiles to be higher than 0.
    - Also the house that can move needs the spk_ship_cmds speech on them for player speech (if giving support for speech) also since the multis doesnt have direction like ships, it's direction is inverted:
        Forward will move to the south
        Left will move to the right
        Right will move to the left
        Back will move to the north
    - Since the movement is set via 'timer', any house that can move will try to move instead of expire on it's ON=@Timer, so if you want a house that move and decay use timerf for the decay.

03-10-2018, Ben
- Fixed emote messages for players using wrong hue.

12-10-2018, XuN
- Fixed more time related issues.
- ADDED: tag.override.movedelay (msec) for NPCS overriding completelly the moverate checks and setting the next movement to the given timer, eg 'tag.override.moverate=250' makes the npc move each 250 milliseconds when walking.
    Notes:  * The final value, with or without tags, running or walking, can't be lower than 1 tenth of second or higher than 5 seconds for the moment until we check the performance impact of lower values (Since walking is direcly engaged with NPC's AI, lowering this value can cause an extreme impact on performance)
            * This is the walking speed, running speed and walking speed while mounted is the half (125 instead of 250 msecs using the previous example), running while mounted is 4 times faster (62.5msecs (rounded to 62), defaulted to 100 because of the tenth's limit)).
            * Settig this tag completelly overrides default moverate checks, TAG.OVERRIDE.MOVERATE gets ignored too.

Here's the code to make NPCs move with the old formula (before 2014) (it's also an example of how to make custom movement formulas):
// function setting the tag to the desired value
[function f_adjust_movement_delay]
local.dex=<dex>
if ((<flags> & STATF_pet) && (<local.dex> < 75))    // for pets ...
    local.dex = 75  // ... set the lowest movement delay to this dex value.
endif
local.newdelay = (10 + <r(100-iDex)/3>) * 100   // * 100 because the old formula worked in tenths of second, this tag works in msecs (100 msecs = 1 tenth = 0.1s)
//If you want enable support for tag.override.moverate in this formula uncomment the below lines:

//local.mod = <tag0.override.moverate>
//if (<local.mod> < 1)
//    local.mod = 1
//endif
//local.newdelay = (<local.newdelay> * <local.mod>) / 100

//end of tag.override.moverate code
//setting the new value:
tag.override.movedelay = <dlocal.newdelay>

Now we set the tag like this:
ON=@Create
STR=xx  (custom npc's values)
DEX=xx
INT=xx
f_adjust_movement_delay

It would be recommended to apply this function also on Taming's success, because pets will never have a base movement value calculated with less than 75 dex
The lower calls to this function, the better (as for any other), but other formulas (like AI reworks) may need to call it in each @SkillStart/Success/Fail or other cirtumstances.

19-10-2018, Nolok
- Fixed: SHRINK command always bouncing the figurine (Issue #138).
- Fixed: Items disappear in trade menu when both players are overweight (Issue #124).

20-10-2018, XuN
Added: Now Sectors store their adjacent sectors:
    When a sector awake, all of it's adjacent awake too to avoid the awakening effect for clients (all spawns generating NPCs at once, NPCs starting to move at once, etc)
    When a sector try to sleep, it checks if the adjacent can't sleep to minimize more the awakening effect.

21-10-2018, Nolok
- Fixed: Items in trade window being lost if a world save occurred during the trade process and the server was restarted, loading that save.
- Fixed: NPCs sometimes lost the focus on their enemy during combat.

23-10-2018, Nolok
- Fixed: Gaining parrying skill regardlessly from CombatParryingEra and the ability to actually parry the blow.
- Fixed: With COMBAT_ANIM_HIT_SMOOTH, in @HitTry ARGN1 and LOCAL.AnimDelay showed the wrong values (they were inverted).
- Fixed: NPCs had not enough motivation to fight back a brain_berserk NPC of the same kind, so they kept running away or wandering.
- Fixed: On Windows, if Sphere's window is closed during the scripts loading, the whole process will now be halted. Before, the loading proceeded and the server was halted only at the startup completition.

24-10-2018, Nolok
- Fixed: When a char was overweight it could equip multiple items on one layer (Issue #143).
- Fixed: The minimum combat animation delay with COMBAT_ANIM_HIT_SMOOTH on was 0,1 s instead of 1 second.
- Fixed: Now equipping a light source item doesn't check the CAN flags.
- Added: Now it's possible to change an item's CONT in @DropOn_Self when the trigger is fired via a drop client event (before it worked only if fired by the BOUNCE keyword).
	If a RETURN 1 is performed and a new (different) CONT has not been set via scripts on the trigger call, the item drop event fails as before, otherwise the item is left in the new CONT.

28-10-2018, Nolok
- Fixed: Players could cast spells even when paralyzed or stoned (Issue #135).
- Fixed: When Game Masters casted a spell with a wand or a scroll, they were consumed.
- Added: ini MagicFlag MAGICF_CASTPARALYZED, to be able to cast even if the character is paralyzed.

29-10-2018, Nolok
- Changed: CAN_I_BLOCKLOS flag (which works only if ADVANCEDLOS is enabled) now blocks the Line of Sight regardlessly of the height of the viewer and of the item being checked.
- Added: CAN_I_BLOCKLOS_HEIGHT flag (which works only if ADVANCEDLOS is enabled) which does what CAN_I_BLOCKLOS actually did in the past: it blocks the LoS only if the item is too high for the char to see above it.
- [sphere_defs.scp]: Added the def: CAN_I_BLOCKLOS_HEIGHT (04000000).
- Fixed: CanSeeLOS, when AdvancedLOS is enabled, read the dynamic item CAN flags from its base itemdef instead of its actual CAN flags. Example: if i created a i_dagger_super item with ID=i_dagger, CanSeeLOS checked i_dagger
	CAN flags instead of the ones from i_dagger_super. Now it supports also flags modified by CANMASK.

31-10-2018, Nolok
- Changed: Stats maximum value extended from 32767 to 65535 (maximum value actually supported by the client) (Issue #75).
- Fixed: Stats regen timers were broken.

01-11-2018, Nolok
- Fixed: Client-side bug when attempting to drag a corpse (Issue #142). If a player with GM on sees a new corpse, then turns GM off and tries to drag it,
	the dragging is cancelled but the corpse will take the appearance of an ogre until a new UPDATE.
- Changed: Default value for SpeechColorOverride changed from SAY_DEF_COLOR (52) to 0. There aren't any compatibility issues with previous save files, since SpeechColorOverride was only saved if different from the default value (Issue #134).
- Changed: SpeechColorOverride now works for both NPCs and Clients. SpeechColor is now an invalid property for an NPC, but for a Player it is as always the last speech hue sent by the client.

02-11-2018, Nolok
- Added: ModMaxHits, ModMaxMana, ModMaxStam properties. To avoid CONFLICTS, remove or comment the scripted functions with the same name in the sphere_events_npcs.scp of the default scriptpack.
- Added: @StatChange fires also when a ModMax* property changes. ARGN1 = 12 for ModMaxHits, 13 for ModMaxMana and 14 ModMaxStam.
- [Port from 0.56d, 12-01-2017, Coruja] Fixed: FeatureSE setting on sphere.ini not working correctly.

03-11-2018, Nolok
- Fixed: Broken BTFISH encryption/decryption (used by clients <= 2.0.3 and >= 2.0.0x) and wrong login encryption/decryption algorithm chosen for some old clients < 2.0.0x.
- Added: Initial support for very old clients (< 1.26.4) which use the same rotation cypher for both login and game server encryption.
	Those clients require also a precise sequence of packets to be received and there isn't much documentation around. For now, some of them (tested with 1.25.35) work until after the character selection.
- [SphereCrypt.ini] Added keys up to Classic Client 7.0.73 and Enhanced Client 4.0.73. Added keys for some old clients between versions 1.23.27 and 1.26.4.

7-11-2018, XuN
Added IsSleeping (Read Only) function for sectors, items and chars.
Added Sleep and Awake functions (Write Only) for sectors (Sleep will do it's normal checks before sleep, Sleep 1 will skip these checks).
NOTE: Sleep will not work if the sector is already sleeping and Awake will not work if the sector is not sleeping.
NOTE: Awake will awake the sector, tho it will insta sleep again since it checks for clients or how much time passed since it's last client departed from it (compared against SectorSleep .ini value). This can be used to force all items inside to tick.
Added CanSleep function (Read Only) for sectors to check wether a sector can Sleep or not (use CanSleep 1 to check for adjacent's sectors too (source checks does it like this)).

11-11-2018, Nolok
- [Port from 0.56d, 15-02-2017, Coruja] Fixed: Enhanced clients not updating backpack content on death.
- Added: Error console message when trying to load from the saves a char attached to an invalid account.
- Added: Error console message when trying to define a resource (itemdef, chardef, etc) with an invalid ID (> 03FFFF), instead of letting sphere throw an assertion failure.

14-11-2018, Nolok
- Fixed: SERV.TIME and SERV.CREATE returned the time in hundredths of second instead of in tenths of second; SERV.AGE reported a wrong value due to a wrong time conversion.
- Fixed: Chars sometimes couldn't fight after the server restart if COMBAT_PREHIT was on.
- Fixed: COMBAT_SWING_NORANGE wasn't working as intended.
- Fixed: MinCharDeleteTime ini value wasn't read correctly.
- Fixed: For damageable items (CCItemDamageable) status update, hits regen rate was used instead of the ItemHitpointsUpdate ini setting.
- Fixed: Regen rates were incorrectly converted from seconds to the internally used milliseconds, breaking them.
- Fixed: Food stat still used internally a signed short instead of an ushort data type, limiting its max value.
- Fixed: Stats and derived values still had somewhere the limit of a short type instead of using a ushort.
- Changed: Stats and maxstats mods could only have a value between 32767 and 32767, changed it to -65535 and 65535 (which is the actual new stat limit).
- Fixed: Vendors restocked after a wrong amount of time.
- Fixed: The time required to wait before another potion use was of 1,5 seconds instead of 15.

15-11-2018, Nolok
- Fixed: T_SPAWN_ITEM spawning templates and T_SPAWN_CHAR spawning spawn groups didn't correctly load the id of the resource to spawn from the save file (Issue #153).

23-11-2018, Nolok
- Added: BCrypt string hashing and string validation (Issue #109). Usage:
	- "BCRYPTHASH prefix code, cost-factor, string" returns the hashed string.
		Prefix code: 0 for "$2a$", 1 for "$2b$", 2 for "$2y$", 3 for "$1$", 4 for "_".
		Warning: higher cost-factors (minimum 4, maximum 31) means way slower hashing, which can even block Sphere!
	- "BCRYPTVALIDATE string, hash" returns 1 if the hash matches the string, otherwise 0.

27-11-2018, Nolok
- Fixed: Setting a TAG with a quoted numerical value didn't force it to treat the argument as a string.
- Fixed: Everytime a player opened a buy/sell gump, the vendor had a forced restock.

09-12-2018, Nolok
- Added: GO command now accepts the map index as a second argument. It's useful when there are more places with the same name, but located in different maps.
	Example: "GO britain, 0" teleports to Britain in map0, "GO britain, 1" teleports to Britain in map1 (if that region is defined in the map script file).
- Fixed: Every worldgem bit (so also the resource bits) was treated as spawn items.
- Fixed: Spawns didn't accept 0 as MAXDIST, in that case they defaulted it to 1 (Issue #156).
- Fixed: Every new account was created with the HEARALL flag on.
- Fixed: Resource gathering skills (fishing, lumberjacking, mining), had inverted ACTARG1/2/3, so that setting one of them via scripts didn't change the expected value, breaking the skill operation (Issue #158).
- Changed: talkmode_system (0) to talkmode_say, talkmode_prompt (1) to talkmode_system, as it should be according to the packet guides (moreover, if you try to send a colored text to the Enhanced
	Client with a talkmode different from 0, which is the correct "talk" mode, the client will ignore the color and use its default one).
	Also, Sphere in some cases used talkmodes 3 (old talkmode_say) and 4 (old talkmode_obj), which behave as the correct talkmode_say (0) and aren't reported as valid talkmodes by any packet guide,
	so they got removed and replaced with talkmode 0.
	As result, defs MSG_DEF_COLOR, MSG_DEF_FONT, MSG_DEF_UNICODE aren't used anymore.
- Added: AutoProcessPriority ini flag, to automatically set the process priority at the startup. Check the ini for more informations.

11-12-2018, Nolok
- Fixed: When smooth sailing was on, the screen wasn't updated smoothly.

13-12-2018, Nolok
- Fixed: Craft menus shown a wrong title (Issue #164).
- Fixed: SPEECHCOLOR wasn't recognized as a valid keyword (Issue #163).
- Fixed: Stat regens working also on dead players (Issue #160).
- Fixed: Archery butte not usable by players ("You can't reach that") (Issue #159).

16-12-2018, Nolok
- Added: Option flag OF_NoTargetTurn, to avoid the char to turn against the targetted point.
- [Port from 0.56d, 02-08-2018, Coruja]
	Changed: Internal improvements on Teleport / Recall / Gate Travel spells.
		- Gate Travel now will use proper blue/red moongate ITEMDEFs instead always use blue moongate changing its color when needed
		- Gate Travel now will link moongates to each other based on UID instead MOREP. This will make possible cast Gate Travel inside moving boats (if multi region flags allow cast it)
- [Port from 0.56d, 05-08-2018, Coruja] Added: EFFECT function now supports client fade screen effect (EFFECT 4,[0-4]).
	NOTE: It can be used only directly on client chars and requires client >= 6x]
- [Port from 0.56d, 06-08-2018, Coruja] Fixed: Tooltips not updating correctly when TooltipMode=1 is set on sphere.ini.
- [Port from 0.56d, 08-08-2018, Coruja] Fixed: EFFECT_ID/SOUND not working correctly on some spells.
- [Port from 0.56d, 01-09-2018, Coruja]
	Changed: When enhanced clients drop items on container grid index already in use, the item now will be placed on next available index (OSI style) instead first available index starting on 0.
	Fixed: Enhanced clients showing wrong hitpoints color on health bar.
	- [Port from 0.56d, 04-09-2018, Coruja] Fixed: Optional flag OF_NoDClickTurn on sphere.ini affecting target-based actions (now it will affect only DClick actions, as the name suggests).
- [Port from 0.56d, 25-09-2018, Coruja] Added: New function CODEXOFWISDOM to open client Codex of Wisdom menu at given topic ID.
	Syntax: CODEXOFWISDOM TopicID (1~176), [ForceOpen (0/1)]
- [Port from 0.56d, 01-11-2018, Coruja] Added: Support for new Whip weapon type.

17-12-2018, Nolok
- [Port from 0.56d, 04-07-2018, Coruja]
	- Added: Support for 'EquipLastWeapon' client macro.
	- Changed: Reduced DClick/PickUp_Ground reachable distance [3 tiles -> 2 tiles] to match client internal DropOn_Ground distance.
- [Port from 0.56d, 21-07-2018, Coruja]
	- Added: Support for 'combat ability' (@UserSpecialMove) and 'virtue' (@UserVirtue) slots on KR toolbar (@UserKRToolbar).
		NOTE: KR clients still obsolete and not supported, but triggers will be called if someone want use it
	- Fixed: FOR loop not working correctly when range value is negative.

23-12-2018, Nolok
- Changed: now most of the dynamic (in the C++ source) properties (like DAMFIRE, MANABURST, HITAREACOLD, SPELLCHANNELING...) are internally stored in a different and faster kind of container.
	For this purpose, the classes CEntityProps, CComponentProps and the relative specializations were created. Think at each ComponentProps as a container, which can hold specific kind of properties and generate the related tooltips.
	For example, CCPropsItemWeapon can hold the properties MAGEWEAPON, USEBESTWEAPONSKILL, etc, CCPropsItemEquippable can hold FASTERCASTING, RESFIRE, etc. For items, the right ComponentProps are attached when their TYPE changes.
- Changed: PROPLIST now shows also the properties stored in ComponentProps, preceded by the name of the component inside square brackets.
- Added: BASETAGLIST and BASEPROPLIST, which output the tags and the props stored in the Base Def section (Chardef/Itemdef...).
- Added properties (only the keyword, no functionality for now) for:
	- Items: LavaInfused, Prized, ShipwreckItem, Unlucky, Unwieldly.
	- Weapons: Antique, AssassinHoned.
- Removed properties: BonusHitsMax, BonusStamMax, BonusManaMax.
- Changed: RANGE is now a dynamic script property, meaning that it can be changed per-instance and is no longer a base-only prop.

27-12-2018, Nolok
- Fixed: New player starting with TIMER=0 and couldn't finish any action (Issue #171).
- Changed: Removed AutoTooltipResend ini setting.
- Fixed: Tooltips not refreshing fast enough (Issue #170).
- Fixed: ARGN1 was in ms in trigger @DROPON_GROUND (Issue #168).
- Fixed: Now RANGEL stores the lowest range value, and RANGEH the highest. It was inverted again in the past, no idea when.

28-12-2018, Nolok
- Fixed: MOVE and MOVENEAR not removing from the screen the object if it was moved farther than the player view distance.
- Fixed: MOVENEAR always sent an UPDATE for the moved item, independently from the 3rd argument's value.

28-12-2018, Drk84
- Added: Detecting Hidden skill can use the values stored inside the EFFECT property, these values are used for determining the search radius.
	If EFFECT is not defined in the SKILL definition the default formula is used:
	SearchRadius = DetectingHidden / 100
	Examples:
  		With an EFFECT value of 20 we will always search inside a 20 tiles radius, no matter the skill score.
		With an EFFECT value of 1,20 the search radius will vary from 1 to 20 depending from the player skill score.
		If EFFECT is not defined and we have 90.0 in DetectingHidden the search radius will be 9 (900/100, this is the default behaviour).
- Added: Tracking skill can use the values stored inside the EFFECT property, these values are used for determining the tracking maximum distance.
    If EFFECT is not defined in the SKILL definition the default formula is used:
	MaximumDistance = Tracking / 10 + 10
	Examples:
		With an EFFECT value of 20 the maximum tracking distance is 20 tiles, no matter the skill score.
		With an EFFECT value of 10,100 the maximum tracking distance will vary from 10 to 100 tiles depending from the player Tracking skill.
		If EFFECT is not defined and we have 90.0 in Tracking Skill the maximum tracking distance will be 100 tiles (900 / 10 + 10, this is the default behaviour)
	Notes
		When using the Tracking skill, the maximum distance is stored in ACTARG2, this means that the value can be changed in the @PreStart, @Start and
		@Stroke triggers, but because the maximum distance is calculated after @Select and before @PreStart changing the value in @PreStart and @Start will take
		effect on the next @Stroke trigger.

29-12-2018, Nolok
- Added: f_onaccount_pwchange now has a LOCAL.OLDPASSWORD storing the old password, before the requested change is done.

01-01-2019, Nolok
- Added: DEFNAME readable property to ROOMDEF (Issue #174).

02-01-2019, xwerswoodx
- Added: strToken function to tokenize strings. Instead of explode, this function does not override commas so you can get strings with commas without having any problem.
	Usage:
		<strToken "<args>", "value", "seperator">
	Seperator:
		Character for tokenize array. Usage is same with explode, could be " " for space, "," for comma, or just character for any char.
	Values:
		0: Return length of the token.
		Number: Return specific element of string.
		startNumber-endNumber: Return specific elements with range.
	Examples:
		<strToken "A.B.C", 0, .> RETURNS 3
		<strToken "A.B.C", 2, .> RETURNS B
		<strToken "A.B.C", 1-2, .> RETURNS A.B
		<strToken "A,B.C", 1, .> RETURNS A,B

03-01-2019, Nolok
- Fixed: ExperienceMode 08 flag (don't go below the current level when losing exp) didn't work (Issue #167).

05-01-2019, Nolok
- Fixed: Sometimes setting a spawn's SpawnID to a spawn group or a template generated bad spawn point with an invalid SpawnID (Issue #179).

06-01-2019, Nolok
- Changed: Now the resync won't reload again tiledata.mul and verdata.mul and it won't index again the client files, since those files were already write-locked while Sphere was running.
- Fixed: The feature of auto-generating a defname for malformed AREADEFs lacking a defname but having a name set wasn't working.
- Fixed: PacketDeathAnimation caused an invalid packet to be sent (Issue #181).
- Fixed: Server not sending to client a Season Update packet after resurrection, so it still shown the "desolated" season (Issue #182).
- Removed: TIMERT keyword, just continue to use TIMER and TIMERD as always (and the new TIMERMS if fits your purpose). The "tick" for world objects isn't a concept since some time,
	for more infos check in this changelog for the 28-09-2018 commit (Issue #125).

07-01-2019, Nolok
- Fixed: The death status packet (sent by the client when the server sent the complementary packet, enabled with the PacketDeathAnimation ini setting) was incorrectly parsed,
	desynchronizing the input packet queue and making Sphere think it was receiving malformed or unknown packets (Issue #181).
- Fixed: Tooltip info for spawns.
- Fixed: PacketScreenSize (0xBF.0x05) parsing incorrectly the received data.
- Added: Packet UseTargetedSkill (0xBF.0x2E) functionality.
- Added: In debug builds, when an unknown packet is received, its data is dumped to the console and to the log.
- Fixed: EFFECT with id of 4 caused an exception.

09-01-2019, Nolok
WARNING: the following change could break some hackish expedient used in scripts! Read carefully!
- Changed: Defname numeric value has a different byte order now. For example, <hval s_clumsy> returned 0ce000001, so you could retrieve the spell number by doing <hval s_clumsy&(~0ce000000)>,
	which removed the resource type bits. Now <hval s_clumsy> returns 082700001, so you can't use the previous code anymore. Use RESOURCEINDEX instead.
	This change was needed because too much informations were stored inside the UID, and its last bytes (used to store the resource type) overlapped with some internal flags.
- Added: <RESOURCEINDEX defname> to retrieve the resource index from the defname, ignoring the resource type (Chardef, Spell, Itemdef, Template...) bits.
	As example, <RESOURCEINDEX s_clumsy> returns 1, which is the spell number (id).
- Added: <RESOURCETYPE defname>, which gets the resource type (RES_ITEMDEF, RES_SPAWN, etc) from the defname. The list of the resource type numbers is in the X scriptpack in core/defs.scp.
- Changed: REGIONTYPE section could not accept landtile types with index > 255. Extended this limit to 65534.	This also extends the maximum number of pages in a book by the same amount.

11-01-2019, Nolok
- Fixed: NPC skill training (Issue #176).

13-01-2019, XuN
- [Garbage Collect]: Added error code 0x4226 for old spawn memories in NPCs being converted (and removed in the proccess) to the new system. This error should happen once in the first load and never more (if there's a worldsave after).
- Fixed memories with memory_spawnitem not updating the spawn when loading saves from old builds.
- Fixed Asserts on spawn items when retrieving more1/spawnid being it an invalid resource id.

20-01-2019, Nolok
- Fixed: Teleport spell (and .tele) didn't trigger position-related triggers (like @Enter on regions or @Step on items).
- Fixed: Multis were added to the radarmap when the distance from its center and the player was < 31, now the check is done against the position of the farthest corner/side the player is facing.
	This fixes big multis (like	keeps) appearing on the radarmap only when the player was very close.
	Also, the CanSee checks against multis now use the same mechanic, instead of using the center of the multi.

24-01-2019, Nolok
- Fixed: ARGN1 value from @Hit trigger ignored in @GetHit (Issue #211).
- Fixed: Blood generated after a received hit had the wrong color (Issue #206).
	This changes also the index of the color shown by EFFECT functions, because actually until now it was showing the hue with index = (index - 1).

29-01-2019, Nolok
- Fixed: Deeds with non-multi MORE not being removed after the item is placed (Issue #218).

31-01-2019, Nolok
- Fixed: Attacking something gray caused it to go criminal when it attacks back (Issue #199).
- Changed: Some combat-related memories were not added.
	- MEMORY_IRRITATEDBY: It was added only when the char received a hit or when it was provoked. Now it's added also when someone attacks the char, but has not started or landed the hit yet, and when its pack was snooped.
	- MEMORY_AGGREIVED: It was added only when the char was provoked. Now it's added also when someone starts to attack another char.
- Fixed: Wrong formula used to check if a char did notice someone snooping or stealing.
- Fixed: The "snoop notice" message was shown even when the char didn't actually notice the snooping and the related code wasn't executed.
- Fixed: Noticing someone snooping didn't mark the thief as a criminal.
- Fixed: Trying to attack a char was always noticed as a crime, even if the attack attempt was aborted.
- Changed: The delay between a guard call and the other changed from 1 to 2.5 seconds, to avoid excessive spamming.
- Added: Security check when receiving the new movement request packet (0xF0), to ensure invalid data (or the Krrios' client login packet) isn't considered.

04-02-2019, Nolok
- Fixed: Character pausing the attack when breaking the line of sight for the target (Issues #217 and #196) (thanks shiryux).
- Fixed: When AttackerTimeout elapsed not only the attacker list was emptied, but also the whole combat was aborted.

13-02-2019, Nolok
- Fixed: Skillmenus not showing submenus correctly (Issue #200).
- Fixed: Couldn't make items which didn't have in the SKILLMAKE the typedef for the item needed to craft it.
- Added: Warning message if adding to SKILLMAKE elements which aren't a skill or a typedef.
- Added: Warning message when trying to craft an item with an invalid SKILLMAKE (instead of just aborting the crafting process without any notification).

14-02-2019, Nolok
- Added: .ini Option Flag OF_StatAllowValOverMax (Issue #185): it allows stats value to be set above their maximum value (i.e. allow hits value > maxhits).
	When this OF is on and the stat value is above the maximum value, each time @RegenStat is called the stat value is decreased -1 at a time.
- Fixed: Players not being removed from other client's screen when they logout (Issue #228).
- Fixed: The time of the last access from a player of a sector wasn't correctly set. This also invalidated the checks on SectorSleepDelay.

14-02-2019, Julian
- Fixed: DIALOGCLOSE not removing the dialog from the internal list of dialogs when src is changed through TRYSRC. (Issue #219)
- [Port from 0.56d, 29-06-2016, Coruja] Fixed: Attack/Kill command on pets allowing select the pet itself as target, making it attack his owner. (Issue #57)
- Added: ARGN3 to @MurderMark. If it's set to 1 (or anything but zero), it will skip murder count and criminal flag. (Issue #221)
	This will allow users to script their own kill/murder system. Note that Noto_Update() still will be called after the trigger.

23-02-2019, Nolok
- Fixed: Sometimes a duplicated private UID was assigned to REGIONTYPEs, making Sphere attach to regions wrong REGIONTYPEs (Issue #232). Thanks to Julian, Atilla and the other people on Discord for their intensive testing!
- Fixed: SectorSleep=0 didn't disable sector sleeping.
- Changed: When a char is flagged as criminal by a "viewer" char, now the viewer's MEMORY_SAWCRIME linked to the criminal is removed, if any (Issue #226).
- Added: In @Criminal trigger, RETURN 0 doesn't flag the char as criminal but does remove SRC's MEMORY_SAWCRIME.
	RETURN 1 still blocks the whole trigger behaviour, so it will not flag as criminal and won't remove the MEMORY_SAWCRIME.
- Added: In @Criminal trigger ARGN2 now holds 1 if the char is being marked as criminal because he has an active MEMORY_SAWCRIME linked to the SRC (viewer), otherwise it holds 0.
- Added: .ini Option Flag OF_GuardOutsideGuardedArea (Issue #224) to allow guards to walk in unguarded areas, instead of being teleported back to their home point.

27-02-2019, Nolok
- Fixed: Walking in a sector didn't awake the adjacent ones (Issue #229).
- Fixed: Ini setting ReagentLossFail taking also mana (Issue #234).
- Added: Ini setting ManaLossFail, to make the char lose part of the mana required to cast the spell if the spell casting fails.
- Fixed: Murderer memory timer increasing at each login-logout cycle (Issue #235).
- Fixed: Price property not respected by vendors when selling to them (Issue #238).

06-03-2019, Nolok
- Fixed: Cannot access regiontype properties if the regiontype has attached a typedef (Issue #247).
- Added: .ini Option Flag OF_OWNoDropCarriedItem (When overweighted, don't drop items on ground when moving them (or using BOUNCE) and checking if you can carry them) (Issue #245).

06-03-2019, Julian
- Modified: PILOT function for Ships. Now you can set an UID to pilot the ship, self dclick will remove pilot memory (after triggering @UnMount), also setting same uid twice as pilot will detach pilot from ship.
	You can modify spk_ship_cmds and add this:
		ON=Pilot
		PILOT <SRC.UID>
- [Port from 0.56d, 23-02-2019, Coruja] Added: .ini Option Flag OF_MapBoundarySailing (Issue #147) to make boats move to the other side of the map when reach map boundary.

07-03-2019, Drk
- Added: @HitParry trigger for characters:
	Default Object:  The character that succesfully parried the strike.
	SRC: The character that did the strike.
	Argn1: Percent of damage that will be reduced (default 100%).
	Argn2: Damage type.
	Argo: The weapon/shield used for parry, if any.
	Local.ItemParryDamage: The chance that the parrying item will be damaged (default 100%).
	Return 1: Completely blocks the damage as if the parry damage reduction was set to 100.
  The trigger is fired when a character succesfully parries an hit, that is the trigger @(Skill)UseQuick for parrying is succesfull.
  By default a parried hit will reduce the damage by 100% and thus negating the hit and the following triggers (@Hit and so on).
  There are two for changing the damage reduced:
	Overwriting the Argn1 value in the @HitParry trigger.
	By using the EFFECT property in the skill definition of the Parrying Skill, in this case the damage will be reduced by the EFFECT value:
		If only one values is defined (Example:EFFECT=75) the damage will always be reduced by 75% no matter skills.
		If one or more values are defined (Example: EFFECT=25,75) the damage will be reduced by 25% when the Parrying skill is near 0.0 and by 75% when the Parrying skill is near 100.0, that is damage reduction will be scaled according to the character parrying skill.
		If no values are defined, the default value of 100 will be used.

17-03-2019, Nolok
- Fixed: Criminal status not expiring (Issue #239).
- Fixed: Chars with MT_SWIM Can flag couldn't walk on static water tiles (Issue #253), and chars without MT_SWIM could walk over dynamic water tiles.

24-03-2019, Julian
- Modified: @HitParry to include local.Damage, which contains the raw amount of damage before any parrying modification.

31-03-2019, Nolok
- Fixed: Swimming NPCs could pass under items even if their z wasn't high enough.
- Fixed: NPCs could always walk inside places with a ceiling too low for them to fit below.
- Fixed: The absence of MT_WALK didn't stop NPCs from walking on land.
- Fixed: Ghosts couldn't pass through doors (Issue #263) and FIX/teleport setting incorrect Z (Issue #262).
- Fixed: BTFish encryption not working (Issue #256).
- Fixed: During character creation, invalid professions sent by the client will now be ignored.

05-04-2019, Nolok
- Added: trigger @CreateLoot. It fires when the NPC dies, if it is allowed to have a loot (not a player, not conjured, no DEATHF_NOLOOT).
	The main advantage of using this trigger in place of @NPCRestock and @Create is that items will be created only when they are required,
	so that a big number "useless" items won't be stored in the save files (= smaller save files), also GMs wouldn't be able to see what a monster is going to drop before it dies.
- Fixed: Followers property being increased even when a summoning spell fails and when a conjured creature is dispelled (Issue #264).
- Fixed: GMs couldn't ADD or drop items on the same tile of a t_wall item.
- Fixed: Items created with NEWLOOT didn't store the script file and line number where they were created, so that info wasn't eventually shown by garbage collection.
- Fixed: NPCs able to spawn to a P they cannot move at/from (Issue #255).

06-04-2019, Nolok
- Fixed: MT_NOINDOORS CAN flag didn't prevent a char to walk under a roof (or items acting as such, like ones with the "platform" or "blocking" tiledata flag).
- Added: MT_NOBLOCKHEIGHT CAN flag (020000) to ignore char's height when checking if it can move to a point (otherwise, if the ceiling is too low for it to fit below, the movement is blocked).

07-04-2019, Nolok
- Added: REGION_FLAG_NOMINING (020000) to prevent mining in a region.
- Added: REGION_FLAG_WALK_NOBLOCKHEIGHT (040000) to ignore char height for walkchecks inside the region (see MT_NOBLOCKHEIGHT). Use with caution!
- Fixed: MORE value wasn't saved correctly if the value was a defname.
- Fixed: When retrieving MORE value, the numeric value was always returned even if it should have been a defname. Retrieving MORE1 didn't have this problem.

08-04-2019, Nolok
- Changed: NEWGOLD now accepts a second argument: if it's 1, the new gold is stacked on the existing pile in the pack, otherwise it's stacked in a new pile like it has always been (Issue #246).
	Usage: NEWGOLD amount, pile(1/0)
- Fixed: MORE2 value wasn't saved correctly if the value was a defname. Also, retrieving its value always returned a number even if it should have been a defname.

12-04-2019, Julian
- Fixed: Feature sending to unencrypted clients (mostly with Razor) using ReportedCliver as reference instead of CliVer.
- Fixed: Text index for dynamic dialog lines, such as dhtmlgump, they were starting at random ranges instead of starting at 0.
- Modified: Hardcoded the train and tame function for Context Menu (or Popup Menu), this way you can remove e_Trainer from every NPC.

19-04-2019, Nolok
- Fixed: DECAY treating the given value as msecs instead of tenths of second.
- Fixed: BLOODCOLOR creating black blood pools when the hue id was >= 1000 (Issue #254).

20-04-2019, Nolok
- Added: Can flag MT_STATUE (040000). When active, the char can't take any action (it's still "mortal" though, you need to add also STATF_INVUL) and acts like a statue:
	it stands still in an animation frame, specified by TAG.STATUE_ANIM and TAG.STATUE_FRAME (Issue #233). It doesn't attack or make any action (it has an empty AI), still has hitpoints, stats, skills, etc.
- Added: Can flag MT_NONSELECTABLE (080000). This char can't be selected/targeted. Use it for NPC statues which need to behave like items as much as possible.
- Added: "HasComponentProps propid" to check whether the object has the given ComponentProps (see 23-12-2018 changelog entry). Defnames for the ComponentProps IDs are added in the
	new script file core/defs_component_props.scp.
- Fixed: The server sent an Attack Accepted packet instead of an Attack Refused one when a player tried to attack a char with flags STATF_INVUL or STATF_STONE.
	That resulted in the target being considered under attack (red colored) even if the attack didn't start.
- Fixed: Food periodically decreasing and stats regenerating on chars with STATF_STONE.

23-04-2019, Nolok
- Changed: "ITEM=#id, #amount, R#chance" will now evaluate the id field only if amount != 0 and the rand check succeeded.
- Added: STRRANDRANGE function. It works like a random { } range, but for strings. E.g.: <STRRANDRANGE "boots" 1 "shoes" 1 "watermelons" 1>. Remember the quotes!
- Added: MIN and MAX intrinsic functions, which return the smaller/greater of the two numberic arguments.
- Fixed: ISNUMBER working only with decimal numbers.

24-04-2019, Nolok
- Changed: Item HEIGHT value is now first searched in the ITEMDEF (if not manually specified, the one from tiledata.mul is loaded), if absent, it's searched the DEF itemheight_0#HexID, then itemheight_#DecID.
	Before it worked the opposite way, which was slower, also now this behavior is consistent with the one of Char HEIGHT (first search the CHARDEF, then the DEF).
- Fixed: Incorrect parsing of quoted arguments of VAR and TIMERF.

WARNING: the following change could break compatibility with previous scripts! Read carefully!
- Added: RESDEF keyword, similar to DEF, but retrieves only the numeric identifier of Resource DEFNAMEs. Example of usage: <RESDEF.i_dagger>.
- Changed: The DEF keyword doesn't find the numeric identifier of Resource (ITEMDEF/CHARDEF...) DEFNAMEs anymore. Use RESDEF. DEF is used to retrieve values from [DEFNAME] sections. Example of usage: <DEF.mt_walk>.
	This can break compatibility with previous scripts, if you used DEF to retrieve items/chars defname numeric value. You have to use RESDEF now.
	You're safe (even if the underlying code is a bit slower) if you just used ID=i_dagger instead of ID=<DEF.i_dagger>.
	If you know that a keyword is a DEF or a RESDEF, the best thing would be to use the right prefix. When Sphere enconunters a keyword without a prefix, it searches in the keyword lists in this order:
		functions, VARs, RESDEFs, DEFs, so using the prefix will skip useless lookups in the wrong tables and will make Sphere search directly in the right one.

25-04-2019, Nolok
- Changed: Moved out some functionality from COMBAT_PREHIT CombatFlag: now it makes the hit animation start after the damage has been dealt (it should be the other way around, but it's how OSI does that...).
- Added: COMBAT_FIRSTHIT_INSTANT CombatFlag to mimic another OSI feature: it makes the first hit in a combat instant (0 delay) (Issue #250).
	So, to mimic OSI combat you should enable both COMBAT_PREHIT and COMBAT_FIRSTHIT_INSTANT.
- Changed: LOCAL.ItemDamageChance in @Hit and @GetHit default value from 40 to 25.

26-04-2019, Nolok
WARNING: Important change!
- Added (by XuN) the following ini settings and base char properties (to override the ini setting):
	- EraLimitGear: Don't allow to NPCs to create gear newer than the items from the expansion in the given value (Clothes, weapons, hairs ...).
	- EraLimitLoot: Don't allow to NPCs to create loot newer than the items from the expansion in the given value.
	- EraLimitProps: Don't allow to chars (players and NPCs) to have properties newer than the ones from the expansion in the given value (Clothes, weapons, hairs ...).
	These keywords will allow the creation of a "universal" scriptpack, which loads only the desired items and properties.
	There's another advantage, which requires a little more attention by the scripter though: an assignment of a property that belongs to an expansion greater than your EraLimitProps will now be IGNORED,
	so the save files will be smaller (and the save times a little shorter too), because the ignored properties won't be loaded nor saved.
	This also means that if you create characters with a low EraLimitProps (valid also for EraLimitGear and Loot) like 1 (T2A) and then change idea and set it to 4 (Samurai Empire), you will have to recreate the chars
	to make them load the Props/Gear/Loots matching your new era limit. This means that you may need to RESPAWN THE WORLD.
	The elemental damages and resistances aren't treated like expansion-restricted properties, so to enable them you have to use COMBAT_ELEMENTAL_ENGINE, like always.

- Changed: Made EXPANSION a Base property only.
- Added: "Elves/Gargoyles only" tooltips.
- Added tooltips for: Altered, Antique, AssassinHoned, Bane, Battlelust, Blodddrinker, BoneBreaker, Brittle, CastingFocus, EaterCold/Energy/Fire/Kinetic/Poison, Ephemeral, HitFatigue, HitManaDrain, HitSpell, Imbued,
	IncreaseGold, LavaInfused, LowerAmmoCost, Massive, Prized, ReactiveParalyze, Searing, Splintering, ShipwreckItem, SoulCharge, SoulChargeCold/Energy/Fire/Kinetic/Poison, Unlucky, Unwieldly, UseBestWeaponSkill.
- Added keywords and tooltips for: BonusBerserk, DurabilityBonus, HitSparks, HitSwarm, MysticWeapon. Functionality is missing yet.
- Removed redundant property DecreaseHitChance. Just use a negative IncreaseHitChance (also, there is a tooltip entry only for IncreaseHitChance, not for a DecreaseHitChance).
- Removed properties: DAMMODIFIER, MANAPHASE, MANABURST(Frequency/Karma/Evil/Good).

30-04-2019, Nolok
- Added: AR and AC keywords also for items, which return the total protection given by an armor piece. This value is internally used when COMBAT_ELEMENTAL_ENGINE is off and its value depends on
	ARMOR, MODAR, ATTR_MAGIC and OF_ScaleDamageByDurability.
- Fixed: ARMOR tooltip showing also with COMBAT_ELEMENTAL_ENGINE on.
- Fixed: Item ID could be overridden only with a defname and not using a plain number.
- Added: Error if trying to use as base an item ID greater than the maximum tiledata entry index.

01-05-2019, Nolok
- Fixed ISNUMBER also for float values.
- Changed: Now intrinsic function arguments are recognized even if separated by a whitespace from the function, other than being enclosed by ().
- Fixed: "Last logged" sysmessage shown also to a new player.
- Fixed: FILE object functions couldn't accept quoted arguments.

02-05-2019, Nolok
- Added: MDB object. It's an SQLite database instance working like LDB, with the fundamental difference that MDB works with a temporary, in-memory database (this means that all the data is lost when you close the server).
	Use it if you have small databases where you query from very frequently, since accessing a table from a db file is much slower than doing that from an in-memory db.
	OPEN and CLOSE methods doesn't work with MDB.
- Added: LDB/MDB functions IMPORTDB and EXPORTDB "database.db". The first loads into the database object a database file, the second saves the database object to a database file.
- Added: LDB.FILENAME property to get the filename of the database connected to. Returns an empty string if there isn't an open connection.
- Fixed: Crash when trying to execute a QUERY on a closed/never opened LDB.
- Added: ISTEVENT for SERV.CHARDEF and SERV.ITEMDEF.

05-05-2019, Nolok
- Fixed: List element values could only store 32 bits number, instead of 64 bits ones (like TAG).
- Improved: Windows console window log speed and removed rubberband effect when too much text was appended in a short amount of time.
- Fixed: TAGs couldn't be set to a 64 bits number (was still limited to 32 bits).

07-05-2019, Nolok
- Changed: t_house_component to ei_house_component, t_house_lockdown to ei_house_lockdown, t_house_secure to ei_house_secure, according to the new X scriptpack naming convention for TYPEDEFs
	(if a TYPEDEF is meant to be used as a TEVENT or an EVENT, use the prefix "ei_"; if the TYPEDEF is meant to be used as a base TYPE, use the classic prefix "t_", as always.)

12-05-2019, Nolok
- Fixed: SQLite last error code wasn't cleared after a successiful query, generating log errors even if the new query didn't return any error.

14-05-2019, XuN
- Fixed: ON=@Create trigger not firing on [TYPEDEF x] when the base item didn't have the trigger itself.
- Removed: duplicated call to @ItemCreate
- Added: UseDoor function for t_door and t_door_locked ignoring default key checks.
- Updated: multi's typedef events to the new 'ei_name' standard

15-05-2019, XuN
- Added: RemoveAllKeys to the source executing RemoveKeys(uid) to owner, coowner(s), friend(s) and players in the access list.
- Changed: Now all multis call RemoveAllKeys when being removed if AutoHouseKeys is enabled in the .ini
- Fixed: Redeed crashing sphere when no real char was given as src (for example via @Timer).
- Added: f_multi_onplacement_check function called from CItemMulti::Multi_Create (where the multis do their checks to be placed) with this params:
	return 0 // Use default checks (wich values may be modified with the below locals)
	return 1 // Prevents the multi from being placed.
	return 6 // Allows the multi to be placed without default placement checks.

	local.check_BlockRadius=-1, 1, -1, 1	// Default: an area of +1 in each direction
	local.check_MultiRadius=0, -5, 0, -5	// Default: 5 tiles in both North and South
	// Values are: West, North, East, South
	local.id=m_xxx		// Read Only
	local.p=position	// Read Only

19-05-2019, Nolok
- Fixed: Players logging in an already active sector weren't marked as active, making them unable to fire their TIMER and every related event (like skills).

25-05-2019, XuN
- Fixed: Regen[Stat] not working, same for Regen[Stat]Val.
- Fixed: AttackerTimeout=0 in the ini not working as intended.
- Changed stat's regens checks and OnTickPeriodic to work in a tenth basis instead of second.
- Fixed: Death checks being done each second instead of in each tick.
- Changed: Mounted characters now get stats regens, if you want the avoiding stats to regen add an event with ON=@RegenStat return 1 when mounting them.
- Added: RegenHitsD, RegenManaD, RegenStamD, RegenFoodD accepting tenths instead of seconds, eg: RegenHits=3 will regen hits each 3 seconds; RegenHitsD=3 will do it each 0.3 seconds.
- Changed: Now Regen[Stat] will store the time of the last update check instead of the time in which the next update will be done, so if you change RegenHits the new value will take effect inmediatelly instead of on the next update.

01-06-2019, Nolok
- Fixed: Non-GM chars couldn't walk below roofs/floors/platforms placed just a couple of z points above their head (Issue #273).
- Added: .ini experimental flag EF_WalkCheckHeightMounted. When this is on, assume during walkchecks that a mounted character is taller by 4 z points. Since the client walkcheck considers the height of a mounted char to be
	the same as the height of the unmounted char, enabling this might prevent mounted characters to walk under places they could before.
- Fixed: NPCs with MT_FLY could fly over a wall and then drop through the roof, falling inside a building they shouldn't be able to enter in that way.

04-06-2019, Drk84
- Fixed: Arrow not being consumed in @Hitmiss.

05-06-2019, Nolok
- Fixed: Casting recall spell on a non-rune item caused an exception (Issue #271).
- Fixed: Clilocs didn't parse correctly empty and NULL arguments and the cliloc for the item name wasn't forcefully sent first (Issue #272).
- Updated: Added more informations to the log message reporting a client crash.
- Fixed: High Seas tiledata terrain data wasn't read correctly, also FLAGS was considered a 32 bits number instead of a 64 bits one, as now it is.
- Changed: Renamed SERV.TILEDATA.id.UNK19 to LIGHT and added HUE. ANIM was considered to be a 4 bit field, but it looks like it's actually a 2 bit number (and the following 2 bits hold another value, now stored into HUE).

06-06-2019, Nolok
- Changed: Improved a lot the precision of the stack trace, now it should point exactly (in most cases) to the function where the exception was generated.
- Fixed: UPDATE caused Stygian Abyss or later clients to show corpses changing their laying direction (even if it actually was a visual artifact, direction wasn't changing server-side) (Issue #274).

06-07-2019, Nolok
- Fixed: SERV.CLEARVARS, CLEARTAGS, CLEARCTAGS not working with the given mask (Issue #281).

12-07-2019, Nolok
- Fixed: STRSUB always cutting away last letter (Issue #287) and not working with index = -1.
- Fixed: "Can't dynamically assign type 't_multi_custom' to an item." error showing also when setting the type from the base def (Issue #285).
- Fixed: Craft menus showing every possible item, even if the required materials are not available (Issue #286).
- Fixed: Selling an item to a vendor caused a new pile of gold to appear in the pack each time, instead of going to an existing pile of gold (Issue #278).

15-07-2019, Nolok
- Changed: Improved timing precision in the stack trace: changed the time unit from ticks/milliseconds to microseconds.

18-07-2019, Nolok
- Fixed: MORE1 not working as a timer for plant growth for t_crops items (Issue #288).
- Fixed: The moongate generated by the Gate Travel spell at the destination P had a color which didn't match the destination region safe/unsafeness (Issue #283).

21-07-2019, Nolok
- Fixed: WEIGHTREDUCTION not working correctly for items inside a container (Issue #289).
- Fixed: Retrieving a value from an unexistant LIST did not return -1; overwriting a LIST element generated an exception (Issue #290).
- Fixed: Profiler and worldsave message showing incorrect times (Issue #296).
- Fixed: Client listing showing the number of the online clients at the end of the list, instead of the top.
- Added: Doc file "Porting from 0.55 to 0.56.txt" (the content was posted years ago by XuN on the forum).

23-07-2019, Nolok
- Added: -J command line switch (Windows specific) to automatically close the console window after server termination.
- Fixed: -c and -k (on Windows) command line switches were considered only if lowercase.
- Fixed: Invalid "Reject Move Item Request" packet sent when trying to drag an item with attr_move_never (Issue #300).

24-07-2019, Nolok
- Fixed: Could pick up and move items or item stacks too heavy to be carried (Issue #303).
- Fixed: Adjacent sectors not waking up from sleep. Those sectors awakened only when a player entered inside them, this meant that corpses were removed and NPCs respawned only when a player
	entered in that sector: this looks ugly (Issue #297).
- Updated: Speed improvements in the NPC Pathfinder algorithm and script line reading.

24-07-2019, Drk84
- Added: Two optional parameters "linearcheck" and "forcecheck" to the SKILLUSEQUICK character command:
	SKILLUSEQUICK "skillId", "difficulty", "linearcheck", "forcecheck"

	Linearcheck:
	This optional parameter when set to 1 will make Sphere performs a linear check instead of using the default Bell Curve formula.
	The linear check is usually used for combat checks (hitting, parrying, resisting spells) while the Bell curve check is usually used by almost all of the other skills.
	Take note that when using the linear check, the highest is the difficulty value the easier is to pass the test, while the opposite is true for a Bell curve check.

	Forcecheck:
	This optional paramter allows the execution of the Skill_UseQuick method by a skill with SKF_SCRIPTED flag.
	By default Sphere does not allow a skill with SKF_SCRIPTED flag to execute the Skill_UseQuick method, setting the value to 1 will allow the execution
	of the Skill_UseQuick method.

	Examples:
	skillusequick skill_appraise,75			//Make a quick check with item id skill with a difficulty of 75 and using the bell formula.
	skillusequick skill_appraise,<itemid>/10,1		//Make a quick check with the item id skill with a difficulty equal to the character itemid value and using the linear check formula.
	skillusequick skill_parrying,50,0,1		//Assuming that the parrying skill has the SKF_SCRIPTED flag, make a quick check with parrying skill,  using the Bell curve formula with a difficulty of 50 and forcing the execution of  the Skill_UseQuick method.

	Special Cases
	Sphere internally uses a quick check when certain actions are performed:

	Camping: Camping skill uses a quick check for activating up campfires.
	Mining:  Lingot smelting is handled by a quick check.
	Musicianship: Playing an instrument is handled by a quick check.
	Parrying: The success check for Parrying is handled by a quick check, remember that by adding the SKF_SCRIPTED flags to the Parrying skill will made you lose access to the @HitParry trigger.
	Repairing Items: Two quick checks are made, one uses the crafting skill from which the item is created by, the second uses the Arms Lore skill.
	Resisting Spells: A quick check is made when resisting a spell with SPELLFLAG_RESIST.
	Tinkering: Copying a key is performed by a Tinkering quick check.
	Training Dummies: All the Melee, Ranged and Pickpocket dummies uses a quick check.
	Tracking: Tracking uses a quick check when STARTING to track (the tracking menu is displayed and the quarry category is selected).

25-07-2019, Nolok
- Changed: The "too dumb to be able to use NPC Advanced Pathfinding" INT value from 70 to 30 (to ignore this check enable NPC_AI_ALWAYSINT in the ini).

26-07-2019, Nolok
- Improved: map checks (and, again, pathfinding) are significantly faster now, this means that the server can handle more alive/awake NPCs than before (without causing any lag).

28-07-2019, Nolok
- Fixed: When a derived ITEMDEF (like [ITEMDEF i_something], not [ITEMDEF 01234]) was created and neither a type and a valid id were set in the script, the item base was considered having
	random type, layer, weight, tiledata flags and CAN flags.
- Fixed: NotoSaves weren't always cleared right when they timed out.
- Fixed: Attacker elapsed time value wasn't increased exactly every second (but after a greater delay) (Issue #304).

30-07-2019, Nolok
- Fixed: Tooltip data not being sent right after an item was added to a container, in that case a random tooltip was shown for the item.

02-08-2019, Nolok
- Fixed: Connections to the HTTP server were always blocked, even if legit.
- Fixed: NPCs could train a skill without any upper limit if the difference between teacher and scholar skill was high enough (Issue #307).
- Fixed: REGENVALHITS/STAM/MANA/FOOD not being saved during worldsave (Issue #308).

06-08-2019, Nolok
- Fixed: When a char walked on a spiderweb and got stuck its last step was reverted, so it wasn't standing in the same tile as the web.

07-08-2019, Drk84
- Fixed: Purple potions MoreX (countdown to explosion) always ignored when set, default countdown value is 4 seconds.
- Added: Spider webs stuck timer is now based on this formula: 2s + ((100 - (min(100,str))) * spiderWebHitPoints / 100)
	Mininum stuck timer value is 2 seconds while maximum stuck timer value is 10 seconds.

08-08-2019, Nolok
- Fixed: Spawned chars weren't unlinked from the spawnitem when tamed (Issue #312).
- Fixed: SELFREPAIR property having effect also on items which do not have valid MAXHITS.
- Fixed: DIALOGLIST not working (Issue #314).

10-08-2019, Nolok
- Added: f_onchar_create_init function in core/serv_triggers.scp; it's called after the client sent the character creation data, but before
	the character is created server-side (f_onchar_create is called after the creation, so the function arguments are read-only).
	Function parameters:
	 Variables:
	   Read-Write:
		 ARGN1 --> Feature flags sent by client
		 ARGN2 --> Character profession (0=Advanced, 1=Warrior, 2=Mage, 3=Blacksmith, 4=Necromancer, 5=Paladin, 6=Samurai, 7=Ninja)
		 ARGN3 --> Character race (1=Human, 2=Elf, 3=Gargoyle)
	   Read-Only:
		 ARGS  --> Account name
		 ARGO  --> Client creating the character
	 Return:
		0 --> Allow character creation (default action)
		1 --> Deny character creation
- Fixed: @(Item)DropOn_Ground ARGS not being used, as indicated in the wiki.
- Changed: @(Item)DropOn_Ground now fires BEFORE the new P is set! The new P is stored in the ARGS of the trigger. Prior to this change,
	the triggers were called after the new P was set.
- Added: In @(Item)DropOn_Ground, ARGN2 value is now == 1 if the trigger is called during a BOUNCE check (the char is overloaded and the item is being dropped on ground).
- Fixed: @(Item)DropOn_Ground not firing when, during a BOUNCE check, the char was overloaded and the item was being dropped on ground (Issue #295).

22-08-2019, Nolok
- Fixed: Couldn't overwrite an item's container in @DropOn_Ground (Issue #317).
- Fixed: Error while placing a non-multi item using a deed (Issue #312).
- Fixed: Placing a multi always created a key in the backpack, regardlessly of the type of the multi.

23-08-2019, Nolok
- Fixed: Removing the floor during house customization didn't synchronize correctly the change with the server, making possible to commit invalid designs (Issue #202).

29-08-2019, Nolok
- Fixed: Sphere couldn't recognize the start of a new [ ] section if there was some whitespace before the first bracket.
- Fixed: *DB.ROW.NUMROWS returning "" instead of 0 if the previous query didn't get any result.

04-09-2019, Nolok
- Added: TAG.OVERRIDE.NOREVEALSPEAK. If its value is 1, the hidden char won't be revealed when it speaks (Issue #89).

10-10-2019, Nolok
- Added: Initial support to 0xFB packet (PacketPublicHouseContent). Public/private houses aren't hardcoded yet, but this will prevent the unknown packet warning.
- Changed: SYSMESSAGEUA will return error if the number of arguments is insufficient.

11-10-2019, Nolok
- Fixed: HTTP server did check the date of last modification of the webpage to provide even if the "If-Modified-Since" request HTTP header was not sent by the browser,
	thus serving a blank webpage.
- Added: Connection Type information to the client disconnection log message, when the client wasn't a Ultima Online one (but HTTP, Axis, etc).

12-10-2019, Nolok
- Fixed: EF_ItemStacking not working when dropping an item at Z < 0 (Issue #322).
- Fixed: While removing a floor tile in house customization, the whole floor was removed even if it wasn't invalid. Also, every other item on that floor was removed. (Issue #323).
- Fixed: Ridden combat animations not being displayed by the Enhanced Client.

13-10-2019, Nolok
- Fixed: Exception was generated when using an item on a t_loom item with invalid MORE.

13-10-2019, Julian
- Modified: Train ContextMenu to not show disabled skills (SKF_DISABLED).
- Modified: Now you can modify Animal Taming range from [SKILL] definition.
- Updated: sphereCrypt.ini.

28-10-2019, Nolok
- Fixed: Failing debug assertion when using a ranged weapon which has set as a ammo id a non-defname value.
- Fixed: Expansion limitation for properties was working only for items, not of chars. In that case they were considered as RDS_PRET2A properties.
- Fixed: Z-checks inside multis considering the blocking item's Z as an absolute Z, instead of being relative to the multi's position (Issue #328).
- Fixed: Item being moved to 0,0,0,0 P when, for some reasons, dropping it on ground failed (Issue #328).
- Fixed: P checks didn't consider custom (customized) multi items (Issue #328).
- Fixed: Using GO or teleports when having GM mode on used a wrong destination Z (Issue #331).
- Fixed: RegenValStam and RegenValMana swapped in world saves (Issue #332).

03-11-2019, Nolok
- Fixed: SERV.TIME value not being saved correctly. Also, now X saves SERV.TIMEHIRES instead of SERV.TIME (Issue #334).
- Fixed: Spells and other kind of resources didn't resync correctly (Issue #333).

12-11-2019, Drk84
- Added:    COMBAT_NPC_BONUSDAMAGE Combat flag in the sphere.ini, enabling this flag  will allows the NPCs to gain the following modifier to combat damage:
			-Bonus from the CombatBonusStat and CombatBonusPercent properties:
				The default value for CombatBonusStat is STR.
				The default value for CombatBonusPercent varies according to the CombatDamageFormula 10% if CombatDamageFormula is 0, 20% if CombatDamageFormula is 1 and 30% if CombatDamageFormula is 3.
				See changelog of the 19-03-2015  from the 56c-Changelog.txt  revision file for more details on CombatBonusStat and CombatBonusPercent.
			-Modifier from the INCREASEDAM property (from -100 up to 100%).
			-Anatomy, Lumberjacking and Tactics if the CombatDamage formula is set to a value above 0.
			This should satisfy entry #241
- Added:   BREATH.DAMTYPE, used for changing the type of damage of the breath. Default value is: DAM_FIRE.
- Added:   THROWDAMTYPE, used for changing the type of damage of the thrown item. Default value is: DAM_PHYSICAL.
		   Remember that NPCs need at least one the throwable item equipped or in the backpack.
- Added:   Two new damage flags, DAM_BREATH and DAM_THROWN. These are added automatically to the BREATH.DAMTYPE and THROWDAMTYPE properties, i think they are useful for discriminating the source of damage in the @GetHit trigger.
- Changed: Veterinary now works with all tameable creatures: that means all NPCs with brain set to BRAIN_ANIMAL, BRAIN_DRAGON or BRAIN_MONSTER AND with a Taming skill above 0.
		   Before Veterinary only worked with BRAIN_ANIMAL npcs. Remember that a NPC  is tameable when it has a Taming Skill above 0 and an Animal Lore skill set to 0
		   and the NPCs ID it's not one of the playable character races.
- Changed: All NPCs with a Poisoning skill above 0 can now apply poison (if unarmed), before only creatures with BRAIN_MONSTER could apply a poison.
- Fixed:   There was no timeout for the NPC action THROWING, resulting in a mass spam of throwing actions, the timeout is now 3 seconds.

16-11-2019, Nolok
- Fixed: Resync sometimes messed up unchanged, cached scripts.

23-11-2019, Nolok
- Fixed: Resyncing after modifying a FUNCTION broke the internal functions lookup table order, resulting in random errors when calling functions.

08-12-2019, Nolok
- Added: More detailed error messages when the garbage collection removes or auto-fixes a somehow corrupt mounted npc (Issue #347).
- Fixed: Teleporters created from custom houses teleporting to the house center coordinates (Issue #336).
- Fixed: Item equip macro not checking distance and line of sight (Issue #344).

30-12-2019, XuN
Spawns:
Added triggers:
	@PreSpawn:	Called before any npc or item is created
			-argn1: Id of the object to create, can be changed.
			-return 1: Stops the proccess.
	@Spawn: Called when an object has been created and before it has been placed, placing it in a valid spot will disable default placement checks.
			-argo: The spawned object.
			*NOTE: Since character creation is slightly different than the item's one, for chars this trigger and the placement will occur before the @Create trigger is called.

Fixed BadSpawn not working: Now each bad spawn is inserted in a vector and accessed through this command, the command now accepts args to go into a direct index (invalid index is defaulted to the first one found).


Added champion's support:
-CChampionDef (script section):
	[CHAMPION 01]
	DEFNAME=CHAMPION_Abyss
	NAME=Abyss
	LevelMax=5 //Maximum levels of this champion, for default ones it must be 5 (4 npcgroups + boss)
	Spawns=100 //Total npc spawns for this champion (excepting the boss)
	NPCGroup[1] = c_mongbat, c_imp //Group of npcs for level 1
	NPCGroup[2] = c_gargoyle, c_harpy //Group of npcs for level 2
	NPCGroup[3] = c_gargoyle_fire, c_gargoyle_stone //Group of npcs for level 3
	NPCGroup[4] = c_daemon, c_succubus //Group of npcs for level 4
	CHAMPIONID=c_semidar	//The boss

-Ingame item example 1:
	[ITEMDEF i_champion_idol]
	ID=01f18
	TYPE=t_spawn_champion	//this defname should match 300
	NAME=Champion Idol

	ON=@Create
	more=CHAMPION_Abyss
	ATTR |= <DEF.ATTR_MOVE_NEVER>

	ON=@DClick
	if (<timer> == -1)
		start //init the champion
	else
		stop // stop the champion
	endif
	return 1

-Ingame item example 2:
	[ITEMDEF i_champion_idol_abyss]
	ID=01f18
	TYPE=t_champion_spawn //this defname should match 300
	NAME=Abyss Champion Idol

	ON=@Create
	more=CHAMPION_Abyss
	ATTR |= <DEF.ATTR_MOVE_NEVER>

	ON=@DClick
	if (<timer> == -1)
		start //init the champion
	else
		stop // stop the champion
	endif
	return 1

	ON=@AddWhiteCandle
		AddSpawn//Adding twice npcs when a new white candle appears

    ON=@AddRedCandle
		timer=600	// A timeout means a redcandle removed, so force players to get the next candle within the next 10 minutes.

	ON=@Spawn
		if (<argo.baseid>==<serv.champion.<argn1>.ChampionID>)//If the spawned NPC is the champion's boss...
			argo.events=e_champion_boss	// ... give it an impressive event!. (Note: this is an example thus this event is also an example and does not exist by default.)
	    endif

R/W Keywords available for the t_champion_spawn item:
    "DEATHCOUNT": Gets/sets the total count of deaths, counts towards progression, setting a value higher than the one required by the system will have effect only when that value is requested by the code and not instantly (eg: another monster dies.
    "LASTACTIVATIONTIME": TimeHiRes of the last activation time, allowing to create cooldowns.
    "LEVEL": Current level of the champion spawn.
    "LEVELMAX": Maximum level, should be 5 by default ... other values are allowed but using other values requires scripting their behaviour since the system is done to match OSI and will not calculate good other values.
    "NPCGROUP": Gets a given npcgroup (eg .xshow npcgroup[1][3] will give the fourth npc on the first group), or create/overwrite a group (eg: .xnpcgroup[2] c_ogre, c_ettin, c_orc).
    "MORE/MORE1": Gets or sets the champion id (eg: .xmore1 CHAMPION_Abyss)
    "REDCANDLES": Gets the count of red candles (Read only).
    "SPAWNSCUR": Gets or sets the current count of spawns.
    "SPAWNSMAX": Gets or sets the total maximum spawns.
    "WHITECANDLES": Gets thhe count of white candles (read only).

Verbs available for the t_champion_spawn item:
    "ADDOBJ": Inserts an already created npc into the champion spawn (be sure you add them when the champion is activated, or they will be removed when it start).
    "DELOBJ": Removes one character from the champion counting towards the progression of itself, this does not remove the character.
    "ADDREDCANDLE": Advances the champion by adding one red candle (red candles and levels explained below).
    "ADDWHITECANDLE": Advances the champion by adding one white candle.
    "DELREDCANDLE": Regress one red candle (if any).
    "DELWHITECANDLE": Regress one white candle (if any) (If there are no white candles, then calls DELREDCANDLE).
    "ADDSPAWN": Forces the generation of one spawn (applying champion level and so)
    "INIT": Restores the champion's attributes (pretty much like a 'clear'), this is forced when changing the item's more1 so be aware to do not change (or call it) when the champion is active or it will mess up.
    "MULTICREATE": Emplaces a champion by script, a champion requires a multi area to be renamed and have custom flags, forbidding recalls or whatever.
    "START": Activates the champion.
    "STOP": Deactivates the champion and removes any progress and npcs.

Default levels explanation:
	Level 1: From start until 6th red candle is finished.
	Level 2: From 7th red candle to Level 10th red candle.
	Level 3: From red candle 11 to 14.
	Level 4: From red candle 15 to 16.
	Boss: SpawnsCur >= SpawnsMax.
	Note: Timer being called when a red candle is active will remove it and, since it has to be done again, the SpawnsMax increase by KillsNextRed.

When a spawned npc is killed, AddSpawn is being called to spawn the next one.
	-When all npcs are alredy spawned then AddSpawn checks for DeathCount > SpawnsMax, so the boss will only be generated when all the other spawns are killed.
Must have event, even if it's empty, since it's applied by the source to generated objects: [events e_spawn_champion]

03-01-2020, Drk84
- Fixed: Bandage resurrection did not work when targetting a corpse or a ghost.
		 For resurrecting when targetting a corpse the following conditions must be satisfied:
			1)The ghost must be in line of sight of its corpse.
			2)The ghost must be within 2 tiles of its corpse.
			3)The ghost must be visible.
	You can also resurrect a Bonded pet by targetting their ghost.
- Changed: Focus skill behaviour
			1)It now uses the Skill_UseQuick method, that means it will fires the SkillUseQuick/UseQuick triggers, the chance to succeed is around 50%.
			2)A small fix, Focus skill was used when Hitpoints where regenerating, now it is used only when regenerating Mana and Stamina.
			3)Focus skill will not be used if the character  Mana or Stamina are already at their maximum value, so NPCS should not spam the Focus skill anymore I think.
		    4)You can read/set the amount of mana/stamina gained by the Focus skill by using local.FocusGain in the @RegenStat trigger.
			  Default value for mana gain is Focus / 20 while for stamina is Focus / 10.
		   Remember that you need FEATURE_AOS_UPDATE_B ini flag set for enabling the default Focus behaviour.
		   For disabling the Focus skill you can set SKF_SCRIPTED in the Focus SKILLDEF section or by adding a return 0 in the @UseQuick trigger.
- Updated SphereCrypt.ini.

19-01-2020, Nolok
- Fixed: Valid mounts being reported by the garbage collection (Issue #350).
- Fixed: Warning issued when a keyring (which can act also as a classic container) had legit TDATA2 (gump ID) == 0 (Issue #352).

23-01-2020, Drk84
- Added: New ini flag DisplayArmorAsPercent.
         When enabled, display, in the tooltip, the Armor of the item as a percentage of its full armor value, the percentage is based upon the body parts the item covers.
         Remember that the displayed value is just for "cosmetical" purpose and, by default, is not used when calculating combat damage, the full AR is the one used.
		 In some cases, the Armor value displayed in the tooltip will not match with the sum of the AR of each piece of armor displayed in the status gump, this happens when an armor item cover location
		 overlaps with another armor item cover location that as an higher value.
		 Quick summary of layer body coverage:
		  Helm: 15% of AR from head.
		  Collar: 7% of AR from neck.
		  Shirt/Chest/Tunic: 35% of AR from chest.
		  Robe: A robe cover multiple position, 35% of AR from chest, 22% of AR from legs and 14% of AR from arms.
		  Cape/Arms: 14% from arms.
		  Pants/Skirt/Half-Apron/Legs: 22% of AR from legs.
		  Gloves: 7% of AR from hands.
		  Shield: 7% of AR from shield, if CombatParryEra has the 080 flag set it uses the 100% of AR  from the shield value.
		 Only works when COMBAT_ELEMENTAL_ENGINE is disabled and FEATURES_AOS_UPDATE_B is enabled. (Issue #241)
- Added: Missing layer LAYER_SPELL_Enchant.
- Fixed: Loss of reagents and mana when a summoning spell fail because Maxfollower property was reached.
		 Note: You will still lose reagents and mana if ManaLossOnFail and ReagentLossOnFail are enabled in the ini. (Issue #351)
-Updated SphereCrypt.ini.

25-01-2020, Nolok
- Fixed: Invalid keywords in the [ADVANCE] section were likely to cause memory corruption.
- Updated: SQlite to version 3.31.0.

05-02-2020, Drk84
- Added: New ini flag NPCCanFizzleOnHit, when enabled, a NPC can fizzle a spell when hit during combat. (Issue #241)
- Added: TAG.NPCNoCastTill behaviour, this tag will not allow a NPC to cast a spell if tag.NPCNoCastTill > SERV.Time.
		 Example:
		  ON=@SpellCast
		  tag.NPCNoCastTill = <eval <serv.time> + <argn3> + 50>
		 In this case, the next spell will be casted after 5 seconds, ARGN3 is the casting speed of the spell, we add it because the spell will take place
		 after ARGN3 seconds. If you are using PRECAST you probably don't need to add ARGN3. (Issue #241)

01-03-2020, Nolok
- Fixed: Auto-fixing figurines always treated them as mount items, finding fake errors (Issue #367).
- Fixed: FORINSTANCES not parsing correctly the argument.

04-03-2020, Drk84
- [Port from 0.56d, 10-09-2019, Coruja] Added: Missing context menu option "Rename" when player click on a owned pet. (Issue #368)
- Fixed: Parrying skill increase when weapon / shield wielded does not match with CombatParryEra setting. (Issue #365)
- Updated SphereCrypt.ini.

15-03-2020, Nolok
- Fixed: RANGE property broke when overridden.
- Changed: Improved Map Block Cache, allowing a much faster access to map data and improving the speed of walking and LoS checks.
- Fixed: Items not going to "sleep" when put in containers different than t_container and t_container_locked.

28-03-2020, Nolok
- Fixed: The same EVENT couldn't be stored in both EventsPet and EventsPlayer.
- Fixed: EVENTS keyword not returning an error if at least one of the given arguments was parsed successifully.

29-03-2020, Nolok
- Fixed: Sectors not always going to sleep.
- Changed: More meaningful error message when a MUL/UOP file is not found during startup.

31-03-2020, xwerswoodx
- Fixed: Wrong if statement fixed in on Vendor Restock. (Issue #389)

02-04-2020, xwerswoodx
- Added: REVEALF_SNOOPING, REVEALF_STEALING, REVEALF_STEALING_SUCCESS, REVEALF_STEALING_FAIL flags to sphere.ini (Issue #393)

03-04-2020, XuN
-Added f_multi_setup, called after the multi has been created, placed and it's component added, so events and types can be setup without weird workarounds. It accepts no returns and has no arg.
[Changelog] Fixed: Updated text of f_house_onplacement_check was never working, it's correct name is f_multi_onplacement_check.
-Reactive Armor:
	-Fixed server crash when 2 attackers with Reactive Armor effect damage each other and the damage bounced back recursivelly.
	-The %of damage reflected by Reactive Armor is now stored in More1L in it's rune item.
	-The value is asigned by default by a linear formula reflecting the caster's magery skill and the effect value of the spell.
	-The value can also be modified now via @EffectAdd.

07-04-2020, xwerswoodx
- Fixed: The issue on Resurrection, which causes the server freezes. (Issue #398)

09-04-2020, Nolok
- Fixed: Using ACCOUNT object inside a trigger checked if the SRC had high enough privilege (PLEVEL) to access/modify ACCOUNT's properties, instead of acting with the highest PLEVEL (Issue #391).

11-04-2020, Nolok
- Added: Safety checks and warnings when trying to set a skill or a stat to an invalid value (Issue #404).

12-04-2020, xwerswoodx
- Added: EMOTECOLOROVERRIDE added to characters to override default emote color. (Issue #358)
- Fixed: HOUSES command not working.

19-04-2020, xwerswoodx
- Fixed: EMOTECOLOROVERRIDE not override attack emotes.
- Added: EmoteFlags to sphere.ini to override default emote settings. (Issue #416)

20-04-2020, Julian
- [Ports from 0.56d, different dates, Coruja]
- Added: COMBATF_NOPETDESERT combat flag to allow pet owner attack own pet without make it desert its owner (OSI-like).
- Added: Support for new 'picinpic' dialog element os client >= 7.0.80.0. This is used to add sprites pictures on dialogs.
		 Syntax: picinpic x y gump spritex spritey width height
		 Example: picinpic 0 0 09d3b 150 150 30 30 (add background area on 0,0 to 30,30 and add sprite 150,150 from gump 09d3b inside it)
- Added: Support for function MAPWAYPOINT on classic clients >= 7.0.84.0.
- Added: Support for 'front falling' when a character dies. (Issue #62)
- Fixed: f_onchar_delete not being called if the player char get deleted in any other way different from client Character Selecion menu. (Issue #55)
- Fixed: Boats components resetting TYPE after use 'turn' commands. (Issue #52)
- Fixed: ARGN1 on @SkillPreStart not working correctly. (Issue #61)
- Fixed: Null SRC on @Resurrect trigger when char is resurrected using bandages.
- Fixed: Summon spells were checking for correct target position but didn't reset it when casting. (Issue #413)

23-04-2020, Nolok
- Fixed: SERV.MAP.x.SECTOR.* accepting indexes starting from 1, being the indexes actually 0-based.
- Fixed: Moving item in backpack reveal character (Issue #426) (fix by xwerswoodx).
- Fixed: No error returned when used valid SERV. objects with invalid keywords.

24-04-2020, xwerswoodx
- Fixed: Some missing coding for spellbook check. (thanks for Xun)
- Added: MAGICF_NOREFLECTOWN and MAGICF_DELREFLECTOWN flags to block reflect player's own damage which has already reflected from another character.
- Fixed: Not cleaning target when target is not attackable anymore. (Issue #409)

25-04-2020, Nolok
- Fixed: Equipped items not going back to active from sleeping state when a sector awakes again (Issue #430).
- Fixed: Setting stat values greater than the maximum value caused an overflow, instead of setting its value to the maximum.

26-04-2020, xwerswoodx
- Added: EmoteColor to players to get Client-Side emote color of the player. (Issue #358)
	Note:	To set emote colors for players, the players use emote speech at once.
		If the player change his emote color, he need to use emote ": message" to sphere override his default emote color.
		Also, make sure Player has no EmoteColorOverride on himself to make sure emote color change for player.
- Fixed: Stoned, paralyzed, sleep characters continue attacking.
- Fixed: Can't attack again after the characters stoned. (Issue #432)
- Fixed: COLOR variable change the color of human if the human is shop keeper (vendor). (Issue #397)
- Fixed: Unreferenced variables for new GMPage system to avoid possible issues.
- Fixed: Archery bug occurs when the attacker is stoned. (Issue #432)

28-04-2020, xwerswoodx
- Fixed: Possible fix for issue #440 and #397 without change @NPCRestock behaviour.

30-04-2020, xwerswoodx
- Added: TOPCONT as reference top container item.
	The difference between TOPCONT and TOPOBJ is TOPCONT only returns the top item container, not characters.
	If you use topCont on item inside bankbox or inside the subcontainers of bankbox, it returns bankbox uid.
- Fixed: Improved Julian's bank check code for works on the items inside sub containers. (Issue #429)
- Added: ARGN2 under @Attack trigger to replace Ignore status. (Issue #439)
	ARGN2 = 1 //Force to ignore attacker.
	ARGN2 = 0 //Force to unignore attacker.
- Added: @ClientTooltip_AfterDefault trigger which triggers after default tooltips sent. (Issue #436)
- Added: REMOVECLILOC and REPLACECLILOC functions to remove/replace default tooltip properties under @ClientTooltip_Sent trigger. (Issue #436)
- Added: CLILOCLIST on objects to get list of the clilocs.
- Added: CLILOCCOUNT and CLILOC.n[.ID|.VAL] to get clilocs.
- Added: Added missing gumps and gump default sizes.
- Fixed: Wrong calculation for height for Containers. (Issue #423)
- Fixed: Mass Curse doesn't lower the stats. (Issue #446)
- Fixed: Fixed the issue on XMFHTMLGUMP, XMFHTMLGUMPCOLOR and XMFHTMLTOK. (Issue #441)
- Fixed: Not cleaning skill when @PreStart trigger return as true. (Issue #450)

03-05-2020, XuN
- Added VendorMarkup ini setting, allowing to modify the default 15% taxes for all vendors at once.
	This will work if no other tags are present (in the vendor, region, etc).
	To disable the taxing, set this value to 1, never to 0.

13-05-2020, Nolok
- Fixed: Couldn't read correctly MORE1/MORE2 from spellbooks and store properly 32th and 64th spells (Issue #437).
- Fixed: MinCharDeleteTime wasn't correctly (internally) converted in seconds (Issue #459).

15-05-2020, Julian
- Added: Multi property "MULTIOFFSET x,y,z", it contains the offset for displaying the target multi (as in multi creation).
		 This way, you can create dynamic targets with multi, for example, using a pentagram as cannon target.
- Added: Ship keywords ANCHOR and DIRFACE, will return the anchor status (0/1) and the direction the ship is facing (0 to 7).
- Fixed: House type wasn't saved with the world save.
- Fixed: Stones (guilds) not checking correctly for ally/war members. (Issue #442)
- Fixed: Older clients do not support frontfall in death packet. (Issue #369)

16-05-2020, Nolok
- Fixed: Character's CREATE property wasn't saved in the savefile (Issue #459).
- Fixed: Retrieving EVENTS returned only the first event added (Issue #473).

17-05-2020, Julian
- Fixed: WeightReduction not being applied to containers. (Issue #407)
- Fixed: RangeL is now 0 when it's not set in the weapon. (Issue #480)
- Modified: Casting now searches for reagents in every pack the player has instead of only the backpack.

12-07-2020, Drk84
- Fixed: Some issues related to combat triggers order and combat actdiff.
		The issues were the following:
		1)When combat started, the first @HitTry trigger was fired before the @SkillStart/@Start triggers.
		  If we were using a custom combat formula and thus overriding  the ACTDIFF in @HitTry, forcing a miss by setting a negative value in ACTDIFF would cause the combat to block.
		2)When combat started, the chance to hit wasn't calculated so the first hit was always a success because ACTDIFF was set to 0.

23-07-2020, Drk84
- Fixed: Adding the Blade Spirits spell to a spellbook added the Clumsy spell. (Issue #496)
		 Warning: existing Spellbooks with the Blade Spirits spell added by scroll or addspell have the more1 value corrupted and so need they must be replaced.
		 Only Magery Spellbooks are affected because other spellsbooks doesn't have more than 32 spells (Mastery Spells are not implemented).

29-08-2020, Drk84
- Fixed: Cant create areas in the new maps (ilshenar, ter mur, etc) (Issue  #499).

25-09-2020, Jhobean
- Modified: GM can now prompt context menu from NPC and command them. (Ex: Kill follow, guard, etc).

02-11-2020, Nolok
- Fixed: Sector client number does not decrease if the char lingers before being actually detatched. This also caused sectors never going to sleep after a player logged out inside them (Issue #524).

03-11-2020, Jhobean
- Added: Setting CANSEESAMEPLEVEL add to .ini. Allow GM to change how they see each other when they are invisible.
- Fixed: The ini setting FlipDroppedItems now work correctly (Issue  #514).
- Fixed: When ini setting EF_ItemStacking is active, the first item of the stack can be flip on drop (Issue #514).
[sphereCrypt.ini]: Added crypt key for classic clients 7.0.86 ~ 7.0.87 and enhanced clients 4.0.80 ~ 4.0.87.

11-11-2020, Jhobean
- Fixed: Animal Taming skill not checking follower slots limit when OF_PetSlots is enabled (Issue  #534).

20-11-2020, Drk84
- Fixed: Dismounting from a NPC cleared the actarg1 value of the rider instead of the NPC mount. (Issue #527)
		 This means that when unmounting and the character is using a skill that makes use of the Actarg1 value, such  as casting a spell, the skill will continue its execution normally.
- Fixed: Invalid spell ID didn't abort the skill execution when the magic skill succeeds (this is related to the issue above), causing a possible skill gain.

01-12-2020, Nolok
- Fixed: World Object timers and SERV.TIME didn't freeze after a long process pausing the World activity, like world save or resync (Issue #538).
- Updated: Internal SQlite to version 3.33.0.

01-12-2020, Jhobean
- Added: ColorInvisItem ini option allow to see invisible items in a different color (feature request #537).
		This will help GM to make difference of invis or not invis item. Color can be changed by
		ColorInvisItem = (0 = default item color, 01 to 04001 = custom color, 1000 = default Grey Invis color).
- Fixed: When selling an item, gold show on dialog and give to player was not the same in some situation (Issue #456).
- Modified: Before this modification, because VALUE is READ only, the only way to change the price of an item was changing the PRICE.
		NOW, PRICE keyword only used to set the selling price of an item sold by a player vendor. PRICE of an item will no longer
		change the gold you will receive when selling it to a NPC. PRICE is now exclusive to player vendor.
- Added: tag.override.value can now be add to an item to change his value when trading with a NPC. In scripts, on vendor template
		(BUY= or SELL=). For changing the value of the itemdef, you must use tag.override.value=xxx instead of old syntax price=xxx.

05-12-2020, Drk84
-Fixed: NPCs stop attacking after being poisoned NPC  (Issue #487).
-Fixed: Fixweight not working properly (Issue #502).

11-12-2020, Jhobean
- [Ports from 0.56d, 01-08-2016, Coruja]
	Fixed: Items inside trade window not firing @DropOn_Item trigger when the trade move the item to player bacpkack.
	PS: Using return 1 here will not cancel the trade, this must be done directly on @TradeAccepted/@CharTradeAccepted triggers.
- [Ports from 0.56d, 12-11-2016, Coruja] Fixed: Resurrect, showing effect animation even when EFFECT_ID=0 is set
- [Ports from 0.56d, 12 Mar 2019 , Coruja]
- Added: Pet command 'release' now will look for new 'd_pet_release' confirmation dialog.
		Note: If dialog exists it will open the confirmation dialog, otherwise the pet will be released without ask for confirmation

20-12-2020, Nolok
- Added: RESDEFNAME section, similar to the DEFNAME one but to be used to define aliases for Sphere resources (as example for backward compatibility defnames in scripts).
	Thus, backwards compatibility defnames should be moved inside a RESDEFNAME section (Issue #357).

21-12-2020, xwerswoodx
-Fixed: UnlockItem -1 doesn't remove flags from items inside multi.
-Added: TAGAT to ACCOUNT reference. (Issue: #531)
-Fixed: TIMERF STOP not eating whitespaces before the function name. (Issue: #554)
-Fixed: IDs from dupelist not able to used as baseid for items. (Issue: 512)
-Fixed: RangeL and RangeH return values. (Issue: #528)
-Fixed: Now '@' expressions can able to calculate negative values. (Issue #371)

21-12-2020, Nolok
- Fixed: INSTANCES not working as intended (Issue #444, thanks to xwerswoodx).
- Fixed: Skill marked to decrease not decrementing if its value exceeded the skillcap during another skill gain (Issue #447).
- Added: ONAME property. An useful use case could be for item identification or polymorph scripts.

22-12-2020, xwerswoodx
-Fixed: Mysql null pointer return causes server debug. (Issue: #544)
-Fixed: Field spells doesn't trigger onSpellEffect when they casted on player (Issue: #526)
	As Wall of Stone and Energy Field triggered onSpellEffect from now on, you have to add
	spellflag_nounparalyze to your Wall of Stone and Energy Field spell flags.
-Fixed: Players can't reach their backpacks.
	I noted this as fix because in OSI default you can do this.
-Added: ATTR_CANUSE_PARALYZED flag that allow people to use items while paralyzed status.
	Value: 080000000.
	This flag only gives a permission to Double Clicking items, this does mean, you can't be
	allowed to equip items or using skills (like drum, flute...) or spells (like wands, scrolls).
	But you can use scripting to equip/unequip items under dclick. (Like src.findlayer.layer_hand1.cont = <src>)

23-12-2020, Nolok
- Fixed: Couldn't set item ATTR > 0FFFFFFFF.
- Fixed: Exception generated during the deletion of an item locked down inside a multi (Issue #552).

26-12-2020, xwerswoodx
- Port: Improved Vendor buy code by porting from 0.56d. (Issue: #148)
    Added 2 missing default messages:
      NPC_VENDOR_CANTFULFILL,				"Your order cannot be fulfilled, please try again."
      NPC_VENDOR_BUY_NOTHING,				"Thou hast bought nothing!"

26-12-2020, Nolok
- Fixed: LINK.* not returning error if LINK was not set or invalid.
- Fixed: Multi house sign's LINK wasn't set on multi creation.

27-12-2020, Nolok
- Changed: Accessing invalid objects (like REFx/OBJ/ARGO/LINK.something) now returns an error. This was needed because many invalid operations were not executed and there wasn't any trace in the log, leading to difficult script debugging and unexpected behaviors.
	If you just want to test the object (like <OBJ>), like always, 0 will be returned with no error if it's invalid.

30-12-2020, Nolok
- Fixed: Exception generated when entering the last column of sectors in a map which X and Y sizes aren't exactly dividable by the sector size (default: 64) specified in the .ini (this happened for example for map4).
- Fixed: Exception generated when approaching from distance a non-region-generating multi.
- Fixed: FINDCONT not returning error when trying to access an element with an invalid index.

01-01-2021, Nolok
- Added: ISVALID keyword to check if a script object is valid (LINK/REFx/ARGO/REGION), instead of having to check them against numbers (0 or -1/0FFFFFFFF).

02-01-2021, Nolok
- Changed: QVAL in its conditional form (with the '?' symbol), after evaluating the given condition, now evaluates only the expression it has to return.
    This gives a little performance boost and gets rid of avoidable error logs happening before because the whole expression was fully parsed and evaluated.
	Example: <QVAL <REF1.ISVALID> ? <REF1.NAME> : "None"> generated an error when REF1 wasn't valid, even if in that case <REF1.NAME> didn't actually need to be evaluated.

03-01-2021, Nolok
- Changed: Now TRY can be used to explicitly "TRY" to execute a command or set a property on an object which may or may not exist.
  If the object doesn't exist, no operation is done and no error is returned. It can't be used to TRY to retrieve a value (like <TRY FINDID.invalid_item.NAME>).
  Its use is DISCOURAGED, but sometimes it might be an easy way to execute trivial operations without a lot of if/endif clauses.
  This is a way to explicitly allow what Sphere already did by default in the past (not checking if the object is valid and not returning an error),
  which is something that only sometimes we expect and we want, most of the times it caused obscure bugs.

03-01-2021, Ben
- Fixed: REF1 being skipped in @TradeAccepted trigger.
- Removed: sectorsize checks when loading from sphere.ini to allow more customizations. (Recent changes prevented from setting sectorsize to 64 for map4)
- Added: Random chance to sleep for NPCs walking into a sleeping sector to try and prevent NPCs lining up at the sector edges.

08-01-2021, xwerswoodx
- Added: Quote support for STRSUB function to avoid whitespace issues.

09-01-2021, Nolok
- Fixed: Explicitly setting a LOCAL to "" set its value to 0, instead of to an empty string. Setting it to an empty argument still sets it to 0.
- Fixed: ARGS not returning the full string but only the first argument if we pass to a function multiple quoted arguments (like "Test1", "Test2", test).
- Fixed: ARGV truncating the value of a quoted argument to the last quote character ("), even if there was other text after it.
- Fixed: Console error when @CreateLoot or @NPCRestock couldn't create an item (example: the char or the corpse got immediately removed after creation, if ever created) (Issue: #592).

10-01-2021, xwerswoodx
- Fixed: STRTOKEN can't parse commands correctly if argument has more than one quotes.
- Added: Apostrophe support for STRTOKEN that let you go deeper with using STRTOKEN.

11-01-2021, Nolok
- Changed: Now conditional statements (IF/ELIF/ELSEIF) will perform a lazy evaluation of the conditional expression, whereas before they fully evaluated the whole expression.
	Lazy evaluation means that the expression will be evaluated one piece (or, one subexpression) at a time. At each stage, if it's sure that the whole expression value (true or false) won't change
	even if new subexpressions will be evaluated, the evaluation will stop there.
	Example:
		IF (<LINK.ISVALID> && (<LINK.TAG0.test> == 1))
	Won't return an error if item's LINK is invalid or not set, because the evaluation will only halt to <LINK.ISVALID>.
	Other than allowing more flexible IF tests in just one line, this change will grant faster evaluation times for complex IF tests.

17-01-2021, Ben
- Fixed #589: Items that are denied placement and not able to return to their previous locations will drop at the chars location.
- Fixed: CREATE on chars not loading from save causing it to restart on reboot.
- Fixed #600: Changed old dating method on bboards to now have actual dates. (This affects dates of old messages as the timestamps is different)

24-01-2021, Ben
- Fixed: Cantouch not respecting both CAN_C_DCIGNORELOS and CAN_C_DCIGNOREDIST seperately.
- Changes to NPC hearing behaviour:
    - Vendors will not initiate buy/sell unless the transaction can be completed.
    - NPCs will not react if doesn't pass canseelos and is too far. (does not apply to pets or calling npc by name)
- Added: NPCDistanceHear to sphere.ini with a default value of 4 to control the distance NPCs can hear you.
- Fixed: bug where you were able to move containers through walls and from any distance.
- Changed: ISTIMERF to also accept STRMATCH-style arguments.

31-01-2021, Jhobean
- Fixed: when hits, stam or mana were set to negative value, overflow occurred and the stat was set at near maximum values. Now setting a stat to a negative value will set it to 0. (Issue #406)
- Fixed: Using stacked deeds consumed the whole pile.

30-01-2021, Ben
- Fixed: TAG= not deleting tags (issue #626)
    Also reverted an old change which now allows setting TAG0=0 to delete the tag
- Fixed: NPCs attacking sleeping NPCs
- Fixed: RaiseCorpse causing items to fall to the floor if weight modifying objects are not equiped first (issue #620)
- Changed: Setting NPCDistanceHear to a negative value will set a hear distance of the absolute value without LOS check.

26-02-2021, Jhobean
- Reworked and improved Fastwalk (speedhack) dectection.
  It can be fine tuned with the existing WalkRegen and WalkBuffer ini settings (which you may need to update).
  Depending of the latency of the server, there's the possibility to have false positive speedhack detection on the console. Walkregen ini setting should be raised until you don't have false positives.
  You can disable this detection for everyone by setting WalkBuffer=0. At all time, the detection is not active on GM player.
  Fastwalk detection will trigger @UserExWalkLimit. Like before you can avoid a rejected step with RETURN 1.

28-02-2021, Drk84
- Fixed: REGEN values not saved (issue #595).
	RegenHits, RegenMana, RegenStam and RegenFood will now be saved only if their value is equal or above to 1 and different from the default value in the ini setting.
	Default values in the ini are: 40 seconds for RegenHits, 20 seconds for RegenMana, 10 seconds for RegenStam and 86400 seconds (one day) for RegenFood.

03-03-2021, Drk84
- Updated SphereCrypt.ini
- Fixed: Reagents consumed on magical skill abortion (issue #605).
- Fixed: RegenHits, RegenMana, RegenStam and RegenFood are not saved when their value is 1.
- Added: @SpellEffectTick and @EffectTick triggers, they are fired when a spell memory has one or more charges (more2) and the spellflag_tick
	ON=@SpellEffectTick / ON=@EffectTick
	Default Object: The object that is going to be affected.
	Src: The object that is going to be affected.
	ARGN1: Spell Id
	ARGN2: Spell Level
	ARGO: The spell memory.(Argo.link holds the caster UID)
	local.charges (R/W) = How many charges are left on the spell memory, this will be automatically decreased by 1 at the end of the method execution. Default value is 1.
	local.delay (R/W) = How many seconds until the next spell effect tick. Default value is 5 seconds.
	local.effect (R/W) = The effect value of the spell, harmful or beneficial (if SPELLFLAG_HEAL is enabled).
	local.damagetype (R/W) = The damage type of the spell, if you are making a custom spell you must set a value otherwise the spell will not cause damage.
	return 1: Destroy the spell memory and block the spell execution.
	return 0: If the spell has the flag SPELLFLAG_SCRIPTED blocks the spell execution

	These triggers fires on the following spells and any custom spells with the SPELLFLAG_TICK:
		Poison: You can now change the damage and damage type by changing the local.effect and local.damage value in these triggers.
		Strangle and Pain Spike: You can now change the damage and damage type in these triggers.
		Regeneration: A Sphere custom spell, you can change the healing value by changing the local.effect value.
		Hallucination: A Sphere custom spell, you can change the duration of the hangover by using local.charges and local.delay.
		Alchool: Unlike in real life, you can change the duration of the hangover by using local.charges and local.delay.
		Custom Spells: Simply add SPELLFLAG_TICK to the spell spellflags. By default every spell memory starts with one charge.
			Spells with SPELLFLAG_HARM and local.damagetype set will cause damage every local.delay seconds.
			Spells with SPELLFLAG_HEAL will heal hitpoints every local.delay seconds.
			Remember that is not mandatory to use  SPELLFLAG_SCRIPTED to make a custom spell, you can just use a spell id higher than 1055, usually i choose 2000.

	It's RECOMMENDED to UPDATE the spells scripts file and sphere defs file, alternatively just add the following line, in the spellflag section in defs.scp/sphere_defs.scp:
		spellflag_tick			   080000000  // A spell is going to tick and causing an effect.
	And add SPELLFLAG_TICK to the following spells: Poison, Strangle, Pain Spike, Regeneration, Hallucination.

07-03-2021, Nolok
- Added: TIMERFMS, which has the same syntax and usage as TIMERF but accepts a timeout in milliseconds.
- Changed: TIMERF(MS) now uses the same (faster) ticking system that every other "Timed Object" uses. This also removes the real-world ticking time difference between an item's timer and a timerf.
    Now an item with TIMER=10 and TIMERF with delay 10 will immediately be executed one after another, without delays caused by the different ticking systems used before.
- Fixed: Server crash when a TIMERF executed TIMERF STOP/CLEAR, altering the timed functions list while one of them was running (Issue #516).
- Removed: DEBUGF_SCRIPTS log messages for the following instructions: ADDCLILOC, REPLACECLILOC, REMOVECLILOC, STRSUB, MULDIV.

13-03-2021, Nolok
- Added: LASTDISCONNECTED player keyword, holding the SERV.TIMEHIRES at the time of the last client disconnection.
- Fixed: LASTUSED player attribute was not saved.
- Fixed: Object not being removed from client view when its CONT was changed.
- Fixed: If Timer elapsed on an object in a disconnected or sleeping state, the trigger wouldn't fire when the object got active again (Issues #535, #596).
- Fixed: Timer and REGENs not firing on a ridden characters (Issue #353). Now it fires even if the original character (which gets detatched from its physical REGION) is in a sleeping sector,
    given that the riding character is in an active (not sleeping nor disconnected) state.

14-03-2021, Nolok
- Fixed: ANIM being able to hold a bitmask of only 32 bits (insufficient to hold a bit for every animation). Extended that limit to 64.
- Fixed: ISBIT, SETBIT, CLRBIT non throwing an error if the bit argument was > 63 (maximum supported value).
- Fixed: SOUND* overrides not working when their value was -1.

21-03-2021, Nolok
- Fixed: Timers not firing on top top-level equipped items, or objects not yet placed in the world (Issue #535, #648, #649).
   The latter case should not happen, but it's of wide (even if not correct) use in scripts to set the TIMER before the object has been placed in the world
   (setting its P or CONT or equipping it, etc), so there's now a workaround in the source code for that case.
   Remember: it's always better to set the TIMER *AFTER* the object has been placed in the world. It's the correct sequence and it prevents the source having to do useless additional checks on the object.
- Fixed: Setting TIMER woke up the object even if it was in a sleeping sector and it was sleeping or should have been sleeping.
   This caused a lot of useless world-object loops and CPU usage on startup, since TIMER was set on some objects when reading the save files.
- Added: CAN_O_NOSLEEP (010000000) flag for both items and chars intended to not go into sleeping state when a sector goes to sleep. Use this only if you know that it's absolutely necessary!
- Added: GOAWAKE and GOSLEEP keywords to force an object into an active or sleeping state, regardless from its parent sector being asleep or not. Use this even more sparingly!
   Keep in mind that even if you wake up an object, if it has not the CAN_NOSLEEP flag, it can still go to sleep when the sector does so.
   This command can be useful when you set the TIMER of a sleeping object and you want it to trigger soon, so you use GOAWAKE *AND* CANMASK |= <def.CAN_NOSLEEP> after setting the TIMER,
   remembering to remove the flag (CANMASK &= ~<def.CAN_NOSLEEP>) if you don't need it anymore.
- Fixed: Items created under @CreateLoot trigger played the drop sound before being put in the corpse.
- Fixed: FORCONT not giving a warning if it was called with only 1 argument.

29-03-2021, Drk84
- Fixed: ManaLoss fail not working (Issue #602).
- Fixed: Meditation Buff Icon not removed when the skill was aborted (Issue #646).
- Added: New arguments in @SpellFail / @Fail trigger:
		 ARGN2: The mana loss if the spell is failed.
		 local.tithingloss: The tithing points loss if the spell is failed.
		 While both are writeable, they only works if  ManaLossFail or ReagentLossFail ( also for tithing points) are enabled in the sphere.ini
- Updated SphereCrypt.ini

04-04-2021, Nolok
- Fixed: Item TIMER not reset and ATTR_DECAY not cleared after moving the item into a container (Issue #655).
- Fixed: BaseVendors and BaseStorage house properties not being saved (Issue #643).
- Fixed: cont.consume on @Timer freezes the server if char does not have the item and amount (Issue #654).
- Changed: To achieve better overall server speed, removed the report of time difference between two consecutive function calls in the call stack trace.
   Getting the system time so often with a decent precision is fairly slow.

05-04-2021, Nolok
- Changed: improved text rendering speed on the Windows console window (now the whole message queue is appended in block, then the whole view is updated and scrolled down, instead of doing this per line) and removed drawing artifacts.

19-04-2021, Drk84
- Fixed: Curing poison is always successfull (Issue #381).
		 When a character is attemping to cure poison by skill, spell or potion another check is made, the check formula depends on the MAGICF_OSIFORMULAS ini flag.
		 If MAGICF_OSIFORMULAS is enabled the chance to cure is based upon the following values:
		 https://www.uoguide.com/Lesser_Cure_Potion
		 https://www.uoguide.com/Cure_Potion
		 https://www.uoguide.com/Greater_Cure_Potion

		 If MAGICF_OSIFORMULAS is disabled the chance to cure is based upon sphere classic bell formula:
		 Example if the poison level is 60.0 and the healing skill is 50.0, the chance of curing the poison is around 25%.

		 In addition, you can override the cure poison chance by using the TAG.OVERRIDE.CUREPOISONCHANCE in the poison item that will be placed upon the character.
		 In this case a simple percent check is made,
		 You can add this tag by using @SpellEffectAdd/@EffectAdd (see also below), example:
		  ON=@EffectAdd
			argo.tag.override.curepoisonchance = 25 //a 25% chance of curing the poison.

- Changed: For consistency renamed characters triggers @EffectAdd and @EffectRemove to @SpellEffectAdd and SpellEffectRemove.
		Added spell triggers @EffectAdd and @EffectRemove (spell triggers  must be defined in the spell block).
		Quick summary for @SpellEffectAdd/@EffectAdd and @SpellEffectRemove/@EffectRemove:

		@SpellEffectAdd/@EffectAdd
		Argo: the spell item.
		Src: the caster.
		Default object: the target of the spell.
		Argn1: the spell number.
		return 0: Let default checks to happen.
		return 1: Blocks any action and stops everything, also deletes the memory (Blocking any changes, this will cause also the effect to do not have duration)

		@SpellEffectRemove/@EffectRemove
		Argo: the spell item.
		Src: the caster.
		Default object: the target of the spell.
		Argn1: the spell number.
		Return 0: remove the spell memory item but don't execute the default spell behaviour when the spell item is removed.

20-04-2021, Drk84
- Fixed: Trading layer item was added to the character weight when starting a trade (Issue #660).
- Fixed: MonsterFear in Sphere.ini does not seem to affect monsters (Issue #603).
	   I also changed a little the motivation formula, now the remaining health of the NPC counts more towards the fleeing chance.
	   Take in consideration that if the NPC has a big STR value it will be unlikely to flee.
	   Remember that you can modify ARGN2 in @NpcActFight trigger to set the motivation value (ARGN2 <= 0 the NPC will flee).

22-04-2021, Drk84
- Fixed: The NEW object after executing the NEWDUPE command always returned the last created item instead of the newly duped character (Issue #661).

23-04-2021, Drk84
- Fixed: Crash on failed spell(Issue #666).
- Fixed: Duped tamed creatures do not increase followerslots (Issue #663).

24-04-2021, Drk84
- Fixed: Sound loop when dismounting (Issue #673).

02-05-2021, Drk84
- Added: New item/char triggers @Smelt/@ItemSmelt and @CarveCorpse/@ItemCarveCorpse (Issue #616).
		@Smelt(Item Trigger)/@ItemSmelt (Character Trigger)
		These triggers are fired when a character attempts to smelt ores and items on a forge or by the SMELT command but also:

		Src: The character smelting the item.
		Default Object: The item being smelted in the @Smelt trigger.
						The character smelting the item in the @ItemSmelt trigger.

		Argn1: R/W, the adjusted mining skill of the character.
		Argn2: R, the total amount of different resources the item being smelted has.
				  For example a mace is made of iron  ingots and logs, so the number of different resources is 2.
				  For ores the total amount of different resources is always 1.

		local.resource.n.ID: R/W, The ID of the itemdef that will be created if the smelting check is succesfull, n starts at 0.
		local.resource.n.amount: R/W, The amount value that will set on that particular resource if the smelting check is succesfull, n starts at 0.

		Return 1: Fails the smelting attempt and block default smelting behaviour.
		Return 0: Succeeds the smel attempt and block default smelting behaviour.

		Notes:
		If you are using the ScriptPack X you need to COMMENT the following lines in the types_forge.scp file for enabling  the smelting of items/ores by forge:
		TARGETF f_craft_blacksmith_smelt_targ
		RETURN 1

		Reading local.resource.n.ID:
		The itemdef of the resource being created is in numerical format so for outputting it in readable format you need to use:
		serv.itemdef.<local.resource.<dlocal._for>.iD>>

		For assigning the value just use the plain itemdef instead:
		local.resource.n.ID = i_ingot_gold
		local.resource.n.amount = 30

		Only ingots and gems will "survive" the smelting process, the rest of resources is not created.
		For every ingots that can be created Sphere makes two additional check:
		First, the character need to have the minimum skill to smelt the ores
		Second, the character must pass a skillquick check, if fail up to half of the item amount value is consumed (so non-ores items are usually destroyed).

		Example:
		Given an item with the following resource property
		RESOURCES=6 i_ingot_iron,1 i_log,1 i_gem_diamond,3 i_ingot_bronze
		ON=@ItemSmelt //
		FOR 0 <eval <argn2> - 1>
			serv.log resource obtained <serv.itemdef.<local.resource.<dlocal._for>.ID>.baseid> - Amount: <local.resource.<dlocal._for>.amount>
		endfor
		Argn2 is 4 (i_ingot_iron, i_log, i_gem_diamond and i_ingot_bronze)
		The output will be:
		i_ingot_iron - 6, i_log 1 - ,i_gem_diamond -3, i_ingot_bronze - 3


		@CarveCorpse (Item Trigger)/@ItemCarveCorpse(Character Trigger)
		These triggers are fired when a character attempts to carve a corpse or a corpse is being  carved:

		Src: The character carving the corpse.
		Default Object: The corpse being carved in the @CarveCorpse trigger.
						The character carving the corpse in the @ItemCarveCorpse trigger.
		Argo: 			The item used for carving the corpse.

		Argn1:	R	The total amount of different resources the corpse being carved has.
					For example the ogre resources property contains only the i_ribs_raw item so the number of different resources is just 1.

		local.resource.n.ID: R/W, The ID of the itemdef that will be created when carving the corpse, n starts at 0.
		local.resource.n.amount: R/W, The amount of value that will be set on that particular resource, n starts at 0.

		Return 1: Block the default carving behaviour.

		Notes
		local.resource.n.ID stores the itemdef of the resource being created in numerical format so for outputting it in readable format you need to use:
		serv.itemdef.<local.resource.<dlocal._for>.iD>>

		For assigning the value just use the plain itemdef instead:
		local.resource.n.ID = i_gem_ruby
		local.resource.n.amount = 5

		Example:
		[TYPEDEF t_corpse]
		ON=@CarveCorpse
		FOR 0 <eval <argn1> - 1>
			serv.log resource obtained <serv.itemdef.<local.resource.<dlocal._for>.ID>.name> - Amount: <local.resource.<dlocal._for>.amount>
			if (<src.forensics> >= 900) && (<argo.baseid> == i_dagger)
				local.resource.<dlocal._for>.amount += 5
			endif
		endfor
		If we are carving an ogre, ARGN1 will be 1 and the output will be
		Raw Ribs- 2
		If player forensics skill is >= 90.0% and we are using a dagger for carving we get an additional 5 i_ribs_raw

08-05-2021, Nolok
- Fixed: Item timer set on @Create being reset when the item is equipped on a char immediately after (Issue #662).
- Fixed: Exception generated upon server closure, if a char existed with an attached MultiStorage.

15-05-2021, Drk84
- Fixed: Player's pet getting stuck when giving follow order while in combat (Issue #681).

20-05-2021, Drk84
- Added: TAG.NAME.HUE for items. This works only if tooltips are disabled (FEATURE_AOS_UPDATE_B not set).
- Fixed: Crash when accessing  a non-existant SRC (the caster) in the @EffectRemove and @EffectTick triggers.
		 Remember to use the ISVALID command by assigning SRC to a REF to check if the caster is still valid
- Fixed: Necromancy spells Blood Oath and Evil Omen have their default behaviour executed even if their spell definition has the SPELLFLAG_SCRIPTED set.
- Fixed: Poison memory item  was not re-created after a character was poisoned again.
- Changed: At great request set cap to 100 for LOWERMANACOST.

06-06-2021, Jhobean
- Fixed: Fix illimited arrow with Tdata3=0 for bow (Issue #698).

07-06-2021, Drk84
- Fixed: Dragon breath action and Throwing Action (not the Throwing skill) spam.(Issue #689).
- Fixed: Magic Trap and Magic Untrap spells not calling the @SpellEffect/@Effect triggers (Issue #697).
- Fixed: Mind Blast not triggering effect if the spell level was equal to 0 (Issue #696).
- Fixed: Text spam when using the AFK command (Issue #694).

08-06-2021, Drk84
- Fixed: Ranged weapons ammunitions were not consumed.
- Fixed: Bushido skill never raised when performing a succesfully parrying action with Samurai Empire Formula enabled.
- Changed: The @HitParry trigger is now fired before the @SkillUseQuick/@UseQuick trigger.
		Quick summary of the HitParry trigger:
		Default Object:  The character that succesfully parried the strike.
		SRC: The character that did the strike.
		Argn1: Percent of damage that will be reduced (default 100%).
		Argn2: Damage type.
		Argo: The weapon/shield used for parry, if any.
		Local.ParryChance: The chance to parry the blow. The chance will be passed to the SkillUseQuick/UseQuick triggers.
		Local.ParrySkillID: The skill used for parrying, this can be changed by setting the appropriate skill ID.
			Example by setting  local.ParrySkillID = <weapon.skill> the parrying check will be made by using the weapon skill and thus the UseQuick trigger of the weapon
			skill will be called.
		Local.ItemParryDamageChance: The chance that the parrying item will be damaged (default 100%).
		Local.Damage: The amount of damage (raw) before the parry reduction.
		Return 1: Completely blocks the damage as if the parry damage reduction was set to 100.

10-06-2021, Drk84
- Fixed: Damage was always reduced by parry even if the character failed the parry action.

29-06-2021, Drk84
- Fixed: local.arrow in @Hit and @HitMiss not storing the arrow uid.

01-07-2021, Drk84
- Added: New Optional Flag in the sphere.ini, OF_AllowContainerInsideContainer:
  By default you cannot add a container that is heavier than the container being inserted into, enabling this flag allow the player to add any type of container inside any other container,
  no matter the weight (Issue #723).

02-07-2021, Nolok
- Fixed: Windows console temporarily freezing when it had to show a big number of lines at once.
- Added: CMake toolchain to compile on Linux using the native architecture, instead of forcing one (Issue #709).
- Changed: Renamed 32 and 64 bits Linux toolchains to x86 and x86_64, respectively.

25-07-2021, Drk84
- Fixed: Melee weapons cannot use the AMMOSOUNDHIT and AMMOSOUNDMISS properties because they are ranged weapon propeties.
	     Now all types of weapons can use the WEAPONSOUNDHIT and WEAPONSOUNDMISS properties, ranged weapons can  also still use AMMOSOUNDHIT and AMMOSOUNDMISS (Issue #731).
- Fixed: When using RETURN 1 inside the @BUY or @ITEMBUY trigger the vendor will not say the selling messages ("Here you are that will be etc..") if and only if all the items in the transaction are blocked by
		 the RETURN 1, in addition the "coin drop" will not be played  and the money from the blocked item will not be taken from the player (Issue #738).
- Fixed: When MAGICF_CASTPARALYZED flag is enabled you cannot spell when wielding a spellbook or wand (Issue #691).
- Fixed: Protection spell miscalculating the magic resistance value when COMBAT_ELEMENTAL_ENGINE flag is enabled.

25-07-2021, Jhobean
- Fixed: OSILIKEPERSONALSPACE flag was reveal hidden char when walking on them. Now invisible OR hidden char will not be reveal and sysmessage will appear (Issue #732).
- Fixed: NPC_AI_PATH no more reveal player when server evaluate if the NPC can walk on the char (Issue #343-734).

26-07-2021, Alex
- Added: CONTINUECUSTOMIZE, for CustomHouses resumen lastdesign if player close dialog.

30-07-2021, Drk84
- Added: New TAG.OVERRIDE.SHOVE for NPCs only, if set to 1 it allows a NPC to pass through another NPC without being blocked (Issue #715).
- Fixed: Pets are now able again to damage their own owner, this wasn't noticeable unless the COMBAT_NOPETDESERT flag was enabled (Issue #724).

01-08-2021, jkachhad
- Added: New dialog section "prebutton" - Provides input processing before button triggers. This section can be utilized to check if the input is valid (obj in range, line of sight, etc..). This should reduce amount of code in each button trigger.
Example:
	[dialog d_test]
	...
	[dialog d_test prebutton]
	if (<distance> > 10)
		return 1
	endif
	[dialog d_test button]
	on=1
	src.str=100
	on=2
	src.dex=100
It will check if distance is > 10, so you don't need to write the distance check on every button

11-08-2021, Drk84
- Added: New Ini flag NPCShoveNPC for allowing NPCs to walkt through other NPCs, default value is 0 (still Issue #715).
- Fixed: Cartography TDATA values were inverted, TDATA1 is actually the height while TDATA2 is the width.
- Added: Two new override tags for cartography map items: TAG.OVERRIDE.MAPWIDTH and TAG.OVERRIDE.MAPHEIGHT
		 You can change the size by setting a value in the TDATA1 (WIDTH) and/or TDATA2(HEIGHT) value in the map itemdef or dynamically by using TAG.OVERRIDE.MAPWIDTH and/or TAG.OVERRIDE.MAPHEIGHT.
		 By default Sphere the default value for cartography map is 200x200 (Issue #676).

21-08-2021, Nolok
- Fixed: Deleting TIMERFs inside a function called with TIMERF randomly caused exceptions.
- Added: New AREAFLAGS ini setting, used to change the default behavior of regions, areas and rooms:
	// AREAF_RoomInheritsEvents			00000001 // ROOMDEFs inherit EVENTs from the parent AREADEF (if any)
	// AREAF_RoomInheritsFlags			00000002 // ROOMDEFs inherit REGION FLAGS from the parent AREADEF (if any)
	// AREAF_RoomInheritsTAGs			00000004 // ROOMDEFs inherit TAGs from the parent AREADEF (if any)
- Added: New REGION FLAGS to mimic AREAFLAGS on a per-region basis:
	region_flag_inherit_parent_events 0100000 // This region (areadef/roomdef) inherits EVENTS from the region it's contained in
	region_flag_inherit_parent_flags  0200000 // This region (areadef/roomdef) inherits FLAGS from the region it's contained in
	region_flag_inherit_parent_tags   0400000 // This region (areadef/roomdef) inherits TAGs from the region it's contained in
- Added: New ini networking flags to detect clients sending/receiving too much data for it to be legit:
		// Maximum number of bytes a client can send to the server in 10 seconds before being disconnected. 0 = disabled
		MaxSizeClientOut=50000
		// Maximum number of bytes a client can receive from the server in 10 seconds before being disconnected. 0 = disabled
		MaxSizeClientIn=10000
	When a quota is exceeded, FUNCTION f_onclient_exceed_network_quota is called. By default, the client is disconnected.
		// Variables:
		//	LOCAL.Account --> Account name connecting ("NA" if no account attached)
		//	LOCAL.IP      --> IP address connecting
		//      SRC --> Client Object
		//      ARGN1 --> (1: output quota; 2: input quota)
		//      ARGN2 --> bytes sent/received
		//      ARGN3 --> maximum bytes allowed to be sent/received (quota)
		// Return:
		//    0 --> Ignore this, stop hardcoded behavior but generate a log message
		//    1 --> Ignore this, stop hardcoded behavior and do not generate a log message
		//    2 --> Disconnect client and generate log message (default behavior)


13-09-2021, Drk84
-Fixed: Failing the smelting action consumed the whole ore/item stack instead of a random amount (a value between 1 and half the stack size).
-Added: ARGN3 in the @ItemSmelt/@Smelt trigger, setting it to 1 will skip the minimum requirement for smelting ore to ingots.
		By default the minimum requirement for smelting is stored in the TDATA1 property of the ingot itemdef.

05-10-2021, Jhobean
- Added: Ini setting ManaLossAbort / ReagentLossAbort, to make the char lose part of the mana/reag required to cast the spell if the spell is abort.
	ManaLossFail / ReagentLossFail are now use only when the spell fizzle because of lacking skill. (Issue #769)
- Fixed: ManaLossAbort/ManaLossFail consume the exact amount of mana required for the spell. ManaLossPercent will now control the % of mana player lost.
- Fixed: ARGN1 value from @Hit trigger was sometime negative even if negative damage was impossible
- Fixed: Revert 2018-03-05 Commit causing WOP no more customisable by ini and broke REVEALF_SPEAK behavior. (Issue #776)

02-11-2021, Drk84
- Changed: In old clients (starting from 2.0.0 ) the "You are frozen and can not move."  will appear again when a player is paralyzed and attempting to move, thanks for a1exp for the solution.(Issue #789)
		   Recent clients (i think from 6.0.0+) seems to block the movement request when the statf_frozen flag is applied, while clients 5.0.0+ will get the "You are frozen and can not move."
		   message if attempting to use the pathfinding.
- Changed: Mana Drain behaviour slightly changed: (Issue #781)
		   1)It will use its own layer (LAYER_SPELL_MANA_DRAIN, layer number 79) instead of LAYER_SPELL_STATS, in this way casting Mana Drain will not remove stat spells on the affected characters.
		   2)The Mana Drain effect value depends if you have enabled MAGICF_OSIFORMULAS or not.
			 If enabled the effect value is calculated from this formula: (400 + Caster Eval Int - Target Magic Resistance ) / 10.
			 If disabled the effect value is by default 10,30, only in this case you can overwrite the effect of Mana Drain by changing the value in the SPELLDEF  or by changing local.effect in the @SpellEffect/@Effect triggers, same for duration (default duration is 5 seconds).
		   3)In both cases the mana lost is temporary! If you want to get a permanent drain effect just use the following script under the Mana Drain SPELLDEF

			 ON=@EffectRemove
			 return 0	//Return 0 will prevent the recover mana  behaviour of the Mana Spell but the Mana Drain spell item will still be destroyed.
			Remember to update your scripts by changing
			In spells_magery.scp file:
			LAYER = LAYER_SPELL_STATS to LAYER = LAYER_SPELL_MANA_DRAIN
			In your defs.scp file:
			LAYER_SPELL_Mana_Drain			79

03-11-2021, Drk84
- Fixed: MT_NONMOVER flag makes the NPCs spam attacks. (Issue #767)
- Updated SphereCrypt.ini.

12-11-2021, Nolok
- Fixed: Sector not going to sleep and @RegPeriodic and @CliPeriodic not firing (Issues #801 and #765).
- Fixed: CONT not always updating the item in the new position (Issue #680).
- Changed: Increased default MaxSizeClientOut default value to 80.000.

01-12-2021, Drk84
- Fixed: Incorrect EVAL parsing in case of multiple subtraction (Issue #804).

05-12-2021, Tolokio (Rastrero)
-Added: Trigger @falling. Fires when characters is about to fall from height >= 10
@falling
src: Character falling
Default: Character falling
argn1: X coord of new location where characters is going to fall.
argn2: Y coord of new location where characters is going to fall.
argn3: Z coord of new location where characters is going to fall.

09-12-2021, Drk84
- Fixed: Players cannot increase combat skills in REGION_FLAG_NOPVP areas.

01-02-2022, Drk84
- Changed: Added blank space between skill value and skill name when reading the SKILLMAKE property (Issue #832).
- Changed: You will not be able to cast a spell on a ghost if the spell does not have SPELLFLAG_TARG_DEAD.
		   You will not be able to cast a spell on an alive character if the spell has the SPELLFLAG_TARG_DEAD flag (Issue #827).

03-02-2022, XuN
Merge of commits made by Coruja on 56d, related to Weight (see issue https://github.com/Sphereserver/Source-X/issues/822)
List of changes:
- Partial Commit https://github.com/Sphereserver/Source/commit/c9c0af71ba1fc54ddbab8f9bdae70739e24b0254:
    [sphere.ini]: Added new BackpackMaxWeight setting to set default max weight limit for chars main backpack.

- Commit https://github.com/Sphereserver/Source/commit/937fd287975830c76a0cebfcd7e8e8e251b04ef4:
    Changed: Chars now can exceed MAXWEIGHT limit, but not backpack max weight limit (which is a bit higher)
        -Walking while overweight will drop stamina faster (as it was on old Sphere versions)
        -Stamina penalty can be customized using StaminaLossAtWeight and RunningPenalty settings on sphere.ini
        -Backpack max weight can be customized using BackpackMaxWeight setting on sphere.ini and MODMAXWEIGHT item property
    [sphere_msgs.scp]: Updated message list with the following changes
        -Added: cont_full_items, msg_fatigue_weight
        -Removed: cont_full, cont_magic, msg_overload
        -Updated: cont_full_weight

 -Commit https://github.com/Sphereserver/Source/commit/f29e8592ad154c4dd55ed4b5d8900b094793e62a:
    Fixed: BackpackMaxWeight setting on sphere.ini not allowing unlimited weight when set to -1.

 -Commit https://github.com/Sphereserver/Source/commit/191a13e7bc91a709db79d1270c467a5561038541
    Fixed: Char stamina not decreasing correctly when walk/run while overweight.
    [sphere.ini]: Updated default value of StaminaLossAtWeight and RunningPenalty settings
    	-IMPORTANT: It's HIGHLY recommended update these values to make stamina decrease correctly.

*These commits are meant to reenable old stamina and weight behaviour, allowing chars to move while overweight and applying penalties on stam.
Also excluded GMs from most checks inside this code.

07-02-2022, 11-02-2022 Jhobean
- Changed: Make a better integrations of lasts commits about weight modification to avoid changing behavior on all shard.
	BackpackMaxWeight in the .ini is now called BackpackOverload and define how many extra weight a character can place in his backpack.
	StaminaLossAtWeight and RunningPenalty now work like before and affect stam only when not overloaded.
	StaminaLossOverweightMultiplier and RunningPenaltyOverweight are 2 new ini setting for ajustment how stam is drained when overloaded.
	Drag and drop item was limited to 300% maxweight. Now DRAGWEIGHTMAX define % of maxweight you can move.
- Fixed: On some situation when splitting a stack on the ground, the leftover had no timer and never decay.

12-02-2022, Soulless
- Fixed: Evil NPCs not being able to spawn in a guarded region. If you do not desire evil NPCs spawning in guarded regions just remove the spawn item.
- Fixed: Healers not seeing ghosts that are not manifested in war mode, NPC healers should always see ghosts. You can make them not see player ghosts by
  adding this to them if you desire this behavior :
    ON=@NpcLookAtChar
      if (<src.flags>&statf_dead) && !(<flags>&statf_war)
        return 1
      endif
- Fixed: Evil NPCs not being able to enter a guarded region, to accomplish this behavior in the scripts add this on a generic NPC event.
    ON=@Enter
    if (<src.npc.brain> >= 8) && (<region.flags>&region_flag_guarded)
      return 1
    endif
- Added: Support for lethal poison messages for the non-OSI poison spell, you can customize this in the sphere messages .scp
- Fixed: region_antimagic_recallin preventing players from teleporting in these areas.
- Fixed: Guards endlessly cycling through idling/going home when OF_GuardOutsideGuardedArea is enabled and a guard is outside of a guarded region.

12-02-2022, Soulless
- Changed: 'StaminaLossOverweightMultiplier' to 'StaminaLossOverweight', and changed the value for additional increase of stamina loss from every
  25 stones to every 5 stones.

13-02-2022, XuN
- Fixed players being able to cast spells on items inside their bankbox when they are not supossed to reach it.
Note: The only way the server has to know if the bankself is closed is to store the position of the player when the bankbox opens,
    then compare the current position against the one stored. So even if the player closed the bankbox,
    while the position hasn't changed, the items inside the bankbox are reachable.

14-02-2022, Jhobean
- Fixed: With a Macro/assistant it's no more possible to target an object on your bank if your bank is close.
    EX: If your bank have a water through on it, it's now impossible to wash you bandage without bank open.

06-06-2022, Drk84
- Changed: Equipped items falling on the ground when overweight, now they will remain equipped until you lose some weight on the backpack (Issue #861).
- Updated SphereCrypt.ini.

07-06-2022, Drk84
- Fixed:  Items falling on the floor even if you are not overweight. (Issue #810).
- Fixed:  Bug related to the previous commits.

08-06-2022, Drk84
- Fixed: Bandage and leather strips created before the item was deleted. (Always Issue #810, this should be fixed now).

09-06-2022, Drk84
- Fixed: NPCs canceling other npcs from hearing player speech (Issue #859).
- Fixed: Undefined keyword 'shipturnleft'  (Issue #860).

25-06-2022, Drk84
- Fixed: Screensize.Y returning wrong value with clients > 5.00.00 (Issue #630).
		 The following resolution are supported: 640 x 480 (default) - 800x600 - 1024x768 - 1152x864 - 1280x720
		 More can be added if needed, remember that if the user changes the resolution in game he will get the changed resolution values only when he restarts the client.

30-06-2022, Drk84
- Fixed: Summoned ridden creatures did not disappear when the Summon Spell timer expired until they were dismounted (Issue #582).
- Fixed: When using Elemental Resistance setting, Protection spell with the SPELLFLAG_SCRIPT still called the default Protection behaviour when resisting a spell.

08-07-2022, Drk84
- Fixed: Ugly workaround for the ONAME property bug (Issue #825).

24-07-2022, Jhobean
- Added: In the case you force some T_musical item equipable in the tiledata, you were not able to equip it because server fixed T_musical item not equipable.

25-07-2022, Drk84
- Added: ACTIONEFFECT keyword, to be used in the @Start/@SkillStart triggers, this allow to override/read the EFFECT value from the skill definition (like how many hitpoints we heal with healing skill).
		 Currently the EFFECT field is used in the following skills:
			DetectinHidden: The "reveal" radius, default value is skill/10 if EFFECT field or ACTIONEFFECT are not defined.
			Healing: How many hitpoints we heal, default value is 1 if EFFECT field or ACTIONEFFECT are not defined.
			Meditation: How much mana we recover, default value is 1 if EFFECT field or ACTIONEFFECT are not defined.
			Tracking: Maximum tracking range, default value is skill/10 if EFFECT field or ACTIONEFFECT are not defined.
			Crafting Skills: The amount in % of how many resources are lost if we fail to craft the item.
		 If the EFFECT field is not defined in the SKILL block, Sphere will use the default value (but you can still override it with ACTIONEFFECT).
		 Notes: Only positive numbers are accepted, if ACTIONEFFECT is set to a value less than 0 Sphere will use the default value of the skill.
				ACTIONEFFECT has, by default, no effect in @UseQuick/@SkillUseQuick triggers
- Added: ARGN2 in trigger @Start/@SkillStart, this allow to override/read the DELAY  value from the skill definition (how much time it takes for the skill to be completed).

26-07-2022, Drk84
- Fixed: Wrong calculation in Magic Resistance check.

01-08-2022, Julian
- Added: t_talisman for talismans. These items should be equipped on layer_talisman. Remember to set the layer and add some cool functionality in the scripts :)
- Added: t_armor_chain and t_armor_ring typedefs. You can still use t_armor for every piece of armor, but also allows you to use these new types to use specific behavior for each type of armor.
		 *IMPORTANT* If you want to use these types, you need to add the following definitions under [TYPEDEFS] in your scripts:
			t_armor_chain			302
			t_armor_ring			303
			t_talisman				304
- Added: SPELLFLAG_FREEZEONCAST, when a player casts this spell it gets frozen, opposite to SPELLFLAG_NOFREEZEONCAST
		 Example use: freeze while opening a gate or recall). MAGICF_FREEZEONCAST must be disabled.
		 *IMPORTANTE* You need to add the following definition under [DEFNAME spell_flags] in your scripts:
			spellflag_freezeoncast	   00001000
- Added: Chars TAG, TAG.SkillMod%d being %d the SKILL ID. This allows you to increase the bonus for certaing skill instead of modifying the raw base value (just like stats affect skill bonus).
		 Example: TAG.SkillMod10 = 100 will bonus you 10.0% in Camping (SKILL 10). If you click on "show real" in the skill menu, you won't see this bonus but the real value.
		 Note that most of the internal calculations are used taking in account stats + tag bonus.
- Added: @SpellInterrupt, fired when a char interrupts someone's casting. Default is the interrupter, SRC is the person casting.
		  ARGN1 = Spell being casted.
		  ARGN2 = The disturb chance calculated: 0-1000. (Internally, this number is compared against a random of 1000)
		  RETURN 1 cancels the interruption and allows the target (SRC) to cast.
- Added: SKILLUPDATE %d, argument is the skill to update. Use this function with the tag described previously.
- Added: [sphere.ini] ColorNotoGoodNPC, you can now set a custom color for good npcs (this should not affect tamed creatures).
- Changed: ATTR_QUESTITEM to have internal functionality. These items can't be dropped, traded or looted (as described in script definition).
- Changed: ATTR_CANNOTREPAIR to have internal functionality. These items can not be repaired.
- Changed: Mining @Start/@SkillStart, now ACT is the Worldgem Bit we're mining from. You can modify it easily instead of using workarounds to get the UID.
- Changed: @UserQuestArrowClick, using return 1 now prevents from showing default message when (left/right)clicking arrow.
- Changed: Crafting skills now won't display the bounce message when successfully crafting an item, with the skill message is enough.

10-08-2022, Drk84
- Added: PROMPT_CLILOC for Skill Definition. This allow you to set a cliloc number in the aforementioned property and it will be used instead of the PROMPT_MSG text.
		 Example:
		 [SKILL 1]
		DEFNAME=Skill_Anatomy
		KEY=Anatomy
		PROMPT_MSG=Whom shall I examine?
		PROMPT_CLILOC = 500000

15-08-2022, Julian
[sphereCrypt.ini]: Added crypt key for classic client 7.0.96 and enhanced client 4.0.95, 4.0.96
- Added: Complex maths to be able to use negative values with SQRT or POW.
- Added: TAG.NAMELOC.HUE to use HTML colored names for items/chars with tooltips. (Issue #390)
		 Example: TAG.NAMELOC.HUE = FF00FF // Color of the name: violet
		 This will be internally expanded to: <basefont color=#FF00FF><name></basefont>
- Fixed: Statues getting all wrong when updating the char, possibly don't need to be updated with addCharMove. (Issue #716)
- Fixed: Character list was filling faster than the actual removal of the character. (Issue #753)
- Fixed: Removing a secured container from a multi didn't work. (Issue #685)
- Fixed: Moving multis now will add components as first priority to avoid dropping them. (Issue #821)
- Changed: Skills with SKF_GATHER, @Start/@SkillStart, now ACT is the Worldgem Bit we're gathering from.

09-09-2022, Jhobean
- Added: @SendPaperdoll There 3 ways (Dclick a player, use client macro or use the context menu) to open a paperdoll and requesting the paperdoll packet (0x88).
		 All 3 method will initiate the trigger on the player doing the action. This trigger could be use to modify some aspect of paperdoll on custom client or
		 to detect someone looking your paperdoll.
			SRC = The player asking to open the paperdoll
			i = The player concerned in the information packet

19-09-2022, Tolokio
-Added: Wake() is now avaible to be used by script using command: "wake". Wake function require to wake a sleeping NPC (death corpse and invisible body)

09-10-2022, Julian
[sphereCrypt.ini]: Added crypt key for classic client 7.0.97 and enhanced client 4.0.97
- Added [sphere.ini]: OF_VendorStockLimit to limit how many a vendor can buy from a player.
	The value should be set in the [TEMPLATE] using the key BUY=
	Example: BUY=i_bandage,10 (will limit the NPC to buy 10 bandages each restock).
- Fixed: Spell interrupt not working if trigger @SpellInterrupt was not used.
- Fixed: Spell flag SPELLFLAG_FREEZEONCAST no working because of high values. Update your defs. (Issue #897)
- Fixed: Mounts not dismounting when they died. (Issue #906)

20-10-2022, Tolokio
- Fixed: returning animation not being played when using throwing weapons. (Issue #461)
- Fixed: butte to works now with throwing plus bows and xbows. (Raylde)

21-10-2022, Tolokio
- Fixed: Mounts stopping ticks if harmed by any char while being ridden (because lost of statf_ridden)
- Fixed: Mounts creating corpse at wrong place if killed while being mounted.
- Fixed: Mount losing statf_ridden while being ridden if mount get released.
- Fixed: Mount being duplicated after corpse is created. (Leather farm exploit)
Notes:
 Fixes also denies mount trying to fight back while mounted and denies pet desserting if owner harms it while being ridden.
 There is a known issue where deathanimation is not played on mount when it dies while being ridden. It just appear dead on the floor.
 Now riders will be dismounted if mount gets released or pet dies. (can be denied by script using proper triggers.)
 There can be issues related to attackers listing but none found yet.

22-10-2022, Drk84
- Fixed: PARTY.CREATE would make the invited player inviting himself..
		 The command syntaxis: PARTY.CREATE msg,uid(s).
		 Where msg is 0/1 sending default sysmessages or not, the following args (up to 9 more) is/are the players to add to this party.
		 Note that by using PARTY.CREATE the player will be forced to enter the party, so you need to add your own "acceptance system".

24-10-2022, Raylde/Jhobean
[sphere.ini]: Added TimerCallUnit to be able use seconds instead of minutes with TimerCall

30-10-2022, Tolokio/Jhobean
- Fixed:  On Some freeshard it's possible to wear a spellbook in left hand (layer2). Now the book can be use in the hand instead of backpack only. (Issue #951)

04-11-2022, Drk84
- Fixed: LowerManaCost property didn't work properly. (Issue #949)

17-11-2022, Drk84
- Fixed: Faction & Slayer system -> bonus damage looks like not working. (Issue #964)
- Fixed: The SLAYER property will also be looked upon in a Spellbook on LAYER 2. (Issue #965)
- Added: In the source added method GetSpellbookLayer for retrieving a Spellbook in LAYER 1 or LAYER 2.

19-11-2022, Drk84
- Changed: AR (the old armour value) property can be displayed up to 65k. (Issue #968)
- Changed: The DAM property (for both characters and weapons) can be displayed up to 65k. (Issue #967)
- Added: t_armor_bone typedef (value 305). If you want to use it you need to add it in the core/defs_types_hardcoded.scp file under the typedef section. (Issue #890)

03-12-2022, Drk84
- Fix: Deleting a player while it's in a guild cause the server to crash. (Issue #971)

06-12-2022, Drk84
- Added [Sphere.ini] : New Sphere.ini settings "DisplayElementalResistance". (Issue #742)
			   This setting allows to display the elemental resistances (Fire, Cold, Energy, Poison but not Physical) on status bar and tooltips, even if combat flag ELEMENTAL_ENGINE is disabled.
			   Remember that the old AC(and MODAR) system will be used if ELEMENTAL_ENGINE flag is disabled.

07-12-2022, Tolokio/Jhobean/Drk84
- Fixed: Possible fix for houses | ships removing keeps them stuck in totalcount without UID. (Issue #895)
- Fixed: Possible fix for disconnected characters on a movable multi being re-connected when the multi starts to move. (Issue #948)
- Fix: Removed no longer needed / duplicated code.
- Fix: At @redeed, return 1 no longer avoid house deletion. (Redeed can be prevented by script at house dialog, so there is no need of this feature. Also wiki says return 1 just prevent deed creation, not house deletion.)
- Fixed: Possible fix for disconnected characters on a movable multi being re-connected when the multi starts to move. (Issue #948)

13-12-2022, Drk84
Fixed: @Ship_Turn not firing, this trigger will fire on a T_SHIP item and for every item on the deck. (Issue #981)

15-12-2022, Drk84
Fixed(Maybe): Fix for Attack speed exploit with COMBAT_FIRSTHIT_INSTANT. (Issue #790)

24-12-2022, Drk84
Fixed: Multi type items weren't calling the @Destroy triggers when removed. (Issue #988)

29-12-2022, canerksk
- Added: Added @SHIP_STOP and @SHIP_MOVE trigger:
		Under ship multidef or under multidef defined event/type @Ship_Stop trigger will be triggered when you stop your ship. So you can check whether the ship is going or not.
		Example script;
		on=@Ship_Stop (UID/I = Ship)
		TAG0.SHIPMOVE=

		Accordingly, the ship is still under multidef.
		on=@Ship_Move (UID/I = Ship, ARGN1 = Move Direction)
		TAG0.SHIPMOVE=1 // or <ARGN1>

		You can check whether the ship is in motion or not. In addition, in @Ship_Move trigger, the direction of the ship is sent to the trigger as <ARGN1>.
		@Ship_Move trigger is only triggered on successful ship movements. It will not trigger if the ship is stuck somewhere.

31-12-2022, Drk84
- Added: New command DIRMOVE for ships, read only, returns the direction (0..8) where the ship is going. (Issue #993)
- Added: New command DAMADJUSTED, read only, return the damage range including the various modifier (like CombatBonusStat, tactics bonus if enabled etc).
		 It pratically returns the damage range shown in the character status panel.
		 Example:
		 ON=@Hit
		 argn1 = <R<damadjusted>> //This recalculates the full damage including the various bonus if any.

01-12-2023, Drk84
- Added: New trigger @NpcActCast, this trigger is fired when an NPC is going to select which spell is going to cast.
		 This triggers can fires multiple time if the NPC cannot cast the selected spell (for example because the spell has the SPELLFLAG_PLAYERONLY flag).
		 So always make sure your casting NPCs has a proper spell selection, so try to avoid giving them full spellbooks because more than half spells in there has the SPELLFLAG_PLAYERONLY flag.
		 If NPC_AI_COMBAT is enabled, NPCs can cast a beneficial spell on other NPCs in a 14 tiles radius, the condition for this to happen are that these "other NPCs" must be in combat with the same target of the caster npc.
		 A NPC will properly cast an healing spell if their hitpoints are less than one third of the maximum hit points ( for example 29/100 hit points).
		 @NpcActCast:
			 Default Object: the caster.
			 SRC: the caster.
			 ARGO: the current target.
			 REF1: the new target that will replace the current target (argo) if it's set.
			 ARGN1: the spell being selected, can be replaced, and can be set to a spell not found in their spellbook.
			 ARGN2: It's 1 if the spell is being cast by a wand, 0 otherwise, read only.
			 Return 1: Interrupt spell selection.
- Changed: If the NPC is wielding a wand, it has a 50% to use the wand instead of the a spell from the spellbook11. Remember that the wand must have the ATTR_MAGIC set.
- Fixed: Bonus from CombatBonusStat, when the stat was above 100, was not properly applied when COMBAT_DAMAGEERA was set to 2 (AOS)

02-01-2023, Drk84
- Added [Sphere.ini]: New Sphere.ini settings "NPCHealThreshold", this setting determines the amount of target hitpoints (in %) at which a NPC will try to heal by spell.
- Added: New local "local.healthreshold" in the @NpcActCast trigger, this setting determines the amount of target hitpoints (in %) at which a NPC will try to heal by spell.
- Added: New command HEALTHPERCENT to show the hitpoints  of a character in a percent value (the ratio between current hitpoints and maximum hitpoints).
- Fixed: GetHealPercent() method didn't consider maxhits.

03-01-2023, Drk84
- Replaced: HEALTHPERCENT command is replaced by STATPERCENT.stat_key command where stat_key is STR for hits, dex for stamina and int for mana.
			Example: if we have 25 mana and 50 int and we do .show statpercent.int we will get 50%.
- Added: CURE command, for curing poison and hallucination effect.
		 Example:
		 CURE remove the poison memory item and clear the poison flag.
		 CURE 1 remove the poison memory item, the hallucination memory item, clear the poison and hallucination flags.

10-01-2023, Jhobean/Drk84/Luxion
- Fixed: Sectors clients going negative and disconnected clients being displayed on ships.

11-01-2023, canerksk
- Added: Added Multis.* function for server. The function is based on the guildstones.* function. It is a function that outputs all items of type t_multi, t_multi_custom and t_ship on the server. It can be used with multis.count as multis.0.name/p/uid/.
- Fixed: Trigger @FameChange/@KarmaChange not trigger if set value. (Issue #598)
	Trigger location has changed and new trigger definitions have been added.
	Added <LOCAL.OLD> and <LOCAL.NEW> keys to catch hash/fame changes under trigger. also moved under functions to trigger with .fame 1 / .karma 5 commands.

16-01-2023, tolokio
- Added: @charShove trigger.
		Fires when a char is going to step another char.
		src->The char being stepped
		Default Object->the one who step on the other.

17-01-2023, Drk84
- Fixed: Combat damage displayed with a delay when COMBAT_ANIM_HIT_SMOOTH was enabled. (Issue #1011)

02-02-2023, Drk84
- Added: New keyword for DAMADJUSTED command:
		DAMADJUSTED.LO: returns the lowest value of the adjusted damage.
		DAMADJUSTED.HI: returns the highest value of the adjusted damage.

05-02-2023, Nolok
- Changed: Fully implemented CAN_O_NOSLEEP, making both items and NPCs never going to sleep (stopping their TIMER and current action).
	If an NPC can't sleep (because it has the CAN flag), its items won't go to sleep (even if they don't have the flag).
	Items with this CAN flag won't go to sleep even if the parent container (a char or a sector) starts to sleep.
- Changed: Added more checks to avoid TIMER being set on objects which shouldn't tick/have a timer.

07-02-2023, Jhobean
- Changed: Spawn now continues to generate Items/NPC even on sleeping sectors. If the sector is sleeping when the spawn point reaches the max amount of objects, it will finally go in the sleeping state.
	This change will avoid the scenario in which a player enters a dungeon/region which partially spawned, even if a sufficient amount of time elapsed, because the sector went sleeping too soon.
- Fixed: Dragging an item linked to a spawn point now unlinks them. This will avoid to have item dissapearing on player packpack when the spawn point is resetted and sets the spawn to continue spawning new items.
- Added: 2 news triggers for Spawn objects:
	@DelObj: Called when a object is removed/unlinked from the spawn point.
			src / i / ARGO -> the uid of the spawn
			ARGN (R/W) -> Time in second for next spawn.
	@AddObj: Called when a object is added/linked to the spawn point.
			src / i -> the uid of the spawn
			ARGO -> the uid of char/item add
			ARGN (R/W) -> Time in second for next spawn. Server will set to -1 if spawn is complete, you can manualy force a delay if you want.(old buggy behavior)
			note: 	Force item to -1 have 2 advantages
					1- Avoid waste server's ressource on awake sector
					2- Sometime when you kill a monster, the timer had few time left and monster was spawning too fast.

19-02-2023, Drk84
-Fixed: Rideable summoned creatures did not disappear when  mounted. ( Again Issue #582)
-Fixed: Dropping items into wall tiles in multis. (Issue #1024)
-Fixed: When using ISNEARBYTPE command the last argument "CheckZ" on FindItemTypeNearby method was never used.

20-02-2023, Drk84
-(Cheap) Fixed: Spawn Keyword AT.n.xx not working properly. (Issue #1033)

27-02-2023, Drk84
- Fixed: Wrong duration for Gate Travel Spell. (Issue #1043)
- Fixed: More accurate messages when a container/hold is locked and you have/don't have the key. (Issue #1044)
- Added: New local in the @GetHit trigger:
		 LOCAL.SPELL: Read Only, display  the spell number that damaged the character.

02-03-2023, Drk84
- Fixed: Animation was played while out of range when COMBAT_SWING_NORANGE flag is enabled. (Issue #819)
- Fixed: Spell duration was calculated two times when a spell was cast.
- Added: REPAIRPERCENT command used to display the current health of the item in %.

09-03-2023, Drk84
- (Partially) Fixed: Localized messages throwing errors in console when the speaker is not visibile. Partially because i can't still display the speaker name in the journal if the hearer is dead and DeadCannotSeeLiving is set to 2. (Issue #1049)
- Added: New locals (READ ONLY) in @GetHit trigger: local.damagePercentPhysical, local.damagePercentFire, local.damagePercentCold, local.damagePercentPoison, local.damagePercentEnergy
         These locals contains the amount in % of the elemental damage inflicted, and thus they are available only with Elemental Engine enabled.

22-03-2023, Drk84
- Fixed: Undefined item ID (it's actually Item ID 00) when adding ON=@Cancel trigger in SKILLMENU. (Issue #1056)

07-04-2023, Drk84
- Fixed: ModMaxWeight not working on NPCs. (Issue #1061)
- Fixed: SHIPMOVE command displaying an "invalid command" warning on the console if the ship can't move. (Issue #860)

17-04-2023, Xun
- Added @addmulti and @DelMulti triggers (Called only on characters, not guilds ATM, and for both Ships and Houses):

    - argn1 = Multi Count (The total number of slots used for this multi, the same slots used for MaxHousesAccount, MaxHousesPlayer, etc)
    - argn2 = The default priv for SRC on this multi (See defname house_privs).
    - argn3 = Indicates wether the argn1 value should change the char's count of slots or not (It's 1 by default only if argn2 == hp_owner).
    - return 1 (Only for @addmulti): Prevents this multi from being added to SRC's house storage (Which means having it in "houses.N.key", etc).
- Added HouseMultiCount and ShipMultiCount functions, returning the total slots used for each type of multi.

- Changes in the House System:
    - By default, multi slots are only changed when SRC is the owner of the multi. This can be changed by modifying the argn3 value in @addmulti.
    - CItemMulti::DelMulti is not properly calling DelHouse and DelShip to remove the multi from the player's CMultiStorage.
- These changes should prevent characters having their multi slots used when being added as coowner, friend, accessonly, etc, to any house, thus not allowing them to have their own houses because their slots were already used.
    It should also prevent some incorrect removal of multis from the player's multi storage, leading to some save problems.

22-04-2023, Drk84
- Fixed: NPC double hit. (Issue #1065)
- Fixed: @CombatEnd not fired and Combat memories not removed when the fight is ended. (Issue #1055)

25-04-2023, Nolok
- Fixed: Enabled "Character wants to move into an invalid location" error log to be shown only if the character also starts the movement from an invalid location (Issue #990).

27-04-2023, Nolok
- Source: Moved CMakeLists.txt from /src/ to the project root dir.
	WARNING: you will need to change the source directory in CMake!
- Changed: On Windows, abandoned MySQL libmysql.dll. Now using MariaDB libmysql.dll (compatible with MySQL until 5.x) for x86 builds and libmariadb.dll for x86_64 builds, which supports MariaDB and MySQL versions above.
	WARNING: you WILL need to update those libraries!
	WARNING: outdated, since Windows was moved to MariaDB as well; read the following changelog note.

28-04-2023, Nolok
- Changed: fully moved from MySQL client to MariaDB client library on every operating system.
	Windows: uses libmariadb.dll for both x86 and x86_64 builds.
	Linux and OSX: moved to MariaDB.
	WARNING: you WILL need to update those libraries!

30-04-2023, Nolok
- Fixed: Assertion failure and segmentation fault/invalid memory access caused by early use of Sphere methods requiring some data to be initialized first. Compilation and execution should now work with latest GCC versions.
- Changed: Target architecture is precisely reported, instead of giving the number of "bits".

01-05-2023, Nolok
- Fixed: In an IF statement with multiple subexpressions, the last subexpression was evaluated twice (if a function, it was called twice) (Issue #1032).

02-05-2023, Nolok
- Fixed: IF parsing errors when using that construct without parentheses (Issue #766).

13-05-2023, Nolok
- Fixed: Invalid MULTICOMPONENT and MULTILOCKDOWN tag on items throwing an exception.

13-05-2023, Drk84
- Fixed: Timer not set when an ammunition item was placed on the ground because the strike missed.  (Issue #1072)
- Fixed: Casting the SUMMON CREATURE spell while a fighting skill was active caused the spell creature ID to be resetted. (Issue #1070)

14-05-2023, Nolok
- Removed: unused DEFMSG PARTY_MSG.
- Fixed: 0xF2 packet (PacketTimeSyncResponse) now sending the correct time (milliseconds from the UNIX epoch) to the client. This avoids the Enhanced Client to continuously send 0xF1 packet to ask for the right server time.

15-05-2023, Drk84
- Fixed: @PetDesert trigger not fired when a conjured creature suffers damage from the OWNER just before being summoned. (Issue #1067)

16-07-2023, Nolok
- Fixed: IF parsing troubles with nested < or > characters.

17-07-2023, Nolok
- Added: Protection against infinite recursions in scripts and consequent crashes. Script parsing will not go further if the recursion gets too deep, showing a error message.

21-08-2023, Rastrero/Drk84
- Fixed: Removed exception for poison bottles at CClientUSe.cpp so now poison potions are handled as any other potion at CCharuse.cpp
         Thx Drk84 for the suggestion. I dont understand why there was that exception done. Are we missing something?

29-08-2023, Luxion
- Fixed: The issue with the Heuristic function in CPathFinder has been fixed. Now, the monsters correctly follow their targets without any problems. They are now able to effectively navigate around obstacles and move in a straight path.
Additionally, the problem of zig-zag issue following in the South direction has been addressed.
- Added: OF_EnableGuildAlignNotoriety in sphere.ini, if enabled, guilds with the same align will see each other enemies or ally.

29-08-2023, Nolok
- Fixed: (hopefully) conditional expressions parsing.
- Fixed: a couple of memory deallocation bugs (could cause crash on server close).
- Fixed: GCC and Apple Clang toolchain not correctly applying sanitizers (if enabled via CMake).

02-09-2023, Nolok
- Changed: moved /src/cmake folder to /cmake, this WILL require deleting and rebuilding any existing CMake cache.
- Changed: renamed the compilation output folder to better reflect the target architecture.
- Added: CMake Clang compilation toolchains for Windows, Linux, MacOS.

13-09-2023, Drk84
- Fixed: Sphere.ini setting ManaLossPercent not consuming mana unless set to 100. (Issue #1096)
		Remember that the mana lost depends from the spell Mana base cost and eventually the LowerManaCost property if set.

14-09-2023, Drk84
- Fixed: Using ATTACKER.TARGET on a fighting NPC will return always -1. (Issue #1098)

15-09-2023, Drk84
- Fixed: Ship plank not remaining open when turning the ship around. ( Issue #1089)
	   The ship plank will now autoclose after 5 seconds.
- Fixed: Client Linger Timer is 3600 seconds on stoned players. (Issue #1081)

23-09-2023 / 1-10-2023 (2 commits), Jhobean
- Fixed: When deleting account, f_onchar_delete was not call on char and char's item was not remove causing warning on next server boot. ( Issue #1029)
- Changed: Optimisation how f_onchar_delete is launch and avoid dual launch when delete char on login screen.

26-09-2023, Drk84
- Fixed: Ship plank disappearing when closed before its timer expires or after a save is performed.

02-10-2023, xwerswoodx
- Fixed: Re-Coded @KarmaChange and @FameChange triggers not setting variables correctly. (Issue #1118)
	ARGN1 now return as the amount of Karma/Fame being added.
	ARGN2 is now return oldKarma. (ARGN2 + ARGN1 == New Karma)
	LOCAL.NEW removed, while ARGN1 is writeable, it's impossible to track it inside the trigger.
	ARGO now return the source of karma/fame income if exists.
- Fixed: f_onchar_create_init is not called. (Issue: #1117)
- Fixed: IF and QVAL statements cannot evaluate correctly 32bit+ bitwise conditions. (Issue: #1078)
- Added: @PartyAdd trigger. (Feature Request: #1054)
	I: The player who is joining to the party.
	SRC: The player who is inviting.
	Return 1: Cancels the action.
- Added: LOCAL.SOUND and LOCAL.ANIM under @Start (Skill) and @SkillStart triggers to override sound and animations before start crafting or gathering.
- Fixed: FACTION property not saved and load correctly under [CHARDEF] definition. (Issue: #1059 and #1083)
- Added: Added COMBAT_PARALYZE_CANSWING (080000) to combat flags to let characters continue attack while paralyzed like old behaviour. (Issue: #1124)
- Fixed: ATTACK command causes the player getting criminal without checking AttackingIsACrime value in sphere.ini (Issue: #1123)
- Added: Added CAN_I_EQUIPONCAST (08000000) flag for items to let scripters customize allowed items while EquippedCast disabled.
- Fixed: Spells can trigger @Success triggers and play animations if they paralyzed after selected skill.
- Fixed: Motivation < 0 causes STATF_WAR flag stay infinitely on characters. (Issue: #517)
- Fixed: The issue where characters can spawn out of the rooms. (Issue: #1084)
- Fixed: More1 and More2 values readn as integer instead of dword (unsigned integer) (Issue: #784)

07-10-2023, Nolok
- Added: FUNC keyword to item templates and template-triggers with special parsing (@Create, @CreateLoot, @NPCRestock). It allows to call a function with arguments on the last created ITEM.
	Default object: the item. SRC: the character holding it.

08-10-2023, Nolok & xwerswoodx
- Fixed: Setting P inside the @Click trigger made it being called endlessly.

13-10-2023, xwerswoodx
- Fixed: Made some changes on Z Calculations for maps to make it more accurate. (Issue: #♀983, #617, #877)
	Thanks for, Jhobean, Tolokio and nolok.
- Added: Followers now saved on characters after @FollowersUpdate trigger.
	New system can be activated from sphere.ini by adding EF_FollowerList (080) flag to experimental flags.
	As this save system newly added, the npcs that already follows the character not saved so their CURFOLLOWER count will reset to 0.
	You can return 1 or set ARGN1 <= 0 to block increasing of current follower, and these characters not adding to current follower list.
	CURFOLLOWER returns the total follower.
	CURFOLLOWER.n.UID/CURFOLLOWER.n returns the follower uid at the given index of the list. (Feature Request: #737)
- Fixed: @Success/@SpellSucess triggers when player try to teleport unavailable spots. (Issue: #779)
- Fixed: Non-static items distance check fails because of wrong reference. (Issue: #1112)
- Fixed: Setting GuardsOnMurderers to 0 causes vendors to run away players and call guards. (Issue: #720)

16-10-2023, Nolok
- Fixed: Memory leaks due to the old CSPtrTypeArray and CSObjArray containers, replaced with new ones using smart pointers as wrappers.
- Fixed: Possible random errors caused by reading some internal data before it was initialized during server startup (CCrypto::client_keys, holding SphereCrypt data, and ThreadHolder, holding threads data).
- Fixed: CSString instances becoming invalid after calling the Clear method.

18-10-2023, xwerswoodx
- [Port from 0.56d, Coruja] 56b TILLER DCLick auto pilot to X. (Request: #778)
- Fixed: Possible fix for Osi Client spell flood. (Issue: #787, #776)

19-10-2023, Julian
- Fixed: Missing SkillUpdate function, seems I never commited it.
- Modified: @SkillMenu trigger to be able to open dialogs also, and added a few local variables.
	LOCAL.ItemUsed (r) = The ID (not UID) of the item that triggered this action.
	LOCAL.Skill (r) = The ID of the Skill used.
	LOCAL.SkillMenu (rw) = The skill menu (sm_alchemy) or dialog (d_MyCraftingMenu) that is going to open.
- Modified: @SkillMakeItem trigger to enable/disable notification message when bouncing the crafted item.
	LOCAL.Notify (rw) = 1/0. Using 0 will not show any "You put your..." message, 1 will show it. Default = 1.

21-10-2023, xwerswoodx
- [Port from 0.56d, Coruja] Implemented the new chat system from 56d. (Feature Request: #785)
	https://github.com/Sphereserver/Source/commit/ead8e666810d63a58f133de26ebe69095d12c52c
	https://github.com/Sphereserver/Source/commit/2ccf98dc3c4ae7e910ea87cd3d4b5f90e499fe92
	https://github.com/Sphereserver/Source/commit/26039d2ef9a121d52b561ce02cdae6d1e4624ccc
	https://github.com/Sphereserver/Source/commit/f26b39b9b40fba76660c36d57baa8387d3613272
	https://github.com/Sphereserver/Source/commit/722606c54f17e3c9d8e6095fffcaa3b528c4783a
- Fixed: Activated disabled DEFNAME variable for Skills (Issue: #1138)
- Fixed: NPCs that is not walking in multis shown wrong region name after server reboot.

28-10-2023, Nolok
- Fixed: Removing from client's view an object while it's being deleted, in some corner cases made the server crash (Issue #1119).
- Fixed: Guildstone removal caused an exception (Issue #1165).
- Fixed: In-game chat not working correctly and generating exceptions since last update (Issue #1140).

02-11-2023, Jhobean
- Modified: @Mount added argument ARGN1
	  ARGN1 (rw) = The itemID of the item containing the animation use when moounting. (Anim # is in tiledata of this item)
    NOTE: When mounting a pet you'll read a non sense random value but you can replace it by an ITEMID to force anim
    Example: 03ea6 for Llama anim or 03e9f for gray horse anim. Yes 03ea6 is a ship part but in tiledata it link to anim 828

18-11-2023, Nolok
- Fixed: House customization sending wrong component data, breaking it.

09-12-2023, DavideRei
- Added: DispID can now also be used on chars, to change their appearance.

13-12-2023, Nolok
- Fixed: Rare crash occurring when a NPC is selecting an attackable target, but there's only one target (not attackable) in sight.

15-12-2023, raydienull
- Changed: LAYER_AUCTION to LAYER_STABLE and now is used to store the stabled pets on the player.

12-02-2024, Drk84
- Updated SphereCrypt.ini.

13-03-2024, Jhobean
- Added: Item properties functionnality:HITAREAPHYSICAL,HITAREAFIRE,HITAREACOLD,HITAREAPOISON,HITAREAENERGY,HITFIREBALL,HITHARM,HITLIGHTNING,HITMAGICARROW,REFLECTPHYSICALDAM

16-03-2024, Jhobean
- Added: Flag EMOTEF_EAT is added on the ini to avoid see the emote when eating.
- Added: NPC_EAT_GRASS MSG to be able change the hardcode name of "grass" when an animal eat grass
- Added: Item been eaten can now be read on the ARGO parameter of the trigger @Eat.

24-03-2024, xwerswoodx
- Fixed: The issue that causes more1/2 not saved correctly for spellbook. (Issue: #1221)
- Fixed: Players automatically become criminal to everyone when attack someone. (Issue: #1213)
- Fixed: CallGuard not working correctly on the players that only criminal for target. (Issue: #1213, #1040)
- Fixed: The wrong input of Kill trigger, to make it compatible with older sphere versions. (Issue: #1210)
- Added: New Layer LAYER_STORAGE (80) to let scripters create their own storage system. (Issue: #1209)
      	Only t_container and t_container_locked can be equipped to this layer.
- Changed: Decay time removed from spawned items, as Sphere gives tons of invalid link errors when items decayed. (Issue: #1218)
- Added: New spellflag SPELLFLAG_FIELD_RANDOMDECAY (CHANGED on 06/08/2024: 02000, it was before 0100000000) to randomize field timers like old sphere versions. (Issue: #1169)
	SPELLFLAG_FIELD_RANDOMDECAY should be added to defs.
- Changed: SERV.LOG command changed to support console colors. (Issue: [Feature Request] Colored Serv & Src Log System #1158)
	SERV.LOG works same as before.
	Usage of custom color system is: SERV.LOG @color,type,mask message
	Example: SERV.LOG @CTCOL_RED,LOGL_EVENT,LOGM_NOCONTEXT|LOGM_KILLS message
	LOGM, LOGL and CTCOL values should be added to defs.

25-03-2024, xwerswoodx
- Added: Sphere.ini setting CanPetsDrinkPotion (true in default) to make pets drink potion when their owner drop it on it. (Issue: #1147)
	CanPetsDrinkPotion = 0 can be added to sphere.ini to disable that.
- Fixed: Missing fCheckOnly checks block the taming skill. (Issue: #1219)

26-03-2024, xwerswoodx
- Added: New trigger @Drink added for characters. (Issue: #1162)
	I: The character drinking the item.
	SRC: The character drinking the item.
	ARGO = the item that drank
	ARGN1 = cooldown (in seconds)
	ARGN2 = consumption amount (1 in default)
	LOCAL.BottleID = empty bottle id that will be given when after item drank. (Will be given ARGN2 amount of empty bottle in default)
	- Returns:
	1: Stops character from drinking the item.
	5: Let character to drink but will only give 1 empty bottle.
	6: Let character to drink but will not give any empty bottle.
	- Messages:
	DRINK_NOT_ENOUGH, "You don't have enough %s to drink this."
- Added: New trigger @AfkMode added for characters. (Issue: #1161)
	I: The character changing AFK status.
	SRC: The character changing AFK status.
	ARGN1 = Current Afk Status
	ARGN2 = Next Afk Status
	- Returns:
	1: Stops character from switching afk status.
- Added: New trigger @Reveal added for characters. (Issue: #1157)
	I: The character who is revealing.
	SRC: The character who is revealing.
	- Returns:
	1: Prevents character from being revealed.
- Added: New triggers @ArrowQuest_Add and @ArrowQuest_Close added for characters. (Issue: #1116)
	I: The character who activating/deactivating arrow quest.
	SRC: The character who activating/deactivating arrow quest.
- Added: New function triggers f_onaccount_block and f_onaccount_unblock. (Issue: #1156)
	ARGS = Account name.
	- Returns:
	1: Prevents account from blocking/unblocking.
- Added: New function trigger f_onserver_broadcast. (Issue: #1145)
	ARGS = message
	- Returns:
	1: Prevents server to send broadcast message.
- Added: Two new LOCAL variables ItemPoisonReductionChance and ItemPoisonReductionAmount to @Hit trigger. (Issue: #1159)
	This LOCALs changes default behaviour of poisoned weapons while removing poison.
	LOCAL.ItemPoisonReductionChance = Is the chance that weapon reduce poison morez. (Default 100%)
	LOCAL.ItemPoisonReductionAmount = Is the amount of poison that weapon reduce. (Default: CurrentPoisonAmount/ 2)

- Added: You can now use TDATA2 for setting default cooldown (delay) for drinks. (Default: 15secs for potions, 1500 secs for ales)
- Changed: Reactive armor range increased from 1 to 2 in default.

27-03-2024, xwerswoodx
- Fixed: Possible fix for accesses and bans not loading for multis. (Issue: #1223)
- Fixed: Possible fix for wrong damage calculation of slayer bonus damage. (Issue: #1179)

28-03-2024, xwerswoodx
- Added: REGION_FLAG_HOUSE (0x0100) for houses. (Issue: #1154)
	REGION_FLAG_HOUSE 0100 should be added defs.

30-03-2024, xwerswoodx
- Added: ARGO object for @MurderMark trigger to get killed character.
- Fixed: ARGN1 (reap amount) doesn't updated depends on the amount left on bit. (Issue: #1224)
- Added: ARGO to get bit uid under @ResourceGather and @RegionResourceGather triggers.

31-03-2024, xwerswoodx
- Fixed: Possible fix for the OnRegionTrigger getting called on invalid region while multi creating/removing.

02-04-2024, xwerswoodx
- Changed: dword CAN flags changed with uint64 to increase limits.
	- CAN flag limit increased from 0xFFFF FFFF (dword/uint max) to 0xFFFF FFFF FFFF FFFF (uint64 max)
	- The maximum allowed flag for UINT64 is 1 << 62 (0x4000 0000 0000 0000) as 1 << 63 is reserved for the sign.
	- But as sphere evaluation expressions (eval, hval, qval etc.) supports int64 instead of uint64, avoid using any flag value more than 1 << 47 (0x1 0000 0000 0000).
- Fixed: Possible fix for chat debugs. (Issue: #1212) (Issue: https://discord.com/channels/354358315373035542/483721253773901824/1224030729906815077)

03-04-2024, xwerswoodx
- Added: "MOREX" key to set amount of fruit given when the crop ripped.
- Changed: Now @Create trigger called when crop grow to let people to change MORE values in stages if needed.
- Added: @ResourceTest trigger added for crops. (This trigger works separately for every stage)
	I: Crop UID
	SRC: Player who uses plant.
	ARGN1: Next state item ID [Writeable]
	ARGN2: Fruit ID (if exists) [Writeable]
	ARGN3: Fruit ID Override (if exists) [Writeable]
	- Returns:
	1: Stop the fruit checks.
- Added: @ResourceGather trigger added for crops. (This trigger works separately for every stage)
	I: Crop UID
	SRC: Player who is gathering plant.
	ARGN1: Amount of fruit. [Writeable]
	ARGO: Fruit UID
	- Returns:
	1: Prevent player to gather fruit.
	6: Let player to gather fruit but it will drop to the ground instead of backpack.
- Fixed: Possible fix for invalid ResourceID warnings. (Issue: #1071)

08-04-2024, xwerswoodx
- Fixed: Missing REGION reference for multis. (Issue: #1228)
- Added: SPELLFLAG_NO_ELEMENTALENGINE (CHANGED on 06/08/2024: 04000, it was before 0200000000) as spellflag, for ignoring Elemental Engine Damages in specific spells. (Issue: #1230)

09-04-2024, xwerswoodx
- Fixed: An issue that causes T_MULTI_CUSTOM keep multi count saved. (Issue: #1232)
- Fixed: Bonded pets cannot see their master while DeadCannotSeeLiving equals to 2. (Issue: #1225)
- Fixed: The issue that causes Guilds without an align shown enemy to the players with a guild with an align. (Issue: #1208)
- Fixed: Another fix for Invalid ResourceID console warnings. (Issue: #1071)
- Fixed: GMs cannot dress up players. (Issue: #901)

10-04-2024, xwerswoodx
- Fixed: Wrong check block GMs to unequip item from players.

14-04-2024, xwerswoodx
- Fixed: An issue that causes a visual bug to remove all tiles while removing a tile in higher floors. (Issue: #345)

16-04-2024, xwerswoodx
- Changed: EMOTEF_EAT name changed to EMOTEF_HIDE_EAT_PLAYER and limited to only player emotes.
	EMOTEF_EAT is from the merge of Jhobean's pr so it wasn't in sphere at all.
- Added: EMOTEF_HIDE_EAT_NPC to hide emotes while eating only for npcs.
- Added: Trigger @Hit is added as an item trigger.
	This trigger nows trigger before @Damage but after character @Hit trigger.
	Args are same as the character @Hit trigger, but I and ARGO switch the values.
	Args:
	- I: The weapon being used.
	- SRC: The character being hit.
	- ARGO: The character doing the hitting.
	- ARGN1: The amount of damage being dealt.
	- ARGN2: The type(s) of damage.
	- LOCAL.ARROW: UID of the arrow used (Archery only) [Read Only]
	- LOCAL.ARROWHANDLED: If set true (1), clears the ammo stack variable.
	- LOCAL.ITEMDAMAGECHANCE: Sets the damage chance for the weapon. (Default: 25%)
	- LOCAL.ITEMPOISONREDUCTIONCHANCE: Sets the poison reduction chance for poisoned weapons.
	- LOCAL.ITEMPOISONREDUCTIONAMOUNT: Sets the amount of poison that reduced from morez value.
	Returns:
	1: Cancels the combat swing of the character.
- Added: Trigger @GetHit is added as an item trigger.
	This trigger nows trigger before @Damage but after character @GetHit trigger.
	Args are same as the character @GetHit trigger, but I changed to the item, and the character saves on ARGO.
	Also LOCAL.ITEMDAMAGELAYER only works under character @GetHit trigger, it is only readable under item trigger.
	Args:
	- I: The clothing part take a hit.
	- SRC: The character responsible for the damage.
	- ARGO: The character being damaged.
	- ARGN1: The amount of damage being applied. (Before slayer calculation if applicable)
	- ARGN2: The type(s) of damage being applied.
	- ARGN3: Hits will be fixed to this amount after the hit if the value is greaten than it (default: 0)
	- LOCAL.ITEMDAMAGECHANCE: Sets the damage chance for the hitted part of the body. (Armor or shield, if any) (Default: 25%)
	- LOCAL.DAMAGEPERCENTPHYSICAL: The amount in % of the physical damage received, only set if Elemental Engine is enabled. [Read Only]
	- LOCAL.DAMAGEPERCENTFIRE: The amount in % of the fire damage received, only set if Elemental Engine is enabled. [Read Only]
	- LOCAL.DAMAGEPERCENTCOLD: The amount in % of the cold damage received, only set if Elemental Engine is enabled. [Read Only]
	- LOCAL.DAMAGEPERCENTPOISON: The amount in % of the poison damage received, only set if Elemental Engine is enabled. [Read Only]
	- LOCAL.DAMAGEPERCENTENERGY: The amount in % of the energy damage received, only set if Elemental Engine is enabled. [Read Only]
	- LOCAL.ITEMDAMAGELAYER: The layer of the item being damaged. [Read Only]
	Returns:
	1: Prevents damage from being applied to the character.
- Added: MAPVIEWRADAR, MAPVIEWSIZE and MAPVIEWSIZEMAX to sphere.ini that overrides default visual range values. (Issue: #1144)
	Defaults:
	  MapViewRadar=31
	  MapViewSize=18
	  MapViewSizeMax=24
	- MapViewRadar affects the visibility range of the multis (castles, keeps, ships etc) and the range of spy glass. (Spyglass range is MapViewRadar - 5)
	- MapViewSize affects the visibility range of the items.
	- MapViewSizeMax is the maximum range of MapViewSize allowed for increasing VISUALRANGE on clients.
Added: 'H' shortcut for variables to get the value as hexadecimal.
	For example, if you use .tag.test 100
	<dTAG.TEST> returns 100
	<hTAG.TEST> returns 064
- Merged: raydienull's LAYER_STABLE (81) build merged, but LAYER_AUCTION keep same while LAYER_STABLE added as a new layer. (PR: #1201)
- Fixed: raydienull's LAYER_STABLE follower triggers isn't called while taking pet out of stable.
- Fixed: raydienull's LAYER_STABLE doesn't work with the new follower system.
- Removed: Unnecessary LINK == PLAYER checks as figurines will be stocked on the owned player.
- LAYER_STABLE layer number is 81.

18-04-2024, xwerswoodx
- Fixed: Setting GMs dispid to c_man_gm in-game, prevents GMs to use in-game commands.
- Changed: Default NPC hear range reverted back to the 14 from 4, as it was 14 in older versions, as there was no reason for changing it. (Issue: #1215)

20-04-2024, xwerswoodx
- Rework: Champion system fully reworked.
- Fixed: Candles keep stuck while killing npcs. (Issue: #564)
- Fixed: LEVELMAX doesn't affect the max level of champion system, and keep spawn npcs for default max level.
- Changed: Spawn system changed and now it automatically calculate the percentage of spawns per level in descending order.
- Changed: Candle calculation is now depend on max level, instead of static 4 level.
- Added: SRC added in @Start trigger. SRC is a reference of player that starts champion spawner.
- Added: @Complete trigger that triggers when champion completed. (Issue: #477)
	Args:
	- I: Champion spawner uid.
	TODO: Will add attacker list in this trigger.
- Added: @DelRedCandle trigger that triggers while red candle removing.
	Args:
	- I: Champion spawner uid.
	- ARGO: Candle uid. [Read Only]
	- ARGN1: Reason of removing. [Read Only]
		1: Timeout
		2: User Command
		3: Clearing all candles
	Returns:
	- 1: Cancel the delete action.
- Added: @DelWhiteCandle trigger that triggers while white candle removing.
	Args:
	- I: Champion spawner uid.
	- ARGO: Candle uid. [Read Only]
	- ARGN1: Reason of removing. [Read Only]
		1: Timeout
		2: User Command
		3: Clearing all candles
	Returns:
	- 1: Cancel the delete action.
- Added: @Level trigger that triggers when champion level up.
	Args:
	- I: Champion spawner uid.
	- ARGN1: Level [Read Only]
	- ARGN2: Total monster count for current level. [Read Only]
	- ARGN3: Needed red candle count for current level. [Read Only]
- Added: @Stop trigger that triggers when champion stopped.
	Args:
	- I: Champion spawner uid.
	- SRC: The player that stopped spawner.
	Returns:
	- 1: Cancel stopping action.

21-04-2024, xwerswoodx
- Fixed: Script multis move 1 block north when their type set as t_multi_addon. (Issue: #1238)
- Fixed: ADDCOMPONENT command was added as ADDCOMP for houses. (Issue: #1239)

22-04-2024, xwerswoodx
- Changed: Re-activated 56b style hardcoded fishing system, as I don't know why it's deactivated as softcoded system too bad and broken.
	- Fishing skill in default script pack should updated.
	- Delay should set to 2.5-3.0
	- All softcoded system should removed.
	- If anyone want to code their own fishing system, they can use SKF_SCRIPTED.
- Added: EF_DAMAGETOOLS flag implemented to the sphere.
	- Added LOCAL.ITEMDAMAGECHANCE to the @Success trigger for skills to decide damage chance for tools. (Default: 25)
	- Added LOCAL.ITEMDAMAGEAMOUNT to the @Success trigger for skills to decide damage amount. (Default: 1)
	- EF_DAMAGETOOLS only affects the skills with SKF_GATHER flag.
- Added: CAN_I_SCRIPTEDMORE (020000000) as item CAN.
	- This can flag ignores MORE values that entered for hardcoded behaviour.
	- It's new flag, need couple of updates for fully implemented.

27-04-2024, xwerswoodx
- Fixed: Return of variables were return decimal value (10-base) instead of hexadecimal (16-base).
- Added: DecimalVariables (boolean) keyword for sphere.ini. (Default: 0)
	0: Makes Sphere return variables (TAGs, LOCALs, etc.) in hexadecimal (16-base)
	1: Makes Sphere return variables (TAGs, LOCALs, etc.) in decimal (10-base)
	IMPORTANT: If you were using <TAG.NAME> == DECIMAL for checking in your scripts and want to keep that behaviour,
		    you have to add DecimalVariables=1 to Sphere.ini.
	SUGGESTION: Always use <hTAG.NAME> for hexadecimal returns, and <dTAG.NAME> for decimal returns to avoid any future issues,
		     when you switch this setting.
- Fixed: SPELLFLAG_NOUNPARALYZE flag wasn't working as intended.

03-06-2024, Nolok
- Added ini settings:
	// Maximum number of connection requests before rejecting/blocking IP. Reset after <NetTTL> seconds elapsed after last connection attempt.
	MaxConnectRequestsPerIP=5
	// Maximum time in milliseconds to wait before closing a connection request wich did not make it into a successful login (classic DDoS just asks to connect without doing anything else, or sends garbage data).
	TimeoutIncompleteConn=5 * 1000  // 5 seconds
- Added serv_trig function f_onserver_connectreq_ex, called after an IP exceeds MaxConnectRequestsPerIP:
    WARNING: function arguments and returns CHANGED in the 10-09-2024 commit.

	ARGS (RO): IP address.
	ARGN1 (RO): System time in milliseconds since the last connection.
	ARGN2 (RO): System time in milliseconds of this connection attempt.
	ARGN3 (RO): Number of connection attempts since the IP History entry for this IP was (re)created.
	LOCAL.BAN_TIMEOUT (RW): 5 * 60 (default), seconds to keep banned the ip from new connections to the server (permanent if negative).
	RETURN 1: Only reject the connection.
	RETURN 2: Reject and ban the IP for <LOCAL.BAN_TIMEOUT> seconds.
- Added serv_trig function f_onserver_connection_acquired, called after an IP successifully establishes a connection with the server and passess the security checks:
	ARGS (RO): IP address.
	ARGN1 (RO): System time in milliseconds since the last connection.
	ARGN2 (RO): System time in milliseconds of this connection attempt.

04-06-2024, Nolok
- Added: client commands ADDITEM and ADDCHAR, to be used in place of .ADD when there's the need to force the argument to be an item or a char.
	This can be useful when using raw IDs (like 01, 0bd1, etc) instead of defnames.

08-06-2024, Nolok
- Changed: how the client versions are handled internally, since newest clients have a revision number > 100 and it broke compatibility with previous internal representations.
- Added: SERV.CALCCRYPT <client version string>, <optional: client type id>, <optional: force crypt type/algorithm>.
	Returns the line for the given client version to be added to SphereCrypt.ini.
	Client type id:
		0	// Standard client (Classic, default)
		1	// Old 3D client
		2	// KR client
		3	// Enhanced Client
	Force crypt type:
		0	// None (default: auto detect)
		1	// Blowfish
		2	// Blowfish + Twofish
		3	// Twofish
		4	// Login (old cypher used for some 1.x clients)

09-06-2024, Nolok
- Added: DistanceFormula ini setting, it selects the method use to calculate distance between two object/points.
	DISTANCE_FORMULA_NODIAGONAL_NOZ 0	(linear/integer distance, considering the span this results in a "square" area with the object at the center; do not consider z)
	DISTANCE_FORMULA_DIAGONAL_NOZ	1	(as if we could traverse diagonally each tile, this results in a "circular" area with the object at the center; do not consider z))
	DISTANCE_FORMULA_DIAGONAL_Z		2	(same as above, but FORCE every distance check to consider z) --> BEWARE! Not thoroughly tested, it MIGHT cause unexpected behaviors.
	Sphere X defaults to DISTANCE_FORMULA_NODIAGONAL_NOZ, older Sphere versions used DISTANCE_FORMULA_DIAGONAL_NOZ.

12-06-2024, Nolok
- Fixed: negative value hex representation in scripts, now it should match the expected one (like in v0.56b).
- Fixed: script files caching discarding the last line of the file.
- Fixed: dialog data buffer not emptied after the dialog packet is sent (resulting in displaying a garbled dialog).
- Fixed: << operator parsing (without hopefully breaking something else). Remember that you MUST leave a whitespace between the operator and the operands.
- Added: error message if trying to open a non existant script file (example: from spheretables.scp).
- Added: SERV.BUILDNUM (alias for BUILD, returning the git revision number or -1 for special builds, not linked to git).
- Added: SERV.BUILDBRANCH and SERV.BUILDSTR (the latter showing both branch name and build number, or the compilation date if the build is not linked to git).

13-06-2024, Nolok
- Added: ini flag ItemTimers to define global rules for item timers.
	// ITEM_CANTIMER_BASE			0	// Items cannot have an active timer nor a timer can be set for them if are placed inside a item container. Items placed on the map or equipped can have a timer.
	// ITEM_CANTIMER_IN_CONTAINER	1	// Items can hold a timer even if equipped.
- Added: item CAN flag (Issue #1180):
	CAN_I_TIMER_CONTAINED   0x40000000  // This item (if not "sleeping") can have a timer even if inside a container (overrides global default behavior).

21-06-2024, Nolok
- Improvement: optimized various C++ core subsystems, resulting in a significantly reduced CPU usage and (slightly) reduced startup time.
- Fixed: RAM usage always increasing during uptime. Caused by a couple of memory leaks, the greatest happening because the cached map blocks were not properly released.
- Fixed: adopted a more conservative memory allocation policy for strings, resulting in reduced RAM usage.
- Changed: I_MEMORY (ITEMID_MEMORY) items won't have anymore the ComponentProps Faction, ItemChar, Item, reducing their memory footprint.

25-06-2024, Nolok
- Fixed: LASTUSED, LASTDISCONNECTED, TIMESTAMP being interpreted as a number with a different base (seconds or tenths of seconds or milliseconds) in different contexts. Now they expect in scripts only values in seconds.
- Fixed: crash when moving a char in an area full of teleporters, or whichever items made the char move multiple times in the same tick.

26-06-2024, Jhobean
- Changed: @NPCRESTOCK References modification. Now SRC:Server I:NPC (Before it was always server)

30-06-2024 (merged on 20-07-2024), DavideRei
- Fixed: hallucination spell duration (before it was fixed at 1000 seconds)
- Fixed: wrong layer checked for potion delay to set the memory name
- Modified: blocked spelleffect on ridden chars for spells with flag SPELLFLAG_FIELD or SPELLFLAG_AREA
- Fixed: NPC_Act_Follow use combat target even if the npc is not in combat
- Fixed: wrong highest threat when there are no attackers

20-07-2024, Nolok
- Changed: When trying to set/modify a STAT to reach a value < 0, print an error and default that stat to 0. Nevertheless, remember to check for underflows or overflows in your scripts before passing the value to the core! This update is a safety net but you can expect bugs anyways if you don't check the math in the scripts.

06-08-2024, Gladie
- Fixed: changed value of some recent spellflags, since the previous values waere too big to be stored in a standard numerical variable.
	New values:
	SPELLFLAG_FIELD_RANDOMDECAY     02000
	SPELLFLAG_NO_ELEMENTALENGINE    04000

10-08-2024, DavideRei
- Added: read mobtypes.txt (if available among mul files) and cache it to check animations type when using creatures animations
- Added: alert anim on NPCs when they start combat, pillage anim when they loot something (items on ground or in bodies) and "summon" anim when they are summoned or added
- Modified: now standard anims (SEA_MONSTER, ANIMAL, MONSTER) and UOP anims are handled correctly depending on which actions anim they have on anim files (checked on last client version).
	Please note that some actions are handled by the client (for example walk, run, fly, getHit while flying, die) and they could not work depending on which client you are using.
- Added: missing/new actions to be used with .ANIM command.
    ANIM_ALERT              = 35,
    ANIM_THROW              = 36,
    ANIM_PILLAGE            = 37,
    ANIM_STOMP              = 38,
    ANIM_FLY                = 39,
    ANIM_LAND               = 40,
    ANIM_GETHIT_AIR         = 41,
    ANIM_SUMMON             = 42,
    ANIM_SPECIAL            = 43,   //UOP anims
    ANIM_BOSS_SPECIAL_1     = 44,   //Only few UOP anims: Order Variant, Chaos Variant, Stygian Dragon, Scalis
    ANIM_BOSS_SPECIAL_2     = 45,   //Only few UOP anims: Order Variant, Chaos Variant, Stygian Dragon, Scalis

- Modified: now custom anims can be handled by scripts using ANIM command under CHARDEF, to set which anim actions they have/don't have, using the following flags.
	MONSTER (H slot) default configuration is with actions: 0 (Walk), 1 (Stand), 2 (Die1), 3 (Die2), 4 (Attack1), 5 (Attack2), 6 (Attack3), 10 (GetHit), 11 (Pillage), 15 (Block Right), 16 (Block Left), 17 (Idle), 18 (Fidget)
    No DIE2 action		= 01,
    No ATTACK1 action   = 02,
    No ATTACK2 action   = 04,
    No ATTACK3 action   = 08,
    No GETHIT action    = 010,
    No PILLAGE action   = 020,
    STOMP action		= 040,
    CAST2 action        = 080,
    CAST3 action        = 0100,
    No BLOCKR action    = 0200,
    No BLOCKL action    = 0400,
    No FIDGET1 action   = 0800,
    No FIDGET2 action   = 01000,
    FLY action          = 02000,
    Anims with Attacks 1-2-3 in actions 9,10,11 and with GetHit in action 20 (there are many custom WOW anims with this configuration) = 0x10000

	ANIMAL (L slot) default configuration is with all actions: 1 - 12
    No EAT action       = 01,
    No ALERT action     = 02,
    No ATTACK2 action   = 04,
    No GETHIT action    = 08,
    No FIDGET1 action   = 010,
    No FIDGET2 action   = 020,
    No LIEDOWN action   = 040,
    No DIE2 action      = 080

	So for example if you have a MONSTER (H slot) flying custom anim, with Cast2 action but not Pillage action you can set ANIM=020A0
	If you have a custom anim with default configuration, you don't need to set ANIM=

10-08-2024, Gladie
- Fixed: CAN_I_DAMAGEABLE not updating status bar (PR #1259, issues #1248, #1260).

09-09-2024, Nolok
  WARNING! POTENTIALLY BREAKING CHANGE! Scripts will need to be updated.
- Changed: since there was too much data to be stored in the FACTION/SLAYER property, so that it sometimes couldn't fit and caused issues,
	it has been split in two different properties:
	  - FACTION/SLAYER_GROUP (expects a bitmask, max value of the usable flag: 0x800000),
	  - FACTION/SLAYER_SPECIES (plain number, max value 255).
	    SPECIES with index/value 1 are always considered to be SuperSlayers for their group.
	Those properties are stored in the ComponentProps ItemEquippable and Char.
- Changed: SLAYER now works only on items, FACTION on characters. Before, they were synonyms and could be used on both chars and items to access the same property.
- Removed: unused properties SLAYER, SLAYER_LESSER, SLAYER_SUPER, SLAYER_MISC.
- Added: log message when a new thread is created or a thread is being renamed.

10-09-2024, Nolok
- Updated: f_onserver_connectreq_ex now is called whenever an ini connection limit is exceeded (pings, max connections...).
    Now it stores these parameters:
    - ARGS  = IP address
    - LOCAL.TIME_CUR_CONNECTED_MS (RO)  = Monotonic system time when this connection request was handled (milliseconds)
    - LOCAL.TIME_LAST_CONNECTED_MS (RO) = Monotonic system time of the previous connection attempt/request (milliseconds)
    - LOCAL.PINGS (RO)                  = Current number of "pings" (connection attempts, the number decays over time)
    - LOCAL.CONNECTION_REQUESTS (RO)    = Current number of connection requests since i remember of this IP
    - LOCAL.ALIVE_CONNECTIONS (RO)      = How many active and successiful connections i have with this IP
    - LOCAL.PENDING_CONNECTING (RO)     = How many active connection attempts or incomplete connections i have to this IP
    - LOCAL.BAN_TIMEOUT (RW)            = unchanged -> 5 * 60 (default), seconds to keep banned the ip from new connections to the server (permanent if negative).

    RETURN -1: Don't do anything, let the connection pass.
    RETURN 1:  Only reject the connection.
    RETURN 2:  Reject and ban the IP for <LOCAL.BAN_TIMEOUT> seconds.

17-09-2024, Nolok
- Fixed: When acquiring a new pet follower, CurFollower incremented by 1 regardless of pet's FollowerSlots value (Issue #1251).
- Fixed: dynamic FOLLOWERSLOTS property wasn't correctly saved and loaded from a worldsave.
- Added: dynamic FOLLOWERSLOTS property is now copied to the figurine as TAG.FOLLOWERSLOTS when an NPC is shrinked, and it's applied back when unshrinked.
- Fixed: "mounting"/guiding through the ship pilot exit/dismount bug.

21-09-2024, Nolok
- Changed: CURFOLLOWER.n now works as a reference for that pet, meaning it can be accessed as an object (like with FINDID).
- Changed: added desired FollowerSlots as a second argument to CURFOLLOWER.ADD. Default value: its FollowerSlots.
- Changed: @FollowerUpdate ARGN1 and ARGN2 are now read-only. Having them RW and actually get them working would have meant many other changes, breaking script compatibility.
- Fixed: CURFOLLOWER.DEL/DELETE/CLEAR not working properly.

03-10-2024, Nolok
- Fixed: LIST.ADD ignoring quoted arguments (Issue #1247).
- Fixed: FOOD and MAXFOOD not being stored in the worldsave file (Issue #1289).
- Added: CURFOLLOWER.CHARCOUNT, to return the raw number of characters you own/that are following you. Plain CURFOLLOWER returns the current total FOLLOWERSLOTS you own.
- Changed: removed CURFOLLOWER.DEL and CURFOLLOWER.DELETE in favor of the more specific:
    CURFOLLOWER.DELUID: The same as .DEL/DELETE, just removed the pet via its UID.
    CURFOLLOWER.DELINDEX: Removes the pet via its id in the (cur)follower list for that owner.
- Added: spells with SPELLFLAG_SUMMON now accept LOCAL.FollowerSlotsOverride in the triggers @Success and @SpellSuccess. Default value (do not override): -1.

13-10-2024, Jhobean
- Added: @PetRelease trigger work like @petdesert and return 1 to prevent the pet from being released.

27-11-2024, canerksk
- Added: All skills that have a distance query have been adjusted to take the RANGE values of that skill.
	All skills to be used in RANGE;
		BLACKSMITHING
		MINING // It was added before.
		FISHING // It was added before.
		LUMBERJACKING // It was added before.
		PEACEMAKING
		ENTICEMENT
		PROVOCATION
		COOKING
		TAMING
		THROWING
		SNOOPING
		STEALING
	Also added BREATH.MAXDIST to Breath. If this property is not given, the default is 14 distance.
- Added: Added NOREJOIN tag for corpses, If the NOREJOIN tag is one, the player cannot come back to life on that corpse. That is, the player comes back to life but not on the corpse.
	This tag does not prevent the player from coming back to life, it just prevents them from respawning on that corpse. The player always comes back to life, but not on that corpse.
- Fixed: If you are around an entity that you own and you are trying to open a bank next to a bank, the "bank" command is perceived as a pet command and the bank does not open. There is no problem when you type "bank" after mounting the mount, but "bank" does not work when you dismount. (Issue #1331)

27-11-2024, Gladie
- Fixed: Redeeding t_multi_addon outside of housing system. Before it was only looking for owner of the multi, but in our case we need to know uid of the redeeding char.

2-12-2024, canerksk
- Fixed: Memory OnTick link char if not, the skill will not fail.
	If the memory owner is not present, skills do not fail when taking damage, but if the memory owner is alive, skills fail when taking damage.
- Fixed: The entity was jumping frames in flooded pet commands (come, guard).
- Fixed: ITEMMEMORYEQUIP is not triggered in many default memories.
	Previously, many memories did not have morex information, but now for some reason many memories have morex information and for this reason the trigger was not triggered in almost most of the memories, the morex query was removed. Also, the slang did not represent the memory item.

02-12-2024, raydie
- Added: Add LAYER_SPELL_Explosion for use delayed explosion spell. Now if set Duration to spell explosion, these duration is the delay to execute the explosion (From UOGuide, explosion spell: 2 second delay between targetting and explosion).

3-12-2024, canerksk
- Added: New trigger @HitReactive Reactive Armor plays a key role in the action mechanism and is currently under very fixed rules. It has been added as a new trigger with some variables to make it a bit more flexible.
	@HitReactive
	Local.Sound (r/w) =Sound ID, If it is blank or zero, no sound is produced. (Default: 01F1)
	Local.EffectID (r/w) = Effect ID, If it is empty or zero, no effect will occur. (Default: 0374a)
	Local.Damage (r/w) = This is the more1l, or PolyStr, value coming from the reactive armor spell to i_rune_reactive_armor.
	LOCAL.ReflectDamage (r/w) = The amount of damage that will be reflected to this other party
	LOCAL.ReduceDamage (r/w) = Amount to be deducted from damage received
	LOCAL.DamageType (r/w) = Type of damage received (Default: DAMAGE_FIXED andDAMAGE_REACTIVE)
	NOTE:
		1. If no ReflectDamage or ReduceDamage values ​​are entered, the system defaults to the Reactive Armor Effect value.
		2. No damage amount can be less than 1.

4-12-2024, canerksk
- Fixed: Sphere crash troubleshooting if a player has no CHATNAME value and remove a channel.

6-12-2024, canerksk
- Added: LOCAL.WOPTalkMode in @SpellCast trigger and ini setting WOPTalkMode.
    In some clients, different operations can be performed based on this. For example, if this talk mode was sent from Sphere as TALKMODE_SPELL, the operation is performed according to the client version. The possibility of changing the talk mode according to the client version used is now provided. By default, TALKMODE_SPELL.

    Default talk mode: TALKMODE_SPELL = 10

    Sphere.ini:
    WOPTalkMode = 0/14

    Trigger:
    @SpellCast
    Local.WOPTalkMode = 0/14

    TALKMODE_SAY        = 0  // A character speaking.
    TALKMODE_SYSTEM     = 1  // Display as system prompt.
    TALKMODE_EMOTE      = 2  // *smiles* at object (client shortcut: :+space).
    TALKMODE_ITEM       = 6  // Text labeling an item. Preceded by "You see".
    TALKMODE_NOSCROLL   = 7  // As a status message. Does not scroll (as reported by the packet guides).
    TALKMODE_WHISPER    = 8  // Only those close can hear. (client shortcut: ;+space).
    TALKMODE_YELL       = 9  // Can be heard 2 screens away. (client shortcut: !+space).
    TALKMODE_SPELL      = 10 // Used by spells.
    TALKMODE_GUILD      = 13 // Used by guild chat (client shortcut: \).
    TALKMODE_ALLIANCE   = 14 // Used by alliance chat (client shortcut: shift+\).

08-01-2025, DavideRei
- Fixed: NPC FLEE action didn't work because it was using action target (empty) instead of fight target

28-02-2025, canerksk
- Added: Add OpenDoorMacro and World Search Distance as Local Variables to @UserExtCmd Trigger
	LOCAL.DoorAutoDist <distance> (R/W). Default Distance = 2.
	eg;
	@UserExtCmd
	Serv.Log <DLOCAL.DoorAutoDist>
	Local.DoorAutoDist=10

28-02-2025, Nolok
- Fixed: failing assertion if targeting a non-corpse object when casting Animate Dead spell.

09-03-2025, Nolok
- Fixed: If Giant Spiders and Fire Elementals are denied going into sleeping state into a sleeping sector, their dropped items (ie. i_spider_web) went into sleeping state and didn't decay, leading to accumulation (partial fix for Issue #1249).
  Also, stamina wasn't consumed, thus NPCs had no limit in placing those items.

11-03-2025, Nolok
- Added: log message with informations about the newly created object, if just placed in a sector exceeding complexity threshold.

15-03-2025, Nolok
- Fixed: when using the ini setting ItemTimers=1 (enabling items to tick even if inside a container), the items kept ticking even after a char logout.
- Fixed: when using the ini setting ItemTimers=1, items ticked on npcs ridden by a disconnected char.

22-04-2025, Mulambo
- Added ini settings:
	// Display more bounce messages when drinking potions, fishing, crafting etc. (Old sphere behaviour).
    VerboseItemBounce = 0 // (default)

22-04-2025, canerksk
- Added: New item function, CARVECORPSE: carves a corpse with SRC = char carving the corpse.
- Added: New ini RevealFlag setting REVEALF_ONHORSE, to allow or disallow stealth walking if you are on a mount.
- Added: new ini CombatFlags setting COMBAT_ATTACK_NOAGGREIVED.
	In the old behavior (55i/55r/56b/56c) we were not guilty when we hit a murderer. Now when we attack a criminal or murderer we are guilty towards that person. An ini setting option has been added for this behavior. Although this is a normal behavior in OSI, it can be perceived as a problem since not every server designs games like OSI.

03-05-2025, Nolok
- Changed: Retrieving the MORE1/2 of items with the flag CAN_I_SCRIPTEDMORE will always return the raw numerical value.
    This allows using the full numerical range available.

03-05-2025, canerksk (from PR #1319), Nolok
- Added: New optionflag OF_PetBehaviorOwnerNeutral.
    If this setting is enabled, pets you own will appear to you with the original noto (pre-taming, old behavior). If this setting is not enabled, the assets you own will always appear natural to you. This setting only applies when the owning character is looking at the asset they own. It does not apply when someone else is looking at the asset you own.
- Added: OF_NPCMovementOldStyle, TAG.OVERRIDE.MOVESTYLE.
    Support for the old 0.56b NPC movement formulas with: OF_NPCMovementOldStyle ini setting and TAG.OVERRIDE.MOVESTYLE (to override the behavior for a single character).
    With that formula, among the other things, char MOVERATE property and TAG.OVERRIDE.MOVERATE will return to be the percent modifier of the speed of the NPC - the higher it is, the slower will the NPC be. Default is 100.

04-05-2025, Nolok
- Fixed: spell or skill defname reading from an object property.
When setting a property like MORE to the a spell or skill defname, trying to read it returned back the resource index (like the spell number) instead of the defname (Issue #1397)

05-05-2025, Mulambo
- Added: new command line switch `-I=/path/to/ini/`
    Allows you to define path to folder with ini files. Usable, when you want to separate binary from configuration or when running Sphere as Windows service (since services are usually run in C:\Windows\System32).
    Usage: Linux: `.\SphereSvrX64_debug -I=/etc/sphereserver/`, Windows: `SphereSvrX64_nightly.exe -I=C:/sphere/` (trailing slash required).

08-05-2025, Nolok
- Added: NPCWanderingLookAroundChance ini setting and TAG.OVERRIDE.LOOKAROUNDCHANCE.
    It allows to change the chance that a wandering NPC will analyze its surroundings for the current step. This also means that the trigger @NPCLookAtChar will fire more frequently.

16-05-2025, Mulambo
- Changed: When equipping item by dragging or using Dress macro, the item layer is now showing actual layer of the object in EquipTest and ItemEquipTest trigger (instead of 31 = LAYER_DRAGGING). This is the same behaviour, as equipping by double clicking.

22-09-2025, Mulambo
- Changed: NPC Breath Damage (brain_dragon) is no longer capped at 200, but can go up to approx 65535.

24-09-2025, Mulambo
- Added: ARGN3 for trigger @PersonalSpace [R/W], allowing to bypass maximum stamina requirement (default 1 = require maximum stamina) when stepping over players.

26-09-2025, Mulambo
- Changed: When the party leader gets disconnected (or deleted), new party leader is appointed, instead of disbanding the party.

30-09-2025, Mulambo
- Changed: Login rejection (packet `0x82`) is now sent to all clients trying to log in (used to be only to clients, that Sphere could identify).

03-11-2025, Nolok
- Fixed: Corner cases issues with number parsing from scripts (Issue #1448).
- Fixed: Function call stack messed up ordering.
- Fixed: Wrong script line pointed to in console log messages.
- Fixed: Changing Char flags didn't always trigger a full update packet.
- Fixed: Sector indexing issue.
- Changed: Made both Windows and Linux load scripts in a folder in alphabetical order.
- Added: "Old VarDef value..." log message when overwriting a DEF value during startup in debug builds (Issue #1437).

17-11-2025, Nolok
- Fixed: CAN_O_NOSLEEP was not considered/honored at server startup (Issue #1440).
- Fixed: Chars not always going in sleeping state when appropriate (Issue #1249).
- Changed: Object timers are now saved in worldsave files as TIMERMS, to avoid ambiguity and reliance on git build number to
    determine if TIMER expressed a number in seconds or milliseconds.
- Changed: Added 5 seconds timeout to DNS hostname resolution at startup (avoid getting stuck when connectivity is enabled but not working).
- Changed: CANMASK formatted in worldsave files as hexadecimal number, instead of decimal.

2-12-2025, canerksk
- Changed: Duplicate message deleted. (Issue #1519).

3-12-2025, Nolok
- Fixed: Items were always put into 'sleeping' ticking state when moved inside a container (Issue #1272).
- Fixed: Failed assertion when a char speaks in a sector with a communication crystal and other items (Issue #1429).
- Fixed: "Old VarDef value..." log message being shown while resyncing a file even if the VarDef (DEF) didn't change (Issue #1437).
- Fixed: Str_To* methods (for string to number conversion) didn't correctly parse a single '0' if interpreting it as a hex number. This caused also 'mobtypes.txt' to not being parsed correctly.
- Added: SERV.MAP.n.SECTOR.n returns 1 if the sector number is valid, 0 otherwise.
- Added: Clear Console entry on taskbar icon of sphere console window on Windows OS (Issue - feature request #1516).

4-12-2025, Nolok
- Fixed: Malformed spell flags being returned via scripts.
- Fixed: REGION ISEVENT didn't (always?) find REGIONTYPES.

09-03-2026, Mulambo
- Changed: Debug DEBUGF_WALK now works only for players (was for monster too), to increase readility in logs.
- Changed: Improved OpenDoor Macro (Issue #1510) to use following formula with priorities (1 is best, 5 is worst, arrow is player facing):
    5|4|4|4|5
    5|3|↓|3|5
    5|2|1|2|5
    5|3|2|3|5
    5|5|4|5|5
- Added: Exposed skill effect (local.effect, I/O) in @start and @skillStart triggers (usable for changing the value with some formula, rather than range / flat value from skill effect property.
- Added: Automated Debian package on master brach. Debian packge is currently not meant for production and needs testing (especially updating).
- Fixed: Curing character with item as the caster crashes sphere (Issue #1549)
- Fixed: Animate Dead spell crashing Sphere (Issue #1548)

11-03-2026, Mulambo
- Added: New experimental flag EF_WalkBypassMonsters. This will override hardcoded client behaviour that prevents stepping over NPCs without max stamina (like GM can). However, this could cause flickering or lags to clients and should be used with caution.

16-03-2026, Mulambo
- Fixed: Issue with loosing target when somebody dies in combat (#1559)

17-03-2026, Mulambo
- Modified CombatHitChanceEra:
  - Fixed: IncreaseDefChance on AOS formula (2) is now properly calculated from defender, not the attacker.
  - Fixed: Hit chance to paralyzed targets with sphere custom (0) formula is now 80-100% (was 0-10%).
  - Added: Implemented Hit chance increase / decrease to sphere custom formula (0).
- Fixed: Equiping armor and weapon with spelleffect could crash the SphereServer (#1538)

31-03-2026, Drk84
- Added: New locals for the @SpellEffect/@Effect triggers:
         local.IsSpellReflected (Read Only): Indicates if the spell was reflected because of the magic reflect flag.
         local.BypassMagicReflection (R/W): When set to a value above 0, bypass the magic reflection.

- Fixed: Poison buff was using the expired timer duration instead of the poison delay timer.
         Notice that the delay values of poison are hardcoded and you have to use addbuff function if you change the local.delay in @SpellEffectTick/@EffectTick

02-04-2026, Mulambo
- Fixed: Timer on field spells with `SPELLFLAG_FIELD_RANDOMDECAY` was incrementally increasing for each field item created.

19-05-2026, Mulambo
- Fixed: logging telnet commands (#1580).
- Fixed: when using invalid resource in corpses, error will be show in console (#1574).
- Changed: PacketObjectStatus (0x11) show percentual hitpoints for items and chars, just like packet 0xA1 (Hitpoints update) (#1573).
- Added: templates can now be used when carving corpses (#1574).

19-05-2026, nightNR
- Fixed: pre-AOS armor rating (AR) calculation (#1550).
- Fixed NPCs can't cast spells from spellbook after respawn (#1551).

23-07-2026, canerksk
- Added: New local variable local.Sound to @SpellFail/@Fail triggers (R/W). If you set local.sound = 0, no sound will be played.
