This is what I am starting with, I was initially going to have it just 5 stages outright and hand out items according to player level, accomplishements, etc. Then I figured I would pose the question of how to make it a growing "skill" which would gain power over use and experience and eventually end in a permanent weapon enhancement. Thinking about it more today I would also want random chances of failure in lower "levels". Since this is conversation driven off the item itself, on failure it would send a message and decrement the int value so the player in essence is leveling their "skill" of sharpening.
#include "x2_inc_itemprop"
void main()
{
object oItem;
itemproperty ipAdd;
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
object oDatabase = GetItemPossessedBy(oPC,"Database");
// If the local int on Database item is Equal to 100.
if ( GetLocalInt(oDatabase, "sharpening_skill") == 100 )
{
// Alter the weapon equipped by the PC.
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
SetPlotFlag(oItem, TRUE);
SetStolenFlag(oItem, TRUE);
ipAdd = ItemPropertyKeen();
IPSafeAddItemProperty(oItem, ipAdd, 600.0);
}
// Else, if the local int on Database item is Equal to 200.
else if ( GetLocalInt(oDatabase, "sharpening_skill") == 200 )
{
// Alter the weapon equipped by the PC.
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
SetPlotFlag(oItem, TRUE);
SetStolenFlag(oItem, TRUE);
ipAdd = ItemPropertyKeen();
IPSafeAddItemProperty(oItem, ipAdd, 1200.0);
}
// Else, if the local int on Database item is Equal to 300.
else if ( GetLocalInt(oDatabase, "sharpening_skill") == 300 )
{
// Alter the weapon equipped by the PC.
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
SetPlotFlag(oItem, TRUE);
SetStolenFlag(oItem, TRUE);
ipAdd = ItemPropertyKeen();
IPSafeAddItemProperty(oItem, ipAdd, 1800.0);
}
// Else, if the local int on Database item is Equal to 400.
else if ( GetLocalInt(oDatabase, "sharpening_skill") == 400 )
{
// Alter the weapon equipped by the PC.
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
SetPlotFlag(oItem, TRUE);
SetStolenFlag(oItem, TRUE);
ipAdd = ItemPropertyKeen();
IPSafeAddItemProperty(oItem, ipAdd, 2400.0);
}
// Else, if the local int on Database item is greater than 500.
else if ( GetLocalInt(oDatabase, "sharpening_skill") > 500 )
{
// Alter the weapon equipped by the PC.
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
SetPlotFlag(oItem, TRUE);
SetStolenFlag(oItem, TRUE);
ipAdd = ItemPropertyKeen();
IPSafeAddItemProperty(oItem, ipAdd);
}
else
{
}
}