Yup the script works except the string of words don’t pop up like they should.
Also, I would need to change the timing as it happens too often. It would be nice if the damage was like every 5 min real time. I like how the damage increases more and more. I wish there was another damage we could add that is not part of the current damages. I wonder if “monster damage” would work. Also would be nice like DM_Wise said about doing Constitution damage as well. Say every 10 min real time they are in the desert in addition to damage…to reset the point damage there should be the ability to drink water from a canteen or from a water source (trigger drawn around an oasis to simulate drinking water at the edge of the pool or refilling the canteen).
I say each canteen can reset back to original damage start. The heat scripting that Vivienne suggested sounds like a great system but it is hard for me to implement into my module event script so I would like to only make the “area” event script “OnEnter” the only place to make this work.
Also, would be good if the PC strips down naked to alleviate heatstroke (if no clothing then reduce damage by 5 each time damages is done) not sure if this is possible. I have a similar script for cold damage in cold areas where each item of clothing protects the PC from cold damage. See below:
////////////////////////////////////////////////////////////////////////////////
// Cold of Winter //
// sl_winter_onente //
// Author :sly777 for Land of Cheshire //
// special thanks to xanas our lead scripter //
// for helping make this cleaner :) //
////////////////////////////////////////////////////////////////////////////////
//put on enter area you want winter effect //
void coldofwinter(object oPC,object oArea);
void main()
{
object oPC=GetEnteringObject();
if(!GetIsPC(oPC)) return;
object oArea=OBJECT_SELF;
int nIntensity = GetLocalInt(oArea, "Intensity");
if(nIntensity == 0) return;
SetLocalInt(oPC,"Intensity", nIntensity);
SendMessageToPC(oPC, "Its very cold and windy ");
DelayCommand(20.0,coldofwinter(oPC,oArea));
}
void coldofwinter(object oPC,object oArea)
{
int nInventorySlot;
int nTotalIntensity;
int AC;
effect eDmg;
effect slow;
object oItem;
string sTag;
float fDist;
if (GetArea(oPC)==oArea)
{
nTotalIntensity=GetLocalInt(oPC,"Intensity");
if (GetIsNight()==TRUE) nTotalIntensity+=3;// colder at night
if (GetIsDay()==TRUE) nTotalIntensity-=4;// warmer in the day
if (GetWeather(oArea)==WEATHER_SNOW) nTotalIntensity-=2;//warmer if its snowing
if (GetWeather(oArea)==WEATHER_RAIN) nTotalIntensity+=4;//colder if its raining
oItem =GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);//check for special boots
sTag=GetTag(oItem) ;
if (sTag=="warmboots") nTotalIntensity-=2;
if (sTag=="winterboots") nTotalIntensity-=4;
oItem =GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);//check for special gloves
sTag=GetTag(oItem) ;
if (sTag=="warmgloves") nTotalIntensity-=2;
if (sTag=="wintergloves") nTotalIntensity-=4;
oItem =GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);//check for special headgear
sTag=GetTag(oItem) ;
if (sTag=="warmhat") nTotalIntensity-=2;
if (sTag=="winterhat") nTotalIntensity-=4;
oItem=GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);//check if pc wear something or heavy armor
AC=GetItemACValue(oItem);
nInventorySlot=(GetIsObjectValid(oItem));
if (AC >= 4) nTotalIntensity+=2;
else if (nInventorySlot=1) nTotalIntensity+=4;
{
oItem=GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);//check for special cloaks
sTag=GetTag(oItem);
if (sTag=="warmcloak") nTotalIntensity-=2;
else if (sTag=="wintercloak") nTotalIntensity-=4;
}
oItem=GetNearestObjectByTag("Campfire",oPC,1);//check for fire nearby
if (oItem!=OBJECT_INVALID)
{
SendMessageToPC(oPC, "The fire seems to make you warmer but you still risk freezing being exposed out here as you are.");
fDist=GetDistanceBetween(oItem,oPC);
if (fDist<1.0) nTotalIntensity-=8;
else if (fDist<3.0) nTotalIntensity-=3;
else if (fDist<5.0) nTotalIntensity-=2;
SetLocalInt(oPC, "nsavethrow", 0);
}
SetLocalInt (oPC,"nsavethrow",GetLocalInt(oPC, "nsavethrow")+1);//get the saving throw harder with time
int time = 15 + GetLocalInt(oPC,"nsavethrow");//saving throw vs cold (fortitude save)
if (FortitudeSave(oPC, time, SAVING_THROW_TYPE_COLD ))
{
}
else
{
slow=EffectMovementSpeedDecrease(25);
eDmg=EffectDamage(nTotalIntensity,DAMAGE_TYPE_COLD);
if (nTotalIntensity <= 6)ApplyEffectToObject(DURATION_TYPE_TEMPORARY,slow,oPC,30.1f);
else if (nTotalIntensity >= 7)ApplyEffectToObject(DURATION_TYPE_INSTANT,eDmg,oPC,1.0);
SendMessageToPC(oPC,"This environment is very cold.");
} // do cold damage or speed decrease
DelayCommand(30.0,coldofwinter(oPC,oArea));
} // end areaofpc = area
}