diff --git a/_module/are/townofascension.are.json b/_module/are/townofascension.are.json index bbfa3fe8..d07374d2 100644 --- a/_module/are/townofascension.are.json +++ b/_module/are/townofascension.are.json @@ -6357,7 +6357,7 @@ }, "Version": { "type": "dword", - "value": 520 + "value": 522 }, "Width": { "type": "int", diff --git a/_module/dlg/genisysconv.dlg.json b/_module/dlg/genisysconv.dlg.json index 01c0450c..43ca2119 100644 --- a/_module/dlg/genisysconv.dlg.json +++ b/_module/dlg/genisysconv.dlg.json @@ -50,6 +50,25 @@ "value": [ { "__struct_id": 0, + "Active": { + "type": "resref", + "value": "sc_isdm" + }, + "ConditionParams": { + "type": "list", + "value": [] + }, + "Index": { + "type": "dword", + "value": 1332 + }, + "IsChild": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 1, "Active": { "type": "resref", "value": "" @@ -68,7 +87,7 @@ } }, { - "__struct_id": 1, + "__struct_id": 2, "Active": { "type": "resref", "value": "isaspellcaster" @@ -87,7 +106,7 @@ } }, { - "__struct_id": 2, + "__struct_id": 3, "Active": { "type": "resref", "value": "" @@ -106,7 +125,7 @@ } }, { - "__struct_id": 3, + "__struct_id": 4, "Active": { "type": "resref", "value": "" @@ -125,7 +144,7 @@ } }, { - "__struct_id": 4, + "__struct_id": 5, "Active": { "type": "resref", "value": "" @@ -144,7 +163,7 @@ } }, { - "__struct_id": 5, + "__struct_id": 6, "Active": { "type": "resref", "value": "" @@ -163,7 +182,7 @@ } }, { - "__struct_id": 6, + "__struct_id": 7, "Active": { "type": "resref", "value": "" @@ -182,7 +201,7 @@ } }, { - "__struct_id": 7, + "__struct_id": 8, "Active": { "type": "resref", "value": "" @@ -201,7 +220,7 @@ } }, { - "__struct_id": 8, + "__struct_id": 9, "Active": { "type": "resref", "value": "" @@ -220,7 +239,7 @@ } }, { - "__struct_id": 9, + "__struct_id": 10, "Active": { "type": "resref", "value": "" @@ -239,7 +258,7 @@ } }, { - "__struct_id": 10, + "__struct_id": 11, "Active": { "type": "resref", "value": "" @@ -258,7 +277,7 @@ } }, { - "__struct_id": 11, + "__struct_id": 12, "Active": { "type": "resref", "value": "" @@ -42725,7 +42744,7 @@ }, "Index": { "type": "dword", - "value": 1332 + "value": 1333 }, "IsChild": { "type": "byte", @@ -42757,7 +42776,7 @@ }, "NumWords": { "type": "dword", - "value": 5295 + "value": 5297 }, "PreventZoomIn": { "type": "byte", @@ -134006,6 +134025,51 @@ "type": "dword", "value": 4294967295 }, + "EntriesList": { + "type": "list", + "value": [] + }, + "Quest": { + "type": "cexostring", + "value": "" + }, + "Script": { + "type": "resref", + "value": "at_resetserver" + }, + "Sound": { + "type": "resref", + "value": "" + }, + "Text": { + "type": "cexolocstring", + "value": { + "0": "[Reset Server]" + } + } + }, + { + "__struct_id": 1333, + "ActionParams": { + "type": "list", + "value": [] + }, + "Animation": { + "type": "dword", + "value": 0 + }, + "AnimLoop": { + "type": "byte", + "value": 1 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Delay": { + "type": "dword", + "value": 4294967295 + }, "EntriesList": { "type": "list", "value": [ diff --git a/_module/itp/creaturepalcus.itp.json b/_module/itp/creaturepalcus.itp.json index 27af5204..571dfd23 100644 --- a/_module/itp/creaturepalcus.itp.json +++ b/_module/itp/creaturepalcus.itp.json @@ -3913,6 +3913,44 @@ "LIST": { "type": "list", "value": [ + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 3.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Krenshar" + }, + "RESREF": { + "type": "resref", + "value": "krenshar002" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 6.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Krenshar Noble" + }, + "RESREF": { + "type": "resref", + "value": "krenshar001" + } + }, { "__struct_id": 0, "CR": { @@ -4119,44 +4157,6 @@ "value": "devour001" } }, - { - "__struct_id": 0, - "CR": { - "type": "float", - "value": 3.0 - }, - "FACTION": { - "type": "cexostring", - "value": "Hostile" - }, - "NAME": { - "type": "cexostring", - "value": "Krenshar" - }, - "RESREF": { - "type": "resref", - "value": "krenshar002" - } - }, - { - "__struct_id": 0, - "CR": { - "type": "float", - "value": 6.0 - }, - "FACTION": { - "type": "cexostring", - "value": "Hostile" - }, - "NAME": { - "type": "cexostring", - "value": "Krenshar Noble" - }, - "RESREF": { - "type": "resref", - "value": "krenshar001" - } - }, { "__struct_id": 0, "CR": { diff --git a/_module/ncs/airlessaura1.ncs b/_module/ncs/airlessaura1.ncs index 7961ea56..8c294006 100644 Binary files a/_module/ncs/airlessaura1.ncs and b/_module/ncs/airlessaura1.ncs differ diff --git a/_module/ncs/altardeath.ncs b/_module/ncs/altardeath.ncs index a3980c9c..72786c2d 100644 Binary files a/_module/ncs/altardeath.ncs and b/_module/ncs/altardeath.ncs differ diff --git a/_module/ncs/altardeath2.ncs b/_module/ncs/altardeath2.ncs index 771f9243..7a7ab4e3 100644 Binary files a/_module/ncs/altardeath2.ncs and b/_module/ncs/altardeath2.ncs differ diff --git a/_module/ncs/at_resetserver.ncs b/_module/ncs/at_resetserver.ncs new file mode 100644 index 00000000..a95c031e Binary files /dev/null and b/_module/ncs/at_resetserver.ncs differ diff --git a/_module/ncs/atropal_ai.ncs b/_module/ncs/atropal_ai.ncs index d2950bf3..7c1a3ed9 100644 Binary files a/_module/ncs/atropal_ai.ncs and b/_module/ncs/atropal_ai.ncs differ diff --git a/_module/ncs/atropaltouch.ncs b/_module/ncs/atropaltouch.ncs index af80ab69..ee86fd4f 100644 Binary files a/_module/ncs/atropaltouch.ncs and b/_module/ncs/atropaltouch.ncs differ diff --git a/_module/ncs/awesomeblow_hb.ncs b/_module/ncs/awesomeblow_hb.ncs index eaca50f1..6b5728fc 100644 Binary files a/_module/ncs/awesomeblow_hb.ncs and b/_module/ncs/awesomeblow_hb.ncs differ diff --git a/_module/ncs/bleakaura1.ncs b/_module/ncs/bleakaura1.ncs index d996f9bf..1fb9d873 100644 Binary files a/_module/ncs/bleakaura1.ncs and b/_module/ncs/bleakaura1.ncs differ diff --git a/_module/ncs/bleakaura2.ncs b/_module/ncs/bleakaura2.ncs index fce3eeaf..09a8160e 100644 Binary files a/_module/ncs/bleakaura2.ncs and b/_module/ncs/bleakaura2.ncs differ diff --git a/_module/ncs/bullrusher_hb.ncs b/_module/ncs/bullrusher_hb.ncs index 9081ae91..6dcce5c9 100644 Binary files a/_module/ncs/bullrusher_hb.ncs and b/_module/ncs/bullrusher_hb.ncs differ diff --git a/_module/ncs/cha_drain.ncs b/_module/ncs/cha_drain.ncs index 59752414..2d8c1418 100644 Binary files a/_module/ncs/cha_drain.ncs and b/_module/ncs/cha_drain.ncs differ diff --git a/_module/ncs/charger_hb.ncs b/_module/ncs/charger_hb.ncs index 70278056..d5e52267 100644 Binary files a/_module/ncs/charger_hb.ncs and b/_module/ncs/charger_hb.ncs differ diff --git a/_module/ncs/codi_ondeath.ncs b/_module/ncs/codi_ondeath.ncs index dac56dc6..72a9545c 100644 Binary files a/_module/ncs/codi_ondeath.ncs and b/_module/ncs/codi_ondeath.ncs differ diff --git a/_module/ncs/darktrigger.ncs b/_module/ncs/darktrigger.ncs index 3678fcf3..a3f08a15 100644 Binary files a/_module/ncs/darktrigger.ncs and b/_module/ncs/darktrigger.ncs differ diff --git a/_module/ncs/darktrigger2a.ncs b/_module/ncs/darktrigger2a.ncs index 025fa0b7..0d166dc2 100644 Binary files a/_module/ncs/darktrigger2a.ncs and b/_module/ncs/darktrigger2a.ncs differ diff --git a/_module/ncs/desecrating_aur1.ncs b/_module/ncs/desecrating_aur1.ncs index 4c8b5023..aba0a490 100644 Binary files a/_module/ncs/desecrating_aur1.ncs and b/_module/ncs/desecrating_aur1.ncs differ diff --git a/_module/ncs/dr_wraith_touch.ncs b/_module/ncs/dr_wraith_touch.ncs index 1543fa92..d4340828 100644 Binary files a/_module/ncs/dr_wraith_touch.ncs and b/_module/ncs/dr_wraith_touch.ncs differ diff --git a/_module/ncs/draining_touch.ncs b/_module/ncs/draining_touch.ncs index 51a50757..ee58ae18 100644 Binary files a/_module/ncs/draining_touch.ncs and b/_module/ncs/draining_touch.ncs differ diff --git a/_module/ncs/fear2_aura1.ncs b/_module/ncs/fear2_aura1.ncs index 642a3938..a3858996 100644 Binary files a/_module/ncs/fear2_aura1.ncs and b/_module/ncs/fear2_aura1.ncs differ diff --git a/_module/ncs/fear_aura1.ncs b/_module/ncs/fear_aura1.ncs index ffc3d0ef..d4a0ee73 100644 Binary files a/_module/ncs/fear_aura1.ncs and b/_module/ncs/fear_aura1.ncs differ diff --git a/_module/ncs/ghast_stench1.ncs b/_module/ncs/ghast_stench1.ncs index 54f7b26f..0c6ef859 100644 Binary files a/_module/ncs/ghast_stench1.ncs and b/_module/ncs/ghast_stench1.ncs differ diff --git a/_module/ncs/ghoul_bite.ncs b/_module/ncs/ghoul_bite.ncs index 8bc1bd3b..164f3086 100644 Binary files a/_module/ncs/ghoul_bite.ncs and b/_module/ncs/ghoul_bite.ncs differ diff --git a/_module/ncs/ghoul_claw.ncs b/_module/ncs/ghoul_claw.ncs index e227fad6..9f7aa666 100644 Binary files a/_module/ncs/ghoul_claw.ncs and b/_module/ncs/ghoul_claw.ncs differ diff --git a/_module/ncs/horsecrettrig1.ncs b/_module/ncs/horsecrettrig1.ncs index 55dd910b..94310027 100644 Binary files a/_module/ncs/horsecrettrig1.ncs and b/_module/ncs/horsecrettrig1.ncs differ diff --git a/_module/ncs/horsecrettrig2.ncs b/_module/ncs/horsecrettrig2.ncs index a248b309..46ff5170 100644 Binary files a/_module/ncs/horsecrettrig2.ncs and b/_module/ncs/horsecrettrig2.ncs differ diff --git a/_module/ncs/hunefer_rot.ncs b/_module/ncs/hunefer_rot.ncs index 444e9f81..e25d4431 100644 Binary files a/_module/ncs/hunefer_rot.ncs and b/_module/ncs/hunefer_rot.ncs differ diff --git a/_module/ncs/imp_grab.ncs b/_module/ncs/imp_grab.ncs index 09a51a10..7b4a2c66 100644 Binary files a/_module/ncs/imp_grab.ncs and b/_module/ncs/imp_grab.ncs differ diff --git a/_module/ncs/leetdeath.ncs b/_module/ncs/leetdeath.ncs index 55bdd83b..6312e316 100644 Binary files a/_module/ncs/leetdeath.ncs and b/_module/ncs/leetdeath.ncs differ diff --git a/_module/ncs/make_evolved.ncs b/_module/ncs/make_evolved.ncs index a03dabbc..d334e326 100644 Binary files a/_module/ncs/make_evolved.ncs and b/_module/ncs/make_evolved.ncs differ diff --git a/_module/ncs/melody1.ncs b/_module/ncs/melody1.ncs index c75987f5..b4599c07 100644 Binary files a/_module/ncs/melody1.ncs and b/_module/ncs/melody1.ncs differ diff --git a/_module/ncs/melody2.ncs b/_module/ncs/melody2.ncs index 6b036faf..486105eb 100644 Binary files a/_module/ncs/melody2.ncs and b/_module/ncs/melody2.ncs differ diff --git a/_module/ncs/moad_spawn.ncs b/_module/ncs/moad_spawn.ncs index 174662d7..7c6bbf74 100644 Binary files a/_module/ncs/moad_spawn.ncs and b/_module/ncs/moad_spawn.ncs differ diff --git a/_module/ncs/nw_s3_balordeth.ncs b/_module/ncs/nw_s3_balordeth.ncs index 3255b8f6..c91b32c1 100644 Binary files a/_module/ncs/nw_s3_balordeth.ncs and b/_module/ncs/nw_s3_balordeth.ncs differ diff --git a/_module/ncs/overrunner_hb.ncs b/_module/ncs/overrunner_hb.ncs index 0784ff8e..09e7a2f9 100644 Binary files a/_module/ncs/overrunner_hb.ncs and b/_module/ncs/overrunner_hb.ncs differ diff --git a/_module/ncs/plague_blight.ncs b/_module/ncs/plague_blight.ncs index 2bf99f9f..0086501d 100644 Binary files a/_module/ncs/plague_blight.ncs and b/_module/ncs/plague_blight.ncs differ diff --git a/_module/ncs/plagueaura1.ncs b/_module/ncs/plagueaura1.ncs index 635a2d14..46a64378 100644 Binary files a/_module/ncs/plagueaura1.ncs and b/_module/ncs/plagueaura1.ncs differ diff --git a/_module/ncs/plagueaura2.ncs b/_module/ncs/plagueaura2.ncs index 23b726d1..8cfd00c2 100644 Binary files a/_module/ncs/plagueaura2.ncs and b/_module/ncs/plagueaura2.ncs differ diff --git a/_module/ncs/prc_pwonspawn.ncs b/_module/ncs/prc_pwonspawn.ncs index 122ccfd0..50f9f570 100644 Binary files a/_module/ncs/prc_pwonspawn.ncs and b/_module/ncs/prc_pwonspawn.ncs differ diff --git a/_module/ncs/prgt_spawneg.ncs b/_module/ncs/prgt_spawneg.ncs index ac5bd7d5..c9b53a48 100644 Binary files a/_module/ncs/prgt_spawneg.ncs and b/_module/ncs/prgt_spawneg.ncs differ diff --git a/_module/ncs/queendeath2.ncs b/_module/ncs/queendeath2.ncs index d65c48a7..666d9406 100644 Binary files a/_module/ncs/queendeath2.ncs and b/_module/ncs/queendeath2.ncs differ diff --git a/_module/ncs/re_widget9.ncs b/_module/ncs/re_widget9.ncs index 1005b0cf..3af13245 100644 Binary files a/_module/ncs/re_widget9.ncs and b/_module/ncs/re_widget9.ncs differ diff --git a/_module/ncs/rotaura1.ncs b/_module/ncs/rotaura1.ncs index ef5efa0d..f499b8b6 100644 Binary files a/_module/ncs/rotaura1.ncs and b/_module/ncs/rotaura1.ncs differ diff --git a/_module/ncs/rotaura3.ncs b/_module/ncs/rotaura3.ncs index 123bff98..f76e8777 100644 Binary files a/_module/ncs/rotaura3.ncs and b/_module/ncs/rotaura3.ncs differ diff --git a/_module/ncs/sc_isdm.ncs b/_module/ncs/sc_isdm.ncs new file mode 100644 index 00000000..c66e34a9 Binary files /dev/null and b/_module/ncs/sc_isdm.ncs differ diff --git a/_module/ncs/sd_loot_corpse.ncs b/_module/ncs/sd_loot_corpse.ncs index 55c7a32a..c506b8f8 100644 Binary files a/_module/ncs/sd_loot_corpse.ncs and b/_module/ncs/sd_loot_corpse.ncs differ diff --git a/_module/ncs/sf_wingwand.ncs b/_module/ncs/sf_wingwand.ncs index edbcd395..43b1f98d 100644 Binary files a/_module/ncs/sf_wingwand.ncs and b/_module/ncs/sf_wingwand.ncs differ diff --git a/_module/ncs/sf_xp.ncs b/_module/ncs/sf_xp.ncs index ea8100b0..b2455033 100644 Binary files a/_module/ncs/sf_xp.ncs and b/_module/ncs/sf_xp.ncs differ diff --git a/_module/ncs/silenttrigger.ncs b/_module/ncs/silenttrigger.ncs index 728e58e1..9e22b5b0 100644 Binary files a/_module/ncs/silenttrigger.ncs and b/_module/ncs/silenttrigger.ncs differ diff --git a/_module/ncs/silenttrigger2.ncs b/_module/ncs/silenttrigger2.ncs index 90e8f4e5..2274260f 100644 Binary files a/_module/ncs/silenttrigger2.ncs and b/_module/ncs/silenttrigger2.ncs differ diff --git a/_module/ncs/skeletondeath.ncs b/_module/ncs/skeletondeath.ncs index 0fafc6db..072881d3 100644 Binary files a/_module/ncs/skeletondeath.ncs and b/_module/ncs/skeletondeath.ncs differ diff --git a/_module/ncs/stealbreath.ncs b/_module/ncs/stealbreath.ncs index 1fa47d9e..e64fb718 100644 Binary files a/_module/ncs/stealbreath.ncs and b/_module/ncs/stealbreath.ncs differ diff --git a/_module/ncs/trampler_hb.ncs b/_module/ncs/trampler_hb.ncs index ad7c1821..126d5043 100644 Binary files a/_module/ncs/trampler_hb.ncs and b/_module/ncs/trampler_hb.ncs differ diff --git a/_module/ncs/trap_respawner01.ncs b/_module/ncs/trap_respawner01.ncs index 9c3df19c..56adbded 100644 Binary files a/_module/ncs/trap_respawner01.ncs and b/_module/ncs/trap_respawner01.ncs differ diff --git a/_module/ncs/wraith_touch.ncs b/_module/ncs/wraith_touch.ncs index 920482d6..6787944b 100644 Binary files a/_module/ncs/wraith_touch.ncs and b/_module/ncs/wraith_touch.ncs differ diff --git a/_module/ncs/wwclaw.ncs b/_module/ncs/wwclaw.ncs index 1074449f..39af9536 100644 Binary files a/_module/ncs/wwclaw.ncs and b/_module/ncs/wwclaw.ncs differ diff --git a/_module/nss/at_resetserver.nss b/_module/nss/at_resetserver.nss new file mode 100644 index 00000000..727a42f5 --- /dev/null +++ b/_module/nss/at_resetserver.nss @@ -0,0 +1,36 @@ +#include "nwnx_admin" + +void RestartServer(object oSpeaker) +{ + if (!GetIsDM(oSpeaker)) + { + SendMessageToPC(oSpeaker, "You do not have permission to restart the server."); + return; + } + + // Broadcast the restart message to all players + string sMessage = "SERVER RESTART IN 10 SECONDS! The server will be back up in approximately 15 minutes."; + SpeakString(sMessage, TALKVOLUME_SHOUT); + + // Schedule the actual restart after 10 seconds + DelayCommand(10.0f, ExportAllCharacters()); + DelayCommand(10.0f, NWNX_Administration_ShutdownServer()); +} + + +void main() +{ + object oSpeaker = GetPCSpeaker(); + + if (GetIsDM(oSpeaker)) + { + SetPCChatMessage(""); // Clear the chat message + RestartServer(oSpeaker); + } + else + { + SendMessageToPC(oSpeaker, "You do not have permission to use this command."); + SetPCChatMessage(""); + } + return; +} diff --git a/_module/nss/nw_inc_gff.nss b/_module/nss/nw_inc_gff.nss new file mode 100644 index 00000000..533cf218 --- /dev/null +++ b/_module/nss/nw_inc_gff.nss @@ -0,0 +1,623 @@ +// This is a helper library for advanced use: It allows constructing arbitrary gff data. +// You can then spawn your object via JsonToObject(). +// +// The data format is the same as https://github.com/niv/neverwinter.nim@1.4.3+. +// +// Example: +// +// json j = GffCreateObject(OBJECT_TYPE_ITEM); +// j = GffAddInt(j, "BaseItem", BASE_ITEM_BELT); +// j = GffAddInt(j, "ModelPart1", 12); +// j = GffAddLocString(j, "LocalizedName", "hi!"); +// object belt = JsonToObject(j, GetLocation(OBJECT_SELF)); + + +const string GFF_FIELD_TYPE_STRUCT = "struct"; +const string GFF_FIELD_TYPE_LIST = "list"; +const string GFF_FIELD_TYPE_BYTE = "byte"; +const string GFF_FIELD_TYPE_CHAR = "char"; +const string GFF_FIELD_TYPE_WORD = "word"; +const string GFF_FIELD_TYPE_SHORT = "short"; +const string GFF_FIELD_TYPE_DWORD = "dword"; +const string GFF_FIELD_TYPE_INT = "int"; +const string GFF_FIELD_TYPE_DWORD64 = "dword64"; +const string GFF_FIELD_TYPE_INT64 = "int64"; +const string GFF_FIELD_TYPE_FLOAT = "float"; +const string GFF_FIELD_TYPE_DOUBLE = "double"; +const string GFF_FIELD_TYPE_RESREF = "resref"; +const string GFF_FIELD_TYPE_STRING = "cexostring"; +const string GFF_FIELD_TYPE_LOC_STRING = "cexolocstring"; + + +// Create a empty object of the given type. You need to manually fill in all +// GFF data with GffAddXXX. This will require understanding of the GFF file format +// and what data fields each object type requires. +json GffCreateObject(int nObjectType); +// Create a combined area format(CAF) object. You need to manually create the ARE and GIT objects with their required data fields. +json GffCreateArea(json jARE, json jGIT); + +// Returns the OBJECT_TYPE_* of jGff. +// Note: Will return 0 for invalid object types, including areas. +int GffGetObjectType(json jGff); +// Returns TRUE if jGff is a combined area format(CAF) object. +int GffGetIsArea(json jGff); + +// Returns TRUE if a field named sLabel of sType exists in jGff. +// * sLabel: Can be a json pointer(path) without the starting /, see the documentation of JsonPointer() for details. +// * sType: An optional GFF_FIELD_TYPE_*, leave empty to check if sLabel exists regardless of type. +int GffGetFieldExists(json jGff, string sLabel, string sType = ""); + + +// Add a new field, will overwrite any existing fields with the same label even if the type is different. +// Returns a json null value on error with GetJsonError() filled in. +// +// sLabel can be a json pointer(path) without the starting /, see the documentation of JsonPointer() for details. +// For example, to add the tag of an area to an empty combined area format(CAF) object you can do the following: +// json jArea = GffCreateArea(JsonObject(), JsonObject()); +// jArea = GffAddString(jArea, "ARE/value/Tag", "AREA_TAG"); + +json GffAddStruct(json jGff, string sLabel, json jStruct, int nType = -1); +json GffAddList(json jGff, string sLabel, json jList); +json GffAddByte(json jGff, string sLabel, int v); +json GffAddChar(json jGff, string sLabel, int v); +json GffAddWord(json jGff, string sLabel, int v); +json GffAddShort(json jGff, string sLabel, int v); +// Note: Only data of type int32 will fit, because that's all that NWScript supports. +json GffAddDword(json jGff, string sLabel, int v); +json GffAddInt(json jGff, string sLabel, int v); +// Note: Only data of type int32 will fit, because that's all that NWScript supports. +json GffAddDword64(json jGff, string sLabel, int v); +// Note: Only data of type int32 will fit, because that's all that NWScript supports. +json GffAddInt64(json jGff, string sLabel, int v); +json GffAddFloat(json jGff, string sLabel, float v); +// Note: Only data of type float will fit, because that's all that NWScript supports. +json GffAddDouble(json jGff, string sLabel, float v); +json GffAddResRef(json jGff, string sLabel, string v); +json GffAddString(json jGff, string sLabel, string v); +json GffAddLocString(json jGff, string sLabel, string v, int nStrRef = -1); + + +// Replace a field, the type must match and the field must exist. +// Returns a json null value on error with GetJsonError() filled in. +// +// sLabel can be a json pointer(path) without the starting /, see the documentation of JsonPointer() for details. +// For example, to replace the name of an area in a combined area format(CAF) object you can do the following: +// json jArea = ObjectToStruct(GetFirstArea()); +// jArea = GffReplaceLocString(jArea, "ARE/value/Name", "New Area Name"); + +json GffReplaceStruct(json jGff, string sLabel, json jStruct); +json GffReplaceList(json jGff, string sLabel, json jList); +json GffReplaceByte(json jGff, string sLabel, int v); +json GffReplaceChar(json jGff, string sLabel, int v); +json GffReplaceWord(json jGff, string sLabel, int v); +json GffReplaceShort(json jGff, string sLabel, int v); +// Note: Only data of type int32 will fit, because that's all that NWScript supports. +json GffReplaceDword(json jGff, string sLabel, int v); +json GffReplaceInt(json jGff, string sLabel, int v); +// Note: Only data of type int32 will fit, because that's all that NWScript supports. +json GffReplaceDword64(json jGff, string sLabel, int v); +// Note: Only data of type int32 will fit, because that's all that NWScript supports. +json GffReplaceInt64(json jGff, string sLabel, int v); +json GffReplaceFloat(json jGff, string sLabel, float v); +// Note: Only data of type float will fit, because that's all that NWScript supports. +json GffReplaceDouble(json jGff, string sLabel, float v); +json GffReplaceResRef(json jGff, string sLabel, string v); +json GffReplaceString(json jGff, string sLabel, string v); +json GffReplaceLocString(json jGff, string sLabel, string v, int nStrRef = -1); + + +// Remove a field, the type must match and the field must exist. +// Returns a json null value on error with GetJsonError() filled in. +// +// sLabel can be a json pointer(path) without the starting /, see the documentation of JsonPointer() for details. +// For example, to remove all placeables from an area in a combined area format(CAF) object you can do the following: +// json jArea = ObjectToStruct(GetFirstArea()); +// jArea = GffRemoveList(jArea, "GIT/value/Placeable List"); + +json GffRemoveStruct(json jGff, string sLabel); +json GffRemoveList(json jGff, string sLabel); +json GffRemoveByte(json jGff, string sLabel); +json GffRemoveChar(json jGff, string sLabel); +json GffRemoveWord(json jGff, string sLabel); +json GffRemoveShort(json jGff, string sLabel); +json GffRemoveDword(json jGff, string sLabel); +json GffRemoveInt(json jGff, string sLabel); +json GffRemoveDword64(json jGff, string sLabel); +json GffRemoveInt64(json jGff, string sLabel); +json GffRemoveFloat(json jGff, string sLabel); +json GffRemoveDouble(json jGff, string sLabel); +json GffRemoveResRef(json jGff, string sLabel); +json GffRemoveString(json jGff, string sLabel); +json GffRemoveLocString(json jGff, string sLabel); + + +// Get a field's value as json object. +// Returns a json null value on error with GetJsonError() filled in. +// +// Note: Json types do not implicitly convert between types, this means you cannot convert a JsonInt to a string with JsonGetString(), etc. +// You may need to check the type with JsonGetType() and then do the appropriate cast yourself. +// For GffGet*() functions the json type returned is noted in the function description. +// +// Example: +// INCORRECT: string s = JsonGetString(GffGetInt()); +// CORRECT: string s = IntToString(JsonGetInt(GffGetInt())); +// +// sLabel can be a json pointer(path) without the starting /, see the documentation of JsonPointer() for details. +// For example, to get the resref of an area in a combined area format(CAF) object you can do the following: +// json jResRef = GffGetResRef(ObjectToStruct(GetFirstArea()), "ARE/value/ResRef"); +// if (jResRef != JsonNull()) +// { +// string sResRef = JsonGetString(jResRef); +// } +// else +// WriteTimestampedLogEntry("Failed to get area ResRef: " + JsonGetError(jResRef)); + +// Returns the struct as JsonObject() on success. +json GffGetStruct(json jGff, string sLabel); +// Returns a JsonArray() with all the list elements on success. +json GffGetList(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetByte(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetChar(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetWord(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetShort(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetDword(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetInt(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetDword64(json jGff, string sLabel); +// Returns a JsonInt() on success. +json GffGetInt64(json jGff, string sLabel); +// Returns a JsonFloat() on success. +json GffGetFloat(json jGff, string sLabel); +// Returns a JsonFloat() on success. +json GffGetDouble(json jGff, string sLabel); +// Returns a JsonString() on success. +json GffGetResRef(json jGff, string sLabel); +// Returns a JsonString() on success. +json GffGetString(json jGff, string sLabel); +// Returns a JsonObject() on success. +// Key "0" will have a JsonString() with the string, if set. +// Key "id" will have a JsonInt() with the strref, if set. +json GffGetLocString(json jGff, string sLabel); + + +// *** Internal Helper Functions +json AddPatchOperation(json jPatchArray, string sOp, string sPath, json jValue) +{ + json jOperation = JsonObject(); + jOperation = JsonObjectSet(jOperation, "op", JsonString(sOp)); + jOperation = JsonObjectSet(jOperation, "path", JsonString(sPath)); + jOperation = JsonObjectSet(jOperation, "value", jValue); + return JsonArrayInsert(jPatchArray, jOperation); +} + +json GffAddField(json jGff, string sLabel, string sType, json jValue, int nType = -1) +{ + json jField = JsonObject(); + jField = JsonObjectSet(jField, "type", JsonString(sType)); + jField = JsonObjectSet(jField, "value", jValue); + if (sType == GFF_FIELD_TYPE_STRUCT && nType != -1) + jField = JsonObjectSet(jField, "__struct_id", JsonInt(nType)); + + return JsonPatch(jGff, AddPatchOperation(JsonArray(), "add", "/" + sLabel, jField)); +} + +json GffReplaceField(json jGff, string sLabel, string sType, json jValue) +{ + json jPatch = JsonArray(); + jPatch = AddPatchOperation(jPatch, "test", "/" + sLabel + "/type", JsonString(sType)); + jPatch = AddPatchOperation(jPatch, "replace", "/" + sLabel + "/value", jValue); + return JsonPatch(jGff, jPatch); +} + +json GffRemoveField(json jGff, string sLabel, string sType) +{ + json jPatch = JsonArray(); + jPatch = AddPatchOperation(jPatch, "test", "/" + sLabel + "/type", JsonString(sType)); + jPatch = AddPatchOperation(jPatch, "remove", "/" + sLabel, JsonNull()); + return JsonPatch(jGff, jPatch); +} + +json GffGetFieldType(json jGff, string sLabel) +{ + return JsonPointer(jGff, "/" + sLabel + "/type"); +} + +json GffGetFieldValue(json jGff, string sLabel) +{ + return JsonPointer(jGff, "/" + sLabel + "/value"); +} + +json GffGetField(json jGff, string sLabel, string sType) +{ + json jType = GffGetFieldType(jGff, sLabel); + if (jType == JsonNull()) + return jType; + else if (jType != JsonString(sType)) + return JsonNull("field type does not match"); + else + return GffGetFieldValue(jGff, sLabel); +} + +json GffLocString(string v, int nStrRef = -1) +{ + json jLocString = JsonObject(); + if (v != "") + jLocString = JsonObjectSet(jLocString, "0", JsonString(v)); // english/any + if (nStrRef != -1) + jLocString = JsonObjectSet(jLocString, "id", JsonInt(nStrRef)); + + return jLocString; +} +//*** + +json GffCreateObject(int nObjectType) +{ + string ot; + if (nObjectType == OBJECT_TYPE_CREATURE) ot = "UTC "; + else if (nObjectType == OBJECT_TYPE_ITEM) ot = "UTI "; + else if (nObjectType == OBJECT_TYPE_TRIGGER) ot = "UTT "; + else if (nObjectType == OBJECT_TYPE_DOOR) ot = "UTD "; + else if (nObjectType == OBJECT_TYPE_WAYPOINT) ot = "UTW "; + else if (nObjectType == OBJECT_TYPE_PLACEABLE) ot = "UTP "; + else if (nObjectType == OBJECT_TYPE_STORE) ot = "UTM "; + else if (nObjectType == OBJECT_TYPE_ENCOUNTER) ot = "UTE "; + + if (ot == "") return JsonNull("invalid object type"); + + json ret = JsonObject(); + ret = JsonObjectSet(ret, "__data_type", JsonString(ot)); + return ret; +} + +json GffCreateArea(json jARE, json jGIT) +{ + json jCAF = JsonObject(); + jCAF = JsonObjectSet(jCAF, "__data_type", JsonString("CAF ")); + jCAF = GffAddStruct(jCAF, "ARE", jARE, 0); + jCAF = GffAddStruct(jCAF, "GIT", jGIT, 1); + return jCAF; +} + + +int GffGetObjectType(json jGff) +{ + json jDataType = JsonObjectGet(jGff, "__data_type"); + if (jDataType == JsonNull()) + return 0; + else + { + string sObjectType = JsonGetString(jDataType); + + if (sObjectType == "UTC ") return OBJECT_TYPE_CREATURE; + else if (sObjectType == "UTI ") return OBJECT_TYPE_ITEM; + else if (sObjectType == "UTT ") return OBJECT_TYPE_TRIGGER; + else if (sObjectType == "UTD ") return OBJECT_TYPE_DOOR; + else if (sObjectType == "UTW ") return OBJECT_TYPE_WAYPOINT; + else if (sObjectType == "UTP ") return OBJECT_TYPE_PLACEABLE; + else if (sObjectType == "UTM ") return OBJECT_TYPE_STORE; + else if (sObjectType == "UTE ") return OBJECT_TYPE_ENCOUNTER; + } + + return 0; +} + +int GffGetIsArea(json jGff) +{ + return JsonObjectGet(jGff, "__data_type") == JsonString("CAF "); +} + +int GffGetFieldExists(json jGff, string sLabel, string sType = "") +{ + json jFieldType = GffGetFieldType(jGff, sLabel); + return sType == "" ? jFieldType != JsonNull() : jFieldType == JsonString(sType); +} + + +json GffAddStruct(json jGff, string sLabel, json jStruct, int nType = -1) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_STRUCT, jStruct, nType); +} + +json GffAddList(json jGff, string sLabel, json jList) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_LIST, jList); +} + +json GffAddByte(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_BYTE, JsonInt(v)); +} + +json GffAddChar(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_CHAR, JsonInt(v)); +} + +json GffAddWord(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_WORD, JsonInt(v)); +} + +json GffAddShort(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_SHORT, JsonInt(v)); +} + +json GffAddDword(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_DWORD, JsonInt(v)); +} + +json GffAddInt(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_INT, JsonInt(v)); +} + +json GffAddDword64(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_DWORD64, JsonInt(v)); +} + +json GffAddInt64(json jGff, string sLabel, int v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_INT64, JsonInt(v)); +} + +json GffAddFloat(json jGff, string sLabel, float v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_FLOAT, JsonFloat(v)); +} + +json GffAddDouble(json jGff, string sLabel, float v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_DOUBLE, JsonFloat(v)); +} + +json GffAddResRef(json jGff, string sLabel, string v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_RESREF, JsonString(v)); +} + +json GffAddString(json jGff, string sLabel, string v) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_STRING, JsonString(v)); +} + +json GffAddLocString(json jGff, string sLabel, string v, int nStrRef = -1) +{ + return GffAddField(jGff, sLabel, GFF_FIELD_TYPE_LOC_STRING, GffLocString(v, nStrRef)); +} + + +json GffReplaceStruct(json jGff, string sLabel, json jStruct) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_STRUCT, jStruct); +} + +json GffReplaceList(json jGff, string sLabel, json jList) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_LIST, jList); +} + +json GffReplaceByte(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_BYTE, JsonInt(v)); +} + +json GffReplaceChar(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_CHAR, JsonInt(v)); +} + +json GffReplaceWord(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_WORD, JsonInt(v)); +} + +json GffReplaceShort(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_SHORT, JsonInt(v)); +} + +json GffReplaceDword(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_DWORD, JsonInt(v)); +} + +json GffReplaceInt(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_INT, JsonInt(v)); +} + +json GffReplaceDword64(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_DWORD64, JsonInt(v)); +} + +json GffReplaceInt64(json jGff, string sLabel, int v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_INT64, JsonInt(v)); +} + +json GffReplaceFloat(json jGff, string sLabel, float v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_FLOAT, JsonFloat(v)); +} + +json GffReplaceDouble(json jGff, string sLabel, float v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_DOUBLE, JsonFloat(v)); +} + +json GffReplaceResRef(json jGff, string sLabel, string v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_RESREF, JsonString(v)); +} + +json GffReplaceString(json jGff, string sLabel, string v) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_STRING, JsonString(v)); +} + +json GffReplaceLocString(json jGff, string sLabel, string v, int nStrRef = -1) +{ + return GffReplaceField(jGff, sLabel, GFF_FIELD_TYPE_LOC_STRING, GffLocString(v, nStrRef)); +} + + +json GffRemoveStruct(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_STRUCT); +} + +json GffRemoveList(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_LIST); +} + +json GffRemoveByte(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_BYTE); +} + +json GffRemoveChar(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_CHAR); +} + +json GffRemoveWord(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_WORD); +} + +json GffRemoveShort(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_SHORT); +} + +json GffRemoveDword(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_DWORD); +} + +json GffRemoveInt(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_INT); +} + +json GffRemoveDword64(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_DWORD64); +} + +json GffRemoveInt64(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_INT64); +} + +json GffRemoveFloat(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_FLOAT); +} + +json GffRemoveDouble(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_DOUBLE); +} + +json GffRemoveResRef(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_RESREF); +} + +json GffRemoveString(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_STRING); +} + +json GffRemoveLocString(json jGff, string sLabel) +{ + return GffRemoveField(jGff, sLabel, GFF_FIELD_TYPE_LOC_STRING); +} + + +json GffGetStruct(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_STRUCT); +} + +json GffGetList(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_LIST); +} + +json GffGetByte(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_BYTE); +} + +json GffGetChar(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_CHAR); +} + +json GffGetWord(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_WORD); +} + +json GffGetShort(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_SHORT); +} + +json GffGetDword(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_DWORD); +} + +json GffGetInt(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_INT); +} + +json GffGetDword64(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_DWORD64); +} + +json GffGetInt64(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_INT64); +} + +json GffGetFloat(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_FLOAT); +} + +json GffGetDouble(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_DOUBLE); +} + +json GffGetResRef(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_RESREF); +} + +json GffGetString(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_STRING); +} + +json GffGetLocString(json jGff, string sLabel) +{ + return GffGetField(jGff, sLabel, GFF_FIELD_TYPE_LOC_STRING); +} diff --git a/_module/nss/sc_isdm.nss b/_module/nss/sc_isdm.nss new file mode 100644 index 00000000..5b23a9e8 --- /dev/null +++ b/_module/nss/sc_isdm.nss @@ -0,0 +1,13 @@ +int StartingConditional() +{ + // Get the PC who is involved in this conversation + object oPC = GetPCSpeaker(); + + if(GetIsDM(oPC)) + { + return TRUE; + } + + // If we make it this far, we have passed all tests. + return FALSE; +} diff --git a/_module/utc/krenshar001.utc.json b/_module/utc/krenshar001.utc.json index 17b1d0a6..e69a3fb3 100644 --- a/_module/utc/krenshar001.utc.json +++ b/_module/utc/krenshar001.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -232,7 +232,7 @@ }, "PaletteID": { "type": "byte", - "value": 13 + "value": 49 }, "PerceptionRange": { "type": "byte", @@ -260,55 +260,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "x2_def_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "x2_def_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "x2_def_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "x2_def_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "x2_def_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "x2_def_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "x2_def_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "x2_def_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "x2_def_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "x2_def_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "x2_def_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "x2_def_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "x2_def_userdef" }, "SkillList": { "type": "list", @@ -644,7 +644,7 @@ }, "StartingPackage": { "type": "byte", - "value": 0 + "value": 85 }, "Str": { "type": "byte", diff --git a/_module/utc/krenshar002.utc.json b/_module/utc/krenshar002.utc.json index df3575d7..dd1512b1 100644 --- a/_module/utc/krenshar002.utc.json +++ b/_module/utc/krenshar002.utc.json @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -189,7 +189,7 @@ }, "PaletteID": { "type": "byte", - "value": 13 + "value": 49 }, "PerceptionRange": { "type": "byte", @@ -217,55 +217,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "x2_def_attacked" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "x2_def_ondamage" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "x2_def_ondeath" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "x2_def_onconv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "x2_def_ondisturb" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "x2_def_endcombat" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "x2_def_heartbeat" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "x2_def_onblocked" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "x2_def_percept" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "x2_def_rested" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "x2_def_spawn" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "x2_def_spellcast" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "x2_def_userdef" }, "SkillList": { "type": "list", @@ -601,7 +601,7 @@ }, "StartingPackage": { "type": "byte", - "value": 0 + "value": 85 }, "Str": { "type": "byte",