Added CCOH Fixed some on death issues Fixed the gaurd Added Server Enty/ooc changed some areas back to original craftable
914 lines
31 KiB
Plaintext
914 lines
31 KiB
Plaintext
//#include "_persist_01a"
|
|
#include "aps_include"
|
|
void CreateAnObject(string sResource, object oPC, int iStackSize);
|
|
object CreatePlaceable(string sObject, location lPlace, float fDuration);
|
|
string GetIngotType(object oItem, object oPC);
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetLastDisturbed();
|
|
object oItem = GetInventoryDisturbItem();
|
|
string sItemTag = GetTag(oItem);
|
|
string sResmeltMessage = "INVALID";
|
|
int iResmelt = 0;
|
|
int iBaseItem=0;
|
|
int iMaxResmelt;
|
|
int iMaxResmelt2;
|
|
int iMaxResmelt3;
|
|
|
|
if (GetInventoryDisturbType()!= INVENTORY_DISTURB_TYPE_ADDED)
|
|
{
|
|
if (sItemTag=="SWITCH_VLOWHEAT")
|
|
{
|
|
SetLocalInt(oPC,"iHeat",1);
|
|
FloatingTextStringOnCreature("Smelting forge is now set to use very low heat.",oPC,FALSE);
|
|
}
|
|
if (sItemTag=="SWITCH_LOWHEAT")
|
|
{
|
|
SetLocalInt(oPC,"iHeat",2);
|
|
FloatingTextStringOnCreature("Smelting forge is now set to use low heat.",oPC,FALSE);
|
|
}
|
|
if (sItemTag=="SWITCH_MEDIUMHEAT")
|
|
{
|
|
SetLocalInt(oPC,"iHeat",3);
|
|
FloatingTextStringOnCreature("Smelting forge is now set to use normal heat.",oPC,FALSE);
|
|
}
|
|
if (sItemTag=="SWITCH_HIGHHEAT")
|
|
{
|
|
SetLocalInt(oPC,"iHeat",4);
|
|
FloatingTextStringOnCreature("Smelting forge is now set to use high heat.",oPC,FALSE);
|
|
}
|
|
if (sItemTag=="SWITCH_VHIGHHEAT")
|
|
{
|
|
SetLocalInt(oPC,"iHeat",5);
|
|
FloatingTextStringOnCreature("Smelting forge is now set to use very high heat.",oPC,FALSE);
|
|
}
|
|
CopyObject(oItem,GetLocation(oPC),OBJECT_SELF,GetTag(oItem));
|
|
DestroyObject(oItem);
|
|
return;
|
|
}
|
|
|
|
|
|
// The following 3 lines are to ensure compatability with UOAbigal's Persistent Token System.
|
|
// You can replace them with whatever 'no-drop' code you have or comment them out.
|
|
string sNoDropFlag = (GetStringLeft(GetTag(oItem),6));
|
|
if (sNoDropFlag == "NoDrop" || sNoDropFlag == "TOKEN_"||sNoDropFlag=="_TBOX_")
|
|
return;
|
|
if (GetBaseItemType(oItem)==BASE_ITEM_LARGEBOX)
|
|
{
|
|
DestroyObject(oItem);
|
|
SendMessageToPC(oPC,"To avoid possible dupe exploits, the container placed in this bag may be destroyed.");
|
|
return;
|
|
}
|
|
// End of compatability portion.
|
|
|
|
if (GetLocalInt(OBJECT_SELF,"iAmInUse")!=0)
|
|
{
|
|
FloatingTextStringOnCreature("You must wait for this batch of ore to finish smelting..",oPC,FALSE);
|
|
CopyItem(oItem,oPC,TRUE);
|
|
DestroyObject(oItem);
|
|
return;
|
|
}
|
|
|
|
iBaseItem = GetBaseItemType(oItem);
|
|
|
|
string sIngotResRef = "";
|
|
int iStackSize = 0;
|
|
int iMaxStack = 5;
|
|
string sSuccess = "";
|
|
|
|
if (GetStringLeft(sItemTag,3) != "ORE")
|
|
{
|
|
//Added Resmelt code 11-25-03 UOAbigail
|
|
if (iBaseItem==BASE_ITEM_ARMOR) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_BASTARDSWORD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_BATTLEAXE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_CLUB) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_DAGGER) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_DIREMACE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_DOUBLEAXE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_GREATAXE) iResmelt=1;
|
|
|
|
if (iBaseItem==BASE_ITEM_GREATSWORD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_HALBERD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_HANDAXE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_HEAVYFLAIL) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_HELMET) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_KAMA) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_KATANA) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_KUKRI) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_LARGESHIELD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_LIGHTFLAIL) iResmelt=1;
|
|
|
|
if (iBaseItem==BASE_ITEM_LIGHTHAMMER) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_LIGHTMACE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_LONGSWORD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_MORNINGSTAR) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_RAPIER) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_SCIMITAR) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_SCYTHE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_SHORTSPEAR) iResmelt=1;
|
|
|
|
if (iBaseItem==BASE_ITEM_SHORTSWORD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_SICKLE) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_SMALLSHIELD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_TOWERSHIELD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_TWOBLADEDSWORD) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_WARHAMMER) iResmelt=1;
|
|
if (iBaseItem==BASE_ITEM_THROWINGAXE)
|
|
{
|
|
iResmelt=1;
|
|
if (GetNumStackedItems(oItem)<50) iResmelt=3;
|
|
}
|
|
if (iBaseItem==BASE_ITEM_SHURIKEN)
|
|
{
|
|
iResmelt=1;
|
|
if (GetNumStackedItems(oItem)<50) iResmelt=3;
|
|
}
|
|
if (iBaseItem==BASE_ITEM_DART)
|
|
{
|
|
iResmelt=1;
|
|
if (GetNumStackedItems(oItem)<50) iResmelt=3;
|
|
}
|
|
if (iBaseItem==BASE_ITEM_BULLET)
|
|
{
|
|
iResmelt=1;
|
|
if (GetNumStackedItems(oItem)<50) iResmelt=3;
|
|
}
|
|
|
|
if (iResmelt==0)
|
|
{
|
|
CopyItem(oItem,oPC,TRUE);
|
|
FloatingTextStringOnCreature("You cannot smelt this item!",oPC,FALSE);
|
|
DestroyObject(oItem);
|
|
return;
|
|
}
|
|
if (iResmelt==3)
|
|
{
|
|
CopyItem(oItem,oPC,TRUE);
|
|
FloatingTextStringOnCreature("To prevent exploits you cannot smelt this item because it is not a full stack.",oPC,FALSE);
|
|
DestroyObject(oItem);
|
|
return;
|
|
}
|
|
}
|
|
|
|
//int iSmeltChance = GetTokenPair(oPC,14,2);
|
|
int iSmeltSkill = GetPersistentInt(oPC,"iSmeltSkill","UOACraft");
|
|
int iSmeltChance = iSmeltSkill;
|
|
//int iSmeltSkill = iSmeltChance;
|
|
string sOre;
|
|
|
|
|
|
|
|
if (iSmeltChance <350)
|
|
{
|
|
iSmeltChance = GetAbilityScore(oPC,ABILITY_STRENGTH)*3;
|
|
iSmeltChance = iSmeltChance + GetAbilityScore(oPC,ABILITY_DEXTERITY) + GetAbilityScore(oPC,ABILITY_WISDOM);
|
|
iSmeltChance = iSmeltChance * 3;
|
|
if (iSmeltChance >350) iSmeltChance = 350;
|
|
if (iSmeltSkill > iSmeltChance) iSmeltChance = iSmeltSkill;
|
|
}
|
|
|
|
if (iResmelt==0)
|
|
{
|
|
if (sItemTag == "ORE_IRON")
|
|
{
|
|
if (iSmeltChance < 250) iSmeltChance = 250;
|
|
sIngotResRef = "ingot001";
|
|
sOre = "Iron";
|
|
}
|
|
|
|
if (sItemTag == "ORE_DULL")
|
|
{
|
|
if (iSmeltChance <650) iSmeltChance = 0;
|
|
sIngotResRef = "ingot002";
|
|
iSmeltChance = iSmeltChance - 100;
|
|
sOre = "Dull Copper";
|
|
}
|
|
|
|
if (sItemTag == "ORE_SHADOW")
|
|
{
|
|
if (iSmeltChance <700) iSmeltChance = 0;
|
|
sIngotResRef = "ingot003";
|
|
iSmeltChance = iSmeltChance - 150;
|
|
sOre = "Shadow Iron";
|
|
}
|
|
|
|
if (sItemTag == "ORE_COPPER")
|
|
{
|
|
if (iSmeltChance <750) iSmeltChance = 0;
|
|
sIngotResRef = "ingot004";
|
|
iSmeltChance = iSmeltChance - 200;
|
|
sOre = "Copper";
|
|
}
|
|
|
|
if (sItemTag == "ORE_BRONZE")
|
|
{
|
|
if (iSmeltChance <800) iSmeltChance = 0;
|
|
sIngotResRef = "ingot005";
|
|
iSmeltChance = iSmeltChance - 250;
|
|
sOre = "Bronze";
|
|
}
|
|
|
|
if (sItemTag == "ORE_GOLD")
|
|
{
|
|
if (iSmeltChance <850) iSmeltChance = 0;
|
|
sIngotResRef = "ingot006";
|
|
iSmeltChance = iSmeltChance - 300;
|
|
sOre = "Gold";
|
|
}
|
|
|
|
if (sItemTag == "ORE_AGAPITE")
|
|
{
|
|
if (iSmeltChance <900) iSmeltChance = 0;
|
|
sIngotResRef = "ingot007";
|
|
iSmeltChance = iSmeltChance - 350;
|
|
sOre = "Agapite";
|
|
}
|
|
|
|
if (sItemTag == "ORE_VERITE")
|
|
{
|
|
if (iSmeltChance <950) iSmeltChance = 0;
|
|
sIngotResRef = "ingot008";
|
|
iSmeltChance = iSmeltChance - 400;
|
|
sOre = "Verite";
|
|
}
|
|
|
|
if (sItemTag == "ORE_VALORITE")
|
|
{
|
|
if (iSmeltChance <990) iSmeltChance = 0;
|
|
sIngotResRef = "ingot009";
|
|
iSmeltChance = iSmeltChance - 450;
|
|
sOre = "Valorite";
|
|
}
|
|
|
|
if (sItemTag == "ORE_SILVER")
|
|
{
|
|
if (iSmeltChance <800) iSmeltChance = 0;
|
|
sIngotResRef = "ingot010";
|
|
iSmeltChance = iSmeltChance - 250;
|
|
sOre = "Silver";
|
|
}
|
|
|
|
if (sItemTag == "ORE_MITHRIL")
|
|
{
|
|
if (iSmeltChance <950) iSmeltChance = 0;
|
|
sIngotResRef = "ingot011";
|
|
iSmeltChance = iSmeltChance - 400;
|
|
sOre = "Mithril";
|
|
}
|
|
|
|
if (sItemTag == "ORE_ADAMANTITE")
|
|
{
|
|
if (iSmeltChance <990) iSmeltChance = 0;
|
|
sIngotResRef = "ingot012";
|
|
iSmeltChance = iSmeltChance - 450;
|
|
sOre = "Adamantite";
|
|
}
|
|
|
|
if (sItemTag == "ORE_PLATINUM")
|
|
{
|
|
if (iSmeltChance <900) iSmeltChance = 0;
|
|
sIngotResRef = "ingot013";
|
|
iSmeltChance = iSmeltChance - 350;
|
|
sOre = "Platinum";
|
|
}
|
|
}
|
|
|
|
//Resmelt checks
|
|
if (iResmelt==1)
|
|
{
|
|
//iSmeltChance = iSmeltChance -
|
|
sIngotResRef = GetIngotType(oItem, oPC);
|
|
//sResmeltMessage = "Ingot: "+sIngotResRef+" MAX: "+IntToString(GetLocalInt(oPC,"iMaxIngot"))
|
|
// +" Min Skill: "+IntToString(GetLocalInt(oPC,"iSmeltMinimum"))
|
|
// +" Penalty: "+IntToString(GetLocalInt(oPC,"iSmeltPenalty"));
|
|
//SendMessageToPC(oPC,sResmeltMessage);
|
|
if (sIngotResRef=="INVALID")
|
|
{
|
|
SendMessageToPC(oPC,"You cannot smelt this item!");
|
|
CopyItem(oItem,oPC,TRUE);
|
|
DestroyObject(oItem,0.1);
|
|
return;
|
|
}
|
|
if (iSmeltChance<GetLocalInt(oPC,"iSmeltMinimum")) iSmeltChance=0;
|
|
iSmeltChance = iSmeltChance - GetLocalInt(oPC,"iSmeltPenalty");
|
|
iMaxResmelt = GetLocalInt(oPC,"iMaxIngot");
|
|
DeleteLocalInt(oPC,"iSmeltMininum");
|
|
DeleteLocalInt(oPC,"iSmeltPenalty");
|
|
DeleteLocalInt(oPC,"iMaxIngot");
|
|
//GetIngotQty(oItem)
|
|
}
|
|
|
|
|
|
|
|
if (iSmeltChance < 1)
|
|
{
|
|
if (iResmelt==0)
|
|
{
|
|
FloatingTextStringOnCreature("You have no idea how to smelt this ore.",oPC,FALSE);
|
|
}
|
|
else
|
|
{
|
|
FloatingTextStringOnCreature("You have no idea how to resmelt this metal type.",oPC,FALSE);
|
|
}
|
|
CopyItem(oItem,oPC,TRUE);
|
|
DestroyObject(oItem);
|
|
return;
|
|
}
|
|
|
|
string sFlame= "";
|
|
int iHeat = GetLocalInt(oPC,"iHeat");
|
|
float fAngleToVector = 0.4;
|
|
|
|
|
|
switch(iHeat)
|
|
{
|
|
case 1:
|
|
{
|
|
fAngleToVector = 0.5;
|
|
iMaxStack = iMaxStack+3;
|
|
if (iResmelt==0)iSmeltChance = iSmeltChance-250;
|
|
if (iSmeltChance <1) iSmeltChance=1;
|
|
sFlame = "plc_flamesmall";
|
|
break;
|
|
}
|
|
case 2:
|
|
{
|
|
fAngleToVector = 0.6;
|
|
iMaxStack = iMaxStack+1;
|
|
if (iResmelt==0)iSmeltChance = iSmeltChance-100;
|
|
if (iSmeltChance <1) iSmeltChance=1;
|
|
sFlame = "plc_flamesmall";
|
|
break;
|
|
}
|
|
case 4:
|
|
{
|
|
fAngleToVector = 0.2;
|
|
iMaxStack = iMaxStack-2;
|
|
if (iResmelt==0)iSmeltChance = iSmeltChance+100;
|
|
sFlame = "plc_flamelarge";
|
|
break;
|
|
}
|
|
case 5:
|
|
{
|
|
fAngleToVector = 0.3;
|
|
iMaxStack = iMaxStack -3;
|
|
if (iResmelt==0)iSmeltChance = iSmeltChance+250;
|
|
sFlame = "plc_flamelarge";
|
|
}
|
|
default:
|
|
{
|
|
sFlame = "plc_flamemedium";
|
|
break;
|
|
}
|
|
}
|
|
|
|
location lSelf = GetLocation(OBJECT_SELF);
|
|
float fSelf = GetFacing(OBJECT_SELF);
|
|
vector vSelf = GetPosition(OBJECT_SELF);
|
|
object oArea = GetArea(OBJECT_SELF);
|
|
vector vFire;
|
|
int vDirection;
|
|
vFire = vSelf + (AngleToVector(fSelf) * fAngleToVector);
|
|
location lFire = Location(oArea,vFire,fSelf);
|
|
object oFire = CreatePlaceable(sFlame, lFire, 6.0);
|
|
|
|
AssignCommand(oPC,PlaySound("al_cv_firebowl1"));
|
|
AssignCommand(oPC,PlaySound("as_cv_mineshovl1"));
|
|
AssignCommand(oPC,PlaySound("al_na_waterpipe1"));
|
|
AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,1.0,4.0));
|
|
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE,1.0,6.0);
|
|
|
|
SetLocalInt(OBJECT_SELF,"iAmInUse",99);
|
|
DelayCommand(7.0,SetLocalInt(OBJECT_SELF,"iAmInUse",0));
|
|
//ensure at least 1 respawn 10 minutes after used...
|
|
//this is to prevent a broken placeable that is used, with a 'in use' delay
|
|
//which would cancel the respawn
|
|
if (GetLocalInt(OBJECT_SELF,"iAmSetToRespawn")!=99)
|
|
{
|
|
SetLocalInt(OBJECT_SELF,"iAmSetToRespawn",99);
|
|
DelayCommand(600.0,ExecuteScript("_onclose_clear",OBJECT_SELF));
|
|
}
|
|
|
|
if (iResmelt!=0)
|
|
{
|
|
DestroyObject(oItem);
|
|
if (Random(500)<=iSmeltChance)
|
|
{
|
|
iMaxResmelt2 = iMaxResmelt/2;
|
|
if (iMaxResmelt2<1) iMaxResmelt2=1;
|
|
iMaxResmelt3 = iMaxResmelt2/2;
|
|
if (iMaxResmelt3>0)
|
|
{
|
|
for (iMaxResmelt3; iMaxResmelt3>0; iMaxResmelt3--)
|
|
{
|
|
if (Random(1000)<= (iSmeltChance-(iMaxResmelt3*50))) iMaxResmelt2++;
|
|
}
|
|
}
|
|
if (iMaxResmelt2<1) iMaxResmelt2=1;
|
|
sResmeltMessage = "You successfully resmelt the item and recover "+IntToString(iMaxResmelt2)+" ingot";
|
|
if (iMaxResmelt2>1) sResmeltMessage = sResmeltMessage+"s";
|
|
sResmeltMessage=sResmeltMessage+".";
|
|
DelayCommand(5.8,PlaySound("as_cv_minepick2"));
|
|
DelayCommand(5.0,AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING,1.0,1.0)));
|
|
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_HIT_FIRE,FALSE),OBJECT_SELF,2.0));
|
|
DelayCommand(6.8,FloatingTextStringOnCreature(sResmeltMessage,oPC,FALSE));
|
|
DelayCommand(6.9,CreateAnObject(sIngotResRef,oPC,iMaxResmelt2));
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
DelayCommand(5.5,AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_TIRED,1.0,1.0)));
|
|
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_HIT_ACID,FALSE),OBJECT_SELF,2.0));
|
|
DelayCommand(5.8,PlaySound("as_na_steamshrt2"));
|
|
DelayCommand(7.0,FloatingTextStringOnCreature("You burn away the metal into useless slag!",oPC,FALSE));
|
|
return;
|
|
}
|
|
}
|
|
|
|
int iRandom = 0;
|
|
|
|
int iSuccess = 0;
|
|
int iSkillGain = 0;
|
|
|
|
if (Random(1000) <= iSmeltChance)
|
|
{
|
|
iSuccess = 1;
|
|
iStackSize =1;
|
|
iMaxStack--;
|
|
if (iMaxStack >0)
|
|
{
|
|
for (iMaxStack; iMaxStack >0; iMaxStack--)
|
|
{
|
|
if (Random(1000) <= iSmeltChance) iStackSize++;
|
|
}
|
|
}
|
|
DelayCommand(5.0,AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING,1.0,1.0)));
|
|
DelayCommand(6.0,CreateAnObject(sIngotResRef,oPC,iStackSize));
|
|
sSuccess = "You successfully smelt the ore into "+IntToString(iStackSize)+" "+sOre+" Ingot";
|
|
if (iStackSize ==1)
|
|
{
|
|
sSuccess = sSuccess+".";
|
|
}
|
|
else
|
|
{
|
|
sSuccess = sSuccess+"s.";
|
|
}
|
|
DelayCommand(6.0,FloatingTextStringOnCreature(sSuccess,oPC,FALSE));
|
|
DelayCommand(5.8,PlaySound("as_cv_minepick2"));
|
|
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_HIT_FIRE,FALSE),OBJECT_SELF,2.0));
|
|
}
|
|
else
|
|
{
|
|
DelayCommand(5.0,AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_TIRED,1.0,1.0)));
|
|
DelayCommand(6.0,FloatingTextStringOnCreature("You burn away the ore and are left with nothing Useful.",oPC,FALSE));
|
|
DelayCommand(5.8,PlaySound("as_na_steamshrt2"));
|
|
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_HIT_ACID,FALSE),OBJECT_SELF,2.0));
|
|
}
|
|
DelayCommand(6.0,DestroyObject(oItem));
|
|
|
|
if (iSuccess == 1)
|
|
{
|
|
iRandom = Random(1000);
|
|
if (iRandom >= iSmeltSkill)
|
|
{
|
|
if (d10(1)+1 >= iSmeltChance/100) iSkillGain = 1;
|
|
}
|
|
}
|
|
|
|
//Ensure no more than 1 skill gain every 10 seconds to avoid token droppage.
|
|
if (iSkillGain ==1)
|
|
{
|
|
if (GetLocalInt(oPC,"iSkillGain")!= 0)
|
|
{
|
|
iSkillGain = 0;
|
|
}
|
|
else
|
|
{
|
|
SetLocalInt(oPC,"iSkillGain",99);
|
|
DelayCommand(10.0,SetLocalInt(oPC,"iSkillGain",0));
|
|
}
|
|
}
|
|
|
|
|
|
if (iSkillGain ==1)
|
|
{
|
|
string sOldSkill = "";
|
|
string sOldSkill2 = "";
|
|
iSmeltSkill++;
|
|
sOldSkill2 = IntToString(iSmeltSkill);
|
|
sOldSkill = "."+GetStringRight(sOldSkill2,1);
|
|
if (iSmeltSkill > 9)
|
|
{
|
|
sOldSkill = GetStringLeft(sOldSkill2,GetStringLength(sOldSkill2)-1)+sOldSkill;
|
|
}
|
|
else
|
|
{
|
|
sOldSkill = "0"+sOldSkill;
|
|
}
|
|
if (iSmeltSkill <= 1000)
|
|
{
|
|
//DelayCommand(6.0,SetTokenPair(oPC,14,2,iSmeltSkill));
|
|
DelayCommand(6.0,SetPersistentInt(oPC,"iSmeltSkill",iSmeltSkill,0,"UOACraft"));
|
|
DelayCommand(6.0,SendMessageToPC(oPC,"==================================="));
|
|
DelayCommand(6.0,SendMessageToPC(oPC,"Your skill in smelting has gone up!"));
|
|
DelayCommand(6.0,SendMessageToPC(oPC,"Current smelting skill : "+ sOldSkill+"%"));
|
|
DelayCommand(6.0,SendMessageToPC(oPC,"==================================="));
|
|
if (GetLocalInt(GetModule(),"_UOACraft_XP")!=0) DelayCommand(5.9,GiveXPToCreature(oPC,GetLocalInt(GetModule(),"_UOACraft_XP")));
|
|
}
|
|
}
|
|
}
|
|
|
|
void CreateAnObject(string sResource, object oPC, int iStackSize)
|
|
{
|
|
if (iStackSize<=10)
|
|
{
|
|
CreateItemOnObject(sResource,oPC,iStackSize);
|
|
}
|
|
else
|
|
{
|
|
iStackSize=iStackSize-10;
|
|
CreateItemOnObject(sResource,oPC,10);
|
|
DelayCommand(0.5,CreateAnObject(sResource,oPC,iStackSize));
|
|
}
|
|
return;
|
|
}
|
|
|
|
object CreatePlaceable(string sObject, location lPlace, float fDuration)
|
|
{
|
|
object oPlaceable = CreateObject(OBJECT_TYPE_PLACEABLE,sObject,lPlace,FALSE);
|
|
if (fDuration != 0.0)
|
|
DestroyObject(oPlaceable,fDuration);
|
|
return oPlaceable;
|
|
}
|
|
|
|
string GetIngotType(object oItem, object oPC)
|
|
{
|
|
string sIngotResRef;
|
|
int iValid=0;
|
|
int iMaxIngot;
|
|
int iBaseItem = GetBaseItemType(oItem);
|
|
int iSmeltPenalty;
|
|
int iSmeltMinimum;
|
|
string sItemTag = GetTag(oItem);
|
|
string sResRef = GetResRef(oItem);
|
|
string sItemTagCut = GetStringRight(sItemTag,GetStringLength(sItemTag)-5);
|
|
//SendMessageToPC(oPC,sItemTagCut);
|
|
sIngotResRef = "INVALID";
|
|
if (GetStringLeft(sItemTagCut,2)=="N_")
|
|
{
|
|
sItemTagCut = GetStringRight(sItemTagCut,GetStringLength(sItemTagCut)-2);
|
|
//SendMessageToPC(oPC,sItemTagCut);
|
|
}
|
|
else
|
|
{
|
|
if (GetStringLeft(sItemTagCut,3)=="EX_")
|
|
{
|
|
sItemTagCut = GetStringRight(sItemTagCut,GetStringLength(sItemTagCut)-3);
|
|
//SendMessageToPC(oPC,sItemTagCut);
|
|
}
|
|
else
|
|
{
|
|
if (GetStringLeft(sItemTagCut,5)=="POOR_")
|
|
{
|
|
sItemTagCut = GetStringRight(sItemTagCut,GetStringLength(sItemTagCut)-5);
|
|
//SendMessageToPC(oPC,sItemTagCut);
|
|
}
|
|
else
|
|
{
|
|
if (sItemTag=="WEAP_POO_BASTARDSWORD_ADAMANTITE")
|
|
{
|
|
sItemTagCut="BASTARDSWORD_ADAMANTITE";
|
|
iValid=1;
|
|
}
|
|
if (iValid==0)
|
|
{
|
|
sIngotResRef="INVALID2";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/* -- Commented out to try base item types for ID
|
|
if (GetStringLeft(sItemTagCut,7)=="BANDED_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="FULLPLATE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="HALFPLATE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,11)=="SPLINTMAIL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,12)=="BREASTPLATE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="CHAINMAIL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="SCALEMAIL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,11)=="CHAINSHIRT_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,9)=="RINGMAIL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="HORSEHAIR_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="POTHELMET_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,6)=="SPIKE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,5)=="STAG_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="WINGED_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,6)=="LARGE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,6)=="SMALL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,6)=="TOWER_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,8)=="HANDAXE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="BATTLEAXE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,13)=="BASTARDSWORD_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="DAGGER_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,11)=="GREATSWORD_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="LONGSWORD_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,11)=="SHORTSWORD_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="KATANA_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="RAPIER_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,9)=="SCIMITAR_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,9)=="HVYFLAIL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,8)=="LTFLAIL_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,9)=="LTHAMMER_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="WARHAMMER_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,5)=="MACE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="MORNINGSTAR_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,9)=="DIREMACE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,12)=="2BLADESWORD_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,10)=="DOUBLEAXE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,5)=="KAMA_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,6)=="KUKRI_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="SICKLE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,8)=="HALBERD_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="SCYTHE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,6)=="SPEAR_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,5)=="DART_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,9)=="SHURIKEN_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,12)=="THROWINGAXE_") sItemTag="";
|
|
if (GetStringLeft(sItemTagCut,7)=="BULLET_") sItemTag="";
|
|
----- Commented out to try base item types instead of tags for ID*/
|
|
|
|
|
|
//If (GetStringLeft(sItemTagCut,7)=="BANDED_") sItemTag="";
|
|
//if (iBaseItem==BASE_ITEM_ARMOR) iMaxIngot=1;
|
|
//SendMessageToPC(oPC,sItemTagCut);
|
|
if (GetStringLeft(sItemTagCut,7)=="BANDED_") iMaxIngot=14;
|
|
if (GetStringLeft(sItemTagCut,10)=="FULLPLATE_") iMaxIngot=30;
|
|
if (GetStringLeft(sItemTagCut,10)=="HALFPLATE_") iMaxIngot=20;
|
|
if (GetStringLeft(sItemTagCut,11)=="SPLINTMAIL_") iMaxIngot=14;
|
|
if (GetStringLeft(sItemTagCut,12)=="BREASTPLATE_") iMaxIngot=10;
|
|
if (GetStringLeft(sItemTagCut,10)=="CHAINMAIL_") iMaxIngot=10;
|
|
if (GetStringLeft(sItemTagCut,10)=="SCALEMAIL_") iMaxIngot=8;
|
|
if (GetStringLeft(sItemTagCut,11)=="CHAINSHIRT_") iMaxIngot=8;
|
|
if (GetStringLeft(sItemTagCut,9)=="RINGMAIL_") iMaxIngot=6;
|
|
|
|
if (iBaseItem==BASE_ITEM_BASTARDSWORD) iMaxIngot=7;
|
|
if (iBaseItem==BASE_ITEM_BATTLEAXE) iMaxIngot=7;
|
|
//if (iBaseItem==BASE_ITEM_CLUB) iMaxIngot=1;
|
|
if (iBaseItem==BASE_ITEM_DAGGER) iMaxIngot=2;
|
|
if (iBaseItem==BASE_ITEM_DIREMACE) iMaxIngot=15;
|
|
if (iBaseItem==BASE_ITEM_DOUBLEAXE) iMaxIngot=15;
|
|
if (iBaseItem==BASE_ITEM_GREATAXE) iMaxIngot=9;
|
|
if (iBaseItem==BASE_ITEM_GREATSWORD) iMaxIngot=10;
|
|
if (iBaseItem==BASE_ITEM_HALBERD) iMaxIngot=20;
|
|
if (iBaseItem==BASE_ITEM_HANDAXE) iMaxIngot=3;
|
|
if (iBaseItem==BASE_ITEM_HEAVYFLAIL) iMaxIngot=7;
|
|
if (iBaseItem==BASE_ITEM_HELMET) iMaxIngot=4; //All helmets the same req.
|
|
if (iBaseItem==BASE_ITEM_KAMA) iMaxIngot=3;
|
|
if (iBaseItem==BASE_ITEM_KATANA) iMaxIngot=9;
|
|
if (iBaseItem==BASE_ITEM_KUKRI) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_LARGESHIELD) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_LIGHTFLAIL) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_LIGHTHAMMER) iMaxIngot=5;
|
|
if (iBaseItem==BASE_ITEM_LIGHTMACE) iMaxIngot=5;
|
|
if (iBaseItem==BASE_ITEM_LONGSWORD) iMaxIngot=6;
|
|
if (iBaseItem==BASE_ITEM_MORNINGSTAR) iMaxIngot=6;
|
|
if (iBaseItem==BASE_ITEM_RAPIER) iMaxIngot=5;
|
|
if (iBaseItem==BASE_ITEM_SCIMITAR) iMaxIngot=6;
|
|
if (iBaseItem==BASE_ITEM_SCYTHE) iMaxIngot=20;
|
|
if (iBaseItem==BASE_ITEM_SHORTSPEAR) iMaxIngot=3;
|
|
if (iBaseItem==BASE_ITEM_SHORTSWORD) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_SICKLE) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_SMALLSHIELD) iMaxIngot=2;
|
|
if (iBaseItem==BASE_ITEM_TOWERSHIELD) iMaxIngot=10;
|
|
if (iBaseItem==BASE_ITEM_TWOBLADEDSWORD) iMaxIngot=25;
|
|
if (iBaseItem==BASE_ITEM_WARHAMMER) iMaxIngot=9;
|
|
if (iBaseItem==BASE_ITEM_THROWINGAXE) iMaxIngot=6;
|
|
if (iBaseItem==BASE_ITEM_SHURIKEN) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_DART) iMaxIngot=4;
|
|
if (iBaseItem==BASE_ITEM_BULLET) iMaxIngot=10;
|
|
|
|
if (GetStringRight(sItemTag,7)=="_NORMAL")
|
|
{
|
|
iSmeltPenalty=0;
|
|
iSmeltMinimum=250;
|
|
sIngotResRef= "ingot001";
|
|
}
|
|
if (GetStringRight(sItemTag,5)=="_DULL")
|
|
{
|
|
iSmeltPenalty=100;
|
|
iSmeltMinimum=650;
|
|
sIngotResRef= "ingot002";
|
|
}
|
|
if (GetStringRight(sItemTag,7)=="_SHADOW")
|
|
{
|
|
iSmeltPenalty=150;
|
|
iSmeltMinimum=700;
|
|
sIngotResRef= "ingot003";
|
|
}
|
|
if (GetStringRight(sItemTag,7)=="_COPPER")
|
|
{
|
|
iSmeltPenalty=200;
|
|
iSmeltMinimum=750;
|
|
sIngotResRef= "ingot004";
|
|
}
|
|
if (GetStringRight(sItemTag,7)=="_BRONZE")
|
|
{
|
|
iSmeltPenalty=250;
|
|
iSmeltMinimum=800;
|
|
sIngotResRef= "ingot005";
|
|
}
|
|
if (GetStringRight(sItemTag,5)=="_GOLD")
|
|
{
|
|
iSmeltPenalty=300;
|
|
iSmeltMinimum=850;
|
|
sIngotResRef= "ingot006";
|
|
}
|
|
if (GetStringRight(sItemTag,8)=="_AGAPITE")
|
|
{
|
|
iSmeltPenalty=350;
|
|
iSmeltMinimum=900;
|
|
sIngotResRef= "ingot007";
|
|
}
|
|
if (GetStringRight(sItemTag,7)=="_VERITE")
|
|
{
|
|
iSmeltPenalty=400;
|
|
iSmeltMinimum=950;
|
|
sIngotResRef= "ingot008";
|
|
}
|
|
if (GetStringRight(sItemTag,9)=="_VALORITE")
|
|
{
|
|
iSmeltPenalty=450;
|
|
iSmeltMinimum=990;
|
|
sIngotResRef= "ingot009";
|
|
}
|
|
if (GetStringRight(sItemTag,7)=="_SILVER")
|
|
{
|
|
iSmeltPenalty=250;
|
|
iSmeltMinimum=800;
|
|
sIngotResRef= "ingot010";
|
|
}
|
|
if (GetStringRight(sItemTag,9)=="_PLATINUM")
|
|
{
|
|
iSmeltPenalty=350;
|
|
iSmeltMinimum=900;
|
|
sIngotResRef= "ingot013";
|
|
}
|
|
if (GetStringRight(sItemTag,8)=="_MITHRIL")
|
|
{
|
|
iSmeltPenalty=400;
|
|
iSmeltMinimum=950;
|
|
sIngotResRef= "ingot011";
|
|
}
|
|
if (GetStringRight(sItemTag,11)=="_ADAMANTITE")
|
|
{
|
|
if ( (sResRef == "wblhl037") || (sResRef == "wblhl038") || (sResRef == "wblhl039") ) //platinum hammer
|
|
{
|
|
iSmeltPenalty=450;
|
|
iSmeltMinimum=990;
|
|
sIngotResRef= "ingot013";
|
|
}
|
|
else
|
|
{
|
|
iSmeltPenalty=450;
|
|
iSmeltMinimum=990;
|
|
sIngotResRef= "ingot012";
|
|
}
|
|
}
|
|
|
|
//Normal quality iron items have nwn default tags
|
|
//SendMessageToPC(oPC,"Checkpoint 1: "+sIngotResRef);
|
|
if (sIngotResRef=="INVALID2")
|
|
{
|
|
if (sItemTag=="NW_AARCL011")
|
|
{
|
|
sIngotResRef="ingot001"; //banded mail
|
|
iMaxIngot=14;
|
|
}
|
|
if (sItemTag=="NW_AARCL007")
|
|
{
|
|
sIngotResRef="ingot001"; //Full Plate
|
|
iMaxIngot=30;
|
|
}
|
|
if (sItemTag=="NW_AARCL006")
|
|
{
|
|
sIngotResRef="ingot001"; //Half Plate
|
|
iMaxIngot=20;
|
|
}
|
|
if (sItemTag=="NW_AARCL005")
|
|
{
|
|
sIngotResRef="ingot001"; //Splint Mail
|
|
iMaxIngot=14;
|
|
}
|
|
if (sItemTag=="NW_AARCL010")
|
|
{
|
|
sIngotResRef="ingot001"; //Breast Plate
|
|
iMaxIngot=10;
|
|
}
|
|
if (sItemTag=="NW_AARCL004")
|
|
{
|
|
sIngotResRef="ingot001"; //Chainmail
|
|
iMaxIngot=10;
|
|
}
|
|
if (sItemTag=="NW_AARCL003")
|
|
{
|
|
sIngotResRef="ingot001"; //Scale Mail
|
|
iMaxIngot=8;
|
|
}
|
|
if (sItemTag=="NW_AARCL012")
|
|
{
|
|
sIngotResRef="ingot001"; //Chain Shirt
|
|
iMaxIngot=8;
|
|
}
|
|
|
|
if (sItemTag=="NW_WAMBU001") sIngotResRef="ingot001"; //bullet
|
|
if (sItemTag=="NW_ARHE004") sIngotResRef="ingot001"; //Horse Hair Helmet
|
|
if (sItemTag=="NW_ARHE001") sIngotResRef="ingot001"; //Pot Helmet
|
|
if (sItemTag=="NW_ARHE002") sIngotResRef="ingot001"; //Spike Helmet
|
|
if (sItemTag=="NW_ARHE005") sIngotResRef="ingot001"; //Stag Helmet
|
|
if (sItemTag=="NW_ARHE003") sIngotResRef="ingot001"; //Winged Helmet
|
|
if (sItemTag=="NW_ASHLW001") sIngotResRef="ingot001"; //Large Shield
|
|
if (sItemTag=="NW_ASHSW001") sIngotResRef="ingot001"; //Small Shield
|
|
if (sItemTag=="NW_ASHTO001") sIngotResRef="ingot001"; //Tower Shield
|
|
if (sItemTag=="NW_WAXHN001") sIngotResRef="ingot001"; //Handaxe
|
|
if (sItemTag=="NW_WAXBT001") sIngotResRef="ingot001"; //Battle Axe
|
|
if (sItemTag=="NW_WSWBS001") sIngotResRef="ingot001"; //Bastard Sword
|
|
if (sItemTag=="NW_WSWDG001") sIngotResRef="ingot001"; //Dagger
|
|
if (sItemTag=="NW_WSWGS001") sIngotResRef="ingot001"; //Greatsword
|
|
if (sItemTag=="NW_WSWLS001") sIngotResRef="ingot001"; //Longsword
|
|
if (sItemTag=="NW_WSWSS001") sIngotResRef="ingot001"; //Shortsword
|
|
if (sItemTag=="NW_WSWKA001") sIngotResRef="ingot001"; //Katana
|
|
if (sItemTag=="NW_WSWRP001") sIngotResRef="ingot001"; //Rapier
|
|
if (sItemTag=="NW_WSWSC001") sIngotResRef="ingot001"; //Scimitar
|
|
if (sItemTag=="NW_WBLFH001") sIngotResRef="ingot001"; //Hvy Flail
|
|
if (sItemTag=="NW_WBLFL001") sIngotResRef="ingot001"; //Lt Flail
|
|
if (sItemTag=="NW_WBLHL001") sIngotResRef="ingot001"; //Lt Hammer
|
|
if (sItemTag=="NW_WBLHW001") sIngotResRef="ingot001"; //Warhammer
|
|
if (sItemTag=="NW_WBLML001") sIngotResRef="ingot001"; //Mace
|
|
if (sItemTag=="NW_WBLMS001") sIngotResRef="ingot001"; //Morningstar
|
|
if (sItemTag=="NW_WDBMA001") sIngotResRef="ingot001"; //Dire Mace
|
|
if (sItemTag=="NW_WDBSW001") sIngotResRef="ingot001"; //Two-Bladed Sword
|
|
if (sItemTag=="NW_WDBAX001") sIngotResRef="ingot001"; //Double Axe
|
|
if (sItemTag=="NW_WSPKA001") sIngotResRef="ingot001"; //Kama
|
|
if (sItemTag=="NW_WSPKU001") sIngotResRef="ingot001"; //Kukri
|
|
if (sItemTag=="NW_WSPSC001") sIngotResRef="ingot001"; //Sickle
|
|
if (sItemTag=="NW_WPLHB001") sIngotResRef="ingot001"; //Halberd
|
|
if (sItemTag=="NW_WPLSC001") sIngotResRef="ingot001"; //Scythe
|
|
if (sItemTag=="NW_WPLSS001") sIngotResRef="ingot001"; //Spear
|
|
if (sItemTag=="NW_WTHDT001") sIngotResRef="ingot001"; //Dart
|
|
if (sItemTag=="NW_WTHSH001") sIngotResRef="ingot001"; //Shuriken
|
|
if (sItemTag=="NW_WTHAX001") sIngotResRef="ingot001"; //Throwing Axe
|
|
//SendMessageToPC(oPC,"Checkpoint 2: "+sIngotResRef);
|
|
//SendMessageToPC(oPC,"Ingots: "+IntToString(iMaxIngot));
|
|
//SendMessageToPC(oPC,"TAG: "+sItemTag);
|
|
//if (sItemTag=="") sIngotResRef="ingot001"; //
|
|
if (sIngotResRef=="INVALID2")
|
|
{
|
|
return "INVALID";
|
|
}
|
|
else
|
|
{
|
|
iSmeltPenalty=0;
|
|
iSmeltMinimum=250;
|
|
}
|
|
}
|
|
if (iMaxIngot==0) return "INVALID";
|
|
|
|
//filter out non-smithy items that end in _NORMAL
|
|
if (sIngotResRef=="ingot001")
|
|
{
|
|
iValid = 0;
|
|
string sTagLeft = GetStringLeft(sItemTag,5);
|
|
if (sTagLeft=="WEAP_") iValid=1;
|
|
if (sTagLeft=="ARMR_") iValid=1;
|
|
if (sTagLeft=="SHLD_") iValid=1;
|
|
if (sTagLeft=="HELM_") iValid=1;
|
|
if (GetStringLeft(sItemTag,3)=="NW_") iValid=1;
|
|
if (sTagLeft=="ITEM_")
|
|
{
|
|
if (GetStringLeft(sItemTag,16)=="ITEM_N_ARROWHEAD") iValid=1;
|
|
if (GetStringLeft(sItemTag,17)=="ITEM_EX_ARROWHEAD") iValid=1;
|
|
if (GetStringLeft(sItemTag,19)=="ITEM_POOR_ARROWHEAD") iValid=1;
|
|
|
|
if (GetStringLeft(sItemTag,14)=="ITEM_N_BOLTTIP") iValid=1;
|
|
if (GetStringLeft(sItemTag,15)=="ITEM_EX_BOLTTIP") iValid=1;
|
|
if (GetStringLeft(sItemTag,17)=="ITEM_POOR_BOLTTIP") iValid=1;
|
|
|
|
if (GetStringLeft(sItemTag,16)=="ITEM_N_METALSTUD") iValid=1;
|
|
if (GetStringLeft(sItemTag,17)=="ITEM_EX_METALSTUD") iValid=1;
|
|
if (GetStringLeft(sItemTag,19)=="ITEM_POOR_METALSTUD") iValid=1;
|
|
}
|
|
if (iValid==0) sIngotResRef="INVALID";
|
|
//SendMessageToPC(oPC,"Checkpoint 3: "+sIngotResRef);
|
|
}
|
|
|
|
|
|
SetLocalInt(oPC,"iMaxIngot",iMaxIngot);
|
|
SetLocalInt(oPC,"iSmeltMinimum",iSmeltMinimum);
|
|
SetLocalInt(oPC,"iSmeltPenalty",iSmeltPenalty);
|
|
|
|
return sIngotResRef;
|
|
}
|