

01-12-2003, Kell
- Added @EquipTest and @ItemEquipTest (return 1 cancels equiping).
- Changed @SkillItemMake so that "return 1" only deletes the item if it's container hasn't
  been set.
- Fixed bug with skills apparently not finishing (also fixes cartography).
- Fixed summoning bug (Linux only). This has to do with doing propper memory initialization
  prior to using points.
- Removed all specific handling for SERV.xxx(y).zzz and made it generic. You can now use
  either syntax: SERV.xxx(y).zzz or SERV.xxx.y.zzz.
- Changed default release options for speed optimization.



02-12-2003, Kell
- Fixed REAPAMOUNT / AMOUNT. It can now take multi-point values in a format similar to
  ADVANCE for skills.
- Added SPEECHSELF= to sphere.ini, to allow setting the name of the speech trigger that
  should be called to intercept player speech. Suggested: SPEECHSELF=spk_player
  "return 1" in said trigger stops the player from actually talking.
- Removed hard coded "home home home" - one can just use the default spk_player speech if
  that feature is desired (but mostly it's not)
- Added SPEECHPET= to sphere.ini, to allow setting the name of the speech trigger that
  is called when a pet listens to its master. "return 1" in said trigger stops the pet
  from listenning.



---- SphereServer R3.12 -------------------------------------------------------------------------
09-12-2003
- Added TAGs to CHARDEF/ITEMDEF sections. If a TAG does exists at an instance it overrides
  the def value.



10-12-2003, Kell
- Added OptionFlags to sphere.ini, to set multiple options. These will be named OF_
- Added OF_Magic_IgnoreAR = 0001, so that AR doesn't count to stop damage spells.
- Added ACTDIFF to characters to obtain the current action difficulty.
  Suggestion: One can use ACTDIFF to modify difficulty within skill Start triggers.
- Added @Effect trigger to spells, triggered after @SpellEffect
- <TAG0.xxx> can now be used to assume "0" as the default value for a tag.
- TAG0.xxx = yyy can now be used, if yyy is 0, then no tag will be recorded (same as setting
  to a zero length string)
  Using TAG0, you can thus have tags that are only recorded if they are not 0. This is great
  for tags that are usually 0 and are often used (e.g. tags that must exist on all characters).
- Added VAR0 (same functionality as TAG0, but for VAR).



11-12-2003, Kell
- Added OF_Magic_CanHarmSelf = 0002, so that spells with SPELLFLAG_HARM will still affect the
  caster (useful for SPELLEFFECT in scripts)
- Changed rand(x) to allow a 2nd parameter rand(x,y) and return a random number between x and y,
  if y is present.



12-12-2003, Kell
- You can now use @color,font in SYSMESSAGE and MESSAGE. font ranges from 0 to 9, and I quote:
      FONT_BOLD,	// 0 - Bold Text = Large plain filled block letters.
      FONT_SHAD,	// 1 - Text with shadow = small gray
      FONT_BOLD_SHAD,	// 2 - Bold+Shadow = Large Gray block letters.
      FONT_NORMAL,	// 3 - Normal (default) = Filled block letters.
      FONT_GOTH,	// 4 - Gothic = Very large blue letters.
      FONT_ITAL,	// 5 - Italic Script
      FONT_SM_DARK,	// 6 - Small Dark Letters = small Blue
      FONT_COLOR,	// 7 - Colorful Font (Buggy?) = small Gray (hazy)
      FONT_RUNE,	// 8 - Rune font (Only use capital letters with this!)
      FONT_SM_LITE,	// 9 - Small Light Letters = small roman gray font.
- Changed SKILLMAKE to allow getting an individual resource in the list. SKILLMAKE.1 gets the first,
  SKILLMAKE.1.VAL gets the value and SKILLMAKE.1.KEY gets the associated resource key.



14-12-2003, Kell
- Changed ATTACK to accept as parameter the UID of the character to attack.
- Changed TRY to make no plevel or touch/distance checks. Use TRYP if you want those checks
  (TRYP 0 only checks for touch/distance, not plevel).
- Added an useful keyword to scripts, that allows one to use "OBJ" as pointer to an item. It's
  similar to ACT but it can be used anywhere. 
  Example:
     OBJ	= <UID>
     SAY You are <OBJ.NAME>, with uid <OBJ.UID>.
- Changed MEMORY to allow an UID as parameter, so you can now find the memory related to a specific
  UID. If no argument is used, it uses SRC's UID as usual. Also changed it to be read/write.
  Example:
     MEMORY <SRC.UID> 0200	// set memory 
     SAY Memory flag regarding <UID> is <MEMORY.<SRC.UID>>.


13-12-2003, Kell
- Added "RELEASE" to character verbs, does the same as "release" when spoke to a pet.
- Added @NPCFollow trigger, called when an NPC is following someone.



15-12-2003, Kell
- Changed @UserSkills so that <argn1> is the number of the skill being updated, or -1 for the skill
  list. This allows one to stop sending of skill updates to the client.
- NPCs will not say "Yes Master" if SPEECHPET is set in sphere.ini (you can script it in the speech
  triggers if you want them to). If SPEECHPET isn't set, they still won't say anything unless they
  can see their master (which is great for GMs). Players will no longer respond "Sorry".
- Resource gathering was changed so that the SKILLMAKE of the resource item is checked. Resources
  which fail the canmake check are ignored and aren't part of the randomization process. If for some
  reason one wants to go back to the old style, just comment SKILLMAKE on the ore itemdefs.
- @Step on items returning 1 will  now cancel movement to that area. Still, for coherence, all other items
  in that location are still activated.
- Added OF_Skill_DiffFirst = 0008. With this flag turned on, difficulty for a skill is calculated BEFORE
  calling @Start/@SkillStart. This has the advantage of allowing the difficulty for a skill to be changed
  via ACTDIFF within that trigger. Notice that for a skill to fail, ACTDIFF must be set above the current
  (modified) skill. Setting ACTDIFF to a negative value means that the skill will abort, that is, @Fail
  will not be called and no skill gain will be attempted. To always fail set ACTDIFF to a value above the
  possible skill (say, 1001).
  This has the sideffect of calling @SpellCast before @Start/@SkillStart. On the other hand, it is the
  ultimate tool for implementing your own skill difficulties.
  Here's an example of making the difficulty for arms lore AT LEAST the same value as for making the item
  (using the primary skill). Characters with skill above ACTDIFF will always succeed.
  ON = @Start
   if ( <SRC.ACTDIFF> < <SRC.ACT.SKILLMAKE.1.VAL> )
      SRC.ACTDIFF	= <SRC.ACT.SKILLMAKE.1.VAL>
   endif



16-12-2003, Kell
- You can now use NEWITEM, NEWNPC and NEWDUPE in item scripts, the items will be created into "NEW". Using
  these commands on a character will create the items in both NEW and ACT. If you want to use these
  on a character without changing ACT, use SERV.NEWITEM, etc.
  Example:
    NEWITEM i_gold
    NEW.AMOUNT 100
    NEW.P	= <TOPOBJ.P>
  You can also use NEW as a temporary handler, much like you can use OBJ (and to an extenct, ACT).



17-12-2003, Kell
- Functions can now receive "args" when being evaluated, as in <SRC.myfunction Say hello>
- Added RANGE=min,max or RANGE=max (min defaults to 0) for ITEMDEF and CHARDEF. Default weapon range
  is 1. Default character range is 1. Range is calculated as (character + weapon -1). 
  Example: Assuming all characters are RANGE=1 (which they are), putting RANGE=2 in an halberd
  means characters equipping it can hit 1 square further.



18-12-2003, Kell
- The main section for DIALOGs is now fully interpreted like other scripts, allowing you to add logic
  to your dialog, use IFs, etc. The only limitation at the moment is that gump commands are only 
  allowed right in the DIALOG section, and not within FUNCTIONs, but hei... it's better. :)
- Dialogs will no longer conflict with each other, this allows for permanent on-screen dialogs. INPDLG
  works too, seeing as there can be only one INPDLG window onscreen at all times.
- Added RESOURCES.n, RESOURCES.n.KEY and RESOURCES.n.VAL to items/characters.



19-12-2003, Kell
- To make writing dialogs easier, added a cursor and relative coordinates:
     dorigin 50 50	// sets the origin to x=50, y=50
  Using "*" near a coordinate makes it relative to the origin, and displaces the origin by some amount:
     dtext     *0    *10    0    the origin is now x=50 y=60, so is the last location
  Using "+" near a coordinate makes it relative to the last location w/o changing the origin.
     dtext     +10     -    0    adds 10 to X (y=150, o.y=100)
  As an example, imagine writing a list of text with 3 columns, each seperated via 200 x and 20 space
  between each row:
  dorigin 10 10
  // first row
  dtext     *0   -    5   1:
    dtext  +10   -    0   the text for row1, col1
  dtext   *200   -    5   2:		// x orig = 200
    dtext  +10   -    0   the text for row1, col2
  dtext   *200   -    5   3:		// x orig = 400
    dtext  +10   -    0   the text for row1, col2

  And now one only has to go down one row. and the text is quite similar. This isn't too easy to explain, it's
  there for whomever might find it useful. If you can't think of a use for it, just ignore it. ;)
- Fixed the bug with FORCHARS/ITEMS/OBJS and keywords starting with "FOR" (like FORensics).
- Changed textadd and gumptext to collapse equal strings of text to the same index. So if you use
    gumptext 10 20  This is an example.
    gumptext 10 40  This is an example.
    gumptext 10 60  This is an example.
  It will only generate ONE text id. This does away with the need to have a seperate TEXT section. Granted,
  such a section is still useful for keeping strings all in one place (in this case it'd be useful), but it
  is no longer mandatory, it becomes simply a matter of style/choice.



20-12-2003, Kell
- Equal PLEVEL should be able to see each other, so they are now.
- You can now open a dialog in a specific page, with DIALOG  d_dialog_name  pagenumber. This isn't actually
  possible with the UO client - what it does is recalculate the dialog page/button numbers so that the selected
  page is first. It's completly invisible though, and works perfectly.
- Added a new command - DTEXT - to gumps, which does the handling of text ids for you (d stands for dynamic):
     dtext x y color  Actual text comes here.
  Text added with gumptext is actually added to the [DIALOG ... TEXT] section. If you're only using a given
  text string once, then it's actually faster using this than using "text" and adding it to the TEXT section
  of the dialog. Simmilar commands, DCROPPEDTEXT and DTEXTENTRY are also in, also taking text instead of an
  index. DHTMLGUMP is also in, but notice that the syntax is like HTMLGUMP, except that you ommit the ID and add
  the text in the end.
  With these changes, you can completly ommit the [DIALOG ... TEXT] section of dialogs. Only those strings
  that are commonly used throughout the dialog should you put in the [DIALOG ... TEXT] section.
  Internally, both gumptext and textadd simply add stuff to the dialog as needed, and send normal "text"
  commands to the client, so they're safe to use. But they free you from having to keep track of a LONG
  list of numbers, and allow you to shape and modify your dialog w/o bothering with text ids.
- You can now use FUNCTIONs that issue gump commands. So you actually make your own gump commands!!! Death to
  copy & paste dialogs!



21-12-2003, Kell
- Fixed a bug in that setting stats & skills via scripts wouldn't correctly parse things. For instance, numerical
  expressions.
- Started work on MANUAL.TXT, to detail the current state of things like triggers and their arguments, seeing as
  reading this changelog is probably a difficult task for a lot of people.
- Changed args in functions to be writeable. This is useful in scripts, but for triggers, the server will read
  back the values and use the new ones wherever it makes sense. For the time being, these triggers were
  changed:
     @GetHit, ARGN1 is the damage being apllied, ARGN2 the damage type (as usual, but now writeable). 
     @Hit, ARGN1 is now the raw damage being applied, prior to armour (writeable). ARGO is the weapon (if any).
     @PersonalSpace, ARGN1 is the stamina required to move (writeable). "return 1" stops the movement, "return 0"
     allows the movement but shows none of the hard-coded messages. Plain "return" or no return, works as standard.
  @Hit, @HitTry and @HitMiss were also changed so that ARGO is the weapon being used (handy so you don't have to
  be looking at layers n stuff).
  I should add that ACTDIFF is also available, and it can be used to change the difficulty of a skill, even make
  a skill succedd that would otherwise fail (by setting it to 0). It can also be used in @HitTry now, and if
  set to any non-negative value, a missing hit will instead succeed.
- Added StrEat function, which removes a word up to the space, from a string (<streat("hello there friend")>
  or <streat hello there friend> return "there friend")
- Added <SERV.LOOKUPSKILL skill name> which returns the skill number for some text or -1 if not found.
- After some beta-testing, a few fixes to dialogs.
- LOCAL.xxx within functions for LOCAL . They're a bit more efficient on servers with lots of global
  vars due to faster lookups ). LOCAL variables always come up initially as "0".
- ARGN1, ARGN2 and ARGN3 are set for functions with numeric arguments. So whenever possible, use these instead
  of argv. Example: "myfunction  123 50 89" - these 3 values will be parsed into argn1, argn2 and argn3



22-12-2003, Kell
- Functions can now return strings using "return". Notice that this behaves like TAGs, in that if you do
     return 2+2
  then "2+2" is returned, and not "4". You'll have to explicitly call "eval" on what you want
  to return:
     return <eval (2+2)>
  Returning strings causes no extra lag, seeing as the old method of returning a value relied on the same
  string which is returned (EVALed). So it is actually faster (although hardly noticeable).
  This might pose a problem problem if you have "return rand" or similar, instead of "return <eval rand..."
  seeing as multiple uses of the return value re-evaluate it, generating a new random number - again,
  similar to TAGs.
  MAKE SURE YOU HAVE "EVAL" on your "return" lines, wherever you want the result of a calculation to be
  returned. The next version will probably not have an EF_ReturnString flag.

- Modified the profiling function to keep track of average consumption over time. The average time is
  calculated each second as 90% of the previous average time plus 10% the current time. This poses some
  resistence to spikes. 
- Added a new keyword to @Create / @NPCRestock and template scripts: FULLINTERP. Set FULLINTERP=1 to allow the
  use of functions, ifs, etc. Example:
  ON = @NPCRestock
     ITEM=i_cape
     FULLINTERP
        ITEM=i_robe
        MY_FUNCTION_CALL
  You can use FULLINTERP 0 to disable the feature, after you've enabled it, but it's usually pointless, seeing as
  this FULLINTERP affects only the remainder of the current script. Bear in mind that the usual restrictions apply,
  seeing as the created NPC is not ingame yet.



23-12-2003, Kell
- Added access to TERRAIN and STATICS either via P.key, MOREP.key or SERV.MAP(x,y).key, with key being one of:
    TERRAIN	The terrain ID
    ISDIRT	Checks the terrain ID to see if it's dirt.
    ISGRASS	guess
    ISROCK	dunno
    ISWATER	guess again
    STATICS	Number of statics in the position
    STATICS(n)	ID of static Nth static ( eg: <SERV.MAP(200,300).STATICS(0)>. Shows no error in the console
		if static isn't present, returning 0 - useful to test for a static w/o counting or looping.
    STATICS.n	  same
    STATICS(n).key	Get a key from the appropriate ITEMDEF. eg: <SERV.MAP(200,300).STATICS(0).NAME>

- Added basic iterator construct, WHILE, with the following syntax:
     WHILE ( condition )
	// do stuff, current iteration number in <LOCAL._WHILE>
     END // or ENDWHILE

  also added FOR, terminated with either END or ENDFOR, with the following syntax:

     FOR 5	// loops from 0 to 5, current iteration number in LOCAL._FOR
  or FOR 3 5	// loops from 3 to 5, current iteration number in LOCAL._FOR
  or FOR K 5	// loops from 0 to 5, current iteration number in LOCAL.K
  or FOR K 3 5	// loops from 3 to 5, current iteration number in LOCAL.K
	// do stuff
     END  // or ENDFOR

  Changing these LOCAL variables has no effect on the loop.
- Wrote a small assembly function to access the high resolution timer. Works for both windows and Linux,
  now being used in profiling. Profiling works on Linux now. It also looks a lot better in the console
  thanks to the monospaced font.
- Changed the console font under Windows to Courier, which is monospaced, so things come out aligned in
  the console. Under Linux, the console is naturally monospaced.
- You can now add new SKILL sections, up to 70. SERV.MAXSKILLS tells you how many skills are loaded. Notice
  that they won't be sent to the client though, the client doesn't support them (hint: @UserSkills). There
  is also a FLAGS key for SKILL section, with the following values:
     [DEFNAME skill_defs]
     SKF_SCRIPTED	01	// no hardcoded behaviour, only triggers are called.
     // feel free to add new tags you find useful, but only above 01000 please, to make room for future
     expansion
  This is heavily experimental, mess with it at your own risk.
- SKILLSELECT skill - force a button select event on the skill list


24-12-2003, Kell
- Fixed TYPEDEFS section in spherefs.scp loosing values when resynced.
- Added <CANMOVE dir>, takes a direction as argument (like WALK), returns the area ID we're moving to,
  or 0 if no move is possible.
- Added <MOVE dir>, takes a direction as argument (like WALK), returns the TILE flags for that position.
  Notice that flag 04 is walkable. Here's a list of flags, you can copy&paste it into spheredefs.scp. This
  keyword might change in the future.
- It's Xmas! So I'm off to eat some turkey for the next 48 hours. :) Does this count as an entry in the
  changelog?


---- SphereServer R3.13 -------------------------------------------------------------------------

27-12-2003, Kell
- Added support for color & render mode in EFFECT. If no color or render effect are specified, old
  effect packet is still sent (which spares 8 bytes). Otherwise the new packet type is sent. Tested
  and works with clients from 2.0.3 (should work on all 2.0.* series).
- Consolidated support for 3.0.* clients, they should work fine, up to LBR (they already worked, just
  spitted some error messages).
- Added modulus (%) operator in numerical expressions (eg: 12 % 3 == 0).
- Added SENDPACKET command for clients. To make it easier to send WORD(2 bytes) and DWORD(4 bytes) values, 
  allowed for 'W' and 'D' prefix to values ('B' is also supported for byte but it's redundant). Here's an
  example, of setting light level:
     SRC.SENDPACKET   04e  D<SRC.UID>  20
  Both 04e and 20 could use the prefix B, but notice how <SRC.UID> uses the prefix D to specify it takes
  the space of a DWORD (4 bytes). So much for complex scripts to break multi-byte stuff in bytes :p
  Notice also that each of the parameters is evaluated and truncated, and only then used. For instance,
  if you put 0fffffffe (which obviously isn't a byte) in place of a BYTE, what you'll get is effectively
  0fe. If you put (2+2) it'll be evaluated to "4" before being used.



28-12-2003, Kell
- Added OSTR, ODEX, OINT.
- Added MODSTR, MODDEX, MODINT - spells affect these.
- STR, DEX and INT are always equal to O + MOD (for the relevant stat). If you have OSTR=50, MODSTR=0 and
  then do STR=60, you will get MODSTR=10 (and OSTR unchanged). 
  *** CHANGED *** read the entry for 19-01-2004
- Added MAXHITS/MAXMANA/MAXSTAM. If set to 0, it defaults to the base max stat (eg, MAXSTR defaults to STR).
  MAX always contains MOD for the appropriate stat. That is to say that if you have MAXHITS=100 and MODSTR=10
  then internally it'll be recorded as MAXHITS being 90, and if MODSTR changes, so does MAXHITS. This makes
  it coherent for stat spells, seeing as they not only change your stats but also max hits/stam/mana.
  To make hits depend on STR again, use
     MAXHITS =	// don't use a value
- You can now write TAGs on accounts. Both TAG and TAG0 are available.
- LOCAL._WHILE fixed, within WHILE loops.
- Changed dialog BUTTON sections to allow 
     ON = min max
  to grab any button with buttonID between min and max (including). Also, argn1 is the buttonID that
  actually got selected (even when specify just a buttonID and not a range, as usual). With the buttonID
  in argn1 you can write more generic functions with little fuss.



29-12-2003, Kell
- Fixed some skills not getting currectly terminated when another skill was used before they finished. An
  example of this is Spells not fizzling when a skill was used before spell ended.
- For skills, @Fail is now only triggered when failure occured due to normal circumstances (eg, failed
  difficulty). @Abort is called when failure occurs due to a situation that aborts the skill, such as
  using a new skill before finishing the previous one or an invalid circumstance.
  If @Fail is triggered, it means that the character will still get a skillcheck for failure (skill raise
  through failure), but if you do a "return 1" in there, it won't (check MANUAL.TXT).
- Started implementing propper behaviour for EF_CanSeeLOS. At the moment, it'll check the height of static
  items in the path to the target.
- The use of "SECTOR" to access keywords related to sector is now mandatory. So, to access "light" or
  "rainchance", SRC.RAINCHANCE used to work, you must do SRC.SECTOR.RAINCHANCE. This has several
  advantages - people usually already use SECTOR anyway, so this makes for faster faster execution of
  commands on characters, seeing as it has less things to try. It is also more coherent.


30-12-2003, Kell
- Fixed a small problem with KARMA/FAME that had the huge effect of blocking the client once it got different
  than 0.
- Added FEATURES= to sphere.ini, to define the features the server will enable on the clients upon connection:
   0001 - (T2A) enables chatbutton
   0002 - (LBR) enables LBR sound (plays MP3s instead of MIDI)
   0004 - (T2A) enables T2A update
   0008 - (LBR) enables LBR update (shows monsters)
  Standard .55i automatically enabled 0001 - but you could disable it.
- DIALOGCLOSE command. First argument is the dialog name, second argument is the button that should be
  triggered on the dialog - 0 if not specified. (eg: DIALOGCLOSE d_my_dialog).
  You can put this as one of the first commands in a DIALOG section, to ensure there is only one dialog of
  that type on the client.


---- SphereServer R3.14 -------------------------------------------------------------------------

02-01-2004, Kell
- Added connection control keywords to sphere.ini - a value of 0 disables
  any of these settings. These settings are not dumb proof. Make sure you
  know what you're doing if you set these:
  * ConnectingMax=x, where x is the maximum number of clients that can coexist
      in non-game state (http, login, etc). Older clients that are not ingame
      get disconnected when new ones come in. Default: 24
  * ConnectingMaxIP=x, as above, but per IP. Only a maximum of x simultaneous
      "not in game" connections will be allowed per IP. Notice that HTTP
      requests for instance, count as "not in game". Default: 8
  * ClientMaxIP=x, maximum number of connections per IP. This is intended to
      stop flooders, DO NOT SET THIS TOO LOW, or you risk looking stupid. There
      are MANY situations where connections can appear as comming from the same
      IP - a common one is people connecting from cybercaffes. Default: 0
- Fixed a serious bug where login errors (Bad Login) could leave a lingering
  socket. This happened because sockets were made invalid so that they'd get
  closed on the next read cycle, therefore losing all information about the
  socket. Clients are now flagged for disconnection, and socket handling is
  done when clients are freed.
  This means that there should always be a "disconnected" message to pair
  with a "connected" message.
- You will see two numbers after the IP in connected/disconnected messages.
  The first is the number of connections from that IP which are not in-game,
  whereas the second is the total number of connections from that IP.
- In savefiles, OSTR and MODSTR are now saved instead of STR. If "STR" is found,
  it'll be interpreted as OSTR. This works fine to convert old worldfiles, even
 if you have spells, because once they wear off they'll simply make your MODSTR
  negative. This works for all stats obviously (simply using STR as an example).
- Changed it so that the first time you set a stat on an NPC, if the Ostat is 0,
  it'll update Ostat not MODstat. In other words, and as an example, if you do
  STR=20 in @Create, you'll end up with OSTR=20 and MODSTR=0. If you then do
  STR=30 on the same NPC, you'll end up with OSTR=20 and MODSTR=10. 
  **** changed **** see the entry for 19-01-2003
- Fixed a small problem from R3.13 with stat affecting spells not setting MODstat
  correctly.


03-01-2004, Kell
- Added unary operators "*=", "+=", "-=", "/=", "%=", "|=", "&=" and "!=". Internally,
  what these actually do is change a line in the format:
    XXX += YYY
  to
    XXX = <eval (<XXX> + (YYY))>
  So you can do stuff like
    MANA	+= 10/2			// same as MANA = <eval (<MANA> + (10/2))>
    ATTR	&= ~attr_magic		// same as ATTR = <eval (<ATTR> & (~attr_magic))>
- Added ".=" operator, to do string concatenation. Internally what it does is change a line
  in the format
    XXX .= YYY
  to
    XXX = <XXX>YYY
  This is intended to be used with things that can support strings (NAME, TITLE, VAR, LOCAL, etc)
- First attempt to implement propper LOS check counting with z. To have LOS, you must be
  able to walk in a straight line to the target (no news here) AND finish at a reasonable
  height, climbing your way to it. So, if you're on a slope you might have LOS, but if
  you're standing one floor below you won't. These extra texts have no measurable impact on
  performance Enable this behaviour with EF_CanSeeLos (04).
- Diagonal walking (eg, NW) is allowed only if the character can move ortogonally in both
  directions (NW -> N and W). This takes care of a few clientside exploits, as well as NPCs
  walking through corners. Enable this behaviour with EF_DiagonalWalkCheck (010)
- For the effect of stepping on them, all items were considered to have a height of 3. If you
  standed higher than 3 above an item, you wouldn't trigger a step on it. Changed it so that
  if the item's height is above 3, that value is used, and not the hardcoded "3". This allows
  one to get @Step events on stuff like tables.
- If no SRC is defined at the time of a @SpellEffect trigger, then the character subject to the
  spell will be considered the SRC. This fixes SPELLEFFECT under @Timer triggers.
- Added @NPCLookAtChar and @NPCLookAtItem triggers (check the manual). Do not abuse of these
  triggers, as they will affect the CPU usage.


04-01-2004, Kell
- Added ISNEARTYPE, first argument is type, 2nd argument is max distance to search ( if not
  specified, 4 is the default ). Also added ISNEARTYPE.P, which returns "0" if false or the
  point coordinates if true.
- Changed DISTANCE to accept the UID of an object (item/char) to compare the distance, or a
  point. One can now write things like
     <DISTANCE <MOREP>>  <DISTANCE trinsic>  <DISTANCE <SRC.ACT.UID>>
  If no argument is supplied, then SRC.UID is used (as default). If the point/UID is invalid
  an error is printed to the console.
- Made TIMERD readable (its precision is 10x that of TIMER, same scale of SERV.TIME).
- Made USEITEM not check for visibility. The whole purpose of this keyword is to allow
  activating an item via scripts w/o testing for touch, so it doesn't make sense to test
  if the item can be seen. DCLICK performs the usual tests though. The "USE" keyword already
  allowed one to do "USE 0" not to test for touch, but it also tested for visibility, and it
  won't anymore if used like "USE 0".
- Spawns gems now instantly update the display as soon as you set MORE1.
- Double clicking an already negated (more2=0) character spawn sets its timer to 1 so it
  respawns next turn.
- Added MOVENEAR keyword for objects(items/chars). 1st argument is the UID of item to move
  near to, 2nd argument is the distance to the item. If 3rd argument is present and "0",
  then the item will not send an Update. Example:
     ON = @DClick
        MOVENEAR <SRC.UID> 5	// move to 5 steps away from SRC
  Notice that this movement respects walls & such (which is why it is useful).
- Set ARGN1=1 in @Login not to show MOTD scroll.


---- SphereServer R3.15 -------------------------------------------------------------------------

05-01-2004, Kell
- Fixed possible exploit with \n and textentry and inpdlg.
- AREA and ROOM sections in the following format
     [AREA name here]
  Should now be written as
     [AREADEF a_some_def]	// ROOMDEF for rooms
     NAME=name here
  The advantage of this format is that you can resync it w/o having conflicting regions.
  Suggestions:	Keep your areas in different formats in seperate files. Either find a script
		to convert your old format to the new one or slowly convert by hand.
		Move [Teleporters] and [Moongates] to their own files (these can't be resynced).
  Note:		You do NOT have to use the new format. It is, however, strongly suggested, as
		it allows you to change an area without rebooting.
		Any future ability to save things on regions will only be available for regions
		in the new format (or regions that have a DEFNAME).
- Added CALL instruction to invoke a function, but sharing the LOCAL variables with the called
  function. Quite useful when you want to break a function in small pieces that are logically
  yet not functionally seperate. In other words, if you invoke a function with CALL, all your
  LOCAL will be available to the underlying function. Example
    [FUNCTION myfunction1]
       LOCAL.VAL1	= 12
       CALL myfunction2 1, 2		// LOCAL.VAL1 will be available to myfunction2
       // if myfunction2 changes LOCAL.VAL1 it will change here aswell.
  If you do not pass arguments to the called function, then args/argn/argv are also shared,
  and the process is faster than invoking the function w/o CALL. If you pass arguments to the
  function, then only LOCAL is shared, and the process is an infinitesimal amount slower. Not
  noticeable, no real impact, but conceptually slower. 
  This can also be used as <CALL Function ...>, faster without arguments, slower with.
- Recently realized that ALL DEFNAMEs are put into VAR. That means that all itemdefs, chardefs,
  etc have an entry in VAR (try <VAR.i_dagger> ). Now, this is potentially confusing and source
  for many problems:
     1) Whenever you're trying to access a VAR, you go through ALL the existing defnames.
     2) You can accidentally create a var that is also a defname... and oooooops!
  So to cope with this, changed it so that VAR/VAR0 only contains global variables that can be
  modified, whereas DEF/DEF0 contains item defnames and can only be read. The difference in speed
  is visible! EVERY time you were accessing a VAR you'd be searching through an array with a few
  thousand elements. Now each lookup searches only through the variables your scritps have created
  (which even on an extremely scripted shard shouldn't reach a hundred).
  This also makes it possible to identify WHICH variables are supposed to be saved.
  Although this is a huge change internally, it won't affect scripts except in the following
  situation:
     1) You defined a DEFNAME flag in scripts that you then changed during execution. This is
        highly uncommon, but if you decide you need this sort of behaviour just create the create
        the VAR once via scripts, it will be saved to spherevars.scp.
     2) You were accessing DEFNAMEs via VAR. No real reason to do it, seeing as DEFs / VARs can
        be accessed w/o the VAR. prefix.
  If not using DEF or VAR to access a variable, you'll get first the VAR if exists, and then the
  DEF. That means that old behaviour is kept.
- VARs are now saved to spheredata.scp. If that file isn't present at boottime the shard will print
  a warning, but it will continue, and it'll be created on the next save.
- GMPages will now be saved to spheredata.scp. Too many people are interested in parsing these to
  make special stuff (eg webpage interfaces or mirc scripts), so now they won't have to parse the
  whole world to read in this stuff.


06-01-2004, Kell
- Added "S" flag to SENDPACKET, allows one to send strings of characters directly. String is not
  within quotes it stops at the first space. Example
     SENDPACKET 00 S"This is the string to send" 0
     SENDPACKET 00 SUpToTheSpace 0
  If the string must be null terminated, simply put a 0 in there, as above. Otherwise, you'll probably
  need to specify length (strlen function) - depends on packet
- Added new walk limiting code, wildly based on the bit-bucket algorithm used in IP QoS DiffServ
  routers: there is a maximum speed at which you can walk (it's fixed, different walking or foot). If
  you walk faster than that speed, every tenth of second you walk faster than expected is a point you
  loose. Every 10th of second you take above the time expected is a point you win. The number of points
  you start with and the maximum is WALKBUFFER in sphere.ini, and I've tested it with values
  around 40 for good connections and 70 for laggy connections.
  If a player speedwalks, he'll soon drop below 0, and stop moving, then have to compensate with equally
  slow walking periods, like it happens when there's a burst of lag.
  WALKREGEN is the speed at which you regen walk points, in percentage.
  Default values: WALKBUFFER=50   WALKREGEN=25
  Hints:
	WALKBUFFER	lower for more strict control. However, setting it lower also increases the
  			chance of limiting someone which is just experiencing lag. Raise this value
			if you lower WALKREGEN.
	WALKREGEN	set lower for longer-lasting punishments. It makes sense to lower this value
			if you raise WALKBUFFER.
- Removed some EF_ flags that are no longer necessary seeing as they proved to be harmless. Make sure
  you consult MANUAL.TXT.
- Changed trigger @DropOn_Item and @ItemDropOn_Item to be activated for container items too.
  Activated when item with the trigger is dropped on another item (dropped on something else).
- Added @DropOn_Self and @ItemDropOn_Self, activated when an item is dropped on the item with the
  trigger (something was dropped on self).
- Implemented trigger @DropOn_Char and @ItemDropOn_Char.
- If these triggers fail, will only bounce the item if it's still being dragged. That allows the
  scripts in the triggers to define a new place for item.
- Made sure clients can only drop stuff into the bankbox if they are standing in the place where it
  was opened. This could now be checked within scripts aswell.
- Fixed an Injection exploit regarding accessing the bank away from the place it was opened in.
- Added @SkillGain and @Gain triggers. Check MANUAL.TXT for more info.


07-01-2004, Kell
- Automatically assign a DEFNAME to areas and rooms defined in the old format (AREA / ROOM). This
  defname is built upon the NAME, and is made unique by adding a number to it.
- In the console, you can type "d a" to output all the areas and rooms to a file "map_all.scp". I
  strongly suggest you replace your map with this file, as it'll allow you to finally get rid of the
  old format.
  NOTE: Teleporters and Moongates aren't saved in this file, so you should split those to a different
  file, to allow areas to be resynced.
- It is strongly suggested that you do the above, and get rid of the old format areas/rooms. Doing it
  has the following advantages:
  * Loading will be faster, because the server won't have to try and find a good defname for areas.
  * You can edit areas, and resync (even change their name) with no conflicts.
  * TAGs on areas are only saved for areas that have a valid DEFNAME, so if you do this, TAGs will be
    saved on all your areas.
- Added @Targon_Cancel for items.


---- SphereServer R3rc1 -------------------------------------------------------------------------
08-01-2004, Kell
- SphereServer 55R3 Release Candidate 1 submitted.

---- SphereServer R3rc2 -------------------------------------------------------------------------

08-01-2004, Kell
- Fixed VERBOSE=1 causing a catrazillion errors at boot.
- .CAST and .TELE won't show "bad command" sysmessage when they fail.
- If TRY/TRPY are called with an invalid command, they will send the error to the console and not to
  the player. This is coherent with how scripts should behave.
- Fixed NPCs not starting with max stats when MAXxxx is used.
- Fixed .admin showing only your own IP.


09-01-2004, Kell
- .serv.account unused xxx  delete
- .serv.account add test // missing password will no longer crash
- killing characters with positive karma (actually, it's about commiting a crime, not karma)
- .info not returning to dialog after changing a value (actually, INPDLG wasn't returning to dialog)
- flags on UIDs preserved (040000000 for items, 0d2000000 for skills, etc). GLOBALS renamed to WORLDVARS
  due to this (won't go into details here).
- SERV.LOG fixed.
- Fixed plevel 1 players seeing other plevel 1 hidden players
- Added USEHTTP=0/1 in sphere.ini, to disable/enable the built-in HTTP server.
- Added USEGODPORT=0/1 in sphere.ini, to disable the port opened at +1000. As far as I can tell, there is
  really no purpose for that port except taking in connections, much like the standard port you set. So it
  ships disabled by default.


10-01-2004, Kell
- Fixed a bug where redefining a base type (one in the TYPEDEFS list in spheretables.scp) could lead
  to a crash.
- Added a way to assign a TYPEDEF to a terrain type. This means you can define what terrain types are
  water, for instance. Example:
    [TYPEDEF t_water]
    TERRAIN	= 00a8	00ab
    TERRAIN	= 0136	0137
  This information is then used by ISNEARTYPE (and it has effect on all the hardcoded behaviour)
  when trying to assert if there's t_water around.
  Notice that ISWATER checks wether a terrain type is t_water, whereas <ISNEARTYPE t_water> would check
  for terrain, statics and dynamic items.
- Changed TYPE when called on an SERV.ITEMDEF.xxx.TYPE to return the typename, and not just a value. So
  when called on an water item it should return t_water, and not "30". This also has affect when using
  STATICS.x.TYPE.
- Fixed not being able to access properties of TARGP, as in <SRC.TARGP.X> or <SRC.TARGP.TERRAIN>.
- Added "TYPE" to the keywords available on a point. It uses the information above to return what item
  type is the terrain at that point. So you can do TARGP.TERRAIN.


11-01-2004, Kell
- Changed .info command to show the type associated with the terrain (t_normal if none).
- Wrote sphere_types.scp - it is a REQUIRED script, as it associates terrain IDs to item types. This
  replaces the old hard-coded behaviour (which by the way, was slower). By replacing it, I see no
  need to keep the old code, seeing as all you need is to have this script, which will be distributed
  from now on.
  Add sphere_types.scp in spheretables.scp right after sphere_defs.scp.
- Removed ISWATER, ISGRASS, ISROCK and ISDIRT commands from points (they were introduced in R3). Please
  use TYPE instead. For instance, use (<P.TYPE> == t_water) wherever you'd use <P.ISWATER>. Some might
  have grown attached to these commands, but unified and coherent scripts are certainly better than
  different methods for doing the same. Besides, this offers a lot more control (e.g.: <P.TYPE> == t_lava)
- Added ISNEARTYPE to the keywords accepted by points. So you can do <SRC.TARGP.ISNEARTYPE t_water> and
  that will effectively test terrain type, statics, and dynamic items. This is probably what most people
  will want to use, seeing as P.TYPE only test for terrain (and not statics or dynamic items).
- Added EF_New_Triggers (010). If set, allows the use of @NPCActFight, @NPCActFollow, @NPCLookAtChar
  and @NPCLookAtItem. This flag was added because even having these triggers *might* have some impact
  upon performance in very busy shards. 
- Removed a "Weird layer" message from whenever you equipped an item to layer_hidden. This is quite an
  useful layer for people wanting to expand their shards, so there's really no reason for this error.


12-01-2004, Kell
- Fixed "b" in console not working.
- Added DISTANCEYELL, DISTANCETALK, DISTANCEWHISPER to sphere.ini - a value of -1 turns it into a
  broadcast.

13-01-2004, Kell
- The @Create trigger for items works as any other item trigger - it can be fully scripted.
  After a LOT of work, you can now also check for SRC under item's @Create. There are situations where
  an item can be created without an SRC, but in most cases, there will be one. Eg:
  ON = @Create
     if ( <SRC.UID> )
        SRC.SYSMESSAGE You have created an item!
     endif
  Bear in mind that @Create is created before the item by the server, so it can still suffer transformations
  after it's been created. Particulary, you won't be able to REMOVE an item under a @Create trigger - it
  will have no effect.
- Added ISEMPTY and ISNUM. Eg: <ISEMPTY <VAR.TMP>> or <ISNUM <VAR.TMP>>. 
- Added STATICS.FINDID.xxx - it will take you to the ITEMDEF of the static item with the supplied ID
- Added @ResourceTest to REGIONRESOURCE sections, called once for each resource in the region that the
  character is able to find.
- Added @ResourceFound, triggered after a resource has been selected (@ResourceTest has been called for
  all resources available). ARGO is the resource bit to be placed at the location. "return 1" keeps the
  resource bit, but sets it to be empty.
- Added DEFMESSAGE section for scripts, allows setting of strings to be used by the server. More will be
  added - work in progress. You now REQUIRE a script with these strings.
- Fixed RESOURCES.xxx.val and .key.

19-01-2004, Kell
- Fixed a bug with getting stuck on stuff.
- STR, DEX and INT are always equal to O + MOD (for the relevant stat). If you have OSTR=50, MODSTR=10 and
  then do STR=70, you will get OSTR=60 and MODSTR unchanged.

21-01-2004, Kell
- Changed max height difference on CanSeeLOS from PLAYER_HEIGHT/2 to PLAYER_HEIGHT, so that you can access
  chests on top of a table.
- Removed the password being shown on console when a password error occurs.
- Made .x* and .set* commands respect PLEVEL. You also need plevel to use the "SET" command to use .x and .set
  commands.
- Slightly smarter NPCs against field spells - they will avoid them more often depending on INT.
- Fixed another spot where SRC was undefined in @Create (there might still be more of these).

23-01-2004, Kell
- Fixed buying multiple pets from animal trainers.
- Fixed a bug in FOR where counting down wouldn't work (eg: FOR 10 1 works now)

24-01-2004, Kell
- Fixed bug with NPCs going stale (their timer going -1) - particulary pets.
- Fixed @Effect in SPELL sections to work and have same arguments as @SpellEffect.
- Added SPELLFLAG_SCRIPTED (010000) so that one can more easily override the default behaviour of
  spells.

25-01-2004, Kell
- Fixed yet another exploit, with sending a hacked Author in books (tks Balkon)
- Added PROMPT_MSG to SPELL sections and disabled the hard-coded messages. You'll have to fill in the
  prompt messages for the spells.
- Released R3rc2


---- SphereServer R3rc3 -------------------------------------------------------------------------

25-01-2004, Kell
- Fixed a bug with @Gain trigger, that regardless of it even existing would reset the skill to the skill
  being tested. This turned out in Parrying skill interrupting combat, and other buggy skill behaviour.
- Added EF_Scripts_Parse_Verbs (040). If enabled, verbs (the 1st command in a script line) are parsed
  before execution, thus making "TRY" obsolete for that purpose. Example:
     LOCAL.MYSTAT	= MODSTR
     // the following line is parsed to become: str = <<local.mystat>> + 5
     <LOCAL.MYSTAT>	= <<LOCAL.MYSTAT>> + 5
     SYSMESSAGE Stat '<LOCAL.MYSTAT>' increased to <<LOCAL.MYSTAT>>.

26-01-2004, Kell
- Renamed SPELLFLAG_TARG_OBJ to SPELLFLAG_TARG_ITEM. This is really an internal change, but you should
  change spheredefs.scp to be:
  SPELLFLAG_TARG_ITEM	000002
  SPELLFLAG_TARG_CHAR	000004
  SPELLFLAG_TARG_OBJ	SPELLFLAG_TARG_CHAR | SPELLFLAG_TARG_ITEM
- Made sure a character can only be targeted by a spell with SPELLFLAG_TARG_CHAR, and that an item
  can only be targetted by a spell with SPELLFLAG_TARG_ITEM.
- Modified TARGET command to allow 3 possible suffixes (in this order): F, G and W. So you can do
  TARGETGW, TARGETFW, etc. 
  F - Call a function after target ( eg: TARGETF f_rename )
  W - Warn against criminal action
  G - Target ground
- Made sure flags in the CAN= field for ITEMDEFs work correctly. A few items are missing these flags,
  such as i_wall_stone_7 missing CAN_I_BLOCK (so NPCs walk through them).
- Added MULTICREATE command, so you can place multi items via scripts: first set their position then
  call MULTICREATE to build them permanently.


27-01-2004, Kell
- Added EF_New_Maps (020), which enables the mapchange packet (0bf, subcmd 08). If enabled, moving to
  mapplane 1 or 2 will send a packet for the client to see the appropriate map, and moving to other
  mapplanes will send the packet changing back to basic map. This allows one to see the new maps.
  However, there is NO support on the server for new maps. That means that you're walking on the new
  map only on the clientside, while on the server you're walking on the standard map.
- Server now recognizes bogus extended message 15 - won't send error message to client.
- Added recognition for clients up to 4.0.0c - will not endure AOS features though. Useful for people
  with plain AOS installation that wish to play on the server.
- Mind you that this isn't AOS support, it's merely supporting the client.


28-01-2004, Kell
- Fixed TARGP not being set when using a spell.
- Added SPELLFLAG_TARG_NOSELF (0800), which stops spells from being cast on the player itself.
- Fixed accessing LOCAL variables straight within DIALOG sections (also fixes FOR loops).
- "return 1" within a DIALOG section stops the dialog from actually being sent.


30-01-2004, Kell
- Changed SPELLEFFECT to take UID of SRC as 3rd argument, and UID of source item as 4th argument
  (optional). To maintain compatibility, a 3rd argument of '1' refers to the current SRC.
  Example: CONT.SPELLEFFECT s_fireball 1000 <CONT.UID>
  In this example, <cont.uid> will be the SRC of @Effect and @SpellEffect triggers. Say no to
  equip fudging :p
- Fixed KARMA going to odd ranges.
- Added EF_Intrinsic_Locals (080), so that after you do LOCAL.X = something, you can access it
  via just <X>. Be careful though, not to name local variables after some known keyword, or your
  results might how you want them. 
  Example:
      LOCAL.X = 10
      SYSMESSAGE X is <X>.

02-02-2004, Kell
- Fixed an exploit that would allow insta-resurrection anywhere (death menu packet).
- Fixed one last \n\r packet exploits.
- Made sure \n or \r are never saved to the world file, so even if some packet exploit got overlooked,
  it'll end up causing no harm and issue a warning in the console.. This is likely to be the end of
  99% of shard hacking.


03-02-2004, Kell
- Fixed FOR x being 0 based - FOR 5 will now loop from 1 to 5 and not from 0 to 5.
- Fixed "/" character in parsing of simple formulas (so you don't need to use eval when
  assigning formulas to TAGs/VARs or in RETURN).
- Fixed @Targon_ground in GM mode with weapons throwing critical exception (it was attempting
  to damage a static item, which obviously is not an item at all).
- Targon_ triggers now have argn1 as the id of the static item (if a static was targeted),
  and ARGO being the targeted item (reduntant yes, but coherent).
- (intermediary test release here to get some feedback)
- Polymorph spell fixed.


04-02-2004, Kell
- When loading a world with VERSION below "0.55 R3", convert spells that affect stats, by
  removing its effect from base stats (old method) then putting the effect into modstats
  (new method). This ensures compatibility with spells and cursed items.
  Notice that this only works for worlds saved on versions earlier than R3, seeing as worlds
  saved on the test versions of R3 made no conversion and thus had items with both formats
  which cannot be distinguished.
  If for some reason you want to bypass this conversion on an old world, change the version
  of the save files to "0.55 R3". If you want to force this conversion on a world saved with
  R3 test versions, change its version to "0.55".
- Fixed melee weapons with large RANGE hitting through walls.
- Added ARCHERYMAXDIST to sphere.ini (defaults to 12).
- RANGE works for ranged weapons (bows) too. If no minimum range is set, then ARCHERYMINDIST
  is used. If no maximum range is set, then ARCHERYMAXDIST is used.
  Notice that on ITEMDEFs, syntax for range is either RANGE=min,max or RANGE=max (assumes 0
  as min for melee weapons, or archerymindist for ranged weapons).
- Account delete should be working fine now.
- IPs now accept 255 as a wildcard. So if you add an ip under BLOCKIPs with:
  1.2.255.255 you will actually be blocking everyone IP under 1.2
- EOF Account really fixed now (thanks everyone who pointed all the flaws out).
  note for programmers: never ignore the return error value of a function :p
- Added <StrPos iPos, ch, string>, where iPos is the position to start at and ch can be
  either a single character, or the ascii code for a character.
  Example:	<strpos 0 32 Where is the first space> --> will return 5.
  		<strpos 3 e  Where is the first 'e'> --> will return 4.
- Added <StrSub iPos, iCount, string>. Returns "iCount" numbers string, starting at iPos.
  Example:	<strsub 3 4 Oh look at this> --> will return "look".
- Both StrSub and StrPos can take a negative value as iPos. In such a case, the position 
  is counted from the end of the string. So if you do:
  StrSub -5 2 <abcdefg> --> returns "cd".
- Changed StrArg / StrEat to stop at either a space or a comma. These are quick functions
  when you just want to take one argument from a string, or just want the string after one
  argument. Imagine you have a function that takes 1 number and a string. Instead of using
  argv[], you could use strarg to get the number and streat to get the string.



05-02-2004, Kell
- Spells with SPELLFLAG_SCRIPTED can "return 0" in @Effect/@SpellEffect to bypass any
  hardcoded effect, w/o cancelling the spell.
- Duration for summon spells now takes in consideration the DURATION field in the SPELL section and
  the caster level (yeah, it didn't).
- @SpellEffect/@Effect is triggered on the NPC when it is first summoned (it's always considered to
  be the s_summon_creature spell, regardless of spell initially used to summon the NPC).



06-02-2004, Kell
- Spells with both SPELLFLAG_TARG_XYZ and SPELLFLAG_TARG_CHAR/ITEM can be used either on the ground
  or on a character / item.
- Released R3rc3



---- SphereServer R3 (final) -------------------------------------------------------------------------

07-02-2004, Kell
- Added FeaturesLogin= to sphere.ini, allows setting of the flags sent in the 0xA9 packet, on login.

08-02-2004, Kell
- Added EVENTS/TEVENTS to items. Order of triggering is as follows:
   1) If it's a character activating the trigger, check for triggers sensitive to items (@ItemDClick, etc).
   2) triggers in EVENTS on the item
   3) triggers in TEVENTS on the item
   4) triggers in TYPEDEF section for the corresponding TYPE of the item
   5) triggers in ITEMDEF section of the item
   6) default hardcoded behaviour (if any).
  a "return 1" in any case, stops further processing of triggers.


21-02-2004, Kell
- There is a feature/bug when checking to see wether a player has some specific items, any item of a similar
  type will do. It affects these items:
     0175d (cloth), 01067 (leather), 01078 (hides), 01bdd (log), 01bd7 (boards), 00f3f (arrow), 01bfb (bolt).
  e.g., when the server tries to find an arrow, any t_weapon_arrow will do, and so on.
  Added flag EF_Item_Strict_Comparison (0200) to disable this behaviour.
  
25-03-2004, Radiant
- Added some combat, server and command messages to sphere_msgs.scp.
- Added two file handleing commands:
   SERV.WRITEFILE <filename> <text>
   SERV.DELETEFILE <filename>
  Because these commands can be quite destructive, option flag OF_FileCommands (080) must be enabled 
  for these commands to work. Be careful, because any GM with access to SERV.* commands could use this!
  More will follow soon.
- Added @UserChatButton trigger (return 1 disables default (chat window) behaviour)
- Added @UserMailBag trigger (return 1 disables default (message) behaviour)
  NOTE: It seems this is also triggered on login, try using something like
    if (<uid> == <src.uid>)
      return 1
    endif
  to prevent this.

26-03-2004, Radiant
- Added <READFILE filename line> statement
  If line == 0 this will return the last line of the file, if line == -1 this will return the first line of
  the file. This needs OF_FileCommands (080) to be enabled because of obvious security reasons.
  This will return "" (nothing) on failure.
- Added <FILELINES filename> statement, returns the amount of lines in a file.
  If this is 0 it means the file doesnt exist or cannot be read. This too needs OF_FileCommands (080).
- Added some error and misc. messages to sphere_msgs.scp.
- Added SYSMESSAGEUA (syntax equal to SAYUA).
  *** NOTE *** People using Taran's colored sysmessage script will experience problems! Remove Taran's script
  and change your scripts to use the hardcoded function instead (which is much faster and efficient anyway).
- Fixed missing return char in TRY console errors and added the UID of the object causing the error.
- Added @Attack trigger (after someone doubleclicked a character to attack).
  SRC is the target. "return 1" will cancel the attack.
- Added @UserWarmode trigger, fired when a user hits the warmode button before sphere changes the warmode flag.
  ARGN is the current warmode state (1 = in warmode, 0 = peace). "return 1" cancels the warmode change.

27-03-2004, Radiant
- Got sphere to compile on FreeBSD, it's not very stable yet, working on that (problem with signal handlers).
- Added TRYSRC <uid> <verb>, executes <verb> with <uid> as the SRC. Death to equip fudging!
  Note that the default object is the object this is called on, so link.trysrc <cont.uid> will make <link> the
  default object and <cont> the <src>. Very useful in timers!

28-03-2004, Radiant
- Disabled SENDPACKET S"" and put in a little notice that you should use <ASC> instead.
- Casting recall/gate travel on an item now fires @SpellEffect on that item.

31-03-2004, Radiant
- Added OF_NoItemNaming (0100), prevents sphere from naming items "sword crafted by Player"
- Added EF_No_Pause_Packet (0400), this prevents sphere from sending a Disable Redraw (or pause) packet everytime
  a new item/character is sent to the client. This is a bandwidth saver and lag preventer.
  This saves about 45 bytes for each action, this doesn't seem much but you can notice the difference.

02-04-2004, Radiant
- Changed skillsum to DWORD, which fixes the problem with high skillsums not working.

04-04-2004, Radiant
- Gate travel spell now LINKs the gate to the person that opened it.

06-04-2004, Radiant
- Healing is now interrupted properly when hit, fixes exception problem.

08-04-2004, Radiant
- Fixed signal locking problem on Linux/FreeBSD, running sphere in multi-threading mode still has problems, I'll look
  at that tomorrow. Sphere now survives pretty much every error on Linux/FreeBSD (only tested on FreeBSD), as long as
  it's running in single thread mode.

09-04-2004, Radiant
- Threading problem seems to be a little more complicated, but at least sphere runs very stable for me without threading
  on FreeBSD. I've tried it on Slackware, which still had alot of problems. I'll leave that for Kell ;)

11-04-2004, Balkon
- Fixed bug when pick up few items from a pile on the ground it's timers become -1
- Added @Pickup_Self - fired on container when item picked up from it, ARGO points to item we picking up
  @ItemPickup_Self for chars, ACT - container , ARGO - item we picking up
  Removed Reveal() from corpse looting - one can do it using @Pickup_Self if needed
- @Dropon_Char, @ItemDropon_Char now called when drop an item directly on charater either (before secure trade window 
  shown and @NPCAccept/Refuseitem triggers), ARGO points to character we drop the item on, or character's backpack

11-04-2004, Balkon
- Can't provoce char against an item
- Return 1 in @Login fixed (character will not stay in the world, no "client version check" loop)
- Fixed CONT and TOPOBJ in @EquipTest, item not moved if can't be equipped when doubleclick on it

12-04-2004, Radiant
- Added LOCALLIGHT property on characters, if this is 0 the normal lightlevel (sector) will be used, if this is higher the
  LOCALLIGHT value will be sent as lightlevel instead. You will need to use UPDATE after you have changed this, because the
  light level is not automatically updated. This overrides nightsight.
  (note: if you want to give a character a LOCALLIGHT level of 0, just set the nightsight flag)

13-04-2004, Balkon
- OF_NoHouseMuteSpeech (0200) - if enabled players are able to hear each other inside and outside the house
- Started remaking a CanSeeLos and CanWalk, temporary added EF_CanSeeLos_New (0800) to enable both changes
  as for now it fixes shoot through walls an fall through the floor in house regions interception area bugs, 
  more changes here later...

14-04-2004, Radiant
- @DClick is now triggered before the item is attempted to be equipped

15-04-2004, Balkon
- EF_WalkCheck (01000) - new walk check code, should fix lot of house looting bugs (patched verdata, walk under stairs etc.)
  NOTE: in default script pack some stairs are in DUPELIST of items, which are not really a stairs, so they have
  wrong CAN flags (CAN_I_CLIMB is not set). Make sure you've fixed your scripts before enabling this EF or you'll 
  not be able to walk on some of dynamic stairs

16-04-2004, Balkon
- some optimization to EF_WalkCheck, fixing climb height after teleporting and Z changing
- fixed bug when summoned NPC's have loot
- fixed RESOURCES.1 returned string in RESMAKE format
- fixed shafts etc. dupe bug

17-04-2004, Radiant
- Started working on some basic AOS functionality, EF_AgeOfShadows (02000) will enable this.
  Currently only enables tooltips (which aren't even working for now). Don't forget to enable flag 020 in FeaturesLogin!
- Fixed a nasty exploit that would allow anyone to crash sphere and/or execute code on your machine without even logging in
  (thanks Furio for reporting this)
- Fixed AOS Tooltips, now only shows the name for items and characters. I'll add other things later.
- Added AOS/LBR fading damage counter thing (requires EF_AgeOfShadows). This only shows for you and the person that hit you,
  I believe thats how it works on OSI (or doesn't it?). Showing it for everyone would make it laggy in my opinion.

17-04-2004, Balkon
- torch/candle dupe bug seems to be fixed at last :)

18-04-2004, Balkon
- fixed ACCOUNT properties was not accessable for logged out chars
- added ISPLAYER function - just a little feature :)
- added ISONLINE function - for players returns 1 if client is online (connected) and 0 overwise, for NPCs returns 1 when 
  NPC is in the world or 0 if it is offline (shrinked, mounted pets)
- added NOTOGETFLAG function, returns notoriety flags for specified char, syntax: NOTOGETFLAG Viewer_Serial,Allow_Incognito
  returned values:
	NOTO_GOOD		1 // good(blue)
	NOTO_GUILD_SAME   2 // same guild
	NOTO_NEUTRAL	3 // Neutral
	NOTO_CRIMINAL	4 // criminal
	NOTO_GUILD_WAR	5 // Waring guilds
	NOTO_EVIL		6 // evil(red)
  if no args specified returns flags for SRC as a viewer, NOTOGETFLAG 0,1 will return flags for SRC as a viewer with 
  Allow_Incognito = true
  NOTE: for red guildmates it will return NOTO_EVIL, not NOTO_GUILD_SAME

18-04-2004, Radiant
- Some additions to AOS tooltips

19-04-2004, Kell
- A few changes to AOS tooltips for cross-platform compatibility (itoa).

19-04-2004, Radiant
- Fixed status updates not sending with EF_No_Pause_Packet flag set
- Made @userStats fire on every status update that is being sent, if ARGN3 == 1 then the user has just opened the status window
- More tooltips stuff, type specific
- Added AOS/LBR Popup Menu's, these can be activated by setting flag 08 in FeaturesLogin (currently only for characters).

19-04-2004, Balkon
- RANGE bug fixed
- updating last regen time for dead chars so that they will not get ticks every tenth of second any more

20-04-2004, Balkon
- some traffic optimization:
  short stats change packets now used instead of full status packet when changing only hits/mana/stamina or it's max. values
  HITSUPDATERATE in sphere.ini controls how often (in seconds) my changed hits will be sent to others who can see me,
  default value is 1, incraise to reduce the traffic usage, 0 value disables sending such updates (like it was on 55i)
- MAXHITS etc. fixed. .MAXHITS 100 will now set MAXHITS to 100, this will include MODSTR so that if you had MODSTR 10 before 
  setting MAXHITS than when you change MODSTR back to 0 MAXHITS will be 90.
- maxhits displayed for others changed from 25 to 50 for smoother hits line changing on the statusbar

21-04-2004, Radiant
- Added MESSAGEUA, syntax equal to SAYUA and SYSMESSAGEUA
- Fixed lack of argument checking in SAYUA that sometimes causes an exception
- Added support for the "Virtue button" (at the top of the paperdoll on newer clients), fires the @UserVirtue trigger.
- Added support for the new spellbook packets (old ones don't work with AOS), if EF_AgeOfShadows is not set the old packets will
  be used (this is for Magery, there is no Necromancy or Paladin stuff (yet)).

22-04-2004, Radiant
- Re-added the "The spell fizzles" message on spell failure

22-04-2004, Balkon
- setting values in quotas for TAGs, VARs and LOCALs now will create text tags, i.e. 
  TAG.TEST_1 2+2
  will create numrecal tag TEST_1 with value 04, but
  TAG.TEST_2 "2+2"
  will create text tag with text '2+2'.
  Text tags and vars are saved quoted also.
- fixed REGION.TAG0.SOMETHING caused 'Undefined symbol "" error' when tag SOMETHING is not set

23-04-2004, Radiant
- Found out that new spellbook packets are broken, still not fixed
- Added support for necro book spells, now reads the spelldefs for these (101 - 116), will add hardcoded behaviour later
- Added @UserExWalkLimit trigger, fired if a user exceeds the Walk limit (is either lagging alot or speedhacking)
  RETURN 1 allows the user to walk, no action or RETURN 0 disallows the user to walk
  (note: this is pretty expensive because it's fired each time a step is taken while the user's walkbuffer is at 0, so be careful)

24-04-2004, Radiant
- Removed message from WEBLINK command
- Fixed .admin showing japanese text/crashing client with long character names (names are truncated to 30 chars)
- SERV.NEWDUPE and DUPE now sets NEW (and ACT? coded but not tested) for items only, duping chars doesn't work like it should yet
- DCLICK/USE on characters now takes an argument (uid), makes the character DCLICK a certain item/char
- CALL function is no longer case-sensitive
- Added arguments to dialogs, in this form: "DIALOG d_dlg 0 blabla", both <args> and <argv[x]> can be used. <argn> is the page number
  (second argument)

25-04-2004, Radiant
- Added COMMANDLOG option in sphere.ini, only logs commands issued by this plevel and higher. (default = 0, log all)
