Initial commit
Initial commit.
This commit is contained in:
24
_module/nss/flavortext.nss
Normal file
24
_module/nss/flavortext.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
//Create a script called flavortext with the following code as it's content.
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if(GetIsPC(oPC) == TRUE) {
|
||||
string sString = GetName(OBJECT_SELF);
|
||||
string sVal = GetStringLeft(sString, 6);
|
||||
string sVar = GetStringRight(sString, 6);
|
||||
string sTest = GetLocalString(oPC, sVar);
|
||||
|
||||
if(sTest != sVal) {
|
||||
//do once
|
||||
SetLocalString(oPC, sVar, sVal);
|
||||
//flavor text
|
||||
FloatingTextStringOnCreature(sString, oPC, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Simply create a trigger. Put the flavor text you want displayed as the name of the trigger. (The triggers tag has nothing to do with this script). Then assign the [flavortext] script to the trigger's OnEnter script hook. This script will only work when PCs enter the trigger and it will display whatever the trigger's name text is, as floating text over the PC's head. This description will happen only once. This same script can be used in as many different flavor text triggers as you'd like.
|
||||
|
Reference in New Issue
Block a user