Aller au contenu

Photo

Henchie convo


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

#1
archer4217

archer4217
  • Members
  • 105 messages
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 :)

#2
Kato -

Kato -
  • Members
  • 392 messages
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 .


#3
archer4217

archer4217
  • Members
  • 105 messages
Thank you so very much, sweetie! *hugs* :)

#4
Xovian

Xovian
  • Members
  • 87 messages
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 .