Tweaked XP onEnter script

Tweaked XP onEnter script.  Updated release archive.
This commit is contained in:
Jaysyn904 2024-01-26 10:05:19 -05:00
parent b3f2be61a7
commit a0fa1baf2b
10 changed files with 76 additions and 677 deletions

View File

@ -2913,7 +2913,7 @@
},
"Version": {
"type": "dword",
"value": 25
"value": 26
},
"Width": {
"type": "int",

View File

@ -414,27 +414,6 @@
"TriggerList": {
"type": "list",
"value": [
{
"__struct_id": 1,
"Comment": {
"type": "cexostring",
"value": ""
}
},
{
"__struct_id": 1,
"Comment": {
"type": "cexostring",
"value": ""
}
},
{
"__struct_id": 1,
"Comment": {
"type": "cexostring",
"value": ""
}
},
{
"__struct_id": 1,
"Comment": {

View File

@ -57899,45 +57899,15 @@
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -0.6644039154052734
"value": 0.0
},
"PointY": {
"type": "float",
"value": -0.02984619140625
"value": 0.0
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -0.581209659576416
},
"PointY": {
"type": "float",
"value": -3.995079040527344
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 0.1018514633178711
},
"PointY": {
"type": "float",
"value": -3.917713165283203
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
"value": 0.02500049956142902
}
},
{
@ -57948,11 +57918,41 @@
},
"PointY": {
"type": "float",
"value": 0.0
"value": -4.232822418212891
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
"value": 0.02500049956142902
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 4.361091613769531
},
"PointY": {
"type": "float",
"value": -4.181515693664551
},
"PointZ": {
"type": "float",
"value": 0.02500049956142902
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 4.207168579101563
},
"PointY": {
"type": "float",
"value": -0.1026139259338379
},
"PointZ": {
"type": "float",
"value": 0.0250005591660738
}
}
]
@ -58006,7 +58006,7 @@
},
"ScriptOnEnter": {
"type": "resref",
"value": "ho_lvlup_pc"
"value": "hu_lvlup_pc"
},
"ScriptOnExit": {
"type": "resref",
@ -58058,7 +58058,7 @@
},
"XPosition": {
"type": "float",
"value": 42.25422668457031
"value": 37.65270614624023
},
"YOrientation": {
"type": "float",
@ -58066,624 +58066,15 @@
},
"YPosition": {
"type": "float",
"value": 6.925385475158691
"value": 6.85987663269043
},
"ZOrientation": {
"type": "float",
"value": 0.0
},
"ZPosition": {
"type": "float",
"value": -9.305114758717537e-007
}
},
{
"__struct_id": 1,
"AutoRemoveKey": {
"type": "byte",
"value": 0
},
"Cursor": {
"type": "byte",
"value": 0
},
"DisarmDC": {
"type": "byte",
"value": 0
},
"Faction": {
"type": "dword",
"value": 1
},
"Geometry": {
"type": "list",
"value": [
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -0.6644039154052734
},
"PointY": {
"type": "float",
"value": -0.02984619140625
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -0.581209659576416
},
"PointY": {
"type": "float",
"value": -3.995079040527344
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 0.1018514633178711
},
"PointY": {
"type": "float",
"value": -3.917713165283203
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 0.0
},
"PointY": {
"type": "float",
"value": 0.0
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
}
]
},
"HighlightHeight": {
"type": "float",
"value": 0.0
},
"KeyName": {
"type": "cexostring",
"value": ""
},
"LinkedTo": {
"type": "cexostring",
"value": ""
},
"LinkedToFlags": {
"type": "byte",
"value": 0
},
"LoadScreenID": {
"type": "word",
"value": 0
},
"LocalizedName": {
"type": "cexolocstring",
"value": {
"0": "LevelUpSolo",
"id": 14759
}
},
"OnClick": {
"type": "resref",
"value": ""
},
"OnDisarm": {
"type": "resref",
"value": ""
},
"OnTrapTriggered": {
"type": "resref",
"value": ""
},
"PortraitId": {
"type": "word",
"value": 0
},
"ScriptHeartbeat": {
"type": "resref",
"value": ""
},
"ScriptOnEnter": {
"type": "resref",
"value": "ho_lvlup_pc"
},
"ScriptOnExit": {
"type": "resref",
"value": ""
},
"ScriptUserDefine": {
"type": "resref",
"value": ""
},
"Tag": {
"type": "cexostring",
"value": "LevelUpSolo"
},
"TemplateResRef": {
"type": "resref",
"value": "newgeneric"
},
"TrapDetectable": {
"type": "byte",
"value": 1
},
"TrapDetectDC": {
"type": "byte",
"value": 0
},
"TrapDisarmable": {
"type": "byte",
"value": 1
},
"TrapFlag": {
"type": "byte",
"value": 0
},
"TrapOneShot": {
"type": "byte",
"value": 1
},
"TrapType": {
"type": "byte",
"value": 0
},
"Type": {
"type": "int",
"value": 0
},
"XOrientation": {
"type": "float",
"value": 0.0
},
"XPosition": {
"type": "float",
"value": 38.37220764160156
},
"YOrientation": {
"type": "float",
"value": 0.0
},
"YPosition": {
"type": "float",
"value": 6.579159736633301
},
"ZOrientation": {
"type": "float",
"value": 0.0
},
"ZPosition": {
"type": "float",
"value": -9.305114758717537e-007
}
},
{
"__struct_id": 1,
"AutoRemoveKey": {
"type": "byte",
"value": 0
},
"Cursor": {
"type": "byte",
"value": 0
},
"DisarmDC": {
"type": "byte",
"value": 0
},
"Faction": {
"type": "dword",
"value": 1
},
"Geometry": {
"type": "list",
"value": [
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -3.253374099731445
},
"PointY": {
"type": "float",
"value": 0.23516845703125
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -3.234580039978027
},
"PointY": {
"type": "float",
"value": -0.3316535949707031
},
"PointZ": {
"type": "float",
"value": 0.02500005997717381
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 0.0
},
"PointY": {
"type": "float",
"value": 0.0
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -0.02301931381225586
},
"PointY": {
"type": "float",
"value": 0.4862098693847656
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
}
]
},
"HighlightHeight": {
"type": "float",
"value": 0.0
},
"KeyName": {
"type": "cexostring",
"value": ""
},
"LinkedTo": {
"type": "cexostring",
"value": ""
},
"LinkedToFlags": {
"type": "byte",
"value": 0
},
"LoadScreenID": {
"type": "word",
"value": 0
},
"LocalizedName": {
"type": "cexolocstring",
"value": {
"0": "LevelUpSolo",
"id": 14759
}
},
"OnClick": {
"type": "resref",
"value": ""
},
"OnDisarm": {
"type": "resref",
"value": ""
},
"OnTrapTriggered": {
"type": "resref",
"value": ""
},
"PortraitId": {
"type": "word",
"value": 0
},
"ScriptHeartbeat": {
"type": "resref",
"value": ""
},
"ScriptOnEnter": {
"type": "resref",
"value": "ho_lvlup_pc"
},
"ScriptOnExit": {
"type": "resref",
"value": ""
},
"ScriptUserDefine": {
"type": "resref",
"value": ""
},
"Tag": {
"type": "cexostring",
"value": "LevelUpSolo"
},
"TemplateResRef": {
"type": "resref",
"value": "newgeneric"
},
"TrapDetectable": {
"type": "byte",
"value": 1
},
"TrapDetectDC": {
"type": "byte",
"value": 0
},
"TrapDisarmable": {
"type": "byte",
"value": 1
},
"TrapFlag": {
"type": "byte",
"value": 0
},
"TrapOneShot": {
"type": "byte",
"value": 1
},
"TrapType": {
"type": "byte",
"value": 0
},
"Type": {
"type": "int",
"value": 0
},
"XOrientation": {
"type": "float",
"value": 0.0
},
"XPosition": {
"type": "float",
"value": 41.55159378051758
},
"YOrientation": {
"type": "float",
"value": 0.0
},
"YPosition": {
"type": "float",
"value": 7.09154224395752
},
"ZOrientation": {
"type": "float",
"value": 0.0
},
"ZPosition": {
"type": "float",
"value": -9.305114758717537e-007
}
},
{
"__struct_id": 1,
"AutoRemoveKey": {
"type": "byte",
"value": 0
},
"Cursor": {
"type": "byte",
"value": 0
},
"DisarmDC": {
"type": "byte",
"value": 0
},
"Faction": {
"type": "dword",
"value": 1
},
"Geometry": {
"type": "list",
"value": [
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -3.253374099731445
},
"PointY": {
"type": "float",
"value": 0.23516845703125
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -3.234580039978027
},
"PointY": {
"type": "float",
"value": -0.3316535949707031
},
"PointZ": {
"type": "float",
"value": 0.02500005997717381
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": 0.0
},
"PointY": {
"type": "float",
"value": 0.0
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
},
{
"__struct_id": 3,
"PointX": {
"type": "float",
"value": -0.02301931381225586
},
"PointY": {
"type": "float",
"value": 0.4862098693847656
},
"PointZ": {
"type": "float",
"value": 0.02500000037252903
}
}
]
},
"HighlightHeight": {
"type": "float",
"value": 0.0
},
"KeyName": {
"type": "cexostring",
"value": ""
},
"LinkedTo": {
"type": "cexostring",
"value": ""
},
"LinkedToFlags": {
"type": "byte",
"value": 0
},
"LoadScreenID": {
"type": "word",
"value": 0
},
"LocalizedName": {
"type": "cexolocstring",
"value": {
"0": "LevelUpSolo",
"id": 14759
}
},
"OnClick": {
"type": "resref",
"value": ""
},
"OnDisarm": {
"type": "resref",
"value": ""
},
"OnTrapTriggered": {
"type": "resref",
"value": ""
},
"PortraitId": {
"type": "word",
"value": 0
},
"ScriptHeartbeat": {
"type": "resref",
"value": ""
},
"ScriptOnEnter": {
"type": "resref",
"value": "ho_lvlup_pc"
},
"ScriptOnExit": {
"type": "resref",
"value": ""
},
"ScriptUserDefine": {
"type": "resref",
"value": ""
},
"Tag": {
"type": "cexostring",
"value": "LevelUpSolo"
},
"TemplateResRef": {
"type": "resref",
"value": "newgeneric"
},
"TrapDetectable": {
"type": "byte",
"value": 1
},
"TrapDetectDC": {
"type": "byte",
"value": 0
},
"TrapDisarmable": {
"type": "byte",
"value": 1
},
"TrapFlag": {
"type": "byte",
"value": 0
},
"TrapOneShot": {
"type": "byte",
"value": 1
},
"TrapType": {
"type": "byte",
"value": 0
},
"Type": {
"type": "int",
"value": 0
},
"XOrientation": {
"type": "float",
"value": 0.0
},
"XPosition": {
"type": "float",
"value": 41.70370864868164
},
"YOrientation": {
"type": "float",
"value": 0.0
},
"YPosition": {
"type": "float",
"value": 2.282023429870606
},
"ZOrientation": {
"type": "float",
"value": 0.0
},
"ZPosition": {
"type": "float",
"value": 2.316284053449635e-008
}
}
]

View File

@ -221,11 +221,11 @@
},
"Mod_Entry_X": {
"type": "float",
"value": 40.0
"value": 39.0
},
"Mod_Entry_Y": {
"type": "float",
"value": 5.0
"value": 4.0
},
"Mod_Entry_Z": {
"type": "float",

Binary file not shown.

BIN
_module/ncs/hu_lvlup_pc.ncs Normal file

Binary file not shown.

Binary file not shown.

View File

@ -3,13 +3,20 @@
void main()
{
//:: Declare major variables
object oPC = GetEnteringObject();
object oPC = GetEnteringObject();
string sTag = GetTag(OBJECT_SELF);
int iXP = GetXP(oPC);
int iParty = GetNumberPartyMembers(oPC);
//:: XP boost is only availible to new characters
if (iXP > 0 ) return;
if (iParty >= 2)
return;
//:: Make sure they can only get the boost once
if (GetLocalInt(oPC, sTag) >= 1) return;
GiveXPToCreature(oPC, 60000);
//:: Set variable on PC for XP boost.
SetLocalInt(oPC, sTag, 1);
//ActionStartConversation(oPC, "ho_lvlup_pc", TRUE, FALSE);
BeginConversation("ho_lvlup_pc", oPC);
}

View File

@ -0,0 +1,22 @@
#include "x0_i0_partywide"
void main()
{
//:: Declare major variables
object oPC = GetEnteringObject();
string sTag = GetTag(OBJECT_SELF);
int iXP = GetXP(oPC);
//:: XP boost is only availible to new characters
if (iXP > 0 ) return;
//:: Make sure they can only get the boost once
if (GetLocalInt(oPC, sTag) >= 1) return;
GiveXPToCreature(oPC, 60000);
//:: Set variable on PC for XP boost.
SetLocalInt(oPC, sTag, 1);
}