; Serpentine City
; Uses scenes 21-30
; Chief
SCENE 21, Grassland, SCENE, "Chief's Hut"
#include proxbeta.txt
THEME	0
MUSIC	"Serpentine City.mid"
IF T20, @WyrmQuest
ACTOR	1,	"Serpentine Chief", josh66, 1, 25, 90
FACE 1,2
COMPARE #<num.hostClass>,4
IF= @serpentine
1: Hello, young %2.  Has the smith told you about our race?  
@check
COMPARE #<KM.Wyrm>,0
IF> @cleanse
END

@serpentine
1: Hello, young serpentine.  
GOTO @check
END

@cleanse
1: Many serpentines hate the act of killing wyrms.  Only human-born serpentines will tolerate such an act due to their childhood.  
1: However, such serpentines are few and far between.  
1: The serpentine sage is a human-born serpentine.  He resides in Serpentine City, just north of my hut.  
1: He is said to be able to cleanse anyone of the sins of killing wyrms, for a small price.  
1: It seems that he may be able to help you.  Just cross the bridge behind my hut.  
END

@WyrmQuest
IF T23, @WyrmInTent
IF T21, @emptytent
ACTOR	1,	"Serpentine Chief", josh66, 1, 25, 90
FACE 1,2
1: Hello, dragon.  Did you need to talk to me?
H: Yes.  Why do serpentines hate it when wyrms are killed?
1: Wyrms are closely related to serpentines.
H: Serpentines aren't evil like wyrms, though.
1: I've never seen a wyrm attack a serpentine.  How could they be evil?
H: Maybe you should come with me.  If you won't believe me, I'll show you just how evil they are.
1: If you're so certain about this, then fine.  But while I'm gone, I'm going to have to step up on security.
1: I have to talk to the smith first.  She's become somewhat like my minister because of her inventions.
H: Okay.  I'll take you to the green wyrm lair because it's nearby.
GIVE T21
END

@WyrmInTent
FIGHT 249, -270, -271, -271
IF WON, @QuestComplete
END

@QuestComplete
H: Looks like I just proved my point.  
GIVE T24
END

; Serpentine Sage
SCENE 22, Grassland, SCENE, "Serpentine Sage"
#include proxbeta.txt
THEME	0
MUSIC	"Serpentine City.mid"
ACTOR	1,	"Serpentine Sage", serpentine2, 1, 25, 90
FACE 1,2
COMPARE #<num.hostClass>,4
IF= @serpentine
IF C5, @isDragon
1: Hello, %2.  
@check
COMPARE #<KM.Wyrm>,0
IF> @cleanse
1: I see you don't need to be cleansed.  
END

@serpentine
1: Hello, young serpentine.  
1: The smith told me about how you recovered her items.  I too am a human-born serpentine.  
GOTO @check
END

@cleanse
IF C5, @isDragon
1: You have the stench of a dead wyrm all over you.  You need to be cleansed.  
1: I'll cleanse you if you give me a demonstone.  
END

@isDragon
IF T24, @WyrmQuestComplete
IF T20, @repeatquest
1: I see you are a dragon.  Maybe you can help the others see that wyrms are evil.  
1: If I tried to convince them alone, it would ruin my reputation.  
1: Could you help me?
ASK 32000
IF YES, @wyrmtruthstart
1: Oh.  I guess you don't have the time.  
END

@WyrmQuestComplete
1: Thanks for helping me out.  I'm just suprised that the wyrm managed to get in.

@wyrmtruthstart
1: Thanks.  You should talk to the chief.  The other serpentines will take his word for anything, but he won't just take your word for it.
GIVE T20
END

@repeatquest
1: Need me to tell you again?  If the chief knows about wyrms, the others will take his word for it.
END

@eventActorGive1
COMPARE #<item.id>, 746
IF= @gotDemonstone
1: That's not a demonstone.  I need a demonstone that has no rune on it to cleanse you.  
1: You may mine it yourself, or have someone else do it for you.  
COMPARE #<item.id>, 0
IF= @gold
GIVE I#<item.id>
END

@gold
GIVE G#<item.goldGiven>
END

@gotDemonstone
1: Let me make a rune out of this...
WAIT 3
1: Done.  Now I can cleanse you.  
WAIT 1
SET KM.Wyrm,0
1: OK, now you're cleansed enough to be accepted into any serpentine shop.  
END

; Serpentine Armor
SCENE 23, Grassland, SCENE, "Serpentine Armor"
#include proxbeta.txt
THEME	0
MUSIC	"Serpentine City.mid"
ACTOR	1,	"Serpentine Smith", serpentine, 1, 25, 90
FACE 1,2
IF T24, @serpentine
IF T21, @WyrmQuest
@check
COMPARE #<num.hostClass>,4
IF= @serpentine
COMPARE #<KM.Wyrm>,0
IF> @cleanse
IF T12, @skip
1: I don't sell to humans.  
1: However, I'm working on a way for humans to become serpentines.
1: Unfortunately, I lost the items.  They could be anywhere.  
1: If you find and equip all six of my prototype serpentine items, I'll morph you into a serpentine.
GIVE T12
END

@skip
1: Have you found my items yet?
IF E23+E24+E25+E26+E27+E28, @equippedall
IF I23+I24+I25+I26+I27+I28, @foundall
1: No, I see you haven't.  Find those items!
END

@foundall
1: I see you found them.  Could you do me a favor?
1: Could you test them for me?  I need someone to try on my wares, but I didn't have anyone to try them.  
1: Just don't change in here.  
END

@equippedall
1: I can't thank you enough.
1: As promised, I will make you a serpentine.  
IF C87, @dog
SET num.hostClass,4
GIVE T13
TAKE I24
TAKE I25
TAKE I26
TAKE I27
TAKE I28
TAKE I29
END

@dog
1: I can't seem to make them work.  
1: You seem to have been cursed by the gods.
1: I'm sorry.  
END

@cleanse
1: I don't sell to wyrm-killers.  
COMPARE #<num.hostClass>,4
IF= @shame
IF T12, @skip
1: I don't sell to humans, either.  
1: However, I'm working on a way for humans to become serpentines.
1: Unfortunately, I lost the items.  They could be anywhere.  
1: If you find and equip all six of my prototype serpentine items, I'll morph you into a serpentine.
1: You'll still have to cleanse yourself before I'll sell you anything.  
GIVE T12
END

@shame
1: You bring shame to all serpentines.  Begone!
END

@serpentine
1: Hello, %2.  Thanks again for finding my prototypes.  
OFFER 974,925,824,712,675,575,475,375,625,525,425,325,270,221
END

@WyrmQuest
ACTOR	2,	"Serpentine Chief", josh66, 1, 85, 90
FACE 2,0
2: I need you to look over the city while I go to the green wyrm lair.
1: Sure thing.  I'll have everyone take turns standing watch while you're gone.  
GIVE T22
END

; Running and Jesters Shoes
SCENE 24, Grassland, SCENE, "Bootmaker"
#include proxbeta.txt
THEME	0
MUSIC	"Serpentine City.mid"
ACTOR	1,	"Bootmaker", serpentine2, 1, 25, 90
FACE 1,2
@check
COMPARE #<KM.Wyrm>,0
IF> @cleanse
COMPARE #<num.hostClass>,4
IF= @serpentine
1: I don't sell to humans, unless they give me enough money to see my wares.  
END

@eventActorGive1
COMPARE #<KM.Wyrm>,0
IF> @giveback
COMPARE #<num.hostClass>,4
IF= @giveback
COMPARE #<item.goldGiven>, 7499
IF> @paid
1: That's not enough for me.  
@giveback
GIVE G#<item.goldGiven>
END

@cleanse
1: I don't sell to wyrm-killers.
END

@paid
1: I guess I can sell you something now.
OFFER 704,717
END

@serpentine
1: Hello, young serpentine.  
1: Would you like some of my fine boots?
OFFER 704,717
END

; Comment.