OnEnter scripting help needed.
Casper
Member Posts: 11
I am trying to make it to where characters get gold ONE time when entering the server. How do i do such? This is my script on enter in module properties. Thank you!
//MODULE ONENTER SCRIPT/////////////////
#include "omw_plns"
//#include "pqj_inc"
#include "inc_gsystem_evnt"
#include "10_inc_modsystem"
#include "gz_inc_db"
#include "horse_include"
#include "cin_subr_func"
void main()
{
//Horse System:
object oPC = GetEnteringObject();
GPA_HorseOCE(oPC);
SubraceOnClientEnter(oPC);
//Talus Listener System:
ExecuteScript("lds_module_cli_e", GetModule());
//Higher Ground Legendary Levels:
ExecuteScript ("hgll_cliententer", OBJECT_SELF);
//Player Guild System v3.7b:
PGSModuleClientEnterEvent (GetEnteringObject());
//OMW Loot Notification System:
DelayCommand(6.0, PLNSLoadNotificationOnClientEnter(oPC));
//Knat's Persistant Journal Entries:
//RebuildJournalQuestEntries(oPC);
//Nexus Ring Remove:
//ExecuteScript ("04_nexring_oe", OBJECT_SELF);
//Give Netheria Newspaper to PC.
ExecuteScript ("04_nethnews_oe", OBJECT_SELF);
//Nexus Stone Give:
DelayCommand (2.0, ExecuteScript ("04_nexstone_oe", OBJECT_SELF));
// HunterAP's Housing System OnEnter Event:
ExecuteScript ("hh_mod_enter", OBJECT_SELF);
//Henchmen:
ExecuteScript ("69_client_enter", OBJECT_SELF);
// Kill dead PCs
if (!GetIsDM(oPC))
{
GTRestorePlayerStatus(oPC);
// ECL Notification
CinSetECLModifier(oPC);
DestroySkin(oPC);
}
}
//MODULE ONENTER SCRIPT/////////////////
#include "omw_plns"
//#include "pqj_inc"
#include "inc_gsystem_evnt"
#include "10_inc_modsystem"
#include "gz_inc_db"
#include "horse_include"
#include "cin_subr_func"
void main()
{
//Horse System:
object oPC = GetEnteringObject();
GPA_HorseOCE(oPC);
SubraceOnClientEnter(oPC);
//Talus Listener System:
ExecuteScript("lds_module_cli_e", GetModule());
//Higher Ground Legendary Levels:
ExecuteScript ("hgll_cliententer", OBJECT_SELF);
//Player Guild System v3.7b:
PGSModuleClientEnterEvent (GetEnteringObject());
//OMW Loot Notification System:
DelayCommand(6.0, PLNSLoadNotificationOnClientEnter(oPC));
//Knat's Persistant Journal Entries:
//RebuildJournalQuestEntries(oPC);
//Nexus Ring Remove:
//ExecuteScript ("04_nexring_oe", OBJECT_SELF);
//Give Netheria Newspaper to PC.
ExecuteScript ("04_nethnews_oe", OBJECT_SELF);
//Nexus Stone Give:
DelayCommand (2.0, ExecuteScript ("04_nexstone_oe", OBJECT_SELF));
// HunterAP's Housing System OnEnter Event:
ExecuteScript ("hh_mod_enter", OBJECT_SELF);
//Henchmen:
ExecuteScript ("69_client_enter", OBJECT_SELF);
// Kill dead PCs
if (!GetIsDM(oPC))
{
GTRestorePlayerStatus(oPC);
// ECL Notification
CinSetECLModifier(oPC);
DestroySkin(oPC);
}
}
0
Comments
If you had a plot non drop item on the pc that functioned as a data tracker them you could set a character creation flag. If you used something else for tracking then you could use that instead.
object oDB = GetItemPossessedBy(oPC, "pc_db"); int nFlag = GetLocalInt(oDB, "do_once"); if (nFlag == FALSE) { GiveGoldToCreature(oPC, 1); SetLocalInt(oDB, "do_once", TRUE); }
void main()
{
object oPC = GetEnteringObject();
if(GetLocalInt(oPC, "ReceiveGold") == 0)
{
SetLocalInt(oPC, "ReceiveGold", 1);
GiveGoldToCreature(oPC, 50);
}
}
This should give 50 gold once to someone who enters. It is a basic start anyway. Hope it helps.