Author Topic: Script- adding message on enter client  (Read 331 times)

Legacy_Guest_NWN Dragon-Blade_*

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Script- adding message on enter client
« on: March 16, 2011, 12:19:24 am »


               how would I add this message/Script part:
 " <cÿ ÿ> Welcome to Celyon PW Designed by GM_Dragon. Please enjoy yourself while you are here.  -The Celyon Team"

To this script:

#include "gs_inc_common"
#include "gs_inc_text"
void main()
{
    object oEntering   = GetEnteringObject();
    if (GetIsDM(oEntering)) return;
    //check if cd key is banned
    object oBanishment = GetLocalObject(OBJECT_SELF, "GS_BANISHMENT");
    if (GetIsObjectValid(oBanishment))
    {
        string sCDKey = GetPCPublicCDKey(oEntering);
        if (GetIsObjectValid(GetItemPossessedBy(oBanishment, "GS_BA_" + sCDKey)))
        {
            SendMessageToAllDMs(
                gsCMReplaceString(
                    GS_T_16777425,
                    GetName(oEntering),
                    GetPCPlayerName(oEntering),
                    sCDKey));
            BootPC(oEntering);
            return;
        }
    }
    AddJournalQuestEntry("GS_DIARY_001", 1, oEntering, FALSE);
    AddJournalQuestEntry("GS_DIARY_002", 1, oEntering, FALSE);
    if (GetLocalInt(oEntering, "GS_ENABLED"))
    {
        //restore health
        int nHealth = GetLocalInt(OBJECT_SELF, "GS_HEALTH_" + ObjectToString(oEntering));
        gsCMSetHitPoints(nHealth, oEntering);
        SetLocalInt(oEntering, "GS_ENABLED", -1);
    }
    //activity
    SetLocalInt(oEntering, "GS_ACTIVE", TRUE);
    ExecuteScript("activateclimbing",OBJECT_SELF);
    if (GetRacialType(oEntering)==RACIAL_TYPE_ELF && GetIsPC(oEntering))
    {
        if (GetItemPossessedBy(oEntering, "Ammy_Elf")== OBJECT_INVALID)
        {
            CreateItemOnObject("elf_ammy", oEntering);
        }
    }
}




Thanks

-DM_Dragon
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Script- adding message on enter client
« Reply #1 on: March 16, 2011, 01:03:25 am »


               

   #include "gs_inc_common"
#include "gs_inc_text"
#include "x3_inc_string"
void main()
{
    object oEntering   = GetEnteringObject();
    if (GetIsDM(oEntering)) return;
    SendMessageToPC(oEntering ,StringToRGBString("Welcome to Celyon PW Designed by GM_Dragon. Please enjoy yourself while you are here.  -The Celyon Team","707"));

...
...
...

   
               
               

               
            

Legacy_Guest_NWN Dragon-Blade_*

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
Script- adding message on enter client
« Reply #2 on: March 16, 2011, 01:15:48 am »


               Thanks
               
               

               
            

Legacy_zero-feeling

  • Sr. Member
  • ****
  • Posts: 287
  • Karma: +0/-0
Script- adding message on enter client
« Reply #3 on: March 16, 2011, 07:05:26 am »


               just so you know, if you use pqj_inc (one file) by Knatt and the Editing tool bt Lightfoot8, you'll never need to use lines like :
AddJournalQuestEntry("GS_DIARY_001", 1, oEntering, FALSE);
AddJournalQuestEntry("GS_DIARY_002", 1, oEntering, FALSE);
again.... just so you know... it's an extreamly easy system to use.
Zero