Player Resource Consortium

 

Author Topic: Issig's flintlocks  (Read 4683 times)

0 Members and 1 Guest are viewing this topic.

August 31, 2011, 03:05:19 AM

Hi, got another script question!  :)

I want to use Issig's flintlocks (found here: http://nwvault.ign.com/View.php?view=Hakpaks.Detail&id=7555) in my PRC-enabled module, but as-is, the PRC custom base classes won't be able to use them.
Here's the include script for the guns:

Code: [Select]
/* wr_musket

      -= WulfRider's Dual-ammo Musket =-
            for Neverwinter Nights

                      by

                Peter Hanratty

         Developed under version 1.28


   Email :         wolfrider@yellowsnow.com
   MSN Messenger : dire_wolf@hotmail.com
   NWN Community : WulfRider

   -----------------------------------------

   Feel free to use, modify, and otherwise
   play with this script to your heart's
   content provided that this notice stays
   fully intact and at the top.

   -----------------------------------------

   Thanks go to :-

   - The creators of the NWN Lexicon - an
     invaluable resource for any script
     writer

   - Wizards of the Coast for the player
     manual on which most of this is based

   - And of course the Creators of
     Neverwinter Nights without which none
     of this would be.

==============================================
v1.0

It's at times like these that you get to
discover all the things the scripter CANT do.
I have had to improvise many haphazard
solutions to coding problems but I'm happy
with the end result.  Shooting sprees are
great for stress relief ;)

Known Issues:
              - Non-creature objects
                (placeables, doors etc) show
                0 damage when hit.  No known
                cause or solution at this
                time.

              - Blood will appear red for all
                creatures regardless of race
                or species.  This is due to
                the sheer ammount of different
                creature types and having no
                quick way to determine the
                correct blood colour for every
                single one.  Anyone wanting to
                take the time is more than
                welcome ;)

==============================================
Updated under version 1.62 by Daemon Blackrazor
==============================================
v2.0   Daemon Blackrazor

What I have done here is slighty modify Wulfriders scripts added flintlock items
and 3 new effects with new sound effects. I will be updating further as time
allows.
But this is working fine for now. Future updates will be;

1. Including magical properties for flintlocks.

2. Possibility of adding a spell effect for the flintlock firing as opposed to
a straight VFX; this will allow the muzzle flash to appear at the hand nodes.

3. Addition of a custom TLK file or tlk file entries for ease of building

4. Random Check for accidental double firing of both muzzles (this was a common
problem with double barrel flintlocks).

5. The next update will be HotU/SoU.

Known Issues:
              None known at this time, other than the above notes.

==============================================
7-15-2008 Axe Murderer
Updated for compatibility with NWN v1.69

*/


// Dice Constants for ease of use

int DIE_D2 =   0;
int DIE_D3 =   1;
int DIE_D4 =   2;
int DIE_D6 =   3;
int DIE_D8 =   4;
int DIE_D10 =  5;
int DIE_D12 =  6;
int DIE_D20 =  7;
int DIE_D100 = 8;

// -------------------------------------------

// Musket Constants

int   MUSKET_DAMAGE_NUM_DICE = 6;
int   MUSKET_DAMAGE_DIE_TYPE = DIE_D10;
int   MUSKET_DAMAGE_BONUS = 5;
int   MUSKET_BACKFIRE_DAMAGE_NUM_DICE = 4;
int   MUSKET_BACKFIRE_DAMAGE_DIE_TYPE = DIE_D6;
int   MUSKET_BACKFIRE_DAMAGE_BONUS = 0;
int   MUSKET_CRITICAL_RANGE = 20;
int   MUSKET_CRITICAL_MULTIPLIER = 2;
int   MUSKET_ATTACK_BONUS = -4;
float MUSKET_RANGE_INCREMENT_FEET = 10.0;
int   MUSKET_PERCENT_CHANCE_KNOCKDOWN = 25;
int   MUSKET_PERCENT_CHANCE_BACKFIRE = 10;

// -------------------------------------------

// Musket Effects
// Effects and Other
effect MUSKET_FIRE_EFFECT = EffectVisualEffect (673);
effect MUSKET_BACKFIRE_EFFECT = EffectVisualEffect (674);
effect MUSKET_MISS_EFFECT = EffectVisualEffect (675);

//effect BOOMPOWDER_FIRE_EFFECT = EffectVisualEffect (VFX_IMP_PULSE_FIRE);
//effect BOOMPOWDER_BACKFIRE_EFFECT = EffectVisualEffect (VFX_FNF_FIREBALL);
//effect DEMONPOWDER_FIRE_EFFECT1 = EffectVisualEffect (VFX_FNF_GAS_EXPLOSION_EVIL);
//effect DEMONPOWDER_FIRE_EFFECT2 = EffectVisualEffect (VFX_FNF_HOWL_MIND);
//effect DEMONPOWDER_BACKFIRE_EFFECT1 = EffectVisualEffect (VFX_IMP_HEAD_EVIL);
//effect DEMONPOWDER_BACKFIRE_EFFECT2 = EffectVisualEffect (VFX_FNF_HOWL_MIND);
//effect CURRENT_FIRE_EFFECT = MUSKET_FIRE_EFFECT;
//effect CURRENT_BACKFIRE_EFFECT = MUSKET_BACKFIRE_EFFECT;


// Function Prototypes

int GetMyBaseAttackBonus (object oCreature, int iClassType);
//  Gets a character's base attack bonus (1st
//  attack only)according to D&D 3rd edition
//  rules.  Total multiple calls to this
//  function for multiclass characters.


int GetHasPowderAndBullets (object oCreature, object oMusket);
//  Check for powder and bullets

int GetHasBullets (object oCreature);
//  Called by the above function

int RollRangedAttack (object oCreature, object oTarget, int iCriticalRange, int iAttackBonus, float fRangeIncrement);
//  Roll a ranged attack score according to
//  D&D 3rd edition rules

int RollDamage (object oCreature, int iNumDice, int iDieType, int iBonus, int bCrit = FALSE, int iCriticalMultiplier = 2);
//  Roll damage according to D&D 3rd edition
//  rules

void ApplyDamage (object oCreature, object oTarget, int iDamage, int iDamageType = DAMAGE_TYPE_MAGICAL, float fDelay = 0.0, int eExtraEffect = EFFECT_TYPE_INVALIDEFFECT);
//  Applies damage to a creature with optional
//  delay and extra visual effect

void BroadcastMsg (object oSender, string sMsg);
//  Sends a message to all PC's and DM's

void BroadcastFloatMsg (string sMsg);
//  Displays a floaty message for all PC's

void FireMusket (object oMusket, object oCreature, object oTarget, location lTarget);
//  Main musket function

// ===========================================

// Code
void FireMusket (object oMusket, object oCreature, object oTarget, location lTarget)
{
    int iHit = 0;
    int iDamage = 0;
    effect eSparks = EffectVisualEffect (675, TRUE);
    if (!GetHasPowderAndBullets (oCreature, oMusket))
    {
        return;
    }

    if (oTarget == oCreature)
    {
        AssignCommand(oCreature, PlaySound("flintlock_fire"));
        FloatingTextStringOnCreature ("*Suicide!*", oCreature, FALSE);
        effect eBrains = EffectVisualEffect (VFX_COM_CHUNK_RED_SMALL);
        eBrains = EffectLinkEffects (EffectDeath (TRUE, FALSE), eBrains);
        eBrains = EffectLinkEffects (EffectVisualEffect(673), eBrains);
        AssignCommand (oCreature, ActionDoCommand (ApplyEffectToObject (DURATION_TYPE_INSTANT, eBrains, oCreature)));

        return;
    }
    ApplyEffectToObject (DURATION_TYPE_INSTANT, EffectVisualEffect(673), oCreature);
    if (d100 () > (100 - MUSKET_PERCENT_CHANCE_BACKFIRE))
    {
        DelayCommand(0.2, AssignCommand(oCreature, PlaySound("flintlock_backf")));
        FloatingTextStringOnCreature ("*Backfire!*", oCreature);
        iDamage = RollDamage (oCreature, MUSKET_BACKFIRE_DAMAGE_NUM_DICE, MUSKET_BACKFIRE_DAMAGE_DIE_TYPE, MUSKET_BACKFIRE_DAMAGE_BONUS);
        ApplyDamage (oCreature, oCreature, iDamage, DAMAGE_TYPE_FIRE, 0.0, 674);

        return;
    }
    if (oTarget == OBJECT_INVALID)
    {
     DelayCommand(0.2, ApplyEffectAtLocation (DURATION_TYPE_INSTANT, eSparks, lTarget));
}
    else
    {
        iHit = RollRangedAttack (oCreature, oTarget, MUSKET_CRITICAL_RANGE, MUSKET_ATTACK_BONUS, MUSKET_RANGE_INCREMENT_FEET);
        if (iHit > 0)
        {
            iDamage = RollDamage (oCreature, MUSKET_DAMAGE_NUM_DICE, MUSKET_DAMAGE_DIE_TYPE, MUSKET_DAMAGE_BONUS, (iHit == 2), MUSKET_CRITICAL_MULTIPLIER);

            effect eDamage = EffectDamage (iDamage, DAMAGE_TYPE_PIERCING);
            if (GetObjectType (oTarget) == OBJECT_TYPE_CREATURE)
            {
                effect eBlood = EffectVisualEffect (VFX_COM_BLOOD_LRG_RED);
                eBlood = EffectLinkEffects (EffectVisualEffect (VFX_COM_BLOOD_LRG_RED), eBlood);
                eBlood = EffectLinkEffects (EffectVisualEffect (VFX_COM_BLOOD_LRG_RED), eBlood);
                ApplyEffectAtLocation (DURATION_TYPE_INSTANT, eBlood, GetLocation (oTarget));
                if (d100 () > (100 - MUSKET_PERCENT_CHANCE_KNOCKDOWN))
                {
                    ApplyEffectToObject (DURATION_TYPE_TEMPORARY, EffectKnockdown (), oTarget, IntToFloat (d4 () + 3));
                }
                ApplyDamage (oCreature, oTarget, iDamage, DAMAGE_TYPE_PIERCING, 0.2);
            }
            else
            {
                ApplyDamage (oCreature, oTarget, iDamage, DAMAGE_TYPE_PIERCING, 0.2, VFX_COM_BLOOD_SPARK_LARGE);
            }
        }

    }
}

// -------------------------------------------

int RollRangedAttack (object oCreature, object oTarget, int iCriticalRange, int iAttackBonus, float fRangeIncrement)
{
    int iResult = 0;
    int iAttackMod = 0;
    int iRoll = 0;
    int iReroll = 0;
    int iCrit = FALSE;
    int iDamage = 0;
    int iTargetAC = 0;
    int iCount = 0;
    float fRangeMeters = 0.0;
    float fDistance = 0.0;
    int iNumIncrements = 0;
    int iRangePenalty = 0;
    string sHitMsg = "";

    switch (GetCreatureSize (oCreature))
    {
        case CREATURE_SIZE_HUGE: iAttackMod = -2; break;
        case CREATURE_SIZE_LARGE: iAttackMod = -1; break;
        case CREATURE_SIZE_MEDIUM: iAttackMod = 0; break;
        case CREATURE_SIZE_INVALID: iAttackMod = 0; break;
        case CREATURE_SIZE_SMALL: iAttackMod = 1; break;
        case CREATURE_SIZE_TINY: iAttackMod = 2; break;
    }

    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_FIGHTER);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_BARBARIAN);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_PALADIN);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_RANGER);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_CLERIC);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_DRUID);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_ROGUE);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_BARD);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_MONK);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_WIZARD);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_SORCERER);

    iAttackMod += GetAbilityModifier (ABILITY_DEXTERITY, oCreature);

    iAttackMod += iAttackBonus;

    fRangeMeters = FeetToMeters (fRangeIncrement);
    fDistance = GetDistanceBetween (oCreature, oTarget);
    iNumIncrements = FloatToInt ((fDistance / fRangeMeters) - 0.5);
    iRangePenalty = -2 * iNumIncrements;

    iAttackMod += iRangePenalty;

    iTargetAC = GetAC (oTarget);
    iRoll = d20 ();
    iCrit = (iRoll >= iCriticalRange);
    iRoll += iAttackMod;
    if (iCrit)
    {
        iReroll = d20 () + iAttackMod;
        sHitMsg = IntToString (iRoll) + " / " + IntToString (iReroll);
        if (iReroll >= iTargetAC)
        {
            sHitMsg += " (Critical Hit)";
            FloatingTextStringOnCreature ("*Critical Hit!*", oCreature, FALSE);
            iResult = 2;
        }
        else
        {
            effect eSparks = EffectVisualEffect(675, TRUE);
            sHitMsg += " (Critical Miss)";
            iResult = 1;
            DelayCommand(0.2, ApplyEffectToObject (DURATION_TYPE_INSTANT, eSparks, oTarget));
            DelayCommand(0.2, AssignCommand(oCreature, PlaySound("flintlock_miss")));
        }
     }
    else
    {
        sHitMsg = IntToString (iRoll);
        if (iRoll >= iTargetAC)
        {
            sHitMsg += " (Hit)";
            iResult = 1;
        }
        else
        {
            effect eSparks = EffectVisualEffect(675, TRUE);
            sHitMsg += " (Miss)";
            DelayCommand(0.2, ApplyEffectToObject (DURATION_TYPE_INSTANT, eSparks, oTarget));
            DelayCommand(0.2, AssignCommand(oCreature, PlaySound("flintlock_miss")));
    }
    }

    BroadcastMsg (oCreature, "Attack Roll vs AC " + IntToString (iTargetAC) + ": " + sHitMsg);

    return iResult;
}


// -------------------------------------------

int GetMyBaseAttackBonus (object oCreature, int iClassType)
{
        string sCDRBM = "000001020303040506060708090910111212131415";
        string sWIZSC = "000001010202030304040505060607070808090910";
        int iBaseAttackBonus = 0;

        switch (iClassType)
        {
            case CLASS_TYPE_FIGHTER:
                iBaseAttackBonus = GetLevelByClass (iClassType, oCreature);
                break;
            case CLASS_TYPE_BARBARIAN:
                iBaseAttackBonus = GetLevelByClass (iClassType, oCreature);
                break;
            case CLASS_TYPE_PALADIN:
                iBaseAttackBonus = GetLevelByClass (iClassType, oCreature);
                break;
            case CLASS_TYPE_RANGER:
                iBaseAttackBonus = GetLevelByClass (iClassType, oCreature);
                break;
            case CLASS_TYPE_CLERIC:
                iBaseAttackBonus = StringToInt (GetSubString (sCDRBM, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
            case CLASS_TYPE_DRUID:
                iBaseAttackBonus = StringToInt (GetSubString (sCDRBM, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
            case CLASS_TYPE_ROGUE:
                iBaseAttackBonus = StringToInt (GetSubString (sCDRBM, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
            case CLASS_TYPE_BARD:
                iBaseAttackBonus = StringToInt (GetSubString (sCDRBM, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
            case CLASS_TYPE_MONK:
                iBaseAttackBonus = StringToInt (GetSubString (sCDRBM, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
            case CLASS_TYPE_WIZARD:
                iBaseAttackBonus = StringToInt (GetSubString (sWIZSC, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
            case CLASS_TYPE_SORCERER:
                iBaseAttackBonus = StringToInt (GetSubString (sWIZSC, (GetLevelByClass (iClassType, oCreature) * 2), 2));
                break;
        }

        return iBaseAttackBonus;
}

// -------------------------------------------

int RollDamage (object oCreature, int iNumDice, int iDieType, int iBonus, int bCrit, int iCriticalMultiplier)
{
    int iRoll = 0;
    int iTotal = 0;
    int iDiceCount = 0;
    int iNumRolls = 1;
    int iRollCount = 0;
    string sRollStr = "";

    if (bCrit)
    {
        iNumRolls = iCriticalMultiplier;
    }

    for (iRollCount = 1; iRollCount <= iNumRolls; iRollCount++)
    {
        if (iRollCount > 1)
        {
            sRollStr += " / ";
        }
        iRoll = 0;
        for (iDiceCount = 1; iDiceCount <= iNumDice; iDiceCount++)
        {
            if (iDieType == DIE_D2)
            {
                iRoll += d2 ();
            }
            else
            if (iDieType == DIE_D3)
            {
                iRoll += d3 ();
            }
            else
            if (iDieType == DIE_D4)
            {
                iRoll += d4 ();
            }
            else
            if (iDieType == DIE_D6)
            {
                iRoll += d6 ();
            }
            else
            if (iDieType == DIE_D8)
            {
                iRoll += d8 ();
            }
            else
            if (iDieType == DIE_D10)
            {
                iRoll += d10 ();
            }
            else
            if (iDieType == DIE_D12)
            {
                iRoll += d12 ();
            }
            else
            if (iDieType == DIE_D20)
            {
                iRoll += d20 ();
            }
            else
            if (iDieType == DIE_D100)
            {
                iRoll += d100 ();
            }
        }
        iTotal += iRoll;
        sRollStr += IntToString (iRoll);
    }
    iTotal += iBonus;
    sRollStr += " + " + IntToString (iBonus);
    if (iTotal < 1)
    {
        iTotal = 1;
    }

    BroadcastMsg (oCreature, "Damage Roll: " + sRollStr + " = " + IntToString (iTotal));

    return iTotal;
}

// -------------------------------------------

void ApplyDamage (object oCreature, object oTarget, int iDamage, int iDamageType, float fDelay, int eExtraEffect)
{
    effect eDamage = EffectDamage (iDamage, iDamageType);
    if (eExtraEffect != EFFECT_TYPE_INVALIDEFFECT)
    {
        eDamage = EffectLinkEffects (EffectVisualEffect (eExtraEffect), eDamage);
    }
    if (GetObjectType (oTarget) == OBJECT_TYPE_CREATURE)
    {
        switch (d4 ())
        {
            case 1: PlayVoiceChat (VOICE_CHAT_PAIN1, oTarget); break;
            case 2: PlayVoiceChat (VOICE_CHAT_PAIN2, oTarget); break;
            case 3: PlayVoiceChat (VOICE_CHAT_PAIN3, oTarget); break;
        }
    }
    DelayCommand (fDelay, ApplyEffectToObject (DURATION_TYPE_INSTANT, eDamage, oTarget));
    DelayCommand (fDelay + 0.1, ExecuteScript ("wr_m_showdam", oTarget));
    if (oCreature != oTarget)
    {
        DelayCommand (fDelay + 0.2, FloatingTextStringOnCreature (IntToString (GetLocalInt (GetModule (), "MUSKET_LAST_DAMAGE")), oCreature, FALSE));
    }
    event eAttacked = EventSpellCastAt (oCreature, SPELL_MAGIC_MISSILE);
    SignalEvent (oTarget, eAttacked);
}

// -------------------------------------------

int GetHasPowderAndBullets (object oCreature, object oMusket)
{
    object oPowder = OBJECT_INVALID;
    int iPowderLevel = 0;
    int iResult = FALSE;

    oPowder = GetLocalObject (oMusket, "oCurrentPouch");
    if (oPowder == OBJECT_INVALID)
    {
        iPowderLevel = 1;
        while (oPowder == OBJECT_INVALID && iPowderLevel <= 10)
        {
            oPowder = GetItemPossessedBy (oCreature, "GunpowderPouch_" + IntToString (iPowderLevel));
            iPowderLevel++;
        }
    }
    if (oPowder == OBJECT_INVALID)
    {
        FloatingTextStringOnCreature ("*No Gunpowder!*", oCreature);
        AssignCommand (oCreature, PlaySound ("flintlock_un"));
    }
    else
    {
        if (GetHasBullets (oCreature))
        {
            iPowderLevel = StringToInt (GetStringRight (GetTag (oPowder), 1));
            if (iPowderLevel == 0)
            {
                iPowderLevel = 10;
            }
            DestroyObject (oPowder);
            iPowderLevel--;
            if (iPowderLevel > 0)
            {
                oPowder = CreateItemOnObject ("gunpowderpouch" + IntToString (iPowderLevel), oCreature);
                SetLocalObject (oMusket, "oCurrentPouch", oPowder);
            }
            else
            {
                SetLocalObject (oMusket, "oCurrentPouch", OBJECT_INVALID);
            }
            iResult = TRUE;
        }
    }

    return iResult;
}

// -------------------------------------------

int GetHasBullets (object oCreature)
{
    int iAmmount = 0;
    object oBullets = OBJECT_INVALID;
    string sTag = "";
    int iResult = FALSE;

    oBullets = GetItemInSlot (INVENTORY_SLOT_BULLETS, oCreature);
    if (oBullets == OBJECT_INVALID)
    {
        FloatingTextStringOnCreature ("*Bullets Not Equipped!*", oCreature);
        AssignCommand (oCreature, PlaySound ("flintlock_un"));
       }
    else
    {
        if (GetTag (oBullets) != "LeadBullet")
        {
            FloatingTextStringOnCreature ("*Incorrect Ammunition!*", oCreature);
            AssignCommand (oCreature, PlaySound ("flintlock_un"));
            }
        else
        {
            iAmmount = GetNumStackedItems (oBullets);
            DestroyObject (oBullets);
            iAmmount--;
            if (iAmmount > 0)
            {
                oBullets = CreateItemOnObject ("leadbullet", oCreature, iAmmount);
                AssignCommand (oCreature, ActionEquipItem (oBullets, INVENTORY_SLOT_BULLETS));
            }
            iResult = TRUE;
        }
    }
    return iResult;
}

// -------------------------------------------

void BroadcastMsg (object oSender, string sMsg)
{
    string sMessage = GetName (oSender) + ": " + sMsg;
    SendMessageToAllDMs (sMessage);
    object oPC = GetFirstPC ();
    while (oPC != OBJECT_INVALID)
    {
        SendMessageToPC (oPC, sMessage);
        oPC = GetNextPC ();
    }
}

//void main(){}

The problem is when you get to the part where it calculates BAB, it has a call for each of the standard base classes. How do I get the PRC base classes (ninja, marshal, etc.) added to this?


August 31, 2011, 10:08:41 AM
Reply #1
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Sure, instead of GetMyBaseAttackBonus() function use GetBaseAttackBonus() ;)


September 01, 2011, 12:26:34 AM
Reply #2

so something like this?

Code: [Select]
iAttackMod += GetBaseAttackBonus(oCreature) + GetAbilityModifier (ABILITY_DEXTERITY, oCreature) + iAttackBonus;
(I got this from a modified version we use on the PW I work on, but importing that script brings a whole bunch of includes unique to that PW that I don't want to use in a single-player mod.)


September 01, 2011, 01:48:04 AM
Reply #3
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

instead of:
Code: [Select]
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_FIGHTER);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_BARBARIAN);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_PALADIN);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_RANGER);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_CLERIC);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_DRUID);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_ROGUE);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_BARD);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_MONK);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_WIZARD);
    iAttackMod += GetMyBaseAttackBonus (oCreature, CLASS_TYPE_SORCERER);
put
Code: [Select]
iAttackMod += GetBaseAttackBonus(oCreature);


September 01, 2011, 02:01:32 AM
Reply #4

ah, and then just comment out the GetMyAttackBonus function?


September 01, 2011, 02:17:10 AM
Reply #5
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Yes, it's not used anymore so you can comment it out.


September 01, 2011, 02:28:55 AM
Reply #6

It works! Thanks again xwarren!