Author Topic: Henchie convo  (Read 381 times)

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Henchie convo
« on: October 13, 2011, 02:05:59 am »


               Hi all,

I'm setting up henchmen in my mod, and I'm using a simple convo. One of the nodes asks the henchie to cast a spell, but is there a way to put a starting conditional on it so the node only shows up if the npc is a wizard or sorceror?

thank you '<img'>
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Henchie convo
« Reply #1 on: October 13, 2011, 02:57:47 am »


               Well assuming that the convo owner is the henchman, it would be:

int StartingConditional()
{
     return GetLevelByclass(class_TYPE_SORCERER) > 0 ||    GetLevelByclass(class_TYPE_WIZARD) > 0;
}

And then the script should be referenced in the "Text Appears When" text box for the convo node you wish to check.

Kato
               
               

               


                     Modifié par Kato_Yang, 13 octobre 2011 - 02:14 .
                     
                  


            

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Henchie convo
« Reply #2 on: October 13, 2011, 03:02:39 am »


               Thank you so very much, sweetie! *hugs* '<img'>
               
               

               
            

Legacy_Xovian

  • Full Member
  • ***
  • Posts: 158
  • Karma: +0/-0
Henchie convo
« Reply #3 on: October 13, 2011, 03:08:08 am »


               Something like this works, just add whatever classes ya want.

#include "NW_I0_GENERIC"

int StartingConditional()
{
   object oSelf = OBJECT_SELF;
   if(GetLevelByclass(class_TYPE_SORCERER, oSelf)>=0 || (GetLevelByclass(class_TYPE_WIZARD, oSelf)>=0) )
   {
       return TRUE;
   }
   return FALSE;
}



Bah beaten to the punch.

Well if we want to get technical, more then htose two classes cast spells., So it might look more like this:

#include "NW_I0_GENERIC"
int StartingConditional()
{
    object oSelf = OBJECT_SELF;
    if(GetLevelByclass(class_TYPE_ARCANE_ARCHER, oSelf)>=0 || (GetLevelByclass(class_TYPE_BARD, oSelf)>=0 ||
    (GetLevelByclass(class_TYPE_BLACKGUARD, oSelf)>=0 || (GetLevelByclass(class_TYPE_CLERIC, oSelf)>=0||
    (GetLevelByclass(class_TYPE_DRAGON_DISCIPLE, oSelf)>=0 || (GetLevelByclass(class_TYPE_DRAGONDISCIPLE, oSelf)>=0 ||
    (GetLevelByclass(class_TYPE_DRUID, oSelf)>=0 || (GetLevelByclass(class_TYPE_HARPER, oSelf)>=0 ||
    (GetLevelByclass(class_TYPE_PALADIN, oSelf)>=0 || (GetLevelByclass(class_TYPE_PALE_MASTER, oSelf)>=0 ||
    (GetLevelByclass(class_TYPE_PALEMASTER, oSelf)>=0 || (GetLevelByclass(class_TYPE_RANGER, oSelf)>=0 ||
    (GetLevelByclass(class_TYPE_SHIFTER, oSelf)>=0 || (GetLevelByclass(class_TYPE_SORCERER, oSelf)>=0 ||
    (GetLevelByclass(class_TYPE_WIZARD, oSelf)>=0)))))))))))))))
    {
        return TRUE;
    }
    return FALSE;
}
               
               

               


                     Modifié par Xovian, 13 octobre 2011 - 02:21 .