About: Matt's area heartbeat sleeping track   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

his script is designed to be placed on an area hearbeat or can be modified to be put into a trigger. Every 5 heartbeats, the PC will be forced to make a fortitude check else be knocked out by sleeping gas. It is intended to be used in areas such as swamps, or other gaseous areas that you can think of.

AttributesValues
rdfs:label
  • Matt's area heartbeat sleeping track
rdfs:comment
  • his script is designed to be placed on an area hearbeat or can be modified to be put into a trigger. Every 5 heartbeats, the PC will be forced to make a fortitude check else be knocked out by sleeping gas. It is intended to be used in areas such as swamps, or other gaseous areas that you can think of.
dcterms:subject
abstract
  • his script is designed to be placed on an area hearbeat or can be modified to be put into a trigger. Every 5 heartbeats, the PC will be forced to make a fortitude check else be knocked out by sleeping gas. It is intended to be used in areas such as swamps, or other gaseous areas that you can think of. void main() { object oPC = GetEnteringObject(); effect eSleep = EffectSleep(); effect eSleepTrap = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_ACID); string szPassed = "You feel the gas in the area attacking your nervous system, but you are able to shake it off."; string szFailed = "The strange gas in the area has knocked you out."; // use the next 4 lines if you want this script to be placed in the heartbeat int nTimer = GetLocalInt(GetModule(), "TrapTimer"); nTimer = nTimer+1; SetLocalInt(GetModule(), "TrapTimer", nTimer); //remove this check if you want the script on a trigger instead //to change the frequency of the check, just replace the 5 if (GetLocalInt(GetModule(), "TrapTimer")==5) { //this sets the dc of the trap and fortitude bonus int iDC = 16; int iBonus = GetFortitudeSavingThrow(oPC); //does the saving throw roll if ((d20() + iBonus) >= iDC) { //do this is the player succeeds SendMessageToPC(oPC, szPassed); //this resets the timer back to 0 SetLocalInt(GetModule(), "TrapTimer", 0); } else { //do this is the player fails //effect time is the durration of the sleep trap. //change the d4 to make it shorter or longer int nEffectTime= d4(); //the die roll is multiplied by 3. change this if you want it longer or shorter. nEffectTime= nEffectTime*3; //this plays the visual effect. ApplyEffectToObject(DURATION_TYPE_INSTANT, eSleepTrap, oPC); //this makes the pc fall asleep ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, oPC, IntToFloat(nEffectTime)); SendMessageToPC(oPC, szFailed); //this resets the timer back to 0 SetLocalInt(GetModule(), "TrapTimer", 0); } } else { return; } }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software