	- Other Constants: 
	#MAX_USERID
	#MAPWIDTHHEIGHT
	#DIR_LEFT
	#DIR_RIGHT
	#DIR_UP
	#DIR_DOWN
	#DIR_UPLEFT
	#DIR_DOWNLEFT
	#DIR_UPRIGHT
	#DIR_DOWNRIGHT

-----------------

	- Tile Type Constants: 
	#TILE_DOOR
	#TILE_WALL
	#TILE_WARP
	#TILE_OBJECT
	#TILE_KEEP
	#TILE_NOMONSTER
	#TILE_SCRIPTED
	#TILE_NPC
	#TILE_GODONLY
	#TILE_SPEED
	#TILE_GUILDHALL

-----------------

	- Message Type Constants: 
	#MSG_TELL
	#MSG_SAY
	#MSG_EMOTE
	#MSG_CRITICAL
	#MSG_BROADCAST
	#MSG_SERVER

-----------------

	- Item Type Constants: 
	#ITEM_ACCESSORY
	#ITEM_BOOTS
	#ITEM_HELMET
	#ITEM_ARMOR
	#ITEM_WEAPON
	#ITEM_COLLECT
	#ITEM_KEY
	#ITEM_POTION
	#ITEM_SCRIPTED

-----------------

	- Per-Script Constants: 
	#MAPID
	#USERID
	#XPOS
	#YPOS
	#TARGETID
	#TARGETINDEX
	#RESULT

-----------------

	- Timer Constants: 
	#PARAM1
	#PARAM2
	#PARAM3

-----------------

	- Map Type Constants: 
	#MAPTYPE_NEUTRAL
	#MAPTYPE_PK
	#MAPTYPE_FRIENDLY
	#MAPTYPE_ALONE

-----------------

	- Guild Rank Constants: 
	#GUILDRANK_INVITED
	#GUILDRANK_INITIATE
	#GUILDRANK_MEMBER
	#GUILDRANK_LORD

-----------------

Function: AddToLog
	Parameters: message
	Adds to the server log with the current time and date.

-----------------

Function: GetSkillID
	Parameters: skillname
	Returns the skillid of the skillname provided.

-----------------

Function: GetSkillName
	Parameters: skillid
	Returns the skill name of the skill id provided.

-----------------

Function: GetSkillScript
	Parameters: skillid
	Returns the script # of the skill id provided.

-----------------

Function: GetUserID
	Parameters: username
	Returns the userID of the username provided.

-----------------

Function: GetNextUser
	Parameters: current_userid
	Returns the userid of the next valid user account after the current. Returns 0 if no more.

-----------------

Function: GetNextOnlineUser
	Parameters: current_userid
	Returns the userid of the next user currently online after the current. Returns 0 if no more.

-----------------

Function: GetNextMapUser
	Parameters: current_userid, mapid
	Returns the userid of the next user currently online on the specified map after the current. Returns 0 if no more.

-----------------

Function: GetUserAccess
	Parameters: userid
	Returns the god access level of the user.

-----------------

Function: GetUserMap
	Parameters: userid
	Returns Map # of the user

-----------------

Function: GetUserX
	Parameters: userid
	Returns X tile of user

-----------------

Function: GetUserY
	Parameters: userid
	Returns Y tile of user

-----------------

Function: GetUserSprite
	Parameters: userid
	Returns sprite # of user

-----------------

Function: GetUserClass
	Parameters: userid
	Returns class # of user

-----------------

Function: GetUserHP
	Parameters: userid
	Returns HP of user

-----------------

Function: GetUserMana
	Parameters: userid
	Returns mana or 'blood' of user

-----------------

Function: GetUserMaxHP
	Parameters: userid
	Returns users max hp

-----------------

Function: GetUserMaxMana
	Parameters: userid
	Returns users max mana or 'blood'

-----------------

Function: GetUserStrength
	Parameters: userid
	Returns the users strength

-----------------

Function: GetUserEndurance
	Parameters: userid
	Returns the users endurance

-----------------

Function: GetUserWisdom
	Parameters: userid
	Returns the users wisdom

-----------------

Function: GetUserAgility
	Parameters: userid
	Returns the users agility

-----------------

Function: GetUserSilver
	Parameters: userid
	Returns the users silver

-----------------

Function: GetUserDirection
	Parameters: userid
	Returns the direction the user is facing

-----------------

Function: GetUserMessage
	Parameters: userid
	Returns the last 'normal map chat' the user sent

-----------------

Function: GetUserStrengthBonus
	Parameters: userid
	Returns the users strength Bonus

-----------------

Function: GetUserEnduranceBonus
	Parameters: userid
	Returns the users endurance Bonus

-----------------

Function: GetUserWisdomBonus
	Parameters: userid
	Returns the users wisdom Bonus

-----------------

Function: GetUserAgilityBonus
	Parameters: userid
	Returns the users agility Bonus

-----------------

Function: GetUserStrengthTotal
	Parameters: userid
	Returns the users strength+bonus

-----------------

Function: GetUserEnduranceTotal
	Parameters: userid
	Returns the users endurance+bonus

-----------------

Function: GetUserWisdomTotal
	Parameters: userid
	Returns the users wisdom+bonus

-----------------

Function: GetUserAgilityTotal
	Parameters: userid
	Returns the users agility+bonus

-----------------

Function: GetUserMuteTimeLeft
	Parameters: userid
	Returns the amount of minutes a user is muted for. If return value is <= 0, user is not muted.

-----------------

Function: GetUserStrengthExp
	Parameters: userid
	Returns the users strength exp

-----------------

Function: GetUserEnduranceExp
	Parameters: userid
	Returns the users endurance exp

-----------------

Function: GetUserWisdomExp
	Parameters: userid
	Returns the users wisdom exp

-----------------

Function: GetUserAgilityExp
	Parameters: userid
	Returns the users agility exp

-----------------

Function: GiveUserStrengthExp
	Parameters: userid,expAmount
	Gives exp to the user

-----------------

Function: GiveUserEnduranceExp
	Parameters: userid,expAmount
	Gives exp to the user

-----------------

Function: GiveUserWisdomExp
	Parameters: userid,expAmount
	Gives exp to the user

-----------------

Function: GiveUserAgilityExp
	Parameters: userid,expAmount
	Gives exp to the user

-----------------

Function: SetUserStrength
	Parameters: userid,statamt
	Sets users level for this stat. Note this affects the exp required to level

-----------------

Function: SetUserEndurance
	Parameters: userid,statamt
	Sets users level for this stat. Note this affects the exp required to level

-----------------

Function: SetUserWisdom
	Parameters: userid,statamt
	Sets users level for this stat. Note this affects the exp required to level

-----------------

Function: SetUserAgility
	Parameters: userid,statamt
	Sets users level for this stat. Note this affects the exp required to level

-----------------

Function: SetUserMessage
	Parameters: userid,message
	Sets the last 'normal map chat' the user 'sent'

-----------------

Function: SetUserStrengthBonus
	Parameters: userid,statamt
	Sets users bonus for this stat

-----------------

Function: SetUserEnduranceBonus
	Parameters: userid,statamt
	Sets users bonus for this stat

-----------------

Function: SetUserWisdomBonus
	Parameters: userid,statamt
	Sets users bonus for this stat

-----------------

Function: SetUserAgilityBonus
	Parameters: userid,statamt
	Sets users bonus for this stat

-----------------

Function: GetClassSprite
	Parameters: classid
	Returns the classes default sprite

-----------------

Function: GetUserGuild
	Parameters: userid
	Returns the users guild id (0=no guild)

-----------------

Function: GetUserGuildRank
	Parameters: userid
	Returns the users guild rank

-----------------

Function: GetUserInvItem
	Parameters: userid,invSlotNumber
	Returns the item # in the users inventory slot

-----------------

Function: GetUserEquippedWeapon
	Parameters: userid
	Returns the inv slot of the equipped weapon

-----------------

Function: GetUserEquippedArmor
	Parameters: userid
	Returns the inv slot of the equipped armor

-----------------

Function: GetUserEquippedHelmet
	Parameters: userid
	Returns the inv slot of the equipped helmet

-----------------

Function: GetUserEquippedBoots
	Parameters: userid
	Returns the inv slot of the equipped boots

-----------------

Function: GetUserEquippedAccessory
	Parameters: userid
	Returns the inv slot of the equipped accessory

-----------------

Function: GetUserName
	Parameters: userid
	Returns the users name

-----------------

Function: GetUserDisplayName
	Parameters: userid
	Returns the users display name

-----------------

Function: GetUserIP
	Parameters: userid
	Returns the users IP address as a string

-----------------

Function: GetUserAtXY
	Parameters: mapid,x,y
	Returns the userid of a user at the position or 0 if no user.  
	NO X/Y BOUNDS ERROR

-----------------

Function: CanAttack
	Parameters: mapid,userid,targetUserid
	Returns 0 if the userid cannot attack the target user on the specified map. Returns 1 if userid can.

-----------------

Function: UnequipWeapon
	Parameters: userid
	unequips a users equipped weapon

-----------------

Function: UnequipArmor
	Parameters: userid
	unequips a users equipped armor

-----------------

Function: UnequipBoots
	Parameters: userid
	unequips a users equipped boots

-----------------

Function: UnequipHelmet
	Parameters: userid
	unequips a users equipped helmet

-----------------

Function: UnequipAccessory
	Parameters: userid
	unequips a users equipped accessory

-----------------

Function: HasItem
	Parameters: userid,itemtype
	Returns 1 if user has that item, 0 otherwise

-----------------

Function: ItemCount
	Parameters: userid,itemtype
	Returns the # of items of specified type in the users inventory

-----------------

Function: TakeItem
	Parameters: userid,itemtype
	Removes 1 of the itemtype from the users inventory

-----------------

Function: GiveItem
	Parameters: userid,itemtype
	Puts 1 of the item type into the users inventory, if a slot is free

-----------------

Function: SetItemDurability
	Parameters: userid,invitemindex,durability
	Sets an item in a users inventory to specified durability

-----------------

Function: GetItemDurability
	Parameters: userid,invitemindex
	Gets the durability of an item in a users inventory

-----------------

Function: IsInvFull
	Parameters: userid
	Returns 1 if no slots are free, 0 otherwise

-----------------

Function: DropItem
	Parameters: userid,itemtype
	Drops the item on the ground below the player

-----------------

Function: IsOnline
	Parameters: userid
	Returns 1 if user is currently playing, 0 otherwise

-----------------

Function: DamageUser
	Parameters: userid,amount
	Hurts the user

-----------------

Function: DamageMonster
	Parameters: mapid,mapmonsterid,dmgamount
	Hurts the monster in map slot (0-15)

-----------------

Function: UserDamageUser
	Parameters: attackingplayer, damageamount, damagedplayer 
	 Damages the damagedplayer and gives kill credit to attackingplayer

-----------------

Function: UserDamageMonster
	Parameters: monsterid, damageamount, attackingplayer 
	 Damages the monster and gives kill credit to attackingplayer

-----------------

Function: SetUserHP
	Parameters: userid,hp
	Sets the users hp

-----------------

Function: SetUserMana
	Parameters: userid,mana
	Sets the users mana/blood

-----------------

Function: SetUserSprite
	Parameters: userid,sprite
	Sets the users sprite

-----------------

Function: SetUserName
	Parameters: userid,name
	Sets the users name (be careful with this)

-----------------

Function: SetUserDisplayName
	Parameters: userid,name
	Sets the users display name in-game

-----------------

Function: SetUserSilver
	Parameters: userid,silver
	Sets the users silver

-----------------

Function: SetUserMuteTime
	Parameters: userid,muteTimeMinutes
	Mutes the user for muteTimeMinutes minutes. If muteTimeMinutes <= 0, user is unmuted.

-----------------

Function: KickUser
	Parameters: userid,reason
	Kicks the user for the reason specified

-----------------

Function: BanUser
	Parameters: username (or IP:<ipaddress>),hoursToBan
	Bans the user or IP address entered.

-----------------

Function: UnBanUser
	Parameters: username (or IP:<ipaddress>)
	Unbans the entered user.

-----------------

Function: SendCombatMessage
	Parameters: userid,message text
	Sends the text specified to the user as a combat text item

-----------------

Function: SendMessageToUser
	Parameters: userid,message text,#MSG_TYPE
	Sends the text specified to the user as a chat item.
	The type determines the color it is shown as on the client.

-----------------

Function: WarpUser
	Parameters: userid,map,x,y
	Warps the user to the specified coordinates

-----------------

Function: GetUserEquippedPlague
	Parameters: userid,type
	Get the plague rating for equipped item of specified type. (use #ITEM_ constants)

-----------------

Function: GetUserEquippedRad
	Parameters: userid,type
	Get the radiation rating for equipped item of specified type. (use #ITEM_ constants)

-----------------

Function: GetUserItemRad
	Parameters: userid,itemInvIndex
	Get the radiation rating for item in users inventory.

-----------------

Function: GetUserItemPlague
	Parameters: userid,itemInvIndex
	Get the plague rating for item in users inventory.

-----------------

Function: SetUserItemRad
	Parameters: userid,itemInvIndex,radValue
	Set the radiation rating for item in users inventory.

-----------------

Function: SetUserItemPlague
	Parameters: userid,itemInvIndex,plagueValue
	Set the plague rating for item in users inventory.

-----------------

Function: GetUserTempFlag
	Parameters: userid,flagnumber(0 to 199)
	Gets the non-saving temp scripting flag specified of the user

-----------------

Function: SetUserTempFlag
	Parameters: userid,flagnumber(0 to 199),value
	Sets the non-saving temp scripting flag specified to the integer value

-----------------

Function: GetUserFlag
	Parameters: userid,flagnumber(0 to 199)
	Gets the scripting flag specified of the user

-----------------

Function: SetUserFlag
	Parameters: userid,flagnumber(0 to 199),value
	Sets the users flag specified to the integer value

-----------------

Function: GetUserSkill
	Parameters: userid,skillnumber(0 to 199)
	Gets the skill level specified of the user (0 = doesnt have that skill)

-----------------

Function: SetUserSkill
	Parameters: userid,skillnumber(0 to 199),value
	Sets the users skill specified to the specified level (0-100, 0=doesn't have that skill)

-----------------

Function: GetUserQuestFlag
	Parameters: userid,flagnumber(1 to 199)
	Gets the quest flag specified of the user

-----------------

Function: SetUserQuestFlag
	Parameters: userid,flagnumber(1 to 199),value
	Sets the users quest flag specified to the integer value, then resends all quest data to the user. Use this command as sparingly as possible to save bandwidth.

-----------------

Function: GetGuildHall
	Parameters: guildid
	Get the hall # of the guild

-----------------

Function: GetGuildSilver
	Parameters: guildid
	Get the silver of the guild

-----------------

Function: GetGuildMemberCount
	Parameters: guildid
	Get the count of the guilds members

-----------------

Function: GetGuildName
	Parameters: guildid
	Get the name of the guild

-----------------

Function: GetGuildSprite
	Parameters: guildid
	Get the sprite # of the guild

-----------------

Function: SetGuildSilver
	Parameters: guildid,silver
	Set the silver of the guild

-----------------

Function: GetGuildID
	Parameters: guildname
	Get the ID # of the guild

-----------------

Function: GetMapPlayerCount
	Parameters: mapid
	Get the # of players on the map

-----------------

Function: OpenDoor
	Parameters: mapid,x,y
	Open the door if there is one, at the coordinates specified
	NO X/Y BOUNDS ERROR

-----------------

Function: CloseDoor
	Parameters: mapid,x,y
	Close the door if there is one, at the coordinates specified
	NO X/Y BOUNDS ERROR

-----------------

Function: SendMessageToMap
	Parameters: mapid,message text,#MSG_TYPE
	Send a message of specified type to everyone on the map

-----------------

Function: SendMessageToAll
	Parameters: message text,#MSG_TYPE
	Send a message to everyone on the server of the specified type

-----------------

Function: SendMessageToGuild
	Parameters: guildid, message text
	Send a message to everyone in the specified guild.

-----------------

Function: SpawnItem
	Parameters: mapid,itemnumber,x,y
	Creates an item on the map in the specified coords
	NO X/Y BOUNDS ERROR

-----------------

Function: RemoveItem
	Parameters: mapid,itemnumber
	Removes an item of the type specified from the map

-----------------

Function: RemoveItemAtXY
	Parameters: mapid,x,y
	Removes the first item at the specified map and position.

-----------------

Function: GetItemAtXY
	Parameters: mapid,x,y
	Gets the id of the first item on the ground at XY. Return 0 if none.

-----------------

Function: GetItemID
	Parameters: itemname
	Gets the id of an itemname. If two items are the same name, it returns the first one.

-----------------

Function: GetItemName
	Parameters: itemnumber
	Gets the name of an item

-----------------

Function: GetItemFlag1
	Parameters: itemnumber
	Gets the first flag of an item

-----------------

Function: GetItemFlag2
	Parameters: itemnumber
	Gets the second flag of an item

-----------------

Function: GetItemFlag3
	Parameters: itemnumber
	Gets the thirf flag of an item

-----------------

Function: GetItemFlag4
	Parameters: itemnumber
	Gets the 4th flag of an item

-----------------

Function: GetItemValue
	Parameters: itemnumber
	Gets the item's value.

-----------------

Function: GetItemType
	Parameters: itemnumber
	Gets the type constant of an item

-----------------

Function: GetMapType
	Parameters: mapid
	Returns the maptype of the map

-----------------

Function: GetMapName
	Parameters: mapid
	Returns the mapname of the map

-----------------

Function: GetMapExit
	Parameters: mapid,direction
	Returns the mapnumber of the exit for the specified direction (up,down,left,right). Less than or equal to 0 means no exit

-----------------

Function: GetMonsterType
	Parameters: mapid,mapmonsterid
	Gets the monster # of a monster on a map (0-7)

-----------------

Function: GetMonsterX
	Parameters: mapid,mapmonsterid
	Gets the X position of a monster on a map (0-7)

-----------------

Function: GetMonsterY
	Parameters: mapid,mapmonsterid
	Gets the Y position of a monster on a map (0-7)

-----------------

Function: GetMonsterTarget
	Parameters: mapid,mapmonsterid
	Gets the target player of a monster on a map (0-7)

-----------------

Function: SetMonsterTarget
	Parameters: mapid,mapmonsterid,userid
	Sets the target of a monster on a map (0-7) to the userid

-----------------

Function: GetMonsterAtXY
	Parameters: mapid,x,y
	Returns the monsterid at the position or -1 if no monster.  
	NO X/Y BOUNDS ERROR

-----------------

Function: GetMonsterDirection
	Parameters: mapid,monsterid
	Returns direction of the monster specified.
	This does not check if the monster is actually alive.

-----------------

Function: SpawnMonster
	Parameters: mapid,monsterid,x,y
	Spawns a monster on the specified map at the position x,y
	This doesn't affect the normal 8 monsters on a map
	You can spawn up to 8 extra monsters per map.
	NO X/Y BOUNDS ERROR

-----------------

Function: UnspawnMonster
	Parameters: mapid,monster_type
	Removes a monster of specified type from the map

-----------------

Function: IsNight
	No parameters
	Returns 1 if its night, 0 if its day

-----------------

Function: GetTime
	No parameters
	Gets the current time in milliseconds of the server.

-----------------

Function: GetDayOfWeek
	No parameters
	Get the day of the week (0 to 6, 0=Sunday, 1=Monday...)

-----------------

Function: GetHour
	No parameters
	Gets the hour (0-23) on the server

-----------------

Function: GetMinute
	No parameters
	Gets the minute (0-59) on the server

-----------------

Function: GetSecond
	No parameters
	Gets the second (0-59) on the server

-----------------

Function: GetTileType
	Parameters: mapid,x,y
	Gets the type constant of the tile at x,y
	NO X/Y BOUNDS ERROR

-----------------

Function: Timer5
	Parameters: scriptid,timeMs,param1,param2,param3,param4,param5
	Sets a 5-parameter timer for a script to run at a later time.
	timeMs is the milliseconds to wait until the specified script is run.

-----------------

Function: Timer
	Parameters: scriptid,timeMs,param1,param2,param3
	Sets a 3-parameter timer for a script to run at a later time.
	timeMs is the milliseconds to wait until the specified script is run.

-----------------

Function: CreateEffect
	Parameters: effectid,lengthMs,speedMs,#DIR,mapid,x,y,damage,userid,docollision
	Create effect animation for specified length
	Move in #dir specified, at speed delay.
	NOTE - DAMAGE IS REMOVED FROM EFFECTS. THE PARAMETER IS IGNORED

-----------------

Function: Floor
	Parameters: value
	Returns the rounded-down integer of value

-----------------

Function: Ceiling
	Parameters: value
	Returns the rounded-up integer of value

-----------------

Function: Random
	Parameters: min, max
	Returns a random integer between min and max

-----------------

Function: FindString
	Parameters: stringtosearch, stringtofind, startindex 
	 Finds the index at which a string occurs in another string.
	Returns 0 is string is not found.

-----------------

Function: SubString
	Parameters: string, indextostart, length
	Returns the substring starting at specified index with specified length.
	Example: Substring("Hi There",4,5) = "There"

-----------------

Function: Upper
	Parameters: string
	Returns uppercase version of the string

-----------------

Function: Lower
	Parameters: string
	Returns lowercase version of the string

-----------------

Function: ShowUserDialog
	Parameters: userid,scriptnum,dialogtype,dialogtext
	Shows the user a dialog of dialogtype = "yesno" or "text".
	Runs the scriptnum specified with a return value in #RESULT when user responds.
	yesno returns "1" for yes, "0" for no.

-----------------

	

-----------------

