;-------------------------
; Quest 120, (MINING SECTION) 

;---------
SCENE 120 mine_path, scene, "Mine Enterance"
THEME	0
ACTOR 1, "Miner", miner, 4, 35,100
WAIT 2
COMPARE #<num.peopleinscene>, 1
IF= @normal1
1:There are no parties allowed in the mine.
1:You'll have to enter seperately.
END
@normal1
COMPARE #<mininglevel>, 0
IF> @special
IF #51, @leavingmine
IF C18, @alreadyaMiner
GIVE L100000
1:Welcome to the mine!
1:Before we start - Remember no parties allowed in the mines :) Thanks.
EJECT 
1:From here you can follow the stairs behind me to the lift that goes down into the mine
1:Before you start mining you will need to buy some equipment from me
1:If you have it already you can just enter and no more explanations about this mine is needed :)
1:If you would just follow me up the stairs and then down the lift. 
1:I will be waiting at the bottom. I will give you your equipment for a reasonable price and then give you a quick
1:Tutorial on how to mine later if you are new to this.
1:See you at the bottom :)
1:WAIT! I just remembered something!
1:Before I let you go you need to ofically become a miner class
1: hmmm you are currently a %c , I will take note of that so you can change back when you want to leave
SET oldclassname, %C
SET hostclass, #<num.hostClass>
COMPARE #<minerclass>, 9
IF= @gravedigger
COMPARE #<minerclass>, 12
IF= @Burrower
COMPARE #<minerclass>, 13
IF= @QuarryWorker
COMPARE #<minerclass>, 14
IF= @Excavator
COMPARE #<minerclass>, 15
IF= @Archaeologist
COMPARE #<minerclass>, 16
IF= @ExileMiner
COMPARE #<minerclass>, 17
IF= @NativeMiner
COMPARE #<minerclass>, 18
IF= @FreelanceMiner
GOTO @gravedigger
END

@leavethemine
1:I respect your choice but I still feel you are losing out and will not get a great class
1:Cya
WAIT 2
GOTO EXIT

@gravedigger
1:I will change your class now, you will start as a "Gravedigger"
EJECT
SET num.hostClass, 9
1:You are labled as a gravedigger now
goto @skipchange

@Digger
1: I see that you used to be a Digger
GOTO @setoldminerclass
END

@Burrower
1: I see that you used to be a Burrower
GOTO @setoldminerclass
END

@QuarryWorker
1: I see that you used to be a quarry worker
goto @setoldminerclass
END

@Excavator
1:I see that you used to be an Excavator
goto @setoldminerclass
END

@special
SET hacker, 1
GIVE T374
goto link 59, 0

@Archaeologist
1:I see that you used to be an Archaeologist
goto @setoldminerclass
END

@ExileMiner
1:I see that you used to be an Exile Miner
goto @setoldminerclass
END

@NativeMiner
1:I see that you used to be a Native Miner
goto @setoldminerclass
END

@FreelanceMiner
IF C18 @alreadyaminer
1:I see that you used to be a Freelance Miner but decided to keep your old class.
1:I will make you a freelance miner again.
SET num.hostClass, 18
SET minerclass, #<num.hostclass>
GOTO @cyaAtBottom
END

@alreadyaMiner
1:You are already a freelance miner so there is no need for me to change your class
goto @cyaAtBottom

@setoldminerclass
1:I will now change you back to that miner class, please wait
WAIT 4
SET num.hostclass, #<minerclass>
goto @cyaAtBottom
END

@skipchange
1:It may seem like a bad name not but it improves when your mining skill increases
@cyaAtBottom
1:I'll see ya at the bottom
WAIT 3
GOTO link 51, 1
END

@leavingmine
COMPARE #<num.peopleinscene>, 1
IF= @normal2
1: No parties allowed. Unparty, and try again.
END
@normal2
COMPARE #<minerclass>, 18
IF= @noneedforchange
COMPARE #<ML>, 100
IF= @error
1:Welcome back! I see you are wanting to leave the mine now
1:Before you leave I have to change you back to your old class
1:I will do that now but I will also take note of your current mining class so that when you return you can become the same class you are now again
1:ok so you are currently a %C, I'd better take note of that
SET minerclass, #<num.hostClass>
SET num.hostClass, #<hostclass>
1:There! You are now a #<oldclassname> class again
1:I recommend that when this scene has ended you incarnate again so that your class is fully sorted
1:I hope to see you back in the mine soon :)
1:Cya
WAIT 1
GOTO link 47, 1
END

@error
1:weird, your mining level is at 100 but you are not a freelance miner :(
1:You may have decided that you didn't want to be one
1:Anyway I am giving you a chance to become one if an error made it so you couldn't be one
1:You will lose ALL your hand and elements training but you will have 10000hp and access to some ultimate weapons
1:Would you like to become a freelance miner?
WAIT 2
@errormenu
MENU "Yes=@becomeafreelance", "no, I would like my old class back=@oldclass"
GOTO @errormenu

@becomeafreelance
SET num.hostClass, 18 (Freelance miner)
SET minerclass, 18
1: You now have the class of a %C18
1: It would be wise to leave to go the well and incarnate again
1: But do this after this current scene has finished :) 
1: I will send you outta the mine now
1: I hope we will meet again soon :)
1: Cya
WAIT 1
GOTO link 47, 1
END

@noneedforchange
Compare #<freelancechoice>, 1
IF= @freelanceforever
Compare #<freelancechoice>, 2
IF= @oldclassforever
1:Hey there! I see that you are wanting to leave
1:COOL!!! You are a Freelance miner!
1:That means that I can let you past without changing you class back
1:IF you decide to stay as a miner it will become PERMANANT
1:So the next time you visit the mine you may not ever be able to become an #<oldclassname> again
1:would you like to become a miner forever or become a #<oldclassname> again?
@menu
MENU "I would like to become a miner forever=@forever", "I would like my old class back, thanks=@oldclass"
GOTO @menu
END

@freelanceforever
1: I see you are wanting to leave, Last time we talked you wanted to be a freelance miner forver so I don't need to change your class anymore
1: I will just let you past as you are since you are a freelance already
1: Cya
WAIT 2
GOTO link 47,1
END

@oldclassforever
1: I see you are wanting to leave, last time we talked you wanted to be your oldclass forever so I am going to have to chage you back to a #<oldclassname>
SET num.hostClass, #<hostclass>
1: You are a %C#<hostclass> now
1: It was your choice not mine, so don't complain
1: Cya
GOTO Link 47,1
END

@forever
IF C18 @forever2
1: I now will make you become a freelance miner forever
TAKE T666
TAKE T142
TAKE S259
TAKE S260
TAKE S261
TAKE S270
TAKE S271
TAKE S272
TAKE S273
TAKE S274
TAKE S275
TAKE S276
TAKE S277
TAKE S278
SET minerclass, #<num.hostClass>
SET freelancechoice, 1
1: I hope that you will enjoy being a Freelance miner
1:you should do though, since your class has more hp and better weapons :)
1:cya
WAIT 1
GOTO link 47, 1
END

@forever2
SET minerclass, #<num.hostClass>
SET freelancechoice, 1
1:You will now be a freelance miner forever, I didn't change your class to a freelance miner because you are already one
1:Anway I hope you enjoy being a miner class, you have more hp and better weapons that other classes so you should be happy
1:cya
WAIT 1
GOTO link 47, 1
END

@oldclass
1:Are you sure?? If you decide to stay as your old class you won't be able to go around Gargoyles as a freelance miner. You could only be a freelance in the mine, think about this carefully! 
@areyousure
1:Would you want this to happen??
WAIT 3
MENU "No I wouldn't=@wantoldclassbackthen?", "Yes I want my old class back please=@change"
GOTO @areyousure
@change
1:Ok then, you will become a #<oldclassname> in no time
SET freelancechoice, 2
SET minerclass, #<num.hostClass>
SET num.hostClass, #<hostclass>
1:You are now a #<oldclassname> again
1:cya
WAIT 1
GOTO link 47, 1
END

@wantoldclassbackthen?
1:Ok, do you want to stay as a freelance miner forever then?
WAIT 4
GOTO @menu
END
;---------
SCENE 121 minebackground, cut, "Mining scene"
THEME	
SET me, %1
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
COMPARE #<mininglevel>, 0
IF> @special
IF #50 @stone
IF #52 @wood
IF #53 @copper
IF #54 @steel
IF #55 @silver
IF #56 @gold
IF #57 @diamond
IF #58 @Platinum
END

@stone
ACTOR	1,	"Stone", rocks, 1, 13, 90
GOTO @mirror

@wood
ACTOR	1,	"Wood", rocks, 3, 13, 90
set requiredlevel, 10
COMPARE #<ML>, 10
IF< @cannotminethis
GOTO @mirror

@copper
ACTOR	1,	"copper", rocks2, 1, 13, 90
set requiredlevel, 20
COMPARE #<ML>, 20
IF< @cannotminethis
GOTO @mirror

@steel
ACTOR	1,	"steel", rocks2, 3, 13, 90
set requiredlevel, 30
COMPARE #<ML>, 30
IF< @cannotminethis
GOTO @mirror

@silver
ACTOR	1,	"silver", rocks3, 1, 13, 90
set requiredlevel, 40
COMPARE #<ML>, 40
IF< @cannotminethis
GOTO @mirror

@gold
ACTOR	1,	"gold", rocks3, 3, 13, 90
set requiredlevel, 50
COMPARE #<ML>, 50
IF< @cannotminethis
GOTO @mirror

@diamond
ACTOR	1,	"diamond", rocks4, 1, 13, 90
set requiredlevel, 60
COMPARE #<ML>, 60
IF< @cannotminethis
GOTO @mirror

@platinum
ACTOR	1,	"platinum", rocks4, 3, 13, 90
set requiredlevel, 80
COMPARE #<ML>, 80
IF< @cannotminethis
GOTO @mirror

@mirror
ACTOR	2,"#<me>", mirror,	1,80,80
ACTOR   3, "", buttons, 1,15,30	
SET actiontype, 0
COMPARE #<initialise> , 1
IF= @skip
SET stoneparticlechance, 12
SET woodparticlechance,  13
SET copperparticlechance,14
SET steelparticlechance, 20
SET silverparticlechance,21
SET goldparticlechance, 22
SET diamondparticlechance, 23
SET platinumparticlechance, 28
SET ML, 0 
SET particlecounter, 0 (When this counter reaches 12 a stone particle will drop)
SET hitchance, 74 (The host will start with a 74% chance of hitting the material)
SET damage, 0 (when this value reaches the value of #<weaponwithstand> there will be a chance of the axe breaking
SET brokenaxe, 0 (When set at 1, the axe is broken)
SET Extrahit, 0
SET initialise, 1 (When set at 1 the host will not encounter this part again)
SET Hitsneeded, 20 (The hits needed tells the scene how many hits are needed till they level up)
SET Mininglevel, 0 (The mining level of the host, when at 100 you will be a freelance miner)
SET stone, 0 (How many stone particles the host has)

@skip
Compare brokenaxe, 1
IF= @brokenaxe
MOVE 2, 28,80
WAIT 7.5
END

@eventActorClick1 (The stone has been clicked)
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
IF E#<itemID>+E59 @start
2: I cannot mine without a pickaxe or a pouch equipped, that would be crazy!
2: I can't mine with my bare hands, I would get bruised
2: I am going to wait here until you have equipped me with a pouch and a pickaxe
WAIT 2
@equiploop
IF E#<itemID>+E59 @thankyou
GOTO @equiploop
@thankyou
2:Thank you for equipping the items!
2:Now I can mine without getting bruised 
@start
Compare #<brokenaxe>, 1
IF= @brokenaxe
IF R#<hitchance> @hit
goto @miss

@hit
SELECT 2
POSE 2
WAIT .5
SELECT 1
IF #50 @pose2
IF #52 @pose4
IF #53 @pose2
IF #54 @pose4
IF #55 @pose2
IF #56 @pose4
IF #57 @pose2
IF #58 @pose4


@pose2
POSE 2
goto @sound

@pose4
POSE 4
goto @sound

@woodsound
SOUND woodhit.wav
GOTO @wait.5

@sound
IF #52 @woodsound
SOUND Chink.wav
@wait.5
WAIT .5
SELECT 2
POSE 1
SELECT 1
IF #50 @pose1
IF #52 @pose3
IF #53 @pose1
IF #54 @pose3
IF #55 @pose1
IF #56 @pose3
IF #57 @pose1
IF #58 @pose3

@pose1
POSE 1
goto @wait.2

@pose3
POSE 3

@wait.2
WAIT .2

@levelcheck
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
IF #50 @comparelvl10
IF #52 @comparelvl20
IF #53 @comparelvl30
IF #54 @comparelvl40
IF #55 @comparelvl50
IF #56 @comparelvl60
IF #57 @comparelvl80
IF #58 @comparelvl100

@comparelvl10
COMPARE #<ML>, 10
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl20
COMPARE #<ML>, 20
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl30
COMPARE #<ML>, 30
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl40
COMPARE #<ML>, 40
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl50
COMPARE #<ML>, 50
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl60
COMPARE #<ML>, 60
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl80
COMPARE #<ML>, 80
IF= @damage
IF> @damage
SUB Hitsneeded, 2
GOTO @compareparticle

@comparelvl100
COMPARE #<ML>, 100
IF= @damage
IF> @damage
SUB Hitsneeded, 2

@compareparticle
add particlecounter, 1
IF #50 @stonecompare
IF #52 @woodcompare
IF #53 @coppercompare
IF #54 @steelcompare
IF #55 @silvercompare
IF #56 @goldcompare
IF #57 @diamondcompare
IF #58 @Platinumcompare
END

@stonecompare
COMPARE #<particlecounter>, #<stoneparticlechance>
IF= @stonedrop
IF> @stonedrop
COMPARE #<ML>, 10
IF= @end2
IF> @end2
GOTO @damage

@woodcompare
COMPARE #<particlecounter>, #<woodparticlechance>
IF= @woodDrop
IF> @woodDrop
COMPARE #<ML>, 20
IF= @end2
IF> @end2
GOTO @damage

@coppercompare
COMPARE #<particlecounter>, #<copperparticlechance>
IF= @copperdrop
IF> @copperdrop
COMPARE #<ML>, 30
IF= @end2
IF> @end2
GOTO @damage

@steelcompare
COMPARE #<particlecounter>, #<steelparticlechance>
IF= @steeldrop
IF> @steeldrop
COMPARE #<ML>, 40
IF= @end2
IF> @end2
GOTO @damage

@silvercompare
COMPARE #<particlecounter>, #<silverparticlechance>
IF= @silverdrop
IF> @silverdrop
COMPARE #<ML>, 50
IF= @end2
IF> @end2
GOTO @damage

@Goldcompare
COMPARE #<particlecounter>, #<goldparticlechance>
IF= @goldDrop
IF> @goldDrop
COMPARE #<ML>, 60
IF= @end2
IF> @end2
GOTO @damage

@diamondcompare
COMPARE #<particlecounter>, #<diamondparticlechance>
IF= @diamonDdrop
IF> @diamonDdrop
COMPARE #<ML>, 80
IF= @end2
IF> @end2
GOTO @damage

@platinumcompare
COMPARE #<particlecounter>, #<platinumparticlechance>
IF= @platinumdrop
IF> @platinumdrop
COMPARE #<ML>, 100
IF= @end2
IF> @end2
@damage
compare #<itemID>, 119
IF= @comparemap
add damage, 1
COMPARE #<damage>, #<weaponwithstand>
IF= @damagechance
IF> @damagechance
@comparemap
IF #50 @lvl10
IF #52 @lvl20
IF #53 @lvl30
IF #54 @lvl40
IF #55 @lvl50
IF #56 @lvl60
IF #57 @lvl80
IF #58 @lvl100
END

@lvl10
COMPARE #<ML>, 10
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl20
COMPARE #<ML>, 20
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl30
COMPARE #<ML>, 30
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl40
COMPARE #<ML>, 40
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl50
COMPARE #<ML>, 50
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl60
COMPARE #<ML>, 60
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl80
COMPARE #<ML>, 80
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@lvl100
COMPARE #<ML>, 100
IF= @compareparticle
IF> @compareparticle
GOTO @compare3

@damagechance
IF R20 @brokenaxe
goto @compare3

@brokenaxe
SOUND JUNK.wav
SET brokenaxe, 1 (Makes is so that the axe is seen as damaged)
N: The pickaxe you are using has been damaged badly by your last hit and is now broken
N: You will have to buy a new axe before you can carry on mining
WAIT 5
goto @end

@compare3
COMPARE #<Hitsneeded>, 0
IF= @levelup
IF< @levelup
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@stonedrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD stone, 1
SET particlecounter, 0
N: A particle of stone has fallen from the rock
N: You carefully put it into your pouch
N: Your pouch now holds #<stone> stone particle/s
WAIT 3
COMPARE #<ML>, 10
IF= @end2
IF> @end2
GOTO @damage
END

@wooDdrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD wood, 1
SET particlecounter, 0
N: A particle of wood has fallen from the piece you are hitting
n: You carefully put it into your pouch
N: Your pouch now holds #<wood> wood particle/s
WAIT 3
COMPARE #<ML>, 20
IF= @end2
IF> @end2
GOTO @damage
END

@copperdrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD copper, 1
SET particlecounter, 0
N: A particle of copper has fallen from the rock
N: You carefully put it into your pouch
N: Your pouch now holds #<copper> copper particle/s
WAIT 3
COMPARE #<ML>, 30
IF= @end2
IF> @end2
GOTO @damage
END

@steeldrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD steel, 1
SET particlecounter, 0
N: A particle of steel has fallen from the rock
N: You carefully put it into your pouch
N: Your pouch now holds #<steel> steel particle/s
WAIT 3
COMPARE #<ML>, 40
IF= @end2
IF> @end2
GOTO @damage
END

@silverdrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD silver, 1
SET particlecounter, 0
N: A particle of silver has fallen from the rock
N: You carefully put it into your pouch
N: Your pouch now holds #<silver> silver particle/s
WAIT 3
COMPARE #<ML>, 50
IF= @end2
IF> @end2
GOTO @damage
END

@golDdrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD gold, 1
SET particlecounter, 0
N: A particle of gold has fallen from the rock
N: You carefully put it into your pouch
N: Your pouch now holds #<gold> gold particle/s
WAIT 3
COMPARE #<ML>, 60
IF= @end2
IF> @end2
GOTO @damage
END

@diamonDdrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD diamond, 1
SET particlecounter, 0
N: A particle of diamond has fallen from the rock
N: You carefully put it into your pouch
N: Your pouch now holds #<diamond> diamond particle/s
WAIT 3
COMPARE #<ML>, 80
IF= @end2
IF> @end2
GOTO @damage
END

@platinumdrop
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
ADD platinum, 1
SET particlecounter, 0
N: A particle of platinum has fallen from the rock, you carefully put it into your pouch
N: Your pouch now holds #<platinum> platinum particle/s
WAIT 3
COMPARE #<ML>, 100
IF= @end2
IF> @end2
GOTO @damage
END

@special
SET hacker, 1
GIVE T374
GOTO link 59, 0
END 

@miss
IF R20 @miss2
IF R20 @miss3
IF R20 @miss4
IF R20 @miss5
N: You tried feebly to hit the rock but failed
WAIT 2
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@miss2
N: The pickaxe failed to make contact will the rock
WAIT 2
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@miss3
N: You missed the rock completely falling flat on your face!!
WAIT 2
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@miss4
N: The rock wasn't even struck! You totally missed it!
WAIT 2
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@miss5
N: That was lame! You missed the rock, striking the ground instead!!
WAIT 2
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@levelup
SOUND horn.wav

@map
IF #50 @lvlstone
IF #52 @lvlwood
IF #53 @lvlcopper
IF #54 @lvlsteel
IF #55 @lvlsilver
IF #56 @lvlgold
IF #57 @lvldiamond
IF #58 @lvlplatinum

@lvlstone
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB stoneparticlechance, 1
ADD ML, 1
ADD hitchance, 2
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 10
IF= @maxstone
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvlwood
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB woodparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 20
IF= @maxwood
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvlcopper
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB copperparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 30
IF= @maxcopper
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvlsteel
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB steelparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 40
IF= @maxsteel
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvlsilver
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB silverparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 50
IF= @maxsilver
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvlgold
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB goldparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 60
IF= @maxgold
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvldiamond
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB diamondparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 80
IF= @maxdiamond
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@lvlplatinum
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SUB platinumparticlechance, 1
ADD ML, 1
ADD hitchance, 1
ADD Extrahit, 2
SET hitsneeded, 20
ADD hitsneeded, #<Extrahit>
N: YOUR MINING LEVEL HAS INCREASED!!
N: You now have a mining LEVEL of #<ML>
COMPARE #<ML>, 100
IF= @maxplatinum
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END

@maxstone
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET stoneparticlechance, 2
SET num.hostClass, 10 (Digger)
SET minerclass, 10
N: Your class has changed to a %C10
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
9:You have now reached your maximum experience that you can gain from stone rocks!
9:You getting the hang of mining now! I think your character is intelligent enough to hit the rocks on his own now!
9:You can make your character hit for you, just click on the "Autohit" button at the top left of the screen
9:By doing this the mode will be changed from "manual" to "automatic"
9:This will stop you from getting RSI from clicking your mouse ;)
9:If you don't know what RSI is then it will stop you from tiring out your hand
9:Because you have increased in levels you can go to the next level of the mine!
9:In mine level 2 you can mine for wood. This wood could be gathered to help create wooden shields
9:You can carry on mining stone if you want and you will still recieve particles.
9:The more particles you collect the better the weapons can be forged for you.
9:Since you have the maximum stone level your experience gained from mining rocks is too low to level up.
9:But you will gain more particles instead of leveling up.
9:You can either go to the next mine or carry on mining for rock it is up to you!
WAIT 3
MOVE 9, 120,50
WAIT 1
9:Cya
END

@maxwood
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET woodparticlechance, 2
SET num.hostClass, 12 (Burrower)
SET minerclass, 12N: Your class has changed to a %C12
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
9:Guess who's back, Guess who's back,  Guess who's back, Guess who's back
9:oh! sorry I got carried away there!
9:I bet you got sick of my blabbering the last time I told you that you had reached your highest level for the map!
9:Well I'm here to say it again...
9:You have reached you maximum level that you can when you are mining for wood
9:You can either carry on mining wood or go the next level and start mining for copper
9:It's up to you now...
WAIT 3
MOVE 9, 120,50
WAIT 1
9:Cya
END

@maxcopper
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET copperparticlechance, 2
SET num.hostClass, 13 (Quarry Worker)
SET minerclass, 13
N: Your class has changed to a %C13
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
9:yawn... ack, I am knackered, let me sleeeeeep!
2: Well sorry for getting to the maxiumum copper level!!
2: I used to get congratulated, now you just don't give a ****!!!
9:I do!! I'm just very tired
9:Congrats, you happy now?
2:If you are going to be an idiot you might as well just leave!
9:man!! I can't even congratulate anyone anymore... 
WAIT 3
MOVE 9, 120,50
WAIT 1
9:I'm going back to bed!!!
2:GOODNIGHT THEN, IDOIT!!!!
2:He was in a bad mood, lol
2:Anway I'm at the max level now so if I wanted I could go and mine some steel
2:This would be useful for creating good strong swords! Anyway if you wanted you could carry on mining here...
END

@maxsteel
2: woo hoo!
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET steelparticlechance, 2
SET num.hostClass, 14 (Excavator)
SET minerclass, 14
N: Your class has changed to a %C14
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
9:sup?
2: I am at the maxiumum steel level now!
9:Congrats!
2: You seem to be in a better mood now?
9: What do ya expect? I've had my sleep now and I wasn't RUDELY awakened
2: Sorry I woke you before, I was just glad that I had reached the max level for copper
9: Forget about it, I have
2: Ok, well I'm gonna carry on mining here for a while
9: sure thing but don't forget that you can start mining for silver anytime you want now :)
2: ok, later dude
WAIT 3
MOVE 9, 120,50
WAIT 1
9:Cya
END

@maxsilver
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET silverparticlechance, 4
SET num.hostClass, 15 (Archaeologist)
SET minerclass, 15
N: Your class has changed to a %C15
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
2: lemme guess, you are here because I have reached the maximum silver level?
9: nope, I came to tell you that you have left your flies open!!
2: oh crap!!! (Blushing), ummmm thanks for telling me
9: Your welcome, lol
9: OH! Wait a minute, you are at the maxiumum silver level!
2: SWEET! That means I can go and mine for some gold when I have finished mining for silver
2: Thanks for saying, if you didn't I may have carried on mining!!!
9: Anyway I'm going now
2: ok, cya
WAIT 2
MOVE 9, 120,50
WAIT 1
9:Cya
END

@maxgold
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET goldparticlechance, 5
SET num.hostClass, 16 (Exile Miner)
SET minerclass, 16
N: Your class has changed to a %C16
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
2: Weird, I am an exile miner now! It must be because people hate me :(
2: I must have taken form as the hated mining class
2: From what I have read in the Gargoyle history books, the exile miners were very evil!
2: They were not seen as miners at all, they just stole from the native miners and claimed it was what they had mined
2: I don't want to be this class for very long, so I should start mining diamond since I'm at the maximum gold level
9: hey! Just hold on a sec
2: sup?
9: Don't be too hard on yourself about the %C16 business! That was YEARS ago, I don't think they would be the same these days
2: But they are still hated by other people and they would use us as scapegoats!
9: True, but you are ok in these mines, the people here are only miners so they will understand
9: It's just the native miners that may hate you because of their bad experiences
9: Just don't get worked up about it and carry on mining
2: ok! Thanks for the chat
9: np :)
WAIT 3
MOVE 9, 120,50
WAIT 1
9:Cya
WAIT 1
2:Hmph! Don't worry about it!! How can I forget I am a %C16, Nobody will forget the past of this class
2:Anyway I'd better carry on mining now so that I can change to a more trustworhy class
END

@maxdiamond
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET diamondparticlechance, 6
SET num.hostClass, 17 (Native miner)
SET minerclass, 17
N: Your class has changed to a %C17
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
2:WOO HOO! I am no longer a Exile miner!!! I am a %C17!!
9:You have done very well to get this far %1
2:Thanks
9: Just think, when you next reach next the maximum level you will be a freelancer miner
9: It may feel very daunting with how long it may take you but it will be worth it in the end
9: Oh and one thing when you become a freelance miner you will have access to a weapon better than a soul item
9: and.. you will also have the most hp compared to everyone else
9: So if you are at level 1, you should find it very easy to get to level 100 fast but don't!
9: You you level to level 85 fast and have no hours on your character you may risk losing a character
9: I just hope that you didn't get so far by doing automatic mode and then going AFK (away from keyboard)
9: If you did your character will NOT have gained any hours and because of this you may set of Dans' character ban :(
9: This means that you may lose your character, the best way to mine was to do automatic mode and talk
9: You would either do this to your mates online or maybe just type a letter once in a while if you are solo
9: This would stop your character from turning afk and then stopping you recieving hours :(
9: Anway your character age is - #<num.hostAge> minutes, I'm sure that from this you can decide whether your characters' age is high enough
9: If you find that it is low then I suggest that you make sure you DON'T go afk when you in the mine and are leveling to get the max platinum level
9: If you are in solo just keep checking that your character isn't afk, if he is just type a letter
9: If you are on the muliplayer you can just carry on chatting to your mates while you are mining, this will prevent you char from not getting any hours
9: anyway I hope you haven't been afk for the whole during of mining because you will have a BIG problem when you starting leveling your character in Gargoyles
9:If you feel that leveling to 100 will be a problem for you character in Gargoyles, DON'T LEVEL to 100, just go to 98
9:Then either mine when NOT AFK or do some quests that WON'T make you level up!
9: I think I have made myself clear! Don't go complaing to Dazman if you lose your mining character because you skipped all of this!
9:Good luck getting to the maximum platinum level, everybody wants you to make it!!
WAIT 3
MOVE 9, 120,50
WAIT 1
9:Cya
2:I'd better be careful about what he said and make sure I don't go afk and lose hours for my character
END

@maxplatinum
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
COMPARE #<num.peopleInScene>, 1
IF> @toomanypeople
SET platinumparticlechance, 7
SET num.hostClass, 18 (Freelance miner)
SET minerclass, 18
N: Your class has changed to a %C18
N: It would be wise to leave to go the well and incarnate again
N: But do this after this current scene has finished :) 
9:CONGRATULATIONS!!!!!!!! YOu are now have a level 100 mining skill!
9:I bet that took you ages, even days maybe, lol
9:You can now become a freelance miner and go around gargoyles as a miner
9:If you was a sword user before you are lucky because you will be able to exchange your current pickaxe for a new one
9:This new pickaxe will require that you are trained with swords, if you were another class you will just have to train your sword skills
9:The new pickaxe won't be that impressive but if you have loads of particles you can now exchange them for a weapon even weapon even better than a soul item!!
9:And something that is even better, is that there is no level limit to this weapon
9:you will have earned it from all your mining, so if you are a low level character you will have the best of both worlds!
9:You will have HIGHER hp than everyone else and a BETTER weapon too :)
9:New weapons are now available to you since you are a Freelance miner
9:But you also need the correct particles, if you don't have enough yet you can just go back to each levels of the mines and collect more raw materials
9:When you are ready to return to Gargoyles as a Freelance miner just visit me at the top of mine level 8 and I will be ready to send you home :)
WAIT 5
MOVE 9, 120,50
WAIT 1
9:Cya
END

@end
GOTO EXIT
END

@end2
COMPARE #<Actiontype>, 1
IF= @eventActorClick1
END


@eventActorClick3 (The automatic/manual button has been pressed)
COMPARE #<actiontype>, 1
IF= @actiontype2

@actiontype1
SELECT 3
POSE 2
SET actiontype, 1
N: You are now in automatic mode! 
N: To stop it you will have to leave the scene
WAIT 2
GOTO @eventActorClick1
END

@actiontype2
SELECT 3
POSE 1
SET actiontype, 0
END

@toomanypeople
ACTOR 9, "Miner", miner, 4, 110,50
MOVE 9, 80, 50
WAIT 2
9:Mining is a solo effort
9:There shouldn't be more than one person mining a rock
9:%1 the scene will begin again when you have told your friend/s to leave the scene
9:As soon as they have left it will continue
9:I will wait here until then!
@peopleloop
COMPARE #<num.peopleInScene>, 1
IF= @goodbye
GOTO @peopleloop
END

@goodbye
9:Thanks for telling them to leave!
9:Only one person should be mining and no more
9:I will restart the scene for you now :)
WAIT 3
MOVE 9, 120,50
WAIT 1
9:Cya
WAIT 1
GOTO scene 121
END

@cannotminethis
h: I cannot mine this at level #<ML>
h: I wouldn't know where to start, I need more training to gain particles from this
h: I'll come back to this rock when I have a mining level of #<requiredlevel>
WAIT 6
GOTO EXIT
END

;---------
SCENE 122 minebackground, scene, "Mining Shop"
THEME	0
GIVE H10000
ACTOR 1, "Miner", miner, 4, 35,100
COMPARE #<brokenaxe>, 1
IF= @need_axe_repaired
IF T91 @skiptutorial
1: That took you quite a while to get down the stairs
1: Before I can let you do some mining I need to give you a tutorial
@tutorial
1: You will need to buy a "mining pouch" and an "axe" off me to mine
1: I recommend that you buy a "Newbie Pickaxe" if you have not mined before
1: The pickaxe is needed so that you can hit the rocks
1: As for the pouch, that is used to hold rock, wood, crystal and other particles
1: Without the pouch you will severly be limited because you wouldn't be able to hold all the particles
1: In this place there is a total of 8 levels to this mine where you can mine for all different types of raw materials
1: When you reach the higher levels you will notice that it takes considerably longer to increase your skill so don't worry
1: It will all be worth it in the end when you have one of the best classes in the game
1: Anway in this mine you can collect particles from -
1: stone, wood, copper, steel, silver, gold, diamond and platinum
h: Steel??? How are you supposed to mine that when it isn't found in pure form inside a mine?
1: Well this steel iis different it has has already been created
h: What do you mean?
1: Well many hundreds of years ago inside mine level 4 it was covered with limestone and iron ore and coal
1: To make steel the blacksmith would need these 3 raw materials and he would weld them together
1: This was very time consuming because the miners had to collect limestone and iron ore and coal and take it to the blacksmith to produce molten steel
1: One day Tenacious a freelance miner came up with a bright idea, this was to find every blacksmith in Gargoyles
1: and then bring them to mine level 4. Then they would wield the raw materials in the mine
1: Everyone thought this was a great idea so they went ahead with it and all the blacksmiths were found.
1: Tenacious and the rest of the miners managed to find 20 blacksmiths. These blacksmiths were at work for many months
1: After all the weilding and messing around in the level 4 mine, they had finally finished
1: Everybody hailed it a success and decided to change the name of the mine to the "steel mine"
1: Now everybody just takes this mine for granted and many have come to believe that the steel located here was always a part of this mine
1: But we both know otherwise, that mine is manmade
1: Some day this steel will all be gone but coal and iron ore and limestone will be left underneath it all
1: Then the all process of finding some blacksmiths will have to happen again
1: I just hope that it will last for more years but many people have been complaining about that mine lately 
1: Anyway enough of the past, I will now show you how to mine!
WAIT 2
ACTOR	2,	"Stone", rocks, 1, 13, 90
1: This that has just appeared is a stone
1: It is the most basic of the things that you will mine, and is the cheapest too
1: When you find a stone in the mine all you have to do is right click on it
1: This will make you hit the rock and after a certain amount of hits you will recieve a "particle"
1: These particles can be taken to the blacksmith next to me to forge some weapons
1: The weapons forged by this blacksmith will be much better than the normal weapons
1: You just have collect the correct amounts of particles and then give him a little bit of money
1: You could even have a weapon better than a soul item!!! But you would be have to be a very good miner to come
1: even close to getting one of these prized weapons
1: Anyway when you are mining you will also see this button -
WAIT 3
ACTOR   3, "", buttons, 1,15,30	
1: Again all you have to do is right click on it and it will change
1: This button is used to control how you mine
1: You can either do it manually or your character can do it automatically for you until you leave the scene!
1: oh yeah, one more thing, when you gain 10 levels in your mining skill you get another name for your mining class
1: When this happens you can go to the next mine and mine for better particles
1: The rest you need to know you should learn for yourself :)
1: The last thing you have to do now is buy a "Newbie pickaxe" and you will get a "mining pouch" free!
WAIT 5
ACTOR 2,
ACTOR 3,
bkgnd axes
1: Take a minute to view the contents of this shop
1: I will return in a while to see what you want
WAIT 4
ACTOR 1
WAIT 90
ACTOR 1, "Miner", miner, 4, 35,100
1: You should have viewed most of it now!
GIVE T91
@axe
bkgnd axes
1: Which of Pickaxes do you want?
WAIT 3
@menu1
MENU "newbie pickaxe=@Newbie", "Stronger newbie pickaxe=@stronger", "Wood Pickaxe=@wood", "Grappling Pickaxe=@grap", "Long Pickaxe=@long", "Reinforced Pickaxe=@reinf", "Reinforced V2=@reinFv2", "Sharp Pickaxe=@sharp", "Reapers Pickaxe=@reap", "I don't want an axe, I want to sell mine=@sellapickaxe"
1:Please make your selection again
WAIT 2
GOTO @axe 

@Newbie
1:This newbie pickaxe is 500gp
1:When you have bought this pickaxe you will get a pouch free and then you can start mining (At Last)
IF G500 @buynewbie
1:You seem to be short of cash, maybe you could use your credit card to withdraw some money and then come back to me
1:Come back when you have 500gp
END

@buynewbie
TAKE G500
GIVE I50  (Newbie Pickaxe)
SET itemID, 50
SET weaponwithstand, 150
GIVE I59  (Pouch)
GIVE T90
SET axe, %I50
1:Thank you for your purchase! You have now got a newbie pickaxe and a free pouch!
1:You will have to equip your pickaxe as a secondary weapon, so it will go where your shield is in your right hand
1:The pouch needs to be equipped where your amulets go.
1:Without these equipped you cannot mine!
1:The blacksmith next door has just opened if you wanna see what the shop is like
1:If you want to start mining, just go straight up from where you are and click on a rock when you enter the mine!
1:Good luck with your mining!
END

@stronger
SET wanteditem, %I51
SET needlevel, 5
COMPARE #<ML>, 5
IF< @sorry
1: hmmmm for a stronger pickaxe it will cost you a total of 700gp
WAIT 3
IF G700 @checkforoldpickaxe
1:Sorry you don't have enough for a stronger newbie pickaxe, come back when you enough gp
END

@buystronger
TAKE G700
GIVE I51
SET itemID, 51
SET weaponwithstand, 170
SET axe, %I51
GOTO @thanksforpurchase


@wood
SET wanteditem, %I52
SET needlevel, 10
COMPARE #<ML>, 10
IF< @sorry
1:To buy a wood pickaxe it will cost you 1000gp
WAIT 3
IF G1000 @checkforoldpickaxe
1:Sorry but you don't have enough gp for a wood pickaxe, come back when you do
END

@buywood
TAKE G1000
GIVE I52
SET itemID, 52
SET weaponwithstand, 200
SET axe, %I52
GOTO @thanksforpurchase

@grap
SET wanteditem, %I53
SET needlevel, 20
COMPARE #<ML>, 20
IF< @sorry
1:The price of a grappling pickaxe is 1200gp
WAIT 3
IF G1200 @checkforoldpickaxe
1:Sorry you come short of 1200gp, please come back when you are richer!
END

@buygrappling
TAKE G1200
GIVE I53
SET itemID, 53
SET weaponwithstand, 240
SET axe, %I53
GOTO @thanksforpurchase

@long
SET wanteditem, %I54
SET needlevel, 30
COMPARE #<ML>, 30
IF< @sorry
1:A long pickaxe costs 1500gp
WAIT 2
IF G1500 @checkforoldpickaxe
1:Sorry you are poor, you don't have 1500gp, please return when you do
END

@buylong
TAKE G1500
GIVE I54
SET itemID, 54
(SET weaponwithstand, 260)
SET axe, %I54
GOTO @thanksforpurchase

@reinf
SET wanteditem, %I55
SET needlevel, 40
COMPARE #<ML>, 40
IF< @sorry
1:You need 3000gp for a #<wanteditem>
IF G3000 @checkforoldpickaxe
1:You cannot buy a #<wanteditem> with the money you have, come back when you can afford it
END

@buyreinforced
TAKE G3000
GIVE I55
SET itemID, 55
SET weaponwithstand, 280
SET axe, %I55
GOTO @thanksforpurchase

@reinFv2
SET wanteditem, %I56
SET needlevel, 50
COMPARE #<ML>, 50
IF< @sorry
1:hmmmm for a #<wanteditem> you need 5000gp
IF G5000 @checkforoldpickaxe
1:Sorry but cannot afford a #<wanteditem> yet, please come back later
END

@buyreinforcedV2
TAKE G5000
GIVE I56
SET itemID, 56
SET weaponwithstand, 310
SET axe, %I56
GOTO @thanksforpurchase

@sharp
SET wanteditem, %I57
SET needlevel, 60 
COMPARE #<ML>, 60
IF< @sorry
1:You will need to give me 25000gp for a #<wanteditem>
IF G25000 @checkforoldpickaxe
1:Sorry I need more money than you have currently got, please return when you have enough!
END

@buysharp
TAKE G25000
SET itemID, 57
GIVE I57
SET weaponwithstand, 450
SET axe, %I57
GOTO @thanksforpurchase

@reap
SET wanteditem, %I58
SET needlevel,  80 
COMPARE #<ML>, 80
IF< @sorry
1:This #<wanteditem> costs a whooping 200000gp
IF G200000 @checkforoldpickaxe
1:lol, I didn't think you would have enough money, please come back when you do
END

@buyreapers
TAKE G200000
GIVE I58
SET itemID, 58
SET weaponwithstand, 600
SET axe, %I58
GOTO @thanksforpurchase

@thanksforpurchase
1:Thank you for buying an #<axe>, I hope that it is aequate enough for you at your current level :)
1:Come back again if you ever want another pickaxe
1:cya
END
@sorry
1: Sorry but you need to have a mining level of #<needlevel> to purchase a #<wanteditem>
1: If you have not started mining yet, you need to buy a newbie pickaxe so that you can start mining!!
1: I will let you select again if you need a newbie pickaxe or another type of pickaxe
WAIT 4
GOTO @axe
END

@sellapickaxe

1: I will now check which pickaxe you have in your possession and I will remove it and give you half of the price you paid for it
WAIT 5
IF I119 @skipTheSellingProcess
IF I50 @newbieSell
IF I51 @strongerSell
IF I52 @woodSell
IF I53 @grapplingSell
IF I54 @longSell
IF I55 @reinforcedSell
IF I56 @reinforcedV2Sell
IF I57 @sharpSell
IF I58 @reapersSell
1:you don't even have a pickaxe to sell!! Come back when you actually HAVE one
END

@newbieSell
1: The price of %I50 was 500gp, so I will give you 250 gp
SET SellPrice, 250
goto @finalise
END

@strongerSell
1: The price of %I51 was 700gp, so I will give you 350 gp
SET SellPrice, 350
goto @finalise
END

@woodSell
1: The price of %I52 was 1000gp, so I will give you 500 gp
SET SellPrice, 500
goto @finalise
END

@grapplingSell
1: The price of %I53 was 1200gp, so I will give you 600 gp
SET SellPrice, 600
goto @finalise
END

@longSell
1: The price of %I54 was 500gp, so I will give you 750 gp
SET SellPrice, 750
goto @finalise
END

@reinforcedSell
1: The price of %I55 was 3000gp, so I will give you 1500 gp
SET SellPrice, 1500
goto @finalise
END

@reinforcedV2Sell
1: The price of %I56 was 5000gp, so I will give you 2500 gp
SET SellPrice, 2500
goto @finalise
END

@sharpSell
1: The price of %I57 was 25000gp, so I will give you 12500 gp
SET SellPrice, 12500
goto @finalise
END

@reapersSell
1: The price of %I58 was 200000gp, so I will give you 100000 gp
SET SellPrice, 100000
goto @finalise
END

@finalise
TAKE I50
TAKE I51
TAKE I52
TAKE I53
TAKE I54
TAKE I55
TAKE I56
TAKE I57
TAKE I58
SET itemID,
SET weaponwithstand,
SET axe,
GIVE G#<SellPrice>
1:There I have now bought your item, you will need to equip a shield now to remove any unwanted things to happen
1:Cya
END

@skipTheSellingProcess
1:Sorry but you cannot sell your ultimate Pickaxe as you have had it forged elsewhere
1:I don't want an item that doesn't come from this shop
1:cya
END

@checkforoldpickaxe
1:We have a policy in this shop, when a new axe is bought we buy your old axe for half the price you bought it
1:I will check whether you have any pickaxes in your possesion
WAIT 3
@checkaxes
IF I50 @hasnewbiepickaxe
IF I51 @hasstrongerpickaxe
IF I52 @haswoodpickaxe
IF I53 @hasgrapplingpickaxe
IF I54 @haslongpickaxe
IF I55 @hasreinforcedpickaxe
IF I56 @hasreinforcedV2pickaxe
IF I57 @sharppickaxe
IF I58 @reaperspickaxe
1:You have no other pickaxes in your possesion so can buy a #<wanteditem> now :)
WAIT 4
STRCMP #<wanteditem>, %I51
IF= @buyStronger
STRCMP #<wanteditem>, %I52 
IF= @buywood
STRCMP #<wanteditem>, %I53 
IF= @buygrappling
STRCMP #<wanteditem>, %I54
IF= @buylong
STRCMP #<wanteditem>, %I55 
IF= @buyreinforced
STRCMP #<wanteditem>, %I56 
IF= @buyreinforcedV2
STRCMP #<wanteditem>, %I57 
IF= @buysharp
STRCMP #<wanteditem>, %I58 
IF= @buyreapers

@hasnewbiepickaxe
SET item, %I50
SET equip, 50 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @newbiedamaged
1:A newbie pickaxe costs 500gp so I will give you 250gp for it
SET moneyforitem, 250
@givemoney1
TAKE I50
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@newbiedamaged
1:A newbie pickaxe costs 500gp and I would usually give 250gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 100gp for it
SET moneyforitem, 100
WAIT 2
GOTO @givemoney1

@hasstrongerpickaxe
SET item, %I51
SET equip, 51 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @strongerdamaged
1:A stronger pickaxe costs 700gp so I will give you 350gp for it
SET moneyforitem, 350
@givemoney2
TAKE I51
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@strongerdamaged
1:A stronger pickaxe costs 700gp and I would usually give 350gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 200gp for it
SET moneyforitem, 200
WAIT 2
GOTO @givemoney2

@haswoodpickaxe
SET item, %I52
SET equip, 52
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @wooddamaged
1:A wood pickaxe costs 1000gp so I will give you 500gp for it
SET moneyforitem, 500
@givemoney3
TAKE I52
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@wooddamaged
1:A wood pickaxe costs 1000gp and I would usually give 500gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 300gp for it
SET moneyforitem, 300
WAIT 2
GOTO @givemoney3

@hasgrapplingpickaxe
SET item, %I53
SET equip, 53 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @grapplingdamaged
1:A grappling pickaxe costs 1200gp so I will give you 600gp for it
SET moneyforitem, 600
@givemoney4
TAKE I53
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@grapplingdamaged
1:A grappling pickaxe costs 1200gp and I would usually give 600gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 450gp for it
SET moneyforitem, 450
WAIT 2
GOTO @givemoney4

@haslongpickaxe
SET item, %I54
SET equip, 54 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @longdamaged
1:A long pickaxe costs 1500gp so I will give you 750gp for it
SET moneyforitem, 750
@givemoney5
TAKE I54
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@longdamaged
1:A long pickaxe costs 1500gp and I would usually give 750gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 600gp for it
SET moneyforitem, 600
WAIT 2
GOTO @givemoney5

@hasreinforcedpickaxe
SET item, %I55
SET equip, 55 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @reinforceddamaged
1:A reinforced pickaxe costs 3000gp so I will give you 1500gp for it
SET moneyforitem, 1500
@givemoney6
TAKE I55
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@reinforceddamaged
1:A reinforced pickaxe costs 3000gp and I would usually give 1500gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 1300gp for it
SET moneyforitem, 1300
WAIT 2
GOTO @givemoney6

@hasreinforcedV2pickaxe
SET item, %I56
SET equip, 56 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @reinforcedV2damaged
1:A reinforced V2 pickaxe costs 5000gp so I will give you 2500gp for it
SET moneyforitem, 2500
@givemoney7
TAKE I56
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@reinforcedV2damaged
1:A reinforced V2 pickaxe costs 5000gp and I would usually give 2500gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 2000gp for it
SET moneyforitem, 2000
WAIT 2
GOTO @givemoney7

@sharppickaxe
SET item, %I57
SET equip, 57 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @sharpdamaged
1:A sharp pickaxe costs 25000gp so I will give you 25000gp for it
SET moneyforitem, 25000
@givemoney8
TAKE I57
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@sharpdamaged
1:A sharp pickaxe costs 25000gp and I would usually give 25000gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 22000gp for it
SET moneyforitem, 22000
WAIT 2
GOTO @givemoney8

@reaperspickaxe
SET item, %I58
SET equip, 58 
IF E#<equip> @unequipaxe
COMPARE #<brokenaxe>, 1
IF= @reapersdamaged
1:A reapers pickaxe costs 200000gp so I will give you 100000gp for it
SET moneyforitem, 100000
@givemoney9
TAKE I58
SET brokenaxe, 0
SET damage, 0
GIVE G#<moneyforitem>
1:Thanks for your #<item>, here is #<moneyforitem>gp
WAIT 2
GOTO @checkaxes

@reapersdamaged
1:A reapers pickaxe costs 200000gp and I would usually give 100000gp for this axe but it is BROKEN!!!
1:I will still buy it off you but I will only give you 50000gp for it
SET moneyforitem, 50000
WAIT 2
GOTO @givemoney9

@unequipaxe
1:your #<item> is still equipped so I cannot buy it off you!
1:I will wait until you have enquiped it
GOTO @equipaxeloop

@equipaxeloop
IF E#<equip> @equipaxeloop
1:Your #<item> is now unequipped so I can buy it off you
WAIT 3
GOTO @checkaxes

@skiptutorial
1: I see you have already gone through the tutorial but I have a feeling you skipped through it!
@tutorial?
1: Do you want me to explain how to mine again for you? (type yes or no)
ASK 99999999
IF Qyes @tutorial
IF Qno  @okthen
1:Please could you repeat that
WAIT 2
GOTO @tutorial?
@okthen
1:ok, I will let you choose which pickaxe you want!
WAIT 2
bkgnd axes
goto @axe
END

@need_axe_repaired
1:I see that your #<axe> is broken
1:Sorry but there is nothing I can do about it but you could visit the blacksmith next door!
1:He could probably fix it for you, I think he would he would want some wood and some steel to fix your weapon
1:but I think he can do it through money too and he would use his own raw materials!
1:Anway I think you better go and see him to see what he can do
1: The good thing is that I'm still open for business even if your axe is broken :)
WAIT 4
GOTO @axe
END
;---------
SCENE 123 blacksmith, cut, "Blacksmiths
THEME	0
GIVE H10000
SET people, 1
ACTOR 1, "", characters, 4, 41,37
COMPARE #<num.peopleinscene>, 2
IF= @noway
COMPARE #<fireimbue>, 1
IF= @gotfirestones?
1:Hey there! I'm the new blacksmith!
COMPARE #<brokenaxe>, 1
IF= @repair
1:How do you like this new place
h: It's cool, but it's VERY hot!!
1:lol, just be glad you don't work here!
1:Well as you know I am a blacksmith I can either forge some weapons or repair your axe
1:When I forge a weapon for you I will need you to supply me with some raw materials that can be used during the forging process
1:The more raw materials that you bring me, the better the weapon can be
1:In the future I may create armour and other items but since this place is new, we need to start with only one job
1:What do you want?
WAIT 2
@whatdoyouwant
MENU "I'd like to Forge a weapon=@forge", "I want you to Repair my pickaxe=@beforerepair", "I'd like to sell you some raw materials=@sellrawmaterials", "I would like to imbue a weapon with an element please=@imbue"
GOTO @whatdoyouwant?
END

@noway
1:There are too many people in the scene, there should only be one person in the blacksmiths at a time
1:This way nobody that has the incorrect mining level or particles gets a free weapon
1:Come back into this scene when there is only you!
1:Goodbye
WAIT 3
GOTO EXIT

@beforerepair
COMPARE #<num.peopleinscene>, 2
IF= @noway
SET percent, #<damage>
MUL percent, 100
DIV percent, #<weaponwithstand>
1:Your weapon is #<percent> percent damaged
1:I Could easily fix this when you give me some GP or raw materials(particles)
WAIT 5
GOTO @options
END

@repair
1:I see yur #<axe> is broken :(
1:I could repair for you if you wanted
1:I could repair you item with the raw materials you have collected or you could give me money
@options
1:Which of these options do you want?
WAIT 2
MENU "I will give you some Gp for the pickaxe to be repaired=@repair2", "I'll give you some Raw materials for repair=@raw", "Nothing thanks, I will buy a new one from the shop!=@finebyme"
GOTO @options

@newbiePickaxe
SET axemoneyneeded, 84
SET Stoneparticles, 17
GOTO @thecost

@strongerPickaxe
SET axemoneyneeded, 117 
SET Stoneparticles, 23
GOTO @thecost

@woodPickaxe
SET axemoneyneeded, 167
SET Stoneparticles, 33
GOTO @thecost

@GrapplingPickaxe
SET axemoneyneeded, 200
SET Stoneparticles, 40
GOTO @thecost

@longPickaxe
SET axemoneyneeded, 250
SET Stoneparticles, 50
GOTO @thecost

@reinforcedPickaxe
SET axemoneyneeded, 500
SET Stoneparticles, 100
GOTO @thecost

@reinforcedV2Pickaxe
SET axemoneyneeded, 833
SET Stoneparticles, 167
GOTO @thecost

@sharpPickaxe
SET axemoneyneeded, 4167
SET Stoneparticles, 833
GOTO @thecost

@reaperPickaxe
SET axemoneyneeded, 33333
SET Stoneparticles, 6667
GOTO @thecost

@thecost
1:It will cost you #<axemoneyneeded>gp
IF G#<axemoneyneeded> @gotenough
1:You little scoundral you don't even have enough!
@otheroption
1:Come back when you do have more money or give me some raw materials
1:You know I also take raw materials (particles) for money
1:hmmmmm, for one stone particle I give people 5gp, so that would make #<stoneparticles> particles to make up #<axemoneyneeded> gp (rounded)
1:You have #<stone> stone particles
Compare #<stone>, #<stoneparticles>
IF= @stonetrade
IF> @stonetrade
1:So that means that you don't have enough stone particles
1:Come back when you have #<axemoneyneeded>gp or #<stoneparticles> stone particles
1:cya
END

@gotenough
1:you have got enough money, so I will take #<axemoneyneeded>gp off you
TAKE G#<axemoneyneeded>
1: Please wait while I fix the axe, it shouldn't take me too long!
WAIT 3
GOTO @repairaxe

@stonetrade
1:so that means you have enough stone particles
@question
1:I can do a straight swap if you want? (type yes or no)
ASK 999999999
IF Qyes @trade
IF Qno @later
1:Please could you repeat that
WAIT 2
GOTO @question

@trade
1:ok! I will take #<stoneparticles> stone particles from you and I'll repair you #<Axe>
1:This shouldn't take too long :)
WAIT 3
SUB stone, #<stoneparticles>
h: Thanks
goto @repairaxe

@takerepairmoney
TAKE G#<repairprice>

@repairaxe
WAIT 1
bkgnd blacksmith3
SOUND chink.wav
WAIT .1
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
SET brokenaxe, 0
SET damage, 0
1:There! It has been fixed!
1:You can carry on mining now, heh
1:cya
END

@raw
1:Raw materials eh?
1:lemme see what pickaxe you posses, then I can find out how many raw materials you need
STRCMP #<axe>, %I50
IF= @RepairNewbiePickaxe
STRCMP #<axe>, %I51
IF= @RepairStrongerPickaxe
STRCMP #<axe>, %I52
IF= @RepairWoodPickaxe
STRCMP #<axe>, %I53
IF= @RepairGrapplingPickaxe
STRCMP #<axe>, %I54
IF= @RepairLongPickaxe
STRCMP #<axe>, %I55
IF= @RepairReinforcedPickaxe
STRCMP #<axe>, %I56
IF= @RepairReinforcedV2Pickaxe
STRCMP #<axe>, %I57
IF= @RepairSharpPickaxe
STRCMP #<axe>, %I58
IF= @RepairReaperPickaxe
END

@RepairNewbiePickaxe
SET material1, 10 
SET material2, 0 
SET material3, 0 
GOTO @finaliserepair

@RepairStrongerPickaxe
SET material1, 10
SET material2, 3
SET material3, 6
GOTO @finaliserepair

@RepairWoodPickaxe
SET material1, 15
SET material2, 0
SET material3, 3
GOTO @finaliserepair

@RepairGrapplingPickaxe
SET material1, 12
SET material2, 8
SET material3, 0
GOTO @finaliserepair

@RepairLongPickaxe
SET material1, 0  
SET material2, 13
SET material3, 17
GOTO @finaliserepair

@RepairReinforcedPickaxe
SET material1, 20
SET material2, 20
SET material3, 20
GOTO @finaliserepair

@RepairReinforcedV2Pickaxe
SET material1, 30
SET material2, 30
SET material3, 30
GOTO @finaliserepair

@RepairSharpPickaxe
SET material1, 10 
SET material2, 0
SET material3, 40
GOTO @finaliserepair

@RepairReaperPickaxe
SET material1, 20 
SET material2, 30
SET material3, 60
GOTO @finaliserepair

@finaliserepair
1: For this #<axe> to be fixed you need #<material1> stone particles
1: #<material2> copper particles 
1: And finally #<material3> steel particles
WAIT 4
COMPARE #<stone>, #<material1>
IF= @hasrawmaterial1
IF> @hasrawmaterial1
1:sorry but you only have #<stone> stone particles, come back when you have #<material1> of them
1:or you could just come back and then give me money for it to be repaired
1:DON'T EVEN THINK about throwing the money because I will keep it!
END

@hasrawmaterial1
1: you have enough stone particles, I'll check whether you have enough copper particles
WAIT 4
COMPARE #<copper>, #<material2>
IF= @hasrawmaterial2
IF> @hasrawmaterial2
1:Nope you only have #<copper> particles and you need #<material2>
1:Come back when you have enough or just give me gp for it to be repaired
1:DO NOT throw the money!
END

@hasrawmaterial2
1:yup, you have enough copper particles
1:Now all you need is #<material3> steel particles, I will just check
WAIT 4
COMPARE #<steel>, #<material3>
IF= @hasrawmaterial3
IF> @hasrawmaterial3
1:sorry you haven't got #<material3> steel particles, you only have #<steel>
1:Come back when you have #<material3> steel particles or give me gp for it to be repaired
1:and DO NOT throw it to me or it will be lost
END

@hasrawmaterial3
1:You have all the raw materials needed to fix this pickaxe
1:Whenever I fix an item I also charge a small fee of 50gp to every customer for my service
1:btw I always make sure that the customer pays and gives me the raw materials before I do any work
1:I will take you raw materials and money now
IF G50 @canrepairitem
1:you SCOUNDRAL, you don't even have 50gp, please come back when you do!!
END

@canrepairitem
TAKE G50
SUB stone, #<material1>
SUB copper, #<material2>
SUB steel, #<material3>
1:Now that I have taken everything, I can finally fix your weapon, plz wait!
WAIT 4
GOTO @repairaxe
END

@finebyme
1:Well if you like paying even more money for a new #<axe> it is fine by me
1:you are wasting your money, not me
1:Come back if you see SENSE and you have enough money or particles
END

@Forge
COMPARE #<num.peopleinscene>, 2
IF= @noway
COMPARE #<preorder>, 1
IF= @itempreordered
1:For me to forge you a weapon you first have to collect enough raw materials and 300gp for the making process
1:Currently we only have ulitmate weapons for sale but I'm sure you will be happy with that because these are the BEST weapons in Gargoyles!
1:When making your selection I need to know what you are trained in, for example music
1:When I have collected all the details I can personalise it and maybe even Imbue it with an element for you!
1:Only swords can be imbued but when this shop has expanded more you may be able to imbue more weapons
1:I can only make you one ultimate weapon of each type because it drains too much of my energy when making it
1:But if you were a ghost class and were trained with spirit weapons but also was trained to use swords I could make you an Ultimate hex and an Ultimate Sword
1:I will not make you an ultimate Flame sword and an Ultimate Ice sword for you though even if you had the correct materials
1:I have thousands of weapons to create each day and I wouldn't have the time or energy to keep creating the same type of weapon for you, sorry
1:I'm sure that you understand
1:oh yeah, and one more thing, you need to be a freelance miner before I can give you your weapon
1:If you had the items for it before being a freelance miner I could take them as a kind of deposit
1:I see this as a pre-order for your ultimate weapon
1:I have been blabbering to much now so I ask you, which of these are you trained with?
WAIT 4
@whichweapon?
COMPARE #<num.peopleinscene>, 2
IF= @noway
MENU "Swords=@ForgeASword", "Staffs=@ForgeAStaff", "Bows=@ForgeABow", "Music=@ForgeAintrument", "Fists=@ForgeAGlove", "Darts=@ForgeADart", "Books=@ForgeABook", "Spirits=@ForgeAHex", "Pickaxe=@ForgeAPickaxe"
1:Which one of these are you trained in?
GOTO @whichweapon?
END

@ForgeAsword
SET itemnumber, 103
SET wanteditem, 103 (ultimate Sword)
SET weapon, sword
goto @explain

@ForgeAStaff
SET itemnumber, 109
SET wanteditem, 109 (ultimate Staff)
SET weapon, staff
goto @explain

@ForgeABow
SET itemnumber, 110
SET wanteditem, 110 (ultimate Bow)
SET weapon, bow
goto @explain

@ForgeAintrument
SET itemnumber, 111
SET wanteditem, 111 (ultimate Intrument)
SET weapon, instrument
goto @explain

@ForgeAGlove
SET itemnumber, 112
SET wanteditem, 112 (ultimate Glove)
SET weapon, glove
goto @explain

@ForgeADart
SET itemnumber, 113
SET wanteditem, 113 (ultimate Dart)
SET weapon, dart
goto @explain

@ForgeABook
SET itemnumber, 114
SET wanteditem, 114 (ultimate Book)
SET weapon, book
goto @explain

@ForgeAHex
SET itemnumber, 115
SET weapon, spirit
SET wanteditem, 115 (ultimate Hex)
goto @explain

@ForgeAPickaxe
SET itemnumber, 119
SET weapon, Pickaxe
SET wanteditem, 119 (Ultimate Pickaxe)

@explain
COMPARE #<num.peopleinscene>, 2
IF= @noway
1:Ok, I can create a #<weapon> for you
1:Please have a look at this list of #<weapon>s, the ones at the bottom of the list are the most expensive
1:The top ones are the cheapest
1:If you are a beginner it will be best if you pick a weapon near the top or you won't have the raw materials
1:Here is the list, take as much time as you want
1:When you have selected it I will tell you the raw materials needed
WAIT 3
STRCMP #<weapon>, sword
IF= @selectsword
STRcmp #<weapon>, staff
IF= @selectstaff
STRcmp #<weapon>, bow
IF= @selectbow
STRcmp #<weapon>, instrument
IF= @selectinstrument
STRcmp #<weapon>, glove
IF= @selectglove
STRcmp #<weapon>, dart
IF= @selectdart
STRcmp #<weapon>, book
IF= @selectbook
STRcmp #<weapon>, spirit
IF= @selecthex
STRcmp #<weapon>, Pickaxe
IF= @selectAxe
END

@selectsword
MENU "Ulitmate Sword=@ForgeAnUltimateSword"
1:Please select the sword you want forging
GOTO @selectsword

@selectstaff
MENU "Ultimate Staff=@ForgeAnUltimateStaff"
1:Please select the staff you are wanting
GOTO @selectstaff

@selectbow
MENU "Ultimate Bow=@ForgeAnUltimateBow"
1:Please select the bow you are wanting
GOTO @selectstaff

@selectinstrument
MENU "Ultimate Instrument=@ForgeAnUltimateinstrument"
1:Please select the instrument you are wanting
GOTO @selectinstrument

@selectglove
MENU "Ultimate Glove=@ForgeAnUltimateglove"
1:Please select the glove you are wanting
GOTO @selectglove

@selectdart
MENU "Ultimate Dart=@ForgeAnUltimatedart"
1:Please select the dart you are wanting
GOTO @selectdart

@selectbook
MENU "Ultimate book=@ForgeAnUltimatebook"
1:Please select the book you are wanting
GOTO @selectbook

@selecthex
MENU "Ultimate Hex=@ForgeAnUltimatehex"
1:Please select the hex you are wanting
GOTO @selecthex

@selectAxe
1:There is only one axe that I can forge and that is an ultimate Pickaxe
1:For this you will need 500 of EACH raw materials and it will cost you 700K!
WAIT 5
goto @ForgeAnUltimateAxe

@ForgeAnUltimateSword
COMPARE #<sword>, 1
IF= @hasultsword
IF I103 @hasultsword
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I103 (Ultimate Sword)
SET itemnumber, 103 (ultimate sword)
WAIT 5
@pre-order?
MENU "Yes=@pre-order", "No thanks I will wait until I am a freelance miner=@nothanks"
1:please repeat that
GOTO @pre-order?

@ForgeAnUltimateStaff
COMPARE #<staff>, 1
IF= @hasultstaff
IF I109 @hasultstaff
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I109 (Ultimate Staff)
SET itemnumber, 109 (ultimate staff)
WAIT 5
goto @pre-order?
@nothanks
1:That is wise choice! You will be able to get it straight away this way
1:Come back when you are a freelance miner and you need a new weapon
1:cya
END

@ForgeAnUltimateBow
COMPARE #<bow>, 1
IF= @hasultbow
IF I110 @hasultbow
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I110 (Ultimate bow)
SET itemnumber, 110 (ultimate bow)
WAIT 5
goto @pre-order?
@nothanks
1:That is wise choice! You will be able to get it straight away this way
1:Come back when you are a freelance miner and you need a new weapon
1:cya
END

@ForgeAnUltimateinstrument
COMPARE #<instrument>, 1
IF= @hasultinstrument
IF I111 @hasultinstrument
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I111 (Ultimate instrument)
SET itemnumber, 111 (ultimate instrument)
WAIT 5
goto @pre-order?
@nothanks
1:That is wise choice! You will be able to get it straight away this way
1:Come back when you are a freelance miner and you need a new weapon
1:cya
END

@ForgeAnUltimateglove
COMPARE #<glove>, 1
IF= @hasultglove
IF I112 @hasultglove
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I112 (Ultimate glove)
SET itemnumber, 112 (ultimate glove)
WAIT 5
goto @pre-order?

@ForgeAnUltimatedart
COMPARE #<dart>, 1
IF= @hasultdart
IF I113 @hasultdart
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I113 (Ultimate dart)
SET itemnumber, 113 (ultimate dart)
WAIT 5
goto @pre-order?

@ForgeAnUltimatebook
COMPARE #<book>, 1
IF= @hasultbook
IF I114 @hasultbook
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I114 (Ultimate book)
SET itemnumber, 114 (ultimate book)
WAIT 5
goto @pre-order?

@ForgeAnUltimatehex
COMPARE #<hex>, 1
IF= @hasulthex
IF I115 @hasulthex
COMPARE #<ML>, 100
IF= @continueWithweapon
1:Sorry but you are not a freelance miner yet but I could take the raw materials and money off you as a pre-order
1:Would you like to pre-order an ultimate #<weapon> for when you are a freelance miner?
SET itempreordered, %I115 (Ultimate hex)
SET itemnumber, 115 (ultimate hex)
WAIT 5
goto @pre-order?

@ForgeAnUltimateAxe
COMPARE #<Pickaxe>, 1
IF= @hasultaxe
IF I119 @hasultaxe
COMPARE #<ML>, 100
IF= @continuewithweapon
1:Sorry but you are not a freelance miner yet. I'm not gonna give an ultimate pickaxe to a n00b like u, sorry
1:Come back when you are a freelance miner and I don't take pre-orders for this item
1:cya
wait 5
goto EXIT
END

@hasultsword
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET sword, 1
1:If you need it imbuing just select imbue under the options
END

@hasultstaff
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET staff, 1
1:If you need it imbuing just select imbue under the options
END

@hasultbow
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET bow, 1
1:If you need it imbuing just select imbue under the options
END

@hasultinstrument
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET instrument, 1
1:If you need it imbuing just select imbue under the options
END

@hasultglove
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET glove, 1
1:If you need it imbuing just select imbue under the options
END

@hasultdart
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET dart, 1
1:If you need it imbuing just select imbue under the options
END

@hasultbook
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET book, 1
1:If you need it imbuing just select imbue under the options
END

@hasulthex
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET hex, 1
1:If you need it imbuing just select imbue under the options
END

@hasultaxe
1:I'm not making another ultimate #<weapon> for you, you already have an ult #<weapon> or you have sold it, either way I am not creating another
SET hex, 1
1:If you need it imbuing just select imbue under the options
END

@nothanks
1:That is wise choice! You will be able to get it straight away this way
1:Come back when you are a freelance miner and you need a new weapon
1:cya
END

@continuewithweapon
COMPARE #<num.peopleinscene>, 2
IF= @noway
STRcmp #<weapon>, Pickaxe
IF= @continewithUltPickaxe
1:I can only forge you this ultimate weapon if you meet these requirements -
1: * You have 300gp
1: * 300 Steel particles
1: * 50 Wood particles
1: * 45 Copper particles
1: * 60 Platinum particles
1: * 80 Silver particles
1: * 40 Stone particles
1: * 30 Gold particles
1: * 10 Diamond particles
1: I will have to check you have them all because I will not take your word for it
WAIT 3
goto @checkforeverything

@continewithUltPickaxe
1:I can only forge an ultimate pickaxe if you meet these requirements -
1: *you have 700K
1: *500 steel particles
1: *500 wood particles
1: *500 copper particles
1: *500 platinum particles
1: *500 silver particles
1: *500 stone particles
1: *500 gold particles
1: *500 diamond particles
1: I will now check whether you meet these requirements because I will not take your word for it
WAIT 3
goto @checkforeverything2

@pre-order
COMPARE #<num.peopleinscene>, 2
IF= @noway
1:You can only pre-order this ultimate weapon if you meet these requirements -
1: * You have 300gp
1: * 300 Steel particles
1: * 50 Wood particles
1: * 45 Copper particles
1: * 60 Platinum particles
1: * 80 Silver particles
1: * 40 Stone particles
1: * 30 Gold particles
1: * 10 Diamond particles
1:You need a lot don't you? I will have to check because I will not take your word for it
WAIT 3
@checkforeverything
IF G300 @enoughmoney
1:WHAT A GREAT START!! LOL, you don't even have 300gp!!! Come back when you have 300gp and all the particles
END

@enoughmoney
COMPARE #<steel>, 300
IF= @enoughsteel
IF> @enoughsteel
1:You don't have enough steel, you only have #<steel> and you need 300
1:Come back when you have more
END

@enoughsteel
COMPARE #<wood>, 50
IF= @enoughwood
IF> @enoughwood
1:You don't have enough wood, you only have #<wood> and you need 50
1:Come back when you have more
END

@enoughwood
COMPARE #<copper>, 45
IF= @enoughcopper
IF> @enoughcopper
1:You don't have enough copper, you only have #<copper> and you need 45
1:Come back when you have more
END

@enoughcopper
COMPARE #<platinum>, 60
IF= @enoughplatinum
IF> @enoughplatinum
1:You don't have enough platinum, you only have #<platinum> and you need 60
1:Come back when you have more
END

@enoughplatinum
COMPARE #<silver>, 80
IF= @enoughsilver
IF> @enoughsilver
1:You don't have enough silver, you only have #<silver> and you need 80
1:Come back when you have more
END

@enoughsilver
COMPARE #<stone>, 40
IF= @enoughstone
IF> @enoughstone
1:You don't have enough stone, you only have #<stone> and you need 40
1:Come back when you have more
END

@enoughstone
COMPARE #<gold>, 30
IF= @enoughgold
IF> @enoughgold
1:You don't have enough gold, you only have #<gold> and you need 30
1:Come back when you have more
END

@enoughgold
COMPARE #<diamond>, 10
IF= @enoughdiamond
IF> @enoughdiamond
1:You don't have enough Diamond, you only have #<diamond> and you need 10
1:Come back when you have more
END

@enoughdiamond
1:you meet every requirement so I can take away all the items and then put your sword in a safe place ready for when you are a Freelance Miner
TAKE G300
SUB steel, 300
SUB wood, 50
SUB copper, 45
SUB platinum, 60
SUB silver, 80
SUB stone, 40
SUB gold, 30
SUB diamond, 10
COMPARE #<ML>, 100
IF= @skip-pre-order
SET preorder, 1
goto @done
END

@checkforeverything2
IF I50 @sellyouraxe
IF I51 @sellyouraxe
IF I52 @sellyouraxe
IF I53 @sellyouraxe
IF I54 @sellyouraxe
IF I55 @sellyouraxe
IF I56 @sellyouraxe
IF I57 @sellyouraxe
IF I58 @sellyouraxe
IF G700000 @enoughmoney2
1:WHAT A GREAT START!! LOL, you don't even have 700k :( Come back when you have 700k and all the particles
END

@sellyouraxe
1:sorry but you already have a pickaxe, go to the mining shop and "sell" you axe
1:come back when you don't have a pickaxe
1:If you have looked and you cannot see a pickaxe an error may have happened so just "sell" your axe anyhow
END

@enoughmoney2
COMPARE #<steel>, 500
IF= @enoughsteel2
IF> @enoughsteel2
1:You don't have enough steel, you only have #<steel> and you need 500
1:Come back when you have more
END

@enoughsteel2
COMPARE #<wood>, 500
IF= @enoughwood2
IF> @enoughwood2
1:You don't have enough wood, you only have #<wood> and you need 500
1:Come back when you have more
END

@enoughwood2
COMPARE #<copper>, 500
IF= @enoughcopper2
IF> @enoughcopper2
1:You don't have enough copper, you only have #<copper> and you need 500
1:Come back when you have more
END

@enoughcopper2
COMPARE #<platinum>, 500
IF= @enoughplatinum2
IF> @enoughplatinum2
1:You don't have enough platinum, you only have #<platinum> and you need 500
1:Come back when you have more
END

@enoughplatinum2
COMPARE #<silver>, 500
IF= @enoughsilver2
IF> @enoughsilver2
1:You don't have enough silver, you only have #<silver> and you need 500
1:Come back when you have more
END

@enoughsilver2
COMPARE #<stone>, 500
IF= @enoughstone2
IF> @enoughstone2
1:You don't have enough stone, you only have #<stone> and you need 500
1:Come back when you have more
END

@enoughstone2
COMPARE #<gold>, 500
IF= @enoughgold2
IF> @enoughgold2
1:You don't have enough gold, you only have #<gold> and you need 500
1:Come back when you have more
END

@enoughgold2
COMPARE #<diamond>, 500
IF= @enoughdiamond2
IF> @enoughdiamond2
1:You don't have enough gold, you only have #<diamond> and you need 500
1:Come back when you have more
END

@enoughdiamond2
1:you meet every requirement so I can take away all the items and then put your sword in a safe place ready for when you are a Freelance Miner
TAKE G700000
SUB steel, 500
SUB wood, 500
SUB copper, 500
SUB platinum, 500
SUB silver, 500
SUB stone, 500
SUB gold, 500
SUB diamond, 500
SET Pickaxe, 1
SET itemID, 119
SET weaponwithstand, -1
SET axe, %I119
COMPARE #<ML>, 100
IF= @skip-pre-order

@done
1: The #<itempreordered> has been pre-ordered and you can collect it when you are a Freelance Miner
1: I hope to see you soon
1: Cya
END

@skip-pre-order
I will now forge a #<weapon> for you
WAIT 3
goto @ForgeTheFinalWeapon

@itempreordered
1:I see that you have pre-ordered an #<itempreordered>
1:I will check to see whether your #<itempreordered> can be given to you
WAIT 3
COMPARE #<ML>, 100
IF= @givePre-order
1:sorry but you are not a freelance miner yet so I cannot give you an #<itempreordered> yet
1:Would you like to look at the other weapons?
WAIT 2
@wannaseeweapons?
MENU "Yes please=@whichweapon?", "no thanks=@end"
GOTO @wannaseeweapons?
END

@givePre-order
1:Congratulations with becomming a freelance miner!
1:I can now forge the #<itempreordered> that you pre-ordered and requested earlier
SET preorder,0
1:Since you have already paid earlier I don't need to take anything off you
1:Anway I will forge it now
WAIT 4
GOTO @ForgeTheFinalWeapon
END

@ForgeTheFinalWeapon
COMPARE #<num.peopleinscene>, 2
IF= @noway
WAIT 1
bkgnd blacksmith3
SOUND chink.wav
WAIT .1
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
1:Just a sec while I rest, I'm nearly finished now
WAIT 5
bkgnd blacksmith3
SOUND chink.wav
WAIT .1
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
GIVE I#<itemnumber>
1:whew! This is a very tiring business
1:I hope you like the #<weapon> I have forged for you
1:If you want it imbued just come back later and select "imbue" as an option
1:cya
END

@imbue
COMPARE #<num.peopleinscene>, 2
IF= @noway
COMPARE #<imbue>, 1
IF= @alreadyimbued
1:Make sure you make the correct choice of weapon to be imbued!!
1:If you decide to imbue a sword you will not be able to imbue any other weapon, so please remember that before rushing to imbue a sword!!
IF I103 @imbueprocess
1:Sorry only ultimate swords can be imbued at the minute
1:This blacksmiths is still new remember?
1:We will be expanding soon but first I am going to find out which is the most popular weapons
1:Then I will be learning the imbue process for them weapons
1:I hope to see you again when this shop has expanded
1:Don't forget that you pickaxe can be repaired here too
1:Cya
END

@imbueprocess
1:I can imbue your ultimate sword for you with any element you choose in the list I will show you
1:The imbue process requires different minerals and I would also like some money off you to do the job
1:The most important item when imbuing is an element stone
1:I have many of these spare but I am running out fast because of the high demand for them
1:I may have to ask you to find or make me the element stone if I don't have one in stock
1:Please choose what element you would like your ultimate sword imbued with
WAIT 5
@chooseimbue
MENU "Fire=@fireimbue", "Water=@waterimbue", "Nature=@natureimbue", "Earth=@Earthimbue", "Wind=@windimbue"
GOTO @chooseimbue

@fireimbue
SET imbuechoice, 104
1:fire, huh? Well with your sword imbued it will become an ultimate Flame sword
1:fire swords are most effective against water monsters 
1:I will just check whether I have any fire stones in stock
WAIT 4
1:Dang! I have no fire stones, I must have imbued loads of flame swords
1:I will give you some stones, when I give you them you should be able to see them as items
1:They will not dissapear into your pouch like the ones you mine for
1:I want you to take these stones and make them turn into fire stones
1:I am not sure how you will do it but I have a feeling that if you throw them into something like fire they will change
1:Hey! you have a fire in your camp don't you?
h: Yeah I create the camp to keep myself warm but I keep getting burnt with it, lol
1:You should be careful with fire and try not to touch it
1:Anway here are 2 stones, These should be quite enough for the process
GIVE I116
GIVE I116
SET fireimbue, 1
1:Please throw these into your campfire and make me some fire stones
1:Come back when you have got two fire stones
END

@gotfirestones?
1:Welcome back, I hope you have got 2 fire stones
1:I will check now
@checkstones
COMPARE #<num.item117>, 2
IF= @hasfirestone
IF> @hasfirestone
1:You have not got two fire stones yet
COMPARE #<num.item116>, 2
IF< @needmorestones?
1:You still have the 2 stones I gave you so you can throw them into your campfire
1:Come back when you have done it and you have some fire stones
END

@needmorestones?
1:I see that you don't have 2 stones, maybe you gave them to someone else or the wrong actor
1:Either way you need some more, I will give you two more stones now
GIVE I116
GIVE I116
1:There!
1:Now throw these into your "campfire" and make them into fire stones
1:come back when this has been done
END
END

@hasfirestone
1:Since you have brought me two fire stones I can carry out the imbue process
1:This process only needs a small amount of raw materials so I will supply them but I ask for just 10k off you
IF G10000 @fireimbueFinal
1:You haven't got 10k please come back when you have so that I can carry out the imbuing
END

@fireimbueFinal
1:I will first take the fire stones and money off you and your weapon so that I can imbue it
TAKE I117
TAKE I117 
TAKE G10000
TAKE I103

@imbuefinal
1:This make take a while so please wait patiently
WAIT 2
WAIT 5
bkgnd blacksmith3
SOUND chink.wav
WAIT .1
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .5
bkgnd blacksmith3
SOUND chink.wav
WAIT .1
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
WAIT .1
bkgnd blacksmith3
SOUND chink.wav
WAIT .5
bkgnd blacksmith
1:There, the ultimate sword has been imbued!
SET imbue, 1
SET fireimbue, 0
GIVE I#<imbuechoice>
1:I hope you like your modified sword because you cannot have the process reversed
1:or have a new ultimate sword, sorry
1:You should find this weapon much better anyway
1:cya
END

@waterimbue
SET imbuechoice, 105
1:Water is a great element to use with weapons, it is very powerful against fire creatures
1:Some water stones will be needed to create this weapon, I'll check to see whether I have any
1:yup, you are lucky I have 2 left which is just enough
1:This process only needs a small amount of raw materials so I will supply them but I ask for just 10k off you
IF G10000 @waterimbueFinal
1:You haven't got 10k, come back later when you have enough 
END

@waterimbueFinal
1:I will use the water stones and I will take 10k and your weapon so that I can imbue it
TAKE G10000
TAKE I103
goto @imbuefinal

@natureimbue
SET imbuechoice, 106
1:The element of nature combined with a sword is great, Nature magic is very useful against spirit monsters
1:Some nature stones will be needed to create this weapon, I'll check to see whether I have any
1:yup, you are lucky I have 5 left which is just over enough
1:This process only needs a small amount of raw materials so I will supply them but I ask for just 10k off you
IF G10000 @natureimbueFinal
1:You haven't got 10k, come back later when you have enough 
END

@natureimbueFinal
1:I will use the nature stones and I will take 10k and your weapon so that I can imbue it
TAKE G10000
TAKE I103
goto @imbuefinal

@earthimbue
SET imbuechoice, 107
1:The element of earth combined with a sword is great, earth magic is very useful against air monsters
1:Some earth stones will be needed to create this weapon, I'll check to see whether I have any
1:yup, you are lucky I have 3 left which is just over enough
1:This process only needs a small amount of raw materials so I will supply them but I ask for just 10k off you
IF G10000 @earthimbueFinal
1:You haven't got 10k, come back later when you have enough 
END

@earthimbueFinal
1:I will use the earth stones and I will take 10k and your weapon so that I can imbue it
TAKE G10000
TAKE I103
goto @imbuefinal

@windimbue
SET imbuechoice, 108
1:A wind sword is cool, it can be very powerful against earth monsters
1:There will be no extra hit power against wind monsters though :(
1:Some wind stones will be needed to create this weapon, I'll check to see whether I have any
1:yup, you are lucky I have 8 left which is just over enough
1:This process only needs a small amount of raw materials so I will supply them but I ask for just 10k off you
IF G10000 @windimbueFinal
1:You haven't got 10k, come back later when you have enough 
END

@windimbueFinal
1:I will use the wind stones and I will take 10k and your weapon so that I can imbue it
TAKE G10000
TAKE I103
goto @imbuefinal

@alreadyimbued
1:You have already imbued a weapon, I'm sorry but it can only be done once
1:The imbue process is permanent and cannot be changed so you will have to keep the weapon that you choose
1:cya
END

@end
END

@repair2
SET percent, #<damage>
MUL percent, 100
DIV percent, #<weaponwithstand>
1:Your weapon is #<percent> percent damaged
1:So it will cost #<percent> percent of the normal repair price for a #<axe>
IF I50 @repairprice1
IF I51 @repairprice2
IF I52 @repairprice3
IF I53 @repairprice4
IF I54 @repairprice5
IF I55 @repairprice6
IF I56 @repairprice7
IF I57 @repairprice8
IF I58 @repairprice9

@repairprice1
SET repairprice, 84
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice2
SET repairprice, 117
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice3
SET repairprice, 167
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice4
SET repairprice, 200
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice5
SET repairprice, 250
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice6
SET repairprice, 500
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice7
SET repairprice, 833
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice8
SET repairprice, 4167
MUL repairprice, #<percent>
DIV repairprice, 100
GOTO @repairprice

@repairprice9
SET repairprice, 33333
MUL repairprice, #<percent>
DIV repairprice, 100

@repairprice
1:The total cost for me to repair your #<axe> is #<repairprice>gp
1: If you have #<repairprice>gp I will fix your #<axe> straight away!
WAIT 4
IF G#<repairprice> @takerepairmoney
1:Nope, you don't have #<repairprice>gp so I won't fix it
GOTO @otheroption
END

@sellrawmaterials
1:ok then, which raw materials will you sell me? (stone, wood, copper, steel, silver, gold, diamond or platinum)
@asksell
ASK 999999999
IF Qstone @sellstone
IF Qwood @sellwood
IF Qcopper @sellcopper
IF Qsteel @sellsteel
IF Qsilver @sellsilver
IF Qgold @sellgold
IF Qdiamond @selldiamond
IF Qplatinum @sellplatinum
1:That is not a raw material!! Please tell me the correct raw material you want to sell
WAIT 3
GOTO @asksell

@sellstone
SET rawmaterial, stone
SET rawmaterialprice, 5
SET particles, #<stone> 
COMPARE #<stone>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<stone> stone particles
WAIT 2
GOTO @checkrawmaterial

@sellwood
SET rawmaterial, wood 
SET rawmaterialprice, 20
SET particles, #<wood> 
COMPARE #<wood>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<wood> wood particles
WAIT 2
GOTO @checkrawmaterial

@sellcopper
SET rawmaterial, copper 
SET rawmaterialprice, 50
SET particles, #<copper>
COMPARE #<copper>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<copper> copper particles
WAIT 2
GOTO @checkrawmaterial

@sellsteel
SET rawmaterial, steel
SET rawmaterialprice, 100
SET particles, #<steel>
COMPARE #<steel>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<steel> steel particles
WAIT 2
GOTO @checkrawmaterial

@sellsilver
SET rawmaterial, silver
SET rawmaterialprice, 200 
SET particles, #<silver>
COMPARE #<silver>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<silver> silver particles
WAIT 2
GOTO @checkrawmaterial

@sellgold
SET rawmaterial, gold
SET rawmaterialprice, 400
SET particles, #<gold> 
COMPARE #<gold>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<gold> gold particles
WAIT 2
GOTO @checkrawmaterial

@selldiamond
SET rawmaterial, diamond 
SET rawmaterialprice, 1000 
SET particles, #<diamond>
COMPARE #<diamond>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<diamond> diamond particles
WAIT 2
GOTO @checkrawmaterial

@sellplatinum
SET rawmaterial, platinum 
SET rawmaterialprice, 1700  
SET particles, #<platinum>
COMPARE #<platinum>, 0
IF= @noparticles
IF< @noparticles
1:You have a total of #<platinum> platinum particles
WAIT 2
GOTO @checkrawmaterial

@noparticles
1:You cannot sell any #<rawmaterial> particles to me if you don't have any, please select another option.
WAIT 5
GOTO @whatdoyouwant?

@checkrawmaterial
1:How many #<rawmaterial> particles do you want to sell to me?
@howmany
ASK 9999999999
COMPARE #<lastask>, 0
IF> @next
1:Please input a valid amount
GOTO @howmany
@next
SET sell, #<lastask>
SET amount, #<sell>
COMPARE #<lastask>, #<particles>
IF= @next2
IF< @next2
1:Sorry you only have #<particles> #<rawmaterial> particles
1:When you know the CORRECT amount of #<rawmaterial> particles you want to sell to me come back
1:cya
END
@next2
1: I give #<rawmaterialprice>gp for each #<rawmaterial> particle
MUL sell, #<rawmaterialprice>
1:So that makes a total of #<sell>gp for your #<rawmaterial> particles
SUB particles, #<amount>
STRCMP #<rawmaterial>, stone
IF= @setstone
STRCMP #<rawmaterial>, wood
IF= @setwood
STRCMP #<rawmaterial>, copper
IF= @setcopper
STRCMP #<rawmaterial>, steel
IF= @setsteel
STRCMP #<rawmaterial>, silver
IF= @setsilver
STRCMP #<rawmaterial>, gold
IF= @setgold
STRCMP #<rawmaterial>, diamond
IF= @setdiamond
STRCMP #<rawmaterial>, platinum
IF= @setplatinum
@particlemoney
GIVE G#<sell> 
1:Here it is your money for your raw materials
1:if you want to sell me more #<rawmaterial> particles or different particles, please come back
1:cya
END

@setstone
SET stone, #<particles>
GOTO @particlemoney

@setwood
SET wood, #<particles>
GOTO @particlemoney

@setcopper
SET copper, #<particles>
GOTO @particlemoney

@setsteel
SET steel, #<particles>
GOTO @particlemoney

@setsilver
SET silver, #<particles>
GOTO @particlemoney

@setgold
SET gold, #<particles>
GOTO @particlemoney

@setdiamond
SET diamond, #<particles>
GOTO @particlemoney

@setplatinum
SET platinum, #<particles>
GOTO @particlemoney

;---------
SCENE 124 minebackground, scene, ""
THEME	0
ACTOR 1, "Miner", miner, 4, 35,100
COMPARE #<num.peopleinscene>, 1
IF> @party
IF E#<itemID>+E59 @mine
1:You haven't equipped your pouch or your pickaxe yet so I cannot let you pass
1:I will wait here until you have equipped them both
1:The pickaxe goes where your shield is and your pouch where the amulet is.
WAIT 4
GOTO @equiploop
@mine
IF #50 @checklevel10+
IF #52 @checklevel20+
IF #53 @checklevel30+
IF #54 @checklevel40+
IF #55 @checklevel50+
IF #56 @checklevel60+
IF #57 @checklevel80+
GOTO link 50,0
END

@equiploop
IF E#<itemID>+E59 @continue
GOTO @equiploop

@continue
1: Thank you for equipping your pickaxe and pouch, you may now pass!
WAIT 4
GOTO @mine

@checklevel10+
SET requiredlevel, 10
COMPARE #<ML>, 10
IF< @nogo
GOTO link 52,0

@checklevel20+
SET requiredlevel, 20
COMPARE #<ML>, 20
IF< @nogo
COMPARE #<num.closestlink>, 1
IF= @leftlink
COMPARE #<num.closestlink>, 2
IF= @rightlink

@leftlink
GOTO link 53,0
@rightlink
goto link 53,1

@checklevel30+
SET requiredlevel,30
COMPARE #<ML>, 30
IF< @nogo
GOTO link 54,0

@checklevel40+
SET requiredlevel, 40
COMPARE #<ML>, 40
IF< @nogo
GOTO link 55,0

@checklevel50+
SET requiredlevel, 50
COMPARE #<ML>, 50
IF< @nogo
GOTO link 56,0

@checklevel60+
SET requiredlevel, 60
COMPARE #<ML>, 60
IF< @nogo
GOTO link 57,0

@checklevel80+
SET requiredlevel, 80
COMPARE #<ML>, 80
IF< @nogo
GOTO link 58,0

@nogo
1:sorry but you need to have a mining level of #<requiredlevel> to pass
1:You only have a mining level of #<ML> so I cannot let you pass
1:come back when you are at level #<requiredlevel>
END

@party
1:I see you are trying to cheat by being joined with your friend, huh?
1:Mining should be a solo effort and not two of you
1:If I let you past you would help your friend to get some particles that are not even at his level!
1:I'm sorry but this is as far as you go if you have your friend with you!
1:goodbye
WAIT 2
GOTO EXIT
END

;---------
SCENE 125 minebackground, scene, "End of Mine"
THEME	0
ACTOR 1, "Miner", miner, 4, 35,100
1: Hey %1! You have done well to get so far!
1: Cool, you are at level #<ML>
WAIT 3
COMPARE #<ML>, 100
IF= @congrats
IF> @congrats
1:You still aren't a Freelance miner yet but you are close
1:When you become a Freelance miner you can leave this mine and go around Gargoyles as a miner!
1:Cool, huh?
1:The good thing about miners is that they have Loads of hp so you will have a much greater advantage than most people
1:Also you will be able to level easier when using this class if you are not level 100 yet so that is another advantage
1:Come back when your mining level is at 100 and I will make you a freelance miner so that you can leave this mine and go to Gargoyles!
1:Cya soon
END

@congrats
1:Congratulations!!!! You are finally a Freelance miner, I bet getting to this Level took days!!
h: Yes it did take ages!!! 
1:Since you are a Freelance miner now ,you could go to the blacksmith and get yourself a special weapon forged for you
1:but you still have to supply him with the materials, he isn't made of raw materials you know
1:I will send you back to the blacksmith area so that you can have a look at the new weapon and see whether you have enough particles
1: Please wait while I prepare to send you...
WAIT 4
GOTO LINK 49, 3
END
END

;---------
SCENE 126 mine, cut, "Mafia guy"
THEME	0
SET me, %1
ACTOR 1, "Mafia boss", mafia, 1, 10,75
ACTOR 2, "#<me>", mirror, 1, 90, 75
FACE 2,0
COMPARE #<firsthostclass>, 0
IF> @skipfirsthostset
SET firsthostclass, #<num.hostClass> 
SET firsthostclassname, %C
@skipfirsthostset
If #47 @leaving
1:You really DON'T wanna mess with me if you know what I am saying!
1:There is a miner inside this mine and he wants to speak to you
1:Now get outta my sight wiseguy!!
WAIT 2
GOTO link 47, 0
END

@leaving
COMPARE #<num.hostClass>, 9
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 10
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 12
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 13
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 14
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 15
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 16
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 17
IF= @wiseguyhuh?
COMPARE #<num.hostClass>, 18
IF= @ummmmm
1:leaving huh? It will be sad to see you go! I won't be able to beat a wiseguy like you up!
1:I will let you past this time but you make not be as lucky when you return!!
1:My friends may want a word with you!
WAIT 3
GOTO link 46, 1
END

@wiseguyhuh?
1:SO! You think you are mr wiseguy, huh?
2:I don't know what you are talking about!
1:Don't play games with me or you will be taking a stroll along the pier and saying hello to the fishes!!!
1:You are still a miner and the mafia hate newbie miners!! we like pounding them for fun!!!
1:I am gonna do the same to you if you don't get outta my sight now! 
1:Don't come back until you are at your old class again
1:Next time don't try and be a mister wiseguy and become a miner when you haven't done any work
1:I know that you used to be a #<firsthostclass>, so swap back to it!!
COMPARE #<kicked>, 1
IF= @problem?
WAIT 4
SET move, 10
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
add move, 4
WAIT .1
ACTOR 1, "Mafia boss", mafia, 2, #<move>,75
SEL 2
POSE 3
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
wait .1
ACTOR 2, "#<me>", mirror, 1, #<move>, 75
add move, 4
N: YOU ARE KICKED HARD IN THE CHEST BY THE MAFIA BOSS AND HE HAS KNOCKED YOU OUT!
TAKE H10000
SET kicked, 1
GOTO EXIT
END

@ummmmm
1: Ummmm, I don't usually say this but "cough" Congratulations "cough"
2: huh? I didn't hear what you said, were you congratulating me for becomming a freelance miner?
1: I am only gonna say it once, now get outta here!!
WAIT 3
GOTO link 46,1
END

@problem?
1:What is up you have a problem because you kept trying to cheat and become a miner early?
1:Well I know your game and you used to be a #<firsthostclassname> and not a miner
1:So I am gonna change you back!
SET num.hostclass, #<firsthostclass>
1:Now get lost!!!
WAIT 2
goto link 46, 1
END

;---------
SCENE 127 minebackground, scene, "PP training"
THEME	0
ACTOR 1, "PP trainer", pp, 1, 10,75
1:Welcome to pp training, the home of snerts and easy levelers :)
1:This scene exists because you will have lost all your training from changing clasess
1:This scenes purpose is to help you get it back 
1:You will do this by spending the pp you earn from here on either hand or elements training
1:You will fight a wooden dummy to recieve pp and since dummys don't usually fight back you can get easy pp
1:wooden dummys have loads of hp and a great defense so you should be fighting them for quite a while
1:I will now vanish and let you fight wooden dummys until you decide to exit
1:oh yeah and one more thing if you want to get more pp from these you need to work on your wisdom when you lvl up
1:DO NOT USE THIS SCENE IF YOU ARE PLANNING TO LEAVE THIS MINE BEFORE YOU ARE AT LEVEL 100 IN THE MINING SKILL!!!
1:IF YOU LEAVE THIS MINE AND HAVE GOT YOUR TRAINING BACK AND DECIDE TO RETURN TO THE MINE YOU WILL HAVE LOST YOUR TRAINING ALL OVER AGAIN!
1:If you are staying in this mine till mining level 100 you can use this scene and you won't have to worry about losing pp again
1:REMEMBER, YOU HAVE BEEN WARNED!!!
1:Cya
WAIT 2
ACTOR 1,
@fight 62
FIGHT 62
ACTOR 1, "PP trainer", pp, 1, 10,75
1:You have got 10 seconds to leave if you want to
WAIT 10
ACTOR 1, 
GOTO @fight62
END

;---------
SCENE 128 miner, cut, "Mine cart"
THEME	0
ACTOR 1, "", characters5, 14, 50, 50
ACTOR 2, "", armydude, 3, 25, 95
SET me, %1
ACTOR 3, "#<me>", mirror, 1, 90, 75
1:hi, I control the mine cart that goes between all 8 mines
1:Only one person can ride this cart at once so I hope you are not in a group
1:I will only take you to the mine level you ask for if you have the correct level required for that area
1:The ride to the mine will be free and it goes both ways!! :0
COMPARE #<num.peopleinscene>, 1
IF> @solo
1:Please choose where you want to go
WAIT 4
COMPARE #<num.peopleinscene>, 1
IF> @solo
COMPARE #<ML>, 80
IF= @whichlevel8?
IF> @whichlevel8?
COMPARE #<ML>, 60
IF= @whichlevel7?
IF> @whichlevel7?
COMPARE #<ML>, 50
IF= @whichlevel6?
IF> @whichlevel6?
COMPARE #<ML>, 40
IF= @whichlevel5?
IF> @whichlevel5?
COMPARE #<ML>, 30
IF= @whichlevel4?
IF> @whichlevel4?
COMPARE #<ML>, 20
IF= @whichlevel3?
IF> @whichlevel3?
COMPARE #<ML>, 10
IF= @whichlevel2?
IF> @whichlevel2?

@whichlevel?
MENU "Mine level 1 (stone)=@CartToStone"
goto @whichlevel?
END

@whichlevel2?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood" 

@whichlevel3?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood", "Mine level 3 (copper)=@CartToCopper" 

@whichlevel4?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood", "Mine level 3 (copper)=@CartToCopper", "Mine level 4 (steel)=@CartToSteel"

@whichlevel5?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood", "Mine level 3 (copper)=@CartToCopper", "Mine level 4 (steel)=@CartToSteel", "Mine level 5 (silver)=@CartToSilver" 

@whichlevel6?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood", "Mine level 3 (copper)=@CartToCopper", "Mine level 4 (steel)=@CartToSteel", "Mine level 5 (silver)=@CartToSilver", "Mine level 6 (gold)=@CartToGold" 

@whichlevel7?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood", "Mine level 3 (copper)=@CartToCopper", "Mine level 4 (steel)=@CartToSteel", "Mine level 5 (silver)=@CartToSilver", "Mine level 6 (gold)=@CartToGold", "Mine level 7 (diamond)=@CartToDiamond" 

@whichlevel8?
MENU "Mine level 1 (stone)=@CartToStone", "Mine level 2 (wood)=@CartToWood", "Mine level 3 (copper)=@CartToCopper", "Mine level 4 (steel)=@CartToSteel", "Mine level 5 (silver)=@CartToSilver", "Mine level 6 (gold)=@CartToGold", "Mine level 7 (diamond)=@CartToDiamond", "Mine level 8 (platinum)=@CartToPlatinum" 
END

@CartToStone
SET Minecart, 50
1:I will send you to mine level 1 now
3:woo hoo!
WAIT 2
GOTO @CartRide

@CartToWood
SET Minecart, 52
1:I will send you to mine level 2 now
1:I hope you like wood
WAIT 3
GOTO @CartRide

@CartToCopper
SET Minecart, 53
1:I will send you on the cart to mine level 3
WAIT 4
GOTO @CartRide

@CartToSteel
SET Minecart, 54
1:I will send you on the cart to mine level 4
WAIT 4
GOTO @CartRide

@CartToSilver
SET Minecart, 55
1:I will send you on the cart to mine level 5
WAIT 4
GOTO @CartRide

@CartToGold
SET Minecart, 56
1:I will send you on the cart to mine level 6
WAIT 4
GOTO @CartRide

@CartToDiamond
SET Minecart, 57
1:I will send you on the cart to mine level 7
WAIT 4
GOTO @CartRide

@CartToPlatinum
SET Minecart, 58
1:I will send you on the cart to mine level 8
WAIT 4
GOTO @CartRide

@CartRide
COMPARE #<num.peopleinscene>, 1
IF> @solo
1:Get onboard
WAIT 2
MOVE 3, 25,95
WAIT 9
MOVE 2, -150,95
MOVE 3, -150,95
WAIT 3
GOTO LINK #<MineCart>, 0
END

@solo
1:Sorry but like I said only ONE person can fit inside the mine cart.
1:Your friend will have to leave your party and join you later at the mine level you are going to
1:Come back when there is just one person
WAIT 4
GOTO EXIT
END
; comment at the end