Author Topic: Messengers?  (Read 332 times)

Legacy_Kingdom_Of_Hearts

  • Full Member
  • ***
  • Posts: 142
  • Karma: +0/-0
Messengers?
« on: September 16, 2012, 12:05:58 am »


               I've been trying at this for a while. I basicly want to have messenger hawks in my module, that can be told a message by PCs. Basicly, PC1 goes to the messenger hawks and in a conversation selects the PC to send the message to,  It then would spawn a messenger hawk by PC2 and speak the message "*The Messenger Hawk drops a message that reads "Message"* "

As for selecting the PCs, I think in conversations you can have lines of text to choose that cam be <CUSTOMXXX> that can be set to each PCs name and that PC? 
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Messengers?
« Reply #1 on: September 16, 2012, 04:21:02 am »


               I would do it like this. Have the PC send the message by selecting the PC to send it to in a conversation by typing the selected PC's name, similar to what I did with my contract hits.
Then have the target hawk fly up into the air and a corresponding hawk show up drop in and deliver a pre-selected message, say message 1-6. Then have the floating text of the pre-selected message appear above the targeted PC.

Here is something I made a while ago that is related to this question:

//orlocks ethereal horn by ffbj
#include "NW_I0_GENERIC"
#include "x2_inc_switches"
void main()
   {
     int nEvent =GetUserDefinedItemEventNumber();
      if (!nEvent == X2_ITEM_EVENT_ACTIVATE)
     return;
        object  oPC =  GetItemActivator();
        object oItem = GetItemActivated();
        object oArea = GetArea(oPC);
        location lWP = GetLocation(oPC);
        string sPC = GetName(oPC);
        string sArea = GetName(oArea);
        string sSoundName1 = "as_an_crynight4";
        string sMessage = (sPC + " Is Calling For Aid in " + sArea);
        {
         if(GetLocalInt(oArea, "No_Item_Use") == 1)
        {
       SendMessageToPC(oPC, "This item is not usuable here.");
       return;
        }
        AssignCommand(oPC,PlaySound(sSoundName1));
        DelayCommand (0.5,PlaySound("as_an_hawk1"));
        object oTarget;
        oTarget = GetFirstPC();
         while (GetIsObjectValid(oTarget))
         {
        FloatingTextStringOnCreature(sMessage, oTarget, FALSE);
        oTarget = GetNextPC();
        }
        if (GetHitDice(oPC) >10)
           CreateObject(OBJECT_TYPE_CREATURE, "falconsuperior", lWP, TRUE);
           else
         CreateObject(OBJECT_TYPE_CREATURE, "falcon", lWP, TRUE);
   }
}
 
               
               

               


                     Modifié par ffbj, 16 septembre 2012 - 03:42 .
                     
                  


            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
Messengers?
« Reply #2 on: September 16, 2012, 03:43:18 pm »


               Also, you might want to add in a check to see if the PC who is to receive the message is outside. Nothing worse than being in the depths of a dark dungeon and suddenly have a hawk drop a message for you. Or a player has finally seduced that new elf girl and a hawk pops into the room.

FP!
               
               

               
            

Legacy_acomputerdood

  • Sr. Member
  • ****
  • Posts: 378
  • Karma: +0/-0
Messengers?
« Reply #3 on: September 16, 2012, 03:44:02 pm »


               if you're comfortable with nwnx, specifically _chat and _odbc, you can do something similar to what i did with my webchat system:

http://nwvault.ign.c....Detail&id=3627

you can use the chat plugin to intercept messages from the sending PC and use the ensuing script to spawn your hawk to fly over to the recipient.

OR, you can employ the odbc plugin to allow messages be sent from a .cgi webpage and delivered to PCs.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Messengers?
« Reply #4 on: September 16, 2012, 06:31:31 pm »


               Just to add my two cents.
I see the system made up of:

Two items: A Pen and Message Paper for writing the message.

Two creatures: A shopkeeper and the bird. The shop keeper sells the message paper at the Cost for sending the message.

Two placeables: A Mail Post To have the Message picked up from. A desk to write the message at( optional).

Scripts:

Writing Message - Either a listener with a desk. Or a OnPlayerChat the checks fror both Pen and papper being equipted.

Message Paper - Item Activate scripts for Open/Close (unlimited use) and Seal( singleUse)

Mail Post - On Close script To have the bird pick up a deliver the message.

Overview:

The Pc would Buy the message paper from the merchant at the cost to deliver the message. To write on the paper the Pc would have to equip pen in one hand a paper in the other. If the paper is open he is writing the message. If the paper is closed he is writing who to deliver it to. The Message will be able to be sealed shut one time. Changing the name of the item to Sealed Message/Note. If the message is closed the item descrption will display the Person to deliver the message to. If it is open It will display the Content of the message. When a note/message is opend after being sealed the Item Name will chane to. Opened Message/Note.

To Send the message the PC places the Note in the Mail Post where the Bird flys by to pick it up. Then after a Delay and ability to find the PC out side the Bird will drop the not at the PC's feet.

Optional to have Small/Med/large paper sizes, for the number of characters tha can be written to it.

That is how I see it. Just dont know if I have the time to write it at the moment.
L8
               
               

               


                     Modifié par Lightfoot8, 16 septembre 2012 - 05:34 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Messengers?
« Reply #5 on: September 17, 2012, 04:41:04 am »


               That's realistic. For me sometimes I just think of expendiency. So you could use the summon hawk script I already supplied and merely change the delivery instead of to all PC's to a single PC so designated by setting a local int on that PC, by using the chat feature, this local would be delected after the message is received. This would entail having a conversation on the hawk, and becomes more complicated if you want to construct something more than a canned message.
So something like so and so in area so and so wants you to meet them. Since you never really described the complexity or depth of the message I was supposing something like that would be sufficient. Anyway the hawk flys off and finds the PC unless they are in a restricted area, indoors, wherever, so designated by a local int on the area no_messages set to 1. The hawk appears and the message is received in floating text, avoiding the step of actually transferring something.
The whole concept reminds one of the owl delivery system, but that's fine, it's a fairly usual thing.
So maybe you are with the elf girl and a hawk flys into the room flutters around and drops a note a your feet, and then flys off.  Now that, would have to impress her or anyone else for that matter.  In these games you just about rationalize anything. 
               
               

               


                     Modifié par ffbj, 17 septembre 2012 - 03:46 .