| Code: |
var material := FindSubstance(who.backpack, thematerial, amt, 1);
SendSysMessage(who, CStr(material));
if ( !material )
SendSysMessage(who, "You dont have enough resources to fix that item.");
return;
endif
if (!ConsumeSubstance(who.backpack, thematerial, amt))
SendSysMessage(who, "Unable to consume the resources to fix that item.");
return;
endif
|
| Code: |
var material := FindSubstance(who.backpack, thematerial, amt, 0);
ReserveItem(material);
|