begin Soul_ForgeScript_Iron
short state
short button
short apprentice
short journeyman
short master
short grandmaster
if ( MenuMode == 1 )
return
endif
if ( OnActivate == 1 )
if ( Player->GetItemCount, "Soul_Iron_Schematic" < 1 )
MessageBox, "You do not have the schematics to use this."
return
else
set state to 1
endif
endif
if ( state == 1 )
if ( Player->GetArmorer < 25 )
MessageBox, "You are not skilled enough to upgrade your armor."
else
set apprentice to 1
set state to 2
; elseif ( Player->GetArmorer >= 50 )
; set journeyman to 1
; set apprentice to 0
; set state to 2
; elseif ( Player->GetArmorer >= 75 )
; set master to 1
; set journeyman to 0
; set apprentice to 0
; set state to 2
; elseif ( Player->GetArmorer >= 100 )
; set grandmaster to 1
; set master to 0
; set journeyman to 0
; set apprentice to 0
; set state to 2
endif
endif
if ( state == 2 )
MessageBox, "What would you like to upgrade?", "Iron Helm", "Iron Cuirass", "Iron Pauldron Right", "Iron Pauldron Left", "Iron Gauntlet Right", "Iron Gauntlet Left", "Something else", "Nothing"
set button to GetButtonPressed
if ( button < 0 )
return
elseif ( button == 0 )
if ( apprentice == 1 )
if ( Player->GetItemCount, "iron_helmet" < 1 )
MessageBox, "You do not have the required armor!"
set state to 0
set apprentice to 0
set button to -1
elseif ( Player->GetItemCount "Soul_RawIron" < 5 )
MessageBox, "You do not have the required materials!"
set state to 0
set apprentice to 0
set button to -1
else
Player->RemoveItem, "iron_helmet", 1
Player->RemoveItem, "Soul_RawIron", 5
Player->AddItem, "Soul_A iron_helmet", 1
PlaySound, "Repair"
set apprentice to 0
set state to 0
set button to -1
return
endif
elseif ( journeyman == 1 )
if ( Player->GetItemCount, "iron_helmet" < 1 )
if ( Player->GetItemCount, "Soul_RawIron" < 5 )
MessageBox, "You do not have the required materials!"
set state to 0
set journeyman to 0
set button to -1
endif
else
Player->RemoveItem, "iron_helmet", 1
Player->RemoveItem, "Soul_RawIron", 5
Player->AddItem, "Soul_J iron_helmet", 1
PlaySound, "Repair"
set journeyman to 0
set state to 0
set button to -1
return
endif
endif
elseif ( button == 2 )
return
elseif ( button == 3 )
return
elseif ( button == 4 )
return
elseif ( button == 5 )
return
elseif ( button == 6 )
return
elseif ( button == 7 )
return
endif
endif
end Soul_ForgeScript_Iron