I found a error, in the lexicon you gave a example of code to find if bludge wepon but used invalid function.
EXAMPLE:
// Return TRUE if weapon does bludgeoning damage
// Uses Get2DAString
int GetDoesBludgeoningDamage(object oWeapon)
{
int nBaseType = GetBaseType(oWeapon);
return (StringToInt(Get2DAString("baseitems","WeaponType",nBaseType) == 2);
// 2 = bludgeoning
}
I made the function staded so it will return a valid 2da int for pierce,bludge,slash,slash/pirce,bludge/pirce etc
here is full example of script:
// lexi_2da_t1
//#include "x2_inc_itemprop"
// Return TRUE if weapon does bludgeoning damage
// Uses Get2DAString
//void GetBaseType(object oWeapon);
int GetBaseType(object oWeapon);
//void GetBaseType(object oWeapon);
int GetBaseType(object oWeapon)
{
int nBaseType=StringToInt(Get2DAString("baseitems","WeaponType",nBaseType));
return nBaseType;
/*
1=pierceing
2=bludgeoning
3=slashing
4=slashing/pierceing
5=bludgeoning/pierceing
*/
}
//----------------------------------------------
int GetDoesBludgeoningDamage(object oWeapon);
int GetDoesBludgeoningDamage(object oWeapon)
{
object oWeapon;
int nBaseType = GetBaseType(oWeapon);
if ( StringToInt(Get2DAString("baseitems","WeaponType",nBaseType)) == 2)
{
return TRUE;
}
return FALSE;
//return (StringToInt(Get2DAString("baseitems","WeaponType",nBaseType) == 2);
// 2 = bludgeoning
}
//
//void main()
//{
//}
the // uncomented lines were just used for compiling and the include uncomented above was just put there for ease of possibly needing to use a function from there but i didn't have to
Hey Spirited Lass I thought you can fix that in the update lexicon version for give my messy scripting perhaps you can whip me into shape...
'>
God bless Lexi con team
Thankyou for all your work
Modifié par Greyfort, 31 janvier 2011 - 07:45 .