# UOX3 Script Engine

### API and Event handling

## Revision History

Version | Change
--- | ---
0.01 | Initial document. 21 Events and approximately 90 functions listed
0.02 | Updated with 3 more events from Xuri. Added a few more API calls
0.03 | Updated with a number of events from EviLDeD
0.04 | Table layout format changed. Addition of tables for each event. # of events have detailed information
0.05 | More API functions documented
0.06 | Visited link colour changed from purple to blue Documented around 20-30 more functions
0.07 | Proposed a further 41 API functions, some slim only
0.08 | Hefty updates. Most proposed functions moved into categories in contents list. Provided example code for a number of events. Documented some more events.
0.09 | More functions/events. Functions added: GetRace, SetRace, SubStringSearch, IsCriminal, IsMurderer, IsInnocent, MakeCriminal, MakeInnocent, GetMurderCount, GetMurderThreshold, GetGender, SetGender, and IsDead. Events added: OnDeath, OnResurrect, OnFlagChange. FAQ added.
0.10 | Added RollDice function
0.11 | Added StartTimer function. Documented onTimer event, with example
0.12 | Added IsNPC, IsOnline, TurnToward, DirectionTo functions.
0.13 | GetDir, SetDir, RaceCompare and RaceCompareByRace functions added.
0.14 | FindItemOnLayer function added.
0.15 | Added whole new section of functions, for multis. Funcs are: FindMulti, IsInMulti, IsOnBanList, IsOnOwnerList, AddToBanList, AddToOwnerList, RemoveFromBanList, RemoveFromOwnerList, IsMulti.
0.16 | Added whole slew of functions. IsRegionGuarded, CanMarkInRegion, CanRecallInRegion, CanGateInRegion, GetGuildType, GetGuildName, GetGuildMaster, SetGuildType, SetGuildName, SetGuildMaster, GetNumGuildMembers, AddToGuild, RemoveFromGuild, CompareGuild, CompareGuildByGuild, GetGuildStone, IsMemberOfTown, GetTownMayor, GetTownRace, SetTownRace, PossessTown, GetTownTax, GetTownTaxResource, SetTownTax, SetTownTaxResource, GetRaceName, IsRaceWeakToWeather, RaceRequiresBeard, RaceRequiresNoBeard, IsPlayerRace, GetRacialGenderRestrict, GetRacialArmourClass, CanRaceWearArmour, GetRaceLanguageSkill, GetRaceSkillAdjustment, GetRacePoisonResistance, GetRaceMagicResistance, GetRaceVisibleDistance, GetRaceNightVision, IsValidRaceHairColour, IsValidRaceSkinColour, IsValidRaceBeardColour, GetTown, SetTown, GetRegion, SetRegion.
0.17 | Added information for Attack, AttackTarget and RemoveSpell. Also added elementary examples to them. Split functions across number of pages (reduce load time, easier search).
0.18 | Added event onHungerChange. Allows customization when hunger levels change for a character.
0.19 | Added some new functions and events. Events added: onSnooped, onStolenFrom. Functions added: FirstItemInCont, NextItemInCont, FinishedItemInCont, UseDoor, GetLayer, SetLayer.
0.20 | Added a few more functions: VendorBuy, VendorSell, GetGuild. Defined details on a few other functions (all the Find*Functions, the Guild functions, and GetRaceVisibleDistance and GetRaceNightVision). Contemplated callback based find algorithm (ie supply a JS snippet that compares 2 characters, and returns true if finished) for custom search potentials.
0.21 | Added functions: GetPrivateBit, SetPrivateBit, GetPrivateWord, SetPrivateWord, GetPrivateBitRange, SetPrivateBitRange, SkillBeingUsed, SetSkillUse, TriggerEvent.
0.22 | Updated magic functions to reflect proper spell funcs and added information on all gump functions.
0.23 | Updated documentation on CommandLevelReq, CommandExists, FirstCommand, NextCommand, FinishedCommandList, SpawnNPC and SpawnItem.
0.24 | Updated documentation, adding in documentation for SetMoreX/SetMoreY/SetMoreZ and GetMoreX/GetMoreY/GetMoreZ.
0.25 | Updated documentation, updating SpawnNPC to reflect the changes required creating items in other worlds than Ilshenar. Also added the GetTileIDAtMapCoord function, as well as GetWorldNumber and GetBaseSkill.
0.26 | Fixed some Example-errors and added GetRaceCount and the Tag System. Added documentation for the onGumpPress Event.

©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)