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

;--------------
; SCENE 0 must be primary well of souls
;
; It is only used for switching souls (saved games), not for general ressurection and recharge
;
SCENE 0		space, WELL, "The Void", 0, 0
	THEME	0
	MUSIC	void.mid
	ACTOR	1,	"King Alcanar's Spirit", joshMiscellaneous, 2, 0, 60
	SEL		1
	MOVE	1,	50, 60
	WAIT	1.0
	' Welcome to our world, the land of Aerianell, potential hero.
	MOVE	1,	45, 60
	' Right click on me if you are new to the Well of Souls
	END	

@eventActorClick1
	' Here you can inhabit a new soul, or return a previous one.
	MOVE	1,	30, 70
	' When you are ready, select your soul and then incarnate into the physical world.
	MOVE	1,	40, 75
	' Press the NEW button to inhabit a new soul, and select its skin and abilities.
	MOVE	1,	25, 70
	' Press the RESTORE button to return to an old soul, and resume its struggle.
	MOVE	1,	35, 65
	' Press the INCARNATE button to enter the physical world.
	MOVE	1,	30, 70
	' Press the MAP button to see what other brave souls wander our world.
	MOVE	1,	40, 77
	' Press the HAUNT button to spy invisibly over another incarnated soul.
	MOVE	1,	20, 70
	' You may rest here safely, for as long as you like.
	WAIT 2
	' When you incarnate you should consult the newbie guide in your items for more guidance
END
	
;--------------
; SCENE 1 must be primary CAMP scene
;
SCENE 1



;IF R99, @graph
;	ACTOR	10,	"", Menu1, 5, 80, 60
@graph
	IF T105-C5, @smite
	STRCMP  #<str.soul>, "Soul 2530"
	IF= @loric
	IF T104-C4, @smite
	IF S205-T280, @smite
	IF I841-T280, @smite
	IF C33, @smite
	IF S206-T280, @smite
	IF E832-C5, @smite
	IF S225, @smite
@loric
	 THEME	0
IF -E725, @color
	FX 1
	WEATHER 8050
	COLOR 22
	COLOR 2022
	GOTO @start1
@color
	IF -E235, @color2
	FX 1
	WEATHER 9100
	COLOR 32
	COLOR 2032
@color2
	STRCMP  #<str.soul>, "7118ACDA"
	IF= @Kami
GOTO @start
END
@Kami
        ACTOR	9,	"8 Mil",	Kami, 1,	79,	37
	GOTO @start
@start
	
	IF C1, @start1
	IF C2, @start1
	IF C3, @start1
	IF C4, @start1
	IF C6, @start1
	IF C9, @start1
	IF C38, @start1
	IF -T349, @start1

	N: Please unequip your shield
	WAIT 4
	HOST_TAKE T349
	N: Done
@start1

	IF #0, @Halquest
	IF #12, @book
	IF #32, @box
	IF #30, @inndungeon
	IF #22, @mash
	IF #16, @seachainn
	IF #8, @nithean
	IF #43, @luthlower
	IF #44, @luthlower
	IF #45, @luthlower
	IF #20, @innleach
	IF #63, @newdungeon
	IF #64, @newdungeon
	IF #65, @newdungeon
	IF #66, @newdungeon
	IF #67, @newdungeon
	IF #68, @newdungeon
	IF #69, @newdungeon
	IF #70, @newdungeon
	IF #71, @newdungeon
	IF #72, @newdungeon
@seareturn
	IF T310+T118, @party
	IF T310, @future
	IF T73, @party
	IF -T118, @party
@future
	IF T41, @safe
	IF T40, @hurry
	IF T50+#20,@demifight
	IF -T182, @skip
	COMPARE #<num.closestLink>, "12"
	IF=, @D1
	COMPARE #<num.closestLink>, "20"
	IF=, @D2
	COMPARE #<num.closestLink>, "5"
	IF=, @D3
@skip
	IF T192+#7+T318, @fish

	GOTO @end
@safe
	ACTOR	1,	"Athedia",	joshTownsfolk,	2,	70, 45
	1: We'll be safe at my house, Hurry!!
	GOTO @end
@hurry
	ACTOR	1,	"Athedia",	joshTownsfolk,	2,	70, 45
	
	1:Theres no time to waste, we must hurry!!
	1:What are you waiting for they are going to eat him!!
	1:We must hurry to the Eirinnal tunnels!!
;	MUSIC   camp.mid
	END

@demifight
	FIGHT 206
	GOTO @end
	END
@party
	PARTY T119
	GOTO SCENE 35
	END
@D1
; Empty camp,   Narations tracks lead NW
	IF T183, @end
	GIVE T183
	ACTOR	2,	"Campfire", DanNoFloat,	4,	25,  90
	N: The camp is empty and the fire is cold
	N: Tracks lead to the North West
	
	END
@D2
	IF T184, @end
	IF -T183, @end
;Empty Camp,  Narrations tracks lead West
	ACTOR	2,	"Campfire", DanNoFloat,	3,	25,  90
	N: The camp is empty but the fire is still smoldering
	N: Tracks lead to the West
	GIVE T184
	END
@D3
	IF T185, @end
	IF -T184, @end
	ACTOR	2,	"Campfire", DanNoFloat,	3,	25,  90
	N: Its a trap!!
;Monster ambush, traps set
	FIGHT 101
	IF LOSE, @end
;Narrations tracks lead SE
	N: Tracks lead to the South East
	GIVE T185
	END
;----------seachainn----------
@seachainn
IF R50, @seareturn
	N: You find a slip of paper that says five is up
	GOTO @seareturn
@end
	END
;--------New Dungeon Marsett

@newdungeon

	FIGHT2 *
	IF LOSE, @fail
	END

@fail
	N: You have failed.
	N: Better luck next time.
GOTO LINK 61, 0
END
	 
;--------cathair
@book
	N: You have found an old Book
	GIVE I112
	GOTO @future
	END

@nithean
	COMPARE #<num.closestLink>, "3"
	IF= @nith2
	GOTO @seareturn
	END
@nith2
	N: You have found a book
	GIVE I113
	GOTO @seareturn
	END
;----------mash----------
@mash

	IF T241, @mash1
	IF T240, @mash2

	FLAGS 32
	FIGHT 319, 319, 319, -318, -318, -320, -320, -318

END
@mash2

	FLAGS 32
	FIGHT 319, 319, 319, -318, -318, -320, -320, -318

	IF LOSE, @end
	ACTOR	1,	"", JoshMiscellaneous, 22, 25, 90
	ACTOR	2,	"", JoshMiscellaneous, 24, 45, 70
	ACTOR	3,	"", JoshMiscellaneous, 22, 65, 80
	WAIT 4
	N: You bury the bones
	MOVE 1, -20, -20, 1
	WAIT 2
	ACTOR	4,	"", JoshMiscellaneous, 15, 25, 90
	WAIT 2
	MOVE 2, -20, -20, 1
	WAIT 2
	ACTOR	5,	"", JoshMiscellaneous, 15, 45, 70
	WAIT 2
	MOVE 3, -20, -20, 1
	WAIT 2
	ACTOR	6,	"", JoshMiscellaneous, 15, 65, 80
	GIVE T241
@end	
	END

@mash1

END
;--------inn dungeon
@inndungeon
	IF T261, @innbegin
	SET innmon1, "0"
	SET innmon2, "0"
	SET innmon3, "0"
	SET innmon4, "0"
	SET innmon5, "0"
	GIVE T261
@innbegin
	IF T265+T266+T267+T268+T269, @end
	IF R20, @fourfight
	IF R25, @threefight
	IF R33, @twofight
	IF R50, @onefight
	GOTO @fivefight
	END
@fivefight
	COMPARE #<innmon5>, "5"
	IF<, @fivefight2
	GIVE T265
	GOTO @innbegin
@fivefight2
	FIGHT 206
	IF LOSE, @end
	ADD innmon5, "1"
	END
@fourfight
	
	COMPARE #<innmon4>, "5"
	IF<, @fourfight2
	GIVE T266
	GOTO @innbegin
@fourfight2
	FIGHT 200
	IF LOSE, @end
	ADD innmon4, "1"
	END
@threefight
	COMPARE #<innmon3>, "5"
	IF<, @threefight2
	GIVE T267
	GOTO @innbegin
@threefight2
	FIGHT 199
	IF LOSE, @end
	ADD innmon3, "1"
	END	
@twofight
	COMPARE #<innmon2>, "5"
	IF<, @twofight2
	GIVE T268
	GOTO @innbegin
@twofight2
	FIGHT 198
	IF LOSE, @end
	ADD innmon2, "1"
	END
@onefight
	COMPARE #<innmon1>, "5"
	IF<, @onefight2
	GIVE T269
	GOTO @innbegin
@onefight2
	FIGHT 197
	IF LOSE, @end
	ADD innmon1, "1"
	END
@end
END
;-------- fishing ----------

@fish
	GOTO SCENE 318
	END
;~~~~~~~~~~~~~~
@box
	IF R5, @Lag
	COMPARE #<Monsterbox1>, 2
	IF=, @box2
	IF<, @box3
	IF>, @box1
	END
@box1
	FIGHT 334
	END
@box2
	FIGHT 335
	END
@box3
	FIGHT 336
	END
@Lag
	FIGHT2 425
	END
;~~~~~~~~~~~~~~~~~~~~~`
@smite

PARTY C17
SET num.hostClass, "17"
SET ismodder, "1"
TAKE G100000000
TAKE H10000
N: Congratulations
N: I'd like to invite you to try again with a legit character

END
@smite2

PARTY C17
SET num.hostClass, "17"
SET ismodder, "1"
HOST_TAKE G100000000
HOST_TAKE H10000
	ACTOR     1,	"", mantella, 1,   20,  60
1: I couldn't come up with anything witty to say here
1: But thanks for giving me an oppourtunity to test some code
1: getting level 100, with max stats and a few halo's, in 6.5 hours is pretty obvious

END

@Har

PARTY C17
TAKE G100000000
TAKE H10000000
	ACTOR     1,	"", mantella, 1,   20,  60
	1: Hey Har
	1: I'll remove this scene next patch
	1: Unfortunately you gave me a good excuse to test some of my evil code
	1: make sure you tell lots of people how well it works
	END

@luthlower
	FX 1
	END


@Halquest

	COMPARE #<num.closestlink>, 17
	IF= @sapq1
	COMPARE #<num.closestlink>, 16
	IF= @sapq3
	GOTO @seareturn
	END


@sapq1
	IF R75, @seareturn
	IF I233+V45-T380-T381-T382-T383-T384-T385, @sapq2
	IF T372+V45-T380-T381-T382-T383-T384-T385, @sapq2
	GOTO @seareturn
	END
@sapq2
	GOTO SCENE 380
	END

@sapq3
	IF T380-T382-T383-T384-T385, @sapq4
	IF T381-T382-T383-T384-T385, @sapq5
	GOTO @seareturn
	END
@sapq4
	GOTO SCENE 381
	END
@sapq5
	GOTO SCENE 382
	END

@innleach
	IF T382-T386, @sapq6
	IF T383-T386, @sapq7
	IF T384-T386, @sapq8
	IF T385-T386, @sapq9
	GOTO @seareturn
	END
@sapq6
	GOTO SCENE 383
	END
@sapq7
	GOTO SCENE 384
	END
@sapq8
	GOTO SCENE 385
	END
@sapq9
	GOTO SCENE 386	
	END




@eventActorClick9
	IF R33, @kamir1
	IF R50, @Kamir2
	9: sup
	END
@kamir1
	9: If you give you beggar 10 million gold, he gives you a cool weapon!!
	END
@kamir2
	9: Right click me for money
	END







;--------------
; SCENE 2 must be primary FIGHT scene (for automatic fights)
;
SCENE 2
  
;checks
	IF T105-C5, @smite
	STRCMP  #<str.soul>, "Soul 2530"
	IF= @loric
	IF S205-T280, @smite
	IF I841-T280, @smite
	IF C33, @smite
	IF S206-T280, @smite
	IF E832-C5, @smite
	IF S225, @smite
@loric
IF -E725, @color
	FX 1
	WEATHER 8050
	COLOR 22
	COLOR 2022
	GOTO @start
@color
	IF -E235, @start
	FX 1
	WEATHER 9100
	COLOR 32
	COLOR 2032
@start
	THEME	0
	IF #0, @hello
@start2

	IF C1, @start3
	IF C2, @start3
	IF C3, @start3
	IF C4, @start3
	IF C6, @start3
	IF C9, @start3
	IF C38, @start3
	IF -T349, @start3
	N: Please unequip your shield
	WAIT 4
	TAKE T349
	N: Done
@start3

	IF #45+C16-T366, @bard
	IF #44+C16-T366, @bard
	IF #43+C16-T366, @bard
	IF #40+C16-T366, @bard
	IF #31+C16-T366, @bard
	

	IF #37, @luthmoora
	IF #38, @luthmoorb
	IF #39, @luthmoorc
	IF #31, @desert
	IF #49, @desert
	IF #50, @desert
	IF #51, @desert
	IF #52, @desert
	IF #16, @seachainn
	IF #11, @pixie
	IF #40, @Nith
	IF #43, @luthlower
	IF #44, @luthlower
	IF #45, @luthlower
	IF #43, @tarc
@return
	IF T60, @gryphon
	IF #18+T81, @pyramid2
	IF T41, @fight
	IF T40, @actor
	IF T174, @fight1
;T174, turn on/off faerie
	IF I125, @faerie
	IF C16-T366, @bard
@fight1
	#include Thievery.txt

	FIGHT

END
@170
	;IF T171, @171
	IF T170, @craft
@171
	END


@bard
	IF T364, @bardnext
	SET bardhunt, "0"
	SET bardlevel, "0"
	HOST_GIVE T364
@bardnext
	IF T365, @bardreturn
	ADD bardhunt, "1"
	SET bardlevel, #<bardhunt>
	DIV bardlevel, "50"
	COMPARE #<bardlevel>, "10"
	IF> @bardset
@bardreturn	
	IF R#<bardlevel>0, @bardnofight

	FIGHT
	GOTO @170	
	END
@bardset
	SET bardlevel, "10"
	HOST_GIVE T365
	GOTO @bardreturn
	END

@bardnofight
	N: You successfully charmed the monsters
	END



@hello
	COMPARE #<num.closestLink>, "83"
	IF=, @hello2
	GOTO @start2
	END
@hello2

	IF R50, @hello3
	GOTO @start2
	END
@hello3
	N: You found some explosives
	GIVE I142
	END
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@fight
	ACTOR	1,	"Athedia",	joshTownsfolk,	2,	70, 45   
	FIGHT 41,40,39
	END
@actor
	ACTOR	1,	"Athedia",	joshTownsfolk,	2,	70, 45
	GOTO @fight1
@pyramid2
	FIGHT *, 236
	IF WON, @pyr2won
	END
@pyr2won
	TAKE T81
	GIVE T86
	END
@gryphon
	IF XP, @gryloss
	FIGHT *, -306, -307, -308
	END
@gryloss
	GIVE T61
	FIGHT

@craft
	Compare  #<monster6>, #<km.6>
	IF=, @craft1
	SET  monster6, #<km.6>
	IF R80,@craft1
	IF I120, @171
	GIVE I120
	N: You have recieved a baby gnomes staff
	GOTO @171
@craft1
	Compare  #<monster170>, #<km.170>
	IF=, @craft2
	SET  monster170, #<km.170>
	IF R80,@craft2
	IF I121, @171
	GIVE I121
	N: You have recieved a %I121
	GOTO @I71
@craft2
	Compare  #<monster111>, #<km.111>
	IF=, @craft3
	SET  monster111, #<km.111>
	IF R80,@craft3
	IF I122, @171
	GIVE I122
	N: You have recieved a %I122
	GOTO @171
@craft3
	Compare  #<monster59>, #<km.59>
	IF=, @craft4
	SET  monster59, #<km.59>
	IF R80,@craft4
	IF I123, @171
	GIVE I123
	N: You have recieved a %I123
	GOTO @171
	END
@craft4
	Compare  #<monster73>, #<km.73>
	IF=, @craft5
	SET  monster73, #<km.73>
	IF R80,@171
	IF I124, @171
	GIVE I124
	N: You have recieved a %I124
	GOTO @171
	END
@craft5
	Compare  #<monster200>, #<km.200>
	IF=, @craft6
	SET  monster200, #<km.200>
	IF R80,@171
	IF I126, @171
	GIVE I126
	N: You have recieved a %I126
	GOTO @171
	END
@craft6
	Compare  #<monster181>, #<km.181>
	IF=, @craft7
	SET  monster181, #<km.181>
	IF R80,@171
	IF I127, @171
	GIVE I127
	N: You have recieved a %I127
	GOTO @171
	END
@craft7
	Compare  #<monster163>, #<km.163>
	IF=, @craft8
	SET  monster163, #<km.163>
	IF R80,@171
	IF I128, @171
	GIVE I128
	N: You have recieved a %I128
	GOTO @171
	END
@craft8
	Compare  #<monster144>, #<km.144>
	IF=, @craft9
	SET  monster144, #<km.144>
	IF R80,@171
	IF I129, @171
	GIVE I129
	N: You have recieved a %I129
	GOTO @171
	END
@craft9
	Compare  #<monster108>, #<km.108>
	IF=, @171
	SET  monster108, #<km.108>
	IF R80,@171
	IF I130, @171
	GIVE I130
	N: You have recieved a %I130
	GOTO @171
	END
@faerie
	FIGHT *, -310
	GOTO @170
	END
@seachainn
	FIGHT
	IF LOSE, @end
	IF R50, @seachainn2
	N: a slip of paper found on the body reads "switch six, down"
@seachainn2
	GOTO @return
@end
	END
@desert
	FIGHT2 *
	IF WIN, @desnext
	END
@desnext
	IF R20-I136, @desnext2
	GIVE G20000
	END
@desnext2
	N: You have found a diamond
	GIVE I136
	END

@luthlower
	FX 1
	FIGHT2 *
	END
@tarc
	FIGHT *
	END



@smite

PARTY C17
SET num.hostClass, "17"
SET ismodder, "1"
TAKE G100000000
TAKE H10000
N: Congratulations
N: I'd like to invite you to try again with a legit character
END

@Har

PARTY C17
TAKE G100000000
TAKE H10000000
	ACTOR     1,	"", mantella, 1,   20,  60
	1: Hey Har
	1: I'll remove this scene next patch
	1: Unfortunately you gave me a good excuse to test some of my evil code
	1: make sure you tell lots of people how well it works
	END
@smite2

PARTY C17
SET num.hostClass, "17"
SET ismodder, "1"
HOST_TAKE G100000000
HOST_TAKE H10000
	ACTOR     1,	"", mantella, 1,   20,  60
1: I couldn't come up with anything witty to say here
1: But thanks for giving me an oppourtunity to test some code
1: getting level 100, with max stats and a few halo's, in 6.5 hours is pretty obvious

END
@luthmoora
	FIGHT *
	IF WON, @luthmoorareward
	END
@luthmoorareward
	IF I143, @luth2
	IF R60, @end
	GIVE I143
	N: You have found a Steel Key
	END
@luth2
	IF I144, @luth3
	IF R60, @end
	GIVE I144
	N: You have found an Iron Key
	END
@luth3	
	IF I145, @luth4
	IF R60, @end
	GIVE I145
	N: You have found a Mithril Key
	END
@luth4
	IF I146, @end
	IF R60, @end
	GIVE I146
	N: You have found a Wooden Key
	END
@luthmoorb
	FIGHT *
	IF WON, @luthmoorbreward
	END
@luthmoorbreward	
	IF I147, @luth5
	IF R80, @end
	GIVE I147
	N: You have found a Bronze Key
	END
@luth5
	IF I148, @end
	IF R80, @end
	GIVE I148
	N: You have found a Brass Key
	END
@luthmoorc
	FIGHT *
	IF WON, @luthmoorcreward
	END
@luthmoorcreward
	IF I149, @end
	IF R80, @end
	GIVE I149
	N: You have found a Gold Key
	END
;---------Nithean
@nith
	IF I125, @nith2
	FIGHT2 *
	GOTO @170
	END
@nith2
	N: Your Faerie Stick drives away the monsters.
@pixie

	IF T220, @next
	FIGHT
	IF LOSE, @end
	N: You have found a book
	GIVE I109
	GIVE T220
	END
@next

	IF T226, @aggresive
	IF T225, @passive
	IF T223+T224, @next2
	IF T223, @pixiefight
	IF -T221, @pixiefight

	ACTOR	1,	"Adelaida", Pic008b, 1, 25, 90
	ACTOR	2,	"Ciani",Pic008c, 1, 45, 70

	1: You must leave
	2: Now
	H: I know about your missing artifact
	1: He knows
	FACE 2, 0
	2: But can we trust him
	1: We trusted humans before
	2: But now they just kill us
	1: Maybe because we attack first
	2: So confusing now
	2: We shall watch him from now on
	1: And if he kills any more faeries then we destroy him
	2: But until then we might trust him a little
	FACE 2, 1
	2: My apologies for our rude behavior
	1: We have had no leadership since "insert name" was killed
	2: We don't know what to do
	1: But if we could only get our artifact back, we would be safe
	2: Our scouts think it is hidden in the Temple of Nithean
	1: But our powers won't work against the undead
	2: If you could retrieve it for us we would be forever grateful
	H: I will
	1: Thank you
	2: We will be watching you
	WAIT 3
	MOVE 1, 10. -20
	MOVE 2, 10, -20
	GIVE T223
	SET pixie1, #<km.128>
	SET pixie2, #<km.129>
	SET pixie3, #<km.127>
	SET pixie4, #<km.126>
	END
@pixiefight 
	FIGHT
	END
@next2
	ACTOR	1,	"Adelaida", Pic008b, 1, 25, 90
	ACTOR	2,	"Ciani",Pic008c, 1, 45, 70

	
	1: Its amazing, You have found our artifact!!
	2: Thank you so much
	1: We shall be forever grateful to you 
	COMPARE #<pixie1>, #<km.128>
	IF<, @bad
	COMPARE #<pixie2>, #<km.129>
	IF<, @bad
	COMPARE #<pixie3>, #<km.127>
	IF<, @bad
	COMPARE #<pixie4>, #<km.126>
	IF<, @bad
	2: you should visit our passage store 
	GIVE T225
	END
@bad
	1: However you have killed some of out people
	2: We can not guarentee your safety in the forest
	1: You should however visit our passage store
	GIVE T225
	GIVE T226
	END
	
@passive
	FIGHT -*
	END
@aggresive
	FIGHT
@end
END
;--------------
; SCENE 3 should be standard town well (for recharging)
;
SCENE 3		staroom2
	THEME	0
	MUSIC	temple.mid
	ACTOR	1,	"The Healer", joshAnimals, 8, 25, 90
	SEL		1
	MOVE	1,	15, 80
	

	IF C10+T270, @druquest
	
	IF T285, @skip
	GIVE I45
	GIVE I46
@skip
	IF S216+C14, @spell
	IF S219+C11, @spell1
	IF C16-I115, @bard
@heal
	IF ALIVE, @skip1
	' Wait one moment, you shall live again.
	WAIT    1.0
	SOUND	"thunder1.wav"
	WAIT	1.0
@skip1
	MOVE	1,	10, 75
	GIVE	L1
	GIVE	H3000
	GIVE	M3000 
	OFFER	1,2,4,5,6,7,8,13,15,16
	' Greetings, hero.
	' Stay awhile and relax. 
	' All your healing needs will be taken care of. 	

END
	@eventActorClick1
	MENU "Recieve newbie guides=@choicea", "Do not Recieve newbie guides=@choiceb"
	END
@choicea
	TAKE T285
	END
@choiceb
	GIVE T285
	END

@spell
	HOST_GIVE S215
	HOST_TAKE S216
	GOTO @heal
@spell1
	HOST_GIVE S218
	HOST_TAKE S219
	GOTO @heal
@bard
	HOST_GIVE I115
	GOTO @heal	
@bug


	IF ALIVE, @bug2
	1: I'm afraid I'll have to charge you for healing
	GOTO @bug3
@bug2
	1: I'll have to charge you for ressurection and healing
	1: 1000 gold please
	WAIT 2
	IF -G1000, @broke
	TAKE G1000
	GIVE L1
	GIVE H4000
	GIVE H4000
	OFFER	1,2,4,5,6,7,8,13,15,16
	END
@broke
	1: You don't have enough gold
	OFFER	1,2,4,5,6,7,8,13,15,16
	END
@druquest
	COMPARE #<num.closestlink>, "1"
	IF=, @evenglade
	COMPARE #<num.closestlink>, "18"
	IF=, @sylvanglade
	COMPARE #<num.closestlink>, "19"
	IF=, @lyrasglade
	COMPARE #<num.closestlink>, "20"
	IF=, @cashaglade
	END
@evenglade
	GIVE T272
	GOTO @heal
	END
@sylvanglade
	GIVE T273
	GOTO @heal
	END
@lyrasglade
	GIVE T274
	GOTO @heal
	END
@cashaglade
	GIVE T275
	GOTO @heal
	END

;---------
; general armor shop

SCENE 10 euroStreet
	THEME	0
	MUSIC	shop1.mid
	ACTOR	1,	"Zager", joshAnimals, 5, 25, 90
	SEL		1
	MOVE	1,	15, 80
	IF T33-T39, @getboots
	IF C7, @shieldclub1
	IF C4, @belts	
	OFFER 250,251,252,253,254,255,256,200,201,202,203,204,205,206,700,701,702,703,704,705,706,800,801,802,803,804,805,806
	' Can I help you with something?
	GOTO @endme
@shieldclub1
	OFFER 250,251,252,253,254,255,256,200,201,202,203,204,205,206,700,701,702,703,704,705,706,966,967,968,969,970,971,972
	' Ooh... A big strong Barbarian!
	' I have those shield weapons...
	' You KNOW you want 'em.
	GOTO @endme
@belts
	OFFER 250,251,252,253,254,255,256,700,701,702,703,704,705,706,800,801,802,803,804,805,806
	' Can I help you with something?	
	GOTO @endme
@getboots
	' You have the gnome plans
	TAKE I41
	' Very interesting, I can make these
	WAIT 5
	' Here you go
	GIVE I720
	GIVE T39

@endme
END

;---------
; general weapons shop

SCENE 11 euroStreet
	THEME	0
	MUSIC	shop2.mid
	ACTOR	1,	"Calalen", joshAnimals, 6, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	0,31,12,0,31,13,0,31,14,0,31,15
	' Everything for the well armed adventurer.
END


;---------
; general weapons shop

SCENE 23 euroStreet
	THEME	0
	MUSIC	shop2.mid
	ACTOR	1,	"Emba", joshAnimals, 6, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	0,31,16,0,31,17,0,31,18,0,31,19
	' Everything for the well armed adventurer.
END

;---------
; general baubles shop

SCENE 12 euroStreet
	THEME	0
	MUSIC	shop3.mid
	ACTOR	1,	"Kronia", joshAnimals, 7, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	0,31,22,0,31,23
	IF T39 @12end
	IF T33 @12end
	IF T32 @gotplans
	' The gnomes know how to make magic shoes.
	' They won't share the secret though.
	' I'll give you a thousand dollars if you can bring me the plans
	GIVE T30
	
	GOTO @12end
@gotplans
	' Good Job, maybe Zager can make a pair
	' Go see him in the armour shop
	GIVE G1000
	GIVE T33
@12end
END


;---------
; gates of blood
;
SCENE 13 circle3, GATE, "Gates of Blood", 5, 1
	THEME	0
	MUSIC	mortal.mid
        ACTOR	1,	"Spirit Guide",	josh19, 99,	80,	80
	POSE	12,13,13
	MOVE	1,	15, 85

        IF ALIVE, @skip1
	' Sorry, but I am unable to let those of an unstable spirit pass.
	END
@skip1
        ' Welcome, %2. You are about to enter a pk arena, If you want to learn how it works type yes, otherwise you will be teleported to the reapers circle
        ASK 5
	IF YES, @info
	GOTO @pass
@info
	' You are traveling through the Gates of Blood to The Reaper's Circle
        ' This is a deep passageway deep underground, allowing you to reach other cities
        ' faster than you would be able to traveling on the surface of Aerianell.
        ' The problem with this underground system is that demons dwell there, causing
        ' all who enter to suffer from severe dementia, including animal companions. Because
        ' of this, you are safe from no one, not even kind, wandering souls like yourself, or even their pets.
        ' Beware The Reaper's Circle; only use it in the gravest of emergencies!
	' Would you like to be ethereally teleported through the Gates to The Reaper's Circle? If not, type no or click exit. If you do, then say so or just wait 5 seconds.
        ASK 5.0
	IF NO, @end
        IF YES, @pass
@pass
	GOTO 	LINK	21, 0, 0
@end
	A wise choice, young soul. Come back when you are ready.
	END
;---------
; general armor shop

SCENE 14 euroStreet
	THEME	0
	MUSIC	shop1.mid
	ACTOR	1,	"Melil", joshAnimals, 5, 25, 90
	SEL		1
	MOVE	1,	15, 80
	IF C7, @shieldclubs2
	IF C4, @belts2
	OFFER  257,258,259,260,261,262,207,208,230,209,210,211,707,708,709,710,711,712,807,808,809,810,811,812
	' Be the best dressed adventurer in town!
	END
@shieldclubs2
	OFFER  257,258,259,260,261,262,207,208,230,209,210,211,707,708,709,710,711,712,973,974,975,976,977,978
	' Dress up nice, walk softly, and carry a BIG STICK!
	END
@belts2
	OFFER  257,258,259,260,261,262,707,708,709,710,711,712,807,808,809,810,811,812
	' Be the best dressed adventurer in town!
	END

;---------
; general weapons shop

SCENE 15 euroStreet
	THEME	0
	MUSIC	shop2.mid
	ACTOR	1,	"Sarista", joshAnimals, 6, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	32,63,12,32,63,13,32,63,14,32,63,15
	' Mayhem and Destruction at your fingertips.
END

;---------
; general weapons shop

SCENE 24 euroStreet
	THEME	0
	MUSIC	shop2.mid
	ACTOR	1,	"Tugne", joshAnimals, 6, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	32,63,16,32,63,17,32,63,18,32,63,19
	' Mayhem and Destruction at your fingertips.
END

;---------
; general baubles shop

SCENE 16 euroStreet
	THEME	0
	MUSIC	shop3.mid
	ACTOR	1,	"Itolman", joshAnimals, 7, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	32,63,22,32,63,23
	' Try my trinkets.
END


;---------
; gates of pain
;
SCENE 17 circle3, GATE, "Gates of Pain", 5, 1
	THEME	0
	MUSIC	mortal.mid
        ACTOR	1,	"Spirit Guide",	josh19, 99,	80,	80
	POSE	12,13,13
	MOVE	1,	15, 85

        IF ALIVE, @skip1
	' Sorry, but I am unable to let those of an unstable spirit pass.
	END
@skip1
        ' Welcome, %2. If you would like to pass through the Gates to The Circle, please wait to be teleported there...
	WAIT 	3
	GOTO 	LINK	21, 1, 0
;---------
; general armor shop

SCENE 18 euroStreet
	THEME	0
	MUSIC	shop1.mid
	IF T50, @demi

	ACTOR	1,	"Bager", joshAnimals, 5, 25, 90
	SEL		1
	MOVE	1,	15, 80
	IF C7, @shieldclubs3
	IF C4, @belts3
	OFFER   263,264,265,266,267,268,269,212,213,214,215,216,217,218,713,714,715,716,717,718,719,813,814,815,816,817,818,819
	' Guaranteed not to wrinkle.
	END
@shieldclubs3
	OFFER   263,264,265,266,267,268,269,212,213,214,215,216,217,218,713,714,715,716,717,718,719,979,980,981,982,983,984,985
	' You wanna try?
	' WATCH WHERE YOU SWING THAT CLUB!
	END
@belts3
	OFFER   263,264,265,266,267,268,269,713,714,715,716,717,718,719,813,814,815,816,817,818,819
	' Guaranteed not to wrinkle.
	END
@demi
	IF #20,	@demifight
	GOTO @end
@demifight
	FIGHT 206
	GOTO @end
@end	
END

;---------
; general weapons shop

SCENE 19 euroStreet
	THEME	0
	MUSIC	shop2.mid
	IF T50, @demi
	ACTOR	1,	"Vanatras", joshAnimals, 6, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	64,95,12,64,95,13,64,95,14,64,95,15
	IF T51, @talk
	' The gate keeper protects us from outside attacks
	' I wonder what would happen if someone came through the gate of tears
	GOTO @end
@talk
	' It seems that you killed all of them
	' I wonder why they attacked
	GOTO @end
@demi
	IF #20,	@demifight
	GOTO @end
@demifight
	FIGHT 206
	GOTO @end
@end
END

;---------
; general weapons shop

SCENE 25 euroStreet
	THEME	0
	MUSIC	shop2.mid
	IF T50, @demi

	ACTOR	1,	"Berodere", joshAnimals, 6, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	64,95,16,64,95,17,64,95,18,64,95,19
	IF T51, @talk
	' Those demigods have been really active lately
	' I wonder what they are up to
	GOTO @end
@talk
	' You saved us, thank you so much
	' I'll give you a discount next time you visit, I promise
	GOTO @end

@demi
	IF #20,	@demifight
	GOTO @end
@demifight
	FIGHT 206
	GOTO @end


@end
END

;---------
; general baubles shop

SCENE 20 euroStreet
	THEME	0
	MUSIC	shop3.mid
	
	IF T50, @demi
	ACTOR	1,	"Khin", joshAnimals, 7, 25, 90
	SEL		1
	MOVE	1,	15, 80
	OFFER2	64,95,22,64,95,23
	IF T51, @talk
	' I hate demigods!
	GOTO @end
@talk
	' You seemed to have killed them all
	' The gate keeper will be very grateful
	' You should talk to him
	GOTO @end
@demi
	IF #20,	@demifight
	GOTO @end
@demifight
	FIGHT 206
	GOTO @end
	

@end
END


;---------
; gates of tears
;
SCENE 21 circle3, GATE, "Gates of Tears", 5, 1
	THEME	0
	MUSIC	mortal.mid
	IF T50, @demi

        ACTOR	1,	"Spirit Guide",	josh19, 99,	80,	80
	POSE	12,13,13
	MOVE	1,	15, 85

        IF ALIVE, @skip1
	' Sorry, but I am unable to let those of an unstable spirit pass.
	END
@skip1
        ' Welcome, %2. If you would like to pass through the Gates to The Circle, please wait to be teleported there...
	WAIT 	3
	GOTO 	LINK	21, 2, 0
	GOTO @end
@demi
	IF #20,	@demifight
	GOTO @end
@demifight
	IF R05, @bossfight
	FIGHT 206
	GOTO @end
@bossfight
	GOTO SCENE 51
	

@end
END
;---------
; specialty crystal shop & healing
;
SCENE 22 oasis
	THEME	0
	MUSIC	shop5.mid
	ACTOR	1,	"Aphrusta", joshAnimals, 10, 25, 90
	SEL		1
	MOVE	1,	15, 80

	IF T80, @offer3
	IF T38, @offer2
	IF T33, @normal
	IF T32, @plans
	GOTO @normal
@offer2
	OFFER	42,720,101,102,103,9,10,11,12,14,960,961,962,963,964,965,21,3
	GOTO @heal
@offer3
	OFFER	42,101,102,103,9,10,11,12,14,960,961,962,963,964,965,21,3,43
	GOTO @heal
@plans
	1: I see that you have the plans for the magic shoes
	1: I could make you some for a price
	1: Would you like to buy some magic shoes
	ASK 30
	IF YES, @plans2
	GOTO @normal
@plans2
	TAKE I41
	GIVE T38
	GIVE T39
	GOTO @offer2
@normal
	OFFER	101,102,103,9,10,11,12,14,960,961,962,963,964,965,21,3
@heal
	GIVE	L1
	GIVE	H3000
	GIVE	M3000 
	1: Enhance your abilities for a price.
	WAIT .1
	MOVE 	1,	25, 85
	IF T2+C7, @bug
	IF T2+C1, @bug
	IF T2+C2, @bug
	IF T2+C3, @bug
	IF T2+C4, @bug
	IF T2+C9, @bug
	IF T2+C11, @bug
	IF T2+C12, @bug
	IF T2+C13, @bug
	IF T2+C14, @bug
	IF T2+C15, @bug
@moo
	ASK 1000
	IF Qbacon, @aah
	IF Qpork, @aah
	IF QBacon, @aah
	IF QBACON, @aah
	IF QPork, @aah
	IF QPORK, @aah
	IF Qham, @aah
	IF QHam, @aah	
	IF QHAM, @aah
	GOTO @moo
@aah
	Move 	1,	10, 75
	WAIT .2
	' AAAAAHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!
	Move 	1, 	10, 65, 1
	WAIT .1
	Move	1, 	20, 65, 1
	WAIT .1
	Move 	1, 	15, 70, 1
	WAIT .1
	Move	1, 	25, 55, 1
	WAIT .1
	Move 	1, 	35, 65, 1
	WAIT .1
	Move	1, 	40, 70, 1
	WAIT .1	
	Move	1, 	30, 55, 1
	WAIT .1
	Move	1, 	45, 65, 1
	WAIT .1
	Move	1, 	50, 45, 1
	WAIT .1
	Move	1, 	25, 35, 1
	WAIT .1
	Move	1, 	30, 75, 1
	WAIT .1
	Move 	1, 	2, 90, 1

	MOVE	1, 	-90, 90, 
	OFFER	104
END
@bug
END
;---------
; gates of woe
;
SCENE 26 circle3, GATE, "Gates of Woe", 5, 1
	THEME	0
	MUSIC	mortal.mid
        ACTOR	1,	"Spirit Guide",	josh19, 99,	80,	80
	POSE	12,13,13
	MOVE	1,	15, 85

        IF ALIVE, @skip1
	' Sorry, but I am unable to let those of an unstable spirit pass.
	END
@skip1
        ' Welcome, %2. If you would like to pass through the Gates to The Reaper's Circle, please wait a few seconds and you will be teleported there.

	WAIT 	3
	GOTO 	LINK	21, 3, 0
	END
;-----------
;New town shop1 Wondering if it'd be a good idea to throw in some collectables?
;
SCENE 450
	THEME 0
	ACTOR	1,	"Sarah", joshAnimals, 18, 25, 90
	SEL		1
	MOVE	1,
	GIVE	L1
	GIVE	H3000
	GIVE	M3000 

	' Welcome, please sample my wares.
OFFER 1123, 1124, 1125, 1126, 1157
END

; Coopsie FTW!
;-------------


;Ending comment so bad things don't happen.


