And now is the other problem, how to connect it with database, if your skill is > 10 item level difficulty is [Good], if >20 [Very Good] etc.?
I tried this way, but doesn't work corectly:
void ForgeItem(string sItemToCreate, object oTarget)
{
CreateItemOnObject(sItemToCreate, oTarget);
object oWeapon = GetObjectByTag(sItemToCreate);
int nQuality;
int nPWS = GetPlayerWeaponsmith(oTarget);
string sWeaponName = GetName(oWeapon);
switch(nQuality)
{
case 0:
{
if(nPWS >= 20)
{
sWeaponName = "[Very Good]"+sWeaponName;
SetName(oWeapon, sWeaponName);
IPSetWeaponEnhancementBonus(oWeapon, 2);
}
}
break;
case 1:
{
if(nPWS >= 10)
{
sWeaponName = "[Good]"+sWeaponName;
SetName(oWeapon, sWeaponName);
IPSetWeaponEnhancementBonus(oWeapon, 1);
}
}
break;
}
SetPlayerWeaponsmith(oTarget);
}
Modifié par Werkaldegim, 17 mars 2012 - 02:12 .