thanks this is somewhat what I am looking for. I have found it before but I feel it does not match it entirely…
I really appreciate this do not get me wrong!
I think a copmbination of this
NWScript:
//::///////////////////////////////////////////////
//:: Resting Script
//:: boz_o1_resting
//:: Copyright (c) 2002 Brotherhood of Zock
//:://////////////////////////////////////////////
/*
This script allows the players to rest after a specified amount of hours
has passed and only (optional) if they are in possession of a “Bedroll” or use a local
“placeable” item that allows them to rest (and sets the LocalInt “iRestAllowed” to 1).
/
//:://////////////////////////////////////////////
//:: Created By: Kihon
//:: Created On: July 8, 2002
//:://////////////////////////////////////////////
// Counting the actual date from Year0 Month0 Day0 Hour0 in hours
int GetHourTimeZero()
{
int iHourTimeZero;
iHourTimeZero = (GetCalendarYear()-1)122824 + (GetCalendarMonth()-1)2824 + (GetCalendarDay()-1)*24 + GetTimeHour();
return iHourTimeZero;
}
// The main function placed in the onRest event
void main()
{
object oPlayer = GetLastPCRested();
int iRestDelay = 8; //The ammount of hours a player must wait between Rests
int iBedrollRequired = 1; // 0=No requirements for resting
// 1=A “Bedroll” is needed in order to rest.
// Optional may a “Rest-allowing-placable” be used,
// that sets the value of the local “iRestAllowed”
// variable on the player to “1”.
if (GetLastRestEventType() == REST_EVENTTYPE_REST_STARTED)
{
// Check if the Rest Dely is over.
if (GetHourTimeZero() < GetLocalInt (oPlayer, “iNextRestHourTimeZero”))
{
AssignCommand (oPlayer, ClearAllActions()); // Prevent Resting
SendMessageToPC (oPlayer, “You must wait " + IntToString (GetLocalInt (oPlayer, “iNextRestHourTimeZero”)-GetHourTimeZero()) + " hour(s) before resting again.”);
}
else // Resting possible.
{
// Resting allowed if No Bedroll required or Player has a Bedroll or a Rest-allowing-placeable set the local “iRestAllowed” variable to 1
if (iBedrollRequired == 0 || iBedrollRequired == 1 && (GetIsObjectValid (GetItemPossessedBy (oPlayer,“Bedroll”)) || GetLocalInt (oPlayer,“iRestAllowed”) == 1))
{
SetLocalInt (oPlayer, “iRestAllowed”, 0);
SetLocalInt (oPlayer, “iNextRestHourTimeZero”, GetHourTimeZero()+iRestDelay);
}
else // Resting not allowed
{
AssignCommand (oPlayer, ClearAllActions()); // Prevent Resting
SendMessageToPC (oPlayer, “No Bed(roll) - No Rest”);
}
}
}
}
The script placed in the onUsed event of the “Rest-allowing- placable”:
NWScript:
//Function placed on the onUsed Event of a placeable item that allows resting (a bed, or a bedroll…)
void main()
{
object oLastUser = GetLastUsedBy();
if (GetIsPC (oLastUser) && GetIsObjectValid (oLastUser))
{
SetLocalInt (oLastUser, “iRestAllowed”, 1);
AssignCommand (oLastUser, ActionRest());
}
}
And this
NWScript:
//::///////////////////////////////////////////////
//:: Name restricted_rest 1.0
//:: Copyright (c) 2002 Forest Zachman
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Forest Zachman
//:: Created On: 7/10/02
//:://////////////////////////////////////////////
void main()
{
int iRestEvent = GetLastRestEventType();
//Check to see if the PC is starting to rest
if (iRestEvent == REST_EVENTTYPE_REST_STARTED) {
object oRestingPC = GetLastPCRested();
// This variable is set either by a trigger around a “campsite”
// or in the OnEnter event of an Area.
int iAllowedToRest = GetLocalInt(oRestingPC, “ALLOWED_TO_REST”);
if (iAllowedToRest == 0) {
// This area is off limits for resting
// and the character is not in a rest area.
AssignCommand(oRestingPC, ClearAllActions());
FloatingTextStringOnCreature(“You are not allowed to rest here.”, oRestingPC, FALSE);
}
}
}
This basically disallows rest everywhere in your module. Now, two scripts will allow a player to rest. One goes in the OnEnter of a Trigger (around a campsite for example) or Area (on the entire second floor of an Inn containing rooms or a secluded glade for example) and the other goes in the OnExit of the same Trigger/Area.
OnEnter:
NWScript:
void main()
{
object oPC = GetEnteringObject();
if (GetIsPC(oPC)) {
SetLocalInt(oPC, “ALLOWED_TO_REST”, 1);
}
}
OnExit:
NWScript:
void main()
{
object oPC = GetExitingObject();
if (GetIsPC(oPC)) {
DeleteLocalInt(oPC, “ALLOWED_TO_REST”);
}
}
I used the RP system waaay back in the day (feels old now) where one could actually choose his reward. It looked like a green bar ingame, so sorry that is also not what I am looking for though I do appreciate the suggestion!
the system I been looking for was to allow DM’s to reward players for RP, give them points so the player could buy something with said points