Author Topic: Hello in need of a script.  (Read 406 times)

Legacy_Dumple

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Hello in need of a script.
« on: October 16, 2010, 10:52:35 pm »


               Im looked everywere for a script i want to add in my convo.If someone can whrite me a script so the NPC will do this actions:

first one is when i walk on triiger the convo starts with npc in house sends me outside.
Then i go outside another convo starts wich tells me to return to npc back inside.
Then outside again.Tallking with npc after convo area transition.
oh and a script that makes a npc to move to a waypoint after convo.


Asking all of you good people (who are waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay better with nwn toolset script
than me) Please help! '<img'>

EDit: So i need 1 script to move npc to a waypoint after convo.
1 script for the "when player enters triger,convo starts".I tried to make teh script myself.Fail on epic proprotions.
Oh,and how do i make a NPC change its convo when i talk to him again?Like i talk to him,and he says for example
"Go outside and fetch me my hoe" and when i come back he will say something difirent than "go outside and fetch me my hoe"
and the last thing from my encripted message is that i need after convo ends,the player its sent into a area.
               
               

               


                     Modifié par Dumple, 17 octobre 2010 - 09:11 .
                     
                  


            

Legacy_Dagesh

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +0/-0
Hello in need of a script.
« Reply #1 on: October 17, 2010, 01:43:22 am »


               I can't understand your post.
               
               

               
            

Legacy_Dark Defiance

  • Full Member
  • ***
  • Posts: 125
  • Karma: +0/-0
Hello in need of a script.
« Reply #2 on: October 17, 2010, 02:58:28 am »


               I too, do not entirely understand the situation. However, you mentioned
triggers and convos. From what I can make out of your situation you will
need more than just one script to pull it off.

Dumple wrote...
first one is when i walk on triiger the convo starts with npc in house...

This is two scripts: One for the trigger and one in the conversation. These were written OUTSIDE of the toolset, but should compile.

Trigger On Enter:

void main()
{
   object oPC = GetEnteringObject();
   if(!GetIsPC(oPC)) {return;}
   //The NPC starts the convo....
   object oNPC = GetNearestObjectByTag("NPC_TAG_HERE");
   if(oNPC != OBJECT_INVALID)
   {   
      AssignCommand(oNPC, ClearAllActions());
      AssignCommand(oNPC, ActionStartConversation(oNPC, "CONVO_FILE", FALSE, FALSE ));
   }
   
}

Dumple wrote...
.... sends me outside.

This one goes on the convo node under "Actions Taken" of when the PC gets sent outside....

void main()
{
   object oPC = GetPCSpeaker();
   if(!GetIsPC(oPC)) {return;}
   //We are going to "force" the PC outside by
   //sending them to a waypoint
   object oWPOutside = GetWaypointByTag("WP_OUTSIDE");
   if(oWPOutside != OBJECT_INVALID)
   {   
      AssignCommand(oPC, ClearAllActions());
      AssignCommand(oPC, JumpToObject(oWPOutside));
   }
   
}

That should get you started. Again, I can't make out must else of your request or its just a simple modification of the code above. Just remember most actions that need to be done via a conversation are usually a separate script.

Hope this helps!
               
               

               


                     Modifié par Dark Defiance, 17 octobre 2010 - 02:00 .
                     
                  


            

Legacy_Dumple

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Hello in need of a script.
« Reply #3 on: October 17, 2010, 10:15:44 am »


               

Dark Defiance wrote...

Hope this helps!




Yup.Thank you!
Oh btw i wanted a script that sends a npc wallking to a waypoint after the last line of the convo. and one script that i attach to my last line of the other convo that sends me to the next area. and again thank you.That helped alot.'^_^'


"EDIT!" : WHOA! The script is coming in handy.Solved 50% of my modding problems. '^_^' THANK YOU!!!!!!
               
               

               


                     Modifié par Dumple, 17 octobre 2010 - 10:31 .
                     
                  


            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
Hello in need of a script.
« Reply #4 on: October 17, 2010, 11:54:34 am »


               lilacs soul script generator