SCENE 110019
@start
RETURN
END

@firsttimeblacksmith.txt
1: Hello, adventurer.
1: I don't remember you.
1: You are here at a smithy.
1: You can upgrade weapons here: toss me the equipment you want to upgrade and the metal needed to upgrade it, and I'll reinforce it.
1: There are five kinds of metal: orgon, for level 1-15 equipment, plascon for level 20-35 equipment, anatium for level 40-55 equipment, elunium for level 60-75 equipment, and emperium for level 80-95 equipment.
1: You can buy orgon, plascon and anatium here but you will have to find elunium and emperium on the monsters you kill.
1: There is a 50 #<GP.name> fee for the low level weapons as well.
1: But it becomes more expensive with better equipment: it is 1000 #<GP.name> for the best equipment.
1: And don't say it is expensive!
1: Oh, and by the way, there is a small chance that we break the weapon while trying to upgrade it.
1: The smithing company is not responsible and the fees are not refundable.
1: Using our services implies you accept the risk.
1: Notice as well that a piece of equipment cannot be upgraded more than 3 times.
SET c5talkedtoblacksmith, 1
OFFER 132, 134, 135
RETURN
END

@eventActorGive1
SET c5itemupgradedwithfirstmetal, "-324-325-326-200-203-205-250-251-252-635-636-637-565-566-567-304-305-306-464-465-466-467-505-506-507-364-365-366-405-406-407-485-486-487-"
SET c5itemupgradedwithsecondmetal, "-328-329-330-209-210-211-639-640-641-569-570-571-308-309-310-469-470-471-368-369-370-509-510-511-393-394-395-409-410-411-254-255-256-489-490-491-"
SET c5itemupgradedwiththirdmetal, "-332-333-334-213-214-215-258-259-260-643-644-645-573-574-575-312-313-314-473-474-475-372-373-374-513-514-515-393-394-395-413-414-415-493-494-495-"
SET c5itemupgradedwithfourthmetal, "-336-337-338-217-218-219-262-263-264-647-648-649-578-579-580-316-317-318-477-478-479-376-377-378-517-518-519-397-398-399-417-418-419-497-498-499-"
SET c5itemupgradedwithfifthmetal, "-340-341-342-221-222-223-266-267-268-651-652-653-582-583-584-320-321-322-481-482-483-380-381-382-521-522-523-401-402-403-421-422-423-501-502-503-"
COMPARE #<item.id>, 0
IF= @blacksmith.txtgold
IF T717 @blacksmith.txtmetal1
IF T718 @blacksmith.txtmetal2
IF T719 @blacksmith.txtmetal3
IF T720 @blacksmith.txtmetal4
IF T721 @blacksmith.txtmetal5
SET c5itemidtossedblabla, #<item.id>
STRSTR #<c5itemupgradedwithfirstmetal>, "-#<item.id>-"
IF> @blacksmith.txtfirstmetal
STRSTR #<c5itemupgradedwithsecondmetal>, "-#<item.id>-"
IF> @blacksmith.txtsecondmetal
STRSTR #<c5itemupgradedwiththirdmetal>, "-#<item.id>-"
IF> @blacksmith.txtthirdmetal
STRSTR #<c5itemupgradedwithfourthmetal>, "-#<item.id>-"
IF> @blacksmith.txtfourthmetal
STRSTR #<c5itemupgradedwithfifthmetal>, "-#<item.id>-"
IF> @blacksmith.txtfifthmetal
1: Sorry but I cannot upgrade this.
1: Take it back.
HOST_GIVE I#<c5itemidtossedblabla>
SOUND FoundItem.wav
RETURN
END

@blacksmith.txtmenu1
SOUND sword1.wav
MENU "Yes I want it back=@blacksmith.txtwantitback", "No I don't=@blacksmith.txtnodont", "Don't ask this anymore=@dontaskthisanymore"
SOUND thud.wav
GOTO @blacksmith.txtmenu1

@dontaskthisanymore
SOUND sword1.wav
SET blackshithOptions.DontAsk, 1
N: Right-click on the blacksmith if you want him to ask this again.
RETURN
END

@eventActorClick1
SOUND sword1.wav
MENU "Ask if you want the item back after the blacksmith has checked the kind of ore needed=@dontaskthisanymorebbb", "Don't ask if you want the item back after the blacksmith has checked the kind of ore needed=@dontaskthisanymore"
SOUND thud.wav
GOTO @eventActorClick1

@dontaskthisanymorebbb
SOUND sword1.wav
SET blackshithOptions.DontAsk, 0
RETURN
END

@blacksmith.txtwantitback
SOUND sword1.wav
H: Yes, please.
H: I'll be back with the metal you need.
1: You choose...
HOST_TAKE T717 
HOST_TAKE T718 
HOST_TAKE T719 
HOST_TAKE T720 
HOST_TAKE T721 
HOST_GIVE I#<c5itemidtossedblabla>
SOUND FoundItem.wav
1: Later
RETURN
END

@blacksmith.txtnodont
SOUND sword1.wav
H: No thanks.
@blacksmith.txtnodont2
RETURN
END

@blacksmith.txtfirstmetal
IF -G50 @poorblacksmith.txt
HOST_TAKE G50
HOST_GIVE T717
SET c5objetlanceauforgeron, "#<item.id>"
SET grammar, #<item.name>
SET_SUBSTR grammar2, 0, 1, #<grammar>
STRSTR "aeiouy", #<grammar2>
IF> @blacksmith.txtfirstmetal.1
1: I need orgon to upgrade a #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtfirstmetal.1
1: I need orgon to upgrade an #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtsecondmetal
IF -G100 @poorblacksmith.txt
HOST_TAKE G100
HOST_GIVE T718
SET c5objetlanceauforgeron, "#<item.id>"
SET grammar, #<item.name>
SET_SUBSTR grammar2, 0, 1, #<grammar>
STRSTR "aeiouy", #<grammar2>
IF> @blacksmith.txtsecondmetal.1
1: I need plascon to upgrade a #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtsecondmetal.1
1: I need plascon to upgrade an #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtthirdmetal
IF -G250 @poorblacksmith.txt
HOST_TAKE G250
HOST_GIVE T719
SET c5objetlanceauforgeron, "#<item.id>"
SET grammar, #<item.name>
SET_SUBSTR grammar2, 0, 1, #<grammar>
STRSTR "aeiouy", #<grammar2>
IF> @blacksmith.txtthirdmetal.1
1: I need anatium to upgrade a #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtthirdmetal.1
1: I need anatium to upgrade an #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtfourthmetal
IF -G500 @poorblacksmith.txt
HOST_TAKE G500
HOST_GIVE T720
SET c5objetlanceauforgeron, "#<item.id>"
SET grammar, #<item.name>
SET_SUBSTR grammar2, 0, 1, #<grammar>
STRSTR "aeiouy", #<grammar2>
IF> @blacksmith.txtfourthmetal.1
1: I need elunium to upgrade a #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtfourthmetal.1
1: I need elunium to upgrade an #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtfifthmetal
IF -G1000 @poorblacksmith.txt
HOST_TAKE G1000
HOST_GIVE T721
SET c5objetlanceauforgeron, "#<item.id>"
SET grammar, #<item.name>
SET_SUBSTR grammar2, 0, 1, #<grammar>
STRSTR "aeiouy", #<grammar2>
IF> @blacksmith.txtfifthmetal.1
1: I need emperium to upgrade a #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@blacksmith.txtfifthmetal.1
1: I need emperium to upgrade an #<item.name>.
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Toss it if you have some or if you prefer you can take your equipment back.
1: Do you want it back?
WAIT 1.5
GOTO @blacksmith.txtmenu1

@poorblacksmith.txt
1: Hmm...
1: Yeah, I can reinforce this but the service is not free.
1: I may be wrong but you don't seem to have the money.
1: Come back when you have some #<GP.name> with you. 
1: Take it back.
HOST_GIVE I#<c5itemidtossedblabla>
SOUND FoundItem.wav
RETURN
END

@blacksmith.txtgold
1: Dude, I can't upgrade gold.
1: But thanks for the tip!
RETURN
END

@blacksmith.txtmetal1
COMPARE #<item.id>, "132"
IF= @blacksmith.txtgive
1: I told you, I need orgon to upgrade your equipment, not this.
1: Take it back.
HOST_GIVE I#<item.id>
SET item.id, #<c5itemidtossedblabla>
SOUND FoundItem.wav
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Do you want your %I#<item.id> back as well?
WAIT 1
GOTO @blacksmith.txtmenu1

@blacksmith.txtmetal2
COMPARE #<item.id>, "134"
IF= @blacksmith.txtgive
1: I told you, I need %I134 to upgrade your equipment, not this.
1: Take it back.
HOST_GIVE I#<item.id>
SET item.id, #<c5itemidtossedblabla>
SOUND FoundItem.wav
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Do you want your %I#<item.id> back as well?
WAIT 1
GOTO @blacksmith.txtmenu1

@blacksmith.txtmetal3
COMPARE #<item.id>, "135"
IF= @blacksmith.txtgive
1: I told you, I need %I135 to upgrade your equipment, not this.
1: Take it back.
HOST_GIVE I#<item.id>
SET item.id, #<c5itemidtossedblabla>
SOUND FoundItem.wav
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Do you want your %I#<item.id> back as well?
WAIT 1
GOTO @blacksmith.txtmenu1

@blacksmith.txtmetal4
COMPARE #<item.id>, "93"
IF= @blacksmith.txtgive
1: I told you, I need %I93 to upgrade your equipment, not this.
1: Take it back.
HOST_GIVE I#<item.id>
SET item.id, #<c5itemidtossedblabla>
SOUND FoundItem.wav
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Do you want your %I#<item.id> back as well?
WAIT 1
GOTO @blacksmith.txtmenu1

@blacksmith.txtmetal5
COMPARE #<item.id>, "95"
IF= @blacksmith.txtgive
1: I told you, I need %I95 to upgrade your equipment, not this.
1: Take it back.
HOST_GIVE I#<item.id>
SET item.id, #<c5itemidtossedblabla>
SOUND FoundItem.wav
COMPARE #<blackshithOptions.DontAsk>, 1
IF= @blacksmith.txtnodont2
1: Do you want your #<item.id> back as well?
WAIT 1
GOTO @blacksmith.txtmenu1

@blacksmith.txtgive
COMPARE #<c5objetlanceauforgeron>, 200
IF= @blacksmith.txtgive1
COMPARE #<c5objetlanceauforgeron>, 203
IF= @blacksmith.txtgive2
COMPARE #<c5objetlanceauforgeron>, 205
IF= @blacksmith.txtgive3
COMPARE #<c5objetlanceauforgeron>, 384
IF= @blacksmith.txtgive4
ADD c5objetlanceauforgeron,  1
1: Great, the metal I need.
1: Give me a few minutes.
HOST_TAKE T717
HOST_TAKE T718
HOST_TAKE T719
HOST_TAKE T720
HOST_TAKE T721
WAIT 1.5
SOUND harvestgolem1
WAIT 1
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 1
HOST_GIVE I#<c5objetlanceauforgeron>
1: There.
SET grammar, %I#<c5objetlanceauforgeron>
SET_SUBSTR grammar2, 0, 1, #<grammar>
STRSTR "aeiouy", #<grammar2>
IF> @blacksmith.txtgivevoyel
1: A %I#<c5objetlanceauforgeron> for you!
SOUND FoundItem.wav
RETURN
END

@blacksmith.txtgivevoyel
1: An %I#<c5objetlanceauforgeron> for you!
RETURN
END

@blacksmith.txtgive1
HOST_TAKE T717
HOST_TAKE T718
HOST_TAKE T719
HOST_TAKE T720
HOST_TAKE T721
1: Great, the metal I need.
1: Give me a few minutes.
WAIT 1.5
SOUND harvestgolem1
WAIT 1
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 1
HOST_GIVE I203
1: There.
1: A %I203 for you!
SOUND FoundItem.wav
RETURN
END

@blacksmith.txtgive2
HOST_TAKE T717
HOST_TAKE T718
HOST_TAKE T719
HOST_TAKE T720
HOST_TAKE T721
1: Great, the metal I need.
1: Give me a few minutes.
WAIT 1.5
SOUND harvestgolem1
WAIT 1
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 1
HOST_GIVE I205
1: There.
1: A %I205 for you!
SOUND FoundItem.wav
RETURN
END

@blacksmith.txtgive3
HOST_TAKE T717
HOST_TAKE T718
HOST_TAKE T719
HOST_TAKE T720
HOST_TAKE T721
1: Great, the metal I need.
1: Give me a few minutes.
WAIT 1.5
SOUND harvestgolem1
WAIT 1
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 1
HOST_GIVE I208
1: There.
1: A %I208 for you!
SOUND FoundItem.wav
RETURN
END

@blacksmith.txtgive4
HOST_TAKE T717
HOST_TAKE T718
HOST_TAKE T719
HOST_TAKE T720
HOST_TAKE T721
1: Great, the metal I need.
1: Give me a few minutes.
WAIT 1.5
SOUND harvestgolem1
WAIT 1
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 0.4
SOUND sword2
WAIT 1
HOST_GIVE I386
1: There.
1: A %I386 for you!
SOUND FoundItem.wav
RETURN
END



