Aller au contenu

Photo

is there a way to find + values of weapons?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
lordofworms

lordofworms
  • Members
  • 252 messages
I am writing a homebrew weapon damage system based on variables placed on creatures so that some creatures can damage weapons with acid, or flame, or just trauma due to high AC hides (admantium golems,etc) simply by setting a variable called 'DAMAGE_ACID,DAMAGE_FIRE,etc' to '1' on creature with resistance

its quick, efficient and handy for me, the only thing missing is I would like to modify it a little more and make percentages based on the + value of the weapon, so if its say a +5 weapon it would have less of a chance to break then a +2 or +1 weapon.
I can totally write the code if I knew how to find that value on an item

is there a function? or way to determine roughly what attack/dmage bonus is of an item?

I did a search on old and new forum but I guess I dont know how to 'word' it so I end up with no results found.


Thanks!!!!

#2
lordofworms

lordofworms
  • Members
  • 252 messages
Ok, no sooner do I post this that I try a google search and voila!
thanks to our good friend mr. lightfoot.


//////////////////////////////////
//code by Lightfoot///////
/////////////////////////////////

int GetItemAttackBonus(object oItem)
{
itemproperty ipSearch=GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(ipSearch)== TRUE)
{
if(GetItemPropertyType(ipSearch)==ITEM_PROPERTY_ATTACK_BONUS)
{
return GetItemPropertyCostTableValue(ipSearch);
}
ipSearch=GetNextItemProperty(oItem);
}
return 0;
}

#3
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
IPGetWeaponEnhancementBonus

#4
lordofworms

lordofworms
  • Members
  • 252 messages
once again...you have made life easier for me.