Aller au contenu

Script- adding message on enter client


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Guest_NWN Dragon-Blade_*

Guest_NWN Dragon-Blade_*
  • Guests
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

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

   #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"));

...
...
...

   

#3
Guest_NWN Dragon-Blade_*

Guest_NWN Dragon-Blade_*
  • Guests
Thanks

#4
zero-feeling

zero-feeling
  • Members
  • 144 messages
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