2025/12/16 Update
Updated PEPS Hooked up new GUI module event. Updated classes.2da Updated baseitems.2da Updated nim tools. Full compile.
This commit is contained in:
@@ -410,7 +410,8 @@ void ai_CreateAIMainNUI(object oPC)
|
||||
jGroupRow = CreateTextEditBox(JsonArray(), "sPlaceHolder", "txt_perception_distance", 2, FALSE, 35.0f, 20.0f, "txt_perception_distance_tooltip");
|
||||
jGroupRow = CreateLabel(jGroupRow, "meters is the distance a monster can respond to allies.", "lbl_perception_distance", 411.0f, 20.0f, NUI_HALIGN_LEFT, 0, 0.0, "txt_perception_distance_tooltip");
|
||||
jGroupCol = JsonArrayInsert(jGroupCol, NuiRow(jGroupRow));
|
||||
jGroupRow = CreateCheckBox(JsonArray(), " Monsters can prebuff before combat starts.", "chbx_buff_monsters", 450.0, 20.0);
|
||||
jGroupRow = CreateCheckBox(JsonArray(), " Monsters buff before combat starts.", "chbx_buff_monsters", 275.0, 20.0, "chbx_buff_monsters_tooltip");
|
||||
jGroupRow = CreateCheckBox(jGroupRow, " Will use all buff spells!", "chbx_full_buff", 210.0, 20.0, "chbx_full_buff_tooltip");
|
||||
jGroupCol = JsonArrayInsert(jGroupCol, NuiRow(jGroupRow));
|
||||
jGroupRow = CreateCheckBox(JsonArray(), " Monsters can use summons before combat starts.", "chbx_buff_summons", 450.0, 20.0);
|
||||
jGroupCol = JsonArrayInsert(jGroupCol, NuiRow(jGroupRow));
|
||||
@@ -454,7 +455,7 @@ void ai_CreateAIMainNUI(object oPC)
|
||||
if(GetStringRight(sName, 1) == "s") sName = sName + "'";
|
||||
else sName = sName + "'s";
|
||||
int nToken = SetWindow(oPC, jLayout, AI_MAIN_NUI, sName + " PEPS Main Menu",
|
||||
fX, fY, 534.0f, fHeight, FALSE, FALSE, TRUE, FALSE, TRUE, "0e_nui");
|
||||
fX, fY, 554.0f, fHeight, FALSE, FALSE, TRUE, FALSE, TRUE, "0e_nui");
|
||||
// Save the associate to the nui for use in 0e_nui
|
||||
json jData = JsonArray();
|
||||
jData = JsonArrayInsert(jData, JsonString(ObjectToString(oPC)));
|
||||
@@ -537,9 +538,15 @@ void ai_CreateAIMainNUI(object oPC)
|
||||
NuiSetBind(oPC, nToken, "txt_ai_difficulty", JsonString(IntToString(GetLocalInt(oModule, AI_RULE_AI_DIFFICULTY))));
|
||||
NuiSetBindWatch(oPC, nToken, "txt_ai_difficulty", TRUE);
|
||||
NuiSetBind(oPC, nToken, "txt_ai_difficulty_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_monsters_check", JsonBool(GetLocalInt(oModule, AI_RULE_BUFF_MONSTERS)));
|
||||
int bMonsterBuff = GetLocalInt(oModule, AI_RULE_BUFF_MONSTERS);
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_monsters_check", JsonBool(bMonsterBuff));
|
||||
NuiSetBindWatch(oPC, nToken, "chbx_buff_monsters_check", TRUE);
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_monsters_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_monsters_tooltip", JsonString(" Monsters will cast all longer duration buff spells just before combat starts."));
|
||||
NuiSetBind(oPC, nToken, "chbx_full_buff_check", JsonBool(GetLocalInt(oModule, AI_RULE_FULL_BUFF_MONSTERS)));
|
||||
NuiSetBindWatch(oPC, nToken, "chbx_full_buff_check", TRUE);
|
||||
NuiSetBind(oPC, nToken, "chbx_full_buff_event", JsonBool(bMonsterBuff));
|
||||
NuiSetBind(oPC, nToken, "chbx_full_buff_tooltip", JsonString(" Monsters will cast all buff spells just before combat starts! VERY DIFFICULTY!"));
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_summons_check", JsonBool(GetLocalInt(oModule, AI_RULE_PRESUMMON)));
|
||||
NuiSetBindWatch(oPC, nToken, "chbx_buff_summons_check", TRUE);
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_summons_event", JsonBool(TRUE));
|
||||
@@ -595,6 +602,7 @@ void ai_CreateAIMainNUI(object oPC)
|
||||
NuiSetBind(oPC, nToken, "txt_inc_enc_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "txt_inc_hp", JsonString(IntToString(GetLocalInt(oModule, AI_INCREASE_MONSTERS_HP))));
|
||||
NuiSetBindWatch(oPC, nToken, "txt_inc_hp", TRUE);
|
||||
NuiSetBind(oPC, nToken, "txt_inc_hp_tooltip", JsonString(" Will increase ALL monsters hitpoints by the%. Upto 500% or 6 times the normal health!"));
|
||||
NuiSetBind(oPC, nToken, "txt_inc_hp_event", JsonBool(TRUE));
|
||||
}
|
||||
if(nMonsterAI || nAssociateAI)
|
||||
@@ -1272,21 +1280,24 @@ void ai_CreateAssociateCommandNUI(object oPC, object oAssociate)
|
||||
NuiSetBindWatch (oPC, nToken, "chbx_buff_short_check", TRUE);
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_short_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_short_event", JsonBool (TRUE));
|
||||
float fDelay = GetLocalFloat(oAssociate, AI_DELAY_BUFF_CASTING);
|
||||
if(fDelay < 0.1) fDelay = 0.1;
|
||||
string sDelay = FloatToString(fDelay, 0, 1);
|
||||
NuiSetBind (oPC, nToken, "btn_buff_short_tooltip", JsonString (
|
||||
" Buff the party with short duration spells"));
|
||||
" Buff the party with short duration spells. Cast speed [" + sDelay + "]"));
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_long_check", JsonBool (bBuffLong));
|
||||
NuiSetBindWatch (oPC, nToken, "chbx_buff_long_check", TRUE);
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_long_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_long_event", JsonBool (TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_long_tooltip", JsonString (
|
||||
" Buff the party with long duration spells"));
|
||||
" Buff the party with long duration spells. Cast speed [" + sDelay + "]"));
|
||||
// Row 11
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_all_check", JsonBool (bBuffAll));
|
||||
NuiSetBindWatch (oPC, nToken, "chbx_buff_all_check", TRUE);
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_all_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_all_event", JsonBool (TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_all_tooltip", JsonString (
|
||||
" Buff the party with all our defensive spells"));
|
||||
" Buff the party with all spells. Cast speed [" + sDelay + "]"));
|
||||
if(!bIsPC && ResManGetAliasFor("prc_ai_fam_percp", RESTYPE_NCS) == "")
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "chbx_buff_rest_check", JsonBool (bBuffRest));
|
||||
@@ -1466,7 +1477,7 @@ void ai_CreateAssociateAINUI(object oPC, object oAssociate)
|
||||
fHeight += 28.0;
|
||||
}
|
||||
// Row 3 ******************************************************************* 500 / 101
|
||||
bRight = !ai_GetDMAIAccessButton(BTN_AI_FOR_PC);
|
||||
bRight = TRUE;//!ai_GetDMAIAccessButton(BTN_AI_FOR_PC);
|
||||
bLeft = !ai_GetDMAIAccessButton(BTN_AI_REDUCE_SPEECH);
|
||||
if(bRight || bLeft)
|
||||
{
|
||||
@@ -1828,7 +1839,7 @@ void ai_CreateAssociateAINUI(object oPC, object oAssociate)
|
||||
NuiSetBind(oPC, nToken, "btn_loot_filter", JsonInt(TRUE));
|
||||
// Row 3
|
||||
// Only activate ai on/off if this is for the pc.
|
||||
if(bIsPC && ResManGetAliasFor("prc_ai_fam_percp", RESTYPE_NCS) == "")
|
||||
if(bIsPC && TRUE)//ResManGetAliasFor("prc_ai_fam_percp", RESTYPE_NCS) == "")
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "chbx_ai_check", JsonBool(bAI));
|
||||
NuiSetBindWatch (oPC, nToken, "chbx_ai_check", TRUE);
|
||||
@@ -2060,7 +2071,14 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
// Set event watches for save window location.
|
||||
NuiSetBindWatch(oPC, nToken, "window_geometry", TRUE);
|
||||
// Set the buttons to show events.
|
||||
NuiSetBind(oPC, nToken, "btn_open_main_image", JsonString(GetPortraitResRef(oAssociate) + "s"));
|
||||
string sPortrait = GetPortraitResRef(oAssociate);
|
||||
string sSize;
|
||||
if(ResManGetAliasFor(sPortrait + "s", RESTYPE_TGA) != "") sSize = "s";
|
||||
else if(ResManGetAliasFor(sPortrait + "m", RESTYPE_TGA) != "") sSize = "m";
|
||||
else if(ResManGetAliasFor(sPortrait + "l", RESTYPE_TGA)!= "") sSize = "l";
|
||||
else if(ResManGetAliasFor(sPortrait + "h", RESTYPE_TGA)!= "") sSize = "h";
|
||||
else sSize = "m";
|
||||
NuiSetBind(oPC, nToken, "btn_open_main_image", JsonString(sPortrait + sSize));
|
||||
NuiSetBind(oPC, nToken, "btn_open_main_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_open_main_tooltip", JsonString(" " + sName + " widget menu"));
|
||||
if(ai_GetWidgetButton(oPC, BTN_ASSOC_WIDGETS_OFF, oAssociate, sAssociateType))
|
||||
@@ -2215,17 +2233,29 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
if(ai_GetWidgetButton(oPC, BTN_BUFF_SHORT, oAssociate, sAssociateType))
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "btn_buff_short_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_short_tooltip", JsonString(" Buff the party with short duration spells"));
|
||||
float fDelay = GetLocalFloat(oAssociate, AI_DELAY_BUFF_CASTING);
|
||||
if(fDelay < 0.1) fDelay = 0.1;
|
||||
string sDelay = FloatToString(fDelay, 0, 1);
|
||||
NuiSetBind (oPC, nToken, "btn_buff_short_tooltip", JsonString(
|
||||
" Buff the party with short duration spells. Cast speed [" + sDelay + "]"));
|
||||
}
|
||||
if(ai_GetWidgetButton(oPC, BTN_BUFF_LONG, oAssociate, sAssociateType))
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "btn_buff_long_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_long_tooltip", JsonString(" Buff the party with long duration spells"));
|
||||
float fDelay = GetLocalFloat(oAssociate, AI_DELAY_BUFF_CASTING);
|
||||
if(fDelay < 0.1) fDelay = 0.1;
|
||||
string sDelay = FloatToString(fDelay, 0, 1);
|
||||
NuiSetBind (oPC, nToken, "btn_buff_long_tooltip", JsonString(
|
||||
" Buff the party with long duration spells. Cast speed [" + sDelay + "]"));
|
||||
}
|
||||
if(ai_GetWidgetButton(oPC, BTN_BUFF_ALL, oAssociate, sAssociateType))
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "btn_buff_all_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_buff_all_tooltip", JsonString(" Buff the party with all our defensive spells"));
|
||||
float fDelay = GetLocalFloat(oAssociate, AI_DELAY_BUFF_CASTING);
|
||||
if(fDelay < 0.1) fDelay = 0.1;
|
||||
string sDelay = FloatToString(fDelay, 0, 1);
|
||||
NuiSetBind (oPC, nToken, "btn_buff_all_tooltip", JsonString(
|
||||
" Buff the party with all spells. Cast speed [" + sDelay + "]"));
|
||||
}
|
||||
if(ai_GetWidgetButton(oPC, BTN_CMD_JUMP_TO, oAssociate, sAssociateType))
|
||||
{
|
||||
@@ -2488,7 +2518,7 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
object oItem;
|
||||
if(JsonGetType(jWidget) != JSON_TYPE_NULL)
|
||||
{
|
||||
int nLevel, nSpell, nIndex, nClass, nMetaMagic, nDomain, nSubSpell, nFeat, nSAIndex;
|
||||
int nLevel, nSpell, nIndex, nClass, nMetaMagic, nDomain, nSubSpell, nFeat, nSAIndex, nUses;
|
||||
string sSpellIcon, sMetaMagicText, sSubSpell, sClass, sIndex;
|
||||
while(nIndex < 10)
|
||||
{
|
||||
@@ -2533,9 +2563,10 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
if(nUses)
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(TRUE));
|
||||
if(nUses == 999) sText = "Unlimited";
|
||||
if(nUses == 999) sText = "";
|
||||
else sText = IntToString(nUses);
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sBaseName + " / " + sText + ")"));
|
||||
NuiSetBind(oPC, nToken, "uses_" + sIndex + "_text", JsonString(sText));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sBaseName + ")"));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
@@ -2558,8 +2589,10 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
}
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_image", JsonString(sSpellIcon));
|
||||
if(GetHasFeat(nFeat, oAssociate))
|
||||
nUses = GetHasFeat(nFeat, oAssociate);
|
||||
if(nUses > 0)
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "uses_" + sIndex + "_text", JsonString(IntToString(nUses)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
@@ -2577,18 +2610,27 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
sMetaMagicText = ai_GetSpellIconAttributes(oAssociate, nMetaMagic, nDomain);
|
||||
NuiSetBind(oPC, nToken, "metamagic_" + sIndex + "_text", JsonString(sMetaMagicText));
|
||||
nSAIndex = JsonGetInt(JsonArrayGet(jSpell, 6));
|
||||
if(nClass == 255 && GetSpellAbilityReady(oAssociate, nSAIndex))
|
||||
if(nClass == 255)
|
||||
{
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (Special Ability / " + IntToString(nLevel) + ")"));
|
||||
if(GetSpellAbilityReady(oAssociate, nSAIndex))
|
||||
{
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (Special Ability / " + IntToString(nLevel) + ")"));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
else if(GetSpellUsesLeft(oAssociate, nClass, nSpell, nMetaMagic, nDomain))
|
||||
else
|
||||
{
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
sClass = GetStringByStrRef(StringToInt(Get2DAString("classes", "Name", nClass)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sClass + " / " + IntToString(nLevel) + ")"));
|
||||
nUses = GetSpellUsesLeft(oAssociate, nClass, nSpell, nMetaMagic, nDomain);
|
||||
if(nUses > 0)
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "uses_" + sIndex + "_text", JsonString(IntToString(nUses)));
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
sClass = GetStringByStrRef(StringToInt(Get2DAString("classes", "Name", nClass)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sClass + " / " + IntToString(nLevel) + ")"));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2641,9 +2683,10 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
if(nUses)
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(TRUE));
|
||||
if(nUses == 999) sText = "Unlimited";
|
||||
if(nUses == 999) sText = "";
|
||||
else sText = IntToString(nUses);
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sBaseName + " / " + sText + ")"));
|
||||
NuiSetBind(oPC, nToken, "uses_" + sIndex + "_text", JsonString(sText));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sBaseName + ")"));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
@@ -2665,8 +2708,10 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
}
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(TRUE));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_image", JsonString(sSpellIcon));
|
||||
if(GetHasFeat(nFeat, oAssociate))
|
||||
nUses = GetHasFeat(nFeat, oAssociate);
|
||||
if(nUses > 0)
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "uses_" + sIndex + "_text", JsonString(IntToString(nUses)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
@@ -2695,14 +2740,20 @@ void ai_SetWidgetBinds(object oPC, object oAssociate, string sAssociateType, int
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (Special Ability / " + IntToString(nLevel) + ")"));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
else if(GetSpellUsesLeft(oAssociate, nClass, nSpell, nMetaMagic, nDomain))
|
||||
else
|
||||
{
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
sClass = GetStringByStrRef(StringToInt(Get2DAString("classes", "Name", nClass)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sClass + " / " + IntToString(nLevel) + ")"));
|
||||
nUses = GetSpellUsesLeft(oAssociate, nClass, nSpell, nMetaMagic, nDomain);
|
||||
if(nUses > 0)
|
||||
{
|
||||
NuiSetBind(oPC, nToken, "uses_" + sIndex + "_text", JsonString(IntToString(nUses)));
|
||||
sName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpell)));
|
||||
sClass = GetStringByStrRef(StringToInt(Get2DAString("classes", "Name", nClass)));
|
||||
NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_tooltip", JsonString(" " + sName + " (" + sClass + " / " + IntToString(nLevel) + ")"));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
else NuiSetBind(oPC, nToken, "btn_widget_" + sIndex + "_event", JsonBool(FALSE));
|
||||
}
|
||||
}
|
||||
else break;
|
||||
@@ -2729,7 +2780,19 @@ void ai_CreateWidgetNUI(object oPC, object oAssociate)
|
||||
jButton = NuiHeight(jButton, 35.0);
|
||||
jButton = NuiMargin(jButton, 0.0);
|
||||
jButton = NuiTooltip(jButton, NuiBind ("btn_open_main_tooltip"));
|
||||
jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 32.0, 35.0));
|
||||
string sPortrait = GetPortraitResRef(oAssociate);
|
||||
if(ResManGetAliasFor(sPortrait + "s", RESTYPE_TGA) != "")
|
||||
jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 32.0, 50.0));
|
||||
else if(ResManGetAliasFor(sPortrait + "m", RESTYPE_TGA) != "")
|
||||
jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 64.0, 100.0));
|
||||
else if(ResManGetAliasFor(sPortrait + "l", RESTYPE_TGA)!= "")
|
||||
jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 128.0, 200.0));
|
||||
else if(ResManGetAliasFor(sPortrait + "h", RESTYPE_TGA)!= "")
|
||||
jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 256.0, 400.0));
|
||||
else jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 64.0, 100.0));
|
||||
jButton = NuiAspect(jButton, 1.0);
|
||||
//jButton = NuiImageRegion(jButton, NuiRect(0.0, 0.0, 32.0, 35.0));
|
||||
//jButton = NuiImage(jButton, JsonInt(NUI_ASPECT_FIT100), JsonInt(NUI_HALIGN_CENTER), JsonInt(NUI_VALIGN_TOP));
|
||||
json jRow = JsonArrayInsert(JsonArray(), jButton);
|
||||
if(ai_GetWidgetButton(oPC, BTN_ASSOC_WIDGETS_OFF, oAssociate, sAssociateType))
|
||||
{
|
||||
@@ -3020,7 +3083,7 @@ void ai_CreateWidgetNUI(object oPC, object oAssociate)
|
||||
fQuickWidgetColumns += 1.0;
|
||||
int bAdd;
|
||||
float fSpellButtons;
|
||||
json jButton, jRectangle, jMetaMagic, jDrawList;
|
||||
json jButton, jRectangle, jMetaMagic, jDrawList, jUses;
|
||||
// Add row to the column.
|
||||
if(bVertical) jCol = JsonArrayInsert(jCol, NuiCol(jRow));
|
||||
else jCol = JsonArrayInsert(jCol, NuiRow(jRow));
|
||||
@@ -3053,10 +3116,16 @@ void ai_CreateWidgetNUI(object oPC, object oAssociate)
|
||||
jButton = NuiWidth(NuiHeight(jButton, 35.0), 35.0);
|
||||
jButton = NuiMargin(jButton, 0.0);
|
||||
jButton = NuiTooltip(jButton, NuiBind("btn_widget_" + sIndex + "_tooltip"));
|
||||
jRectangle = NuiRect(4.0, 4.0, 10.0, 10.0);
|
||||
// Metamagic text.
|
||||
jRectangle = NuiRect(4.0, 24.0, 10.0, 31.0);
|
||||
jMetaMagic = NuiDrawListText(JsonBool(TRUE), NuiColor(255, 255, 0), jRectangle, NuiBind("metamagic_" + sIndex + "_text"));
|
||||
jDrawList = JsonArrayInsert(JsonArray(), jMetaMagic);
|
||||
jButton = NuiDrawList(jButton, JsonBool(TRUE), jDrawList);
|
||||
// Spell uses text.
|
||||
jRectangle = NuiRect(24.0, 2.0, 31.0, 8.0);
|
||||
jUses = NuiDrawListText(JsonBool(TRUE), NuiColor(255, 255, 255), jRectangle, NuiBind("uses_" + sIndex + "_text"));
|
||||
jDrawList = JsonArrayInsert(JsonArray(), jUses);
|
||||
jButton = NuiDrawList(jButton, JsonBool(TRUE), jDrawList);
|
||||
jRow = JsonArrayInsert(jRow, jButton);
|
||||
fSpellButtons += 1.0;
|
||||
}
|
||||
@@ -3099,10 +3168,16 @@ void ai_CreateWidgetNUI(object oPC, object oAssociate)
|
||||
jButton = NuiWidth(NuiHeight(jButton, 35.0), 35.0);
|
||||
jButton = NuiMargin(jButton, 0.0);
|
||||
jButton = NuiTooltip(jButton, NuiBind("btn_widget_" + sIndex + "_tooltip"));
|
||||
jRectangle = NuiRect(4.0, 4.0, 10.0, 10.0);
|
||||
// Metamagic text.
|
||||
jRectangle = NuiRect(4.0, 24.0, 10.0, 31.0);
|
||||
jMetaMagic = NuiDrawListText(JsonBool(TRUE), NuiColor(255, 255, 0), jRectangle, NuiBind("metamagic_" + sIndex + "_text"));
|
||||
jDrawList = JsonArrayInsert(JsonArray(), jMetaMagic);
|
||||
jButton = NuiDrawList(jButton, JsonBool(TRUE), jDrawList);
|
||||
// Spell uses text.
|
||||
jRectangle = NuiRect(24.0, 2.0, 31.0, 8.0);
|
||||
jUses = NuiDrawListText(JsonBool(TRUE), NuiColor(255, 255, 255), jRectangle, NuiBind("uses_" + sIndex + "_text"));
|
||||
jDrawList = JsonArrayInsert(JsonArray(), jUses);
|
||||
jButton = NuiDrawList(jButton, JsonBool(TRUE), jDrawList);
|
||||
jRow = JsonArrayInsert(jRow, jButton);
|
||||
fSpellButtons += 1.0;
|
||||
}
|
||||
@@ -3713,7 +3788,7 @@ json ai_CheckItemAbilities(json jQuickListArray, object oCreature, object oItem,
|
||||
if(nCharges) nUses = nCharges;
|
||||
else nUses = nPerDay;
|
||||
}
|
||||
sSpellIcon = Get2DAString("spells", "iConResRef", nSpell);
|
||||
sSpellIcon = Get2DAString("spells", "IconResRef", nSpell);
|
||||
}
|
||||
jSpell_Icon = JsonArrayInsert(jSpell_Icon, JsonString(sSpellIcon));
|
||||
jSpell_Text = JsonArrayInsert(jSpell_Text, JsonString(sSpellName));
|
||||
|
||||
Reference in New Issue
Block a user