For some reason this piece of code crashes QDK when I try and look at it. However, it actually works perfectly when I run the game. I don't really need to edit it anymore or anything, but I'd like to known why it was doing this...
define procedure <equip something>
if property <#item#; body> then {
msg <#@target# equips the #@item#.>
if ( #(target):armour_body# <> none ) then show <#(target):armour_body#>
property <#target#; armour_body=#item#>
hide <#item#>
do <calculate stats>
}
if property <#item#; shield> then {
if not property <#(target):weapon#; two-handed> {
msg <#@target# equips the #@item#.>
if ( #(target):armour_shield# <> none ) then show <#(target):armour_shield#>
property <#target#; armour_shield=#item#>
hide <#item#>
do <calculate stats>
}
else msg <You can't use a shield with a two-handed weapon.>
}
if property <#item#; glove> then {
msg <#@target# equips the #@item#.>
if ( #(target):armour_glove# <> none ) then show <#(target):armour_glove#>
property <#target#; armour_glove=#item#>
hide <#item#>
do <calculate stats>
}
if property <#item#; helm> then {
msg <#@target# equips the #@item#.>
if ( #(target):armour_helm# <> none ) then show <#(target):armour_helm#>
property <#target#; armour_helm=#item#>
hide <#item#>
do <calculate stats>
}
if property <#item#; accessory> then {
msg <#@target# equips the #@item#.>
if ( #(target):armour_accessory# <> none ) then show <#(target):armour_accessory#>
property <#target#; armour_accessory=#item#>
hide <#item#>
do <calculate stats>
}
if property <#item#; weapon> then {
msg <#@target# equips the #@item#.>
if ( #(target):weapon# <> none ) then show <#(target):weapon#>
property <#target#; weapon=#item#>
hide <#item#>
do <calculate stats>
}
end define
One other small thing, one section of code that checks the character's stats and sets them according to base stat, temp bonuses, armour and weapons is so long and repetious that Quest pauses for about 2 seconds when it runs. Is there any way to avoid this?