Author Topic: Anyone want to help with something a bit complicated?  (Read 1232 times)

Legacy_Nic Mercy

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #30 on: April 09, 2015, 08:51:14 pm »


               

Sadly it doesn't seem to be working. I tried to add it to mod on exit too. I'm guessing the skin is removed before the process can give the feats but I may have an idea on how to make it work.


 


Just for my information... this nwnx function that allows the granting of feats... this doesnt require the player to log out right? If that's the case couldnt I modify the feat granting part of the epic spellcasting system's scripts so it uses nwnx's function to grant the feat directly rather than apply it via a skin?



               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #31 on: April 09, 2015, 08:58:20 pm »


               

No need to log out with nwnx_funcs. Yes, you could replace the code to use nwnx_funcs to give feats, you'll most likely need to inspect several checks etc... but it's indeed feasible.


 


 


Kato



               
               

               
            

Legacy_Nic Mercy

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #32 on: April 09, 2015, 09:03:52 pm »


               


No need to log out with nwnx_funcs. Yes, you could replace the code to use nwnx_funcs to give feats, you'll most likely need to inspect several checks etc... but it's indeed feasible.


 


 


Kato




I'm going to give it the once over to see if I can do it myself. Would it be too much to ask if you could show me what a script would look like giving a single specific feat without referring to a pc skin? Then I'll have an idea of what it should look like when i am tweaking the existing system code.



               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #33 on: April 09, 2015, 09:13:29 pm »


               

You simply add the feat to PC, instead of adding a feat item property to the hide. Thus, you call the function NWNXFuncs_AddFeat(), passing the correct parameters. You can see some examples in my previous posts. As an additional advice, If you wish to learn coding/scripting, you'll find the lexicon 1.69 incredibly useful '<img'>


 


 


Kato



               
               

               
            

Legacy_Nic Mercy

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #34 on: April 09, 2015, 09:22:11 pm »


               


You simply add the feat to PC, instead of adding a feat item property to the hide. Thus, you call the function NWNXFuncs_AddFeat(), passing the correct parameters. You can see some examples in my previous posts. As an additional advice, If you wish to learn coding/scripting, you'll find the lexicon 1.69 incredibly useful '<img'>


 


 


Kato




 


I think ive got the idea '<img'> thank you so much for being so patient with me and giving me examples '<img'>


               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #35 on: April 09, 2015, 09:23:21 pm »


               

I'm glad I could help!


 


 


Kato



               
               

               
            

Legacy_Nic Mercy

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #36 on: April 09, 2015, 09:27:29 pm »


               


I'm glad I could help!


 


 


Kato




 


 


Huzzah it works!!! You're a prince! Thanks again!


               
               

               
            

Legacy_Nic Mercy

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #37 on: April 10, 2015, 02:07:29 am »


               

So new question...


 


I am trying to make a conversation conditional. It compiles but it's not working for some reason and I'm at a loss as to why. My test character is a level 21 wizard with the Epic Spellcasting feat. So she should meet the conditions.


 


Here's the code



#include "inc_epicspells"

int StartingConditional()
{
object oPC = GetPCSpeaker();

if (!GetIsEpicCleric(oPC) || !GetIsEpicDruid(oPC) || !GetIsEpicSorcerer(oPC) || !GetIsEpicWizard(oPC)) return FALSE;

return TRUE;
}

Basically its supposed to check if the player is an epic caster of some sort (basically lvl 21 or higher in wizard, sorcerer, cleric or druid AND has my custom Epic Spellcasting feat)


 


For reference here's the definitions from the include



int GetIsEpicCleric(object oPC)
{
    if (GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 21)
    if (GetHasFeat(FEAT_EPIC_SPELLCASTING, oPC))
        return TRUE;
    return FALSE;
}

int GetIsEpicDruid(object oPC)
{
    if (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 21)
    if (GetHasFeat(FEAT_EPIC_SPELLCASTING, oPC))
        return TRUE;
    return FALSE;
}

int GetIsEpicSorcerer(object oPC)
{
    if (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 21)
    if (GetHasFeat(FEAT_EPIC_SPELLCASTING, oPC))
        return TRUE;
    return FALSE;
}

int GetIsEpicWizard(object oPC)
{
    if (GetLevelByClass(CLASS_TYPE_WIZARD, oPC) >= 21)
    if (GetHasFeat(FEAT_EPIC_SPELLCASTING, oPC))
        return TRUE;
    return FALSE;
}

I'm sure I just did it wrong in some small simple way '<img'>



               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #38 on: April 10, 2015, 02:16:21 am »


               

This is a somewhat different subject deserving a new thread, but no problemo, let's have a look. In the first code block you posted, replace || by &&, and it should do it.


 


 


Kato



               
               

               
            

Legacy_Nic Mercy

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
Anyone want to help with something a bit complicated?
« Reply #39 on: April 10, 2015, 02:22:36 am »


               


This is a somewhat different subject deserving a new thread, but no problemo, let's have a look. In the first code block you posted, replace || by &&, and it should do it.


 


 


Kato




 


See its little stuff like this that trips me up! Thanks again Kato! It works now!