; SCENE 0 must be primary well of souls
;
; It is only used for switching souls (saved games), not for general resurrection and recharge
; Let's also use it as our own little tutorial for the new scenewriter (thank Merlin)
;
; First we need a 'SCENE' command to assign:
;  a scene number (zero), 
;  a BACKGROUND JPEG (temple.jpg),
;  the scene 'style' (WELL), 
;  the scene name "Well of Souls", 
;  the current EFFECT (2 =lake ripple),
;  and the current WEATHER (7 = snow)
;
SCENE 0	dagobah, WELL, "Yoda" 
	ACTOR	1,	"Yoda", myactors, 1, 0, 100
    MUSIC yoda
	MOVE	1,	20, 100
	WAIT	1.0
        SOUND yoda1
	1: I mean you no harm
        WAIT 2.0
        SOUND yoda2
        1: Help you I can, yes hmmmmm
        WAIT 3.0
        SOUND yoda3
        1: Stay and help you I will
        WAIT 3.0
        SOUND yoda4
        1: Strong am I with the Force
        WAIT 3.0
        1: I decide not, you must.
	1: Choose your side with your heart you should
	1: Fight for your beliefs you will
	1: Press the NEW button to create a new flow in the Force you can.
	1: Press the RESTORE button to continue your battle.
	1: Press the INCARNATE button to join your allies you may.
	1: Press the MAP button to see how the others who are in out struggle.
	1: Press the HAUNT button to watch over your friends you should.
	1: Stay here you may for now.

END


;--------------
; SCENE 1 must be primary CAMP scene
;
SCENE 1
	THEME
;	MUSIC   (no music in camp scene, just theme)

; Check is this is a PK Attack (uses CAMP scene, not FIGHT scene, oddly enough)

	COMPARE #<num.isPKAttack>, 1
	IF= @pk
	COMPARE #<num.isPKAttack>, 2
	IF= @pk	

; Not a PK Attack, check if it is in Macguyver castle

	COMPARE #<num.mapNum>, 2
	IF=	@inCastle

; Not Macguyver castle, so we're done.  It's just a regular camp with no special stuff

	END

;
; It *is* a PK Attack, so we set up some special rules to make it 'honorable'
;
@pk
	; Set map flags: 32768 (no nasty spells) + 8192 (no tickets) + 4096 (no Heal)
	FLAGS	45056

	; Lock the room
	LOCK 1

	; Announce to the players that this is a special place
	N: PK Attack! 
	N: Locked Camp!
	N: No Healing, Stunning, or Tickets!

	; we have to END or they can't fight
	END

@eventPkAttackDone

	; maybe someday this event will work, and we can unlock the camp as soon as 
	; only one side is left standing

	LOCK 0
	FLAGS 0
	END


; We *are* in macguyver castle, so we have the little lock icon in the upper right,
; and can manually lock/unlock the camp.. to discusss our secret plans!
;
@inCastle
	; we get a little lock icon while in macguyver castle camps.
	SET sceneLock, 0
	ACTOR	9, "Lock", danNoFloat, 6, 95, 10
END

; The scene host has clicked on the little lock icon

@eventActorClick9
	COMPARE #<sceneLock>, 0
	IF= @lockScene
	LOCK 0
	SET sceneLock, 0
	SEL 9
	POSE	6
	END
@lockScene
	LOCK 1
	SET sceneLock, 1
	SEL 9
	POSE	5 
	END

;--------------
; SCENE 2 must be primary FIGHT scene (for automatic fights)
;
SCENE 2
	THEME
	MUSIC  battle.mid

	FIGHT

END

;--------------
; SCENE 3 (this is the evergreen starting scene on the main map, where you can return to be healed)
;
SCENE 3		aztec
	THEME	0
;	MUSIC	waltz2.mid
	ACTOR	1,	"Soul Brother", joshRoyalty, 5, 25, 90
	POSE	5, 5, 13
	SEL		1
	MOVE	1,	15, 80

	IF T1, @continue
	' Greetings, new soul. You are about to embark upon an amazing voyage of discovery.
	' When sharing your journey with other souls, it is important that you obey the golden rule.
	' Do you agree to obey the golden rule? (type YES or NO)
	ASK 30
	IF -YES, @saidNo
	' Thank you, my child.  You shall never regret your decision.
	' Push the SHOP button when it appears.  You might find better equipment is available for you as your level increases.
	GIVE T1
	GOTO @continue
@saidNo
	' It is a sorry state that the world has fallen into.  You sadden me.
	' I cannot bring myself to give sustenance to such a renegade as you.
	' Begone!
	MOVE	1, -30, 80
	END


@continue

	IF ALIVE, @skip1
	' You seem to be dead, let me resurrect you.
	WAIT    4.0
	SOUND	"thunder1.wav"
	WAIT	1.0
@skip1
	MOVE	1,	10, 75
	GIVE	L1
	GIVE	H5000
	GIVE	M5000 
	IF I99,@skipTicket
	GIVE	I99				; give him a ticket home
@skipTicket
	; offer EVERYTHING under level 10
	OFFER2	0,10
	' Blessings upon you, Soul.
	' You are always welcome here, to rest and recover... 
    IF T3, @skipQuest
	IF -#0, @skipQuest		; only on main map (gateway, I hope)

	1: Say, %1, I wonder if you could aid me in a small quest...
	1: The date of the next meeting of the soul brotherhood has been changed.
    1: I don't think my brother in MacGuyver Castle has been told.
	1: If you meet him in the Castle Well, please let him know.
	1: Thank you, my child!

@skipQuest
	IF V10, @skip2
	' Visit the town well in Macguyver Castle if you have need of training.
@skip2

;alderaan
SCENE 4 alderaangate
IF T401, @enemymap
IF T402, @enemymap
IF T403, @enemymap
ACTOR 1, "Gate Guard", myactors, 2, 25, 100
1: Welcome to Alderaan City.
1: Enjoy your stay.
WAIT 3.0
PARTY T400
GOTO LINK 1,0
@enemymap
GOTO LINK 12,0
END

SCENE 5 hanscene
ACTOR 1, "Han Solo", myactors, 3, 29, 96
IF DEAD, @dead
SOUND han1.wav
1: Hokey religons and ancient weapons are no match for a good blaster at your side kid.
WAIT 4.0
1: I'll heal your wounds.
GIVE	L1
GIVE	H5000
GIVE	M5000 
1: So what do you want?
OFFER2 0,20,10, 0,20,11, 0,20,20, 0,20,21, 0,20,22, 0,20,23, 0,20,12,  0,20,0,  0,20,1
END

SCENE 6 leiathrone
MUSIC leia
ACTOR 1, "Leia Organa", myactors, 4, 25, 100
HOST_GIVE I95
IF T128,@t128
@saidno
SOUND leia1.wav
1: I don't know who you are, or where you came from, but from now on you do as I tell you.  Mkay?
WAIT 4.0
H: I'm not here to take orders from some snooty royal brat!
WAIT 3.0
SOUND leia2.wav
1: Why you stuck up, half-witted, scruffy looking, NERFHERDER!
WAIT 4.0
H: If that's the way it is, I'll take my leave now...
WAIT 2.0
1: NO! Just wait there,
WAIT 2.0
SOUND leia3.wav
1: I'll be back
MOVE 1, -30, 100
WAIT 4.0
MOVE 1, 25, 100
WAIT 4.0
1: Let's try this again shall we?
1: I am Princess Leia Organa, and you are?
H: %1 
1: It's a pleasure to meet you %1.
1: I need your help in ridding the universe of the plague that is the empire.
1: So what do you say? Will you help us destroy the empire?
ASK 30.0
IF YES,@continue
GOTO @saidno
END
@continue
IF T1, @gotmoney
1: Your help will not go unrewarded.
1: Here, take this.
HOST_GIVE T1
HOST_GIVE T400
HOST_GIVE G5000
1: Five thousand credits should buy you some equipment.
@gotmoney
1: Fight to protect the Republic.
WAIT 3.0
SOUND leia4.wav
1: I hope you know what you're doing...
WAIT 2.0
END
@t128
MUSIC ending.mid
1: Thank you %1, for all of your help.
SOUND cheering.wav
1: The Galaxy will now be free from the empire forever.
SOUND cheering.wav
1: We bestow upon you the rank of Hero.
SOUND cheering.wav
END

SCENE 7 forest
ACTOR 1, "Obi Wan Kenobi", myactors, 5,25,100
@begin
IF T2, @continue
H: I am %1, I am looking for Obi-Wan Kenobi.
WAIT 2.0
SOUND obi1.wav
1: Obi-Wan Kenobi...   Obi-Wan...
1: Now that's a name I've not heard in a long time.
1: A long time..
WAIT 3.0
1: I am Obi-Wan, I know why you have sought me out.
1: You wish to know about your destiny.
H: I don't even believe in destiny
H: I make my own choices!
WAIT 3.0
SOUND obi2.wav
1: You cannot escape your destiny.
WAIT 2.0
1: You are to bring balance to the Force.
1: Seek out the Death Star and rid us of its threat.
WAIT 4.0
SOUND obi3.wav
1: You will never find a more wretched hive of scum and villany.
WAIT 3.0
1: The journey will be difficult and you have much to learn.
1: Wha.. What is it?  What?
WAIT 3.0
SOUND obi4.wav
1: I've felt a great disturbance in the force.
WAIT 3.0
H: Are you alright?
1: I'm fine, we must begin your training.
1: Would you like me to train you in the ways of the Force?
ASK 30.0
IF -YES, @begin
HOST_GIVE T2
@continue
1: What would you like to practice?
1: (Right-Click me to train in your force skills)
@eventActorClick1
1: Which skill do you wish to learn?
MENU "Force Skills=@train1",
END

@train1
IF T300, @skip1
COMPARE #<num.hostLevel>,9
IF<, @notready 
HOST_GIVE S1
HOST_GIVE T300
SOUND useforce.wav
1: Good you have mastered Light Healing!
WAIT 3.0
END

@skip1
IF T301, @skip2
COMPARE #<num.hostLevel>,19
IF<, @notready
HOST_GIVE S2
HOST_GIVE T301
SOUND useforce.wav
1: Good you have mastered Sleep!
WAIT 3.0
END

@skip2
IF T302, @skip3
COMPARE #<num.hostLevel>,29
IF<, @notready
HOST_GIVE S3
HOST_GIVE T302
SOUND useforce.wav
1: Good you have mastered Courage!
WAIT 3.0
END

@skip3
IF T303, @skip4
COMPARE #<num.hostLevel>,39
IF<, @notready
HOST_GIVE S4
HOST_GIVE T303
SOUND useforce.wav
1: Good you have mastered Charm!
WAIT 3.0
END

@skip4
IF T304, @skip5
COMPARE #<num.hostLevel>,49
IF<, @notready
HOST_GIVE S5
HOST_GIVE T304
SOUND useforce.wav
1: Good you have mastered Jedi Heal!
WAIT 3.0
END

@skip5
IF T305, @skip6
COMPARE #<num.hostLevel>,59
IF<, @notready
HOST_GIVE S6
HOST_GIVE T305
SOUND useforce.wav
1: Good you have mastered Intimidate!
WAIT 3.0
END

@skip6
IF T306, @skip7
COMPARE #<num.hostLevel>,69
IF<, @notready
HOST_GIVE S7
HOST_GIVE T306
SOUND useforce.wav
1: Good you have mastered Force Heal!
WAIT 3.0
END

@skip7
IF T307, @skip8
COMPARE #<num.hostLevel>,79
IF<, @notready
HOST_GIVE S8
HOST_GIVE T307
SOUND useforce.wav
1: Good you have mastered Tame!
WAIT 3.0
END

@skip8
IF T308, @skip9
COMPARE #<num.hostLevel>,89
IF<, @notready
HOST_GIVE S9
HOST_GIVE T308
SOUND useforce.wav
1: Good you have mastered Revive!
WAIT 3.0
END

@skip9
IF T309, @skip10
COMPARE @<num.hostLevel>,00
IF=, @finish
GOTO @notready
@finish
HOST_GIVE S10
HOST_GIVE T309
SOUND useforce.wav
1: Good you have mastered my finest trick!
WAIT 3.0
END

@skip10
1: You have learned all that I can teach you.
WAIT 2.0
SOUND mayforce.wav
1: Remember, the force will be with you, always!
END

@notready
1: %1, you must look within yourself for the strength..
1: I can help you no more at this time.
END


;deathstar
SCENE 8, deathstargate
IF T400, @tobase
IF T402, @tobase
IF T403, @tobase
ACTOR 1, "Stormtrooper", myactors, 8, 25, 100
MUSIC "Death Star.mid"

SOUND stormtrooper1.wav
1: Let me see your identification!
WAIT 3.0
H: Here!
1: Thank you %1.
WAIT 1.0
H: Idiot...
PARTY T401
WAIT 2.0
GOTO LINK 2,0
END
@tobase
GOTO LINK 13,0
END

;bespin 
SCENE 9, bespingate
IF T401, @skip
IF T402, @skip
IF T403, @skip
ACTOR 1, "Lando Calrissian", myactors, 7, 25, 100
SOUND lando1.wav
1: Ha Ha Ha Ha Ha How you doin, you old pirate?
1: You are welcome here. Enjoy your stay
WAIT 4.0
@skip
GOTO LINK 3,0
END
;

