; Copyright 2005 (c) Slide Productions.
; All Rights Reserved
;Scene from Hamlet
;by
;William Shakespeare
;Penguin Books Ltd, 1980
;Scene from Macbeth
;by
;William Shakespeare
;Routlege, 1992 

;  CREDITS			// documentation of the world's authors
;  STORY			// Background story which scrolls by at start
;  TERRAINS			// your names for the terrain possibilities (water, lava, etc)
;  MAPS			// descriptions (file names) of the available maps
;  TOKENS			// tokens which keep track of player achievements
;  ELEMENTS			// your definitions of the 8 elements
;  HANDS			// your definition of the 'right-hand-weapons' classes
;  ITEMS			// stuff (equipment, potions, bonus items, etc.)
;  SPELLS			// spells that can be cast, and their effects and appearance
;  MONSTERS			// Monsters you can encounter, their skills and appearance
;  GROUPS			// monster groupings (which are found together in which combo)
;  LEVELS			// Hero experience level switch points and names
;  SCENES			// scripted dialog to advance plot
;  EQUIP			// Names of the non-hand Equipment items, in case your world needs them

;----------------
; CREDITS

+CREDITS
	
Programming by Synthetic Reality
Direction and scripting by Fred Spade
-CREDITS
;
;--------------
; STORY Section  
; text beginning with | will be centered, otherwise text is left-justified.
; Each line of text will be its own paragraph, which will word-wrap. 
; note that leading spaces in a paragraph are significant and would cause the first line
; to be indented.
;
; Special commands, one per line, control text which follows
; :C red,green,blue			set text color (as in ":C 255,0,0" for bright red)
; :S size				set text size  (200 is 'normal')
; :F fontName			set text font name  (use ":F  " to restore default font

+STORY
:S 40
:C 0, 150, 0
:F Impact
|one point four two
:S 30
:F Times New Roman
|by 
:S 35
|Fred
:S 1
:C 1, 1, 1
|.
:S 345
:C 150, 0, 0
:F Impact
|World's End
:C 0, 150, 0
:S 1
:C 1, 1, 1
|.
:C 0, 150, 0
:F Times New Roman
:S 50
In a far flung corner
|there is a place..
:S 1
:C 1, 1, 1
|.
|.
|.
:C 0, 150, 0
:S 40
|Thanks to friends and fellow WoS'ers..
:S 50
|Amy   Aragorn   Atsumori   Cactrot   Cameron Pryor   Casey   Chaos
|Conspiracy   Crusard   Cynthia Cat   Dazman   Duo   Fury_SBK   
|Gabriel   Igotu   KnightBlade   Kumata   Jaycee   Josh   Karst
|Kyle.B   Lee Fukumoto   Leniad Olbap   LGH   Loric   Lumi   Magic Beans
|Mikeanike   Mike Scott   Mj (Granny Grump)   Mordecai   Nailz
|NecroJoker   Necromancer   Nemi   OkieBob   Paul (Cavfancier)
|Ravenlance   Right On   Ryogakusha Ryu   Samsyn   Sarah   Shadow
|Sue   Syd   TA   Tansy   Wendy Lee   Xanth   XyerX   Zozer
|and all who played since 2001
:S 1 
:C 1, 1, 1
|.
:S 40 
:C 0, 150, 0
|"My Life With Staral"  "Ice Mountains"  "Woods" by
:S 50 
|Shane Turner
:S 40
|"Twilight"  "Heaven" by 
:S 50
|Francis Joseph Leach
:S 1
:C 1, 1, 1
|.
:S 40
:C 0, 150, 0
|Some artwork courtesy and copyright of
:S 50
|Daniel B. Holeman
:S 40
|who invites you to visit his Visionary Art Gallery web site at:
|http://www.awakenvisions.com/
|
-STORY
;---------------------
; TERRAINS Section
; Up to 10 terrains (0-9) may be defined and then 'painted' onto maps.  Characters must
; possess the correct equipment to cross certain terrains.  Terrain 0 is always cross-able
; by all characters.
;
;	arg0	the terrain ID  0-9
;   	arg1	the name of the terrain (keep it short, it shows up on the terrain editor palette)
;	arg2	the damage inflicted on a character when walking on this terrain (negative heals)
;
+TERRAINS
;	arg0		arg1			arg2
;
	0,		"No Hindrance",		0
	1,		"Lava",			5000
	2,		"Electricity",		5000
	3,		"Mountains",		0
	4,		"Deep Water",		0
	5,		"Sky",			0
	6,		"Snow",			0
	7,		"",			0
	8,		"Healing",			-5000
	9,		"Impassable",		0

-TERRAINS
;---------------------
; EQUIP names section
;
; This section is completely optional.  You only need it if you want to have different
; names for the standard equipment classes.
;
;  arg 0 	the equip ID (must be one of the following numbers):
;
;  				0	// "Helmet"
;  				1	// "Armor"
;  				10	// "Boots"
;  				11	// "Shield"
;  				12	// "Ring"
;  				13	// "Amulet
;
;  arg1		the name for that class of item.  (Keep it short as it gets used in a lot of cramped places.)
;
+EQUIP
;	arg0		arg1
;	ID		Name

  	0,		"Helm"
 	1,		"Torso"
 	10,		"Terrains"
 	11,		"Left hand"
 	12,		"Ring"
 	13,		"Amulet"
-EQUIP
;--------------------
; MAPS section
;
; Each map in the world (world, city, cave, etc.) needs an entry in this table
; Map 0 is always the main world map.
;
;  Each map needs the following arguments:
;
;	arg0	the map ID (0-255)  0 is main world map  Link points are via map numbers
;
;	arg1	the image file name of the map (a JPG usually, but RLE BMP is OK)
;
;	arg2	the OBL file name for the map (which places link point objects on that map
;			Note: if a terrain file exists, it must share the same name, so do NOT
;			put an extension on the file name.  "iceland" would indicate both
;			"iceland.OBL" and "iceland.TER" (and possibly other files as development
;			continues.  The OBL and TER files are created when you use the map editor.
;			You are primarily responsible for generating the image file (JPG).
;			This is also the root name of the MIDI music file played when wandering
;			That map. (music files should be in the world or root MIDI folder)
;
;	arg3	The map name.  This appears briefly as the user changes maps.
;
;   arg4	The Map FLAGS. This is a number, containing several flags, which controls
;			specific behaviours of players while on a map.  Add together the values
;			of each flag you want and then set the map flags to that value.  For example,
;			if you want both flag 2 and flag 4, then set the map flags to "6"
;           The flag values are:
;
;				1		// enables pet vs pet battles (but protects players from pets)
;				2		// enables pets to be used against other players or pets (if pkers or no safehaven)
;				4		// enables "no protection from PKer"
;				8		// enables "no PKing allowed here at all"
;				16		// enables "LADDER" reporting. (PK kills on this map are reported to ladder server)
;				32		// enables "show all link names." Normally link names are hidden until after first use of link.
;				64		// disables "Shadows" under heroes (and monsters) on map and in scenes of that map.
;				128		// disables the use of pets (cannot summon them) on this map.
;				256		// disables eavesdropping to and from players on this map.  (you can still whisper, shout, etc.)
;				512		// designates the map a GUILD HALL map.  (not sure what this means yet...)
;
; FOR EXAMPLE:
;
;	arg0	arg1		arg2			arg3			arg4
;	ID	image file		OBL/TER/MID	root	Map Name (seen by player)	Map FLAGS
;
;	0,	wormCave.jpg,	wormCave,			"Wyrm Cavern",		0
;	5,	town2.jpg,		westin,			"Westin",			0
;	6,	town3.jpg,		stonetree,			"Stonetree",		0

+MAPS

#include maps.txt

-MAPS


;--------------------
; Tokens are used by the script engine to keep track of what the player has accomplished.
; Each token is just a number, in the range 1-4095
;
; When you design your quest, assign a token to each major phase of the quest.  For
; example, at the start of the game, the player has no tokens.  But after you have
; told them the nature of a puzzle, you would give the player the token which
; represents that puzzle.  That way, when the player returns to the same scene, the
; script engine sees that he already has the token and hence doesn't repeat the
; explanation (but perhaps gives a short recap reminder instead).  Once the player
; has completed the quest (killed the dragon, etc.) you give him a different token.
; If the player already has the final token for a quest, then the script engine
; can simply skip the whole thing, or just deliver a 'thank you' message.
;
; This example uses the least significant digit to identify the tokens (up to 10) 
; which belong to a single quest, and the higher digits as a 'quest #' (for
; example, token 47 would be token #7 of quest #4).  This is completely arbitrary
; and you are allowed to use token numbers in any order you like.
;
; For example, let's pretend there is a minor quest which requires killing a dragon.
; The tokens might be:
;
;  token 1  - the king has told me to kill the dragon
;  token 2  - I have killed the dragon
;  token 3  - I have returned to the king and gotten my reward
;
;------------------------------------------------------------------------------------
; You don't have to have a token defined in this section to use it in the script,
; But you will probably find it easier to keep track of things if you do.  Also,
; I use the descriptions you give here to create a 'log book' the player can read
; to review what they have done so far.
;
; You may find it easiest to write the outline of your quests in this section first,
; and not flesh out the actual scenes until the entire structure of the world has
; been defined.

+TOKENS
; Quest 1: The Traveller's Rest
	1, "I can buy a Well Ticket from the Traveller's Rest, outside Easthaven West Gate."

; Quest 2: The Groves
	2, "A fresher asked me how many lines there are in a sonnet.."
	3, "I have a password for entering The Groves, deep in The Gnarl Forest."

; Quest 3: The Running Shoes
	4, "After killing 3 medusae Harry Marshe gave me the Running Shoes."

; Quest 4: The Vault Key
	5, "I offered to collect some rare flowers from The Gnarl Forest for Rose, the flower-girl."
	6, "I found some rare flowers!"
	7, "The flower-girl told me the Fool's favourite number."
	8, "I out-witted the Fool and he gave me the key to a vault."

; Quest 5, The Breath Boots
	9, "I offered to unite two brothers in the Coral Caves."
      10, "The brothers agreed to talk."

; Quest 6, Mrs Thatcher Must Die
	11, "Chantel and Howard of Sunnyville asked me to kill Mrs Thatcher."
      12, "Mrs Thatcher escaped!"
      13, "The Daemon is dead."

; Quest 7, The Spell of Resurrection
      14, "I'm enlightened."
      15, "A holy artifact stolen by brigands"
      16, "..and lost in the sea."
      17, "I must find the key to Hollows End.."
      18, "In return for the artefact, a most useful spell: resurrect."

; Quest 8, Exterminator
      19, "I agreed to go to Stoney Cottage to do exterminating work."

; Quest 9, The Flame Wyrm	(TOKEN TEMPORARILY REMOVED)
;	20, "I killed a Flame Wyrm in the west and took its treasure."

; Quest 10, The Chest
	21, "I found 10,000gp inside a chest in Easthaven."

; Quest 11, The Soggy Parchment
      22, "I found 5,000gp and a soggy piece of parchment inside a chest in the lost city of Kalkis."

; Quest 12, Agatha The Sooth-Sayer
	23, "I made a new friend - Redd."
	24, "Redd's mother, Agatha the sooth-sayer, promised to help if ever she can.. but why did someone steal her crystal ball?"

; Quest 13, The Witch's Brew Ingredients
	25, "The witches in Westwych gave me a black cat for getting some ingredients they needed."

; Quest 14, The Body Snatchers
	26, "I decided to help Tom and Wilma find out who stole the father's body."
	27, "The grave-digger said fifteen bodies were stolen."
	28, "Jake The Nose said a cart travelled by night towards Cityport. It hit a rut and a body fell off the back."
	29, "I found out a certain Mr Blister was using re-animated corpses as cheap labour at Woods & Co in Cityport."
	30, "Tom and Wilma were most grateful I helped. The body was reburied and all is well with them."
	31, "A mysterious old man named Jeremar asked me to meet him at the top left statue in the City University."
	32, "I met this crazy Jeremar but he disappeared after raising more questions than he answered."

; Quest 15, The Prisoner
	33, "I freed Diego from the jail in the gemstone mine."

; Quest 16, The Crown of Destiny
	34, "I agreed to look in Smokey Castle for The Crown of Destiny, and return it to the cave in The Deadlands."
	35, "I returned the crown and gained the future help of Merlir and Caspir if ever I need it."

; Quest 17, The bully
	36, "I earned 5000 coins from some stupid rich kid just for giving a bully a bit of a kicking."

; Quest 18: Delivery Work
	37, "I agreed to deliver ten mushroom pies to Fatso in Woodford."

; Quest 19: Hector's Ghost
	38, "I promised to try to reunite Hector with his wife, Adromache, if only I can find her final resting place.."
	39, "The Andromache I am looking for is not buried in the Big Smoke graveyard. The gravedigger said to check the library records."
	40, "A chap named H told me to meet him at 'Chaffer's Way' if I wanted further information on Adromache and Hector."
	41, "H told me that Adromache was buried under the floor of the 'Church of Saint Nobody'."
	42, "I reunited Hector with Adromache, and found a pair of boots."

;	100, Can use Paralysis spell
;     101, Can use Stun spell
;     102, Given to Mage
;     103, Given to Druid
;     104, Can use Sap Mana spell               	
;     105, Can use Heal All spells
;     106, Can use Numbness spell
;    	107, Can use Slumber spell
;     108, Can use Confuse spell
;     109, Can use Gag spell
;     110, Given to Samurai
;    	111, Given to Archer
;     112, Given to Outcast
;    	113, Given to Ninja
;     114, Given to Gunslinger
;     115, Given to Drow
;	116, Can use Poison spell	
;	117, Given to Musician	
;	118, Non-equipable 'equips' for pet grooming
;	119, Given to Hippy

;	120, Can use ele 0 heal spells	NOT IMPLEMENTED
;	121, Can use ele 1 Water attack spells
;	122, Can use ele 2 Nature attack spells
;	123, Can use ele 3 Earth attack spells
;	124, Can use ele 4 Death attack spells
;	125, Can use ele 5 Fire attack spells
;	126, Can use ele 6 Spirit attack spells
;	127, Can use ele 7 Air attack spells

;     200, Breaks parties for checker scene to update tokens + any other reason
;     201, Given upon updating of tokens 
;     202, Given upon updating of tokens
;     203, Given upon updating of tokens
;     204, Given upon updating of tokens in v1.33

;	300, Given upon choosing to go by boat to Cityport (and taken upon arrival)
;	301, Given upon choosing to go by boat to Sunnyville (and taken upon arrival)
            
-TOKENS


;---------------------
; ELEMENTS Section
; 
; Every world has exactly 8 'elements' which you must define (or terrible things will happen..
; woe is you!)  The 8 elements form a circle which describes their effectiveness against
; each other.  The opposing element is most effective against an element.
;
; Visualize the IDs like this (many thanks to Janne Jaula for this):
;
;            0
;         7  |  1
;          \ | /
;    	  6 ---+--- 2
;          / | \
;         5  |  3
;            4
;
; With ID 0 at the NORTH position.  This must be your 'healing' spell. and will apply healing
; equally to all characters, independent of their element affinities.
;
; The rest of the elements wield pain according to their position on the chart with element 1, 
; for example, delivering the most damage to element 5, somewhat less to 4 and 6, and a little to 7 and 3
; while hardly any to 0 1 and 2.
;
; It is likely that element 4 (the opposite of 0) will also be singled out for some special
; effect in the future... the element table is new :-)
;
;	arg0	the element ID  0-7
;  	 arg1	the name of the Element (keep it short, it shows up on the element affinity chart. Also, if the first letter could be unique, it would help)
;
; Note: you can actually use element IDs from 8-255 as well, with Spells and Monsters.  But you cannot
; name those elements (they all show up as "chaos" elements)
;
+ELEMENTS
;	arg0		arg1				
;
	0,		"Life"		
	1,		"Water"			
	2,		"Nature"			
	3,		"Earth"			
	4,		"Death"		
	5,		"Fire"		
	6,		"Spirit"		
	7,		"Air"		
-ELEMENTS

;-----------------------
; HANDS section
;
; Similar to elements, the 'hand' classes represent the different styles of
; weapons which can be held in the 'right-hand.' The EQUIP screen allows the
; player to train themselves in these 8 categories.  Only after they meet
; the required minimum level in a category are they able to wield weapons of
; that category.  In theory, training in excess of that point should increase
; the effectiveness of that weapon when used.  (though implementation of that
; effect might be delayed)
;
; Note that the first 4 hand entries have custom icons in the game which look
; roughly like a sword, a staff, a bow, and a musical note...  so unless you
; have a compelling need to change them...
;
;	arg0	The ID of the 'hand' which strangely enough is numbered 0-7 even though
;			elsewhere it is referred to as 1-8, so I expect to needlessly confuse
;			you about this.
;	arg1	The name of the weapon class.  Note that each character class starts
;			off able to use only one of these classes.
;	arg2	The 'range' of the weapons class.  This should be a number in the range
;			0-100 which represents the distance at which EQUIP attacks WILL NOT MISS. A
;			small range circle will be drawn at your feet when you have the EQUIP
;			list selected and it is your turn to fight.
;
; 	arg0		arg1
;	ID		Name

+HANDS
;	 arg0		arg1		arg2
;
	0,		"Ken",		30	; sword
	1,		"Elemental",	90	; staff
	2,		"Archery",		100	; bow
	3,		"Sonic",		60	; music		
	4,		"Street",		20	; fist	
	5,		"Ninjutsu",		80	; dart		
	6,		"Firearms",		90	; book		
	7,		"Pagan",		90	; spirit	
-HANDS


+ITEMS

#include items.txt

-ITEMS


+SPELLS

#include spells.txt

-SPELLS


+MONSTERS

#include monsters.txt

-MONSTERS


+GROUPS

#include groups.txt

-GROUPS


+LEVELS

#include levels.txt

-LEVELS



;-------------------
; Individual Scenes (each needs a unique scene number)
;
; Reserved Scene numbers are:
;
;   0	Well of Souls (primary well for your main map)
;   1   General CAMP scene (inherits jpeg, theme from closest link)
;   2   General FIGHT scene (inherits jpeg, theme, and monster level from closest link)
;
; The following is a list of available scene commands and their usage
;
;--------------------
; THEMES section
;
;	THEME	<sound Theme> (if no number given, then use theme from link point)
;			0:			// stop ambient sounds
;			1:			// near a bubbling brook
;			2:			// rain storm
;			3:			// windy aerie
;			4:			// light wind
;			5:			// waterFall
;			6:			// campfire
;			7:			// Raging Fire
;			8:			// Birds
;
; This command turns on and off the background ambient sound effects in the scene. (the initial
; theme can be started automatically as part of the SCENE command)
;
; -
;
; This section allows you to extend the sound themes available within your scenes.	A sound theme
; consists of a single looped sound (played over and over for as long as the theme is in progress)
; and one or more one-shot sounds (played at random intervals).
;
; arg0 ID (1-255)	(note that these override the built-in themes, so avoid using the lower numbered
;					themes if you want to keep the built-in themes available
;
; arg1 name			this is just your friendly name for the theme
;
; arg2 loopSound	The name of the .wav file to be looped.  Do not include the .wav extension here, as
;					it is assumed.  The sound effect file is expected to be in your world's SFX folder, and
;					if not found there, the WoS/SFX folder is checked next.  This sound is optional, but
;					if you leave it out, don't forget to leave the comma where it would have been.
;
; argN oneshots		One or more single-shot sounds may be defined.  These are defined with the format
;					"seconds=sound" as in: "10=splash" meaning: play the splash sound about every 10 seconds
;					on average, but randomly.  You should adjust the seconds field until you get the sound
;					you like.  You will need to adjust the timing, volume, and number of single-shots until
;					you get a sound you like.
+THEMES
;arg0		arg1		arg2		arg3	-	N
;ID		name		loopSound 	seconds=sound
;
; note: reserve first 20 for the hard-coded themes (also note that 0 means 'use closest link theme' and -1 means 'silence')

20,	cavedrip,	campfire1,	10=drip1,	10=bird1,	10=splash1
21,	wormcave,	,		10=Chirp1,	20=Puke2 
22,	underWater,	underWater1,10=stream1	20=splash1
23,	cave,		, 		10=drip2, 	20=Chirp6, 30=sniff, 60=Deadship
24,	scaryCave,	, 		10=scaryWind,20=wind8, 60=creakdoor2
25,	forest, 	, 		10=Chirp1, 	10=Chirp2, 10=Chirp3, 10=Chirp4, 10=Chirp5, 10=Chirp6, 10=Chirp7, 10=Chirp8, 30=owl2, 40=wind8, 50=Mosquito1, 50=owl1,
26,	crag, 	, 		10=fire1, 	15=campfire1, 15=stream1, 35=boom1, 40=boom3, 45=boom2, 50=growl15,
27, 	swords, 	, 		5=sword6, 	5=sword7, 	5=sword10, 5=sword8,
28, 	boat, 	stream1,	10=splash2,	10=splash1,	15=creakdoor, 	15=creakdoor2,

-THEMES


;-----------
;	SOUND	<WAV file>
;			as in:  SOUND "mySound.wav"
;
; This command causes the WAV file in the current world's SFX folder to be played (one time)
;
;-----------
;	BKGND	<JPEG file>
;			as in:  BKGND "myBackground"
;
; This command causes the scene's background jpeg to switch. Note that the background
; specified in the SCENE command will be shown first, so if you need to avoid a flash
; of the default background before you determine (via tokens) which background is
; appropriate, be sure to set the default background to something like all black, or 
; whatever works for your world.
;
;-----------
;	WEATHER	<Weather ID#>
;			as in:  WEATHER 9
;
; This command causes the scene's weather to change
;
;-----------
;	FX	<FX ID #>
;			as in:  FX 2
;
; This command causes the scene's FX to change
;
;-----------
; @labelName
;
; Starting a line of a scene with an @ symbol makes that line a 'label.'  Several commands
; allow you to jump to a labeled line of a scene in an effort to loop, or perform different
; actions based upon the player's circumstances.
;
; Note: the label must be on a line by itself - do not place other scene commands on the same
; line

;-----------
;	GOTO	<labelName>
;
; This command immediately jumps to the specified label and then executes the script command
; on the following line.  Be careful about unintentionally creating infinite loops. Spaces are
; not allowed in label names.  Just use letters and numbers with a single @ in front
;
; For example:
;
;     SCENE <arguments not shown>
;       command1
;       command2
;     @thisIsALabel
;       command3
;       command4
;       GOTO @thisIsALabel
;     END 
;
; This scene will execute commands 1 and 2, then repeat infintely executing commands 3 and 4
;
;-----------
;  GOTO EXIT
;
; This command causes the players to be booted from the scene and back to the map, as if the
; scene host pressed their (camp) EXIT button.
;
;-----------
;  GOTO SCENE <scene number>
;
; This command lets you jump the player from the current scene into a new scene (which then starts
; at its beginning.)
;
; However, when you exit the scene, you will be at your original location (the place where you
; dropped into the original scene). This command never changes your current map.
;
; Jumping to a non-existent scene number may not fail gracefully.
;
;-----------
;  GOTO LINK <map number>, <link number>, <dropin code>
;
; This command actually moves the character to a position just above the specified link on the specified map.
; For example:
;
;     GOTO LINK 0,0
;
; On evergreen, this would take you on top of the gateway link on the main map.
;
; The third argument (dropin code), if present and non-zero, causes the player to drop 'into' the link
; after arriving.  What happens after that is a function of the link in question (might do nothing, might
; go into a scene, might link to a whole different map)
;
; So:
;
;     GOTO LINK 0,0,1
;
; On evergreen, this would move the player to just above the gateway link on the main map, and then drop the
; player INTO the gateway (scene).  When the player exited that scene, they would be on the main map just
; above the gateway.
;
;-----------
;	IF		<id list>   <label>
;			Tnn+Snn-Inn+Gnn+WIN-LOSE+ALIVE-DEAD+YES-NO
;           Token, Spell, Item, Gold, Won last fight, lost last fight, still alive, dead, answered YES or NO to recent ASK
;           all tokens measured against scene SERVER only
;			all specified terms must be TRUE (or FALSE if preceded by minus sign)
;
; This command checks to see if the condition given is TRUE and if so, it jumps to the specified
; label.  Otherwise it just continues with the next scene command.
;
; The condition is specified as a list of IDs separated by plus and minus signs.  The IDs each start
; with a unique letter possibly followed by a number.  For example "I34" means "Item 34" It is TRUE 
; if the player hosting the scene has item 34 in his or her pocket.  "T12" means "Token 12" and
; usually you will check the presence of tokens to decide which path to take through your scene.
;
; If you need two conditions to both be true in order to jump to the label, then list both IDs and
; separate them by a plus sign.  If you use a minus sign in front of an ID, then it is true if
; the player does NOT have that ID.  For example "T12+I15-S22" means: "If the player has Token 12
; AND item 15, BUT NOT spell 22, then the condition is true and the jump to label will occur"
;
; For example:
;
;     SCENE <arguments not shown>
;       command1
;     @label1
;       command2
;       IF  T3-T4+T5, @label2
;       GOTO label1
;     @label2
;       command3
;     END
;
; In this case, the scene starts by executing command1, and then gets stuck in a loop, executing
; command2 over and over until the condition is true, allowing it to jump to label2 and execute
; command3 then leave.  
;
; The condition we are looking for is "Player has token3 and token 5, but NOT token 4" (and
; again, only the player who is hosting the scene is checked. tokens and items in the possession
; of other players in the scene are not important)
;
; The condition IDs supported are:
;
;     ALIVE		player is alive
;	  Cn		true if player is of character class 'n'
;     DEAD		player is dead
;	  Enn		Player is EQUIPPED with item nn (not just in possession of one)
;     Fnn		true if player is on a map with this 'map flag' set. (nn = 1, 2, 4, 8, 16, 32, etc.)
;     Gnn		Player has at least nn gold pieces
;     Hnn		true if this CHARACTER is nn hours old (or older)
;     Inn		player has item nn (from ITEMS table)
;     LOSE		player lost last fight in this scene
;     KBn		player has been killed at least once, by monster ID = n
;     KBn.x     player has been killed at least x times by monster ID = n
;     KMn		player has killed at least one monster 'n' (monster ID = n)
;     KMn.x     player has killed at least 'x' monsters of type 'n'
;     M0		true if player is a CHEATER character  (m-zero)
;     M2		true if player character has played in a modified world before.
;     M4		true if player has ever turned off the "avoid modified quest files" option.
;     NO		player answered NO to last ASK scene comman
;     P0    	true if player is a PLAYER KILLER (p-zero)
;     Pnn     	true if player is a PLAYER KILLER *and* has killed other players at least nn times.
;     Qword		player answered 'word' to last ASK scene command (use ^ if your word has spaces.. "Qbutter^fly" matches "butter fly")
;     Rnn		Random Number (nn = 00-99, represents percent chance of TRUE)
;     Snn		player has spell nn (from SPELLS table)
;	  Tnn		player has token nn (from TOKENS table)
;     Vnn  		true if player's level is greater than or equal to nn
;     WIN		Player won last fight in this scene (after FIGHT scene command)
;     XP		true if the COUNTDOWN TIMER has EXPIRED (use the COUNTDOWN opcode to start the timer)
;     YES		player answered YES to last ASK scene command
;	  #nn		true if player is currently on map nn (as defined in MAPS table)
;
;
;-----------
;   ACTOR	<ID #><character name><skin><pose><x,y>
;
; This command creates an ACTOR in the scene. Actors can walk around and deliver
; scripted lines of text.  Each actor in the scene needs a unique ID number (unique
; to that scene, not to ALL scenes :-)
;
; You give the character a name, the name of a skin file with its image in it, and the
; pose (offset within that file).  These 'villager' skin files are stored in the world's
; MONSTER folder and are long filmstrips with many different villagers in a single
; file.  You also give the actor an initial position to be standing on the screen.
;
; X and Y vary from zero to 100 which relate to the max size of the window (so x=100 is
; always the far right edge of the screen, no matter what size the window has been stretched
; to.)  Using values sufficiently outside the range will start the actor 'off screen' so that
; a subsequent 'MOVE' command can have them appear to walk in from off stage.
;
; You usually define an ACTOR or two right at the start of the screen, but you can use
; the command at any time, in case you have an actor which is only present if certain
; conditions have been met.
;
; For example:
;
;    SCENE <arguments not shown>
;       ACTOR 1, "Old Carl", "joshVillagers", 3, 20, 80
;       IF -T12, @noYoungCarl
;       ACTOR 2, "Young Carl", "joshVillagers", 15, 50, 80
;    @noYoungCarl
;    END
;
; Here the scene starts by creating "Old Carl" as actor #1 standing at the lower left of
; the screen.  Then if the player does NOT have token 12 ("-T12") it jumps to the label
; and skips the creation of "Young Carl" who otherwise would be standing in the lower
; center of the screen.
;
;-----------
;   MOVE	<ID #>, <x>, <y> {,<optional mode>}
;
; This command tells a previously declared ACTOR to move to a new x, y position on the
; screen.  This is a real time action and it may take them awhile to amble on over.  You
; might need a WAIT command if you want the next scene command to not take place until after
; they get there.
;
; The optional <mode> value controls the nature of the motion.  If you don't specify it, it will
; use mode 0 (normal walking).  mode '1' will cause the actor to instantly teleport to the new x,y
; location (A good way to get a character offscreen in a hurry)
;
; For example:
;
;    ...
;    MOVE  1, 50,50              <-- actor '1' walks leisurely to center of screen
;    MOVE  2, 0,0, 1             <-- actor '2' teleports instantly to upper left of screen
;
;-----------
;   POSE	<pose>	{, pose2, pose3}	(change pose of current actor)
;
; When you created the ACTOR, you specified both an image file name, and an offset (pose) to
; a particular image of that file's filmstrip.  If you have several images of the same
; character in that file, this command lets you flip between them for whatever reason you
; like.  For example, I use it to 'morph' the evil witch into her true self.
;
; The pose you specify will be held until you specify a different one.  HOWEVER, as of
; version A30, you can specify two additional poses (3 in all, pose1, pose2, and pose3).
;
; If you specify the additional poses then the actor will cycle between pose1 and pose2
; for approximately equal (but random) amounts of time, with occasional brief displays
; of pose3.  For example, pose1 and pose2 might be a frog looking in different directions,
; while pose3 shows his toungue flitting out.  You cannot currently control the timing,
; so for critical animations, just use a sequence of POSE commands with appropriate WAIT
; commands.  The advantage of the multi-pose POSE command is that the animation continues
; even after the script END command, and requires no special scripting.
;
;-----------
;	SELECT	<ID #>		(select actor # as the current speaker)
;
; Some commands work on the 'current actor' as opposed to calling one out by name.  This
; command lets you select the current actor by ID number.
;
;-----------
;	' line of speech by character (additional lines require 'more' click by reader)
;
; This was the first way of making an actor speak.  I seldom use it anymore, but let's
; pretend it is important anyway.  For example:
;
;   SCENE ...
;      ACTOR 1, "Billy", ...
;      ACTOR 2, "Sally", ...
;      SELECT 1
;      ' Hello, my name is Billy
;      SELECT 2
;      ' Hello, my name is Sally
;   END
;
; This is pretty clumsy, and if all you are doing is speaking, it is more efficient to use
; the "N:" form instead, as in:
;
;   SCENE ...
;      ACTOR 1, "Billy", ...
;      ACTOR 2, "Sally", ...
;      1: Hello, my name is Billy
;      2: Hello, my name is Sally
;   END
;
; Each line of text you put in creates a speech bubble over the head of the actor who said it.
; Only one actor can have a speech bubble up at a time, so the script will automatically pause
; before executing the next speech line until the previous bubble disappears.  Bubbles disappear
; after a brief timeout, or can be cleared by right-clicking in them.
;
; The percent sign symbol (%) is used as a special character.  The number following it lets you
; stick in real-time information about the current players.
;
;		%0 - speaking character's name
;		%1 - server player name (player hosting the scene)
;		%2 - client name (each client sees his or her own name)
;		%3 - a random insult name "stupid maggoty rat-face"
;		%4 - name of the last person to type in chat
;		%5 - name of last person who typed YOUR NAME at start of chat line
;   	%C  - class name of scene host ("magic-user")
;       %Cn - class name of class n (starting at 1) from world level tables.
;		%In - name of ITEM n
;       %L  - level name of scene host ("emperor")
;       %Ln - level name for level n of scene host's class
;       %L-1 - level number of scene host ("99")
;		%Mn - name of MONSTER n
;		%Sn - name of SPELL n
;		%Tn - token name n
;       %% - inserts a single visible percent sign
;
; For example:
;
;      1: Hello, my name is %0.  Your name is %2. Your host's name is %1
;      2: I, %0, think you are a %3!
;      1: I am 99%% sure you are also a %3!
;
;-----------
;   N:  (shorthand SELECT N followed by ' --  N is 0 to 9 only)
;       as in:
;       2: Actor 2 said this
;		1: Actor 1 said this
;
; As described more fully above.
;
;-----------
;   WAIT	<seconds>  (use decimal point for sub-seconds)
;
; This command lets you put in a little pause before the next command is executed.  As in:
;
;   SCENE ...
;       ACTOR 1, "Dave", joshVillagers, 1, 20, 80
;		MOVE 1, 80, 80
;		WAIT  3.5
;       1: I should be there about now
;   END
;
; This creates 'Dave" on the lower left of the screen and then starts him walking to the
; lower right.  3.5 seconds after starting his walk (whether he has finished it or not)
; his speech bubble pops up.
;
;-----------
;	FIGHT	<fight scene - no arguments means 'standard random fight appropriate to vicinity'>
;		FIGHT 1,2,2,4  (fight 4 monsters total, two of type 2)
;
; This command plays out a monster fight within the scripted scene itself.  The next 
; scene command is not executed until the results of the fight are known (all heroes dead
; or all monsters dead).  At that point the WIN and LOSE "IF" conditionals will work.
;
; You can call out a particular collection of monsters via their IDs from the MONSTERS table,
; or you can have monsters selected randomly from the current map area monster group.
;
; For example:
;
;     SCENE ...
;         ACTOR 1, "Zor", evilPeople, 1, 50, 50
;         1: Prepare to die, %2, you %3!
;         FIGHT 23,12,12
;         IF WON, @youWon
;         1: I knew you would lose, you %3!
;         END
;     @youWon
;         1: Big deal, you won, so what, who cares.
;     END
;
; So here we create 'Zor' in the top center of the screen and he insults us.  Then 3 monsters
; appear as in a regular fight scene (with Zor still standing there watching us).  We get one
; monster #23, and two monster #12s (as defined in the MONSTERS table)
;
; After the fight, if the player wins, we jump to label '@youWon' and graciously concede defeat.
; Otherwise we execute the line following the IF and brag a little, then END the scene.
;
; Note that this scene now has two END commands in it.  That's OK.  The first one we execute ends
; the scene.
;
; Stupid FIGHT tricks:
;
;  Use the opcode FIGHT2 for exactly the same effect, except the scene host is also 'stuck in the
;  fight (similar to a PK Attack) until they stand still without fighting for 20 seconds or so
;  (this is about as close to a forced fight to the death as the game gets)
;
; Mercenaries
;
;  If you call out a monster by ID, but add a minus sign, as in:
;  
;    FIGHT  1, 2, 3, -4
;
;  Then that monster will fight on your side (in this case monster ID 4 is the helper against 3 evil monsters)
;
; Mixed Stuff to The Max
;
;  If you include a '*' as one of the monster IDs, it means "also use monsters from the map", so:
;
;     FIGHT  *, 1, 2, 3
;
;  Means you will have a fight with monsters 1, 2, and 3 PLUS whatever a normal fight at this location might
;  have had.
;
; Scene 2 is the FIGHT SCENE
;
;   I hope I am not lying when I say that the FIGHT command in SCENE 2 is what controls all standard map
;   monster fights.  (the kind you get drawn into when hunting or walking the map).  So anything clever you
;   do in that scene will affect all monster fights.  So, you could check what map you were on, what tokens
;   the player had, their spiritual alignment (maybe) etc, and then populate the fight accordingly.
;   This was my intention, in any case, though I never had the courage to try anything radical.
;
;-----------
;	GIVE	<id#> 
;
; This command gives the specified object to all current members of the scene (um, even 
; dead ones I think).  Objects are specified the same as in the "IF" command conditionals
; with a letter followed by a number.  Unlike the IF command, however, you can only give
; one thing per line. (no plus and minus signs please)
;
; Objects you can give include:
;
;		Tn	token N
;		Gn	N pieces of gold
;		In	item N
;       Sn  spell N
;       Hn  n health points (up to max)
;       Mn  n magic points (up to max)
;       <given to all members of scene>
;
; For example
;
;     SCENE ...
;         ACTOR 1, "King", joshRoyalty, 3, 50, 50
;         IF T10, @killedDragon
;         1: I see you have not yet killed the dragon, begone!
;         END
;     @killedDragon
;         1: Hey, you killed the dragon, accept this gold from me, please!
;         GIVE G100
;     END
;
; So, when we visit this scene, the king checks our pocket for token 10 (which we
; presumably get after killing the dragon in some other scene) and if we don't have
; it, the scene ends with a 'hint'
;
; Otherwise, we jump to the label and the king rewards us with 100 gold pieces (generous
; guy, huh?)
;
; Note that this is a bad scene since once we kill the dragon the king will give us another
; 100 GP every time we visit the scene.  Most quests should have another token which means
; "I already gave you your reward" and the scene would check both tokens so we only got
; our reward once.
;
;-----------
;	TAKE	<ID>		<this is evil!>
;		<taken from all members of scene>
;
; Same as the GIVE command, but in reverse.  Very evil.
;
;-----------
;   ASK		<seconds> - waits a while for scene server to type something ("yes" or "no" flags set in response)
;
; This command is used when you want to ask the player a question and actually read his or
; her answer and do something based on the response.  The actual question is asked using the
; normal speech bubble stuff.  You just follow that command with an ASK command as in this
; example:
;
;     SCENE ...
;        ACTOR 1, "King", ...
;        1: Say, %1, does this coat make me look fat?
;		 ASK	20
;        IF  YES, @saidYes
;        1: You really think so?  Thanks!
;        END
;     @saidYes
;        1: Off with your head!  Guards, take %1 to the dungeon and relieve HIM of a few pounds!		
;     END
;
; Here the king poses a question.  The "ASK 20" pauses the script for up to 20 seconds (or
; until the host player types a line of chat).
;
; If a line of chat is entered before the timeout, and it starts with something resembling
; a yes, then the "YES" condition will be true and the "IF" command will jump to the label
; where the king is unhappy with us.  Otherwise (nothing was typed, or what was typed did
; not look like a yes) the king is happy enough and the scene ends.
;
; The "Qword" conditional lets you scan the host player's response for particular words or
; letter sequences ("yes" would be found inside of "yesterday" for example), so you could have
; complicated processing like:
;
;     ...
;     1: What is your favorite color?
;     ASK  30
;     IF Qblue, @wasBlue
;     IF Qred, @wasRed
;     IF Qorange, @wasOrange
;     ...
;
; Note that "Qwords" cannot include spaces, so you cannot have "QI don't know" which would be cool
; for the Monty Python fans.
;
; Oooooh, if I was a good little  programmer, this might work:
;
;      IF QI+Qdon't+@know, @heDontKnow
;
; Of course, that would also trigger on the player response: "Don't you know I like red?" since it 
; checks for the presence of the "Qword" anywhere in the response.  I *think* case is not 
; important (I'm using standard c library "strstr()" for anyone who is interested)
;
;-----------
;	OFFER	<item>{,<item>} - displays a SHOP button which, when pressed, offers the specified items for sale
;
; Normally a scene does not have a SHOP button until you execute an OFFER command.  The OFFER
; command comes in two flavors, differing in the way you specify the list of items available
; in the store.
;
; The OFFER command takes a simple item list and is best used for specialty stores offering
; a limited number of items, as in:
;
;     SCENE ...
;        ACTOR 1, "Shopkeeper", ...
;        1: I have only these items. Buy them or leave!
;        OFFER  4, 12, 103, 11, 22, 7, 15
;     END
;
; Only those seven items will appear when the player presses the SHOP button.  Item numbers
; match to entries in the ITEMS table
;
;-----------
;	OFFER2	<minLevel>,<maxLevel>{,itemClass} - displays a SHOP which offers all defined items between the two levels (with non-zero prices)
;			note: only the first 50 or so qualifying items will make it, so don't try for one store to sell EVERYTHING
;			the optional third argument limits it to items of the specified class.
;
; This newer form of the OFFER command is good for shops which provide a large number of items
; of a particular class.  For example, all boots between level 5 and 10 would be:
;
;      OFFER2 5, 10, 20
;
; Where the class number (20 for boots) is set in the ITEMS table 'class' column.
;
; You can have your store sell several classes  of items at the same time, by including the correct
; three numbers for each class: <minLevel>,<maxLevel>,<itemClass>
;
; As in:
;
;      OFFER2 5,10,20,  5,10,21,  1,10,22
;
; This would offer all class 20 items between levels 5 and 10, all class 21 items between levels
; 5 and 10, and all class 22 items between levels 1 and 10.  (the level limits are inclusive)
;
;-----------
;   GAME  <game number>
;
; Similar to the OFFER button (and you cannot use both OFFER and GAME in the same scene), this
; results in a GAME button appearing for the player.
;
; Pressing that button brings up a mini-game for the  player to enjoy while in the scene.
;
;   	 GAME 1	- The slobber slots machine.
;	 GAME 2	- The Monster Racer
;	 GAME 3	- The Search for Pi at Home
;	 GAME 4	- Blackjack 
;  	 GAME 5  	- Pokegatchi Training Center (same as 'train pet' on Equip Screen)
;	 GAME 6  	- Asteroids
;  	 GAME 7  	- Stock Market Game
;	 GAME 8  	- Tetris
;
;-----------
;   COUNTDOWN <seconds>
;
; This command starts a COUNTDOWN timer (displayed on the main screen) which counts down to zero.
; When it hits zero, it disappears.  Cool huh?
;
; To make it useful, you need a scene which tests it with the 'X' conditional, as in:
;
;	IF  XP, @youAreTooLate
;  	1: You made it before the countdown finished!
;	END

; @youAreTooLate
;  	1: Could you possibly have walked any more slowly?
;
; You can turn the counter off prematurely by setting it to zero ("COUNTDOWN 0")
; The countdown automatically terminates if you leave the game, or change characters.
;
;----------------------------------------------
; The SCENE opcode has the following arguments:
;
;	arg0		arg1		arg2		arg3		arg4		arg5		arg6
;	SCENE		scnNum		scn.jpg		Style		Name		Effects		Weather
;
;	scnNum - every scene must have a unique scene number.  Link points on maps can call out specific scene numbers.  In addition to that
; 		several scene numbers are special:
;				0	Is always the intial well of souls (where you incarnate)
;				1	The standard 'camp' scene (links can override details)
;				2	The standard 'fight' scene (links can override details)
;				it is advised that you treat scene numbers 0 through 9 as 'reserved' to 
;				avoid conflicts with later developments
;
;	scn.jpg	- The background JPG file (from the SCENES folder of the world) to be used
;			as the background image of the scene.  Do not include the .JPG extension
;
;	Style	-	To Be Defined
;				WELL, FIGHT, SCENE
;
;	Name	- The name of the scene (seen on title bar while in the scene)
;
;	Effects	-	Special effects applied to the background JPG.  These effects last for the
;				duration of the scene (except when temporarily modified by a spell during
;				a particular magical attack)
;				0	No effects
;				1	Underwater ripple (as though viewer is under water)
;				2	Lake ripple (as though the bottom 30% of the scene is a lake reflecting)
;				3	Video (every other line is black, giving a 'coarse video' quality
;				4	Jitter (random vertical jitter)
;				5	EarthQuake
;
;	Weather	-	Special effect (on top of all players) showin weather
;				0	no weather
;				1	rain
;				2   medium rain
;				3   heavy rain
;				7   light snow
;				8   medium snow
;				9   heavy snow
;

+SCENES
;--------------
; SCENE 0 must be primary well of souls
SCENE 0		black 
;	MUSIC	""
	THEME	-1
	WEATHER	0
	FX	0
	ACTOR	1,	"The Unblind Sage", actors1, 27, -15, 70
	WAIT	4
;	SOUND	"haunt.wav"
	MOVE	1,	30, 60, 1
	WAIT	4
	POSE	25
	WAIT	1.5
;	1: Ahhhhhhhhhhhh SHADUPP!!!!
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	MOVE	1,	35, 70
	WAIT	2
;	1: Welcome to the Well of Souls, traveller.. hehehe!
	MOVE	1,	40, 75
	WAIT	2
;	1: Here you find a Void.
	MOVE	1,	45, 80
;	1: You must pass through to INCARNATE your soul into the world.
	WAIT	2
	MOVE	1,	50, 75
	WAIT	2
;	1: When you enter the world you will be sent to the HELP Centre.
	WAIT	1.5
	SOUND	"petChew.wav"
	POSE	26
	MOVE	1,	45, 70
	WAIT	1.5
	POSE	25
;	1: The HELP Centre tells where to buy things and get info.
	WAIT	2
;	1: This bit says not very much
	MOVE	1,	35, 77
	WAIT	2
;	1: ..and this bit is not worth reading at all.
	WAIT	3
	SOUND	"petBurp.wav"
	POSE	27
	WAIT	3
;	1: Be prepared..
	POSE	25
	WAIT	3
;	SOUND	"laugh2.wav"
	MOVE	1,	-100, 70, 1
	WAIT	2
	MUSIC	"Twilight.mid"
END
;--------------
; SCENE 1 must be primary CAMP scene
;
SCENE 1
	THEME	0
	IF	M0, @void
	IF	-T204, @newTokens
	IF	-I719, @postHorseCheck
	COMPARE	#<num.hostHasPet92>, "1"
	IF= @postHorseCheck
	COMPARE	#<num.hostHasPet93>, "1"
	IF= @postHorseCheck
	HOST_TAKE	I719
	N: %2's horse is gone!
	@postHorseCheck
	IF	#1,  @maze1   
	IF	#2,  @goldenRealm 

	IF	#9,  @quiteDark		; travs jun
	IF	#10, @encounterCheck	; tbs
	IF	#11, @coralCaves

	IF	#13, @groves
  
	IF	#15, @shadows		; weepers cavern

	IF	#17, @shadows		; craggy cave
	IF	#18, @crag			; crag
	IF	#19, @encounterCheck	; sunnyville 

	IF	#21, @gnarlforest2

	IF	#23, @underWorldClub
	IF	#24, @encounterCheck	; cityport

	IF	#26, @encounterCheck	; easthaven
	IF	#27, @arena

	IF	#30, @sandstorm

	IF	#33, @quiteDark		; east tunnel
	IF	#34, @quiteDark		; east tunnel
	IF	#35, @hollows

	IF	#37, @reallydark		; the pit
	IF	#38, @shadows		; the grotto

	IF	#43, @jail

	IF	#48, @mine		; gemstone mine

	IF	#53, @crag
END
	@arena
	GOTO	SCENE	725
END
	@coralCaves
	COLOR	13
	COLOR	2013
END
	@crag
	COLOR	11
	COLOR	2011
END
	@encounterCheck
	IF	R8, @encounters
END
	@encounters
	GOTO	SCENE	750
END
	@goldenRealm
	COLOR	12
	GIVE	L1
	GIVE	H5000
	GIVE	M5000
END
	@groves
	COLOR	13
	WEATHER	7041
END
	@jail
	GOTO	SCENE 411
END
	@hollows
	COLOR	13
	ACTOR	1,	"", poltergeist, 1, 60, 75
	@whichHollowsCampStatement
	IF	DEAD, @end
	IF	R5, @end
	IF	R10, @HollowsCampStatement1
	IF	R20, @HollowsCampStatement2
	IF	R30, @HollowsCampStatement3
	IF	R40, @HollowsCampStatement4
	GOTO	@whichHollowsCampStatement
END
	@HollowsCampStatement1
	1: Watch out %2..
	WAIT	2
	MOVE	1,	-30, 75, 1
END
	@HollowsCampStatement2
	1: We're coming for you %2..
	WAIT	2
	MOVE	1,	-30, 75, 1
END
	@HollowsCampStatement3
	FIGHT	23, 23, 27, 29, 31, 
END
	@HollowsCampStatement4
	FIGHT	140, 140 
END
	@maze1
	SOUND	"drip1.wav"
	WAIT	3.5
	IF	R20, @mazelaff
	GOTO	@maze1
END
	@mazelaff
	SOUND	"laugh2.wav"
	WAIT	5
	GOTO	@maze1
END
	@mine
	COLOR	13
END
	@reallydark
	COLOR	13
	COLOR	2015
END
	@sandstorm
	WEATHER	6153
END
	@shadows
	COLOR	13
	COLOR	2013
END
	@quiteDark
	COLOR	13
	COLOR	2014
END
	@gnarlforest2
	COLOR	13
END	
	@underWorldClub
	GOTO	SCENE	751
END
	@newTokens
	PARTY T200
	GOTO	SCENE 5
END
	@void
	PARTY T200
	GOTO	LINK	0, 0, 1
END 
	@end
END
;-------------------------------------------
; SCENE 2 must be primary FIGHT scene (for automatic fights)
;
SCENE 2
	THEME	0
	IF	M0, @void
	STRCMP #<str.soul>, "66913567"
	IF= @void
	STRCMP #<str.soul>, "651441DD"
	IF= @void
	STRCMP #<str.soul>, "444D4FFD"
	IF= @void
	STRCMP #<str.soul>, "5B956B40"
	IF= @void
	IF	-I719, @postHorseCheck
	COMPARE	#<num.hostHasPet92>, "1"
	IF= @postHorseCheck
	COMPARE	#<num.hostHasPet93>, "1"
	IF= @postHorseCheck
	HOST_TAKE	I719
	N: %2's horse is gone!
	@postHorseCheck

	IF	#1, @maze1

	IF	#9, @travsJunctionNight

	IF	#11, @coralCaves

	IF	#13, @groves
  
	IF	#15, @shadows  

	IF	#17, @shadows
	IF	#18, @crag			; the crag

	IF	#21, @gnarlforest2
	IF	#22, @smokeyCastle
	IF	#23, @underWorldClub

	IF	#30, @sandstorm

	IF	#33, @quiteDark		; east tunnel
	IF	#34, @quiteDark		; east tunnel
	IF	#35, @hollows

	IF	#37, @reallydark
	IF	#38, @shadows		; grotto

	IF	#42, @westwych
	IF	#43, @jail
	IF	#44, @fight2

	IF	#48, @mine

	IF	#51, @sky
	IF	#52, @sky
	IF	#53, @crag			; crag2
	@fight
	FIGHT
END
	@coralCaves
	COLOR	13
	COLOR	2013
	FIGHT
END
	@crag
	COLOR	11
	COLOR	2011
	FIGHT
END
	@gnarlforest2
	COLOR	13
	FIGHT
END
	@groves
	COLOR	13
	WEATHER	7041
	FIGHT
END	
	@hollows
	COLOR	13
	IF	R45, @wwFairy
	FIGHT
	IF	WON, @end
	SOUND	"petCall.wav"
END
	@jail
	COLOR	13
	COLOR	2013
	FIGHT2
END
	@mine
	COLOR	13
	FIGHT
END
	@quiteDark
	COLOR	13
	COLOR	2014
	FIGHT
END
	@reallydark
	COLOR	13
	COLOR	2015
	FIGHT
END
	@sandstorm
	WEATHER	6153
	FIGHT
END
	@shadows
	COLOR	13
	COLOR	2013
	FIGHT
END
	@red
	COLOR	11
	COLOR	2011
	FIGHT
END
	@smokeyCastle
	IF	E704, @nicked
	IF	R45, @fight2
	IF	R55, @nicked
	GOTO	@smokeyCastle
END
	@fight2
	FIGHT2
END
	@nicked
	ACTOR	1,	"Nervy Guard", KBsEnforcer2ArasModd,	4, 5, 98
	ACTOR	2,	"Nervy Guard's mate", KBsEnforcer2ArasModd,	4, 25, 95
	ACTOR	3,	"Nervy Guard's other mate", KBsEnforcer2ArasModd,	4, 35, 100
	IF	E720,	@castleSneaking
	IF	E704,	@shadowMove
	1: You're NICKED!
	GOTO	LINK 43, 0
END
	@castleSneaking
	1: What was that?
	2: Heh, it must be a sneak theif!
	3: Yeah right, ha!
	GOTO	@escapeFromCastleGuards
END
	@shadowMove
	1: I swear I saw a shadow move!
	2: It was nothing.
	3: As if!
	@escapeFromCastleGuards
	WAIT	2
	N: You make your escape and thank your special footwear!
	WAIT	1.5
	GOTO	EXIT
END
	@sky
	IF	R90, @fight
	IF	R8, @fall1
	IF	R12, @fall2
	IF	R16, @fall3
	IF	R20, @fall4
	IF	R24, @fall5
	GOTO	@sky
END
	@travsJunctionNight
	COLOR	13
	COLOR	2014
	FIGHT
END
	@underWorldClub
	GOTO	SCENE	752
END
	@end
END
	@fall1
	TAKE	H2000
	N: You fell to the ground!
	GOTO	LINK	8, 9
END
	@fall2
	TAKE	H2000
	N: You fell to the ground!
	GOTO	LINK	12, 13
END
	@fall3
	TAKE	H2000
	N: You fell to the ground!
	GOTO	LINK	10, 9
END
	@fall4
	TAKE	H2000
	N: You fell to the ground!
	GOTO	LINK	16, 7
END
	@fall5
	TAKE	H2000
	N: You fell to the ground!
	GOTO	LINK	7, 10		
END
	@maze1
	IF	R35, @fight2
	FIGHT
END
	@void
	PARTY T200
	GOTO	LINK	0, 0, 1
END 
	@westwych
	IF	R30, @wwFairy
	FIGHT
END
	@wwFairy
	ACTOR	1,	"Faerie", GothNymph, 1, -15, 80
	POSE	1, 4, 2
	WAIT	1.5
	MOVE	1, 	25, 80, 1
	WAIT	2.5
	SOUND	"thunder1.wav"
	TAKE	H5000
	TAKE	M5000
	WAIT	1
	MOVE	1, -15, 115, 1
END
;------------------------------------------
; Fairie Ring
SCENE 3	 stones3
	SET hour, #<num.serverTimeHour>
	COMPARE #<hour>, 0
	IF< @day	
	COMPARE #<hour>, 1
	IF< @night
	COMPARE #<hour>, 2
	IF< @day	
	COMPARE #<hour>, 3
	IF< @night		
	COMPARE #<hour>, 4
	IF< @day
	COMPARE #<hour>, 5
	IF< @night		
	COMPARE #<hour>, 6
	IF< @day
	COMPARE #<hour>, 7
	IF< @night
	COMPARE #<hour>, 8
	IF< @day
	COMPARE #<hour>, 9
	IF< @night
	COMPARE #<hour>, 10
	IF< @day
	COMPARE #<hour>, 11
	IF< @night
	COMPARE #<hour>, 12
	IF< @day
	COMPARE #<hour>, 13
	IF< @night
	COMPARE #<hour>, 14
	IF< @day
	COMPARE #<hour>, 15
	IF< @night
	COMPARE #<hour>, 16
	IF< @day
	COMPARE #<hour>, 17
	IF< @night
	COMPARE #<hour>, 18
	IF< @day
	COMPARE #<hour>, 19
	IF< @night
	COMPARE #<hour>, 20
	IF< @day
	COMPARE #<hour>, 21
	IF< @night
	COMPARE #<hour>, 22
	IF< @day
	COMPARE #<hour>, 23
	IF< @night
	GOTO	@day
END
	@night
	COLOR	2014
	COLOR	13
	@day
	WEATHER	1
	THEME		1
	ACTOR	1,	"Fairie", Sinful_Nina, 1, 70, 65
	POSE	1, 4
	ACTOR	2,	"Fairie", Sinful_Nina, 1, 25, 65
	POSE	1, 4
	ACTOR	3,	"Fairie", Sinful_Nina, 1, 50, 85
	POSE	1, 4
	ACTOR	4,	"Fairie", Sinful_Nina, 1, 50, 50
	POSE	1, 4
	MOVE	1, 45, 115
	MOVE	2, 75, 115
	MOVE	3, 55, -15
	MOVE	4, -15, 75
	WAIT	1
	MOVE	1, 115, 65, 1
	WAIT	1
	MOVE	2, -25, 65, 1
	WAIT 	0
	MOVE	3, -25, 65, 1
	WAIT 	0.5
	MOVE	4, -25, 65, 1
	SOUND	"thunder1.wav"
	GIVE	L1
	GIVE	H5000
	GIVE	M5000
END
;-----------------------------------------
; The Void
SCENE 4		black 
	THEME	-1
	WEATHER	0
	FX	0
	ACTOR	1,	"The Unblind Sage", actors1, 27, -15, 70
	WAIT	4
	MOVE	1,	30, 60, 1
	WAIT	3
	POSE	25
	WAIT	1.5
	1: Ahhhhhhhhhhhh SHADUPP!!!!
	IF	M0, @cheat
	STRCMP #<str.soul>, "66913567"
	IF= @banned
	STRCMP #<str.soul>, "5B956B40"
	IF= @banned
	STRCMP #<str.soul>, "651441DD"
	IF= @banned
	STRCMP #<str.soul>, "444D4FFD"
	IF= @banned
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	MOVE	1,	35, 70
	WAIT	2
	1: Right, %C.. 
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	WAIT	2
	1: If you don't want to end up being something's dinner or someone's victim, LISTEN UP:
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	WAIT	2
	1: You can RIGHT-CLICK to interact with many characters you meet.
	1: They might answer questions, such as where to buy equipment.
	1: For best experience in this world..
	1: In the WoS Book of Options please choose "Show HTML pages in scenes, when scripted"
	1: Remember to turn on the sound and music!
	1: Be prepared..
	MOVE	1,	40, 75
	WAIT	1.5
	SOUND	"laugh2.wav"
	MOVE	1,	-100, 70, 1
	WAIT	3
	SOUND	"Incarnate.wav"
	GOTO	LINK	26, 10, 1	
END
	@cheat
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	MOVE	1,	35, 70
	WAIT	2
	H: What's going on?
	MOVE	1,	40, 75
	WAIT	2
	1: Ah, %2..
	MOVE	1,	45, 80
	1: World's End is not for cheat characters.
	WAIT	2
	MOVE	1,	50, 75
	WAIT	2
	H: But I used a cheat.. 
	WAIT	1.5
	SOUND	"petChew.wav"
	POSE	26
	MOVE	1,	45, 70
	WAIT	1.5
	SOUND	"laugh2.wav"
	POSE	25
	1: Hahahaha-aaaaaaaaahhhh!
	WAIT	2
	MOVE	1,	35, 77
	WAIT	2
	1: Make a new character..
	WAIT	3
	SOUND	"petBurp.wav"
	POSE	27
	WAIT	3
	1: for all cheat characters are bound to come here.
	MOVE	1,	35, 77
	1: Over and over again!
	WAIT	3
	POSE	25
	1: Hahaha! 
	SOUND	"laugh2.wav"
	1: Hahaha!  Hahahaha-aaaaaaaaahhhh!
	WAIT	1.5
	MOVE	1,	-100, 70, 1
	@laugh
	WAIT	7
	SOUND	"laugh2.wav"
	WAIT	3
	GOTO	@laugh
END
	@banned
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	MOVE	1,	35, 70
	WAIT	2
	1: %2..
	MOVE	1,	40, 75
	WAIT	2
	MOVE	1,	45, 80
	1: ..you are banned from playing Official Versions of World's End!
	WAIT	2
	MOVE	1,	50, 75
	WAIT	2
	H: How can I be banned? 
	WAIT	1.5
	SOUND	"petChew.wav"
	POSE	26
	MOVE	1,	45, 70
	WAIT	1.5
	SOUND	"laugh2.wav"
	POSE	25
	1: It could be for various reasons.
	1: Offensive, abusive or obnoxious behaviour..
	1: Perhaps you upset the wrong person.
	1: Maybe your "little brother" or some gremlin got up to no good whilst your back was turned :)
	WAIT	2
	MOVE	1,	35, 77
	WAIT	2
	1: Not many people are banned.
	WAIT	3
	SOUND	"petBurp.wav"
	POSE	27
	WAIT	3
	1: However..
	1: YOU are. 	
	MOVE	1,	35, 77
	1: So %2, go play another WoS world.
	WAIT	3
	POSE	25
	1: Hahaha! 
	SOUND	"laugh2.wav"
	1: Hahaha!  Hahahaha-aaaaaaaaahhhh!
	WAIT	1.5
	MOVE	1,	-100, 70, 1
	@laugh
	WAIT	7
	SOUND	"laugh2.wav"
	WAIT	3
	GOTO	@laugh
END
;--------------
; New tokens
SCENE	5
	THEME	0
	IF C1, @samurai
	IF C2, @mage
	IF C3, @archer
	IF C4, @musician
	IF C5, @outcast
	IF C6, @ninja
	IF C7, @gunslinger
	IF C8, @druid
	IF C9, @darkElf
	IF C13, @hippy
END
	@samurai
	HOST_GIVE	T110
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@mage
	HOST_GIVE	T100
	HOST_GIVE	T101
	HOST_GIVE	T102
	HOST_GIVE	T104
	HOST_GIVE	T105
	HOST_GIVE	T106
	HOST_GIVE	T107
	HOST_GIVE	T108
	HOST_GIVE	T109
	HOST_GIVE	T116
	HOST_GIVE	T121
	HOST_GIVE	T122
	HOST_GIVE	T123
	HOST_GIVE	T124
	HOST_GIVE	T125
	HOST_GIVE	T126
	HOST_GIVE	T127
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@archer
	HOST_GIVE	T111
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@musician
	HOST_GIVE	T105
	HOST_GIVE	T117
	HOST_GIVE	T127
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@outcast
	HOST_GIVE	T112
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@ninja
	HOST_GIVE	T113
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@gunslinger
	HOST_GIVE	T114
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@druid
	HOST_GIVE	T103
	HOST_GIVE	T105
	HOST_GIVE	T122
	HOST_GIVE	T123
	HOST_TAKE	T126	; takes spirit spells from old chars
	HOST_GIVE	T127
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204 
	GOTO	@contin
END
	@darkElf
	HOST_GIVE	T115
	HOST_GIVE	T122
	HOST_GIVE	T124
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@hippy
	HOST_GIVE	T119
	HOST_GIVE	T122
	HOST_GIVE	T123
	HOST_GIVE	T127
	HOST_TAKE	T201	; clearing this from v1.17 checker
	HOST_TAKE	T202
	HOST_TAKE	T203
	HOST_GIVE	T204
	GOTO	@contin
END
	@contin
END
;-----------------------------------------------
; Portal
SCENE 6	weird9
	WAIT	0.1
	SOUND	"magic9.wav"
	BKGND "weird8.jpg"
	WAIT	0.1
	SOUND	"magic8.wav"
	WAIT	0.1	
	@loop
	IF	R5, @hoorCross
	IF	R10, @trainingGrounds
	IF	R15, @gnarl1
	IF	R20, @cityport
	IF	R25, @tbs
	IF	R30, @gnarl2
	IF	R35, @woodford
	IF	R40, @travsJunction
	IF	R45, @cityUni
	IF	R50, @hollows
	IF	R55, @brackmire
	IF	R60, @southDowns
	IF	R65, @gnarl3
	GOTO	@loop
END
	@hoorCross
	GOTO LINK	26, 13
END
	@hollows
	GOTO LINK	16, 2
END
	@gnarl1
	GOTO	LINK	12, 17
END
	@gnarl2
	GOTO	LINK	12, 1
END
	@gnarl3
	GOTO	LINK	21, 5
END
	@brackmire
	GOTO	LINK	6, 15
END
	@travsJunction
	SOUND	"magic9.wav"
	BKGND "weird8.jpg"
	WAIT	0.1
	SOUND	"magic8.wav"
	WAIT	0.1
	SET hour, #<num.serverTimeHour>
	COMPARE #<hour>, 0
	IF< @dayTravsJ	
	COMPARE #<hour>, 1
	IF< @nightTravsJ
	COMPARE #<hour>, 2
	IF< @dayTravsJ	
	COMPARE #<hour>, 3
	IF< @nightTravsJ		
	COMPARE #<hour>, 4
	IF< @dayTravsJ
	COMPARE #<hour>, 5
	IF< @nightTravsJ		
	COMPARE #<hour>, 6
	IF< @dayTravsJ
	COMPARE #<hour>, 7
	IF< @nightTravsJ
	COMPARE #<hour>, 8
	IF< @dayTravsJ
	COMPARE #<hour>, 9
	IF< @nightTravsJ
	COMPARE #<hour>, 10
	IF< @dayTravsJ
	COMPARE #<hour>, 11
	IF< @nightTravsJ
	COMPARE #<hour>, 12
	IF< @dayTravsJ
	COMPARE #<hour>, 13
	IF< @nightTravsJ
	COMPARE #<hour>, 14
	IF< @dayTravsJ
	COMPARE #<hour>, 15
	IF< @nightTravsJ
	COMPARE #<hour>, 16
	IF< @dayTravsJ
	COMPARE #<hour>, 17
	IF< @nightTravsJ
	COMPARE #<hour>, 18
	IF< @dayTravsJ
	COMPARE #<hour>, 19
	IF< @nightTravsJ
	COMPARE #<hour>, 20
	IF< @dayTravsJ
	COMPARE #<hour>, 21
	IF< @nightTravsJ
	COMPARE #<hour>, 22
	IF< @dayTravsJ
	COMPARE #<hour>, 23
	IF< @nightTravsJ
	GOTO	@dayTravsJ
END
	@nightTravsJ
	GOTO	LINK	9, 4,
END
	@dayTravsJ
	GOTO	LINK	7, 4
END
	@southDowns
	GOTO	LINK	8, 12
END
	@tbs
	GOTO	LINK	10, 17
END
	@cityUni
	GOTO	LINK	14, 6
END
	@cityport
	GOTO	LINK	24, 5
END
	@trainingGrounds
	GOTO	LINK	28, 11
END
	@woodford
	GOTO	LINK	57, 9
END
;-----------------------------------------
; SCENE 0 must be primary well of souls
	SCENE 7		black 
;	MUSIC	""
	THEME	-1
	WEATHER	0
	FX	0
	ACTOR	1,	"The Unblind Sage", actors1, 27, -15, 70
	WAIT	4
;	SOUND	"haunt.wav"
	MOVE	1,	30, 60, 1
	WAIT	4
	POSE	25
	WAIT	1.5
;	1: Ahhhhhhhhhhhh SHADUPP!!!!
	WAIT	3
	POSE	26
	SOUND	"petChew.wav"
	WAIT	2
	POSE	25
	MOVE	1,	35, 70
	WAIT	2
;	1: Welcome to the Well of Souls, traveller.. hehehe!
	MOVE	1,	40, 75
	WAIT	2
;	1: Here you find a Void.
	MOVE	1,	45, 80
;	1: You must pass through to INCARNATE your soul into the world.
	WAIT	2
	MOVE	1,	50, 75
	WAIT	2
;	1: When you enter the world you will be sent to the HELP Centre.
	WAIT	1.5
	SOUND	"petChew.wav"
	POSE	26
	MOVE	1,	45, 70
	WAIT	1.5
	POSE	25
;	1: The HELP Centre tells where to buy things and get info.
	WAIT	2
;	1: This bit says not very much
	MOVE	1,	35, 77
	WAIT	2
;	1: ..and this bit is not worth reading at all.
	WAIT	3
	SOUND	"petBurp.wav"
	POSE	27
	WAIT	3
;	1: Be prepared..
	POSE	25
	WAIT	3
;	SOUND	"laugh2.wav"
	MOVE	1,	-100, 70, 1
	WAIT	2
	MUSIC	"Twilight.mid"
END
;-----------------------------------------
; WORLD'S END
#include QuestScenes10.txt

;-------------------------
; SEA PASSAGE
#include QuestScenes50.txt

;-------------------------
; CITY UNIVERSITY 

#include QuestScenes100.txt

;-------------------------
; NORTHERN REALM
#include QuestScenes150.txt

;-------------------------
; LOST CITY
#include QuestScenes200.txt

;-------------------------
; TUNNELS 1
#include QuestScenes250.txt

;-------------------------
; WOODED REALM
#include QuestScenes300.txt

;-------------------------
; SOUTHERN REALM
#include QuestScenes350.txt

;-------------------------
; CITY ARSENAL
#include QuestScenes400.txt

;-------------------------
; THE ELVEN GROVES
#include QuestScenes450.txt

;-------------------------
; TUNNELS 2
#include QuestScenes500.txt

;-------------------------
; EASTHAVEN
#include QuestScenes550.txt

;-------------------------

; TUNNELS 3
#include QuestScenes600.txt

;-------------------------
; FIGHT ARENA
#include QuestScenes650.txt

;-------------------------
; GAMING ARCADE
#include QuestScenes700.txt

;-------------------------
; ROYAL GARDENS
#include QuestScenes725.txt

;-------------------------

; TRAINING GROUNDS
#include QuestScenes750.txt

;-------------------------
; BURIAL GROUNDS
#include QuestScenes770.txt

;-------------------------
; GOBLIN KINGDOM
#include QuestScenes800.txt

;-------------------------
; Brackmire
#include QuestScenes850.txt

;-------------------------
; CITYPORT
#include QuestScenes900.txt

;-------------------------
; WESTWYCH
#include QuestScenes950.txt

;-------------------
; BIG SMOKE
#include QuestScenes1000.txt

;------------------------
; THE ICY WASTES
#include QuestScenes1050.txt

;-----------------------
; Mt GARGAN
#include QuestScenes1100.txt
;------------------------
; SKY
#include QuestScenes1150.txt

-SCENES

; Now we are at the extreme end of the file