Author Topic: Help me with a script  (Read 448 times)

Legacy_Davir

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Help me with a script
« on: October 21, 2010, 12:58:51 am »


               I will have a npc say you are not a human

and script wizaed give me this one here

int StartingConditional()
{
    // Reject player races
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_DWARF)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_ELF)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_GNOME)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HALFELF)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HALFLING)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HALFORC)
        return FALSE;
    // Reject other races
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_ABERRATION)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_ANIMAL)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_BEAST)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_CONSTRUCT)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_DRAGON)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_ELEMENTAL)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_FEY)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_GIANT)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HUMANOID_GOBLINOID)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_MAGICAL_BEAST)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HUMANOID_MONSTROUS)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_OOZE)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HUMANOID_ORC)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_OUTSIDER)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_HUMANOID_REPTILIAN)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_SHAPECHANGER)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_UNDEAD)
        return FALSE;
    if(GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_VERMIN)
        return FALSE;
    return TRUE;
}

what do i wrong
               
               

               
            

Legacy_Davir

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Help me with a script
« Reply #1 on: October 21, 2010, 01:08:45 am »


               Are there any here there can help me
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Help me with a script
« Reply #2 on: October 21, 2010, 01:17:22 am »


               It would be a lot easier to do this:

int StartingConditional()
{
   if(GetRacialType(GetPCSpeaker()) != RACIAL_TYPE_HUMAN) return TRUE;

   return FALSE;
}

Then put this on the TextAppearsWhen node of the correct line of conversation. There should be two optional lines for the NPC to say at this point. This one on top, with the "TextAppearsWhen" check, and the other on the bottom.

Hope that helps. Good luck.
               
               

               


                     Modifié par GhostOfGod, 21 octobre 2010 - 12:21 .
                     
                  


            

Legacy_Davir

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Help me with a script
« Reply #3 on: October 21, 2010, 01:50:33 am »


               Thanx it work for me now