` --reload language if(uiTranslationFile) then Infinity_DoFile("L_" .. uiTranslationFile) else Infinity_DoFile("L_en_us") end listMetaInfo = {} combatLog = {} function t(p) return getUiString(p) end Infinity_DoFile("my__CNST") --// BY_ME Infinity_DoFile("my__LIB") --// BY_ME Infinity_DoFile("my_CRE") --// BY_ME Infinity_DoFile("my__RDR") --// BY_ME rgHdIcons = 0 Infinity_DoFile("rg_hdico") fontcolors['X'] = 'FF7D7D7D' styles = { gamelog = { color = 'B', font = 'POSTANTI',--MODESTOM point = 12, useFontZoom = 1, valign = 'top', halign = 'left', }, normal = { color = 'B', font = 'RGFONT', point = 13, valign = 'top', halign = 'left', useFontZoom = 1, }, rg_normal_right = { color = 'B', font = 'RGFONT', point = 13, valign = 'top', halign = 'right', useFontZoom = 1, }, rg_normal_small = { color = 'B', font = 'RGFONT', point = 11, valign = 'top', halign = 'left', useFontZoom = 1, }, rg_normal_spell = { color = '5', font = 'RGFONT', point = 10, valign = 'center', halign = 'left', useFontZoom = 1, pad = {48,0,0,0}, }, rg_trajan = { color = 'B', font = 'RGTRAJ', point = 16, useFontZoom = 1, valign = 'top', halign = 'left', }, normal_parchment = { color = '5', font = 'RGFONT', point = 13, valign = 'top', halign = 'left', useFontZoom = 1, }, title = { color = '1', font = 'REALMS', point = 16, valign = 'center', halign = 'center', useFontZoom = 0, }, parchment = { color = '5', font = 'NORMAL' , point = 12, valign = 'top', halign = 'left', useFontZoom = 1, }, button = { color = 'B', font = 'RGTRAJ' , point = 12, valign = 'center', halign = 'center', upper = 1, pad = {2,2,2,0}, useFontZoom = 1, }, button_parchment = { color = '5', font = 'MODESTOM', point = 12, valign = 'center', halign = 'center', pad = {0,5,0,0}, useFontZoom = 0, }, label = { color = 'B', font = 'STONESML', point = 12, valign = 'center', halign = 'center', useFontZoom = 0, }, label_parchment = { color = '5', font = 'STONESML', point = 12, valign = 'center', halign = 'center', useFontZoom = 0, }, edit = { color = 'B', font = 'NORMAL', point = 12, valign = 'top', halign = 'left', useFontZoom = 1, }, edit_parchment = { color = '5', font = 'NORMAL', point = 12, valign = 'top', halign = 'left', useFontZoom = 1, }, list = { color = 'B', font = 'STONESML', point = 12, valign = 'center', halign = 'left', useFontZoom = 0, }, list_parchment = { color = '5', font = 'STONESML', point = 12, valign = 'center', halign = 'left', useFontZoom = 0, }, gold = { color = '$', font = 'NORMAL', point = 12, valign = 'center', halign = 'center', useFontZoom = 0, }, label_loadname = { color = 'B', font = 'MODESTOM', point = 20, useFontZoom = 0, valign = 'center', halign = 'center', }, rg_label = { color = 'B', font = 'MODESTOM', point = 10, useFontZoom = 0, valign = 'top', halign = 'left', } } portraits = { } chapterBackgrounds = {} chapterBackgrounds[0] = "GUICHP0B" chapterBackgrounds[1] = "GUICHP1B" chapterBackgrounds[2] = "GUICHP2B" chapterBackgrounds[3] = "GUICHP3B" chapterBackgrounds[4] = "GUICHP4B" chapterBackgrounds[5] = "GUICHP5B" chapterBackgrounds[6] = "GUICHP6B" chapterBackgrounds[7] = "GUICHP7B" chapterBackgrounds[8] = "GUICHP8B" chapterBackgrounds[9] = "GUICHP9B" chapterBackgrounds[10] = "GUICHP10B" chapterBackgrounds[11] = "GUICHP11B" chapterBackgrounds[12] = "GUICHP12B" chapterBackgrounds[13] = "GUICHP13B" chapterBackgrounds[14] = "GUICHP0A" chapterBackgrounds[15] = "GUICHP0A" chapterBackgrounds[16] = "GUICHP0A" chapterBackgrounds[17] = "GUICHP0A" chapterBackgrounds[18] = "GUICHP0A" chapterBackgrounds[19] = "GUICHP0A" chapterBackgrounds[20] = "BPEND" chapterBackgrounds[21] = "GUICHP0A" chapterBackgrounds[22] = "GUICHP0A" chapterBackgrounds[23] = "GUICHP0A" chapterBackgrounds[24] = "GUICHP0A" chapterBackgrounds[25] = "GUICHP0A" chapterBackgrounds[26] = "GUICHP0A" chapterBackgrounds[27] = "GUICHP0A" chapterBackgrounds[28] = "GUICHP0A" chapterBackgrounds[29] = "GUICHP0A" chapterBackgrounds[30] = "GUICHP0A" chapterBackgrounds[31] = "GUICHP0A" chapterBackgrounds[32] = "GUICHP0A" chapterBackgrounds[33] = "GUICHP0A" chapterBackgrounds[34] = "GUICHP0A" chapterBackgrounds[35] = "GUICHP0A" chapterBackgrounds[36] = "GUICHP0A" chapterBackgrounds[37] = "GUICHP0A" chapterBackgrounds[38] = "GUICHP0A" chapterBackgrounds[39] = "GUICHP0A" chapterBackgrounds[40] = "GUICHP0A" chapterBackgrounds[41] = "GUICHP0A" chapterBackgrounds[42] = "GUICHP0A" chapterBackgrounds[43] = "GUICHP0A" chapterBackgrounds[44] = "GUICHP0A" chapterBackgrounds[45] = "GUICHP0A" chapterBackgrounds[46] = "GUICHP0A" chapterBackgrounds[47] = "GUICHP0A" chapterBackgrounds[48] = "GUICHP0A" chapterBackgrounds[49] = "GUICHP0A" chapterBackgrounds[50] = "GUICHP0A" chapterBackgrounds[51] = "GUICHP0A" chapterBackgrounds[52] = "GUIDRM2" chapterBackgrounds[53] = "GUIDRM3" chapterBackgrounds[54] = "GUIDRM4" chapterBackgrounds[55] = "GUIDRM5" chapterBackgrounds[56] = "GUIDRM6" chapterBackgrounds[57] = "GUIDRM7" chapterBackgrounds[58] = "ARRIVE" chapterBackgrounds[59] = "LEAVE" chapterBackgrounds[100] = "GUICHP6B" currentPanelID = 0 function rgGetGameEnginePortraits() if rgGameEngine ~= 3 then portraits = { {'MAN1', 1}, {'MAN2', 1}, {'GENDWRF', 1}, {'GENMELF', 1}, {'GENMHLF', 1}, {'AJANTIS', 1}, {'CORAN', 1}, {'EDWIN', 1}, {'ELDOTH', 1}, {'GARRICK', 1}, {'KAGAIN', 1}, {'KHALID', 1}, {'KIVAN', 1}, {'MINSC', 1}, {'MONTAR', 1}, {'QUAYLE', 1}, {'TIAX', 1}, {'XAN', 1}, {'XZAR', 1}, {'YESLICK', 1}, {'NCERND', 1}, {'NKELDOR', 1}, {'NANOMEN', 1}, {'NEDWIN', 1}, {'NHAER', 1}, {'NJAN', 1}, {'NMINSC', 1}, {'NVALYGA', 1}, {'NYOSHIM', 1}, {'NKORGAN', 1}, {'NHORC', 1}, {'RASAAD', 1}, {'DORN', 1}, {'BAELOTH', 1}, {'GLINT', 1}, {'VOGHILN', 1}, {'BDSHAM1', 1}, {'BDORCM1', 1}, {'YANNER4', 1}, {'YANNER5', 1}, {'YANNER6', 1}, {'HELM', 1}, {'HVLN', 1}, {'MANLEY0', 1}, {'MANLEY3', 1}, {'MANLEY6', 1}, {'MANLEY7', 1}, {'MANLEY8', 1}, {'MANLEY9', 1}, {'bdtma', 1}, {'bdtmc', 1}, {'bdtmd', 1}, {'bdtmg', 1}, {'bdtmh', 1}, {'bdtmi', 1}, {'bdtmk', 1}, {'hephern', 1}, {'unnamed', 1}, {'sorce', 1}, {'WOMAN1', 2}, {'WOMAN2', 2}, {'ALORA', 2}, {'BRANWE', 2}, {'DYNAHEI', 2}, {'FALDORN', 2}, {'IMOEN', 2}, {'JAHEIRA', 2}, {'SAFANA', 2}, {'SHARTEL', 2}, {'SKIE', 2}, {'VICONIA', 2}, {'NIMOEN', 2}, {'NNALIA', 2}, {'NMAZZY', 2}, {'NAERIE', 2}, {'NJAHEIR', 2}, {'NVICON', 2}, {'BDVICON', 2}, {'BDIMOEN', 2}, {'NEERA', 2}, {'SCHAEL', 2}, {'DSCLARA', 2}, {'OHHEXX', 2}, {'BDSHAF1', 2}, {'BDORCF1', 2}, {'YANNER1', 2}, {'YANNER2', 2}, {'YANNER3', 2}, {'SKAN', 2}, {'MANLEY1', 2}, {'MANLEY2', 2}, {'MANLEY4', 2}, {'MANLEY5', 2}, {'MANLEYX', 2}, {'bdtmb', 2}, {'bdtme', 2}, {'bdtmf', 2}, {'bdtmj', 2}, {'caelar', 2}, {'mkhiin', 2} } else portraits = { {'DMC_', 1}, {'DMF2_', 1}, {'DMF_', 1}, {'DMT_', 1}, {'EMC_', 1}, {'EMF2_', 1}, {'EMF_', 1}, {'EMT_', 1}, {'EMW_', 1}, {'GMT_', 1}, {'GMW_', 1}, {'HAMF_', 1}, {'HAMT_', 1}, {'HEMF_', 1}, {'HEMT_', 1}, {'HEMW_', 1}, {'HMB2_', 1}, {'HMB_', 1}, {'HMC2_', 1}, {'HMC3_', 1}, {'HMC4_', 1}, {'HMC_', 1}, {'HMF2_', 1}, {'HMF3_', 1}, {'HMF4_', 1}, {'HMF5_', 1}, {'HMF6_', 1}, {'HMF7_', 1}, {'HMF_', 1}, {'HMW2_', 1}, {'HMW3_', 1}, {'HMW4_', 1}, {'HMW_', 1}, {'2MBAR1_', 1}, {'2MHUM1_', 1}, {'2MORC1_', 1}, {'DFF_', 2}, {'EFC_', 2}, {'EFF_', 2}, {'EFW2_', 2}, {'EFW_', 2}, {'GFW_', 2}, {'HAFF_', 2}, {'HAFT_', 2}, {'HEFB_', 2}, {'HEFC_', 2}, {'HEFF_', 2}, {'HEFW_', 2}, {'HFD_', 2}, {'HFF2_', 2}, {'HFF_', 2}, {'HFT2_', 2}, {'HFT_', 2}, {'HFW2_', 2}, {'HFW3_', 2}, {'HFW_', 2}, {'2FBAR1_', 2}, {'2FHUM4_', 2}, {'2FORC1_', 2}, {'2FDEF1_', 2}, {'2FELF1_', 2}, {'2FELF2_', 2}, {'2FELF3_', 2}, {'2FGNM1_', 2}, {'2FHUM1_', 2}, {'2FHUM2_', 2}, {'2FHUM3_', 2}, {'2FTIF1_', 2}, {'2MAAS1_', 1}, {'2MDEF1_', 1}, {'2MDEF2_', 1}, {'2MDWF1_', 1}, {'2MDWF2_', 1}, {'2MELF1_', 1}, {'2MGNM1_', 1}, {'2MHAF1_', 1}, {'2MHUM2_', 1}, {'2MHUM3_', 1}, {'2MHUM4_', 1}, {'2MHUM5_', 1}, {'2MHUM6_', 1}, {'2MHUM7_', 1}, {'2MPAL1_', 1}, {'bdtma', 1}, {'bdtmb', 2}, {'bdtmc', 1}, {'bdtmd', 1}, {'bdtme', 2}, {'bdtmf', 2}, {'bdtmg', 1}, {'bdtmh', 1}, {'bdtmi', 1}, {'bdtmj', 2}, {'bdtmk', 1} } end end function rgIsNthNumber(num,nth) local res = num - 1 local num1,num2=math.modf(res/nth) if(num2==0)then return true else return false end end function rgGetSelectedHighlight(row,var) local skin = (RgUISkin*2) if(row == var) then return skin + 1 else return skin end end function rgGetHighlightSkin(highlight,butt) local r = (RgUISkin*2) if highlight == butt then return r + 1 else return r end end function rgString(str) local color = '' if RgUISkin == 0 then color = '^$' --else -- color = '^B' end return color .. getUiString(str) end function displayTHAC() thactxt = '' thactxt = characters[currentID].THAC0.current if (characters[currentID].THAC0.offhand ) then thactxt = thactxt .. '\n' .. characters[currentID].THAC0.offhand end return thactxt end function displayCompiledAC() local compiledAC = characters[currentID].AC.current if characters[currentID].AC.crushing ~= 0 or characters[currentID].AC.missile ~= 0 or characters[currentID].AC.piercing ~= 0 or characters[currentID].AC.slashing ~= 0 then compiledAC = compiledAC .. " (" .. getUiString("MODIFIERS_LABEL") .. ": " local numMods = 0 if characters[currentID].AC.crushing > 0 then numMods = numMods + 1 setStringTokenLua("","+"..characters[currentID].AC.crushing) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_CRUSHING") removeStringTokenLua("") elseif characters[currentID].AC.crushing < 0 then numMods = numMods + 1 setStringTokenLua("",characters[currentID].AC.crushing) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_CRUSHING") removeStringTokenLua("") end if characters[currentID].AC.missile > 0 then if numMods > 0 then compiledAC = compiledAC .. ", " end numMods = numMods + 1 setStringTokenLua("","+"..characters[currentID].AC.missile) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_MISSILE") removeStringTokenLua("") elseif characters[currentID].AC.missile < 0 then if numMods > 0 then compiledAC = compiledAC .. ", " end numMods = numMods + 1 setStringTokenLua("",characters[currentID].AC.missile) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_MISSILE") removeStringTokenLua("") end if characters[currentID].AC.piercing > 0 then if numMods > 0 then compiledAC = compiledAC .. ", " end numMods = numMods + 1 setStringTokenLua("","+"..characters[currentID].AC.piercing) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_PIERCING") removeStringTokenLua("") elseif characters[currentID].AC.piercing < 0 then if numMods > 0 then compiledAC = compiledAC .. ", " end numMods = numMods + 1 setStringTokenLua("",characters[currentID].AC.piercing) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_PIERCING") removeStringTokenLua("") end if characters[currentID].AC.slashing > 0 then if numMods > 0 then compiledAC = compiledAC .. ", " end numMods = numMods + 1 setStringTokenLua("","+"..characters[currentID].AC.slashing) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_SLASHING") removeStringTokenLua("") elseif characters[currentID].AC.slashing < 0 then if numMods > 0 then compiledAC = compiledAC .. ", " end numMods = numMods + 1 setStringTokenLua("",characters[currentID].AC.slashing) compiledAC = compiledAC .. " " .. getUiString("ACMOD_VS_SLASHING") removeStringTokenLua("") end compiledAC = compiledAC .. ")" end return compiledAC end function displaySTR() strtxt = characters[currentID].attr.str.current if characters[currentID].attr.str.current == 18 and characters[currentID].attr.str.extra > 0 then if characters[currentID].attr.str.extra == 100 then strtxt = strtxt .. '/00' elseif characters[currentID].attr.str.extra > 9 then strtxt = strtxt .. '/' .. characters[currentID].attr.str.extra elseif characters[currentID].attr.str.extra > 0 then strtxt = strtxt .. '/0' .. characters[currentID].attr.str.extra end end if(characters[currentID].attr.str.current > characters[currentID].attr.str.base or characters[currentID].attr.str.extra > characters[currentID].attr.str.extraBase) then strtxt = '^G' .. strtxt .. '^-' end if(characters[currentID].attr.str.current < characters[currentID].attr.str.base or characters[currentID].attr.str.extra < characters[currentID].attr.str.extraBase) then strtxt = '^R' .. strtxt .. '^-' end return strtxt end function rgFirstLetterUpper(instr) if string.find(instr, "^%l") then instr = string.upper(string.sub(instr, 1, 1)) .. string.sub(instr, 2) end return instr end function rgFetchMageClassString(class) if rgGetClassName(class):lower() == rgGetGameEngineString(1081,1081,1081,1081):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(12837,12837,12837,12837):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(31977,31977,74302,37252):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(32342,32342,103061,40880):lower() then return true else return false end end function rgFetchFighterClassString(class) if rgGetClassName(class):lower() == rgGetGameEngineString(1076,1076,1076,1076):lower() then return true else return false end end function rgFetchRangerClassString(class) if rgGetClassName(class):lower() == rgGetGameEngineString(1078,1078,1078,1078):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24264,24264,25154,25154):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24265,24265,25155,25155):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24266,24266,25156,25156):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(1077,1077,1077,1077):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24267,24267,25157,25157):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24268,24268,25158,25158):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24269,24269,25159,25159):lower() then return true else return false end end function rgFetchPriestClassString(class) if rgGetClassName(class):lower() == rgGetGameEngineString(1079,1079,1079,1079):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24276,24276,25168,1):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24277,24277,25169,1):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24278,24278,25170,1):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(9410,9410,9410,9410):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(31980,31980,74306,37261):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(31983,31983,74309,37264):lower() then return true else return false end end function rgFetchDruidClassString(class) if rgGetClassName(class):lower() == rgGetGameEngineString(1080,1080,1080,1080):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24279,24279,25171,25171):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24280,24280,25173,25173):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24281,24281,25174,25174):lower() then return true else return false end end function rgFetchRogueClassString(class) if rgGetClassName(class):lower() == rgGetGameEngineString(1082,1082,1082,1082):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24270,24270,25160,25160):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24271,24271,25161,25161):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24272,24272,25162,25162):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(1083,1083,1083,1083):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24273,24273,25164,25164):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24274,24274,25165,25165):lower() or rgGetClassName(class):lower() == rgGetGameEngineString(24275,24275,25166,25166):lower() then return true else return false end end function updateAttrTable() statusEffects = { } for k, v in pairs(characters[currentID].statusEffects) do table.insert(statusEffects, v) end listClassXPs1 = { } listClassXPs2 = { } listClassXPs3 = { } listXPmage = { 0,2500,5000,10000,20000,40000,60000,90000,135000,250000,375000,750000,1125000,1500000,1875000,2250000,2625000,3000000,3375000,3750000,4125000,4500000,4875000,5250000,5625000,6000000,6375000,6750000,7125000,7500000,7875000,8250000,8625000,9000000,9375000,9750000,10125000,10500000,10875000,11250000 } listXPfighter = { 0,2000,4000,8000,16000,32000,64000,125000,250000,500000,750000,1000000,1250000,1500000,1750000,2000000,2250000,2500000,2750000,3000000,3250000,3500000,3750000,4000000,4250000,4500000,4750000,5000000,5250000,5500000,5750000,6000000,6250000,6500000,6750000,7000000,7250000,7500000,7750000,8000000 } listXPranger = { 0,2250,4500,9000,18000,36000,75000,150000,300000,600000,900000,1200000,1500000,1800000,2100000,2400000,2700000,3000000,3300000,3600000,3900000,4200000,4500000,4800000,5100000,5400000,5700000,6000000,6300000,6600000,6900000,7200000,7500000,7800000,8100000,8400000,8700000,9000000,9300000,9600000 } listXPpriest = { 0,1500,3000,6000,13000,27500,55000,110000,225000,450000,675000,900000,1125000,1350000,1575000,1800000,2025000,2250000,2475000,2700000,2925000,3150000,3375000,3600000,3825000,4050000,4275000,4500000,4725000,4950000,5175000,5400000,5625000,5850000,6075000,6300000,6525000,6750000,6975000,7200000 } listXPdruid = { 0,2000,4000,7500,12500,20000,35000,60000,90000,125000,200000,300000,750000,1500000,3000000,3150000,3300000,3450000,3600000,3750000,3900000,4150000,4400000,4700000,5000000,5500000,6000000,6500000,7000000,7500000,8000000,8500000,9000000,9500000,10000000,10500000,11000000,11500000,12000000,12500000 } listXProgue = { 0,1250,2500,5000,10000,20000,40000,70000,110000,160000,220000,440000,660000,880000,1100000,1320000,1540000,1760000,1980000,2200000,2420000,2640000,2860000,3080000,3300000,3520000,3740000,3960000,4180000,4400000,4620000,4840000,5060000,5280000,5500000,5720000,5940000,6160000,6380000,6600000 } if rgFetchMageClassString(1) == true then listClassXPs1 = listXPmage elseif rgFetchFighterClassString(1) == true then listClassXPs1 = listXPfighter elseif rgFetchRangerClassString(1) == true then listClassXPs1 = listXPranger elseif rgFetchPriestClassString(1) == true then listClassXPs1 = listXPpriest elseif rgFetchDruidClassString(1) == true then listClassXPs1 = listXPdruid elseif rgFetchRogueClassString(1) == true then listClassXPs1 = listXProgue end if characters[currentID].classlevel.second ~= nil then if rgFetchMageClassString(2) == true then listClassXPs2 = listXPmage elseif rgFetchFighterClassString(2) == true then listClassXPs2 = listXPfighter elseif rgFetchRangerClassString(2) == true then listClassXPs2 = listXPranger elseif rgFetchPriestClassString(2) == true then listClassXPs2 = listXPpriest elseif rgFetchDruidClassString(2) == true then listClassXPs2 = listXPdruid elseif rgFetchRogueClassString(2) == true then listClassXPs2 = listXProgue end end if characters[currentID].classlevel.third ~= nil then if rgFetchMageClassString(3) == true then listClassXPs3 = listXPmage elseif rgFetchFighterClassString(3) == true then listClassXPs3 = listXPfighter elseif rgFetchRangerClassString(3) == true then listClassXPs3 = listXPranger elseif rgFetchPriestClassString(3) == true then listClassXPs3 = listXPpriest elseif rgFetchDruidClassString(3) == true then listClassXPs3 = listXPdruid elseif rgFetchRogueClassString(3) == true then listClassXPs3 = listXProgue end end local currLevelXP1 = 0 local currLevelXP2 = 0 local currLevelXP3 = 0 for k, v in pairs(listClassXPs1) do if k == rgGetClassLevelInt(1) then currLevelXP1 = v end end if characters[currentID].classlevel.second ~= nil then for k, v in pairs(listClassXPs2) do if k == rgGetClassLevelInt(2) then currLevelXP2 = v end end end if characters[currentID].classlevel.third ~= nil then for k, v in pairs(listClassXPs3) do if k == rgGetClassLevelInt(3) then currLevelXP3 = v end end end listClassLevels = { } local currLvlPercentage1 = math.floor(((characters[currentID].classlevel.first.xp - currLevelXP1) / (characters[currentID].classlevel.first.nextLvlXp - currLevelXP1))*100) table.insert(listClassLevels, { rgGetClassLevelString(1), currLvlPercentage1 }) if characters[currentID].classlevel.second ~= nil then local currLvlPercentage2 = math.floor(((characters[currentID].classlevel.second.xp - currLevelXP2) / (characters[currentID].classlevel.second.nextLvlXp - currLevelXP2))*100) if string.match(rgGetClassLevelString(2), rgGetGameEngineString(24371,24371,35063,34575)) then currLvlPercentage2 = 0 end table.insert(listClassLevels, { rgGetClassLevelString(2), currLvlPercentage2 }) end if characters[currentID].classlevel.third ~= nil then local currLvlPercentage3 = math.floor(((characters[currentID].classlevel.third.xp - currLevelXP3) / (characters[currentID].classlevel.third.nextLvlXp - currLevelXP3))*100) table.insert(listClassLevels, { rgGetClassLevelString(3), currLvlPercentage3 }) end listItems = { } listTest = { } otherlist = { } attributeItems = { { characters[currentID].attr.str, 9582 }, { characters[currentID].attr.dex, 9584 }, { characters[currentID].attr.con, 9583 }, { characters[currentID].attr.int, 9585 }, { characters[currentID].attr.wis, 9586 }, { characters[currentID].attr.cha, 9587 } } local head = '^D' local body = '^B' if RgUISkin == 1 or RgUISkin == 2 then head = '^M' body = '^5' end if currentTab == 1 then if statusEffects[1] ~= nil then table.insert(listItems, { 'rgempty','0', head .. getUiString('STATUS_EFFECTS_LABEL') .. ':'}) end for k, v in pairs(characters[currentID].statusEffects) do --if v.current == 0 then --haste exception -- table.insert(listItems, {103, ' ' .. Infinity_FetchString(v.strRef)}) --else table.insert(listItems, {v.bam, v.current, ' ' .. Infinity_FetchString(v.strRef)}) --end end if statusEffects[1] ~= nil then table.insert(listItems, { 'rgempty','0', '' }) end table.insert(listItems, { 'rgempty','0', head .. getUiString('SKILLS_LABEL') .. ':'}) table.insert(listItems, { 'rgempty','0', getUiString('LORE_LABEL') .. ': ' .. characters[currentID].proficiencies.lore.current }) table.insert(listItems, { 'rgempty','0', getUiString('REPUTATION_LABEL') .. ': ' .. characters[currentID].proficiencies.reputation.current }) for k, v in ipairs(characters[currentID].proficiencies.class_skills) do table.insert(listItems, { 'rgempty','0', Infinity_FetchString(v.strRef) .. ': '.. v.current .. '^-'}) end table.insert(listItems, { 'rgempty','0', '' }) table.insert(listItems, { 'rgempty','0', head .. getUiString('PROFICIENCIES_LABEL') .. ':'}) if characters[currentID].proficiencies.weapons.current ~= "" then table.insert(listItems, { 'rgempty','0', characters[currentID].proficiencies.weapons.current }) end if characters[currentID].proficiencies.fightingstyles.current ~= "" then table.insert(listItems, { 'rgempty','0', characters[currentID].proficiencies.fightingstyles.current}) end table.insert(listItems, { 'rgempty','0', '' }) table.insert(listItems, { 'rgempty','0', head .. getUiString('SAVING_THROWS_LABEL') .. ':'}) table.insert(listItems, { 'rgempty','0', characters[currentID].proficiencies.savingThrows}) table.insert(listItems, { 'rgempty','0', '' }) table.insert(listItems, { 'rgempty','0', head .. getUiString('RESISTANCES_LABEL') .. ':'}) table.insert(listItems, { 'rgempty','0', characters[currentID].proficiencies.resistances}) --table.insert(listItems, { 'rgempty','0', '' }) table.insert(listItems, { 'rgempty','0', head .. '\n' .. getUiString('ABILITIES_TITLE') .. ':'})--11976 for k, v in ipairs(characters[currentID].proficiencies.ability) do table.insert(listItems, {'rgempty','0', v.current}) end elseif currentTab == 2 then listItems = { { 'rgempty','0', head .. getUiString('BIOGRAPHY_LABEL') .. ':'}, { 'rgempty','0', Infinity_FetchString(characters[currentID].biography)}, } elseif currentTab == 3 then table.insert(listItems, { 'rgempty','0', head .. getUiString('CLASS_LABEL') .. ':' }) table.insert(listItems, { 'rgempty','0', characters[currentID].classlevel.first.details .. '\n' }) if characters[currentID].classlevel.second ~= nil then table.insert(listItems, { 'rgempty','0', characters[currentID].classlevel.second.details .. '\n'}) end if characters[currentID].classlevel.third ~= nil then table.insert(listItems, { 'rgempty','0', characters[currentID].classlevel.third.details .. '\n'}) end table.insert(listItems, { 'rgempty','0', characters[currentID].kitDesc}) elseif currentTab == 4 then listItems = { { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.partychapxp.strRef)}, { 'rgempty','0', getUiString('CHAPTER_LABEL') .. ': ' .. characters[currentID].Stats.partychapxp.current .. '% / ' .. getUiString('GAME_LABEL') .. ': ' .. characters[currentID].Stats.partygamexp.current .. '%\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.partychapkills.strRef)}, { 'rgempty','0', getUiString('CHAPTER_LABEL') .. ': ' .. characters[currentID].Stats.partychapkills.current .. '% / ' .. getUiString('GAME_LABEL') .. ': ' .. characters[currentID].Stats.partygamekills.current .. '%\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.chapxpvalue.strRef)}, { 'rgempty','0', getUiString('CHAPTER_LABEL') .. ': ' .. characters[currentID].Stats.chapxpvalue.current .. ' / ' .. getUiString('GAME_LABEL') .. ': ' .. characters[currentID].Stats.gamexpvalue.current .. '\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.chapkills.strRef)}, { 'rgempty','0', getUiString('CHAPTER_LABEL') .. ': ' .. characters[currentID].Stats.chapkills.current .. ' / ' .. getUiString('GAME_LABEL') .. ': ' .. characters[currentID].Stats.gamekills.current .. '\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.bestenemy.strRef)}, { 'rgempty','0', characters[currentID].Stats.bestenemy.current .. '\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.timespent.strRef)}, { 'rgempty','0', characters[currentID].Stats.timespent.current .. '\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.favweapon.strRef)}, { 'rgempty','0', characters[currentID].Stats.favweapon.current .. '\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].Stats.favspell.strRef)}, { 'rgempty','0', characters[currentID].Stats.favspell.current}, } elseif currentTab == 5 then listItems = { { 'rgempty','0', head .. getUiString('ARMOR_CLASS_LABEL') .. ': ' .. characters[currentID].AC.current}, { 'rgempty','0', characters[currentID].AC.details .. '\n'}, --{ 'rgempty','0', Infinity_FetchString(11766) }, --{ 'rgempty','0', Infinity_FetchString(11768) .. ': ' .. characters[currentID].AC.slashing }, --{ 'rgempty','0', Infinity_FetchString(11769) .. ': ' .. characters[currentID].AC.piercing }, --{ 'rgempty','0', Infinity_FetchString(11770) .. ': ' .. characters[currentID].AC.crushing }, --{ 'rgempty','0', Infinity_FetchString(11767) .. ': ' .. characters[currentID].AC.missile .. '\n' }, { 'rgempty','0', head .. getUiString('HIT_POINTS_LABEL') .. ': ' .. characters[currentID].HP.current .. '/' .. characters[currentID].HP.max}, { 'rgempty','0', characters[currentID].HP.details .. '\n'}, { 'rgempty','0', head .. rgGetTHAC0(currentID,body)}, { 'rgempty','0', characters[currentID].THAC0.details .. '\n'}, { 'rgempty','0', head .. rgGetDamage(currentID,body)}, { 'rgempty','0', characters[currentID].damage.details .. '\n'}, { 'rgempty','0', head .. Infinity_FetchString(characters[currentID].proficiencies.numAttacks.strRef) .. ': ' .. characters[currentID].proficiencies.numAttacks.current .. '\n'}, { 'rgempty','0', head .. getUiString('CURRENT_SCRIPT_LABEL') .. ': ' .. characters[currentID].proficiencies.currentScript}, } end --characterViewable = characterScreen:IsCharacterViewable() --showClassInfo = showClassInfo == 1 and characterViewable == true --showJustText = showJustText == 1 and characterViewable == true --showMemorized = showMemorized == 1 and characterViewable == true --showBothLists = showBothLists == 1 and characterViewable == true --showStats = showStats == 1 and characterViewable == true --showAbilityBonuses = showAbilityBonuses == 1 and characterViewable == true end function rgGetTHAC0(rgid, body) local str = getUiString('THAC0_LABEL') .. ': ' .. characters[rgid].THAC0.current .. body if(characters[rgid].THAC0.offhand) then str = str .. "\n" .. getUiString('OFF_HAND_THAC0') .. ': ' .. characters[rgid].THAC0.offhand end return str end function rgGetDamage(rgid, body) local str = getUiString('DAMAGE_LABEL') .. ': ' .. characters[rgid].damage.min .. ' - ' .. characters[rgid].damage.max .. body if(characters[rgid].damage.minOffhand and characters[rgid].damage.maxOffhand) then str = str .. "\n" .. getUiString('OFF_HAND_DAMAGE') .. ': ' .. characters[rgid].damage.minOffhand .. ' - ' .. characters[rgid].damage.maxOffhand end return str end function rgGetTHAC0simle(rgid) local str = characters[rgid].THAC0.current if(characters[rgid].THAC0.offhand) then str = str .. '^X / ' .. characters[rgid].THAC0.offhand end return str end function rgGetDamagesimle(rgid) local str = characters[rgid].damage.min .. ' - ' .. characters[rgid].damage.max if(characters[rgid].damage.minOffhand and characters[rgid].damage.maxOffhand) then str = str .. '^X / ' .. characters[rgid].damage.minOffhand .. '-' .. characters[rgid].damage.maxOffhand end return str end function rgGetTHAC0simleInv(rgid) local str = characters[rgid].THAC0.current if(characters[rgid].THAC0.offhand) then str = str .. '\n' .. characters[rgid].THAC0.offhand end return str end function rgGetDamagesimleInv(rgid) local str = characters[rgid].damage.min .. '-' .. characters[rgid].damage.max if(characters[rgid].damage.minOffhand and characters[rgid].damage.maxOffhand) then str = str .. '\n' .. characters[rgid].damage.minOffhand .. '-' .. characters[rgid].damage.maxOffhand end return str end function rgGetDamageDetails() if characters[currentID].damage.detailsOffhand == nil or characters[currentID].damage.detailsOffhand == "" then return characters[currentID].damage.details else return characters[currentID].damage.details.."\n\n"..characters[currentID].damage.detailsOffhand end end function rgGetTHAC0Details() if characters[currentID].THAC0.detailsOffhand == nil or characters[currentID].THAC0.detailsOffhand == "" then return characters[currentID].THAC0.details else return characters[currentID].THAC0.details.."\n\n"..characters[currentID].THAC0.detailsOffhand end end characters = {} statusEffects = { } currentID = 16974083 canLevelUp = 0 openAdvance = 0 notrealValue = 0 function trunc(str, len) if str:len() < len then return str else return str:sub(1,len) .. "..." end end function characterDescString(char) return Infinity_FetchString(char.gender) .. "\n" .. Infinity_FetchString(char.race) .. "\n" .. char.class .. "\n" .. Infinity_FetchString(char.alignment) .. "" end function isStatModified(index) if (index == 1 ) then --strength return (characters[currentID].attr.str.current ~= characters[currentID].attr.str.base or characters[currentID].attr.str.extra ~= characters[currentID].attr.str.extraBase) else return attributeItems[index][1].current ~= attributeItems[index][1].base end end function displayAttr(index) str = 0 if (index == 1 ) then str = displaySTR() else str = displayBuff( attributeItems[index][1].current, attributeItems[index][1].base, 1) end return str end function rgDisplayOrigAttr(index) str = '' if (attributeItems[index][1].current ~= attributeItems[index][1].base ) then str = '^X(' .. attributeItems[index][1].base .. ')^-' end return str end function getPercent(first, second) tempNumber = ( first/second ) *100 return tempNumber end function displayBuff( current, base, highisbetter) tmpstr = '' --Infinity_Log( current .. ' - '.. base ) if(highisbetter) then if(current > base) then tmpstr = '^G' .. current .. '^-' elseif (current < base) then tmpstr = '^R' .. current .. '^-' end else if(current > base) then tmpstr = '^R' .. current .. '^-' elseif (current < base) then tmpstr = '^G' .. current .. '^-' end end if(current == base) then tmpstr = current end return tmpstr end function getNextLevelString() local nextLevelXp = characters[currentID].level.nextLvlXp - characters[currentID].level.xp local str = "" if(nextLevelXp > 0) then str = getUiString("NEXT_LEVEL_LABEL") str = str .. " " str = str .. nextLevelXp str = str .. " " str = str .. getUiString("XP_LABEL") else str = getUiString("READY_TO_LEVEL_LABEL") end return str end function CurrentlyInGame() if characterScreen:IsInGame() == true then return true else return false end end function getClassString() local out = characters[currentID].classlevel.first.details if ( characters[currentID].classlevel.second ) then out = out .. '\n\n' .. characters[currentID].classlevel.second.details end if ( characters[currentID].classlevel.third ) then out = out .. '\n\n' .. characters[currentID].classlevel.third.details end out = out .. '\n\n' .. characters[currentID].kitDesc return out end function rgCharDescString1(char) return char.name .. ' - ' .. char.class .. "" end function rgCharDescString2(char) return Infinity_FetchString(char.race) .. ' ' .. Infinity_FetchString(char.gender) .. ' - ' .. Infinity_FetchString(char.alignment) .. "" end function rgRepeats(s,c) local _,n = s:gsub(c,"") return n end --"rgGetClassLevelString(1) .. ' - ^D' .. characters[currentID].classlevel.first.xp .. ' / ' .. characters[currentID].classlevel.first.nextLvlXp .. ' XP'" function rgGetClassLevelString(num) --dual 19719 local rgClass = '' local rgLevel = '' local rgLevelXP = '' if num == 1 then rgClass = ',' .. characters[currentID].classlevel.first.details rgLevel = string.match(characters[currentID].classlevel.first.details, '%d.') rgLevelXP = characters[currentID].classlevel.first.xp .. ' / ' .. characters[currentID].classlevel.first.nextLvlXp .. ' XP' elseif num == 2 then rgClass = ',' .. characters[currentID].classlevel.second.details rgLevel = string.match(characters[currentID].classlevel.second.details, '%d.') rgIndex = string.sub(rgClass, -1) if rgRepeats(rgClass,'\n') ~= 2 then rgLevelXP = '' elseif rgRepeats(rgClass,'\n') == 2 and rgIndex ~= string.match (rgIndex, "%d+") then rgLevelXP = rgGetGameEngineString(24371,24371,35063,34575) else rgLevelXP = characters[currentID].classlevel.second.xp .. ' / ' .. characters[currentID].classlevel.second.nextLvlXp .. ' XP' end else rgClass = ',' .. characters[currentID].classlevel.third.details rgLevel = string.match(characters[currentID].classlevel.third.details, '%d.') rgLevelXP = characters[currentID].classlevel.third.xp .. ' / ' .. characters[currentID].classlevel.third.nextLvlXp .. ' XP' end local rgClass1 = string.match(rgClass, ',.-:') local out = '^D' .. string.match(rgClass1, '[^,:]+') .. ' (' .. string.match(rgLevel, '[^\n]+') .. ') - ^B' .. rgLevelXP return out end function rgGetClassLevelInt(num) local rgLevel = '' if num == 1 then rgLevel = string.match(characters[currentID].classlevel.first.details, '%d.') elseif num == 2 then rgLevel = string.match(characters[currentID].classlevel.second.details, '%d.') else rgLevel = string.match(characters[currentID].classlevel.third.details, '%d.') end local out = string.match(rgLevel, '[^\n]+') - 0 return out end function rgGetClassName(num) local rgClass = '' if num == 1 then rgClass = ',' .. characters[currentID].classlevel.first.details elseif num == 2 then rgClass = ',' .. characters[currentID].classlevel.second.details else rgClass = ',' .. characters[currentID].classlevel.third.details end local rgClass1 = string.match(rgClass, ',.-:') local out = string.match(rgClass1, '[^,:]+') return out end function rgLvlUpFrame(num) local out = 0 if num >= 100 then out = 1 end return out end function rgSetZoomArea(element,x,y,a,b) w, h = Infinity_GetScreenSize() local currH = 768 local currW = w / (h / currH) local n = 1 local difx = (currW - (currW*n)) / 2 local dify = (currH - (currH*n)) / 2 if element == 'rgrecclass1progress' and listClassLevels[1][2] < 100 then a = a * (listClassLevels[1][2]/100) end if element == 'rgrecclass2progress' and listClassLevels[2][2] < 100 then a = a * (listClassLevels[2][2]/100) end if element == 'rgrecclass3progress' and listClassLevels[3][2] < 100 then a = a * (listClassLevels[3][2]/100) end if element == 'rginvpaperdoll' then difx = difx - 64 dify = dify - 65 end if element == 'rginvencumberance' then dify = dify - 9 b = 18/n end Infinity_SetArea(element, difx + (x*n), dify + (y*n), a*n, b*n) end function rgSetExpSliderClass(class) local w = 414 if listClassLevels[class][2] < 100 then w = w * (listClassLevels[class][2]/100) end return w end function rgSetExpSlider() Infinity_SetArea('rgrecclass1progress', nil, nil, rgSetExpSliderClass(1), nil) Infinity_SetArea('rgrecclass1progressx', nil, nil, rgSetExpSliderClass(1), nil) if characterViewable and characters[currentID].classlevel.second ~= nil then Infinity_SetArea('rgrecclass2progress', nil, nil, rgSetExpSliderClass(2), nil) Infinity_SetArea('rgrecclass2progressx', nil, nil, rgSetExpSliderClass(2), nil) end if characterViewable and characters[currentID].classlevel.third ~= nil then Infinity_SetArea('rgrecclass3progress', nil, nil, rgSetExpSliderClass(3), nil) end end listItems = { } listTest = { } helpTextString = '' currentTabIndex = 0 currentTab = 0 currentItem = 0 ShowClassInfo = 0 showStats = 0 showJustText = 0 showMemorized = 0 showBothLists = 0 characterViewable = true ` menu { name 'CHARACTER' modal lua "not CurrentlyInGame()" align center center ignoreEsc onopen " if currentTab == 0 then currentTab = 1 end characterViewable = true if(CurrentlyInGame()) then Infinity_PushMenu('RG_MENU_BAR') end updateAttrTable() if(currentPanelID == const.EXPORT_ID) then Infinity_PushMenu('CHARACTER_EXPORT') else if(currentPanelID == const.CUSTOMIZE_ID) then Infinity_PushMenu('CHARACTER_CUSTOMIZE') else currentPanelID = 0 end end rgSetExpSlider() popSidebars() " onclose " Infinity_PopMenu('CHARACTER_CUSTOMIZE') Infinity_PopMenu('CHARACTER_BIOGRAPHY') Infinity_PopMenu('CHARACTER_SHOW_BIOGRAPHY') Infinity_PopMenu('CHARACTER_INFO') Infinity_PopMenu('CHARACTER_SCRIPT') Infinity_PopMenu('CHARACTER_EXPORT') Infinity_PopMenu('CHARACTER_SOUND') Infinity_PopMenu('CHARACTER_COLOR') Infinity_PopMenu('CHARACTER_SHOW_CLASSINFO') Infinity_PopMenu('CHARGEN_PORTRAIT') Infinity_PopMenu('RG_MENU_BAR') if CurrentlyInGame() then pushSidebars() end " label { name 'rgdbcrec1' area 0 0 768 768 bam rgdbcrec sequence lua "RgUISkin" frame 0 scaleToClip } label { name 'rgdbcrec2' area 597 0 768 768 bam rgdbcrec sequence lua "RgUISkin" frame 1 scaleToClip } label { name 'rgdreccm' area 732 316 52 242 bam rgdreccm scaleToClip } button { name "BUTTON_2_2" area 108 108 210 331 --text lua "characters[currentID].portrait" text align center center text point 10 text color B bitmap lua "characters[currentID].portrait" action " Infinity_Log(dump(characters, 0)) " } label { --enabled "RgUISkin < 3" name 'rgdbcrecport' area 102 102 223 344 bam rgdport7 sequence lua "RgUISkin" scaleToClip } button { enabled "CurrentlyInGame()" name 'rgrecpor1' area 340 102 64 93 portrait 0 bam rgdport2 sequence lua "RgUISkin" --bitmap lua "characters[charTable[1]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 0" glow lua "draggedPortrait and draggedPortrait ~= 0" action "Infinity_OnPortraitLClick(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(0)" } button { enabled "CurrentlyInGame()" name 'rgrecpor2' area 418 102 64 93 portrait 1 bam rgdport2 sequence lua "RgUISkin" --bitmap lua "characters[charTable[2]].portrait" ScaleToClip --highlightgroup rgrecport --clickable lua "Infinity_GetNumCharacters() > 1" glow lua "draggedPortrait and draggedPortrait ~= 1" action "Infinity_OnPortraitLClick(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(1)" } button { enabled "CurrentlyInGame()" name 'rgrecpor3' area 496 102 64 93 portrait 2 bam rgdport2 sequence lua "RgUISkin" --bitmap lua "characters[charTable[3]].portrait" ScaleToClip --highlightgroup rgrecport --clickable lua "Infinity_GetNumCharacters() > 2" glow lua "draggedPortrait and draggedPortrait ~= 2" action "Infinity_OnPortraitLClick(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(2)" } button { enabled "CurrentlyInGame()" name 'rgrecpor4' area 574 102 64 93 portrait 3 bam rgdport2 sequence lua "RgUISkin" --bitmap lua "characters[charTable[4]].portrait" ScaleToClip --highlightgroup rgrecport --clickable lua "Infinity_GetNumCharacters() > 3" glow lua "draggedPortrait and draggedPortrait ~= 3" action "Infinity_OnPortraitLClick(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(3)" } button { enabled "CurrentlyInGame()" name 'rgrecpor5' area 653 102 64 93 portrait 4 bam rgdport2 sequence lua "RgUISkin" --bitmap lua "characters[charTable[5]].portrait" ScaleToClip --highlightgroup rgrecport --clickable lua "Infinity_GetNumCharacters() > 4" glow lua "draggedPortrait and draggedPortrait ~= 4" action "Infinity_OnPortraitLClick(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(4)" } button { enabled "CurrentlyInGame()" name 'rgrecpor6' area 732 102 64 93 portrait 5 bam rgdport2 sequence lua "RgUISkin" --bitmap lua "characters[charTable[6]].portrait" ScaleToClip --highlightgroup rgrecport --clickable lua "Infinity_GetNumCharacters() > 5" glow lua "draggedPortrait and draggedPortrait ~= 5" action "Infinity_OnPortraitLClick(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(5)" } label { name 'rgrecdesc1' area 362 212 426 36 ScaleToClip text lua "rgCharDescString1(characters[currentID])" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecdesc2' area 362 252 426 36 ScaleToClip text lua "rgCharDescString2(characters[currentID])" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattr1' area 362 319 125 36 ScaleToClip text lua "Infinity_FetchString( attributeItems[1][1].strRef)" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattr2' area 362 359 125 36 ScaleToClip text lua "Infinity_FetchString( attributeItems[2][1].strRef)" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattr3' area 362 399 125 36 ScaleToClip text lua "Infinity_FetchString( attributeItems[3][1].strRef)" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattr4' area 362 439 125 36 ScaleToClip text lua "Infinity_FetchString( attributeItems[4][1].strRef)" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattr5' area 362 479 125 36 ScaleToClip text lua "Infinity_FetchString( attributeItems[5][1].strRef)" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattr6' area 362 519 125 36 ScaleToClip text lua "Infinity_FetchString( attributeItems[6][1].strRef)" text style 'normal' text color 'D' text align left center enabled "characterViewable" } label { name 'rgrecattrnum1' area 487 319 80 36 ScaleToClip text lua "displayAttr(1)" text style 'normal' text align center center enabled "characterViewable" } label { name 'rgrecattrnum2' area 487 359 80 36 ScaleToClip text lua "displayAttr(2)" text style 'normal' text align center center enabled "characterViewable" } label { name 'rgrecattrnum3' area 487 399 80 36 ScaleToClip text lua "displayAttr(3)" text style 'normal' text align center center enabled "characterViewable" } label { name 'rgrecattrnum4' area 487 439 80 36 ScaleToClip text lua "displayAttr(4)" text style 'normal' text align center center enabled "characterViewable" } label { name 'rgrecattrnum5' area 487 479 80 36 ScaleToClip text lua "displayAttr(5)" text style 'normal' text align center center enabled "characterViewable" } label { name 'rgrecattrnum6' area 487 519 80 36 ScaleToClip text lua "displayAttr(6)" text style 'normal' text align center center enabled "characterViewable" } label { name 'rgreccombat1' area 578 324 148 36 ScaleToClip text lua "characters[currentID].AC.current" text style 'normal' text align right center enabled "characterViewable" } label { name 'rgreccombat2' area 578 372 148 36 ScaleToClip text lua "characters[currentID].HP.current .. '/' .. characters[currentID].HP.max" text style 'normal' text align right center enabled "characterViewable" } label { name 'rgreccombat3' area 578 420 148 36 ScaleToClip text lua "rgGetTHAC0simle(currentID)" text style 'normal' text align right center enabled "characterViewable" } label { name 'rgreccombat4' area 578 468 148 36 ScaleToClip text lua "rgGetDamagesimle(currentID)" text style 'normal' text align right center enabled "characterViewable" } label { name 'rgreccombat5' area 578 516 148 36 ScaleToClip text lua "characters[currentID].proficiencies.numAttacks.current" text style 'normal' text align right center enabled "characterViewable" } text { area 578 316 200 52 tooltip lua "getUiString('ARMOR_CLASS_LABEL')" } text { area 578 364 200 52 tooltip lua "getUiString('HIT_POINTS_LABEL')" } text { area 578 412 200 52 tooltip lua "getUiString('THAC0_LABEL')" } text { area 578 460 200 52 tooltip lua "getUiString('DAMAGE_LABEL')" } text { area 578 508 200 52 tooltip lua "getUiString('NUM_ATTACKS_LABEL')" } --one/two classes label { name 'rgrecclass1x' area 362 594 414 36 text lua "listClassLevels[1][1]" text style 'normal' text align left center enabled "characterViewable and characters[currentID].classlevel.third == nil" } label { name 'rgrecclass2x' area 362 654 414 36 text lua "listClassLevels[2][1]" text style 'normal' text align left center enabled "characterViewable and characters[currentID].classlevel.second ~= nil and characters[currentID].classlevel.third == nil" } label { name 'rgrecclass1progbackx' area 362 630 414 5 bam rgdrcbar ScaleToClip sequence 1 enabled "characterViewable and characters[currentID].classlevel.third == nil" } label { name 'rgrecclass2progbackx' area 362 690 414 5 bam rgdrcbar ScaleToClip sequence 1 enabled "characterViewable and characters[currentID].classlevel.second ~= nil and characters[currentID].classlevel.third == nil" } label { name 'rgrecclass1progressx' area 362 630 414 5 bam rgdrcbar ScaleToClip --progressbar lua "listClassLevels[1][2], 100" --progress percentage, number 0-100 --greyscale 0 --display greyscale or not, number 0-1 --progressbar color 128 0 0 255 --color when percentage != 100 --progressbar full 128 0 0 255 --color when percentage == 100 enabled "characterViewable and characters[currentID].classlevel.third == nil" } label { name 'rgrecclass2progressx' area 362 690 314 5 bam rgdrcbar ScaleToClip enabled "characterViewable and characters[currentID].classlevel.second ~= nil and characters[currentID].classlevel.third == nil" } label { name 'rgrecnextlevel' area 362 654 414 36 text lua "getNextLevelString()" text style 'normal' text align left center text color 'X' enabled "characterViewable and characters[currentID].classlevel.second == nil" } --three classes label { name 'rgrecclass1' area 362 588 414 36 text lua "listClassLevels[1][1]" text style 'normal' text align left center enabled "characterViewable and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass2' area 362 628 414 36 text lua "listClassLevels[2][1]" text style 'normal' text align left center enabled "characterViewable and characters[currentID].classlevel.second ~= nil and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass3' area 362 668 414 36 text lua "listClassLevels[3][1]" text style 'normal' text align left center enabled "characterViewable and characters[currentID].classlevel.third ~= nil and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass1progback' area 362 624 414 5 bam rgdrcbar ScaleToClip sequence 1 enabled "characterViewable and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass2progback' area 362 664 414 5 bam rgdrcbar ScaleToClip sequence 1 enabled "characterViewable and characters[currentID].classlevel.second ~= nil and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass3progback' area 362 704 414 5 bam rgdrcbar ScaleToClip sequence 1 enabled "characterViewable and characters[currentID].classlevel.third ~= nil and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass1progress' area 362 624 414 5 bam rgdrcbar ScaleToClip enabled "characterViewable and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass2progress' area 362 664 314 5 bam rgdrcbar ScaleToClip enabled "characterViewable and characters[currentID].classlevel.second ~= nil and characters[currentID].classlevel.third ~= nil" } label { name 'rgrecclass3progress' area 362 704 414 5 bam rgdrcbar ScaleToClip enabled "characterViewable and characters[currentID].classlevel.third ~= nil and characters[currentID].classlevel.third ~= nil" } list { column { width 100 label { area 0 0 -1 -1 bam lua "listItems[rowNumber][1]" sequence lua "listItems[rowNumber][2]" text align left center --enabled "listItems[rowNumber][1] ~= '233'" --enabled "rowNumber ~= 233" --ScaleToClip } label { enabled "RgUISkin == 0 or RgUISkin == 3" area 0 0 -1 -1 text lua "listItems[rowNumber][3]" text style 'normal' text align left center } label { enabled "RgUISkin == 1 or RgUISkin == 2" area 0 0 -1 -1 text lua "listItems[rowNumber][3]" text style 'normal_parchment' text align left center } } area 817 104 449 576 name 'rgdreclist' rowheight dynamic table "listItems" var currentItem scrollbar 'rgdscrl1' hidehighlight action " --helpTextString = Infinity_FetchString( listItems[currentItem][1].helpStrRef) " } button { name 'rgdrectab1' area 812 687 88 46 bam lua "getUiString('rgdrecb') .. RgUISkin" ScaleToClip highlightgroup rgrectab sequence 0 tooltip lua "getUiString('ASSIGN_KEYS_PAGE_CHARACTERINFORMATION')" --text 'INFORMATION_BUTTON' --text style "button" --pad 10 4 10 4 action "currentTab = 1; updateAttrTable()" } button { name 'rgdrectab2' area 1164 687 88 46 bam lua "getUiString('rgdrecb') .. RgUISkin" ScaleToClip highlightgroup rgrectab sequence 4 tooltip lua "getUiString('BIOGRAPHY_LABEL')" --text 'BIOGRAPHY_LABEL' --text style "button" --pad 10 4 10 4 action "currentTab = 2; updateAttrTable()" } button { name 'rgdrectab3' area 988 687 88 46 bam lua "getUiString('rgdrecb') .. RgUISkin" ScaleToClip highlightgroup rgrectab sequence 1 tooltip lua "getUiString('CLASS_LABEL')" --text 'CLASS_LABEL' --text style "button" --pad 10 4 10 4 action "currentTab = 3; updateAttrTable()" } button { name 'rgdrectab4' area 1076 687 88 46 bam lua "getUiString('rgdrecb') .. RgUISkin" ScaleToClip highlightgroup rgrectab sequence 3 tooltip lua "getUiString('STATS_LABEL')" --text 'STATS_LABEL' --text style "button" --pad 10 4 10 4 action "currentTab = 4; updateAttrTable()" } button { name 'rgdrectab5' area 900 687 88 46 bam lua "getUiString('rgdrecb') .. RgUISkin" ScaleToClip highlightgroup rgrectab sequence 2 tooltip lua "getUiString('COMBAT_STATS_LABEL')" --text 'COMBAT_STATS_LABEL' --text style "button" --pad 10 4 10 4 action "currentTab = 5; updateAttrTable()" } button { enabled "CurrentlyInGame()" name "BUTTON_2_50" area 102 558 222 50 text lua "rgString('CUSTOMIZE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable lua "characterScreen:IsMultiPlayerModifyable()" action " characterScreen:OnCustomizeButtonClick(); " } button { enabled "CurrentlyInGame()" name "BUTTON_2_36" area 102 612 222 50 text lua "rgString('EXPORT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable lua "characterScreen:IsExportButtonClickable()" action " characterScreen:OnExportButtonClick(); " } button { enabled "CurrentlyInGame()" clickable lua "characterScreen:IsReformPartyButtonClickable()" name "BUTTON_2_51" area 102 666 222 50 text lua "rgString('REFORM_PARTY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action "characterScreen:OnReformPartyButtonClick();" } button { enabled "CurrentlyInGame()" name "BUTTON_2_0" area 102 504 222 50 text lua "rgString('DUAL_CLASS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable lua "characterScreen:IsDualClassButtonClickable()" action " popup2Button('DUALCLASS_CONFIRMATION', 'YES_BUTTON', function() characterScreen:OnDualClassButtonClick() end, 'NO_BUTTON') " } button { enabled "CurrentlyInGame()" name "BUTTON_2_37" area 102 450 222 50 text lua "rgString('LEVEL_UP_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" glow lua "characterScreen:IsLevelUpButtonClickable()" ScaleToClip clickable lua "(characterScreen:IsMultiPlayerModifyable() and characterScreen:IsLevelUpButtonClickable())" action " characterScreen:OnLevelUpButtonClick();" } button { enabled "CurrentlyInGame()" on escape area 0 0 10 10 action " e:SelectEngine(worldScreen) " } button { enabled "not CurrentlyInGame()" area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action "Infinity_PopMenu()" } } menu { name 'CHARACTER_CUSTOMIZE' align center center modal ignoreesc onOpen " currentPanelID = const.CUSTOMIZE_ID " label { area 0 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 0 } label { area 597 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 1 } text { area 380 100 446 490 text 11327 --Customize help text scrollbar 'rgdscrl1' text style normal } label { area 480 32 405 52 text lua "rgString('CUSTOMIZE_TITLE')" text style 'rg_trajan' text color '$' align center center } button { area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam 'rgdport7' sequence lua "RgUISkin" scaleToClip } button { area 102 450 222 50 text lua "rgString('APPEARANCE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action "characterScreen:OnAppearanceButtonClick()" } button { area 102 504 222 50 text lua "rgString('SOUNDS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action "characterScreen:OnSoundsButtonClick()" } button { area 102 558 222 50 text lua "rgString('COLORS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action "characterScreen:OnHairSkinButtonClick()" } button { area 102 612 222 50 text lua "rgString('SCRIPT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action "characterScreen:OnScriptButtonClick()" } button { area 102 666 222 50 text lua "rgString('BIOGRAPHY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action "characterScreen:OnCusomizeBiographyButtonClick()" } button { on escape area 370 660 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text lua "rgString('CANCEL_BUTTON')" text style "button" action " characterScreen:OnCancelButtonClick() currentPanelID = 0 Infinity_PopMenu('CHARACTER_CUSTOMIZE') " } button { area 818 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " characterScreen:OnDoneButtonClick() currentPanelID = 0 Infinity_PopMenu('CHARACTER_CUSTOMIZE') " } } ` recBioEdit = "" recBioEditBackup = "" ` menu { name 'CHARACTER_BIOGRAPHY' align center center ignoreesc onOpen " recBioEditBackup = recBioEdit currentPanelID = 23 " label { area 0 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 0 } label { area 597 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('BIOGRAPHY_TITLE')" text style 'rg_trajan' text color '$' align center center } button { area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam 'rgdport7' sequence lua "RgUISkin" scaleToClip } button { area 102 450 222 50 text lua "rgString('APPEARANCE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnAppearanceButtonClick() " } button { area 102 504 222 50 text lua "rgString('SOUNDS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnSoundsButtonClick() " } button { area 102 558 222 50 text lua "rgString('COLORS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu() createCharScreen:OnCancelButtonClick() currentPanelID = 17 characterScreen:OnHairSkinButtonClick() " } button { area 102 612 222 50 text lua "rgString('SCRIPT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnScriptButtonClick() " } button { area 102 666 222 50 text lua "rgString('BIOGRAPHY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip frame 2 action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnCusomizeBiographyButtonClick() " } label { area 370 105 892 469 fill 112 111 111 64 } edit { name "recBioEditArea" area 370 105 892 469 var recBioEdit scrollbar 'rgdscrl1' text style "edit" } button { area 370 586 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "CLEAR_BUTTON" text style "button" action " recBioEdit = '' " } button { area 818 586 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text "REVERT_BUTTON" text style "button" action " recBioEdit = recBioEditBackup " } button { area 370 660 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "CANCEL_BUTTON" text style "button" action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 " } button { area 818 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text "DONE_BUTTON" text style "button" action " characterScreen:OnDoneButtonClick() Infinity_PopMenu() currentPanelID = 17 " } } ` scriptList_idx = 0 showingSmartOptions = false function formatScriptName(text) local i = string.find(text, ":", #text) if(i) then text = string.sub(text,1, i - 1) end if(#text > 35) then text = string.sub(text,1, 35) text = text .. "..." end return text end scriptOptions = { {'SCRIPT_ATTACK_ENEMIES_LABEL', 'SCRIPT_ATTACK_ENEMIES_DESCRIPTION', 1, 0, 0}, {'SCRIPT_USE_MELEE_WEAPONS_LABEL', 'SCRIPT_USE_MELEE_WEAPONS_DESCRIPTION', 2, 0, 0}, {'SCRIPT_USE_RANGED_WEAPONS_LABEL', 'SCRIPT_USE_RANGED_WEAPONS_DESCRIPTION', 3, 0, 0}, {'SCRIPT_USE_ITEMS_LABEL', 'SCRIPT_USE_ITEMS_DESCRIPTION', 4, 0, 0}, {'SCRIPT_USE_SPECIAL_ABILITIES_LABEL', 'SCRIPT_USE_SPECIAL_ABILITIES_DESCRIPTION', 5, 0, 0}, {'SCRIPT_USE_OFFENSIVE_SPELLS_LABEL', 'SCRIPT_USE_OFFENSIVE_SPELLS_DESCRIPTION', 6, 0, 0}, {'SCRIPT_USE_DEFENSIVE_SPELLS_LABEL', 'SCRIPT_USE_DEFENSIVE_SPELLS_DESCRIPTION', 7, 0, 0}, {'SCRIPT_FIND_TRAPS_LABEL', 'SCRIPT_FIND_TRAPS_DESCRIPTION', 8, 0, 0}, {'SCRIPT_HIDE_IN_SHADOWS_LABEL', 'SCRIPT_HIDE_IN_SHADOWS_DESCRIPTION', 9, 0, 0}, {'SCRIPT_SING_BATTLESONG_LABEL', 'SCRIPT_SING_BATTLESONG_DESCRIPTION', 10, 0, 0}, {'SCRIPT_TURN_UNDEAD_LABEL', 'SCRIPT_TURN_UNDEAD_DESCRIPTION', 11, 0, 0} } function handleScriptOptionChange(option) local wasOn = scriptOptions[option][4] == 2 if option == 2 then --Melee if wasOn == true then scriptOptions[option][4] = 0 scriptOptions[option][5] = false else scriptOptions[option][4] = 2 scriptOptions[option][5] = true scriptOptions[option+1][4] = 0 scriptOptions[option+1][5] = false end elseif option == 3 then --Ranged if wasOn == true then scriptOptions[option][4] = 0 scriptOptions[option][5] = false else scriptOptions[option][4] = 2 scriptOptions[option][5] = true scriptOptions[option-1][4] = 0 scriptOptions[option-1][5] = false end elseif option == 8 then --Find Traps if wasOn == true then scriptOptions[option][4] = 0 scriptOptions[option][5] = false else scriptOptions[option][4] = 2 scriptOptions[option][5] = true scriptOptions[option+1][4] = 0 scriptOptions[option+1][5] = false scriptOptions[option+2][4] = 0 scriptOptions[option+2][5] = false scriptOptions[option+3][4] = 0 scriptOptions[option+3][5] = false end elseif option == 9 then --Hide if wasOn == true then scriptOptions[option][4] = 0 scriptOptions[option][5] = false else scriptOptions[option][4] = 2 scriptOptions[option][5] = true scriptOptions[option-1][4] = 0 scriptOptions[option-1][5] = false scriptOptions[option+1][4] = 0 scriptOptions[option+1][5] = false scriptOptions[option+2][4] = 0 scriptOptions[option+2][5] = false end elseif option == 10 then --Sing if wasOn == true then scriptOptions[option][4] = 0 scriptOptions[option][5] = false else scriptOptions[option][4] = 2 scriptOptions[option][5] = true scriptOptions[option-2][4] = 0 scriptOptions[option-2][5] = false scriptOptions[option-1][4] = 0 scriptOptions[option-1][5] = false scriptOptions[option+1][4] = 0 scriptOptions[option+1][5] = false end elseif option == 11 then --Turn if wasOn == true then scriptOptions[option][4] = 0 scriptOptions[option][5] = false else scriptOptions[option][4] = 2 scriptOptions[option][5] = true scriptOptions[option-3][4] = 0 scriptOptions[option-3][5] = false scriptOptions[option-2][4] = 0 scriptOptions[option-2][5] = false scriptOptions[option-1][4] = 0 scriptOptions[option-1][5] = false end else scriptOptions[option][4] = toggleFrame(scriptOptions[option][4]) if scriptOptions[option][4] == 0 then scriptOptions[option][5] = false else scriptOptions[option][5] = true end end end ` menu { name 'CHARACTER_SCRIPT' align center center ignoreesc onOpen " doneEnabled = characterScreen:IsDoneButtonClickable(currentID) currentPanelID = const.SCRIPT_ID showingSmartOptions = (scriptList_idx == 2) scriptDescription = getUiString(scriptOptions[scriptList_idx][2]) for index, var in pairs(scriptOptions) do var[5] = characterScreen:GetTempSmartScriptLocal(var[3]) if var[5] == false then var[4] = 0 else var[4] = 2 end end " label { area 0 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 0 } label { area 597 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('SCRIPTS_TITLE')" text style 'rg_trajan' text color '$' align center center } button { area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam 'rgdport7' sequence lua "RgUISkin" scaleToClip } button { area 102 450 222 50 text lua "rgString('APPEARANCE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnAppearanceButtonClick() " } button { area 102 504 222 50 text lua "rgString('SOUNDS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnSoundsButtonClick() " } button { area 102 558 222 50 text lua "rgString('COLORS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu() createCharScreen:OnCancelButtonClick() currentPanelID = 17 characterScreen:OnHairSkinButtonClick() " } button { area 102 612 222 50 text lua "rgString('SCRIPT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip frame 2 action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnScriptButtonClick() " } button { area 102 666 222 50 text lua "rgString('BIOGRAPHY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnCusomizeBiographyButtonClick() " } label { area 780 88 486 572 bam RGDSTBC1 ScaleToClip sequence lua "RgUISkin" enabled "showingSmartOptions == false" } label { area 1078 88 188 572 bam RGDSTBC4 ScaleToClip sequence lua "RgGetSkinLow()" enabled "showingSmartOptions == true" } text { area 1098 108 158 528 text lua "scriptDescription" scrollbar 'rgdscrl1' text style "normal_parchment" enabled "showingSmartOptions == true" } text { area 804 108 440 528 text lua "scriptDescription" scrollbar 'rgdscrl1' text style "normal_parchment" enabled "showingSmartOptions == false" } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, scriptList_idx)" ScaleToClip } label { area 0 0 -1 -1 enabled "scriptList[rowNumber] ~= ''" text lua "formatScriptName(scriptList[rowNumber])" text style "normal" pad 8 0 0 0 } label { area -10 -10 10000 10000 enabled "scriptList[rowNumber] == ''" rectangle 1 } } area 360 102 408 552 rowheight 24 hideHighlight table "scriptList" var "scriptList_idx" scrollbar 'rgdscrl1' action " showingSmartOptions = (scriptList_idx == 2) if scriptList[scriptList_idx] ~= '' then Infinity_OnScriptItemSelect(scriptList_idx - 1) doneEnabled = characterScreen:IsDoneButtonClickable(currentID) else scriptList_idx = 0 scriptDescription = '' doneEnabled = false end " } list { column { width 80 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selScriptOpt)" ScaleToClip } label { area 8 1 -1 -1 text lua "getUiString( scriptOptions[rowNumber][1])" text style "normal" text align left center } } column { width 20 label { area 10 12 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip frame lua "scriptOptions[rowNumber][4]" } } area 780 102 318 552 rowheight 50 hideHighlight table "scriptOptions" var selScriptOpt scrollbar 'rgdscrl1' enabled "showingSmartOptions == true" action " scriptDescription = getUiString(scriptOptions[selScriptOpt][2]) selectedSL = 0 selFeedOpt = 0 if(cellNumber == 2) then Infinity_PlaySound('GAM_09') handleScriptOptionChange(selScriptOpt) end " } button { on escape area 370 660 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "CANCEL_BUTTON" text style "button" action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 " } button { clickable lua "doneEnabled" area 818 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text "DONE_BUTTON" text style "button" action " if showingSmartOptions == true then for index, var in pairs(scriptOptions) do characterScreen:SetTempSmartScriptLocal(var[3], var[5]) end end characterScreen:OnDoneButtonClick() Infinity_PopMenu() currentPanelID = 17 " } } ` list_GUIREC_13_0_idx = 0 characterExportCharacterEdit = "" ` menu { name 'CHARACTER_EXPORT' align center center modal ignoreEsc onOpen " currentPanelID = const.EXPORT_ID; Infinity_FocusTextEdit('characterExportCharacterEditArea'); " label { area 0 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 0 } label { area 597 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('EXPORT_TITLE')" text style 'rg_trajan' text color '$' align center center } button { area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam rgdport7 sequence lua "RgUISkin" scaleToClip } label { area 780 88 486 572 bam RGDSTBC1 ScaleToClip sequence lua "RgUISkin" } button { enabled "CurrentlyInGame()" area 102 558 222 50 text "CUSTOMIZE_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable false } button { enabled "CurrentlyInGame()" area 102 612 222 50 text "EXPORT_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable false } button { enabled "CurrentlyInGame()" area 102 666 222 50 text "REFORM_PARTY_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable false } button { enabled "CurrentlyInGame()" area 102 504 222 50 text "DUAL_CLASS_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable false } button { enabled "CurrentlyInGame()" area 102 450 222 50 text "LEVEL_UP_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable false } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, list_GUIREC_13_0_idx)" ScaleToClip } label { area 0 0 -1 -1 text lua "list_GUIREC_13_0[rowNumber]" text style "normal" pad 8 0 0 0 } } area 370 184 398 464 rowheight 24 hideHighlight table "list_GUIREC_13_0" var "list_GUIREC_13_0_idx" scrollbar 'rgdscrl1' action " Infinity_OnCharacterItemSelect(list_GUIREC_13_0_idx - 1) " } label { area 370 102 398 34 text "EXPORT_FILENAME_LABEL" text style "normal" text color 3 } edit { name "characterExportCharacterEditArea" area 370 136 398 40 var characterExportCharacterEdit text style "edit" maxlines 1 fill 112 111 111 64 action " if(characterExportCharacterEdit:len() > 7 and key_pressed ~= 8) then return 0 else Infinity_UpdateCharacterRecordExportPanel() return 1 end " } text { area 804 112 436 522 text 10962 text style "normal_parchment" scrollbar 'rgdscrl1' } button { on escape area 370 660 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text lua "rgString('CANCEL_BUTTON')" text style "button" action " characterScreen:OnCancelButtonClick() Infinity_PopMenu('CHARACTER_EXPORT') currentPanelID = 0 " } button { clickable lua "characterScreen:IsDoneButtonClickable(currentID)" area 818 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" text style "button" action " characterScreen:OnDoneButtonClick() " } } ` list_GUIREC_20_5_idx = 0 doneEnabled = 0 function compareCustomSound(s1, s2) -- DEFAULT, then normal alphabetically, then AoN alphabetically (result must be strictly less than) if (s1.sound == "DEFAULT") then return s2.sound ~= "DEFAULT"; elseif (string.sub(s1.sound, 1, 4) == "BDTP") then if (string.sub(s2.sound, 1, 4) ~= "BDTP") then return false; end elseif (string.sub(s2.sound, 1, 4) == "BDTP") then return true; end return s1.sound < s2.sound; end function prepareSounds(soundTable) -- preserve original indices to return as selection local i; for i = 1, #soundTable, 1 do local s = soundTable[i]; if (type(s) == "string") then soundTable[i] = { index = i, sound = s } end end table.sort(soundTable, compareCustomSound) end function getSoundStringRef(rowNumber, tab) if ( filenames_stringrefs[tab[rowNumber].sound] ~= nil ) then return Infinity_FetchString(filenames_stringrefs[tab[rowNumber].sound][1]) else return tab[rowNumber].sound end end function RgGetSkinLow() if RgUISkin == 0 then return 0 else return 1 end end ` menu { name 'CHARACTER_SOUND' align center center ignoreesc onOpen " currentPanelID = const.SOUND_ID Infinity_OnSoundItemSelect(0) doneEnabled = characterScreen:IsDoneButtonClickable(currentID) prepareSounds(list_GUIREC_20_5) " label { area 0 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 0 } label { area 597 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('SOUND_TITLE')" text style 'rg_trajan' text color '$' align center center } button { area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam 'rgdport7' sequence lua "RgUISkin" scaleToClip } button { area 102 450 222 50 text lua "rgString('APPEARANCE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnAppearanceButtonClick() " } button { area 102 504 222 50 text lua "rgString('SOUNDS_BUTTON')" text style "button" bam rgdbuts3 ScaleToClip sequence lua "RgUISkin" frame 2 action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnSoundsButtonClick() " } button { area 102 558 222 50 text lua "rgString('COLORS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu() createCharScreen:OnCancelButtonClick() currentPanelID = 17 characterScreen:OnHairSkinButtonClick() " } button { area 102 612 222 50 text lua "rgString('SCRIPT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnScriptButtonClick() " } button { area 102 666 222 50 text lua "rgString('BIOGRAPHY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnCusomizeBiographyButtonClick() " } label { area 818 88 448 572 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, list_GUIREC_20_5_idx)" ScaleToClip } label { area 0 0 -1 -1 text lua "getSoundStringRef(rowNumber, list_GUIREC_20_5)" text style "normal" pad 8 0 0 0 } } hideHighlight area 378 108 434 478 rowheight 24 table "list_GUIREC_20_5" var "list_GUIREC_20_5_idx" scrollbar 'rgdscrl1' action " Infinity_OnSoundItemSelect(list_GUIREC_20_5[list_GUIREC_20_5_idx].index - 1) doneEnabled = characterScreen:IsDoneButtonClickable(currentID) " } text { area 840 108 402 526 text 11315 scrollbar 'rgdscrl1' text style "normal_parchment" } button { clickable lua "list_GUIREC_20_5_idx" area 370 586 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "PLAY_SOUND_BUTTON" text style "button" action " characterScreen:OnPlayButtonClick(); " } button { on escape area 370 660 448 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "CANCEL_BUTTON" text style "button" action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 " } button { clickable lua "doneEnabled" area 818 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text "DONE_BUTTON" text style "button" action " characterScreen:OnDoneButtonClick() Infinity_PopMenu() currentPanelID = 17 " } } ` function toggleFrame(curFrame) if curFrame == 0 then return 2 else return 0 end end function getSelected(cur, my) if cur == my then return 1 else return 0 end end function rgGetSelected(cur, my) if cur == my then return 0 else return 1 end end function removeStoryModeOption() for index = 1, #toggleTitles-1, 1 do toggleTitles[index] = toggleTitles[index+1] end toggleTitles[#toggleTitles] = nil end function addStoryModeOption() for index = #toggleTitles, 1, -1 do toggleTitles[index+1] = toggleTitles[index] end toggleTitles[1] = {'DIFFICULTY_LABEL_STORYMODE', 'DIFFICULTY_DESCRIPTION_STORYMODE', 65, 0, 0} end function removeOptionFromList(list, option) local startingPoint = 1 local found = false for index = 1, #list-1, 1 do if list[index][3] == option then startingPoint = index found = true break end end if found == true then for index = startingPoint, #list-1, 1 do list[index] = list[index+1] end list[#list] = nil end end toggleTitles = { } function rgGetGameplayToggles() if rgGameEngine == 3 then --iwd toggleTitles = { {"GORE_LABEL", "GORE_DESCRIPTION", 19, 0, 0}, {"GROUP_INFRA_LABEL", "GROUP_INFRA_DESCRIPTION", 42, 0, 0}, {"MAX_HP_ON_LEVEL_LABEL", "MAX_HP_ON_LEVEL_DESCRIPTION", 55, 0, 0}, {"HEAL_ON_REST_LABEL", "HEAL_ON_REST_DESCRIPTION", 50, 0, 0}, {40198, 40199, 57, 0, 0}, {"WEATHER_LABEL", "WEATHER_DESCRIPTION", 47, 0, 0}, {40200, 40201, 59, 0, 0}, {"DIFFICULTY_LABEL_STORYMODE_MIXED", "DIFFICULTY_DESCRIPTION_STORYMODE_BG2EE", 65, 0, 0}, {40844, 40845, 62, 0, 0}, {"NO_DAMAGE_INCREASE_LABEL", "NO_DAMAGE_INCREASE_DESCRIPTION", 64, 0, 0}, {"ENABLE_CLOUD_LABEL", "ENABLE_CLOUD_DESCRIPTION", 60, 0, 0}, {"WORLDMAP_HIGHLIGHT_LABEL", "WORLDMAP_HIGHLIGHT_DESCRIPTION", 66, 0, 0}, {"MP_CHAT_LABEL", "MP_CHAT_DESCRIPTION", 67, 0, 0}, {"AUTO_USE_MAGIC_AMMO_LABEL", "AUTO_USE_MAGIC_AMMO_DESCRIPTION", 68, 0, 0}, } else toggleTitles = { {"DIFFICULTY_LABEL_STORYMODE_MIXED", "DIFFICULTY_DESCRIPTION_STORYMODE", 65, 0, 0}, {"ENABLE_CLOUD_LABEL", "ENABLE_CLOUD_DESCRIPTION", 60, 0, 0}, {"WORLDMAP_HIGHLIGHT_LABEL", "WORLDMAP_HIGHLIGHT_DESCRIPTION", 66, 0, 0}, {"MP_CHAT_LABEL", "MP_CHAT_DESCRIPTION", 67, 0, 0}, {"GORE_LABEL", "GORE_DESCRIPTION", 19, 0, 0}, {"WEATHER_LABEL", "WEATHER_DESCRIPTION", 47, 0, 0}, {"GROUP_INFRA_LABEL", "GROUP_INFRA_DESCRIPTION", 42, 0, 0}, {"HEAL_ON_REST_LABEL", "HEAL_ON_REST_DESCRIPTION", 50, 0, 0}, {"MAX_HP_ON_LEVEL_LABEL", "MAX_HP_ON_LEVEL_DESCRIPTION", 55, 0, 0}, {"NO_DAMAGE_INCREASE_LABEL", "NO_DAMAGE_INCREASE_DESCRIPTION", 64, 0, 0}, {"AUTO_USE_MAGIC_AMMO_LABEL", "AUTO_USE_MAGIC_AMMO_DESCRIPTION", 68, 0, 0}, } end end selectedOpt = 0 helpString = 0 ttDelaySLDR = 0 keyboardSLDR = 0 mouseSLDR = 0 difficultySLDR = 0 panelID = 8 function getDifficulty(d) local text = "" if ( d ==0 ) then text = getUiString("DIFFICULTY_LABEL_EASY") elseif (d == 1) then text = getUiString("DIFFICULTY_LABEL_NORMAL") elseif (d == 2) then text = getUiString("DIFFICULTY_LABEL_CORERULES") elseif (d == 3) then text = getUiString("DIFFICULTY_LABEL_HARD") elseif (d == 4) then text = getUiString("DIFFICULTY_LABEL_INSANE") elseif (d == 5) then text = string.upper(getUiString("MULTIPLAYER_DIFFICULTY_LABEL")).." "..getUiString("DIFFICULTY_LABEL_LEGACYOFBHAAL") end return text end ` menu { name 'OPTIONS_GAMEPLAY' align center center modal onOpen " RgOptionsMode = 1 Infinity_PushMenu('RG_START_OPTIONS_BAR') panelID = 8 helpString = 'GAMEPLAY_DESCRIPTION' selectedOpt = 0 selectedSL = 0 if Infinity_GetOption(59, 8) ~= 0 and toggleTitles[1][3] == 65 then removeStoryModeOption() elseif Infinity_GetOption(59, 8) == 0 and toggleTitles[1][3] ~= 65 then addStoryModeOption() end ttDelaySLDR = Infinity_GetOption(1, panelID) keyboardSLDR = Infinity_GetOption(3, panelID) mouseSLDR = Infinity_GetOption(2, panelID) difficultySLDR = Infinity_GetOption(12, panelID) for index, var in pairs(toggleTitles) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 end end if Infinity_CanCloudSave() == false and (toggleTitles[1][3] == 60 or toggleTitles[2][3] == 60) then removeOptionFromList(toggleTitles,60) end " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 action " helpString = 'GAMEPLAY_DESCRIPTION' selectedOpt = 0 selectedSL = 0 " } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 action " helpString = 'GAMEPLAY_DESCRIPTION' selectedOpt = 0 selectedSL = 0 " } label { area 480 32 405 52 text lua "rgString('GAMEPLAY_TITLE')" text style 'rg_trajan' text color '$' align center center } list { column { width 85 label { --enabled "rowNumber == selectedOpt" area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selectedOpt)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( toggleTitles[rowNumber][1])" text style "normal" --text shadow lua "RgUISkin" text align left center } } column { width 15 label { area 10 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "toggleTitles[rowNumber][4]" } } area 408 106 416 624 hideHighlight rowheight 46 table "toggleTitles" var selectedOpt scrollbar 'rgdscrl1' action " panelID = 8 selectedSL = 0 helpString = toggleTitles[selectedOpt][2] if(cellNumber == 2) then Infinity_PlaySound('GAM_09') toggleTitles[selectedOpt][4] = toggleFrame(toggleTitles[selectedOpt][4]) if toggleTitles[selectedOpt][4] == 0 then toggleTitles[selectedOpt][5] = 0 else toggleTitles[selectedOpt][5] = 1 end end if selectedOpt == 1 and toggleTitles[1][5] == 1 then groundItemsButtonToggle = 1 highlightButtonToggle = 1 end " } label { area 838 444 425 216 bam rgdobcg sequence lua "RgUISkin" scaleToClip } text { area 848 454 404 196 text lua "getUiString(helpString)" text style normal text align left top scrollbar 'rgdscrl1' } text { area 838 126 212 52 text "TOOLTIP_DELAY_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 1)" --text highlight lua "getSelected(selectedSL, 1)" action " helpString = 'TOOLTIP_DELAY_DESCRIPTION' selectedOpt = 0 selectedSL = 1 " } slider { area 1066 126 200 47 position "ttDelaySLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 action " helpString = 'TOOLTIP_DELAY_DESCRIPTION' selectedOpt = 0 selectedSL = 1 " } text { area 838 188 212 52 text "KEYBOARD_SCRLSPEED_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 2)" --text highlight lua "getSelected(selectedSL, 2)" enabled "not e:IsTouchUI()" action " helpString = 'KEYBOARD_SCRLSPEED_DESCRIPTION' selectedOpt = 0 selectedSL = 2 " } slider { area 1066 188 200 47 position "keyboardSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 enabled "not e:IsTouchUI()" action " helpString = 'KEYBOARD_SCRLSPEED_DESCRIPTION' selectedOpt = 0 selectedSL = 2 " } text { area 838 250 212 52 text "MOUSE_SCRLSPEED_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 3)" --text highlight lua "getSelected(selectedSL, 3)" enabled "not e:IsTouchUI()" action " helpString = 'MOUSE_SCRLSPEED_DESCRIPTION' selectedOpt = 0 selectedSL = 3 " } slider { area 1066 250 200 47 position "mouseSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 enabled "not e:IsTouchUI()" action " helpString = 'MOUSE_SCRLSPEED_DESCRIPTION' selectedOpt = 0 selectedSL = 3 " } text { area 838 328 212 52 text "DIFFICULTY_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 4)" --text highlight lua "getSelected(selectedSL, 4)" enabled "Infinity_GetOption(59, 8) == 0" action " helpString = 'DIFFICULTY_DESCRIPTION' selectedOpt = 0 selectedSL = 4 " } slider { area 1066 328 200 47 position "difficultySLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 5 pad 5 0 4 0 enabled "Infinity_GetOption(59, 8) == 0 and toggleTitles[1][4] == 0" action " helpString = 'DIFFICULTY_DESCRIPTION' selectedOpt = 0 selectedSL = 4 " } label { area 1066 375 200 35 bam rgdslct sequence lua "RgUISkin*2" ScaleToClip text lua "getDifficulty(difficultySLDR)" text style "normal" text align center center enabled "Infinity_GetOption(59, 8) == 0 and toggleTitles[1][4] == 0" } label { area 112 384 392 39 text lua "getDifficulty(5)" text style "normal" text align center center enabled "Infinity_GetOption(59, 8) ~= 0" } --fakes for story mode label { area 1066 328 200 47 bam 'RGDSLDRB' scaleToClip enabled "Infinity_GetOption(59, 8) == 0 and toggleTitles[1][4] ~= 0" action " helpString = 'DIFFICULTY_DESCRIPTION' selectedOpt = 0 selectedSL = 4 " } label { area 1066 375 200 35 text lua "getDifficulty(0)" text style "normal" text align center center enabled "Infinity_GetOption(59, 8) == 0 and toggleTitles[1][4] ~= 0" } button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('OPTIONS_GAMEPLAY') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('OPTIONS_GAMEPLAY') RgOptionsMode = 0 " } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " panelID = 8 Infinity_ChangeOption( 1, ttDelaySLDR, panelID) Infinity_ChangeOption( 3, keyboardSLDR, panelID ) Infinity_ChangeOption( 2, mouseSLDR, panelID ) Infinity_ChangeOption( 12, difficultySLDR + 1, panelID) -- cannot set story mode through slider selectedOpt = 0 selectedSL = 0 for index, var in pairs(toggleTitles) do Infinity_ChangeOption( var[3], var[5], panelID) end panelID = 8 Infinity_PopMenu('OPTIONS_GAMEPLAY') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } } ` function rgGetAutopauseToggles() if rgGameEngine == 0 then --bg1 autoPauseToggles = { {'WEAPON_UNUSABLE_LABEL',18036, 5 , 0, 0}, {'END_OF_ROUND_LABEL',10640, 25, 0, 0}, {'ENEMY_SIGHTED_LABEL',23514, 26, 0, 0}, {'SPELL_CAST_LABEL',24432, 31, 0, 0}, {'TRAP_FOUND_LABEL',24433, 34, 0, 0} } characterPauseToggles = { {'CENTER_MEMBER_LABEL',24434, 37, 0, 0}, {'CHARACTER_HIT_LABEL',18032, 1 , 0, 0}, {'CHARACTER_INJURED_LABEL',18033, 2 , 0, 0}, {'CHARACTER_DEATH_LABEL',18034, 3 , 0, 0}, {'CHARACTER_ATTACKED_LABEL',18035, 4 , 0, 0}, {'CHARACTER_TARGET_DESTROYED',18037, 13, 0, 0}, } elseif rgGameEngine == 1 then --sod autoPauseToggles = { {'WEAPON_UNUSABLE_LABEL',18036, 5 , 0, 0}, {'END_OF_ROUND_LABEL',10640, 25, 0, 0}, {'ENEMY_SIGHTED_LABEL',23514, 26, 0, 0}, {'SPELL_CAST_LABEL',24432, 31, 0, 0}, {'TRAP_FOUND_LABEL',24433, 34, 0, 0} } characterPauseToggles = { {'CENTER_MEMBER_LABEL',24434, 37, 0, 0}, {'CHARACTER_HIT_LABEL',18032, 1 , 0, 0}, {'CHARACTER_INJURED_LABEL',18033, 2 , 0, 0}, {'CHARACTER_DEATH_LABEL',18034, 3 , 0, 0}, {'CHARACTER_ATTACKED_LABEL',18035, 4 , 0, 0}, {'CHARACTER_TARGET_DESTROYED',18037, 13, 0, 0}, } elseif rgGameEngine == 2 or rgGameEngine == 4 then --bg2 autoPauseToggles = { {'WEAPON_UNUSABLE_LABEL',18036, 5 , 0, 0}, {'END_OF_ROUND_LABEL',10640, 25, 0, 0}, {'ENEMY_SIGHTED_LABEL',23514, 26, 0, 0}, {'SPELL_CAST_LABEL',31872, 31, 0, 0}, {'TRAP_FOUND_LABEL',58171, 34, 0, 0} } characterPauseToggles = { {'CENTER_MEMBER_LABEL',10571, 37, 0, 0}, {'CHARACTER_HIT_LABEL',18032, 1 , 0, 0}, {'CHARACTER_INJURED_LABEL',18033, 2 , 0, 0}, {'CHARACTER_DEATH_LABEL',18034, 3 , 0, 0}, {'CHARACTER_ATTACKED_LABEL',18035, 4 , 0, 0}, {'CHARACTER_TARGET_DESTROYED',18037, 13, 0, 0}, } elseif rgGameEngine == 3 then --iwd autoPauseToggles = { {'WEAPON_UNUSABLE_LABEL',18036, 5 , 0, 0}, {'END_OF_ROUND_LABEL',10640, 25, 0, 0}, {'ENEMY_SIGHTED_LABEL',23514, 26, 0, 0}, {'SPELL_CAST_LABEL',31872, 31, 0, 0}, {'TRAP_FOUND_LABEL',24433,24433,58171,34672, 34, 0, 0} } characterPauseToggles = { {'CENTER_MEMBER_LABEL',24434,24434,10571,10571, 37, 0, 0}, {'CHARACTER_HIT_LABEL',18032, 1 , 0, 0}, {'CHARACTER_INJURED_LABEL',18033, 2 , 0, 0}, {'CHARACTER_DEATH_LABEL',18034, 3 , 0, 0}, {'CHARACTER_ATTACKED_LABEL',18035, 4 , 0, 0}, {'CHARACTER_TARGET_DESTROYED',18037, 13, 0, 0}, } end end selOptAP = 0 ` menu { name 'OPTIONS_AUTOPAUSE' modal align center center onOpen " RgOptionsMode = 5 Infinity_PushMenu('RG_START_OPTIONS_BAR') panelID = 10 selOptAP = 0 autopauseString = 18044 for index, var in pairs(autoPauseToggles) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 end end for index, var in pairs(characterPauseToggles) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 end end " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 action " autopauseString = 18044 selOptAP = 0 " } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 action " autopauseString = 18044 selOptAP = 0 " } label { area 838 444 425 216 bam rgdobcg sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString('AUTO_PAUSE_TITLE')" text style 'rg_trajan' text color '$' align center center } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selOptAP)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( autoPauseToggles[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 10 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "autoPauseToggles[rowNumber][4]" } } area 408 396 416 276 hideHighlight rowheight 46 table "autoPauseToggles" var selOptAP scrollbar 'rgdscrl1' action " selOptAPC = 0 autopauseString = autoPauseToggles[selOptAP][2] if(cellNumber == 2) then Infinity_PlaySound('GAM_09') autoPauseToggles[selOptAP][4] = toggleFrame(autoPauseToggles[selOptAP][4]) if autoPauseToggles[selOptAP][4] == 0 then autoPauseToggles[selOptAP][5] = 0 else autoPauseToggles[selOptAP][5] = 1 end end " } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selOptAPC)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( characterPauseToggles[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 10 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "characterPauseToggles[rowNumber][4]" } } area 408 106 416 290 hideHighlight rowheight 46 table "characterPauseToggles" var selOptAPC scrollbar 'rgdscrl1' action " selOptAP = 0 autopauseString = characterPauseToggles[selOptAPC][2] if(cellNumber == 2) then Infinity_PlaySound('GAM_09') characterPauseToggles[selOptAPC][4] = toggleFrame(characterPauseToggles[selOptAPC][4]) if characterPauseToggles[selOptAPC][4] == 0 then characterPauseToggles[selOptAPC][5] = 0 else characterPauseToggles[selOptAPC][5] = 1 end --Infinity_ChangeOption(characterPauseToggles[selOptAPC][3], characterPauseToggles[selOptAPC][5], panelID ) end " } text { area 848 454 404 196 text lua "Infinity_FetchString(autopauseString)" text style normal scrollbar 'rgdscrl1' } button { enabled "RgUISkin > 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " panelID = 8 helpString = 'GAMEPLAY_DESCRIPTION' Infinity_PopMenu('OPTIONS_AUTOPAUSE') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " panelID = 8 helpString = 'GAMEPLAY_DESCRIPTION' Infinity_PopMenu('OPTIONS_AUTOPAUSE') RgOptionsMode = 0 " } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " panelID = 10 for index, var in pairs(autoPauseToggles) do Infinity_ChangeOption( var[3], var[5], panelID) end for index, var in pairs(characterPauseToggles) do Infinity_ChangeOption( var[3], var[5], panelID) end panelID = 8 Infinity_PopMenu('OPTIONS_AUTOPAUSE') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } } ` function rgGetGraphicToggles() if rgGameEngine == 0 then --bg1 graphicsToggles = { {'FULL_SCREEN_LABEL',18000, 9 , 0, 0, 0}, {'HARDWARE_CURSOR_LABEL',32205, 13, 0, 0, 0}, {'SCALE_UI_LABEL',32206, 14, 0, 0, 0}, {'ZOOM_LOCK_LABEL',32712, 36, 0, 0, 0}, {'SPRITE_OUTLINE_LABEL',32708, 15, 0, 0, 0}, {'GREYSCALE_ON_PAUSE_LABEL',32709, 66, 0, 0, 0}, {'HIGHLIGHT_SPRITE_LABEL',32710, 67, 0, 0, 0}, {'DITHER_ALWAYS_LABEL',18021, 52, 0, 0, 0}, {'SHOW_HP_LABEL',32715, 53, 0, 0, 0}, {'SHOW_HEALTHBAR_LABEL',32718, 65, 0, 0, 0}, {'SHOW_BLACK_SPACE_LABEL','SHOW_BLACK_SPACE_DESCRIPTION', 69, 0, 0, 0}, {'NEAREST_NEIGHBOUR_LABEL','NEAREST_NEIGHBOUR_DESCRIPTION', 70, 0, 0, 0}, {'AREA_MAP_ZOOM_TRANSITION_LABEL','AREA_MAP_ZOOM_TRANSITION_DESCRIPTION', 71, 0, 0, 0} } elseif rgGameEngine == 1 then --sod graphicsToggles = { {'FULL_SCREEN_LABEL',18000, 9 , 0, 0, 0}, {'HARDWARE_CURSOR_LABEL',32205, 13, 0, 0, 0}, {'SCALE_UI_LABEL',32206, 14, 0, 0, 0}, {'ZOOM_LOCK_LABEL',66654, 36, 0, 0, 0}, {'SPRITE_OUTLINE_LABEL',65909, 15, 0, 0, 0}, {'GREYSCALE_ON_PAUSE_LABEL',32709, 66, 0, 0, 0}, {'HIGHLIGHT_SPRITE_LABEL',32710, 67, 0, 0, 0}, {'DITHER_ALWAYS_LABEL',18021, 52, 0, 0, 0}, {'SHOW_HP_LABEL',66657, 53, 0, 0, 0}, {'SHOW_HEALTHBAR_LABEL',69567, 65, 0, 0, 0}, {'SHOW_BLACK_SPACE_LABEL','SHOW_BLACK_SPACE_DESCRIPTION', 69, 0, 0, 0}, {'NEAREST_NEIGHBOUR_LABEL','NEAREST_NEIGHBOUR_DESCRIPTION', 70, 0, 0, 0}, {'AREA_MAP_ZOOM_TRANSITION_LABEL','AREA_MAP_ZOOM_TRANSITION_DESCRIPTION', 71, 0, 0, 0} } elseif rgGameEngine == 2 or rgGameEngine == 4 then --bg2 graphicsToggles = { {'FULL_SCREEN_LABEL',18000, 9 , 0, 0, 0}, {'HARDWARE_CURSOR_LABEL',93703, 13, 0, 0, 0}, {'SCALE_UI_LABEL',93704, 14, 0, 0, 0}, {'ZOOM_LOCK_LABEL',103188, 36, 0, 0, 0}, {'SPRITE_OUTLINE_LABEL',103189, 15, 0, 0, 0}, {'GREYSCALE_ON_PAUSE_LABEL',103190, 66, 0, 0, 0}, {'HIGHLIGHT_SPRITE_LABEL',103191, 67, 0, 0, 0}, {'DITHER_ALWAYS_LABEL',18021, 52, 0, 0, 0}, {'SHOW_HP_LABEL',103205, 53, 0, 0, 0}, {'SHOW_HEALTHBAR_LABEL',103192, 65, 0, 0, 0}, {'SHOW_BLACK_SPACE_LABEL','SHOW_BLACK_SPACE_DESCRIPTION', 69, 0, 0, 0}, {'NEAREST_NEIGHBOUR_LABEL','NEAREST_NEIGHBOUR_DESCRIPTION', 70, 0, 0, 0}, {'AREA_MAP_ZOOM_TRANSITION_LABEL','AREA_MAP_ZOOM_TRANSITION_DESCRIPTION', 71, 0, 0, 0} } elseif rgGameEngine == 3 then --iwd graphicsToggles = { {'FULL_SCREEN_LABEL',18000, 9 , 0, 0, 0}, {'HARDWARE_CURSOR_LABEL',34783, 13, 0, 0, 0}, {'SCALE_UI_LABEL',34784, 14, 0, 0, 0}, {'ZOOM_LOCK_LABEL',40771, 36, 0, 0, 0}, {'SPRITE_OUTLINE_LABEL',40852, 15, 0, 0, 0}, {'GREYSCALE_ON_PAUSE_LABEL',40853, 66, 0, 0, 0}, {'HIGHLIGHT_SPRITE_LABEL',40854, 67, 0, 0, 0}, {'DITHER_ALWAYS_LABEL',18021, 52, 0, 0, 0}, {'SHOW_HP_LABEL',40197, 53, 0, 0, 0}, {'SHOW_HEALTHBAR_LABEL',40856, 65, 0, 0, 0}, {'SHOW_BLACK_SPACE_LABEL','SHOW_BLACK_SPACE_DESCRIPTION', 69, 0, 0, 0}, {'NEAREST_NEIGHBOUR_LABEL','NEAREST_NEIGHBOUR_DESCRIPTION', 70, 0, 0, 0}, {'AREA_MAP_ZOOM_TRANSITION_LABEL','AREA_MAP_ZOOM_TRANSITION_DESCRIPTION', 71, 0, 0, 0} } end end addedDirectx = false function appendDirectXOption() if addedDirectx == false then dxOption = {'DIRECTX_LABEL', rgGetGameEngineStringRef(32725,32725,103148,40857), 68, 0, 0, 0} table.insert(graphicsToggles, dxOption) addedDirectx = true end end selectedGraphicOpt = 0 fontSizeSLDR = 0 fontSizeCancel = 0 function formatGraphicsInfoString() return options['Graphics']['version'] .. "\nrunning on " .. options['Graphics']['renderer'] .. "\ndriver provided by " .. options['Graphics']['vendor'] end ` menu { name 'OPTIONS_GRAPHICS' modal align center center onOpen " RgOptionsMode = 2 Infinity_PushMenu('RG_START_OPTIONS_BAR') if e:HasDirectX() then appendDirectXOption() end panelID = 6 helpString = 18042 selectedGraphicOpt = 0 selectedSL = 0 fontSizeSLDR = Infinity_GetOption(22, panelID) fontSizeCancel = Infinity_GetOption(22, panelID) for index, var in pairs(graphicsToggles) do var[5] = Infinity_GetOption(var[3], panelID) var[6] = 0 if var[5] == 0 then var[4] = 0 else var[4] = 2 end end if e:IsTouchUI() then removeOptionFromList(graphicsToggles, 9) removeOptionFromList(graphicsToggles, 13) end " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 action " helpString = 18042 selectedSL = 0 " } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 action " helpString = 18042 selectedSL = 0 " } label { area 480 32 405 52 text lua "rgString('GRAPHICS_TITLE')" text style 'rg_trajan' text color '$' align center center } label { area 838 126 410 190 text lua "formatGraphicsInfoString()" text style normal text align center center text shadow lua "RgUISkin" } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selectedGraphicOpt)" ScaleToClip text lua "getUiString( graphicsToggles[rowNumber][1])" text style "normal" pad 10 0 0 0 text align left center } } column { width 15 label { area 10 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "graphicsToggles[rowNumber][4]" } } area 408 106 416 614 hideHighlight rowheight 46 table "graphicsToggles" var selectedGraphicOpt scrollbar 'rgdscrl1' action " panelID = 6 helpString = graphicsToggles[selectedGraphicOpt][2] selectedSL = 0 if(cellNumber == 2) then Infinity_PlaySound('GAM_09') graphicsToggles[selectedGraphicOpt][4] = toggleFrame(graphicsToggles[selectedGraphicOpt][4]) if graphicsToggles[selectedGraphicOpt][4] == 0 then graphicsToggles[selectedGraphicOpt][5] = 0 else graphicsToggles[selectedGraphicOpt][5] = 1 end graphicsToggles[selectedGraphicOpt][6] = 1 --Infinity_ChangeOption(graphicsToggles[selectedGraphicOpt][3], graphicsToggles[selectedGraphicOpt][5], panelID ) end " } label { area 838 444 425 216 bam rgdobcg sequence lua "RgUISkin" scaleToClip } text { area 848 454 404 196 text lua "getStringFromAmbiguousSource(helpString)" text style normal scrollbar 'rgdscrl1' } text { area 838 352 213 48 text "FONT_SIZE_LABEL" text style "normal" text align left center pad 8 0 0 0 text useFontZoom 1 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 2)" --text highlight lua "getSelected(selectedSL, 2)" action " helpString = 17204 selectedGraphicOpt = 0 selectedSL = 2 " } slider { area 1066 352 200 48 position "fontSizeSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 7 pad 5 0 4 0 action " Infinity_ChangeOption( 22, fontSizeSLDR, 6) helpString = 17204 selectedGraphicOpt = 0 selectedSL = 1 " } button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " panelID = 6 Infinity_ChangeOption( 22, fontSizeCancel, panelID) selectedSL = 0 Infinity_PopMenu('OPTIONS_GRAPHICS') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " panelID = 6 Infinity_ChangeOption( 22, fontSizeCancel, panelID) selectedSL = 0 Infinity_PopMenu('OPTIONS_GRAPHICS') RgOptionsMode = 0 " } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " panelID = 6 Infinity_ChangeOption( 22, fontSizeSLDR, panelID) for index, var in pairs(graphicsToggles) do if ( var[6] == 1 ) then Infinity_ChangeOption( var[3], var[5], panelID) end end selectedSL = 0 Infinity_PopMenu('OPTIONS_GRAPHICS') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } } ` soundsToggles = { {'CHARACTER_SUBTITLES_LABEL',18015, 5, 0, 0}, {'BATTLE_CRIES_LABEL',18013, 6, 0, 0}, {'MOVEMENT_SOUNDS_LABEL',18014, 7, 0, 0} } selectedsoundOpt = 0 command = { {'ALWAYS_LABEL',0, 8, 0, 0}, {'SELDOM_LABEL',0, 9, 0, 0}, {'NEVER_LABEL',0, 10, 0, 0} } commandSel = 0 selectOpt = { {'ALWAYS_LABEL',0, 58, 0, 0}, {'SELDOM_LABEL',0, 59, 0, 0}, {'NEVER_LABEL',0, 60, 0, 0} } selectSel = 0 ambientSLDR = 0 sfxSLDR = 0 voiceSLDR = 0 musicSLDR = 0 movieSLDR = 0 ` menu { name 'OPTIONS_SOUND' align center center modal onOpen " RgOptionsMode = 3 Infinity_PushMenu('RG_START_OPTIONS_BAR') panelID = 7 helpString = 18042 selectedsoundOpt = 0 selectedSL = 0 ambientSLDR = Infinity_GetOption(1, panelID) sfxSLDR = Infinity_GetOption(2, panelID) voiceSLDR = Infinity_GetOption(3, panelID) musicSLDR = Infinity_GetOption(4, panelID) movieSLDR = Infinity_GetOption(22, panelID) for index, var in pairs(command) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 commandSel = index end end for index, var in pairs(selectOpt) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 selectSel = index end end for index, var in pairs(soundsToggles) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 selectSel = index end end " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 action " helpString = 18042 " } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 action " helpString = 18042 " } label { area 480 32 405 52 text lua "rgString('SOUND_TITLE')" text style 'rg_trajan' text color '$' align center center } text { area 408 485 400 44 text "CHARACTER_SOUNDS_LABEL" text style "button" text align center center bam rgdslct sequence lua "RgUISkin*2" ScaleToClip --text highlight lua "getSelected(selectedSL, 3)" } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selectedsoundOpt)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( soundsToggles[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 20 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "soundsToggles[rowNumber][4]" } } area 408 529 400 145 hideHighlight rowheight 46 table "soundsToggles" var selectedsoundOpt scrollbar 'rgdscrl1' action " panelID = 7 helpString = soundsToggles[selectedsoundOpt][2] selectedSL = 0 if(cellNumber == 2) then Infinity_PlaySound('GAM_09') soundsToggles[selectedsoundOpt][4] = toggleFrame(soundsToggles[selectedsoundOpt][4]) if soundsToggles[selectedsoundOpt][4] == 0 then soundsToggles[selectedsoundOpt][5] = 0 else soundsToggles[selectedsoundOpt][5] = 1 end end " } text { area 408 108 400 44 bam rgdslct ScaleToClip enabled "getSelected(selectedSL, 1)" } text { area 408 108 400 44 text "COMMAND_SOUNDS_BUTTON" text style "button" text align center center bam rgdslct sequence lua "RgUISkin*2" ScaleToClip --text highlight lua "getSelected(selectedSL, 1)" action " helpString = 18016 selectedsoundOpt = 0 selectedSL = 1 " } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "RgUISkin*2" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( command[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 20 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "command[rowNumber][4]" } } area 408 152 400 145 hideHighlight rowheight 46 table "command" var commandSel scrollbar 'rgdscrl1' hidehighlight action " panelID = 7 helpString = 18016 selectedSL = 1 selectedsoundOpt = 0 opt = commandSel command[1][4] = 0 command[2][4] = 0 command[3][4] = 0 Infinity_PlaySound('GAM_09') command[opt][4] = 2 " } text { area 408 297 400 43 bam rgdslct ScaleToClip enabled "getSelected(selectedSL, 2)" } text { area 408 297 400 43 text "SELECTION_BUTTON" text style "button" text align center center bam rgdslct sequence lua "RgUISkin*2" ScaleToClip --text highlight lua "getSelected(selectedSL, 2)" action " helpString = 11352 selectedsoundOpt = 0 selectedSL = 2 " } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "RgUISkin*2" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( selectOpt[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 20 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "selectOpt[rowNumber][4]" } } area 408 340 400 145 hideHighlight rowheight 46 table "selectOpt" var selectSel scrollbar 'rgdscrl1' hidehighlight action " panelID = 7 helpString = 11352 selectedSL = 2 opt = selectSel selectOpt[1][4] = 0 selectOpt[2][4] = 0 selectOpt[3][4] = 0 selectedsoundOpt = 0 Infinity_PlaySound('GAM_09') selectOpt[opt][4] = 2 " } label { area 838 444 425 216 bam rgdobcg sequence lua "RgUISkin" scaleToClip } text { area 848 454 406 196 text lua "Infinity_FetchString(helpString)" text style normal scrollbar 'rgdscrl1' } text { area 838 108 428 44 text "VOLUME_CONTROLS_LABEL" text style "button" text align center center bam rgdslct sequence lua "RgUISkin*2" ScaleToClip } text { area 838 160 209 48 text "AMBIENT_VOLUME_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 4)" --text highlight lua "getSelected(selectedSL, 4)" action " helpString = 18008 selectedsoundOpt = 0 selectedSL = 4 " } slider { area 1066 160 200 48 position "ambientSLDR" sliderBackground 'RGDSLDRB' scaleToClip bam 'RGDSLDRS' sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 action " helpString = 18008 selectedsoundOpt = 0 selectedSL = 4 " } text { area 838 214 209 48 text "SFX_VOLUME_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 5)" --text highlight lua "getSelected(selectedSL, 5)" action " helpString = 18009 selectedsoundOpt = 0 selectedSL = 5 " } slider { area 1066 214 200 48 sliderBackground 'RGDSLDRB' scaleToClip position "sfxSLDR" bam 'RGDSLDRS' sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 action " helpString = 18009 selectedsoundOpt = 0 selectedSL = 5 " } text { area 838 268 209 48 text "VOICE_VOLUME_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 6)" --text highlight lua "getSelected(selectedSL, 6)" action " helpString = 18010 selectedsoundOpt = 0 selectedSL = 6 " } slider { area 1066 268 200 48 position "voiceSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 action " helpString = 18010 selectedsoundOpt = 0 selectedSL = 6 " } text { area 838 322 209 48 text "MUSIC_VOLUME_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 7)" --text highlight lua "getSelected(selectedSL, 7)" action " helpString = 18011 selectedsoundOpt = 0 selectedSL = 7 " } slider { area 1066 322 200 48 position "musicSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 action " helpString = 18011 selectedsoundOpt = 0 selectedSL = 7 " } text { area 838 376 209 48 text "MOVIE_VOLUME_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 8)" --text highlight lua "getSelected(selectedSL, 8)" action " helpString = 18012 selectedsoundOpt = 0 selectedSL = 8 " } slider { area 1066 376 200 48 position "movieSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 40 pad 5 0 4 0 action " helpString = 18012 selectedsoundOpt = 0 selectedSL = 8 " } button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " selectedSL = 0 panelID = 8 Infinity_PopMenu('OPTIONS_SOUND') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " selectedSL = 0 panelID = 8 Infinity_PopMenu('OPTIONS_SOUND') RgOptionsMode = 0 " } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " panelID = 7 for index, var in pairs(command) do Infinity_Log('Com var[4] #' .. index .. ': ' .. var[4]) if var[4] == 2 then Infinity_ChangeOption( var[3], 1, panelID) end end for index, var in pairs(selectOpt) do Infinity_Log('Sel var[4] #' .. index .. ': ' .. var[4]) if var[4] == 2 then Infinity_ChangeOption( var[3], 1, panelID) end end Infinity_ChangeOption( 1, ambientSLDR, panelID) Infinity_ChangeOption( 2, sfxSLDR, panelID ) Infinity_ChangeOption( 3, voiceSLDR, panelID ) Infinity_ChangeOption( 4, musicSLDR, panelID) Infinity_ChangeOption( 22, movieSLDR, panelID) selectedOpt = 0 selectedSL = 0 for index, var in pairs(soundsToggles) do Infinity_ChangeOption( var[3], var[5], panelID) end panelID = 8 Infinity_PopMenu('OPTIONS_SOUND') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } } ` feedbackToggles = { {'COLORED_MARKERS_LABEL', 'COLORED_MARKERS_HELP', 38, 0, 0}, {'CLASSIC_MARKERS_LABEL', 'CLASSIC_MARKERS_HELP', 45, 0, 0}, {'ENABLE_CONFIRMATION_LABEL', 'ENABLE_CONFIRMATION_HELP', 41, 0, 0}, {'DISABLE_COSMETIC_ATTACKS_LABEL', 'DISABLE_COSMETIC_ATTACKS_HELP', 43, 0, 0}, {'JOURNAL_POPUPS_LABEL', 'JOURNAL_POPUPS_HELP', 44, 0, 0}, {'EQUIPMENT_COMPARISON_LABEL', 'EQUIPMENT_COMPARISON_DESCRIPTION', 46, 0, 0} } messagesToggles = { {'TO_HIT_ROLLS_LABEL', 'TO_HIT_ROLLS_HELP', 10, 0, 0}, {'ACTIONS_LABEL', 'ACTIONS_HELP', 12, 0, 0}, {'STATE_CHANGES_LABEL', 'STATE_CHANGES_HELP', 13, 0, 0}, {'COMBAT_INFO_LABEL', 'COMBAT_INFO_HELP', 11, 0, 0}, {'SELECTION_TEXT_LABEL', 'SELECTION_TEXT_HELP', 14, 0, 0}, {'MISC_LABEL', 'MISC_HELP', 15, 0, 0} } selFeedOpt = 0 selMessageOpt = 0 helpString = 0 markerFeedSLDR = 0 locatorFeedSLDR = 0 function getFrequency(d,includeHighter) strref = "" if ( d ==0 ) then strref = "MINIMUM" elseif (d == 1) then strref = "LOW" elseif (d == 2) then strref = "MEDIUM" elseif (d == 3) then strref = "HIGH" elseif (d == 4 and includeHighter == true) then strref = "HIGHER" elseif (d == 4 and includeHighter == false) then strref = "MAXIMUM" elseif (d == 5) then strref = "MAXIMUM" end return getUiString(strref) end ` menu { name 'OPTIONS_FEEDBACK' align center center modal onOpen " RgOptionsMode = 4 Infinity_PushMenu('RG_START_OPTIONS_BAR') panelID = 9 helpString = 'FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 0 markerFeedSLDR = Infinity_GetOption(8, panelID) locatorFeedSLDR = Infinity_GetOption(9, panelID) for index, var in pairs(feedbackToggles) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 end end for index, var in pairs(messagesToggles) do var[5] = Infinity_GetOption(var[3], panelID) if var[5] == 0 then var[4] = 0 else var[4] = 2 end end " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 action " helpString = 'FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 0 " } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 action " helpString = 'FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 0 " } label { area 480 32 405 52 text lua "rgString('FEEDBACK_TITLE')" text style 'rg_trajan' text color '$' align center center } label { area 416 440 410 44 text "VISUAL_FEEDBACK_LABEL" text style "button" bam rgdslct sequence lua "RgUISkin*2" ScaleToClip text align center center } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selFeedOpt)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( feedbackToggles[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 10 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "feedbackToggles[rowNumber][4]" } } area 408 484 418 242 hideHighlight rowheight 46 table "feedbackToggles" var selFeedOpt scrollbar 'rgdscrl1' action " selectedSL = 0 selMessageOpt = 0 helpString = feedbackToggles[selFeedOpt][2] if(cellNumber == 2) then Infinity_PlaySound('GAM_09') feedbackToggles[selFeedOpt][4] = toggleFrame(feedbackToggles[selFeedOpt][4]) if feedbackToggles[selFeedOpt][4] == 0 then feedbackToggles[selFeedOpt][5] = 0 else feedbackToggles[selFeedOpt][5] = 1 end end " } label { area 416 110 410 44 text "FEEDBACK_MESSAGES_LABEL" text style "button" bam rgdslct sequence lua "RgUISkin*2" ScaleToClip text align center center } list { column { width 85 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, selMessageOpt)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString( messagesToggles[rowNumber][1])" text style "normal" text align left center } } column { width 15 label { area 10 8 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" frame lua "messagesToggles[rowNumber][4]" } } area 408 154 418 286 hideHighlight rowheight 46 table "messagesToggles" var selMessageOpt scrollbar 'rgdscrl1' action " helpString = messagesToggles[selMessageOpt][2] selectedSL = 0 selFeedOpt = 0 if(cellNumber == 2) then Infinity_PlaySound('GAM_09') messagesToggles[selMessageOpt][4] = toggleFrame(messagesToggles[selMessageOpt][4]) if messagesToggles[selMessageOpt][4] == 0 then messagesToggles[selMessageOpt][5] = 0 else messagesToggles[selMessageOpt][5] = 1 end end " } label { area 838 444 425 216 bam rgdobcg sequence lua "RgUISkin" scaleToClip } text { area 848 454 406 198 text lua "getUiString(helpString)" text style normal scrollbar 'rgdscrl1' } text { area 838 148 212 52 text "MARKER_FEEDBACK_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 1)" --text highlight lua "getSelected(selectedSL, 1)" action " helpString = 'MARKER_FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 1 " } slider { area 1066 148 200 48 position "markerFeedSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 6 pad 5 0 5 0 action " helpString = 'MARKER_FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 1 " } label { area 1066 196 200 37 text lua "getFrequency(markerFeedSLDR,true)" bam rgdslct sequence lua "RgUISkin*2" ScaleToClip text style "normal" text align center center } text { area 838 258 212 52 text "LOCATOR_FEEDBACK_LABEL" text style "normal" text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedHighlight(selectedSL, 2)" --text highlight lua "getSelected(selectedSL, 2)" action " helpString = 'LOCATOR_FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 2 " } slider { area 1066 258 200 48 position "locatorFeedSLDR" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 5 pad 5 0 5 0 action " helpString = 'LOCATOR_FEEDBACK_HELP' selFeedOpt = 0 selMessageOpt = 0 selectedSL = 2 " } label { area 1066 306 200 36 text lua "getFrequency(locatorFeedSLDR,false)" text style "normal" bam rgdslct sequence lua "RgUISkin*2" ScaleToClip text align center center } button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " selectedSL = 0 panelID = 8 Infinity_PopMenu('OPTIONS_FEEDBACK') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " selectedSL = 0 panelID = 8 Infinity_PopMenu('OPTIONS_FEEDBACK') RgOptionsMode = 0 " } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " helpString = 'GAMEPLAY_DESCRIPTION' panelID = 9 Infinity_ChangeOption( 8, markerFeedSLDR, panelID) Infinity_ChangeOption( 9, locatorFeedSLDR, panelID ) selectedOpt = 0 selectedSL = 0 for index, var in pairs(messagesToggles) do Infinity_ChangeOption( var[3], var[5], panelID) end for index, var in pairs(feedbackToggles) do Infinity_ChangeOption( var[3], var[5], panelID) end Infinity_PopMenu('OPTIONS_FEEDBACK') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } } ` function getGooglePlaySignInText() if(Infinity_GooglePlaySignedIn() == 1) then return getUiString("SIGN_OUT_BUTTON") else return getUiString("SIGN_IN_BUTTON") end end keyCategory = 1 key = 0 function displayHelp() if not (key == 0) then return rgGetGameEngineStringRef(24680,24680,2802,37843) end return 0 end function formatKeyCode(number) local ret = "" if number < 127 and number > 32 then return string.format('%c', keybindings[keyCategory][rowNumber][6]) end ret = getUiString("SDL_" .. string.format('%d', keybindings[keyCategory][rowNumber][6])) return ret end function getHotkeyName(category,number) local ret = "" if category < 5 then ret = getUiString(keybindings[category][number][4]) if ret == keybindings[category][number][4] then ret = Infinity_FetchString(keybindings[category][number][4]) end else ret = Infinity_FetchString(keybindings[category][number][4]) end return ret end ` menu { name 'OPTIONS_KEYBINDINGS' modal align center center onOpen " RgOptionsMode = 6 Infinity_PushMenu('RG_START_OPTIONS_BAR') " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('ASSIGN_KEYS_TITLE')" text style 'rg_trajan' text color '$' align center center } label -- Instruction { area 426 106 367 50 text "ASSIGN_KEYS_SUBTITLE" text style "normal" align center center } label -- Contextual instruction { area 838 106 366 50 text lua "Infinity_FetchString(displayHelp())" text style "normal" align center center } list -- Key categories { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, keyCategory)" ScaleToClip } label { area 10 0 -1 -1 text lua "getUiString(keycategories[rowNumber][2])" text style "normal" text align left center } } area 426 168 367 442 hideHighlight rowheight 46 table "keycategories" var keyCategory scrollbar 'rgdscrl1' action " Infinity_StopKeybind() key = 0 " } list -- Key bindings { column { width 90 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, key)" ScaleToClip } label { area 10 0 -1 -1 text lua "getHotkeyName(keyCategory,rowNumber)" text style "normal" align left center } } column { width 10 label { area 0 0 -1 -1 text lua "formatKeyCode(keybindings[keyCategory][rowNumber][6])" text style "normal" text upper text align right center } } hideHighlight area 848 172 400 480 rowheight 24 table "keybindings[keyCategory]" var key scrollbar 'rgdscrl1' action " if(key > 0) then Infinity_StartKeybind(key); keybindings[keyCategory][key][6] = 0 end " } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " Infinity_StopKeybind() key = 0 Infinity_PopMenu('OPTIONS_KEYBINDINGS'); --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { area 410 660 428 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text lua "rgString('REVERT_BUTTON')" text style "button" action " revertKeymap(); " } button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('OPTIONS_KEYBINDINGS') --Infinity_PushMenu('RG_START_OPTIONS_BAR') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('OPTIONS_KEYBINDINGS') RgOptionsMode = 0 " } } ` function generateMegaCredits() megacredits = '' for k,v in pairs(credits) do megacredits = megacredits .. Infinity_FetchString(v)..'\n' end end ` menu { name 'SODCREDIT' align center center onOpen " generateMegaCredits() chapterScreen:OnReplayButtonClick() " label { area 0 0 1024 768 mosaic "NPCCHAP" } text { area 100 50 828 36 text style "title" text "MAIN_GAME_LABEL" enabled "not e:IsTouchUI()" } text { area 100 86 828 34 text style "title" text "EXPANSION_LABEL" enabled "not e:IsTouchUI()" } text { area 100 50 828 78 text style "title" text "EXPANSION_LABEL" enabled "e:IsTouchUI()" } label { area 110 176 274 430 mosaic "credi_02" } text { name "text_CHAPTERSCROLL_item" area 440 148 492 482 text lua "megacredits" text style normal text align center top scrollbar 'rgdscrl1' scrollbar func 'UpdateChapterScroll' scrollbar hide lua 'text_CHAPTERSCROLL_auto == 1' action " text_CHAPTERSCROLL_auto = 0 " } button { area 526 662 230 40 bam GUIBUTMT text "DONE_BUTTON" text style "button" on escape clickable lua "chapterScreen:IsDoneButtonClickable()" action " megacredits = '' Infinity_PopMenu() " } button { area 284 662 230 40 bam GUIBUTMT text "REPLAY_BUTTON" text style "button" clickable lua "chapterScreen:IsReplayButtonClickable()" action " chapterScreen:OnReplayButtonClick() " } } menu { name 'CREDITS' align center center onOpen " generateMegaCredits() " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('CREDITS_TITLE')" text style 'rg_trajan' align center center } text { area 100 96 1166 556 text lua "megacredits" scrollbar 'rgdscrl1' scrollbar func "resetScrollbar" text style "normal" text align center top } button { area 457 662 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " Infinity_PopMenu() " } } ` language = 0 showsubtitles = 0 displayLanguages = {} function languageDetails() if displayLanguages[language] ~= nil then return Infinity_FetchString(displayLanguages[language][2]) .. '\n' .. Infinity_FetchString(displayLanguages[language][3]) else return "" end end function findCurrentLanguage() local lang = Infinity_GetINIString('Language', 'Text', '') for k,v in pairs(displayLanguages) do if v[1] == lang then language = k end end end ` menu { name 'OPTIONS_LANGUAGE' modal align center center onOpen " RgOptionsMode = 8 -- Infinity_PushMenu('RG_OPTIONS_BAR') --if e:IsTouchUI() then -- displayLanguages = tabletLanguages --else displayLanguages = languages --end showsubtitles = Infinity_GetINIValue('Program Options', 'Display Subtitles', 1) findCurrentLanguage() " text { area 0 0 768 768 bam 'rgdbcset' ScaleToClip sequence lua "RgUISkin" frame 0 } text { area 597 0 768 768 bam 'rgdbcset' ScaleToClip sequence lua "RgUISkin" frame 1 } label { area 480 32 405 52 text lua "rgString('LANGUAGE_TITLE')" text style 'rg_trajan' align center center } label { area 838 162 425 498 bam rgdobcg sequence lua "RgUISkin" scaleToClip } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, language)" ScaleToClip } label { area 10 0 -1 -1 text lua "displayLanguages[rowNumber][4]" text style "normal" text align left center } } hideHighlight area 362 170 376 504 rowheight 40 table "displayLanguages" var language scrollbar 'rgdscrl1' } text { area 848 170 406 480 text lua "languageDetails()" text style normal text align center top scrollbar 'rgdscrl1' } label { area 570 626 170 34 text "SHOW_SUBTITLES_LABEL" text style "normal" text align right center -- text upper } label { area 528 660 310 70 text lua "rgGetGameEngineString(32129,32129,102624,0)" text style "normal" text align center center -- text upper } label { area 838 104 428 54 text lua "rgGetGameEngineString(32208,71374,102626,0)" text style "normal" text align center center text color '$' } button { area 750 626 32 34 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle showsubtitles } button { enabled "RgUISkin < 3" on escape area 1292 18 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " -- cancel for index, var in pairs(displayLanguages) do Infinity_Log(var[3]) end Infinity_PopMenu(); " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " for index, var in pairs(displayLanguages) do Infinity_Log(var[3]) end Infinity_PopMenu(); " } button { on escape bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip area 100 660 428 70 pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" action " Infinity_PopMenu() " } button { area 838 660 428 70 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text lua "rgString( 'SAVE_BUTTON' ) .. ' & ' .. rgString( 'DONE_BUTTON' )" -- Done text style "button" action " -- done Infinity_SetLanguage(displayLanguages[language][1],showsubtitles) Infinity_PopMenu() " } } ` function restoreOverlayFromQuit() --restore the old overlay if applicable if(oldOverlayMenuName) then Infinity_SetOverlay(oldOverlayMenuName) else Infinity_SetOverlay(nil) end end ` menu { name 'QuitMenu' modal align center center button { on escape area 235 75 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "QUIT_GAME_BUTTON" text style "button" on return enabled "not e:IsAndroid()" action " rgSaveCoordinates() restoreOverlayFromQuit() Infinity_ShutdownGame() " } button { on escape area 235 75 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "QUIT_GAME_BUTTON" text style "button" on escape enabled "e:IsAndroid()" action " rgSaveCoordinates() restoreOverlayFromQuit() Infinity_ShutdownGame() " } button { area 235 150 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "CANCEL_BUTTON" text style "button" on escape action " restoreOverlayFromQuit() Infinity_PopMenu('QuitMenu') " } label { area 0 0 300 300 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label --Title { area 50 50 200 200 text 20186 text style "normal" text align center center } } ` selectedSlot = nil itemRequestAmt = 0 function showItemAmountRequester(slotName) local slot = characters[id].equipment[slotName] if(slot.item.count == nil) then Infinity_Log("Nil count in requester!") return end if(slot.item.count > 1) then selectedSlot = slotName popupRequester(slot.item.count, inventorySplitStack, false) end end function inventorySplitStack(cnt) Infinity_SplitItemStack(characters[id].equipment[selectedSlot].id, cnt,'slot_inv_' .. characters[id].equipment[selectedSlot].id) end function GetAbilityIdentifyString() if(characters[id].equipment[selectedSlot].item.identified == 0) then return getUiString("IDENTIFY_BUTTON") end if(characters[id].equipment[selectedSlot].abilityMode == 1) then return getUiString("ABILITIES_BUTTON") end return "" end requester = {} requester.requesterMax = 0 requester.requesterFunc = nil requester.selling = false ` menu { name 'POPUP_REQUESTER' align center center modal onOpen " if requester.selling == false then itemRequestAmt = 1 else itemRequestAmt = requester.requesterMax end " button { on escape area 235 75 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "CANCEL_BUTTON" text style "button" action " Infinity_PopMenu() " } button { on return area 235 150 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text "DONE_BUTTON" text style "button" action " local cnt = tonumber(itemRequestAmt) Infinity_PopMenu() if(cnt and cnt > 0 and cnt <= requester.requesterMax) then requester.requesterFunc(cnt) end " } label { area 0 0 300 300 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label { area 50 70 200 50 text "CHOOSE_AMT_LABEL" text style "button" text color B } edit { area 46 132 208 40 var itemRequestAmt text style "edit" align center center maxlines 1 fill 112 111 111 64 action " -- only permit numbers as letters. -- character limit of 4 if((tonumber(letter_pressed) ~= nil and #tostring(itemRequestAmt) < 4) or not letter_pressed) then return 1 else return 0 end " } slider { area 46 177 208 20 position "itemRequestAmt" bam rgdstar sliderBackground rgdslid --bam 'RGDSLDRS' --sliderBackground 'RGDSLDRB' scaleToClip sequence 0 frame 1 settings lua "requester.requesterMax + 1" --pad 5 0 5 0 action "" } button { bam rgdcpbt1 area 106 200 44 44 scaleToClip action " local amt = tonumber(itemRequestAmt) if(amt < requester.requesterMax) then itemRequestAmt = amt + 1 end " actionHold " local amt = tonumber(itemRequestAmt) if(amt < requester.requesterMax) then itemRequestAmt = amt + 1 end " } button { bam rgdcpbt2 area 150 200 44 44 scaleToClip action " local amt = tonumber(itemRequestAmt) if(amt > 1) then itemRequestAmt = amt - 1 end " actionHold " local amt = tonumber(itemRequestAmt) if(amt > 1) then itemRequestAmt = amt - 1 end " } } ` selectedAbility = -1 function initAbilities() --initialize selected ability local i = 1 while ( i < 4 ) do local ability = characters[id].equipment[selectedSlot].abilities[i] if(ability ~= nil) then if(ability.selected == 1) then selectedAbility = i return end end i = i + 1 end end rgAbil1 = {} rgAbil2 = {} rgAbil3 = {} ` menu { name 'ITEM_ABILITIES' align center center onOpen " initAbilities() rgAbil1 = characters[id].equipment[selectedSlot].abilities[1] rgAbil2 = characters[id].equipment[selectedSlot].abilities[2] rgAbil3 = characters[id].equipment[selectedSlot].abilities[3] " button { on escape area 0 0 1365 768 action " Infinity_PopMenu() " } label { enabled "RgUISkin == 0" area 388 414 272 262 bam rgdpopin ScaleToClip } label { enabled "RgUISkin > 0" area 388 414 272 262 bam rgdpopin sequence 1 ScaleToClip } button { area 396 606 255 56 bam RGDWBUT1 ScaleToClip text style "button" text color '5' text "DONE_BUTTON" action " local itemNum = characters[id].equipment[selectedSlot].abilities[selectedAbility].itemNum Infinity_SelectItemAbility(selectedAbility - 1, itemNum, characters[id].equipment[selectedSlot].id) Infinity_PopMenu() " } text { area 444 430 207 52 enabled "rgAbil1 ~= nil and selectedAbility ~= 1" text lua "rgAbil1.text" text style "normal" pad 10 0 0 0 text align left center text color '5' action "selectedAbility = 1" } text { area 444 430 207 52 enabled "rgAbil1 ~= nil and selectedAbility == 1" text lua "rgAbil1.text" text style "normal" pad 10 0 0 0 text align left center text color '$' bam rgdslct ScaleToClip action "selectedAbility = 1" } button { area 392 430 52 52 bam "STONSLOT" enabled "rgAbil1 ~= nil" icon lua "rgAbil1.icon" action "selectedAbility = 1" } text { area 444 486 207 52 enabled "rgAbil2 ~= nil and selectedAbility ~= 2" text lua "rgAbil2.text" text style "normal" pad 10 0 0 0 text align left center text color '5' action "selectedAbility = 2" } text { area 444 486 207 52 enabled "rgAbil2 ~= nil and selectedAbility == 2" text lua "rgAbil2.text" text style "normal" pad 10 0 0 0 text align left center text color '$' bam rgdslct ScaleToClip action "selectedAbility = 2" } button { area 392 486 52 52 bam "STONSLOT" enabled "rgAbil2 ~= nil" icon lua "rgAbil2.icon" action "selectedAbility = 2" } text { area 444 542 207 52 enabled "rgAbil3 ~= nil and selectedAbility ~= 3" text lua "rgAbil3.text" text style "normal" pad 10 0 0 0 text align left center text color '5' action "selectedAbility = 3" } text { area 444 542 207 52 enabled "rgAbil3 ~= nil and selectedAbility == 3" text lua "rgAbil3.text" text style "normal" pad 10 0 0 0 text align left center text color '$' bam rgdslct ScaleToClip action "selectedAbility = 3" } button { area 392 542 52 52 bam "STONSLOT" enabled "rgAbil3 ~= nil" icon lua "rgAbil3.icon" action "selectedAbility = 3" } } ` TEXT_popup_info = 0 ` menu { name 'POPUP_INFO' align center center modal button { area 235 112 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" action " Infinity_PopMenu() " } label { area 0 0 300 300 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label { area 50 50 200 200 text lua "getStringFromAmbiguousSource(TEXT_popup_info)" text style "normal" text align center center } } menu { name 'POPUP_TWOBUTTON' align center center modal button { on escape area 235 150 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "getUiString(Popup2Button.cancelText or 'CANCEL_BUTTON')" action " Infinity_PopMenu('POPUP_TWOBUTTON') if (Popup2Button.cancelFunc) then Popup2Button.cancelFunc() end " } button { area 235 75 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "getUiString(Popup2Button.okText or 'DONE_BUTTON')" action " Infinity_PopMenu('POPUP_TWOBUTTON') if (Popup2Button.okFunc) then Popup2Button.okFunc() end " } label { area 0 0 300 300 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label { area 50 50 200 200 text lua "getStringFromAmbiguousSource(Popup2Button.info)" text style "normal" text align center center } } menu { name 'POPUP_THREEBUTTON' align center center modal button { area 235 37 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "getUiString(Popup3Button.rightText)" action " Infinity_PopMenu() if (Popup3Button.rightFunc) then Popup3Button.rightFunc() end " } button { area 235 112 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "getUiString(Popup3Button.midText)" action " Infinity_PopMenu() if (Popup3Button.midFunc) then Popup3Button.midFunc() end " } button { area 235 187 400 75 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "getUiString(Popup3Button.leftText)" action " Infinity_PopMenu() if (Popup3Button.leftFunc) then Popup3Button.leftFunc() end " } label { area 0 0 300 300 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label { area 50 50 200 200 text lua "getStringFromAmbiguousSource(Popup3Button.info)" text style "normal" text align center center } } menu { name 'POPUP_FOURBUTTON' align center center modal label { area 0 0 1365 768 } button { on escape area 965 200 300 80 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString(getUiString(Popup4Button.farRightText))" action " Infinity_PopMenu() if (Popup4Button.farRightFunc) then Popup4Button.farRightFunc() end " } button { area 965 400 300 80 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString(getUiString(Popup4Button.rightText))" action " Infinity_PopMenu() if (Popup4Button.rightFunc) then Popup4Button.rightFunc() end " } button { on escape area 965 300 300 80 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString(getUiString(Popup4Button.leftText))" action " Infinity_PopMenu() if (Popup4Button.leftFunc) then Popup4Button.leftFunc() end " } button { area 965 500 300 80 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString(getUiString(Popup4Button.farLeftText))" action " Infinity_PopMenu() if (Popup4Button.farLeftFunc) then Popup4Button.farLeftFunc() end " } label { area 490 190 385 385 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label { area 550 250 265 265 text lua "getStringFromAmbiguousSource(Popup4Button.info)" text style "normal" text align center center } } ` rgSpellIdentEnabled = false rgScrolIdentEnabled = false ` menu { name 'ITEM_IDENTIFY' align center center onOpen" rgSpellIdentEnabled = Infinity_GetSpellIdentifyEnabled(characters[id].equipment[selectedSlot].id) rgScrolIdentEnabled = Infinity_GetScrollIdentifyEnabled(characters[id].equipment[selectedSlot].id) " button { on escape area 0 0 1365 768 --bam rgdwbut --sequence 0 --ScaleToClip action " Infinity_PopMenu() " } label { area 388 542 272 134 bam rgdpopin ScaleToClip } button { area 396 550 255 56 bam RGDWBUT1 ScaleToClip text style "button" text color '5' text "SPELL_BUTTON" clickable lua "rgSpellIdentEnabled" action " Infinity_OnSpellIdentify(characters[id].equipment[selectedSlot].id); Infinity_PopMenu() itemDesc.item = characters[id].equipment[selectedSlot].item --update itemDesc item " } button { area 396 606 255 56 bam RGDWBUT1 ScaleToClip text style "button" text color '5' text "SCROLL_BUTTON" clickable lua "rgScrolIdentEnabled" action " Infinity_OnScrollIdentify(characters[id].equipment[selectedSlot].id) Infinity_PopMenu() itemDesc.item = characters[id].equipment[selectedSlot].item --update itemDesc item " } } ` function showItemDescriptionInventory(slotName) if(characters[id].equipment[slotName].empty ~= 0) then return end selectedSlot = slotName Infinity_CheckItemIdentify(characters[id].equipment[slotName].id) showItemDescription(characters[id].equipment[slotName].item, 0) end itemDesc = {} function showItemDescription(item, mode) itemDesc.item = item itemDesc.mode = mode Infinity_PushMenu('ITEM_DESCRIPTION',0,0) end function itemDescLeftButtonEnabled() if(itemDesc.mode == 0) then return GetAbilityIdentifyString() ~= "" elseif(itemDesc.mode == 1) then return itemDesc.item.isBag end return 0 end function itemDescLeftButtonText() if(itemDesc.mode == 0) then return GetAbilityIdentifyString() elseif(itemDesc.mode == 1) then return getUiString('OPEN_CONTAINER_BUTTON') end return "" end function itemDescLeftButtonAction() if(itemDesc.mode == 0) then if(characters[id].equipment[selectedSlot].item.identified == 0) then Infinity_PushMenu('ITEM_IDENTIFY',0,0) else Infinity_PushMenu('ITEM_ABILITIES',0,0) end elseif(itemDesc.mode == 1) then storeScreen:OpenBag(itemDesc.item.res) Infinity_PopMenu() end end function itemDescRightButtonEnabled() if(itemDesc.mode == 0) then return characters[id].equipment[selectedSlot].useMode ~= -1 else return 0 end end function itemDescRightButtonText() return Infinity_GetUseButtonText(characters[id].equipment[selectedSlot].id, characters[id].equipment[selectedSlot].useMode) end function itemDescRightButtonAction() Infinity_PopMenu() Infinity_OnUseButtonClick(characters[id].equipment[selectedSlot].id, characters[id].equipment[selectedSlot].useMode) end function rgGetLibraryJournalEntry(text) for i=1,#rgLibrary,1 do local hasEntry = 0 for k, jouEntry in pairs(journalDisplay) do if (string.match(Infinity_FetchString(jouEntry.text), getUiString('RG_LIBRARY'))) then str = string.gsub(Infinity_FetchString(jouEntry.text), getUiString('RG_LIBRARY'), "") if str == text then hasEntry = 1 break end end end if Infinity_FetchString(rgLibrary[i][1]) == text and hasEntry == 0 then Infinity_OnAddUserEntry(getUiString('RG_LIBRARY') .. text) --C:CreateItem('book08') end end end function rgGetItemDescriptionArea() if rgGameEngine == 3 then Infinity_SetArea('rgItemDesc',32,96,566,486) else Infinity_SetArea('rgItemDesc',222,96,376,486) end end function rgPopItemDesc() Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); Infinity_PopMenu('ITEM_DESCRIPTION'); end rgItmId = 0 rgItmChar = '' rgItmLeftEnabled = false rgItmRightEnabled = false rgItmLeftText = '' rgItmRightText = '' ` menu { name 'ITEM_DESCRIPTION' align center center onOpen " rgItmChar = rgCurChar rgItmLeftEnabled = itemDescLeftButtonEnabled() rgItmRightEnabled = itemDescRightButtonEnabled() rgItmLeftText = itemDescLeftButtonText() rgItmRightText = itemDescRightButtonText() rgGetItemDescriptionArea() rgGetLibraryJournalEntry(itemDesc.item.name) --Infinity_OnAddUserEntry(itemDesc.item.name) " --modal label { enabled "RgUISkin == 0" area 0 0 622 660 bam RGDIDESC ScaleToClip } label { enabled "RgUISkin > 0" area 0 0 622 660 bam RGDIDESC sequence 1 ScaleToClip } label { area 36 30 52 52 icon lua "itemDesc.item.icon" } label { area 112 26 388 64 text lua "itemDesc.item.name" text style "rg_trajan" text align left center text color '5' } text { name "rgItemDesc" area 222 96 376 486 text lua "itemDesc.item.description" scrollbar 'rgdscrl1' text style "normal" text color '5' text point 12 } label { area 22 100 192 284 bam lua "itemDesc.item.descPicture" sequence 0 frame 0 align center center } button { bam RGDWBUT1 ScaleToClip area 316 586 255 56 enabled "rgItmLeftEnabled" text lua "rgItmLeftText" text style "button" text color '5' action " itemDescLeftButtonAction() " actionEnter " if rgInventoryMode == 0 then Infinity_PressKeyboardButton(rgItmChar) end " } button { on esc area 548 26 50 50 bam rgdwbut sequence 0 ScaleToClip --bam GUIBUTMT --sequence 6 --area 328 653 230 40 --text "DONE_BUTTON" --text style "button" action " Infinity_PopMenu( ); rgPopItemDesc() " } button { bam RGDWBUT1 ScaleToClip area 44 586 255 56 enabled "rgItmRightEnabled" text lua "rgItmRightText" text style "button" text color '5' action " itemDescRightButtonAction() " actionEnter " if rgInventoryMode == 0 then Infinity_PressKeyboardButton(rgItmChar) end " } } ` function highlightSidebarButton(engine) return (engine == e:GetActiveEngine()) end sidebarVisible = { LEFT = 1, RIGHT = 1 } function toggleSidebar(side) local show = side .. "_SIDEBAR" local hide = show .. "_HIDDEN" if(sidebarVisible[side] == 1) then local temp = show show = hide hide = temp sidebarVisible[side] = 0 else sidebarVisible[side] = 1 end Infinity_PushMenu(show) Infinity_PopMenu(hide) end function rgHotkeyButtonLeftClick(num) if rgHotkeyButtonsUnlocked == 0 then local key = RgHotkeyButtonsTable[num][1] local sel = RgHotkeyButtonsTable[num][2] if sel > 1 and sel < 8 then Infinity_OnPortraitLClick(sel-2) Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) elseif sel == 8 then Infinity_PressKeyboardButton('1') Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) Infinity_PressKeyboardButton('2') Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) Infinity_PressKeyboardButton('3') Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) Infinity_PressKeyboardButton('4') Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) Infinity_PressKeyboardButton('5') Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) Infinity_PressKeyboardButton('6') Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) Infinity_PressKeyboardButton('0') else Infinity_PressKeyboardButton(rgFormatKeyCode(rgHotkeyTable[key][6],key)) end end end function rgHotkeyButtonBackground() return 'rgdslot' .. RgUISkin end function rgIsTabletRatio() local w, h = Infinity_GetScreenSize() if w < 1360 then return true else return false end end function rgHotkeyButtonRightClick() if rgHotkeyButtonsUnlocked == 0 then Infinity_PushMenu('RG_HOTKEY_BUTTONS') end end function rgGetClockFrame() local time = timer:GetCurrentHour() % timer.TIMESCALE_HOUR_PER_DAY if time < 12 then return time + 12 else return time - 12 end end sidebarForceTooltips = 0 rgHotkeyButttonsLoaded = 0 ` menu { name 'LEFT_SIDEBAR' align left top ignoreEsc onOpen " if(sidebarVisible.LEFT == 1) then Infinity_PushMenu('LEFT_SIDEBAR_BOTTOM') else Infinity_PopMenu('LEFT_SIDEBAR') Infinity_PushMenu('LEFT_SIDEBAR_HIDDEN') end if(showJournal == 1 and rgLargeJournal == 0) then Infinity_PushMenu('JOURNAL') end sidebarForceTooltips = 0 if rgHotkeyButttonsLoaded == 0 then rgHotkeyButttonsLoaded = 1 rgGetHotkeyButtonsFromINI() end " onClose " Infinity_PopMenu('LEFT_SIDEBAR_BOTTOM') if (rgLargeJournal == 0) then Infinity_PopMenu('JOURNAL') end " label { name 'leftSidebarBackground' area 0 0 1 1 } button { name "rgHotkeyButton1" area 1303 1028 40 40 bitmap lua "rgHotkeyButtonBackground()" enabled "worldScreen == e:GetActiveEngine() and (RgHotkeyButtonsVisibility == 1 or rgHotkeyButtonsUnlocked == 1)" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[1][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[1][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" --ScaleToClip --align left top action "rgHotkeyButtonLeftClick(1)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton2" area 1409 215 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[2][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[2][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[2][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(2)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton3" area 10 142 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[3][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[3][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[3][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(3)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton4" area 10 184 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[4][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[4][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[4][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(4)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton5" area 10 226 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[5][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[5][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[5][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(5)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton6" area 10 268 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[6][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[6][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[6][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(6)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton7" area 10 310 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[7][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[7][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[7][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(7)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton8" area 10 352 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[8][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[8][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[8][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(8)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton9" area 10 394 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[9][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[9][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[9][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(9)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton10" area 10 436 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[10][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[10][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[10][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(10)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton11" area 10 478 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[11][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[11][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[11][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(11)" actionAlt "rgHotkeyButtonRightClick()" } button { name "rgHotkeyButton12" area 10 520 40 40 enabled "worldScreen == e:GetActiveEngine() and ((RgHotkeyButtonsTable[12][1] > 0 and RgHotkeyButtonsVisibility == 1) or rgHotkeyButtonsUnlocked == 1)" bitmap lua "rgHotkeyButtonBackground()" bam lua "rgGetHotkeyIcon(RgHotkeyButtonsTable[12][1])" sequence lua "rgGetHotkeyIconSequence(RgHotkeyButtonsTable[12][1])" scaleToClip tooltip lua "getUiString('RG_HOTKEY_BUTT')" action "rgHotkeyButtonLeftClick(12)" actionAlt "rgHotkeyButtonRightClick()" } handle { enabled "rgHotkeyButtonsUnlocked == 1" name "rgHotkeyButtonHandle1" area 1303 1028 40 40 actionDrag " rgDragHotkeyButton(1) " } handle { name "rgHotkeyButtonHandle2" area 1409 215 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(2)" } handle { name "rgHotkeyButtonHandle3" area 10 142 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(3)" } handle { name "rgHotkeyButtonHandle4" area 10 184 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(4)" } handle { name "rgHotkeyButtonHandle5" area 10 226 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(5)" } handle { name "rgHotkeyButtonHandle6" area 10 268 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(6)" } handle { name "rgHotkeyButtonHandle7" area 10 310 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(7)" } handle { name "rgHotkeyButtonHandle8" area 10 352 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(8)" } handle { name "rgHotkeyButtonHandle9" area 10 394 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(9)" } handle { name "rgHotkeyButtonHandle10" area 10 436 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(10)" } handle { name "rgHotkeyButtonHandle11" area 10 478 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(11)" } handle { name "rgHotkeyButtonHandle12" area 10 520 40 40 enabled "rgHotkeyButtonsUnlocked == 1" actionDrag "rgDragHotkeyButton(12)" } } menu { name 'LEFT_SIDEBAR_BOTTOM' align left bottom --offset 0 -22 --combined height of these buttons makes a menu with height = 231, menu is placed into lower left. y pos is offset from top of this menu. ignoreEsc label { area 83 58 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 127 58 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 171 58 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 215 58 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 259 58 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 303 58 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } button { name 'rgRightSidebarGoldernButton0' area 85 65 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam lua "rgGetActionbarButtonBam()" sequence 0 tooltip lua "getTooltipWithHotkey(4,rgGetGameEngineStringRef(15418,15418,15418,15418))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(mapScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(1) " } button { name 'rgRightSidebarGoldernButton1' area 129 65 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam lua "rgGetActionbarButtonBam()" sequence 1 tooltip lua "getTooltipWithHotkey(3,rgGetGameEngineStringRef(24359,24359,16308,16308))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "showJournal == 1" ScaleToClip clickable lua "sidebarsGreyed ~= 1 and game:GetJournalOpenable()" action " e:GetActiveEngine():OnLeftPanelButtonClick(2) " } button { name 'rgRightSidebarGoldernButton2' area 173 65 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam lua "rgGetActionbarButtonBam()" sequence 2 tooltip lua "getTooltipWithHotkey(0,rgGetGameEngineStringRef(24358,24358,16307,16307))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(inventoryScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(3) " } button { name 'rgRightSidebarGoldernButton3' area 217 65 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam lua "rgGetActionbarButtonBam()" sequence 3 tooltip lua "getTooltipWithHotkey(1,rgGetGameEngineStringRef(24356,24356,16306,16306))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(characterScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(4) " } button { name 'rgRightSidebarGoldernButton4' area 261 65 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam lua "rgGetActionbarButtonBam()" sequence 4 tooltip lua "getTooltipWithHotkey(5,rgGetGameEngineStringRef(24360,24360,16309,16309))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(mageScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(5) " } button { name 'rgRightSidebarGoldernButton5' area 305 65 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam lua "rgGetActionbarButtonBam()" sequence 5 tooltip lua "getTooltipWithHotkey(6,rgGetGameEngineStringRef(24357,24357,14930,14930))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(priestScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(6) " } label { name 'rgRightRoundBackgroundClock' bam 'rgdmrnd' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" sequence lua "RgUISkin" ScaleToClip area -5 1 90 117 } --begin clock label { name 'rgSidebarClock1' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 0" area 6 42 75 53 bam "RGDCLOCK" ScaleToClip frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } label { name 'rgSidebarClock2' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 0" area 26 80 32 33 bam "RGDCDIAL" ScaleToClip frame lua "timer:GetCurrentHour() % timer.TIMESCALE_HOUR_PER_DAY" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } button { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 0" area 26 80 32 33 action " C:Eval('AdvanceTime(300)') " } button { name 'rgSidebarClock3' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 0" area 6 42 75 53 tooltip lua "worldScreen:GetCurrentTimeString()" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:TogglePauseGame(true) " } --begin clock iwd label { name 'rgSidebarClock1iwd' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 1" area 3 39 76 76 bam "RGDCLCK1" ScaleToClip frame lua "timer:GetCurrentTime() % 59" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } button { name 'rgSidebarClock3iwd' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 1" area 0 36 82 82 tooltip lua "worldScreen:GetCurrentTimeString()" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:TogglePauseGame(true) " } --begin clock bg1 label { name 'rgSidebarClock1' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 2" area 12 54 56 56 bam "RGCGEAR1" ScaleToClip frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } label { name 'rgSidebarClock2' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 2" area 12 54 56 56 bam "RGCDIAL1" ScaleToClip frame lua "rgGetClockFrame()" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } button { name 'rgSidebarClock3' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 2" area 12 54 56 56 tooltip lua "worldScreen:GetCurrentTimeString()" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:TogglePauseGame(true) " } --begin clock bg2 label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 3" area 3 58 77 57 bam "rgd2cgea" frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 scaletoclip } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 3" area 3 58 77 57 bam "rgd2cdia" frame lua "timer:GetCurrentHour() % timer.TIMESCALE_HOUR_PER_DAY" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 scaletoclip } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 3" area 3 58 77 57 bam "rgd2cpen" frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 scaletoclip } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 3" area 3 58 77 57 bam "RGDCPEN2" scaletoclip useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } button { name 'rgSidebarClock3' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 3" area 3 58 77 57 tooltip lua "worldScreen:GetCurrentTimeString()" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:TogglePauseGame(true) " } } ` mouseOverPortrait = -1 draggedPortrait = nil rgOpenConsole = 0 function swapPortraits(dest) worldScreen:SwapPortraits(dest,draggedPortrait) draggedPortrait = nil end function getPartyAITooltip() if aiButtonToggle == 1 then return Infinity_FetchString(15918) else return Infinity_FetchString(15917) end end function rgGetRightSidebarPosition() local screenWidth, screenHeight = Infinity_GetScreenSize() --Infinity_SetArea('rgRightSidebarL',0,0,0,screenHeight) --Infinity_SetArea('rgRightSidebarT',0,0,screenWidth,0) if RgIsModernHud == 1 then Infinity_SetArea('rgRightSidebarGoldernButton10',0,screenHeight-170,40,40) Infinity_SetArea('rgHudPortrait1',7,screenHeight-118,78,118) Infinity_SetArea('rgHudPortrait2',89,screenHeight-118,78,118) Infinity_SetArea('rgHudPortrait3',171,screenHeight-118,78,118) Infinity_SetArea('rgHudPortrait4',253,screenHeight-118,78,118) Infinity_SetArea('rgHudPortrait5',335,screenHeight-118,78,118) Infinity_SetArea('rgHudPortrait6',417,screenHeight-118,78,118) Infinity_SetArea('rgRightRoundBackgroundClock',0,0,0,0) Infinity_SetArea('rgRightRoundBackground1',0,0,0,0) Infinity_SetArea('rgRightRoundBackground2',0,0,0,0) Infinity_SetArea('rgRightRoundBackground3',0,0,0,0) Infinity_SetArea('rgRightRoundBackground4',0,0,0,0) Infinity_SetArea('rgRightRoundBackground5',0,0,0,0) Infinity_SetArea('rgRightRoundBackground6',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground0',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground1',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground2',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground3',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground4',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground5',0,0,0,0) Infinity_SetArea('rgLeftRoundBackground6',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton0',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton1',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton2',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton3',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton4',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton5',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton6',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton7',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton8',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton9',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton11',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton12',0,0,0,0) Infinity_SetArea('rgRightSidebarGoldernButton6iwd',0,0,0,0) Infinity_SetArea('rgSidebarClock1',0,0,0,0) Infinity_SetArea('rgSidebarClock2',0,0,0,0) Infinity_SetArea('rgSidebarClock3',0,0,0,0) Infinity_SetArea('rgSidebarClock1iwd',0,0,0,0) Infinity_SetArea('rgSidebarClock3iwd',0,0,0,0) else Infinity_SetArea('rgHudPortrait1',screenWidth-75,10,65,95) Infinity_SetArea('rgHudPortrait2',screenWidth-75,110,65,95) Infinity_SetArea('rgHudPortrait3',screenWidth-75,210,65,95) Infinity_SetArea('rgHudPortrait4',screenWidth-75,310,65,95) Infinity_SetArea('rgHudPortrait5',screenWidth-75,410,65,95) Infinity_SetArea('rgHudPortrait6',screenWidth-75,510,65,95) Infinity_SetArea('rgRightRoundBackgroundClock',-5,screenHeight-117,90,117) Infinity_SetArea('rgRightRoundBackground1',65,screenHeight-70,70,70) Infinity_SetArea('rgRightRoundBackground2',120,screenHeight-65,65,65) Infinity_SetArea('rgRightRoundBackground3',170,screenHeight-60,60,60) Infinity_SetArea('rgRightRoundBackground4',217,screenHeight-55,55,55) Infinity_SetArea('rgRightRoundBackground5',259,screenHeight-50,50,50) Infinity_SetArea('rgRightRoundBackground6',298,screenHeight-46,46,46) Infinity_SetArea('rgLeftRoundBackground0',screenWidth-85,screenHeight-117,90,117) Infinity_SetArea('rgLeftRoundBackground1',screenWidth-65-70,screenHeight-70,70,70) Infinity_SetArea('rgLeftRoundBackground2',screenWidth-120-65,screenHeight-65,65,65) Infinity_SetArea('rgLeftRoundBackground3',screenWidth-170-60,screenHeight-60,60,60) Infinity_SetArea('rgLeftRoundBackground4',screenWidth-217-55,screenHeight-55,55,55) Infinity_SetArea('rgLeftRoundBackground5',screenWidth-259-50,screenHeight-50,50,50) Infinity_SetArea('rgLeftRoundBackground6',screenWidth-298-46,screenHeight-46,46,46) Infinity_SetArea('rgRightSidebarGoldernButton0',75,screenHeight-59,50,50) Infinity_SetArea('rgRightSidebarGoldernButton1',130,screenHeight-54,45,45) Infinity_SetArea('rgRightSidebarGoldernButton2',180,screenHeight-49,40,40) Infinity_SetArea('rgRightSidebarGoldernButton3',227,screenHeight-44,35,35) Infinity_SetArea('rgRightSidebarGoldernButton4',269,screenHeight-39,30,30) Infinity_SetArea('rgRightSidebarGoldernButton5',308,screenHeight-35,28,26) Infinity_SetArea('rgRightSidebarGoldernButton6',screenWidth-75,screenHeight-72,61,57) Infinity_SetArea('rgRightSidebarGoldernButton12', screenWidth-75-50,screenHeight-61,50,52) Infinity_SetArea('rgRightSidebarGoldernButton11', screenWidth-130-45,screenHeight-54,45,43) Infinity_SetArea('rgRightSidebarGoldernButton10', screenWidth-180-40,screenHeight-49,40,38) Infinity_SetArea('rgRightSidebarGoldernButton9',screenWidth-227-35,screenHeight-44,35,35) Infinity_SetArea('rgRightSidebarGoldernButton8',screenWidth-269-30,screenHeight-39,30,30) Infinity_SetArea('rgRightSidebarGoldernButton7',screenWidth-307-30,screenHeight-39,30,30) Infinity_SetArea('rgRightSidebarGoldernButton6iwd',screenWidth-75,screenHeight-72,61,57) Infinity_SetArea('rgSidebarClock1',6,screenHeight-76,75,53) Infinity_SetArea('rgSidebarClock2',26,screenHeight-38,32,33) Infinity_SetArea('rgSidebarClock3',6,screenHeight-76,75,53) Infinity_SetArea('rgSidebarClock1iwd',6,screenHeight-82,82,82) Infinity_SetArea('rgSidebarClock3iwd',6,screenHeight-82,82,82) end end ` menu { name 'RIGHT_SIDEBAR' align right top ignoreEsc onOpen " if RgUISkin == 0 then Infinity_SetArea('rgRightSidebarAdvSetting1',273,75,nil,nil) Infinity_SetArea('rgRightSidebarAdvSetting2',307,83,nil,nil) elseif RgUISkin == 1 then Infinity_SetArea('rgRightSidebarAdvSetting1',276,70,nil,nil) Infinity_SetArea('rgRightSidebarAdvSetting2',308,77,nil,nil) elseif RgUISkin == 2 then Infinity_SetArea('rgRightSidebarAdvSetting1',278,78,nil,nil) Infinity_SetArea('rgRightSidebarAdvSetting2',310,85,nil,nil) elseif RgUISkin == 3 then Infinity_SetArea('rgRightSidebarAdvSetting1',275,83,nil,nil) Infinity_SetArea('rgRightSidebarAdvSetting2',307,90,nil,nil) end if RgLargePortraits == 0 then Infinity_SetArea('rgRightSidebar',nil,nil,80,nil) Infinity_SetArea('rgHudPortrait1Big',nil,nil,0,nil) Infinity_SetArea('rgHudPortrait2Big',nil,nil,0,nil) Infinity_SetArea('rgHudPortrait3Big',nil,nil,0,nil) Infinity_SetArea('rgHudPortrait4Big',nil,nil,0,nil) Infinity_SetArea('rgHudPortrait5Big',nil,nil,0,nil) Infinity_SetArea('rgHudPortrait6Big',nil,nil,0,nil) else Infinity_SetArea('rgRightSidebar',nil,nil,97,nil) Infinity_SetArea('rgHudPortrait1Big',nil,nil,82,nil) Infinity_SetArea('rgHudPortrait2Big',nil,nil,82,nil) Infinity_SetArea('rgHudPortrait3Big',nil,nil,82,nil) Infinity_SetArea('rgHudPortrait4Big',nil,nil,82,nil) Infinity_SetArea('rgHudPortrait5Big',nil,nil,82,nil) Infinity_SetArea('rgHudPortrait6Big',nil,nil,82,nil) end if RgIsModernHud == 1 then local w, h = Infinity_GetScreenSize() local sw = 0 - w + 78 local sh = h - 118 Infinity_SetArea('rgModHudPortrait1',sw+1,sh,78,118) Infinity_SetArea('rgModHudPortrait2',sw+83,sh,78,118) Infinity_SetArea('rgModHudPortrait3',sw+165,sh,78,118) Infinity_SetArea('rgModHudPortrait4',sw+247,sh,78,118) Infinity_SetArea('rgModHudPortrait5',sw+329,sh,78,118) Infinity_SetArea('rgModHudPortrait6',sw+411,sh,78,118) else Infinity_SetArea('rgModHudPortrait1',0,0,0,118) Infinity_SetArea('rgModHudPortrait2',0,0,0,118) Infinity_SetArea('rgModHudPortrait3',0,0,0,118) Infinity_SetArea('rgModHudPortrait4',0,0,0,118) Infinity_SetArea('rgModHudPortrait5',0,0,0,118) Infinity_SetArea('rgModHudPortrait6',0,0,0,118) end if(sidebarVisible.RIGHT == 1) then Infinity_PushMenu('RIGHT_SIDEBAR_BOTTOM') else Infinity_PopMenu('RIGHT_SIDEBAR') Infinity_PushMenu('RIGHT_SIDEBAR_HIDDEN') end if(worldScreen == e:GetActiveEngine() and game:GetPartyAI()) then aiButtonToggle = 1 end if(worldScreen == e:GetActiveEngine()) then Infinity_PushMenu('WORLD_LEVEL_UP_BUTTONS') end " onClose " Infinity_PopMenu('RIGHT_SIDEBAR_BOTTOM') Infinity_PopMenu('WORLD_LEVEL_UP_BUTTONS') " label { name 'rgRightSidebar' area 0 0 80 1 } label { name 'rightSidebarBackground' area 0 0 1 1 } button { name 'rgHudPortrait1' area 0 10 65 95 portrait 0 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 0 and RgIsModernHud == 0 and RgLargePortraits == 0" glow lua "draggedPortrait and draggedPortrait ~= 0" action "Infinity_OnPortraitLClick(0)" actionAlt "Infinity_OnPortraitRClick(0)" actionDbl "Infinity_OnPortraitDblClick(0)" actiondrag "Infinity_SwapWithPortrait(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 0" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(0)" tooltip lua "Infinity_GetPortraitTooltip(0)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgHudPortrait2' area 0 110 65 95 portrait 1 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 1 and RgIsModernHud == 0 and RgLargePortraits == 0" glow lua "draggedPortrait and draggedPortrait ~= 1" action "Infinity_OnPortraitLClick(1)" actionAlt "Infinity_OnPortraitRClick(1)" actionDbl "Infinity_OnPortraitDblClick(1)" actiondrag "Infinity_SwapWithPortrait(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 1" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(1)" tooltip lua "Infinity_GetPortraitTooltip(1)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgHudPortrait3' area 0 210 65 95 portrait 2 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 2 and RgIsModernHud == 0 and RgLargePortraits == 0" glow lua "draggedPortrait and draggedPortrait ~= 2" action "Infinity_OnPortraitLClick(2)" actionAlt "Infinity_OnPortraitRClick(2)" actionDbl "Infinity_OnPortraitDblClick(2)" actiondrag "Infinity_SwapWithPortrait(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 2" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(2)" tooltip lua "Infinity_GetPortraitTooltip(2)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgHudPortrait4' area 0 310 65 95 portrait 3 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 3 and RgIsModernHud == 0 and RgLargePortraits == 0" glow lua "draggedPortrait and draggedPortrait ~= 3" action "Infinity_OnPortraitLClick(3)" actionAlt "Infinity_OnPortraitRClick(3)" actionDbl "Infinity_OnPortraitDblClick(3)" actiondrag "Infinity_SwapWithPortrait(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 3" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(3)" tooltip lua "Infinity_GetPortraitTooltip(3)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgHudPortrait5' area 0 410 65 95 portrait 4 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 4 and RgIsModernHud == 0 and RgLargePortraits == 0" glow lua "draggedPortrait and draggedPortrait ~= 4" action "Infinity_OnPortraitLClick(4)" actionAlt "Infinity_OnPortraitRClick(4)" actionDbl "Infinity_OnPortraitDblClick(4)" actiondrag "Infinity_SwapWithPortrait(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 4" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(4)" tooltip lua "Infinity_GetPortraitTooltip(4)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgHudPortrait6' area 0 510 65 95 portrait 5 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 5 and RgIsModernHud == 0 and RgLargePortraits == 0" glow lua "draggedPortrait and draggedPortrait ~= 5" action "Infinity_OnPortraitLClick(5)" actionAlt "Infinity_OnPortraitRClick(5)" actionDbl "Infinity_OnPortraitDblClick(5)" actiondrag "Infinity_SwapWithPortrait(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 5" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(5)" tooltip lua "Infinity_GetPortraitTooltip(5)" clickable lua "sidebarsGreyed ~= 1" } button { name "rgHudPortrait1Big" area 0 10 0 123 portrait 0 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 0 and RgIsModernHud == 0 and RgLargePortraits == 1" glow lua "draggedPortrait and draggedPortrait ~= 0" action "Infinity_OnPortraitLClick(0)" actionAlt "Infinity_OnPortraitRClick(0)" actionDbl "Infinity_OnPortraitDblClick(0)" actiondrag "Infinity_SwapWithPortrait(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 0" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(0)" tooltip lua "Infinity_GetPortraitTooltip(0)" clickable lua "sidebarsGreyed ~= 1" } button { name "rgHudPortrait2Big" area 0 140 0 123 portrait 1 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 1 and RgIsModernHud == 0 and RgLargePortraits == 1" glow lua "draggedPortrait and draggedPortrait ~= 1" action "Infinity_OnPortraitLClick(1)" actionAlt "Infinity_OnPortraitRClick(1)" actionDbl "Infinity_OnPortraitDblClick(1)" actiondrag "Infinity_SwapWithPortrait(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 1" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(1)" tooltip lua "Infinity_GetPortraitTooltip(1)" clickable lua "sidebarsGreyed ~= 1" } button { name "rgHudPortrait3Big" area 0 270 0 123 portrait 2 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 2 and RgIsModernHud == 0 and RgLargePortraits == 1" glow lua "draggedPortrait and draggedPortrait ~= 2" action "Infinity_OnPortraitLClick(2)" actionAlt "Infinity_OnPortraitRClick(2)" actionDbl "Infinity_OnPortraitDblClick(2)" actiondrag "Infinity_SwapWithPortrait(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 2" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(2)" tooltip lua "Infinity_GetPortraitTooltip(2)" clickable lua "sidebarsGreyed ~= 1" } button { name "rgHudPortrait4Big" area 0 400 0 123 portrait 3 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 3 and RgIsModernHud == 0 and RgLargePortraits == 1" glow lua "draggedPortrait and draggedPortrait ~= 3" action "Infinity_OnPortraitLClick(3)" actionAlt "Infinity_OnPortraitRClick(3)" actionDbl "Infinity_OnPortraitDblClick(3)" actiondrag "Infinity_SwapWithPortrait(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 3" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(3)" tooltip lua "Infinity_GetPortraitTooltip(3)" clickable lua "sidebarsGreyed ~= 1" } button { name "rgHudPortrait5Big" area 0 530 0 123 portrait 4 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 4 and RgIsModernHud == 0 and RgLargePortraits == 1" glow lua "draggedPortrait and draggedPortrait ~= 4" action "Infinity_OnPortraitLClick(4)" actionAlt "Infinity_OnPortraitRClick(4)" actionDbl "Infinity_OnPortraitDblClick(4)" actiondrag "Infinity_SwapWithPortrait(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 4" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(4)" tooltip lua "Infinity_GetPortraitTooltip(4)" clickable lua "sidebarsGreyed ~= 1" } button { name "rgHudPortrait6Big" area 0 660 0 123 portrait 5 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 5 and RgIsModernHud == 0 and RgLargePortraits == 1" glow lua "draggedPortrait and draggedPortrait ~= 5" action "Infinity_OnPortraitLClick(5)" actionAlt "Infinity_OnPortraitRClick(5)" actionDbl "Infinity_OnPortraitDblClick(5)" actiondrag "Infinity_SwapWithPortrait(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 5" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(5)" tooltip lua "Infinity_GetPortraitTooltip(5)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgModHudPortrait1' area 1 0 0 118 portrait 0 bam rgdport2 ScaleToClip sequence lua "RgUISkin" enabled "Infinity_GetNumCharacters() > 0 and RgIsModernHud == 1" glow lua "draggedPortrait and draggedPortrait ~= 0" action "Infinity_OnPortraitLClick(0)" actionAlt "Infinity_OnPortraitRClick(0)" actionDbl "Infinity_OnPortraitDblClick(0)" actiondrag "Infinity_SwapWithPortrait(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 0" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(0)" tooltip lua "Infinity_GetPortraitTooltip(0)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgModHudPortrait2' area 1 0 0 118 portrait 1 bam rgdport2 ScaleToClip sequence lua "RgUISkin" enabled "Infinity_GetNumCharacters() > 1 and RgIsModernHud == 1" glow lua "draggedPortrait and draggedPortrait ~= 1" action "Infinity_OnPortraitLClick(1)" actionAlt "Infinity_OnPortraitRClick(1)" actionDbl "Infinity_OnPortraitDblClick(1)" actiondrag "Infinity_SwapWithPortrait(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 1" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(1)" tooltip lua "Infinity_GetPortraitTooltip(1)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgModHudPortrait3' area 1 0 0 118 portrait 2 bam rgdport2 ScaleToClip sequence lua "RgUISkin" enabled "Infinity_GetNumCharacters() > 2 and RgIsModernHud == 1" glow lua "draggedPortrait and draggedPortrait ~= 2" action "Infinity_OnPortraitLClick(2)" actionAlt "Infinity_OnPortraitRClick(2)" actionDbl "Infinity_OnPortraitDblClick(2)" actiondrag "Infinity_SwapWithPortrait(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 2" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(2)" tooltip lua "Infinity_GetPortraitTooltip(2)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgModHudPortrait4' area 1 0 0 118 portrait 3 bam rgdport2 ScaleToClip sequence lua "RgUISkin" enabled "Infinity_GetNumCharacters() > 3 and RgIsModernHud == 1" glow lua "draggedPortrait and draggedPortrait ~= 3" action "Infinity_OnPortraitLClick(3)" actionAlt "Infinity_OnPortraitRClick(3)" actionDbl "Infinity_OnPortraitDblClick(3)" actiondrag "Infinity_SwapWithPortrait(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 3" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(3)" tooltip lua "Infinity_GetPortraitTooltip(3)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgModHudPortrait5' area 1 0 0 118 portrait 4 bam rgdport2 ScaleToClip sequence lua "RgUISkin" enabled "Infinity_GetNumCharacters() > 4 and RgIsModernHud == 1" glow lua "draggedPortrait and draggedPortrait ~= 4" action "Infinity_OnPortraitLClick(4)" actionAlt "Infinity_OnPortraitRClick(4)" actionDbl "Infinity_OnPortraitDblClick(4)" actiondrag "Infinity_SwapWithPortrait(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 4" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(4)" tooltip lua "Infinity_GetPortraitTooltip(4)" clickable lua "sidebarsGreyed ~= 1" } button { name 'rgModHudPortrait6' area 1 0 0 118 portrait 5 bam rgdport2 ScaleToClip sequence lua "RgUISkin" enabled "Infinity_GetNumCharacters() > 5 and RgIsModernHud == 1" glow lua "draggedPortrait and draggedPortrait ~= 5" action "Infinity_OnPortraitLClick(5)" actionAlt "Infinity_OnPortraitRClick(5)" actionDbl "Infinity_OnPortraitDblClick(5)" actiondrag "Infinity_SwapWithPortrait(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" actionSimpleDrag "draggedPortrait = 5" actionSimpleDrop "rgGetHotkeyPortraitSlotsDrag(); swapPortraits(5)" tooltip lua "Infinity_GetPortraitTooltip(5)" clickable lua "sidebarsGreyed ~= 1" } } menu { name 'RIGHT_SIDEBAR_BOTTOM' align right bottom offset 5 0 ignoreEsc label { area -2 57 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 42 57 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 86 57 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 130 57 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 174 57 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 218 57 44 54 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } button { name 'rgRightSidebarGoldernButton7' area 0 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam lua "rgGetActionbarButtonBam()" sequence 8 ScaleToClip tooltip lua "getTooltipWithHotkey(28,rgGetGameEngineStringRef(31813,31813,74261,34763))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:OnQuickSaveButtonClick(false) " actionAlt " worldScreen:OnQuickSaveButtonClick(true) " } button { area 54 66 33 36 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == true" tooltip lua "getPartyAITooltip()" toggle aiButtonToggle bam lua "rgGetActionbarButtonBam()" sequence 11 ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " game:ToggleAI() " actionAlt " if rgOpenConsole == 0 then Infinity_PushMenu('cheatConsole') rgOpenConsole = 1 else Infinity_PopMenu('cheatConsole') rgOpenConsole = 0 end " } button { name 'rgRightSidebarGoldernButton8' area 44 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" bam lua "rgGetActionbarButtonBam()" sequence 9 ScaleToClip tooltip lua "getTooltipWithHotkey(31,rgGetGameEngineStringRef(11942,11942,11942,11942))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnRestButtonClick() " } button { name 'rgRightSidebarGoldernButton9' area 88 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" toggle highlightButtonToggle tooltip lua "rgGetGameEngineString(32729,32729,103144,40879)" bam lua "rgGetActionbarButtonBam()" sequence 10 ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " worldScreen:SetHighlightEnabled(highlightButtonToggle == 1) " } button { name 'rgRightSidebarGoldernButton10' area 132 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam lua "rgGetActionbarButtonBam()" sequence 13 scaleToClip toggle groundItemsButtonToggle tooltip lua "rgGetGameEngineString(32217,32217,99897,34787)" action " if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() if RgMessageboxUnlocked == 1 then Infinity_SetArea('messagesRect',nil,nil,nil,-65) end --Infinity_PushMenu('WORLD_QUICKLOOT'); else worldScreen:StopGroundItems() if RgMessageboxUnlocked == 1 then Infinity_SetArea('messagesRect',nil,nil,nil,-5) end --Infinity_PopMenu('WORLD_QUICKLOOT'); end " } button { name 'rgRightSidebarGoldernButton11' area 176 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == false" tooltip lua "getPartyAITooltip()" toggle aiButtonToggle bam lua "rgGetActionbarButtonBam()" sequence 11 ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " game:ToggleAI() " } button { name 'rgRightSidebarGoldernButton7' area 176 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and rgIsTabletRatio() == true" bam lua "rgGetActionbarButtonBam()" sequence 8 ScaleToClip tooltip lua "getTooltipWithHotkey(28,rgGetGameEngineStringRef(31813,31813,74261,34763))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:OnQuickSaveButtonClick(false) " actionAlt " worldScreen:OnQuickSaveButtonClick(true) " } button { name 'rgRightSidebarGoldernButton12' area 220 64 40 40 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" bam lua "rgGetActionbarButtonBam()" sequence 12 ScaleToClip tooltip lua "rgGetGameEngineString(10485,10485,10485,10485)" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " game:SelectAll() " actionDbl " game:CenterOnGroupLeader() " } label { name 'rgLeftRoundBackground0' bam 'rgdmrnd' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0" sequence lua "RgUISkin" frame 1 ScaleToClip area 260 0 90 117 } button { name 'rgRightSidebarGoldernButton6' area 270 47 61 57 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 0" bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip tooltip lua "getTooltipWithHotkey(7,rgGetGameEngineStringRef(24362,24362,16311,16311))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(optionsScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(7) " } button { name 'rgRightSidebarGoldernButton6iwd' area 274 47 57 50 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 1" bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip tooltip lua "getTooltipWithHotkey(7,rgGetGameEngineStringRef(24362,24362,16311,16311))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(optionsScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(7) " } button { name 'rgRightSidebarGoldernButton6bg1' area 276 55 57 50 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 2" bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip tooltip lua "getTooltipWithHotkey(7,rgGetGameEngineStringRef(24362,24362,16311,16311))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(optionsScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(7) " } button { name 'rgRightSidebarGoldernButton6bg2' area 273 60 57 50 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgUISkin == 3" bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip tooltip lua "getTooltipWithHotkey(7,rgGetGameEngineStringRef(24362,24362,16311,16311))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(optionsScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(7) " } button { name 'rgRightSidebarAdvSetting1' area 273 75 28 28 --iwd 276 70, b1 278 78, b2 275 83 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and RgRadarKey ~= ''" bam lua "rgGetAdvSettingsButtonBam()" sequence 0 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_SETT')" action " Infinity_PushMenu('RG_RADAR_SETTINGS') " } button { name 'rgRightSidebarAdvSetting2' area 307 83 20 20 --iwd 308 77, b1 310 85, b2 307 90 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 0 and B3Spell_AlwaysOpen == 1" bam lua "rgGetAdvSettingsButtonBam()" sequence 1 ScaleToClip tooltip lua "B3Spell_Tooltip_Bubbs_Spell_Menu_Options" action "B3Spell_Menu_TEMPLATE_OptionsButton_Action()" } --Buttons form a menu aligned bottom right, with height = 197, y is offset from top of that menu. --button --{ -- area 6 0 71 48 -- enabled "e:IsTouchUI() and worldScreen == e:GetActiveEngine()" -- toggle selectionButtonToggle -- bam GUILS10 -- sequence 14 -- clickable lua "sidebarsGreyed ~= 1" -- action -- " -- worldScreen:OnSelectionButtonClick() -- " --} } ` TEXT_inventoryError = "" function resetStatsDisplay() tempStats = {} end function getTempDamage() local str = "" local dmgMinTemp = getTempStat(characters[rgInvId].damage.min,'dmgMin',1) local dmgMaxTemp = getTempStat(characters[rgInvId].damage.max,'dmgMax',1) if(dmgMinTemp == "-" and dmgMaxTemp == "-") then return "-" end if(dmgMinTemp == "-") then str = characters[rgInvId].damage.min else str = dmgMinTemp end str = str .. " - " if(dmgMaxTemp == "-") then str = str .. characters[rgInvId].damage.max else str = str .. dmgMaxTemp end return str end function getStat(old, newName, coeff) return old end function getTempStat(old, newName, coeff) if(tempStats[rgInvId] == nil) then return "-" end local new = tempStats[rgInvId][newName] local score = coeff * (new - old) if(score == 0) then return "-" end if(score < 0) then return "^R" .. new .. "^-" end if(score > 0) then return "^G" .. new .. "^-" end end function getStatsTitle() if(tempStats[id] ~= nil) then return tempStats[id].tempItem else return "" end end function slotDoubleClick(slotName, force) local slot = characters[id].equipment[slotName] if(string.sub(slotName,1,6) == "ground" and force == nil) then --this hack is needed because the unlike other slots, ground item add/remove is a message (doesnt get executed immediately) --since the double click removes the item before re-adding it, we need to wait for that re-add to complete before continuing. doubleClickEventScheduled = slotName return end if(slot ~= nil) then if(slot.item.isBag ~= 0) then Infinity_OpenInventoryContainer(slot.item.res) else showItemAmountRequester(slotName) end end end function checkDoubleClickScheduled(slotName) if(doubleClickEventScheduled == slotName) then slotDoubleClick(doubleClickEventScheduled, true) doubleClickEventScheduled = nil end end function checkDoubleClickScheduled(slotName) if(doubleClickEventScheduled == slotName) then slotDoubleClick(doubleClickEventScheduled, true) doubleClickEventScheduled = nil end end function getTempHP() local maxHP = getTempStat(characters[rgInvId].HP.max,'maxHP',1) local currentHP = getTempStat(characters[rgInvId].HP.current, 'currentHP',1) if(maxHP == "-" and currentHP == "-") then --nothing changed. return "-" end if(maxHP == "-") then --only current HP changed. maxHP = characters[rgInvId].HP.max end if(currentHP == "-") then --only max HP changed. currentHP = characters[rgInvId].HP.current end return currentHP .. '/' .. maxHP end function shouldGreyOutInventory() if rgInventoryMode == 0 then return characters[rgInvId].HP.current <= 0 or rgIsCharacterOrderable(rgInvId) == false else return characters[rgInvId].HP.current <= 0 or inventoryScreen:IsSpriteOrderable() == false end end function shouldGreyOutInventory2() return characters[rgInvId].HP.current <= 0 or inventoryScreen:IsSpriteOrderable() == false end function rgIsDeadOrDisabled() if characters[rgInvId].HP.current <= 0 then return 0 else return 1 end end function rgShouldGreyOutInventory(charid) return characters[charid].HP.current <= 0 or rgIsCharacterOrderable(charid) == false end function rgIsCharacterOrderable(charid) for k, v in pairs(characters[charid].statusEffects) do if rgGetGameEngineString(10381, 10381, 10381 ,10381 ) == Infinity_FetchString(v.strRef) --Berserk or rgGetGameEngineString(14672, 14672, 1476 ,14672 ) == Infinity_FetchString(v.strRef) --Charmed or rgGetGameEngineString(14782, 14782, 14782 ,14782 ) == Infinity_FetchString(v.strRef) --Confused or rgGetGameEngineString(26206, 26206, 8364 ,11598 ) == Infinity_FetchString(v.strRef) --Dominated or rgGetGameEngineString(14102, 14102, 340 ,14102 ) == Infinity_FetchString(v.strRef) --Held or rgGetGameEngineString(14007, 14007, 14007 ,14007 ) == Infinity_FetchString(v.strRef) --Panic or rgGetGameEngineString(26050, 26050, 1280 ,1280 ) == Infinity_FetchString(v.strRef) --Stunned or rgGetGameEngineString(20438, 20438, 20438 ,20438 ) == Infinity_FetchString(v.strRef) --Unconscious or rgGetGameEngineString(25129, 25129, 54331 ,37705 ) == Infinity_FetchString(v.strRef) --Webbed or rgGetGameEngineString(22610, 22610, 22610 ,22610 ) == Infinity_FetchString(v.strRef) --Chaos or rgGetGameEngineString(25068, 25068, 18141 ,18141 ) == Infinity_FetchString(v.strRef) --Maze or rgGetGameEngineString(12047, 12047, 12047, 12047 ) == Infinity_FetchString(v.strRef) --Sleep then return false end end return true end function getInventoryTHAC0() local str = characters[rgInvId].THAC0.current if(characters[rgInvId].THAC0.offhand) then str = str .. "\n" .. characters[rgInvId].THAC0.offhand end return str end function getInventoryDamage() local str = characters[rgInvId].damage.min .. ' - ' .. characters[rgInvId].damage.max if(characters[rgInvId].damage.minOffhand and characters[rgInvId].damage.maxOffhand) then str = str .. "\n" .. characters[rgInvId].damage.minOffhand .. ' - ' .. characters[rgInvId].damage.maxOffhand end return str end function getInventoryDamageDetails() if characters[id].damage.detailsOffhand == nil or characters[id].damage.detailsOffhand == "" then return characters[id].damage.details else return characters[id].damage.details.."\n\n"..characters[id].damage.detailsOffhand end end function getInventoryTHAC0Details() if characters[id].THAC0.detailsOffhand == nil or characters[id].THAC0.detailsOffhand == "" then return characters[id].THAC0.details else return characters[id].THAC0.details.."\n\n"..characters[id].THAC0.detailsOffhand end end function scrollGroundItems() forceGroundItemsScrollbar = true if scrollDirection > 0 then Infinity_OnGroundPage(-1) elseif scrollDirection < 0 then Infinity_OnGroundPage(1) end currentFakePage = Infinity_GetCurrentGroundPage() end fakeItemList = {} currentFakePage = 1 currentMaxFakePages = 1 forceGroundItemsScrollbar = false function scrollGroundItemsFunction(top, height, contentHeight) if forceGroundItemsScrollbar then forceGroundItemsScrollbar = false return (currentFakePage / currentMaxFakePages) * (height - contentHeight) elseif top ~= 0 and height ~= contentHeight and currentMaxFakePages ~= 0 then local currentPage = currentFakePage currentFakePage = math.floor((top / (height - contentHeight) * currentMaxFakePages)) if currentPage > currentFakePage then Infinity_OnGroundPage(-1) elseif currentPage < currentFakePage then Infinity_OnGroundPage(1) end return nil end end function isGroundScrollbarEnabled() local maxPages = Infinity_GetMaxGroundPage() if currentMaxFakePages ~= maxPages then currentMaxFakePages = maxPages fakeItemList = {} for i = 1, currentMaxFakePages+1 do fakeItemList[i] = 1 end end return currentMaxFakePages > 0 end charTable = {} rgCharInvNames = '' function rgUpdateSlots() charTable = {} rgCharInvNames = '' local curCharId = id rgInvId = id Infinity_OnPortraitLClick(0) local CharId1 = id Infinity_UpdateLuaStats() table.insert(charTable, CharId1) rgCharInvNames = rgCharInvNames .. ' ' .. characters[id].name Infinity_OnPortraitLClick(1) local CharId2 = id Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 1 then table.insert(charTable, CharId2) rgCharInvNames = rgCharInvNames .. ' ' .. characters[id].name end Infinity_OnPortraitLClick(2) local CharId3 = id Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 2 then table.insert(charTable, CharId3) rgCharInvNames = rgCharInvNames .. ' ' .. characters[id].name end Infinity_OnPortraitLClick(3) local CharId4 = id Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 3 then table.insert(charTable, CharId4) rgCharInvNames = rgCharInvNames .. ' ' .. characters[id].name end Infinity_OnPortraitLClick(4) local CharId5 = id Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 4 then table.insert(charTable, CharId5) rgCharInvNames = rgCharInvNames .. ' ' .. characters[id].name end Infinity_OnPortraitLClick(5) local CharId6 = id Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 5 then table.insert(charTable, CharId6) rgCharInvNames = rgCharInvNames .. ' ' .. characters[id].name end if curCharId == CharId1 then Infinity_OnPortraitLClick(0) rgActiveArea = 1; rgInvChar = '1' elseif curCharId == CharId2 then Infinity_OnPortraitLClick(1) rgActiveArea = 2; rgInvChar = '2' elseif curCharId == CharId3 then Infinity_OnPortraitLClick(2) rgActiveArea = 3; rgInvChar = '3' elseif curCharId == CharId4 then Infinity_OnPortraitLClick(3) rgActiveArea = 4; rgInvChar = '4' elseif curCharId == CharId5 then Infinity_OnPortraitLClick(4) rgActiveArea = 5; rgInvChar = '5' elseif curCharId == CharId6 then Infinity_OnPortraitLClick(5) rgActiveArea = 6; rgInvChar = '6' end --return charTable end function rgUpdateSlotsOnExit(recId) local curCharId = id Infinity_OnPortraitLClick(recId) Infinity_UpdateLuaStats() if curCharId == charTable[1] then Infinity_OnPortraitLClick(0) elseif curCharId == charTable[2] then Infinity_OnPortraitLClick(1) elseif curCharId == charTable[3] then Infinity_OnPortraitLClick(2) elseif curCharId == charTable[4] then Infinity_OnPortraitLClick(3) elseif curCharId == charTable[5] then Infinity_OnPortraitLClick(4) elseif curCharId == charTable[6] then Infinity_OnPortraitLClick(5) end end local body = '^B' if RgUISkin == 1 or RgUISkin == 2 then body = '^5' end function rgGetForeground() local body = '^B' if RgUISkin == 1 or RgUISkin == 2 then body = '^5' end return body end function rgGetTempAC() return getTempStat(characters[rgInvId].AC.current,'AC',-1) end function rgGetTempHP() return getTempHP() end function rgGetTempDamage() return getTempStat(characters[rgInvId].THAC0.current,'THAC0',-1) end function rgGetTempTHAC0() return getTempDamage() end function rgGetCombatStatsString(charId) local out = '' local head = '^D' local body = '^B' if RgUISkin == 1 or RgUISkin == 2 then head = '^M' body = '^5' end if TEXT_inventoryError == rgGetGameEngineString(24355,24355,16321,16321) or TEXT_inventoryError == nil or TEXT_inventoryError == '' then out = head .. t('ARMOR_CLASS_LABEL') .. ': ' .. characters[charId].AC.current .. body .. '\n' .. characters[charId].AC.details .. '\n\n' .. head .. t('HIT_POINTS_LABEL') .. ': ' .. characters[charId].HP.current .. '/' .. characters[charId].HP.max .. body .. '\n' .. characters[charId].HP.details .. '\n\n' .. head .. rgGetTHAC0(charId, body) .. '\n' .. characters[charId].THAC0.details .. '\n\n' .. head .. rgGetDamage(charId, body) .. '\n' .. characters[charId].damage.details .. '\n\n' .. head .. t('SAVING_THROWS_LABEL') .. ':' .. body .. '\n' .. characters[charId].proficiencies.savingThrows .. body .. '\n\n' .. head .. t('RESISTANCES_LABEL') .. ':' .. body .. '\n' .. characters[charId].proficiencies.resistances .. '\n\n' .. head .. t('PROFICIENCIES_LABEL') .. ':' .. body .. '\n' .. characters[charId].proficiencies.weapons.current .. '\n' .. characters[charId].proficiencies.fightingstyles.current else out = body .. TEXT_inventoryError end return out end function rgGetMaxEncumberance() local outList = { } for k, v in ipairs(characters[rgInvId].proficiencies.ability) do table.insert(outList, {v.current}) end local out = string.match(outList[4][1], ":(.*)") --.. ' lbs' return out - 0 end function rgGetEncumberanceFrame() local enc = rgGetMaxEncumberance() if enc == 1 then return 1 elseif enc == 3 then return 2 elseif enc == 5 then return 3 elseif enc == 15 then return 4 elseif enc == 30 then return 5 elseif enc == 50 then return 6 elseif enc == 70 then return 7 elseif enc == 90 then return 8 elseif enc == 120 then return 9 elseif enc == 150 then return 10 elseif enc == 170 then return 11 elseif enc == 200 then return 12 elseif enc == 220 then return 13 elseif enc == 250 then return 14 elseif enc == 280 then return 15 elseif enc == 320 then return 16 elseif enc == 400 then return 17 elseif enc == 500 then return 18 elseif enc == 600 then return 19 elseif enc == 700 then return 20 elseif enc == 800 then return 21 elseif enc == 1000 then return 22 elseif enc == 1200 then return 23 elseif enc == 1600 then return 24 else return 0 end end function rgSetInvArea() rgSetZoomArea('rgdbcinv1',0,0,768,768) rgSetZoomArea('rgdbcinv2',597,0,768,768) rgSetZoomArea('rginvcombatstatdesc',98,203,270,493) rgSetZoomArea('rginvpaperdoll',526,340,122,158)--464 277 rgSetZoomArea('rginvencumberance',439,721,175,18)--438 762 243 20 --rgSetZoomArea('rginvmaxencumberance',546,710,137,24) rgSetZoomArea('rginvnamelabel',374,102,300,26) rgSetZoomArea('rginvclasslabel',374,130,300,26) --rgSetZoomArea('rginvPortrait0',703,96,71,98) --rgSetZoomArea('rginvPortrait1',703,202,71,98) --rgSetZoomArea('rginvPortrait2',703,308,71,98) --rgSetZoomArea('rginvPortrait3',703,414,71,98) --rgSetZoomArea('rginvPortrait4',703,520,71,98) --rgSetZoomArea('rginvPortrait5',703,626,71,98) rgSetZoomArea('rginvcombatstatback',93,96,275,98) rgSetZoomArea('rginvcombatstat1',98,147,50,43) rgSetZoomArea('rginvcombatstat2',152,147,50,43) rgSetZoomArea('rginvcombatstat3',206,147,50,43) rgSetZoomArea('rginvcombatstat4',260,147,50,43) rgSetZoomArea('rginvcombatstat5',314,147,50,43) rgSetZoomArea('rginvgold',176,706,100,25) rgSetZoomArea('rginvslotback1',602,546,72,72) rgSetZoomArea('rginvslotback2',602,622,72,72) rgSetZoomArea('rginvslotback3',374,470,72,72) rgSetZoomArea('rginvslotback4',450,470,72,72) rgSetZoomArea('rginvslotback5',526,470,72,72) rgSetZoomArea('rginvslotback6',602,470,72,72) rgSetZoomArea('rginvslotback7',374,622,72,72) rgSetZoomArea('rginvslotback8',450,622,72,72) rgSetZoomArea('rginvslotback9',526,622,72,72) rgSetZoomArea('rginvslotback10',374,166,72,72) rgSetZoomArea('rginvslotback11',374,242,72,72) rgSetZoomArea('rginvslotback12',450,166,72,72) rgSetZoomArea('rginvslotback13',602,166,72,72) rgSetZoomArea('rginvslotback14',374,546,72,72) rgSetZoomArea('rginvslotback15',450,546,72,72) rgSetZoomArea('rginvslotback16',526,546,72,72) rgSetZoomArea('rginvslotback17',374,318,72,72) rgSetZoomArea('rginvslotback18',602,318,72,72) rgSetZoomArea('rginvslotback19',602,242,72,72) rgSetZoomArea('rginvslotback20',526,166,72,72) rgSetZoomArea('rginvslotback21',374,394,72,72) rgSetZoomArea('rginvslotback22',602,394,72,72) rgSetZoomArea('slot_inv_1',381,477,58,58) rgSetZoomArea('slot_inv_2',457,477,58,58) rgSetZoomArea('slot_inv_3',533,477,58,58) rgSetZoomArea('slot_inv_4',609,477,58,58) rgSetZoomArea('slot_inv_5',381,629,58,58) rgSetZoomArea('slot_inv_6',457,629,58,58) rgSetZoomArea('slot_inv_7',533,629,58,58) rgSetZoomArea('slot_inv_11',381,173,58,58) rgSetZoomArea('slot_inv_12',381,249,58,58) rgSetZoomArea('slot_inv_13',457,173,58,58) rgSetZoomArea('slot_inv_14',609,173,58,58) rgSetZoomArea('slot_inv_15',381,553,58,58) rgSetZoomArea('slot_inv_16',457,553,58,58) rgSetZoomArea('slot_inv_17',533,553,58,58) rgSetZoomArea('slot_inv_21',381,325,58,58) rgSetZoomArea('slot_inv_22',609,325,58,58) rgSetZoomArea('slot_inv_23',609,249,58,58) rgSetZoomArea('slot_inv_24',533,173,58,58) rgSetZoomArea('slot_inv_25',381,401,58,58) rgSetZoomArea('slot_inv_26',609,401,58,58) rgSetZoomArea('rg_slot1_inv_30',774,96,49,49) rgSetZoomArea('rg_slot1_inv_31',774,145,49,49) rgSetZoomArea('rg_slot1_inv_32',823,96,49,49) rgSetZoomArea('rg_slot1_inv_33',823,145,49,49) rgSetZoomArea('rg_slot1_inv_34',872,96,49,49) rgSetZoomArea('rg_slot1_inv_35',872,145,49,49) rgSetZoomArea('rg_slot1_inv_36',921,96,49,49) rgSetZoomArea('rg_slot1_inv_37',921,145,49,49) rgSetZoomArea('rg_slot1_inv_38',970,96,49,49) rgSetZoomArea('rg_slot1_inv_39',970,145,49,49) rgSetZoomArea('rg_slot1_inv_40',1019,96,49,49) rgSetZoomArea('rg_slot1_inv_41',1019,145,49,49) rgSetZoomArea('rg_slot1_inv_42',1068,96,49,49) rgSetZoomArea('rg_slot1_inv_43',1068,145,49,49) rgSetZoomArea('rg_slot1_inv_44',1117,96,49,49) rgSetZoomArea('rg_slot1_inv_45',1117,145,49,49) rgSetZoomArea('rg_slot1_invdeath',774,145,392, 98) rgSetZoomArea('rg_slot2_inv_30',774,202,49,49) rgSetZoomArea('rg_slot2_inv_31',774,251,49,49) rgSetZoomArea('rg_slot2_inv_32',823,202,49,49) rgSetZoomArea('rg_slot2_inv_33',823,251,49,49) rgSetZoomArea('rg_slot2_inv_34',872,202,49,49) rgSetZoomArea('rg_slot2_inv_35',872,251,49,49) rgSetZoomArea('rg_slot2_inv_36',921,202,49,49) rgSetZoomArea('rg_slot2_inv_37',921,251,49,49) rgSetZoomArea('rg_slot2_inv_38',970,202,49,49) rgSetZoomArea('rg_slot2_inv_39',970,251,49,49) rgSetZoomArea('rg_slot2_inv_40',1019,202,49,49) rgSetZoomArea('rg_slot2_inv_41',1019,251,49,49) rgSetZoomArea('rg_slot2_inv_42',1068,202,49,49) rgSetZoomArea('rg_slot2_inv_43',1068,251,49,49) rgSetZoomArea('rg_slot2_inv_44',1117,202,49,49) rgSetZoomArea('rg_slot2_inv_45',1117,251,49,49) rgSetZoomArea('rg_slot2_invdeath',774,202,392, 98) rgSetZoomArea('rg_slot3_inv_30',774,308,49,49) rgSetZoomArea('rg_slot3_inv_31',774,357,49,49) rgSetZoomArea('rg_slot3_inv_32',823,308,49,49) rgSetZoomArea('rg_slot3_inv_33',823,357,49,49) rgSetZoomArea('rg_slot3_inv_34',872,308,49,49) rgSetZoomArea('rg_slot3_inv_35',872,357,49,49) rgSetZoomArea('rg_slot3_inv_36',921,308,49,49) rgSetZoomArea('rg_slot3_inv_37',921,357,49,49) rgSetZoomArea('rg_slot3_inv_38',970,308,49,49) rgSetZoomArea('rg_slot3_inv_39',970,357,49,49) rgSetZoomArea('rg_slot3_inv_40',1019,308,49,49) rgSetZoomArea('rg_slot3_inv_41',1019,357,49,49) rgSetZoomArea('rg_slot3_inv_42',1068,308,49,49) rgSetZoomArea('rg_slot3_inv_43',1068,357,49,49) rgSetZoomArea('rg_slot3_inv_44',1117,308,49,49) rgSetZoomArea('rg_slot3_inv_45',1117,357,49,49) rgSetZoomArea('rg_slot3_invdeath',774,308,392, 98) rgSetZoomArea('rg_slot4_inv_30',774,414,49,49) rgSetZoomArea('rg_slot4_inv_31',774,463,49,49) rgSetZoomArea('rg_slot4_inv_32',823,414,49,49) rgSetZoomArea('rg_slot4_inv_33',823,463,49,49) rgSetZoomArea('rg_slot4_inv_34',872,414,49,49) rgSetZoomArea('rg_slot4_inv_35',872,463,49,49) rgSetZoomArea('rg_slot4_inv_36',921,414,49,49) rgSetZoomArea('rg_slot4_inv_37',921,463,49,49) rgSetZoomArea('rg_slot4_inv_38',970,414,49,49) rgSetZoomArea('rg_slot4_inv_39',970,463,49,49) rgSetZoomArea('rg_slot4_inv_40',1019,414,49,49) rgSetZoomArea('rg_slot4_inv_41',1019,463,49,49) rgSetZoomArea('rg_slot4_inv_42',1068,414,49,49) rgSetZoomArea('rg_slot4_inv_43',1068,463,49,49) rgSetZoomArea('rg_slot4_inv_44',1117,414,49,49) rgSetZoomArea('rg_slot4_inv_45',1117,463,49,49) rgSetZoomArea('rg_slot4_invdeath',774,414,392, 98) rgSetZoomArea('rg_slot5_inv_30',774,520,49,49) rgSetZoomArea('rg_slot5_inv_31',774,569,49,49) rgSetZoomArea('rg_slot5_inv_32',823,520,49,49) rgSetZoomArea('rg_slot5_inv_33',823,569,49,49) rgSetZoomArea('rg_slot5_inv_34',872,520,49,49) rgSetZoomArea('rg_slot5_inv_35',872,569,49,49) rgSetZoomArea('rg_slot5_inv_36',921,520,49,49) rgSetZoomArea('rg_slot5_inv_37',921,569,49,49) rgSetZoomArea('rg_slot5_inv_38',970,520,49,49) rgSetZoomArea('rg_slot5_inv_39',970,569,49,49) rgSetZoomArea('rg_slot5_inv_40',1019,520,49,49) rgSetZoomArea('rg_slot5_inv_41',1019,569,49,49) rgSetZoomArea('rg_slot5_inv_42',1068,520,49,49) rgSetZoomArea('rg_slot5_inv_43',1068,569,49,49) rgSetZoomArea('rg_slot5_inv_44',1117,520,49,49) rgSetZoomArea('rg_slot5_inv_45',1117,569,49,49) rgSetZoomArea('rg_slot5_invdeath',774,520,392, 98) rgSetZoomArea('rg_slot6_inv_30',774,626,49,49) rgSetZoomArea('rg_slot6_inv_31',774,675,49,49) rgSetZoomArea('rg_slot6_inv_32',823,626,49,49) rgSetZoomArea('rg_slot6_inv_33',823,675,49,49) rgSetZoomArea('rg_slot6_inv_34',872,626,49,49) rgSetZoomArea('rg_slot6_inv_35',872,675,49,49) rgSetZoomArea('rg_slot6_inv_36',921,626,49,49) rgSetZoomArea('rg_slot6_inv_37',921,675,49,49) rgSetZoomArea('rg_slot6_inv_38',970,626,49,49) rgSetZoomArea('rg_slot6_inv_39',970,675,49,49) rgSetZoomArea('rg_slot6_inv_40',1019,626,49,49) rgSetZoomArea('rg_slot6_inv_41',1019,675,49,49) rgSetZoomArea('rg_slot6_inv_42',1068,626,49,49) rgSetZoomArea('rg_slot6_inv_43',1068,675,49,49) rgSetZoomArea('rg_slot6_inv_44',1117,626,49,49) rgSetZoomArea('rg_slot6_inv_45',1117,675,49,49) rgSetZoomArea('rg_slot6_invdeath',774,626,392, 98) rgSetZoomArea('rginvcolor1',609,553,58,58) rgSetZoomArea('rginvcolor2',609,629,58,58) rgSetZoomArea('rgSlotsArea1',774,96,392,98) rgSetZoomArea('rgSlotsArea2',774,202,392,98) rgSetZoomArea('rgSlotsArea3',774,308,392,98) rgSetZoomArea('rgSlotsArea4',774,414,392,98) rgSetZoomArea('rgSlotsArea5',774,520,392,98) rgSetZoomArea('rgSlotsArea6',774,626,392,98) rgSetZoomArea('rginvgroundlabel',1200,100,69,22) rgSetZoomArea('rginvgroundnumber',1196,710,60,26) rgSetZoomArea('rginvgroud1',1200,131,69,69) rgSetZoomArea('rginvgroud2',1200,203,69,69) rgSetZoomArea('rginvgroud3',1200,275,69,69) rgSetZoomArea('rginvgroud4',1200,347,69,69) rgSetZoomArea('rginvgroud5',1200,419,69,69) rgSetZoomArea('rginvgroud6',1200,491,69,69) rgSetZoomArea('rginvgroud7',1200,563,69,69) rgSetZoomArea('rginvgroud8',1200,635,69,69) rgSetZoomArea('rginvfakegroudlist1',1200,124,69,580) rgSetZoomArea('slot_inv_68',1207,138,54,54) rgSetZoomArea('slot_inv_69',1207,210,54,54) rgSetZoomArea('slot_inv_70',1207,282,54,54) rgSetZoomArea('slot_inv_71',1207,354,54,54) rgSetZoomArea('slot_inv_72',1207,426,54,54) rgSetZoomArea('slot_inv_73',1207,498,54,54) rgSetZoomArea('slot_inv_74',1207,570,54,54) rgSetZoomArea('slot_inv_75',1207,642,54,54) rgSetZoomArea('rginvfakegroudlist2',1181,124,19,580) rgSetZoomArea('rginvdeath',93,92,589,604) end function rgGetSlotInfoArea(slotName) rgGroupSlotInfo = slotName local x = 0 local y = 0 if slotName == 'group0' or slotName == 'group1' or slotName == 'group2' or slotName == 'group3' or slotName == 'group4' or slotName == 'group5' or slotName == 'group6' or slotName == 'group7' then x = 773 elseif slotName == 'group8' or slotName == 'group9' or slotName == 'group10' or slotName == 'group11' or slotName == 'group12' or slotName == 'group13' or slotName == 'group14' or slotName == 'group15' then x = 1013 end if slotName == 'group0' or slotName == 'group8'then y = 218 elseif slotName == 'group1' or slotName == 'group9' then y = 278 elseif slotName == 'group2' or slotName == 'group10' then y = 338 elseif slotName == 'group3' or slotName == 'group11' then y = 398 elseif slotName == 'group4' or slotName == 'group12' then y = 458 elseif slotName == 'group5' or slotName == 'group13' then y = 518 elseif slotName == 'group6' or slotName == 'group14' then y = 578 elseif slotName == 'group7' or slotName == 'group15' then y = 638 end Infinity_SetArea("rgSlotInfo01", x ,y ,nil,nil) Infinity_SetArea("rgSlotInfo02", x+3 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo03", x+6 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo04", x+9 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo05", x+12 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo06", x+15 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo07", x+18 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo08", x+21 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo09", x+24 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo10", x+27 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo11", x+30 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo12", x+33 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo13", x+36 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo14", x+39 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo15", x+42 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo16", x+45 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo17", x+48 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo18", x+51 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo19", x+54 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo20", x+57 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo21", x+60 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo22", x+63 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo23", x+66 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo24", x+69 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo25", x+72 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo26", x+75 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo27", x+78 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo28", x+81 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo29", x+84 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo30", x+87 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo31", x+90 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo32", x+93 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo33", x+96 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo34", x+99 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo35", x+102 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo36", x+105 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo37", x+108 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo38", x+111 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo39", x+114 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo40", x+117 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo41", x+120 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo42", x+123 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo43", x+126 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo44", x+129 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo45", x+132 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo46", x+135 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo47", x+138 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo48", x+141 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo49", x+144 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo50", x+147 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo51", x+150 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo52", x+153 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo53", x+156 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo54", x+159 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo55", x+162 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo56", x+165 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo57", x+168 ,y ,nil,nil) Infinity_SetArea("rgSlotInfo58", x+171 ,y ,nil,nil) end function rgGetSlotVisibility() if rgInventoryMode == 0 then Infinity_SetArea("slot_inv_30", nil ,nil ,0,0) Infinity_SetArea("slot_inv_31", nil ,nil ,0,0) Infinity_SetArea("slot_inv_32", nil ,nil ,0,0) Infinity_SetArea("slot_inv_33", nil ,nil ,0,0) Infinity_SetArea("slot_inv_34", nil ,nil ,0,0) Infinity_SetArea("slot_inv_35", nil ,nil ,0,0) Infinity_SetArea("slot_inv_36", nil ,nil ,0,0) Infinity_SetArea("slot_inv_37", nil ,nil ,0,0) Infinity_SetArea("slot_inv_38", nil ,nil ,0,0) Infinity_SetArea("slot_inv_39", nil ,nil ,0,0) Infinity_SetArea("slot_inv_40", nil ,nil ,0,0) Infinity_SetArea("slot_inv_41", nil ,nil ,0,0) Infinity_SetArea("slot_inv_42", nil ,nil ,0,0) Infinity_SetArea("slot_inv_43", nil ,nil ,0,0) Infinity_SetArea("slot_inv_44", nil ,nil ,0,0) Infinity_SetArea("slot_inv_45", nil ,nil ,0,0) else Infinity_SetArea("slot_inv_30", nil ,nil ,58,58) Infinity_SetArea("slot_inv_31", nil ,nil ,58,58) Infinity_SetArea("slot_inv_32", nil ,nil ,58,58) Infinity_SetArea("slot_inv_33", nil ,nil ,58,58) Infinity_SetArea("slot_inv_34", nil ,nil ,58,58) Infinity_SetArea("slot_inv_35", nil ,nil ,58,58) Infinity_SetArea("slot_inv_36", nil ,nil ,58,58) Infinity_SetArea("slot_inv_37", nil ,nil ,58,58) Infinity_SetArea("slot_inv_38", nil ,nil ,58,58) Infinity_SetArea("slot_inv_39", nil ,nil ,58,58) Infinity_SetArea("slot_inv_40", nil ,nil ,58,58) Infinity_SetArea("slot_inv_41", nil ,nil ,58,58) Infinity_SetArea("slot_inv_42", nil ,nil ,58,58) Infinity_SetArea("slot_inv_43", nil ,nil ,58,58) Infinity_SetArea("slot_inv_44", nil ,nil ,58,58) Infinity_SetArea("slot_inv_45", nil ,nil ,58,58) end end function rgGetInvSlot() if RgInvPartyModeHover == 0 then return 'RGDSLOT2' else return 'RGDSLOT2' end end function rgGetTempItemDesc() local head = '^D' local body = '^B' if RgUISkin == 1 or RgUISkin == 2 then head = '^M' body = '^5' end for i=1,#rgItemDescList,1 do if rgItemDescList[i][1] == tempStats[rgInvId].tempItem then rgTestItemDesc = head .. tempStats[rgInvId].tempItem .. body .. '\n\n' .. rgSplitByDoubleLine(rgItemDescList[i][2]) break end end if tempStats[rgInvId].tempItem == '' then rgItemDescList = {} end return rgTestItemDesc --rgItemDescList = out end function rgSplitByDoubleLine(str) local Lines = {} local finLines = {} local stat = false for i in string.gmatch(str, "[^\r\n\r\n]+") do if rgStringStart(i,t("RG_ITM_COMP_ST")) then stat = true elseif rgStringStart(i,t("RG_ITM_COMP_WE")) or rgStringStart(i,t("RG_ITM_COMP_RE")) then stat = false elseif rgStringStart(i,"THAC0") then i = i:gsub("THAC0", "\nTHAC0") end i = i:gsub(t("RG_ITM_COMP_PR"), "") i = i:gsub(t("RG_ITM_COMP_DA"), "") i = i:gsub(t("RG_ITM_COMP_TY"), "") if stat == true then --and not rgStringStart(i,"STAT") table.insert(Lines, i); end end return table.concat(Lines, "\n") end function rgStringStart(str,start) return str:find('^' .. start) ~= nil end function rgGetSelectedCharacter() --local cid = '1' if RgInvPartyModeHover == 1 and rgInventoryMode == 0 then if rgCurChar ~= rgInvChar then rgCurChar = rgInvChar Infinity_PressKeyboardButton(rgInvChar) end --rgPaperdollSwap = 1 end end function rgGetTempItemCheck(tempItem) --if tempStats[rgInvId].tempItem ~= '' then --rgTempItemDesc = tempItem.description --rgTempItemName = tempItem.name table.insert(rgItemDescList, {tempItem.name,tempItem.description}) --end end function rgOnPartyModeHover(char) if rgCurChar ~= char then --rgUnlockInvId() rgCurChar = char Infinity_PressKeyboardButton(char) rgPaperdollSwap = 0 end end function rgGetInvPortSelected(num) if rgActiveArea == num then return 2 else return 0 end end function rgUnlockInvId() rgInvId = id end function rgGetInvPaperdollBam() --if rgGameEngine == 2 then for i=1,#rgIpNpc,1 do if rgIpNpc[i].name:lower() == t(characters[rgInvId].name):lower() then return 'rgdipnpc' end end --end local bam = 'rgdip' if characters[rgInvId].gender == 15729635 then bam = bam .. 'f' --elseif characters[rgInvId].gender == 15729749 then -- bam = bam .. 'm' else bam = bam .. 'm' end if characters[rgInvId].race == 1096 or characters[rgInvId].race == 2828 then bam = bam .. 'h' elseif characters[rgInvId].race == 1097 or characters[rgInvId].race == 1098 or characters[rgInvId].race == 8330 then bam = bam .. 'e' elseif characters[rgInvId].race == 1100 then bam = bam .. 'd' elseif characters[rgInvId].race == 1101 then bam = bam .. 'l' elseif characters[rgInvId].race == 1099 then bam = bam .. 'g' elseif characters[rgInvId].race == 53212 then bam = bam .. 'o' else bam = bam .. 'h' end return bam end function rgGetInvPaperdollOffhandBamCoordinate() local res = 0 if characters[rgInvId].race == 1096 or characters[rgInvId].race == 2828 or characters[rgInvId].race == 53212 then res = 1 --'h' elseif characters[rgInvId].race == 1097 or characters[rgInvId].race == 1098 or characters[rgInvId].race == 8330 then res = 2 --'e' elseif characters[rgInvId].race == 1100 or (characters[rgInvId].race == 1101 and characters[rgInvId].gender == 15729635) then res = 3 --'d' elseif characters[rgInvId].race == 1099 or (characters[rgInvId].race == 1101 and characters[rgInvId].gender == 15729749) then res = 4 --'g' else res = 1 end return res end function rgGetInvPaperdollSeq() local ret = 0 --if rgGameEngine == 2 then for i=1,#rgIpNpc,1 do if rgIpNpc[i].name:lower() == t(characters[rgInvId].name):lower() then return rgIpNpc[i].frame end end --end for i=1,#rgIpAppearance,1 do if rgGetGameEngineString(rgIpAppearance[i].strref[1],rgIpAppearance[i].strref[2],rgIpAppearance[i].strref[3],rgIpAppearance[i].strref[4]):lower() == rgGetClassLevelInvString(1):lower() then ret = rgIpAppearance[i].level break end end return ret end function rgGetInvPaperdollFrame() local ret = 0 local isRobe = 0 if rgGetInvPaperdollBam() == 'rgdipnpc' and (rgGetInvPaperdollSeq() == 0 or rgGetInvPaperdollSeq() == 3 or rgGetInvPaperdollSeq() == 7 or rgGetInvPaperdollSeq() == 12 or rgGetInvPaperdollSeq() >= 18) then isRobe = 1 end if rgGetInvPaperdollBam() ~= 'rgdipnpc' and rgGetInvPaperdollSeq() == 3 then isRobe = 1 end if isRobe == 1 then ret = 0 for i=1,#rgIpRobe,1 do if rgGetGameEngineString(rgIpRobe[i].strref[1],rgIpRobe[i].strref[2],rgIpRobe[i].strref[3],rgIpRobe[i].strref[4]) == characters[rgInvId].equipment.armor.item.name then ret = rgIpRobe[i].level break end end else ret = 0 for i=1,#rgIpArmor,1 do if rgGetGameEngineString(rgIpArmor[i].strref[1],rgIpArmor[i].strref[2],rgIpArmor[i].strref[3],rgIpArmor[i].strref[4]) == characters[rgInvId].equipment.armor.item.name then ret = rgIpArmor[i].level break end end end return ret end function rgGetAllClassInvString() local ret = rgGetClassLevelInvString(1) if characters[rgInvId].classlevel.second ~= nil then ret = ret .. ' / ' .. rgGetClassLevelInvString(2) end if characters[rgInvId].classlevel.third ~= nil then ret = ret .. ' / ' .. rgGetClassLevelInvString(3) end return ret end function rgGetClassLevelInvString(num) --dual 19719 local rgClass = '' local rgLevel = '' local rgLevelXP = '' if num == 1 then rgClass = ',' .. characters[rgInvId].classlevel.first.details elseif num == 2 then rgClass = ',' .. characters[rgInvId].classlevel.second.details else rgClass = ',' .. characters[rgInvId].classlevel.third.details end local rgClass1 = string.match(rgClass, ',.-:') local out = string.match(rgClass1, '[^,:]+') return out end function rgGetInvShield() local ret = 0 local details = characters[rgInvId].AC.details local shield = characters[rgInvId].equipment.shield.item.name if not string.find(details, shield, 1, true) then return 0 end for i=1,#rgIpShield,1 do if rgGetGameEngineString(rgIpShield[i].strref[1],rgIpShield[i].strref[2],rgIpShield[i].strref[3],rgIpShield[i].strref[4]) == characters[rgInvId].equipment.shield.item.name then ret = rgIpShield[i].level break end end return ret end function rgGetInvPaperdollOffhandFrame() local shield = rgGetInvShield() if shield > 0 then return shield end if characters[rgInvId].damage.minOffhand then local name = characters[rgInvId].equipment.shield.item.name for i=1,#rgIpWeaponSpecial,1 do if rgGetGameEngineString(rgIpWeaponSpecial[i].strref[1],rgIpWeaponSpecial[i].strref[2],rgIpWeaponSpecial[i].strref[3],rgIpWeaponSpecial[i].strref[4]) == name then return rgIpWeaponSpecial[i].frameOffhand end end local desc = characters[rgInvId].equipment.shield.item.description local startIdx = string.find(desc, getUiString('RG_ITM_COMP_ST')) if not startIdx then startIdx = 0 end local substring = string.sub(desc, startIdx) for _, item in ipairs(rgIpWeaponOffHand) do --local fetchedString = Infinity_FetchString(item.strref) local fetchedString = rgGetGameEngineString(item.strref[1],item.strref[2],item.strref[3],item.strref[4]) local cleanDetails = string.lower(substring) local cleanFetched = string.lower(fetchedString or "") if cleanFetched ~= "" and string.find(cleanDetails, cleanFetched, 1, true) then return item.frame end end end return 0 end function rgGetInvPaperdollWeaponFrame() local nameString = rgGetWeaponNameFromDetails() for i=1,#rgIpWeaponSpecial,1 do if rgGetGameEngineString(rgIpWeaponSpecial[i].strref[1],rgIpWeaponSpecial[i].strref[2],rgIpWeaponSpecial[i].strref[3],rgIpWeaponSpecial[i].strref[4]) == nameString then return rgIpWeaponSpecial[i].frame end end local inputString = rgGetWeaponDescriptionFromDetails() local startIdx = string.find(inputString, getUiString('RG_ITM_COMP_ST')) if not startIdx then startIdx = 0 end local substring = string.sub(inputString, startIdx) for _, item in ipairs(rgIpWeapon) do local fetchedString = rgGetGameEngineString(item.strref[1],item.strref[2],item.strref[3],item.strref[4]) local cleanDetails = string.lower(substring) local cleanFetched = string.lower(fetchedString or "") if cleanFetched ~= "" and string.find(cleanDetails, cleanFetched, 1, true) then return item.frame end end return nil end function rgGetWeaponDescriptionFromDetails() local details = characters[rgInvId].damage.details if not details or details == "" then return nil end -- Vytvoříme strukturovaný seznam zbraní local weaponSlots = { characters[rgInvId].equipment.weapon0, characters[rgInvId].equipment.weapon1, characters[rgInvId].equipment.weapon2, characters[rgInvId].equipment.weapon3 } -- 1. FÁZE: Hledání v názvech (name) for _, slot in ipairs(weaponSlots) do if slot and slot.item and slot.item.name and slot.item.name ~= "" then if string.find(details, slot.item.name, 1, true) then return slot.item.description end end end -- 2. FÁZE: Hledání v abilitách (ammo) for _, slot in ipairs(weaponSlots) do if slot and slot.abilities then -- Projdeme všechny ability dané zbraně for _, ability in ipairs(slot.abilities) do if ability and ability.text and ability.text ~= "" then if string.find(details, ability.text, 1, true) then -- Shoda nalezena v abilitě, vracíme description zbraně, které patří return slot.item.description end end end end end return nil end function rgGetWeaponNameFromDetails() local details = characters[rgInvId].damage.details if not details or details == "" then return nil end local weaponSlots = { characters[rgInvId].equipment.weapon0, characters[rgInvId].equipment.weapon1, characters[rgInvId].equipment.weapon2, characters[rgInvId].equipment.weapon3 } for _, slot in ipairs(weaponSlots) do if slot and slot.item and slot.item.name and slot.item.name ~= "" then if string.find(details, slot.item.name, 1, true) then return slot.item.name end end end return nil end function rgGetInvModeSequence() if RgUISkin == 3 then return 0 else return 0 end end function GetInvModeSequence() if rgInventoryMode == 0 then return 0 else return 2 end end function rgGetFullBodyPortrait(portrait) if portrait:sub(-1) == "L" then return portrait:sub(1, -2) .. "R" else return portrait end end function rgGetSpriteSlotArea() if RgInvPaperdolls == 4 then Infinity_SetArea("slot_inv_1" , 380, 380, nil ,nil) Infinity_SetArea("slot_inv_2" , 380, 440, nil ,nil) Infinity_SetArea("slot_inv_3" , 380, 500, nil ,nil) Infinity_SetArea("slot_inv_4" , 380, 560, nil ,nil) Infinity_SetArea("slot_inv_15", 380, 180, nil ,nil) Infinity_SetArea("slot_inv_16", 380, 240, nil ,nil) Infinity_SetArea("slot_inv_17", 380, 300, nil ,nil) Infinity_SetArea("slot_inv_26", 644, 380, nil ,nil) Infinity_SetArea("slot_inv_13", 512, 180, nil ,nil) Infinity_SetArea("slot_inv_11", 512, 300, nil ,nil) Infinity_SetArea("slot_inv_24", 644, 500, nil ,nil) Infinity_SetArea("slot_inv_14", 512, 240, nil ,nil) Infinity_SetArea("slot_inv_23", 440, 380, nil ,nil) Infinity_SetArea("slot_inv_22", 584, 380, nil ,nil) Infinity_SetArea("slot_inv_21", 512, 360, nil ,nil) Infinity_SetArea("slot_inv_12", 644, 440, nil ,nil) Infinity_SetArea("slot_inv_25", 512, 560, nil ,nil) Infinity_SetArea("slot_inv_5" , 644, 180, nil ,nil) Infinity_SetArea("slot_inv_6" , 644, 240, nil ,nil) Infinity_SetArea("slot_inv_7" , 644, 300, nil ,nil) else Infinity_SetArea("slot_inv_1" , 380, 182, nil, nil) Infinity_SetArea("slot_inv_2" , 380, 248, nil, nil) Infinity_SetArea("slot_inv_3" , 380, 314, nil, nil) Infinity_SetArea("slot_inv_4" , 380, 380, nil, nil) Infinity_SetArea("slot_inv_15", 380, 446, nil, nil) Infinity_SetArea("slot_inv_16", 380, 512, nil, nil) Infinity_SetArea("slot_inv_17", 380, 578, nil, nil) Infinity_SetArea("slot_inv_26", 446, 182, nil, nil) Infinity_SetArea("slot_inv_13", 512, 182, nil, nil) Infinity_SetArea("slot_inv_11", 578, 182, nil, nil) Infinity_SetArea("slot_inv_24", 644, 182, nil, nil) Infinity_SetArea("slot_inv_14", 644, 248, nil, nil) Infinity_SetArea("slot_inv_23", 644, 314, nil, nil) Infinity_SetArea("slot_inv_22", 644, 380, nil, nil) Infinity_SetArea("slot_inv_21", 644, 446, nil, nil) Infinity_SetArea("slot_inv_12", 644, 512, nil, nil) Infinity_SetArea("slot_inv_25", 644, 578, nil, nil) Infinity_SetArea("slot_inv_5" , 446, 578, nil, nil) Infinity_SetArea("slot_inv_6" , 512, 578, nil, nil) Infinity_SetArea("slot_inv_7" , 578, 578, nil, nil) end end rgInvPortraitArea = 0 rgTestItemDesc = '' --rgTestItemDescList = {} rgItemDescList = {} rgTempItem = '' --rgTempItemDesc = '' --rgTempItemName = '' rgInvId = 0 rgInvChar = '' rgCurChar = '' rgPaperdollSwap = 0 rgClassString = 0 --rgFullBodyPortrait = 0 --RgInvPartyModeHover = 0 --rgInvNewPaperdolls = 1 ` menu { name 'INVENTORY' align center center ignoreEsc onOpen " rgInvId = id --rgRecIsOpened = 0 --rgCloseOnKeypressJ = 0 --rgCloseOnKeypressK = 0 --Infinity_PopMenu('CHARACTER') Infinity_PopMenu('RGWORLD_MESSAGES') Infinity_PopMenu('WORLD_MESSAGES') Infinity_PopMenu('WORLD_ACTIONBAR') Infinity_ActivateInventory() rgGetSpriteSlotArea() doubleClickEventScheduled = nil popSidebars() Infinity_PushMenu('RG_MENU_BAR') if RgInvPartyFastLoad == 1 then if rgCharNames ~= rgCharInvNames or rgEmptyLog == 0 then rgEmptyLog = 1 rgUpdateSlots() end else rgUpdateSlots() end --rgSetInvArea() rgGroupSlotInfo = 'group0' Infinity_SetOffset('ITEM_DESCRIPTION',-290, 30) --rgGetTempItemDescList() rgTempItem = '' rgClassString = rgGetInvPaperdollSeq() --rgFullBodyPortrait = Infinity_GetINIValue('Game Options','RgFullBodyPortrait',0) " onClose " Infinity_PopMenu('CHARACTER_COLOR') rgPopItemDesc() Infinity_SetOffset('ITEM_DESCRIPTION',0,0) Infinity_PopMenu('ITEM_IDENTIFY') Infinity_PopMenu('RG_MENU_BAR') --Infinity_PopMenu('RG_JOURNAL') --popSidebars() --charTable = {} " label { enabled "RgInvPaperdolls <= 3" name 'rgdbcinv1' area 0 0 1365 768 bam rgdbcinv sequence lua "RgUISkin" scaleToClip } label { enabled "RgInvPaperdolls == 4" area 0 0 1365 768 bam rgdbcin1 sequence lua "RgUISkin" scaleToClip } button { area 1081 36 54 50 bam rgdimbut scaleToClip tooltip lua "getUiString('RG_INV_MODE')" sequence lua "rgGetInvModeSequence()" frame lua "GetInvModeSequence()" action " rgInvId = id if rgInventoryMode == 0 then rgInventoryMode = 1 rgUpdateSlots() TEXT_inventoryError = getUiString('RG_INV_PARTY_INFO') else rgInventoryMode = 0 end Infinity_SetINIValue('Game Options','RgInventoryMode',rgInventoryMode) " } text { enabled "rgInventoryMode == 0 and RgInvPartyModeHover == 0" area 0 0 0 0 text lua "rgUnlockInvId()" } label { enabled "tempStats[rgInvId] ~= nil" area 93 195 275 55 bam rgdicomx sequence lua "RgUISkin" scaleToClip } label { enabled "tempStats[rgInvId] ~= nil" area 98 203 50 43 text lua "rgGetTempAC()" text style "rg_normal_small" align center center } label { enabled "tempStats[rgInvId] ~= nil" area 152 203 50 43 text lua "rgGetTempHP()" text style "rg_normal_small" align center center } label { enabled "tempStats[rgInvId] ~= nil" area 260 203 50 43 text lua "rgGetTempTHAC0()" text style "rg_normal_small" align center center } label { enabled "tempStats[rgInvId] ~= nil" area 206 203 50 43 text lua "rgGetTempDamage()" text style "rg_normal_small" align center center } label { enabled "tempStats[rgInvId] ~= nil" area 98 256 270 440 text lua "rgGetTempItemDesc()" text style "rg_normal_small" scrollbar 'rgdscrl1' } text { enabled "tempStats[rgInvId] == nil" name 'rginvcombatstatdesc' area 98 203 270 527 text lua "rgGetCombatStatsString(rgInvId)" text style "rg_normal_small" scrollbar 'rgdscrl1' --'rgdscrl1' } label { --enabled "rgInventoryMode == 1 or rgPaperdollSwap == 1" --enabled "id ~= rgInvId" enabled "RgInvPaperdolls == 1" area 434 270 212 274 bam lua "rgGetInvPaperdollBam()" scaleToClip sequence lua "rgGetInvPaperdollSeq()" frame lua "rgGetInvPaperdollFrame()" --text lua "characters[rgInvId].equipment.armor.item[3]" } label { enabled "RgInvPaperdolls == 1" area 434 270 212 274 bam "rgdipw1" scaleToClip frame lua "rgGetInvPaperdollWeaponFrame()" } label --human { enabled "RgInvPaperdolls == 1 and rgGetInvPaperdollOffhandBamCoordinate() == 1" area 436 269 212 274 bam "rgdipw2" scaleToClip frame lua "rgGetInvPaperdollOffhandFrame()" } label --elf { enabled "RgInvPaperdolls == 1 and rgGetInvPaperdollOffhandBamCoordinate() == 2" area 430 270 212 274 bam "rgdipw2" scaleToClip frame lua "rgGetInvPaperdollOffhandFrame()" } label --dwarf { enabled "RgInvPaperdolls == 1 and rgGetInvPaperdollOffhandBamCoordinate() == 3" area 444 264 212 274 bam "rgdipw2" scaleToClip frame lua "rgGetInvPaperdollOffhandFrame()" } label --gnome { enabled "RgInvPaperdolls == 1 and rgGetInvPaperdollOffhandBamCoordinate() == 4" area 446 274 212 274 bam "rgdipw2" scaleToClip frame lua "rgGetInvPaperdollOffhandFrame()" } button { enabled "RgInvPaperdolls == 0 and id == rgInvId" name 'rginvpaperdoll' area 482 330 122 158 paperdoll 1 --actiondrag "Infinity_SwapWithAppearance()" } button { enabled "RgInvPaperdolls == 0 and id ~= rgInvId" area 452 270 174 273 bitmap lua "characters[rgInvId].portrait" } button { enabled "RgInvPaperdolls == 2" area 452 270 174 273 --452 245 142 218 bitmap lua "characters[rgInvId].portrait" } button { enabled "RgInvPaperdolls == 3" area 446 260 186 292 bitmap lua "rgGetFullBodyPortrait(characters[rgInvId].portrait)" } text { enabled "RgInvPaperdolls == 2 or RgInvPaperdolls == 3" area 444 258 190 296 bam "rgdport4" sequence lua "RgUISkin" scaleToClip } button { enabled "id == rgInvId" name 'rginvencumberance' --434 714 180 18 438 762 243 20 area 614 656 84 64 encumbrance } button { enabled "id ~= rgInvId" name 'rginvencumberance' --434 714 180 18 438 762 243 20 area 614 656 84 64 text lua "'---' .. ' lbs'" text style "normal" align top left text shadow 1 text color '$' opacity 180 scaleToClip } label { enabled "rgInventoryMode == 0 and RgInvPartyModeHover == 1" area 624 699 74 20 bam "rgdiencb" --text lua "rgGetMaxEncumberance()" frame lua "rgGetEncumberanceFrame()" } label { name 'rginvnamelabel' area 374 104 329 27 text lua "rgString(characters[rgInvId].name)" text style "rg_trajan" align center center text color '$' } label { name 'rginvclasslabel' area 374 133 329 27 text lua "rgString(characters[rgInvId].class)" --text lua "tempStats[rgInvId].tempItem .. '/' .. rgTempItemName .. ';' .. rgTempItem" text style "rg_trajan" align center center text color '$' } button { area 718 96 71 98 portrait 0 enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" } button { area 718 202 71 98 portrait 1 enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" } button { area 718 308 71 98 portrait 2 enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" } button { area 718 414 71 98 portrait 3 enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" } button { area 718 520 71 98 portrait 4 enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" } button { area 718 626 71 98 portrait 5 enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" } button { area 718 96 71 98 portrait 0 bam rgdport5 sequence lua "RgUISkin" ScaleToClip --highlightgroup rginvport frame lua "rgGetInvPortSelected(1)" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" action "Infinity_OnPortraitLClick(0); rgActiveArea = 1; rgInvId = id; rgInvChar = '1'; rgClassString = rgGetInvPaperdollSeq()" actionAlt "Infinity_OnPortraitRClick(0)" actionDbl "Infinity_OnPortraitDblClick(0); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1"--; rgUpdateSlotsOnExit()" tooltip lua "Infinity_GetPortraitTooltip(0)" clickable lua "sidebarsGreyed ~= 1" } button { area 718 202 71 98 portrait 1 bam rgdport5 sequence lua "RgUISkin" ScaleToClip --highlightgroup rginvport frame lua "rgGetInvPortSelected(2)" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" action "Infinity_OnPortraitLClick(1); rgActiveArea = 2; rgInvId = id; rgInvChar = '2'; rgClassString = rgGetInvPaperdollSeq()" actionAlt "Infinity_OnPortraitRClick(1)" actionDbl "Infinity_OnPortraitDblClick(1); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1"--; rgUpdateSlotsOnExit()" tooltip lua "Infinity_GetPortraitTooltip(1)" clickable lua "sidebarsGreyed ~= 1" } button { area 718 308 71 98 portrait 2 bam rgdport5 sequence lua "RgUISkin" ScaleToClip --highlightgroup rginvport frame lua "rgGetInvPortSelected(3)" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" action "Infinity_OnPortraitLClick(2); rgActiveArea = 3; rgInvId = id; rgInvChar = '3'; rgClassString = rgGetInvPaperdollSeq()" actionAlt "Infinity_OnPortraitRClick(2)" actionDbl "Infinity_OnPortraitDblClick(2); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1"--; rgUpdateSlotsOnExit()" tooltip lua "Infinity_GetPortraitTooltip(2)" clickable lua "sidebarsGreyed ~= 1" } button { area 718 414 71 98 portrait 3 bam rgdport5 sequence lua "RgUISkin" ScaleToClip --highlightgroup rginvport frame lua "rgGetInvPortSelected(4)" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" action "Infinity_OnPortraitLClick(3); rgActiveArea = 4; rgInvId = id; rgInvChar = '4'; rgClassString = rgGetInvPaperdollSeq()" actionAlt "Infinity_OnPortraitRClick(3)" actionDbl "Infinity_OnPortraitDblClick(3); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1"--; rgUpdateSlotsOnExit()" tooltip lua "Infinity_GetPortraitTooltip(3)" clickable lua "sidebarsGreyed ~= 1" } button { area 718 520 71 98 portrait 4 bam rgdport5 sequence lua "RgUISkin" ScaleToClip --highlightgroup rginvport frame lua "rgGetInvPortSelected(5)" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" action "Infinity_OnPortraitLClick(4); rgActiveArea = 5; rgInvId = id; rgInvChar = '5'; rgClassString = rgGetInvPaperdollSeq()" actionAlt "Infinity_OnPortraitRClick(4)" actionDbl "Infinity_OnPortraitDblClick(4); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1"--; rgUpdateSlotsOnExit()" tooltip lua "Infinity_GetPortraitTooltip(4)" clickable lua "sidebarsGreyed ~= 1" } button { area 718 626 71 98 portrait 5 bam rgdport5 sequence lua "RgUISkin" ScaleToClip --highlightgroup rginvport frame lua "rgGetInvPortSelected(6)" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1 and RgInvPartyModeHover == 1" action "Infinity_OnPortraitLClick(5); rgActiveArea = 6; rgInvId = id; rgInvChar = '6'; rgClassString = rgGetInvPaperdollSeq()" actionAlt "Infinity_OnPortraitRClick(5)" actionDbl "Infinity_OnPortraitDblClick(5); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1"--; rgUpdateSlotsOnExit()" tooltip lua "Infinity_GetPortraitTooltip(5)" clickable lua "sidebarsGreyed ~= 1" } label { name 'rginvcombatstatback' area 93 96 275 98 bam rgdistat sequence lua "RgUISkin" ScaleToClip } label { name 'rginvcombatstat1' area 98 147 50 43 text lua "characters[rgInvId].AC.current" text style "rg_normal_small" align center center } label { name 'rginvcombatstat2' area 152 147 50 43 text lua "characters[rgInvId].HP.current .. '\n' .. characters[rgInvId].HP.max" text style "rg_normal_small" align center center } label { name 'rginvcombatstat3' area 206 147 50 43 text lua "rgGetTHAC0simleInv(rgInvId)" text style "rg_normal_small" align center center } label { name 'rginvcombatstat4' area 260 147 50 43 text lua "rgGetDamagesimleInv(rgInvId)" text style "rg_normal_small" align center center } label { name 'rginvcombatstat5' area 314 147 50 43 text lua "characters[rgInvId].proficiencies.numAttacks.current" text style "rg_normal_small" align center center } text { area 98 97 50 93 tooltip lua "t('ARMOR_CLASS_LABEL')" } text { area 152 97 50 93 tooltip lua "t('HIT_POINTS_LABEL')" } text { area 206 97 50 93 tooltip lua "t('THAC0_LABEL')" } text { area 260 97 50 93 tooltip lua "t('DAMAGE_LABEL')" } text { area 314 97 50 93 tooltip lua "t('NUM_ATTACKS_LABEL')" } label { name 'rginvgold' area 490 699 96 23 text lua "characters[id].gold" text style "normal" align center center text shadow 1 text color '$' opacity 180 } label {area 374 176 66 66 name 'rginvslotback1' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 440 176 66 66 name 'rginvslotback2' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 506 176 66 66 name 'rginvslotback3' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 572 176 66 66 name 'rginvslotback4' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 176 66 66 name 'rginvslotback5' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 374 242 66 66 name 'rginvslotback7' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 374 308 66 66 name 'rginvslotback8' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 374 374 66 66 name 'rginvslotback9' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 374 440 66 66 name 'rginvslotback10' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 374 506 66 66 name 'rginvslotback11' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 374 572 66 66 name 'rginvslotback12' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 242 66 66 name 'rginvslotback14' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 308 66 66 name 'rginvslotback15' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 374 66 66 name 'rginvslotback16' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 440 66 66 name 'rginvslotback17' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 506 66 66 name 'rginvslotback18' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 638 572 66 66 name 'rginvslotback19' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 440 572 66 66 name 'rginvslotback20' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 506 572 66 66 name 'rginvslotback21' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} label {area 572 572 66 66 name 'rginvslotback22' bam "RGDISLOT" enabled "RgInvPaperdolls <= 3" sequence lua "RgUISkin" ScaleToClip} slot {name "slot_inv_1" area 380 182 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.weapon0" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.weapon0.item)" } slot {name "slot_inv_2" area 380 248 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.weapon1" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.weapon1.item)" } slot {name "slot_inv_3" area 380 314 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.weapon2" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.weapon2.item)" } slot {name "slot_inv_4" area 380 380 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.weapon3" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.weapon3.item)" } slot {name "slot_inv_15" area 380 446 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.quiver0" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.quiver0.item)" } slot {name "slot_inv_16" area 380 512 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.quiver1" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.quiver1.item)" } slot {name "slot_inv_17" area 380 578 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.quiver2" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.quiver2.item)" } slot {name "slot_inv_26" area 446 182 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.shield" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.shield.item)" } slot {name "slot_inv_13" area 512 182 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.helmet" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.helmet.item)" } slot {name "slot_inv_11" area 578 182 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.armor" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.armor.item)" } slot {name "slot_inv_24" area 644 182 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.cloak" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.cloak.item)" } slot {name "slot_inv_14" area 644 248 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.amulet" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.amulet.item)" } slot {name "slot_inv_23" area 644 314 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ringright" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.ringright.item)" } slot {name "slot_inv_22" area 644 380 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ringleft" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.ringleft.item)" } slot {name "slot_inv_21" area 644 446 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.belt" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.belt.item)" } slot {name "slot_inv_12" area 644 512 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.gauntlets" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.gauntlets.item)" } slot {name "slot_inv_25" area 644 578 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.boots" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.boots.item)" } slot {name "slot_inv_5" area 446 578 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.personal0" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.personal0.item)" } slot {name "slot_inv_6" area 512 578 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.personal1" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.personal1.item)" } slot {name "slot_inv_7" area 578 578 54 54 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.personal2" actionEnter "rgGetSelectedCharacter() rgGetTempItemCheck(characters[rgInvId].equipment.personal2.item)" } slot {name "slot_inv_30" area 715 218 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group0" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group0.item) " } slot {name "slot_inv_31" area 715 278 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group1" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group1.item) " } slot {name "slot_inv_32" area 715 338 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group2" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group2.item) " } slot {name "slot_inv_33" area 715 398 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group3" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group3.item) " } slot {name "slot_inv_34" area 715 458 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group4" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group4.item) " } slot {name "slot_inv_35" area 715 518 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group5" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group5.item) " } slot {name "slot_inv_36" area 715 578 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group6" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group6.item) " } slot {name "slot_inv_37" area 715 638 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group7" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group7.item) " } slot {name "slot_inv_38" area 955 218 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group8" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group8.item) " } slot {name "slot_inv_39" area 955 278 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group9" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group9.item) " } slot {name "slot_inv_40" area 955 338 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group10" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group10.item)" } slot {name "slot_inv_41" area 955 398 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group11" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group11.item)" } slot {name "slot_inv_42" area 955 458 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group12" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group12.item)" } slot {name "slot_inv_43" area 955 518 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group13" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group13.item)" } slot {name "slot_inv_44" area 955 578 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group14" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group14.item)" } slot {name "slot_inv_45" area 955 638 58 58 bam "RGDSLOT" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[id].equipment.group15" enabled "rgInventoryMode == 1" actionEnter "rgGetTempItemCheck(characters[id].equipment.group15.item)" } text {area 773 218 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group0.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group0') rgGetTempItemCheck(characters[id].equipment.group0.item) " } text {area 773 278 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group1.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group1') rgGetTempItemCheck(characters[id].equipment.group1.item) " } text {area 773 338 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group2.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group2') rgGetTempItemCheck(characters[id].equipment.group2.item) " } text {area 773 398 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group3.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group3') rgGetTempItemCheck(characters[id].equipment.group3.item) " } text {area 773 458 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group4.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group4') rgGetTempItemCheck(characters[id].equipment.group4.item) " } text {area 773 518 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group5.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group5') rgGetTempItemCheck(characters[id].equipment.group5.item) " } text {area 773 578 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group6.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group6') rgGetTempItemCheck(characters[id].equipment.group6.item) " } text {area 773 638 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group7.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group7') rgGetTempItemCheck(characters[id].equipment.group7.item) " } text {area 1013 218 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group8.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group8') rgGetTempItemCheck(characters[id].equipment.group8.item) " } text {area 1013 278 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group9.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group9') rgGetTempItemCheck(characters[id].equipment.group9.item) " } text {area 1013 338 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group10.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group10') rgGetTempItemCheck(characters[id].equipment.group10.item)" } text {area 1013 398 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group11.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group11') rgGetTempItemCheck(characters[id].equipment.group11.item)" } text {area 1013 458 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group12.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group12') rgGetTempItemCheck(characters[id].equipment.group12.item)" } text {area 1013 518 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group13.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group13') rgGetTempItemCheck(characters[id].equipment.group13.item)" } text {area 1013 578 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group14.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group14') rgGetTempItemCheck(characters[id].equipment.group14.item)" } text {area 1013 638 173 58 bam "RGDSLOTD" sequence lua "RgUISkin" ScaleToClip enabled "rgInventoryMode == 1" text lua "characters[id].equipment.group15.item.name" text style "rg_normal_small" text align left center pad 8 0 0 0 ActionEnter "rgGetSlotInfoArea('group15') rgGetTempItemCheck(characters[id].equipment.group15.item)" } slot {name "rgSlotInfo01" area 772 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo02" area 775 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo03" area 778 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo04" area 781 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo05" area 784 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo06" area 787 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo07" area 790 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo08" area 793 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo09" area 796 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo10" area 799 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo11" area 802 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo12" area 805 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo13" area 808 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo14" area 811 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo15" area 814 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo16" area 817 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo17" area 820 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo18" area 823 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo19" area 826 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo20" area 829 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo21" area 832 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo22" area 835 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo23" area 838 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo24" area 841 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo25" area 844 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo26" area 847 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo27" area 850 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo28" area 853 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo29" area 856 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo30" area 859 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo31" area 862 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo32" area 865 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo33" area 868 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo34" area 871 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo35" area 874 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo36" area 877 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo37" area 880 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo38" area 883 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo39" area 886 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo40" area 889 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo41" area 892 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo42" area 895 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo43" area 898 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo44" area 901 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo45" area 904 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo46" area 907 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo47" area 910 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo48" area 913 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo49" area 916 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo50" area 919 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo51" area 922 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo52" area 925 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo53" area 928 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo54" area 931 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo55" area 934 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo56" area 937 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo57" area 940 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rgSlotInfo58" area 943 518 3 58 slotinfo "characters[id].equipment[rgGroupSlotInfo]" enabled "rgInventoryMode == 1" } slot {name "rg_slot1_inv_30" area 789 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group0" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group0.item) " } slot {name "rg_slot1_inv_31" area 789 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group1" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group1.item)" } slot {name "rg_slot1_inv_32" area 838 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group2" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group2.item)" } slot {name "rg_slot1_inv_33" area 838 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group3" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group3.item)" } slot {name "rg_slot1_inv_34" area 887 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group4" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group4.item)" } slot {name "rg_slot1_inv_35" area 887 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group5" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group5.item)" } slot {name "rg_slot1_inv_36" area 936 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group6" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group6.item)" } slot {name "rg_slot1_inv_37" area 936 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group7" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group7.item)" } slot {name "rg_slot1_inv_38" area 985 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group8" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group8.item)" } slot {name "rg_slot1_inv_39" area 985 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group9" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group9.item)" } slot {name "rg_slot1_inv_40" area 1034 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group10" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group10.item)" } slot {name "rg_slot1_inv_41" area 1034 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group11" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group11.item)" } slot {name "rg_slot1_inv_42" area 1083 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group12" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group12.item)" } slot {name "rg_slot1_inv_43" area 1083 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group13" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group13.item)" } slot {name "rg_slot1_inv_44" area 1132 96 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group14" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group14.item)" } slot {name "rg_slot1_inv_45" area 1132 145 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[1]].equipment.group15" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('1') rgGetTempItemCheck(characters[charTable[1]].equipment.group15.item)" } button {name "rg_slot1_invdeath" area 789 96 392 98 enabled "(id == charTable[1] or key_pressed == 1 ) and rgInventoryMode ~= 1 and shouldGreyOutInventory2()" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 actionEnter "rgOnPartyModeHover('1')" action " "} slot {name "rg_slot2_inv_30" area 789 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group0" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group0.item) " } slot {name "rg_slot2_inv_31" area 789 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group1" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group1.item) " } slot {name "rg_slot2_inv_32" area 838 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group2" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group2.item) " } slot {name "rg_slot2_inv_33" area 838 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group3" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group3.item) " } slot {name "rg_slot2_inv_34" area 887 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group4" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group4.item) " } slot {name "rg_slot2_inv_35" area 887 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group5" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group5.item) " } slot {name "rg_slot2_inv_36" area 936 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group6" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group6.item) " } slot {name "rg_slot2_inv_37" area 936 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group7" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group7.item) " } slot {name "rg_slot2_inv_38" area 985 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group8" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group8.item) " } slot {name "rg_slot2_inv_39" area 985 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group9" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group9.item) " } slot {name "rg_slot2_inv_40" area 1034 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group10" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group10.item)" } slot {name "rg_slot2_inv_41" area 1034 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group11" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group11.item)" } slot {name "rg_slot2_inv_42" area 1083 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group12" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group12.item)" } slot {name "rg_slot2_inv_43" area 1083 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group13" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group13.item)" } slot {name "rg_slot2_inv_44" area 1132 202 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group14" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group14.item)" } slot {name "rg_slot2_inv_45" area 1132 251 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[2]].equipment.group15" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('2') rgGetTempItemCheck(characters[charTable[2]].equipment.group15.item)" } button {name "rg_slot2_invdeath" area 789 202 392 98 enabled "(id == charTable[2] or key_pressed == 2 ) and rgInventoryMode ~= 1 and shouldGreyOutInventory2()" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 actionEnter "rgOnPartyModeHover('2')" action " "} slot {name "rg_slot3_inv_30" area 789 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group0" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group0.item) " } slot {name "rg_slot3_inv_31" area 789 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group1" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group1.item) " } slot {name "rg_slot3_inv_32" area 838 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group2" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group2.item) " } slot {name "rg_slot3_inv_33" area 838 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group3" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group3.item) " } slot {name "rg_slot3_inv_34" area 887 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group4" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group4.item) " } slot {name "rg_slot3_inv_35" area 887 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group5" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group5.item) " } slot {name "rg_slot3_inv_36" area 936 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group6" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group6.item) " } slot {name "rg_slot3_inv_37" area 936 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group7" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group7.item) " } slot {name "rg_slot3_inv_38" area 985 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group8" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group8.item) " } slot {name "rg_slot3_inv_39" area 985 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group9" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group9.item) " } slot {name "rg_slot3_inv_40" area 1034 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group10" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group10.item)" } slot {name "rg_slot3_inv_41" area 1034 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group11" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group11.item)" } slot {name "rg_slot3_inv_42" area 1083 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group12" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group12.item)" } slot {name "rg_slot3_inv_43" area 1083 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group13" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group13.item)" } slot {name "rg_slot3_inv_44" area 1132 308 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group14" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group14.item)" } slot {name "rg_slot3_inv_45" area 1132 357 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[3]].equipment.group15" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('3') rgGetTempItemCheck(characters[charTable[3]].equipment.group15.item)" } button {name "rg_slot3_invdeath" area 789 308 392 98 enabled "(id == charTable[3] or key_pressed == 3 ) and rgInventoryMode ~= 1 and shouldGreyOutInventory2()" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 actionEnter "rgOnPartyModeHover('3')" action " "} slot {name "rg_slot4_inv_30" area 789 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group0" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group0.item) " } slot {name "rg_slot4_inv_31" area 789 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group1" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group1.item) " } slot {name "rg_slot4_inv_32" area 838 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group2" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group2.item) " } slot {name "rg_slot4_inv_33" area 838 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group3" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group3.item) " } slot {name "rg_slot4_inv_34" area 887 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group4" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group4.item) " } slot {name "rg_slot4_inv_35" area 887 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group5" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group5.item) " } slot {name "rg_slot4_inv_36" area 936 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group6" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group6.item) " } slot {name "rg_slot4_inv_37" area 936 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group7" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group7.item) " } slot {name "rg_slot4_inv_38" area 985 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group8" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group8.item) " } slot {name "rg_slot4_inv_39" area 985 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group9" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group9.item) " } slot {name "rg_slot4_inv_40" area 1034 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group10" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group10.item)" } slot {name "rg_slot4_inv_41" area 1034 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group11" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group11.item)" } slot {name "rg_slot4_inv_42" area 1083 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group12" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group12.item)" } slot {name "rg_slot4_inv_43" area 1083 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group13" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group13.item)" } slot {name "rg_slot4_inv_44" area 1132 414 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group14" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group14.item)" } slot {name "rg_slot4_inv_45" area 1132 463 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[4]].equipment.group15" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('4') rgGetTempItemCheck(characters[charTable[4]].equipment.group15.item)" } button {name "rg_slot4_invdeath" area 789 414 392 98 enabled "(id == charTable[4] or key_pressed == 4 ) and rgInventoryMode ~= 1 and shouldGreyOutInventory2()" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 actionEnter "rgOnPartyModeHover('4')" action " "} slot {name "rg_slot5_inv_30" area 789 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group0" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group0.item) " } slot {name "rg_slot5_inv_31" area 789 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group1" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group1.item) " } slot {name "rg_slot5_inv_32" area 838 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group2" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group2.item) " } slot {name "rg_slot5_inv_33" area 838 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group3" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group3.item) " } slot {name "rg_slot5_inv_34" area 887 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group4" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group4.item) " } slot {name "rg_slot5_inv_35" area 887 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group5" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group5.item) " } slot {name "rg_slot5_inv_36" area 936 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group6" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group6.item) " } slot {name "rg_slot5_inv_37" area 936 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group7" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group7.item) " } slot {name "rg_slot5_inv_38" area 985 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group8" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group8.item) " } slot {name "rg_slot5_inv_39" area 985 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group9" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group9.item) " } slot {name "rg_slot5_inv_40" area 1034 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group10" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group10.item)" } slot {name "rg_slot5_inv_41" area 1034 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group11" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group11.item)" } slot {name "rg_slot5_inv_42" area 1083 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group12" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group12.item)" } slot {name "rg_slot5_inv_43" area 1083 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group13" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group13.item)" } slot {name "rg_slot5_inv_44" area 1132 520 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group14" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group14.item)" } slot {name "rg_slot5_inv_45" area 1132 569 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[5]].equipment.group15" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('5') rgGetTempItemCheck(characters[charTable[5]].equipment.group15.item)" } button {name "rg_slot5_invdeath" area 789 520 392 98 enabled "(id == charTable[5] or key_pressed == 5 ) and rgInventoryMode ~= 1 and shouldGreyOutInventory2()" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 actionEnter "rgOnPartyModeHover('5')" action " "} slot {name "rg_slot6_inv_30" area 789 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group0" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group0.item) " } slot {name "rg_slot6_inv_31" area 789 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group1" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group1.item) " } slot {name "rg_slot6_inv_32" area 838 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group2" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group2.item) " } slot {name "rg_slot6_inv_33" area 838 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group3" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group3.item) " } slot {name "rg_slot6_inv_34" area 887 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group4" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group4.item) " } slot {name "rg_slot6_inv_35" area 887 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group5" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group5.item) " } slot {name "rg_slot6_inv_36" area 936 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group6" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group6.item) " } slot {name "rg_slot6_inv_37" area 936 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group7" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group7.item) " } slot {name "rg_slot6_inv_38" area 985 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group8" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group8.item) " } slot {name "rg_slot6_inv_39" area 985 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group9" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group9.item) " } slot {name "rg_slot6_inv_40" area 1034 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group10" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group10.item)" } slot {name "rg_slot6_inv_41" area 1034 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group11" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group11.item)" } slot {name "rg_slot6_inv_42" area 1083 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group12" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group12.item)" } slot {name "rg_slot6_inv_43" area 1083 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group13" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group13.item)" } slot {name "rg_slot6_inv_44" area 1132 626 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group14" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group14.item)" } slot {name "rg_slot6_inv_45" area 1132 675 49 49 bam lua "rgGetInvSlot()" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[charTable[6]].equipment.group15" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode ~= 1" actionEnter "rgOnPartyModeHover('6') rgGetTempItemCheck(characters[charTable[6]].equipment.group15.item)" } button {name "rg_slot6_invdeath" area 789 626 392 98 enabled "(id == charTable[6] or key_pressed == 6 ) and rgInventoryMode ~= 1 and shouldGreyOutInventory2()" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 actionEnter "rgOnPartyModeHover('6')" action " "} button { area 419 672 13 24 bam RGDICPA ScaleToClip frame lua "characters[rgInvId].colors.major" opacity 150 } button { area 432 672 11 24 bam RGDICPA ScaleToClip frame lua "characters[rgInvId].colors.minor" opacity 150 } button { area 419 672 24 24 bam RGDICLR2 ScaleToClip --opacity 150 action " Infinity_PushMenu('CHARACTER_COLOR', 0, 0) " } label { name 'rginvgroundlabel' area 1200 100 69 22 text "GROUND_LABEL" text style "normal" align center center text color 'X' } label { area 1196 710 60 26 name 'rginvgroundnumber' text lua "Infinity_GetCurrentGroundPage()+1 .. '/' .. Infinity_GetMaxGroundPage()+1" text style "normal" text color 'X' align center center enabled "isGroundScrollbarEnabled()" } label {area 1202 131 69 69 name 'rginvgroud1' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 203 69 69 name 'rginvgroud2' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 275 69 69 name 'rginvgroud3' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 347 69 69 name 'rginvgroud4' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 419 69 69 name 'rginvgroud5' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 491 69 69 name 'rginvgroud6' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 563 69 69 name 'rginvgroud7' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} label {area 1202 635 69 69 name 'rginvgroud8' bam "RGDISLOT" sequence lua "RgUISkin" ScaleToClip} list { column { width 100 label { area 0,0,928,-1 } } name 'rginvfakegroudlist1' area 1200 124 69 580 rowheight 220 hidehighlight table "fakeItemList" var currentFakePage scrollbar func "scrollGroundItemsFunction" scrollbar respectConstraints actionScroll "scrollGroundItems()" enabled "isGroundScrollbarEnabled()" } slot {name "slot_inv_68" area 1209 138 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground0" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_69" area 1209 210 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground1" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_70" area 1209 282 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground2" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_71" area 1209 354 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground3" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_72" area 1209 426 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground4" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_73" area 1209 498 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground5" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_74" area 1209 570 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground6" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} slot {name "slot_inv_75" area 1209 642 54 54 bam "RGDSLOT2" sequence lua "RgUISkin" ScaleToClip slotinfo "characters[rgInvId].equipment.ground7" actionScroll "scrollGroundItems()" actionEnter "rgGetSelectedCharacter()"} list { column { width 100 label { area 0,0,928,-1 } } name 'rginvfakegroudlist2' area 1181 124 19 580 rowheight 220 hidehighlight table "fakeItemList" var currentFakePage scrollbar 'rgdscrl1' scrollbar func "scrollGroundItemsFunction" scrollbar respectConstraints actionScroll "scrollGroundItems()" enabled "isGroundScrollbarEnabled()" } label --this has to be last so it draws over top of everything. { name 'rginvdeath' area 75 89 636 658 enabled "shouldGreyOutInventory2() and rgInventoryMode == 0 and id == rgInvId" bam "rgdidea" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 --fill 1 1 1 150 } label { area 65 89 1236 658 enabled "shouldGreyOutInventory() and rgInventoryMode == 1" bam "rgdidea1" sequence lua "rgIsDeadOrDisabled()" ScaleToClip opacity 200 --fill 1 1 1 150 } label { area 789 96 392 98 enabled "rgShouldGreyOutInventory(charTable[1]) and rgInventoryMode == 0" fill 1 1 1 150 } label { area 789 202 392 98 enabled "rgShouldGreyOutInventory(charTable[2]) and rgInventoryMode == 0" fill 1 1 1 150 } label { area 789 308 392 98 enabled "rgShouldGreyOutInventory(charTable[3]) and rgInventoryMode == 0" fill 1 1 1 150 } label { area 789 414 392 98 enabled "rgShouldGreyOutInventory(charTable[4]) and rgInventoryMode == 0" fill 1 1 1 150 } label { area 789 520 392 98 enabled "rgShouldGreyOutInventory(charTable[5]) and rgInventoryMode == 0" fill 1 1 1 150 } label { area 789 626 392 98 enabled "rgShouldGreyOutInventory(charTable[6]) and rgInventoryMode == 0" fill 1 1 1 150 } button { name "rginvPortrait0" area 715 105 71 98 portrait 0 bam rgdport5 sequence lua "RgUISkin" ScaleToClip frame lua "rgGetInvPortSelected(1)" enabled "Infinity_GetNumCharacters() > 0 and rgInventoryMode == 1" action "Infinity_OnPortraitLClick(0); rgInvId = id; rgInvChar = '1'" actionAlt "Infinity_OnPortraitRClick(0)" actionDbl "Infinity_OnPortraitDblClick(0); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(0)" clickable lua "sidebarsGreyed ~= 1" } button { name "rginvPortrait1" area 795 105 71 98 portrait 1 bam rgdport5 sequence lua "RgUISkin" ScaleToClip frame lua "rgGetInvPortSelected(2)" enabled "Infinity_GetNumCharacters() > 1 and rgInventoryMode == 1" action "Infinity_OnPortraitLClick(1); rgInvId = id; rgInvChar = '2'" actionAlt "Infinity_OnPortraitRClick(1)" actionDbl "Infinity_OnPortraitDblClick(1); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(1)" clickable lua "sidebarsGreyed ~= 1" } button { name "rginvPortrait2" name "rginvPortrait2" area 875 105 71 98 portrait 2 bam rgdport5 sequence lua "RgUISkin" ScaleToClip frame lua "rgGetInvPortSelected(3)" enabled "Infinity_GetNumCharacters() > 2 and rgInventoryMode == 1" action "Infinity_OnPortraitLClick(2); rgInvId = id; rgInvChar = '3'" actionAlt "Infinity_OnPortraitRClick(2)" actionDbl "Infinity_OnPortraitDblClick(2); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(2)" clickable lua "sidebarsGreyed ~= 1" } button { name "rginvPortrait3" area 955 105 71 98 portrait 3 bam rgdport5 sequence lua "RgUISkin" ScaleToClip frame lua "rgGetInvPortSelected(4)" enabled "Infinity_GetNumCharacters() > 3 and rgInventoryMode == 1" action "Infinity_OnPortraitLClick(3); rgInvId = id; rgInvChar = '4'" actionAlt "Infinity_OnPortraitRClick(3)" actionDbl "Infinity_OnPortraitDblClick(3); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(3)" clickable lua "sidebarsGreyed ~= 1" } button { name "rginvPortrait4" area 1035 105 71 98 portrait 4 bam rgdport5 sequence lua "RgUISkin" ScaleToClip frame lua "rgGetInvPortSelected(5)" enabled "Infinity_GetNumCharacters() > 4 and rgInventoryMode == 1" action "Infinity_OnPortraitLClick(4); rgInvId = id; rgInvChar = '5'" actionAlt "Infinity_OnPortraitRClick(4)" actionDbl "Infinity_OnPortraitDblClick(4); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(4)" clickable lua "sidebarsGreyed ~= 1" } button { name "rginvPortrait5" area 1115 105 71 98 portrait 5 bam rgdport5 sequence lua "RgUISkin" ScaleToClip frame lua "rgGetInvPortSelected(6)" enabled "Infinity_GetNumCharacters() > 5 and rgInventoryMode == 1" action "Infinity_OnPortraitLClick(5); rgInvId = id; rgInvChar = '6'" actionAlt "Infinity_OnPortraitRClick(5)" actionDbl "Infinity_OnPortraitDblClick(5); rgInvId = id" actiondrag "Infinity_SwapWithPortrait(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(5)" clickable lua "sidebarsGreyed ~= 1" } } ` SLIDER_color_hair_start = 1 SLIDER_color_skin_start = 1 SLIDER_color_major_start = 1 SLIDER_color_minor_start = 1 SLIDER_color_hair = 1 SLIDER_color_skin = 1 SLIDER_color_major = 1 SLIDER_color_minor = 1 function rgGetAppearanceBackground() if e:GetActiveEngine() == createCharScreen then return 'rgdbccg2' else return 'rgdbcres' end end ` menu { name 'CHARACTER_COLOR' align center center ignoreesc modal onOpen " if e:GetActiveEngine() == createCharScreen then Infinity_SetArea('rgColorMenu1', 378, nil, nil,nil) Infinity_SetArea('rgColorMenu2', 496, nil, nil,nil) Infinity_SetArea('rgColorMenu3', 854, nil, nil,nil) Infinity_SetArea('rgColorMenu4', 854, nil, nil,nil) Infinity_SetArea('rgColorMenu5', 854, nil, nil,nil) Infinity_SetArea('rgColorMenu6', 854, nil, nil,nil) Infinity_SetArea('rgColorMenu7', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu8', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu9', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu10', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu11', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu12', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu13', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu14', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu15', 100, nil, nil,nil) Infinity_SetArea('rgColorMenu16', 100, nil, nil,nil) Infinity_SetArea('rgColorButtCanc', 316,661,320,70) Infinity_SetArea('rgColorButtDone', 732,661,320,70) else Infinity_SetArea('rgColorMenu1', 678, nil, nil,nil) Infinity_SetArea('rgColorMenu2', 796, nil, nil,nil) Infinity_SetArea('rgColorMenu3', 1154, nil, nil,nil) Infinity_SetArea('rgColorMenu4', 1154, nil, nil,nil) Infinity_SetArea('rgColorMenu5', 1154, nil, nil,nil) Infinity_SetArea('rgColorMenu6', 1154, nil, nil,nil) Infinity_SetArea('rgColorMenu7', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu8', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu9', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu10', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu11', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu12', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu13', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu14', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu15', 400, nil, nil,nil) Infinity_SetArea('rgColorMenu16', 400, nil, nil,nil) Infinity_SetArea('rgColorButtCanc', 370,660,448,70) Infinity_SetArea('rgColorButtDone', 818,660,448,70) end if (rgCharSoundCancel == 1) then rgCharSoundCancel = 0 Infinity_PopMenu('CHARACTER_COLOR',0,0) end Infinity_UpdateLuaStats() SLIDER_color_hair = characters[id].colors.hair SLIDER_color_skin = characters[id].colors.skin SLIDER_color_major = characters[id].colors.major SLIDER_color_minor = characters[id].colors.minor SLIDER_color_hair_start = SLIDER_color_hair SLIDER_color_skin_start = SLIDER_color_skin SLIDER_color_major_start = SLIDER_color_major SLIDER_color_minor_start = SLIDER_color_minor rgCustomSound = 1 currentChargenCustomSound = 1 " onClose " if(SLIDER_color_hair_start ~= -1) then Infinity_SetHairColor(SLIDER_color_hair_start) end if(SLIDER_color_skin_start ~= -1) then Infinity_SetSkinColor(SLIDER_color_skin_start) end if(SLIDER_color_major_start ~= -1) then Infinity_SetMajorColor(SLIDER_color_major_start) end if(SLIDER_color_minor_start ~= -1) then Infinity_SetMinorColor(SLIDER_color_minor_start) end " label { area 0 0 768 768 bam lua "rgGetAppearanceBackground()" frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam lua "rgGetAppearanceBackground()" frame 1 sequence lua "RgUISkin" scaleToClip } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 108 108 210 331 bitmap lua "characters[id].portrait" } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam 'rgdport7' sequence lua "RgUISkin" scaleToClip } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 102 450 222 50 text lua "rgString('APPEARANCE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('CHARACTER_COLOR',0,0) characterScreen:OnAppearanceButtonClick() " } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 102 504 222 50 text lua "rgString('SOUNDS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('CHARACTER_COLOR',0,0) characterScreen:OnSoundsButtonClick() " } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 102 558 222 50 text lua "rgString('COLORS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" frame 2 ScaleToClip action " Infinity_PopMenu('CHARACTER_COLOR',0,0) characterScreen:OnHairSkinButtonClick() " } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 102 612 222 50 text lua "rgString('SCRIPT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('CHARACTER_COLOR',0,0) characterScreen:OnScriptButtonClick() " } button { enabled "e:GetActiveEngine() ~= createCharScreen" area 102 666 222 50 text lua "rgString('BIOGRAPHY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('CHARACTER_COLOR',0,0) characterScreen:OnCusomizeBiographyButtonClick() " } label { area 480 32 405 52 text lua "rgString('APPEARANCE_LABEL')" text style 'rg_trajan' text color '$' align center center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenCustomSound)" ScaleToClip text lua "getSoundStringRef(rowNumber, chargen.customSound)" text style "normal_parchment" pad 8 0 0 0 } } area 926 146 338 440 hideHighlight enabled "e:GetActiveEngine() == createCharScreen" rowheight 30 table "chargen.customSound" var "currentChargenCustomSound" scrollbar 'rgdscrl1' action " rgCustomSound = currentChargenCustomSound createCharScreen:OnSoundItemSelect(chargen.customSound[currentChargenCustomSound].index-1) " } label { enabled "e:GetActiveEngine() == createCharScreen" area 926 108 318 38 text "SOUND_TITLE" text style 'normal_parchment' text align center top text upper } button { enabled "e:GetActiveEngine() == createCharScreen" area 978 590 230 52 bam rgdwbut1 text "PLAY_SOUND_BUTTON" text style "button" text color '5' scaleToClip action "createCharScreen:OnPlayButtonClick()" } button { name "rgColorMenu1" area 378 140 114 160 paperdoll 0 } button { name "rgColorMenu2" area 496 140 114 160 paperdoll 1 } label { name "rgColorMenu3" enabled "characters[id].PC == 1" area 854 332 42 42 colordisplay 6 } label { name "rgColorMenu4" enabled "characters[id].PC == 1" area 854 408 42 42 colordisplay 3 } label { name "rgColorMenu5" area 854 524 42 42 colordisplay 2 } label { name "rgColorMenu6" area 854 598 42 42 colordisplay 1 } label { name "rgColorMenu7" area 100 100 792 28 text "COLOR_CHOICES_TITLE" text style "button" text point 14 } label { name "rgColorMenu8" enabled "characters[id].PC == 1" area 100 300 792 30 text "HAIR_LABEL" text style "normal" } slider { name "rgColorMenu9" palette 6 enabled "characters[id].PC == 1" area 100 330 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_hair" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(6)" action " Infinity_SetHairColor(SLIDER_color_hair) " } label { name "rgColorMenu10" enabled "characters[id].PC == 1" area 100 374 792 32 text "SKIN_LABEL" text style "normal" } slider { name "rgColorMenu11" palette 3 enabled "characters[id].PC == 1" area 100 406 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_skin" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(3)" action " Infinity_SetSkinColor(SLIDER_color_skin) " } label { name "rgColorMenu12" area 100 462 792 28 text "CLOTHING_LABEL" text style "button" text point 14 } label { name "rgColorMenu13" area 100 490 792 32 text "MAJOR_LABEL" text style "normal" } slider { name "rgColorMenu14" palette 2 area 100 522 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_major" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(2)" action " Infinity_SetMajorColor(SLIDER_color_major) " } label { name "rgColorMenu15" area 100 566 792 32 text "MINOR_LABEL" align center center text style "normal" } slider { name "rgColorMenu16" palette 1 area 100 598 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_minor" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(1)" action " Infinity_SetMinorColor(SLIDER_color_minor) " } button { name "rgColorButtCanc" on escape area 316 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "CANCEL_BUTTON" text style "button" action " Infinity_PopMenu('CHARACTER_COLOR',0,0) " } button { name "rgColorButtDone" on return area 732 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" action " --save settings SLIDER_color_hair_start = SLIDER_color_hair SLIDER_color_skin_start = SLIDER_color_skin SLIDER_color_major_start = SLIDER_color_major SLIDER_color_minor_start = SLIDER_color_minor if (e:GetActiveEngine() == createCharScreen) then createCharScreen:OnDoneButtonClick() createCharScreen:OnDoneButtonClick() end Infinity_PopMenu('CHARACTER_COLOR',0,0) " } } menu { name 'WORLD_LEVEL_UP_BUTTONS' align right top offset -65 0 ignoreesc enabled "0" --disable this menu for now. button { enabled "Infinity_CanLevelUp(0)" bam GUIOSW area 0 14 44 44 sequence 0 action "Infinity_ActivateRecord(0)" pulse 1 } button { enabled "Infinity_CanLevelUp(1)" bam GUIOSW area 0 106 44 44 sequence 0 action "Infinity_ActivateRecord(1)" pulse 1 } button { enabled "Infinity_CanLevelUp(2)" bam GUIOSW area 0 198 44 44 sequence 0 action "Infinity_ActivateRecord(2)" pulse 1 } button { enabled "Infinity_CanLevelUp(3)" bam GUIOSW area 0 290 44 44 sequence 0 action "Infinity_ActivateRecord(3)" pulse 1 } button { enabled "Infinity_CanLevelUp(4)" bam GUIOSW area 0 382 44 44 sequence 0 action "Infinity_ActivateRecord(4)" pulse 1 } button { enabled "Infinity_CanLevelUp(5)" bam GUIOSW area 0 474 44 44 sequence 0 action "Infinity_ActivateRecord(5)" pulse 1 } } ` function rgGetPopupArea() local rgJHeight = Infinity_GetContentHeight(styles.normal.font, 622, getBodyString(), styles.normal.point, 1, styles.normal.useFontZoom) Infinity_SetArea('rgJournalPopupBackground', nil, nil, nil, (rgJHeight+50)) Infinity_SetArea('rgJournalPopupButton', nil, nil, nil, (rgJHeight+50)) Infinity_SetArea('rgJournalPopupText', nil, nil, nil, (rgJHeight)) end ` menu { name 'textflash' opacity lua 'getOpacityForInfoBlock(1000)' enabled 'getOpacityForInfoBlock(1000) ~= 0' align center top offset 0 10 label { name "rgJournalPopupBackground" area 0 0 650 158 rectangle 0 rectangle opacity 200 } label { area 0 0 0 0 text lua "rgGetPopupArea()" } label { area 20 14 500 26 text lua "getSubtitleString()" --getTitleString() .. ': ' .. text style "rg_trajan" text align left center text point 14 text color C } text { name "rgJournalPopupText" area 20 40 622 108 text lua "getBodyString()" text style "normal" text align left top text point 10 scrollbar 'rgdscrl1' scrollbar hide lua "1" } button { name "rgJournalPopupButton" area 0 0 650 158 action " FindTitle = getSubtitleString() IwdQuest = getBodyString() if(sidebarsGreyed ~= 1) then if rgGameEngine == 3 then --iwd rgCloseAll() rgFindQuestPopUpIwd() e:GetActiveEngine():OnLeftPanelButtonClick(2) elseif rgGameEngine ~= 3 then rgCloseAll() findQuestPopUp() if(showJournal == 1 and rgLargeJournal == 0) then Infinity_PopMenu('JOURNAL') end e:GetActiveEngine():OnLeftPanelButtonClick(2) end local tf = next(textflashes) setSelectedQuest(textflashes[tf][5]) CheckForOpenedQuests_Small() end " } button { area 600 4 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip on esc action " --end the animation local tf = next(textflashes) textflashes[tf] = nil " } } ` luaEdit = "" luaEditDebugDump = 0 luaEditHistory = {} luaEditMaxHistory = 10 luaEditHistoryIndex = 0 luaEditShowHistoryList = 0 luaEditHistoryListSelected = 0 function findQuestPopUp() FindTitle = string.sub(FindTitle,1,15) for i=1,#questDisplay,1 do local rowTab = questDisplay[i] local text = Infinity_FetchString(rowTab.text) if string.find(string.lower(text), string.lower(FindTitle)) then questDisplay[i].expanded = 1 questDisplay[i+1].expanded = 1 QFilter = 3 if (questDisplay[i].stateType ~= const.ENTRY_TYPE_COMPLETE) then rgIsCurrentQuests = 1 else rgIsCurrentQuests = 0 end end end end function rgFindQuestPopUpIwd() for i=1,#questDisplay,1 do local rowTab = questDisplay[i] if rowTab.text == IwdQuest then local p = questDisplay[rowTab.parent].parent questDisplay[p].expanded = 1 break end end end function rgCloseAll() for i=1,#questDisplay,1 do if questDisplay[i].expanded == 1 then questDisplay[i].expanded = nil end end end function CheckForOpenedQuests_Small() QuestOpen = 0 for i=1,#questDisplay,1 do if questDisplay[i].expanded == 1 then QuestOpen = 1 end end end function updateLuaHistory() local i = 2 local tempTab = {} tempTab[1] = luaEdit while ( i <= luaEditMaxHistory ) do tempTab[i] = luaEditHistory[i-1] i = i + 1 end luaEditHistory = tempTab end function loadLuaHistory() local i = 1 while (i <= luaEditMaxHistory ) do luaEditHistory[i] = Infinity_GetINIString("Lua Edit","String"..i-1, "") i = i + 1 end end function saveLuaHistory() local i = 1 while (i <= luaEditMaxHistory ) do Infinity_SetINIValue("Lua Edit","String"..i-1, luaEditHistory[i]) i = i + 1 end end function luaEditHistoryUp() if(luaEditHistoryIndex <= 1) then return end luaEditHistoryIndex = luaEditHistoryIndex - 1 luaEdit = luaEditHistory[luaEditHistoryIndex] end function luaEditHistoryDown() if(luaEditHistoryIndex == luaEditMaxHistory) then return end if(luaEditHistory[luaEditHistoryIndex + 1] == "") then return end luaEditHistoryIndex = luaEditHistoryIndex + 1 luaEdit = luaEditHistory[luaEditHistoryIndex] end function rgGetCheatLists() local out = {} for i = 1,#keybindings[5] do local a = keybindings[5][i][3] local b = keybindings[5][i][4] table.insert(out, {a,b}) end for i = 1,#keybindings[6] do local a = keybindings[6][i][3] local b = keybindings[6][i][4] table.insert(out, {a,b}) end rgCheatSpells = out local out1 = {} table.insert(out1, 'C:CreateCreature("gnollsu")') table.insert(out1, 'C:CreateItem("scrl75")') rgLuaEditMisc = out1 end function rgGetCheatSpellCode(spell) local out = '' out = 'C:AddSpell("' .. spell .. '")' return out end function rgCheatMapContainsSearchString(rowNumber) if(rgCheatAreaFilterVar == nil or rgCheatAreaFilterVar == "") then return 1 end if(string.find(string.lower(cheatAreaDisplayList[rowNumber][2]),string.lower(rgCheatAreaFilterVar))) then return 1 else return 0 end end function rgCheatSpellContainsSearchString(rowNumber) if(rgCheatSpellFilterVar == nil or rgCheatSpellFilterVar == "") then return 1 end if(string.find(string.lower(Infinity_FetchString(rgCheatSpells[rowNumber][2])),string.lower(rgCheatSpellFilterVar))) then return 1 else return 0 end end cheatGoldAmt = 1000000 cheatXpAmt = 500000 rgCheatAreaFilterVar = "" rgCheatSpellFilterVar = "" cheatAreaDisplayList = {} rgCheatSection = 1 rgCheatSpells = {} rgLuaEditMisc = {} ` menu { name 'cheatMenu' ignoreEsc align left top onOpen " if rgGameEngine == 0 then --bg1 if game:GetMissionPackInfo() then cheatAreaDisplayList = cheatAreasTutorial elseif game:GetMissionPackInfoTBP() then cheatAreaDisplayList = cheatAreasArena else cheatAreaDisplayList = cheatAreas end elseif rgGameEngine == 1 then --sod if game:GetMissionPackInfo() then cheatAreaDisplayList = cheatAreasTutorial elseif game:GetMissionPackInfoTBP() then cheatAreaDisplayList = cheatAreasArena elseif startEngine:GetCampaign() == 3 then cheatAreaDisplayList = cheatAreasExpansion else cheatAreaDisplayList = cheatAreas end elseif rgGameEngine == 2 then --bg2 if game:GetMissionPackInfo() then cheatAreaDisplayList = cheatAreasTutorial elseif game:GetMissionPackInfoTBP() then cheatAreaDisplayList = cheatAreasArena elseif game:GetMissionPackInfo25() then cheatAreaDisplayList = cheatAreasExpansion else cheatAreaDisplayList = cheatAreas end elseif rgGameEngine == 3 then --iwd if game:GetMissionPackInfo25() then cheatAreaDisplayList = cheatAreasHoW else cheatAreaDisplayList = cheatAreas end elseif rgGameEngine == 4 then --eet if startCampaignData[currentCampaign].cheatAreasTable ~= nil then cheatAreaDisplayList = startCampaignData[currentCampaign].cheatAreasTable else cheatAreaDisplayList = cheatAreas end end w, h = Infinity_GetScreenSize() if RgIsModernHud == 0 then Infinity_SetArea('rgCheatButtonLearnSpell', w-80, 10, 65, 100 * Infinity_GetNumCharacters()) --78 118 65 95 100 82 Infinity_GetNumCharacters() > 2 else Infinity_SetArea('rgCheatButtonLearnSpell', 2, h-118, 82 * Infinity_GetNumCharacters(), 118 ) end " label { area 10 20 420 600 mosaic lua "'rgdjbox' .. RgUISkin" } label { bam 'RGDJSHN1' sequence lua "RgUISkin" ScaleToClip area 0 0 440 75 } label { area 0 610 440 30 bam 'RGDJSHND' sequence lua "RgUISkin" frame 1 ScaleToClip } button { area 30 15 50 45 --text lua "rgString('maps')" --text style "button" --bam RGDSBUT2 bam lua "rgGetActionbarButtonBam()" --sequence lua "RgUISkin" sequence 0 ScaleToClip highlightgroup rgcheatsection action "rgCheatSection = 1" } button { area 90 15 50 45 bam lua "rgGetActionbarButtonBam()" sequence 4 ScaleToClip highlightgroup rgcheatsection tooltip lua "getUiString('SPELLS_LABEL')" action "rgCheatSection = 3" } button { area 150 15 50 45 bam lua "rgGetActionbarButtonBam()" sequence 6 ScaleToClip highlightgroup rgcheatsection tooltip lua "getUiString('RG_CHEATHISTORY')" action "rgCheatSection = 2" } list { column { width 100 label { enabled "rgCheatMapContainsSearchString(rowNumber)" area 0 0 -1 20 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, cheatTeleportArea)" ScaleToClip } label { enabled "rgCheatMapContainsSearchString(rowNumber)" area 10 0 100 20 text lua "cheatAreaDisplayList[rowNumber][1]" text style "normal" text align left center } label { enabled "rgCheatMapContainsSearchString(rowNumber)" area 75 0 -1 20 text lua "cheatAreaDisplayList[rowNumber][2]" text style "normal" text align left center } } enabled "rgCheatSection == 1" area 20 75 400 275 hidehighlight rowheight dynamic table "cheatAreaDisplayList" var cheatTeleportArea scrollbar 'rgdscrl1' } label { enabled "rgCheatSection == 1 or rgCheatSection == 3" bam 'rgdsrch1' sequence lua "RgUISkin" ScaleToClip area 24 356 392 40 } edit { enabled "rgCheatSection == 1" area 65 364 310 24 var rgCheatAreaFilterVar text style "edit" maxlines 1 fill 112 111 111 64 --action "rgCheatSpells = rgGetCheatSpells()" } button { enabled "rgCheatSection == 1" area 375 364 24 24 bam 'rgdbin1' scaleToClip opacity 60 fill 112 111 111 64 action "rgCheatAreaFilterVar = ''" } button { enabled "rgCheatSection == 1" bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 15 396 410 60 text lua "rgString('TRAVEL_BUTTON')" text style "button" pad 0 0 0 0 action "C:MoveToArea(cheatAreaDisplayList[cheatTeleportArea][1])" } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, luaEditHistoryListSelected)" ScaleToClip } label { area 10 0 -1 -1 text lua "luaEditHistory[rowNumber]" text style "normal" } } hideHighlight enabled "rgCheatSection == 2" area 20 75 400 240 rowheight 24 var luaEditHistoryListSelected table "luaEditHistory" scrollbar 'rgdscrl1' action " rgLuaEditMiscListSelected = nil luaEdit = luaEditHistory[luaEditHistoryListSelected] Infinity_FocusTextEdit('luaEditArea'); " } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, rgLuaEditMiscListSelected)" ScaleToClip } label { area 10 0 -1 -1 text lua "rgLuaEditMisc[rowNumber]" text style "normal" } } hideHighlight enabled "rgCheatSection == 2" area 20 330 400 48 rowheight 24 var rgLuaEditMiscListSelected table "rgLuaEditMisc" scrollbar 'rgdscrl1' action " luaEditHistoryListSelected = nil luaEdit = rgLuaEditMisc[rgLuaEditMiscListSelected] Infinity_FocusTextEdit('luaEditArea'); " } list { column { width 100 label { enabled "rgCheatSpellContainsSearchString(rowNumber)" area 0 0 -1 24 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, cheatSpell)" ScaleToClip } label { enabled "rgCheatSpellContainsSearchString(rowNumber)" area 10 0 90 24 --text lua "getHotkeyName(5,rowNumber)" --text lua "Infinity_FetchString(keybindings[5][rowNumber][4])" --text lua "keybindings[5][rowNumber][3]" text lua "rgCheatSpells[rowNumber][1]" text style "normal" align left center } label { enabled "rgCheatSpellContainsSearchString(rowNumber)" area 100 0 -1 24 text lua "Infinity_FetchString(rgCheatSpells[rowNumber][2])" text style "normal" align left center } } hideHighlight enabled "rgCheatSection == 3" area 20 75 400 275 rowheight dynamic --table "keybindings[5]" table "rgCheatSpells" var cheatSpell scrollbar 'rgdscrl1' --action "C:AddSpell(rgCheatSpells[cheatSpell][1])" action " --luaEdit = rgGetCheatSpellCode(rgCheatSpells[cheatSpell][1]) --Infinity_FocusTextEdit('luaEditArea'); " } edit { enabled "rgCheatSection == 3" area 65 364 310 24 var rgCheatSpellFilterVar text style "edit" maxlines 1 fill 112 111 111 64 } button { enabled "rgCheatSection == 3" area 375 364 24 24 bam 'rgdbin1' scaleToClip opacity 60 fill 112 111 111 64 action "rgCheatSpellFilterVar = ''" } label { enabled "rgCheatSection == 3" area 20 400 400 50 text "RG_CHEATSPELL" text style "normal" } button { name "rgCheatButtonLearnSpell" enabled "rgCheatSection == 3" area 0 0 70 70 --bam 'RGDMBUT1' --sequence lua "rgUISkin" --ScaleToClip --text lua "rgString('BUTTON_LEARN')" --text style "button" action " luaEdit = rgGetCheatSpellCode(rgCheatSpells[cheatSpell][1]) updateLuaHistory() saveLuaHistory() Infinity_LuaConsoleInput(luaEditObjectId,luaEditDebugDump) return -1 " } button { bam 'rgdbuts1' sequence lua "RgUISkin" ScaleToClip area 22 460 166 46 text lua "rgString('GODBOW_LABEL')" text style "button" pad 0 0 0 0 action "C:CreateItem('godbow')" } button { bam 'rgdbuts1' sequence lua "RgUISkin" ScaleToClip area 192 510 226 46 --pad 10 8 10 8 text style "button" pad 0 0 0 0 text lua "rgString('GIVE_GOLD_LABEL')" action "C:AddGold(cheatGoldAmt)" } button { bam 'rgdbuts1' sequence lua "RgUISkin" ScaleToClip area 22 510 166 46 text style "button" pad 0 0 0 0 clickable false text "" } edit { area 28 521 154 24 var cheatGoldAmt text style "edit" maxlines 1 fill 112 111 111 64 } button { bam 'rgdbuts1' sequence lua "RgUISkin" ScaleToClip area 22 560 166 46 text style "button" pad 0 0 0 0 clickable false text "" } button { bam 'rgdbuts1' sequence lua "RgUISkin" ScaleToClip area 192 560 226 46 --pad 10 8 10 8 text style "button" pad 0 0 0 0 text lua "rgString('GIVE_XP_LABEL')" action "C:SetCurrentXP(cheatXpAmt)" } edit { area 28 571 154 24 var cheatXpAmt text style "edit" maxlines 1 fill 112 111 111 64 } button { bam 'rgdbuts1' sequence lua "RgUISkin" ScaleToClip area 192 460 226 46 --pad 10 8 10 8 text style "button" pad 0 0 0 0 text lua "rgString('EXPLORE_LABEL')" action "C:ExploreArea()" } } menu { name "luaHistoryMenu" offset 500 -32 align center bottom ignoreEsc --onOpen --" -- --" label { area 0 0 809 300 mosaic 'GUWBTP30' } } menu { name 'cheatConsole' align center bottom ignoreEsc onOpen " if RgIsModernHud == 0 then toolbarTop = 73 Infinity_SetOffset('cheatConsole',0,50) else if RgModernHudRight == 1 then local w, h = Infinity_GetScreenSize() Infinity_SetOffset('cheatConsole',(w/2)-335,0) else Infinity_SetOffset('cheatConsole',0,0) end toolbarTop = 0 end Infinity_PushMenu('RIGHT_SIDEBAR_BOTTOM') Infinity_PushMenu('LEFT_SIDEBAR_BOTTOM') --toolbarTop = 50 Infinity_PushMenu('RGWORLD_MESSAGES') Infinity_PushMenu('WORLD_MESSAGES') Infinity_PushMenu('cheatMenu', 0, 0); --Infinity_PushMenu('luaHistoryMenu', 0, 0); Infinity_FocusTextEdit('luaEditArea'); luaEdit = trim(luaEdit) loadLuaHistory() " onClose " Infinity_PopMenu('cheatMenu', 0, 0); Infinity_PopMenu('luaHistoryMenu', 0, 0); " label { name "rgActionbarBackground" enabled "RgIsModernHud == 1" area 1621 0 662 118 bam 'rgdmbcg' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 0 0 3904 68 } label { enabled "RgIsModernHud == 0" area 0 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 650 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 1300 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 1950 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 2600 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 3250 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0 and RgUISkin == 0" area 1598 0 49 68 bam 'rgdmbcg7' ScaleToClip } label { enabled "RgIsModernHud == 0 and RgUISkin == 0" area 2257 0 49 68 bam 'rgdmbcg7' ScaleToClip } label { bam rgdslct sequence lua "RgUISkin*2" ScaleToClip area 1618 12 640 46 } edit { name "luaEditArea" area 1628 22 620 26 var luaEdit scrollbar 'rgdscrl1' text style "edit" fill 112 111 111 64 --text useFontZoom 0 maxlines 2 action " --if key_pressed is return if (key_pressed == 13) then updateLuaHistory() saveLuaHistory() Infinity_LuaConsoleInput(luaEditObjectId,luaEditDebugDump) return -1 end if (key_pressed == 27) then return 0 end return 1 " } button { enabled "Infinity_TextEditHasFocus()" on up action " luaEditHistoryUp() " } button { enabled "Infinity_TextEditHasFocus()" on down action " luaEditHistoryDown() " } } ` cloudLoadState=0 function CheckCloudSaveStatus() Infinity_UpdateCloudSaveState() if(cloudLoadState == 0) then Infinity_PopMenu() end return GetCloudLoadingText() end function GetCloudLoadingText() if(cloudLoadState == 1 or cloudLoadState == 0) then return getUiString('DOWNLOADING_SAVE_NORMAL') end if(cloudLoadState == 2) then return getUiString('SEARCHING_SAVE_NORMAL') end return getUiString('CLOUD_STATE_UNDEFINED_NORMAL') end ` menu { name 'CloudSaveUpdateMenu' modal label -- Background { area 174 267 677 234 mosaic GUIERR6 } label { area 214 287 600 120 text lua "CheckCloudSaveStatus()" text style "label" } button { area 544 437 232 44 bam GUIOSTUR sequence 0 text "SKIP_BUTTON" text style "button" on escape action " Infinity_PopMenu() " } } ` messageBoxCurMessage = nil messageBoxMessages = {} function initMessageBox(message) messageBoxMessages[message] = 1 if(messageBoxCurMessage ~= nil) then --message box already active return end getNextMessage() Infinity_PushMenu('LuaMessageBox',0,0) end function getNextMessage() i = 1 while ( i <= messageBoxMessageCount ) do showMessage = messageBoxMessages[i] if ( showMessage ~= nil ) then messageBoxCurMessage = i return 1 end i = i + 1 end --whole table scanned, all messages have been displayed return 0 end ` menu { name 'LuaMessageBox' align center center modal label { area 0 0 657 234 mosaic GUIERR6 } label { area 29 21 580 126 text lua "messages[messageBoxCurMessage]" text style "label" } button { area 213 170 230 40 bam GUIBUTNT text "DONE_BUTTON" text style "button" action " messageBoxMessages[messageBoxCurMessage] = nil if(getNextMessage() == 0) then messageBoxCurMessage = nil Infinity_PopMenu() end " } } ` partyImport = {} rgClearPartyOnce = 0 rgIwdSoloPlay = 0 function rgClearPartyScreen() if rgClearPartyOnce == 1 then createPartyScreen:OnCreateDeleteButtonClick(0) createPartyScreen:OnCreateDeleteButtonClick(0) createPartyScreen:OnCreateDeleteButtonClick(0) createPartyScreen:OnCreateDeleteButtonClick(0) createPartyScreen:OnCreateDeleteButtonClick(0) createPartyScreen:OnCreateDeleteButtonClick(0) rgClearPartyOnce = 0 if rgIwdSoloPlay == 1 then rgCreateButtonClick(1) rgChargenSteps(0) createCharScreen:OnMenuButtonClick() end end end function rgGetImportButtonString(num) if partyImport.character[num].createdelete == getUiString('CREATE_BUTTON'):lower() then return getUiString('IMPORT_BUTTON') else return partyImport.character[num].createdelete end end function rgGetImportButtonState(num) if partyImport.character[num].createdelete == getUiString('CREATE_BUTTON'):lower() then return 0 else return 1 end end function rgGetCreateButtonString(num) if partyImport.character[num].createdelete == getUiString('CREATE_BUTTON'):lower() then return getUiString('CREATE_BUTTON') else return partyImport.character[num].name end end function rgCreateButtonClick(num) if partyImport.character[num].createdelete == getUiString('CREATE_BUTTON'):lower() then createPartyScreen:OnCreateDeleteButtonClick(num-1) Infinity_PopMenu() Infinity_PushMenu('CHARGEN') else createPartyScreen:OnPortraitButtonClick(num-1) end end function rgGetLargePortrait(port) if port ~= 'noportsm' and port ~= 'noportls' then port = port:sub(1, -2) port = port .. 'l' else port = 'rgnoport' end return port end function rgGetPartyArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgPartyPregenButton',nil,screenHeight-74,nil,nil) Infinity_SetArea('rgPartyBackButton',nil,screenHeight-74,nil,nil) Infinity_SetArea('rgPartyPlayButton',nil,screenHeight-74,nil,nil) end ` menu { name 'IMPORTPARTY' align center top onOpen " rgGetPartyArea() if rgGameEngine == 3 then Infinity_SetBackground('BACKGROUND') end " button { area 0 0 0 0 text lua "rgClearPartyScreen()" } label { area 0 0 1365 768 } label { area 170 10 1025 44 text "CREATE_PARTY_TITLE" text style "button" text shadow 1 } label {enabled "RgUISkin == 1" area 15 190 200 348 fill 1 1 1 255 } label {enabled "RgUISkin == 1" area 242 190 200 348 fill 1 1 1 255 } label {enabled "RgUISkin == 1" area 469 190 200 348 fill 1 1 1 255 } label {enabled "RgUISkin == 1" area 696 190 200 348 fill 1 1 1 255 } label {enabled "RgUISkin == 1" area 923 190 200 348 fill 1 1 1 255 } label {enabled "RgUISkin == 1" area 1150 190 200 348 fill 1 1 1 255 } button { area 20 215 190 299 --text lua "partyImport.character[1].portrait" bitmap lua "rgGetLargePortrait(partyImport.character[1].portrait)" clickable lua "partyImport.character[1].name ~= ''" action " createPartyScreen:OnPortraitButtonClick(0) " } button { area 247 215 190 299 bitmap lua "rgGetLargePortrait(partyImport.character[2].portrait)" clickable lua "partyImport.character[2].name ~= ''" action " createPartyScreen:OnPortraitButtonClick(1) " } button { area 474 215 190 299 bitmap lua "rgGetLargePortrait(partyImport.character[3].portrait)" clickable lua "partyImport.character[3].name ~= ''" action " createPartyScreen:OnPortraitButtonClick(2) " } --label --{ -- area 557 180 64 90 -- bam 'GUIRSP10' -- sequence 0 --} button { area 701 215 190 299 bitmap lua "rgGetLargePortrait(partyImport.character[4].portrait)" clickable lua "partyImport.character[4].name ~= ''" action " createPartyScreen:OnPortraitButtonClick(3) " } button { area 928 215 190 299 bitmap lua "rgGetLargePortrait(partyImport.character[5].portrait)" clickable lua "partyImport.character[5].name ~= ''" action " createPartyScreen:OnPortraitButtonClick(4) " } button { area 1155 215 190 299 bitmap lua "rgGetLargePortrait(partyImport.character[6].portrait)" clickable lua "partyImport.character[6].name ~= ''" action " createPartyScreen:OnPortraitButtonClick(5) " } label { area 15 210 200 308 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } label { area 242 210 200 308 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } label { area 469 210 200 308 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } label { area 696 210 200 308 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } label { area 923 210 200 308 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } label { area 1150 210 200 308 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } --delete/create buttons button { area 5 164 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCreateButtonString(1)" text style "button" pad 8 2 8 2 action " rgCreateButtonClick(1) if rgGameEngine == 3 then if rgGetImportButtonState(1) == 0 then rgChargenSteps(0) end createCharScreen:OnMenuButtonClick() end " } button { area 5 511 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetImportButtonString(1)" text style "button" pad 8 2 8 2 action " createPartyScreen:OnCreateDeleteButtonClick(0) if rgGameEngine ~= 3 then createCharScreen:OnImportCharacterButtonClick() end " } button { area 232 164 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCreateButtonString(2)" text style "button" pad 8 2 8 2 action " rgCreateButtonClick(2) if rgGameEngine == 3 then if rgGetImportButtonState(2) == 0 then rgChargenSteps(0) end createCharScreen:OnMenuButtonClick() end " } button { area 232 511 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetImportButtonString(2)" text style "button" pad 8 2 8 2 action " createPartyScreen:OnCreateDeleteButtonClick(1) if rgGameEngine ~= 3 then createCharScreen:OnImportCharacterButtonClick() end " } button { area 459 164 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCreateButtonString(3)" text style "button" pad 8 2 8 2 action " rgCreateButtonClick(3) if rgGameEngine == 3 then if rgGetImportButtonState(3) == 0 then rgChargenSteps(0) end createCharScreen:OnMenuButtonClick() end " } button { area 459 511 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetImportButtonString(3)" text style "button" pad 8 2 8 2 action " createPartyScreen:OnCreateDeleteButtonClick(2) if rgGameEngine ~= 3 then createCharScreen:OnImportCharacterButtonClick() end " } button { area 686 164 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCreateButtonString(4)" text style "button" pad 8 2 8 2 action " rgCreateButtonClick(4) if rgGameEngine == 3 then if rgGetImportButtonState(4) == 0 then rgChargenSteps(0) end createCharScreen:OnMenuButtonClick() end " } button { area 686 511 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetImportButtonString(4)" text style "button" pad 8 2 8 2 action " createPartyScreen:OnCreateDeleteButtonClick(3) if rgGameEngine ~= 3 then createCharScreen:OnImportCharacterButtonClick() end " } button { area 913 164 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCreateButtonString(5)" text style "button" pad 8 2 8 2 action " rgCreateButtonClick(5) if rgGameEngine == 3 then if rgGetImportButtonState(5) == 0 then rgChargenSteps(0) end createCharScreen:OnMenuButtonClick() end " } button { area 913 511 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetImportButtonString(5)" text style "button" pad 8 2 8 2 action " createPartyScreen:OnCreateDeleteButtonClick(4) if rgGameEngine ~= 3 then createCharScreen:OnImportCharacterButtonClick() end " } button { area 1140 164 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCreateButtonString(6)" text style "button" pad 8 2 8 2 action " rgCreateButtonClick(6) if rgGameEngine == 3 then if rgGetImportButtonState(6) == 0 then rgChargenSteps(0) end createCharScreen:OnMenuButtonClick() end " } button { area 1140 511 220 54 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetImportButtonString(6)" text style "button" pad 8 2 8 2 action " createPartyScreen:OnCreateDeleteButtonClick(5) if rgGameEngine ~= 3 then createCharScreen:OnImportCharacterButtonClick() end " } button { name "rgPartyPregenButton" area 532 1006 300 64 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "Pre-gen party" text style 'button' pad 8 2 8 2 action " createPartyScreen:OnBackButtonClick() Infinity_PopMenu(); startEngine:OnCreatePartyButtonClick(); " } button { name "rgPartyPlayButton" area 865 1006 300 64 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "PLAY_IMPORT_BUTTON" -- Play text style 'button' pad 8 2 8 2 clickable lua "partyImport.playbuttonclickable" action " createPartyScreen:OnDoneButtonClick() " } button { name "rgPartyBackButton" on escape area 200 1006 300 64 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" -- Back text style 'button' pad 8 2 8 2 action " createPartyScreen:OnBackButtonClick() " } } menu { name 'START_INSTALLATION_WARNING' align center center --ignoreEsc modal label { area 0 0 672 672 mosaic "RECENTEV" } label { area 158 32 354 46 text style "title" text lua "eetStrings.EET_WARNING_TITLE" } label { area 126 106 422 458 text style "normal" text lua "eetStrings.EET_WARNING_TEXT" } } menu { name 'START_CAMPAIGN_SELECT' align center center ignoreEsc modal onOpen " " label { area 0 0 820 427 mosaic 'STARTBG2' } list { column { width 15 label { area 0 0 -1 -1 bam "CMPGEET" sequence lua 'startCampaignData[rowNumber].icon' align center center } } column { width 85 label { area 0 0 -1 -1 text lua "getEETTitle(rowNumber)" text style "normal_parchment" text align left center } } area 83 25 316 384 rowheight 40 --hideHighlight table "startCampaignData" var selectedOpt scrollbar 'GUISCRP' sound "" action " onCampaignButton(selectedOpt) selectedOpt = 0 startEngine:DismissChooseCampaignPopup() " actionEnter " if mouseoverRow > 0 then highlightedCampaign = mouseoverRow end glowTest = mouseoverRow selectedOpt = mouseoverRow " actionExit " glowTest = nil --highlightedCampaign = nil selectedOpt = 0 " } text { name "campaignBookDescription" area 426 25 316 384 text lua "getEETDescription(highlightedCampaign)" text style "normal_parchment" scrollbar 'GUISCRP' } } ` function getEETTitle(row) local text = rgCampaigns[row].name return eetStrings[text] end function getEETDescription(row) local text = rgCampaigns[row].description return eetStrings[text] end highlightedCampaign = nil startButtons = { {const.START_CAMPAIGN_SOD, const.START_CAMPAIGN_BP}, --bg {const.START_CAMPAIGN_BG, const.START_CAMPAIGN_SOD}, --bp {const.START_CAMPAIGN_BG,const.START_CAMPAIGN_BP}, --sod } rgCampaigns = { -- {bigLogo = 0, icon = 0, title = "Baldur's Gate", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = true}, -- {bigLogo = 1, icon = 1, title = "Siege of Dragonspear", background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false}, -- {bigLogo = 2, icon = 2, title = "The Black Pits", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, -- } function rgGetGameCampaigns() if rgGameEngine == 0 then rgCampaigns = { {order = 1, bigLogo = 0, icon = 0, title = "RG_MENU_CAMPAIGN1", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = true}, {order = 3, bigLogo = 2, icon = 2, title = "RG_MENU_CAMPAIGN3", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, } elseif rgGameEngine == 1 then rgCampaigns = { {order = 1, bigLogo = 0, icon = 0, title = "RG_MENU_CAMPAIGN1", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = true}, {order = 2, bigLogo = 1, icon = 1, title = "RG_MENU_CAMPAIGN2", background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false}, {order = 3, bigLogo = 2, icon = 2, title = "RG_MENU_CAMPAIGN3", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, } elseif rgGameEngine == 2 then rgCampaigns = { {order = 4, bigLogo = 3, icon = 3, title = "RG_MENU_CAMPAIGN4", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = true}, {order = 5, bigLogo = 4, icon = 4, title = "RG_MENU_CAMPAIGN5", background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false}, {order = 6, bigLogo = 5, icon = 5, title = "RG_MENU_CAMPAIGN6", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, } elseif rgGameEngine == 3 then rgCampaigns = { {order = 7, bigLogo = 6, icon = 6, title = "RG_MENU_CAMPAIGN7", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = true}, {order = 8, bigLogo = 7, icon = 7, title = "RG_MENU_CAMPAIGN8", background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false}, } elseif rgGameEngine == 4 then rgCampaigns = { --{order = 1, bigLogo = 0, icon = 0, title = "RG_MENU_CAMPAIGN1", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, --{order = 2, bigLogo = 1, icon = 1, title = "RG_MENU_CAMPAIGN2", background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false}, --{order = 3, bigLogo = 2, icon = 2, title = "RG_MENU_CAMPAIGN3", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, --{order = 4, bigLogo = 3, icon = 3, title = "RG_MENU_CAMPAIGN4", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, --{order = 5, bigLogo = 4, icon = 4, title = "RG_MENU_CAMPAIGN5", background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false}, --{order = 6, bigLogo = 5, icon = 5, title = "RG_MENU_CAMPAIGN6", background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false}, {id = 'BG1', name = 'EET_CMP_TITLE_BG1', description = 'EET_CMP_TEXT_BG1', title = eetStrings["EET_CMP_TITLE_BG1"], bigLogo = 0, icon = 0, background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false, forceParty = false, cheatAreasTable = cheatAreas}, {id = 'SOD', name = 'EET_CMP_TITLE_SOD', description = 'EET_CMP_TEXT_SOD', title = eetStrings["EET_CMP_TITLE_SOD"], bigLogo = 1, icon = 1, background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false, forceParty = false, cheatAreasTable = cheatAreas}, {id = 'SOA', name = 'EET_CMP_TITLE_SOA', description = 'EET_CMP_TEXT_SOA', title = eetStrings["EET_CMP_TITLE_SOA"], bigLogo = 3, icon = 3, background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false, forceParty = false, cheatAreasTable = cheatAreas}, {id = 'TOB', name = 'EET_CMP_TITLE_TOB', description = 'EET_CMP_TEXT_TOB', title = eetStrings["EET_CMP_TITLE_TOB"], bigLogo = 4, icon = 4, background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false, forceParty = false, cheatAreasTable = cheatAreas}, {id = 'BP1', name = 'EET_CMP_TITLE_BP1', description = 'EET_CMP_TEXT_BP1', title = eetStrings["EET_CMP_TITLE_BP1"], bigLogo = 2, icon = 2, background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false, forceParty = true, cheatAreasTable = cheatAreasArena_BP1}, {id = 'BP2', name = 'EET_CMP_TITLE_BP2', description = 'EET_CMP_TEXT_BP2', title = eetStrings["EET_CMP_TITLE_BP2"], bigLogo = 5, icon = 5, background = 2, button = 2, sidebar = 2, importEnabled = true, tutorialEnabled = false, forceParty = true, cheatAreasTable = cheatAreasArena}, {id = 'TUT', name = 'EET_CMP_TITLE_TUT', description = 'EET_CMP_TEXT_TUT', title = eetStrings["EET_CMP_TITLE_TUT"], bigLogo = 8, icon = 8, background = 2, button = 2, sidebar = 2, importEnabled = false, tutorialEnabled = false, forceParty = false, cheatAreasTable = cheatAreasTutorial}, } end end function getCampaignHighlight(selected) return selected == highlightedCampaign end function onCampaignButton(buttonNum) if rgGameEngine == 4 then if rgCampaigns[buttonNum] ~= nil then startEngine:OnCampaignButtonClick(rgCampaigns[buttonNum].id,true) Infinity_SetINIValue('Program Options','Active Campaign',buttonNum) else startEngine:OnCampaignButtonClick('BG1',true) Infinity_SetINIValue('Program Options','Active Campaign',const.START_CAMPAIGN_BG1) end currentCampaign = buttonNum else local campaign = startEngine:GetCampaign() local clickedCampaign = startButtons[campaign][buttonNum] if(clickedCampaign == const.START_CAMPAIGN_SOD) then startEngine:OnCampaignButtonClick('SOD',true) elseif(clickedCampaign == const.START_CAMPAIGN_BP) then startEngine:OnTBPButtonClick(true) elseif(clickedCampaign == const.START_CAMPAIGN_BG) then startEngine:OnSoAButtonClick(true) end end end function getCampaignImportEnabled() local campaign = startEngine:GetCampaign() if rgGetGameEngine == 4 then campaign = currentCampaign end return rgCampaigns[campaign].importEnabled end function getTutorialEnabled() --Tutorial and campaign import should never be enabled for the same campaign - the button uses the same space local campaign = startEngine:GetCampaign() if rgGetGameEngine == 4 then campaign = currentCampaign end return rgCampaigns[campaign].tutorialEnabled end function rgGetGameEngine() local str = cheatAreas[1][1] local stre = '' if type(cheatAreasExpansion) == 'table' then stre = cheatAreasExpansion[1][1] end if stre == "BD0010" then --sod return 1 elseif str == "AR0002" then --bg1 return 0 elseif str == "AR0011" then --bg2 return 2 elseif str == "AR1000" then --iwd return 3 elseif str == "BG0002" then --eet return 4 end end function rgGetGameEngineString(bg1,sod,bg2,iwd) local eng = rgGameEngine if eng == 0 then return Infinity_FetchString(bg1) elseif eng == 1 then return Infinity_FetchString(sod) elseif eng == 2 then return Infinity_FetchString(bg2) elseif eng == 3 then return Infinity_FetchString(iwd) elseif eng == 4 then return Infinity_FetchString(bg2) end end function rgGetGameEngineStringRef(bg1,sod,bg2,iwd) local eng = rgGameEngine if eng == 0 then return bg1 elseif eng == 1 then return sod elseif eng == 2 then return bg2 elseif eng == 3 then return iwd elseif eng == 4 then return bg2 end end function rgSetZoomMainMenuArea(element,x,y,a,b) w, h = Infinity_GetScreenSize() local currH = 768 local currW = w / (h / currH) local n = 1 local difx = (currW - (currW*n)) / 2 local dify = (currH - (currH*n)) / 2 Infinity_SetArea(element, difx + (x*n), dify + (y*n), a*n, b*n) end function rgGetTitleFrame() if rgGameEngine == 0 then if startEngine:GetCampaign() == 1 then return 0 elseif startEngine:GetCampaign() == 2 then return 2 end elseif rgGameEngine == 1 then if startEngine:GetCampaign() == const.START_CAMPAIGN_BG then return 0 elseif startEngine:GetCampaign() == const.START_CAMPAIGN_SOD then return 1 elseif startEngine:GetCampaign() == const.START_CAMPAIGN_BP then return 2 end elseif rgGameEngine == 2 then if startEngine:GetCampaign() == 1 then if rgCurrentCampaign == 4 then return 4 else return 3 end elseif startEngine:GetCampaign() == 2 then return 5 end elseif rgGameEngine == 3 then if startEngine:GetCampaign() == 1 then if rgCurrentCampaign == 7 then return 7 else return 6 end end elseif rgGameEngine == 4 then return rgCampaigns[currentCampaign].bigLogo end end function rgGetMainMenuArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgmainmenutitle', screenWidth - 550, 48, nil,nil) Infinity_SetArea('rgmainmenubutton1', screenWidth - 500, 216,nil,nil) Infinity_SetArea('rgmainmenubutton2', screenWidth - 500, 291,nil,nil) Infinity_SetArea('rgmainmenubutton3', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubutton4', screenWidth - 500, 441,nil,nil) Infinity_SetArea('rgmainmenubutton5', screenWidth - 500, 516,nil,nil) Infinity_SetArea('rgmainmenubutton6', screenWidth - 500, 591,nil,nil) Infinity_SetArea('rgCampaignList', 10, screenHeight - 5 - (100 * #rgCampaigns), nil,100 * #rgCampaigns) Infinity_SetArea('rgmainmenuversion', screenWidth - 500, screenHeight - 50, nil,nil) end function rgGetNewGameMenuArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgmainmenutitlenew', screenWidth - 550, 48, nil,nil) Infinity_SetArea('rgmainmenubuttonnew1', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubuttonnew2', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubuttonnew3', screenWidth - 500, 291,nil,nil) Infinity_SetArea('rgmainmenubuttonnew4', screenWidth - 500, 441,nil,nil) Infinity_SetArea('rgmainmenubuttonnew5', screenWidth - 500, 516,nil,nil) Infinity_SetArea('rgmainmenubuttonnew1x', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenuversionnew', screenWidth - 500, screenHeight - 50, nil,nil) end function rgGetOptionsMenuArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgmainmenutitleopt', screenWidth - 550, 48, nil,nil) Infinity_SetArea('rgmainmenubuttonopt1', screenWidth - 500, 291,nil,nil) Infinity_SetArea('rgmainmenubuttonopt2', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubuttonopt3', screenWidth - 500, 441,nil,nil) Infinity_SetArea('rgmainmenubuttonopt4', screenWidth - 500, 516,nil,nil) Infinity_SetArea('rgmainmenuversionopt', screenWidth - 500, screenHeight - 50, nil,nil) end function rgGetLoadMenuArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgmainmenubuttonload1', screenWidth - 500, 216,nil,nil) Infinity_SetArea('rgmainmenubuttonload4', screenWidth - 500, 291,nil,nil) Infinity_SetArea('rgmainmenubuttonload5', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubuttonload2', screenWidth - 500, 441,nil,nil) Infinity_SetArea('rgmainmenubuttonload3', screenWidth - 500, 516,nil,nil) Infinity_SetArea('rgmainmenubuttonload6', screenWidth - 500, 591,nil,nil) Infinity_SetArea('rgmainmenutitleload', screenWidth - 550, 48, nil,nil) Infinity_SetArea('rgmainmenuloadlist3', nil, 5, nil,screenHeight-10) Infinity_SetArea('rgmainmenuloadlist2', nil, 5, nil,screenHeight-10) Infinity_SetArea('rgmainmenuloadlist1', nil, 5, nil,screenHeight-10) Infinity_SetArea('rgLoadNamesList', screenWidth - 500, 291,nil,screenHeight-301) Infinity_SetArea('rgLoadListBackground', nil, nil,nil,screenHeight) Infinity_SetArea('rgLoadListBackground1', nil, nil,nil,screenHeight) --Infinity_SetArea('rgLoadSortsList', screenWidth - 500, 441,nil,screenHeight-451) end function rgGetSaveMenuArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgmainmenubuttonsave0', screenWidth - 500, 100,nil,nil) Infinity_SetArea('rgmainmenubuttonsave1', screenWidth - 500, 216,nil,nil) Infinity_SetArea('rgmainmenubuttonsave4', screenWidth - 500, 291,nil,nil) Infinity_SetArea('rgmainmenubuttonsave5', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubuttonsave2', screenWidth - 500, 441,nil,nil) Infinity_SetArea('rgmainmenubuttonsave3', screenWidth - 500, 516,nil,nil) Infinity_SetArea('rgmainmenubuttonsave6', screenWidth - 500, 591,nil,nil) Infinity_SetArea('rgmainmenutitlesave', screenWidth - 550, 48, nil,nil) Infinity_SetArea('rgmainmenusavelist3', nil, 5, nil,screenHeight-10) Infinity_SetArea('rgmainmenusavelist2', nil, 5, nil,screenHeight-10) Infinity_SetArea('rgmainmenusavelist1', nil, 5, nil,screenHeight-10) Infinity_SetArea('rgSaveNamesList', screenWidth - 500, 291,nil,screenHeight-301) Infinity_SetArea('rgSaveListBackground', nil, nil,nil,screenHeight) Infinity_SetArea('rgSaveListBackground1', nil, nil,nil,screenHeight) end function rgGetMultiMenuArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgmainmenubuttonmulti1', screenWidth - 500, 216,nil,nil) Infinity_SetArea('rgmainmenubuttonmulti2', screenWidth - 500, 291,nil,nil) Infinity_SetArea('rgmainmenubuttonmulti3', screenWidth - 500, 366,nil,nil) Infinity_SetArea('rgmainmenubuttonmulti4', screenWidth - 500, 441,nil,nil) Infinity_SetArea('rgmainmenubuttonmulti5', screenWidth - 500, 516,nil,nil) Infinity_SetArea('rgmainmenubuttonmulti6', screenWidth - 500, 591,nil,nil) Infinity_SetArea('rgmainmenutitlemulti', screenWidth - 550, 48, nil,nil) Infinity_SetArea('rgmainmenulistmulti', nil, 5, nil,screenHeight-70) Infinity_SetArea('rgmainmenuemptymulti', nil, nil, screenWidth,screenHeight) Infinity_SetArea('rgmainmenubackmulti', nil, nil,nil,screenHeight) Infinity_SetArea('rgmainmenufiltermulti1', nil, screenHeight - 58, nil,nil) Infinity_SetArea('rgmainmenufiltermulti2', nil, screenHeight - 54, nil,nil) Infinity_SetArea('rgmainmenufiltermulti3', nil, screenHeight - 58, nil,nil) Infinity_SetArea('rgmainmenufiltermulti4', nil, screenHeight - 54, nil,nil) end function rgGetBestiary() if rgGameEngine == 0 then rgBeasts = rgBeasts1 elseif rgGameEngine == 1 then rgBeasts = rgBeasts1 elseif rgGameEngine == 2 then rgBeasts = rgBeasts2 elseif rgGameEngine == 3 then rgBeasts = rgBeasts3 elseif rgGameEngine == 4 then rgBeasts = rgBeasts2 end end if type(cheatAreasExpansion) == 'table' then if cheatAreasExpansion[1][1] == "BD0010" then usingSODStartMenu = 1 end end rgCurrentCampaign = 0 rgFirstStart = 1 rgBeasts = {} ` menu { name 'START' align left top ignoreesc onOpen " rgGameEngine = rgGetGameEngine() rgGetGameEnginePortraits() rgGetGameCampaigns() if rgGameEngine == 4 then --eet if(Infinity_GetINIValue('Program Options','EET Installation State') == 1) then --EET_end not installed Infinity_PushMenu('START_INSTALLATION_WARNING') end if (start_doOnce == nil) then currentCampaign = Infinity_GetINIValue('Program Options','Active Campaign') if (currentCampaign == 0) then currentCampaign = 1 end onCampaignButton(currentCampaign) --highlightedCampaign = currentCampaign start_doOnce = 1 return end end RgSettingEEexZoomUI = Infinity_GetINIValue('Graphics','RgSettingEEexZoomUI',0) RgQuicklootFilterJunk = Infinity_GetINIValue('Game Options','RgQuicklootFilterJunk',0) if EEex_Active and EEex_Modules['B3Scale'] then B3Scale_SetPercentage(RgSettingEEexZoomUI/10) end RgSpaceAdvanceDialog = Infinity_GetINIValue('Game Options','RgSpaceAdvanceDialog',0) rgLoadSort = Infinity_GetINIValue('Game Options','RgLoadSort',0) rgLoadColumns = Infinity_GetINIValue('Game Options','RgLoadColumns',1) rgLoadName = Infinity_GetINIString('Game Options','RgLoadName','*') rgStoreMode = Infinity_GetINIValue('Game Options','RgStoreMode',0) rgInventoryMode = Infinity_GetINIValue('Game Options','RgInventoryMode',0) RgHotkeyButtonsVisibility = Infinity_GetINIValue('Game Options','RgHotkeyButtonsVisibility',0) RgIsModernHud = Infinity_GetINIValue('Game Options','RgIsModernHud',0) RgMessageboxUnlocked = Infinity_GetINIValue('Game Options','RgMessageboxUnlocked',0) RgModernHudRight = Infinity_GetINIValue('Game Options','RgModernHudRight',0) RgQuicklootBottom = Infinity_GetINIValue('Game Options','RgQuicklootBottom',0) RgQuicklootCenter = Infinity_GetINIValue('Game Options','RgQuicklootCenter',0) RgQuicklootRows = Infinity_GetINIValue('Game Options','RgQuicklootRows',3) RgBestiaryKoef = Infinity_GetINIValue('Game Options','RgBestiaryKoef',1) RgInvPartyModeHover = 1 --Infinity_GetINIValue('Game Options','RgInvPartyModeHover',1) RgUISkin = Infinity_GetINIValue('Game Options','RgUISkin',0) RgLargePortraits = Infinity_GetINIValue('Game Options','RgLargePortraits',0) RgInvPaperdolls = Infinity_GetINIValue('Game Options','RgInvPaperdolls',0) rgRadarShowCreaturesR = Infinity_GetINIValue('Game Options','RgRadarShowCreaturesR',0) rgRadarShowCreaturesG = Infinity_GetINIValue('Game Options','RgRadarShowCreaturesG',0) rgRadarShowCreaturesB = Infinity_GetINIValue('Game Options','RgRadarShowCreaturesB',0) rgRadarShowWeapons = Infinity_GetINIValue('Game Options','RgRadarShowWeapons',0) rgRadarShowNames = Infinity_GetINIValue('Game Options','RgRadarShowNames',0) rgRadarShowSingleCre = Infinity_GetINIValue('Game Options','RgRadarShowSingleCre',1) rgRadarShowMetaInfo = Infinity_GetINIValue('Game Options','RgRadarShowMetaInfo',0) rgRadarShowNpcEffects = Infinity_GetINIValue('Game Options','RgRadarShowNpcEffects',0) rgRadarShowHitPoints = Infinity_GetINIValue('Game Options','RgRadarShowHitPoints',0) rgRadarShowTresholds = Infinity_GetINIValue('Game Options','RgRadarShowTresholds',0) rgRadarShowExtendRadius = Infinity_GetINIValue('Game Options','RgRadarShowExtendRadius',0) rgRadarShowMinimizedBar = Infinity_GetINIValue('Game Options','RgRadarShowMinimizedBar',0) rgRadarShowAlwaysOn = Infinity_GetINIValue('Game Options','RgRadarShowAlwaysOn',0) RgRadarShowPcEffects = Infinity_GetINIValue('Game Options','RgRadarShowPcEffects',0) RgRadarKey = Infinity_GetINIString('Game Options','RgRadarKey','') rgSetMessageBox() rgGetCheatLists() rgGetGraphicToggles() rgGetGameplayToggles() rgGetAutopauseToggles() rgGetBestiary() if EEex_Active == false then RgRadarKey = '' RgRadarShowPcEffects = 0 end B3Spell_Menu_TEMPLATE_OptionsButton_Bam = rgGetAdvSettingsButtonBam() if e:IsTouchUI() and startEngine:GetCampaign() ~= 3 then startEngine:OnCampaignButtonClick('SOD',false) end versionString = CBaldurChitin:GetVersionString() canContinue = startEngine:HasGameToContinue() --Infinity_PlayMovie('flames','flames') e:CheckGUISong() Infinity_SetBackground('BACKGROUND') --If we're coming back from the tutorial make sure we're set to our actual campaign. if(startEngine:GetCampaign() == const.START_CAMPAIGN_BG and rgGameEngine ~= 3) then startEngine:OnSoAButtonClick(false) end rgGetMainMenuArea() if (rgGameEngine == 3 or rgGameEngine == 0 or rgGameEngine == 2) and rgFirstStart == 1 then rgFirstStart = 0 startEngine:OnSoAButtonClick(true) end " onClose " local state = startEngine:GetEngineState() if state == 1 then Infinity_PopMenu('START_SP') elseif state == 2 then Infinity_PopMenu('START_MP') end " label { name 'rgmainmenutitle' ScaleToClip area 1445 48 510 131 bam 'RGDTITLE' frame lua "rgGetTitleFrame()" } list { column { width 100 label { --bam "rgdmcmp" bam lua "getUiString('rgdmcmp') .. RgUISkin" area 0 0 -1 -1 frame lua "getCampaignHighlight(rowNumber)" sequence lua "rgCampaigns[rowNumber].icon" align left top ScaleToClip } label { area 0 0 -1 -1 text lua "rgString(rgCampaigns[rowNumber].title)" text style "normal" --text color '$' text align left center pad 105 0 0 0 } } area 10 530 340 300 name "rgCampaignList" rowheight 100 hideHighlight table "rgCampaigns" var rgSelectedCampaign scrollbar 'GUISCRP' action " rgCurrentCampaign = rgCampaigns[rgSelectedCampaign].icon if rgGameEngine == 4 then onCampaignButton(rgSelectedCampaign) rgSelectedCampaign = 0 startEngine:DismissChooseCampaignPopup() else if rgCampaigns[rgSelectedCampaign].order == 1 then startEngine:OnSoAButtonClick(true) elseif rgCampaigns[rgSelectedCampaign].order == 2 then startEngine:OnCampaignButtonClick('SOD',true) elseif rgCampaigns[rgSelectedCampaign].order == 3 then startEngine:OnTBPButtonClick(true) elseif rgCampaigns[rgSelectedCampaign].order == 4 then startEngine:OnSoAButtonClick(true) elseif rgCampaigns[rgSelectedCampaign].order == 5 then startEngine:OnToBButtonClick(true) elseif rgCampaigns[rgSelectedCampaign].order == 6 then startEngine:OnTBPButtonClick(true) elseif rgCampaigns[rgSelectedCampaign].order == 7 then startEngine:OnSoAButtonClick(true) elseif rgCampaigns[rgSelectedCampaign].order == 8 then startEngine:OnToBButtonClick(true) end rgSelectedCampaign = 0 end " actionEnter " if mouseoverRow > 0 then highlightedCampaign = mouseoverRow end rgSelectedCampaign = mouseoverRow " actionExit " highlightedCampaign = nil rgSelectedCampaign = 0 " } button { name 'rgmainmenubutton1' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 1495 216 409 75 pad 10 8 10 8 text style "button" --text 9372 text lua "rgString('CONTINUE_BUTTON')" clickable lua "canContinue" action "startEngine:OnContinueGame()" actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubutton2' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,2)" ScaleToClip area 1495 291 409 75 pad 10 8 10 8 text style "button" text lua "rgString('NEW_GAME_BUTTON')" --text 15413 action " startEngine:SetEngineState(1) Infinity_TransitionMenu('START_SP') " actionEnter "rgMainButtHighlight = 2" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubutton3' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,3)" ScaleToClip area 1495 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('LOAD_GAME_BUTTON')" action "Infinity_PopMenu(); startEngine:OnLoadGameButtonClick()" actionEnter "rgMainButtHighlight = 3" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubutton4' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 1495 441 409 75 pad 10 8 10 8 text style "button" text lua "rgString('MULTIPLAYER_BUTTON')" action " startEngine:OnMultiPlayerButtonClick() " actionEnter "rgMainButtHighlight = 4" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubutton5' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,5)" ScaleToClip area 1495 516 409 75 pad 10 8 10 8 text style "button" text lua "rgString('OPTIONS_BUTTON')" action " Infinity_TransitionMenu('START_OPTIONS') optionsScreen:SetEngineState(1) startEngine:OnOptionsButtonClick() lastStartMenu = 'START' " actionEnter "rgMainButtHighlight = 5" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubutton6' area 1495 591 409 75 bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,6)" ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('QUIT_GAME_BUTTON')" enabled "not e:IsTouchUI()" on escape action " startEngine:OnQuitButtonClick() " actionEnter "rgMainButtHighlight = 6" actionExit "rgMainButtHighlight = 0" } button { area 0 0 1 1 enabled "e:IsTouchUI()" on escape action " startEngine:OnQuitButtonClick() " } label { name 'rgmainmenuversion' area 1495 785 409 41 text style "normal" text align center center text lua "CBaldurChitin:GetVersionString()" } } menu { name 'START_SP' align left top ignoreEsc onopen " rgGetNewGameMenuArea() rgIwdSoloPlay = 0 --Infinity_PlayMovie('flames','flames2') " label { name 'rgmainmenutitlenew' ScaleToClip area 1370 48 510 131 bam 'RGDTITLE' frame lua "rgGetTitleFrame()" } button { name 'rgmainmenubuttonnew1x' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 1420 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('New solo game')" enabled "rgGameEngine == 3" action " Infinity_PopMenu(); rgClearPartyOnce = 1 rgIwdSoloPlay = 1 startEngine:OnCreatePartyButtonClick(); " actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonnew1' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 1420 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('TUTORIAL_BUTTON')" enabled "getTutorialEnabled() and rgGameEngine ~= 3" action " Infinity_PopMenu(); startEngine:OnTutorialButtonClick() " actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonnew2' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 1420 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('IMPORT_GAME_BUTTON')" enabled "getCampaignImportEnabled()" action " Infinity_PopMenu(); startEngine:OnImportCharacterButtonClick(); " actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonnew3' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,2)" ScaleToClip area 1420 291 409 75 pad 10 8 10 8 text style "button" text lua "rgString('NEW_GAME_BUTTON')" action " Infinity_PopMenu(); if rgGameEngine == 3 then rgClearPartyOnce = 1 startEngine:OnCreatePartyButtonClick(); else startEngine:OnNewGameButtonClick(); end " actionEnter "rgMainButtHighlight = 2" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonnew4' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,3)" ScaleToClip area 1420 441 409 75 pad 10 8 10 8 text style "button" text lua "rgString('PREGENERATE_BUTTON')" action "Infinity_PopMenu(); startEngine:OnPreGenerateButtonClick()" actionEnter "rgMainButtHighlight = 3" actionExit "rgMainButtHighlight = 0" } button { on escape name 'rgmainmenubuttonnew5' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 1420 516 409 75 pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" action "startEngine:SetEngineState(0); Infinity_TransitionMenu('START'); rgMainButtHighlight = 0" actionEnter "rgMainButtHighlight = 4" actionExit "rgMainButtHighlight = 0" } label { name 'rgmainmenuversionnew' area 1420 1030 409 41 text style "normal" text align center center text lua "CBaldurChitin:GetVersionString()" } } ` OptionsButtons = { {text = "CREDITS_BUTTON", menu = "CREDITS", sequence = 0}, {text = "GAMEPLAY_BUTTON", menu = "OPTIONS_GAMEPLAY", sequence = 0}, {text = "GRAPHICS_BUTTON", menu = "OPTIONS_GRAPHICS", sequence = 1}, {text = "LANGUAGE_BUTTON", menu = "OPTIONS_LANGUAGE", sequence = 0}, {text = "MOVIES_BUTTON", menu = "", sequence = 2}, {text = "SOUND_BUTTON", menu = "OPTIONS_SOUND", sequence = 1}, } function onStartOptionClick() Infinity_PlaySound('GAM_09') if(selectedMenuOpt == 1 and startEngine:GetCampaign() == const.START_CAMPAIGN_SOD) then Infinity_PushMenu( 'SODCREDIT' ) --If in SOD, display the end credits --Infinity_PopMenu('START_OPTIONS') --chapterScreen:StartTextScreen( "25ecred" ) --e:SelectEngine(chapterScreen) selectedMenuOpt = NIL return end if OptionsButtons[selectedMenuOpt].menu ~= '' then Infinity_PushMenu( OptionsButtons[selectedMenuOpt].menu ) else e:SelectEngine(moviesScreen) end selectedMenuOpt = NIL end ` menu { name 'START_OPTIONS' align left top ignoreEsc onopen " rgGetOptionsMenuArea() Infinity_PushMenu( 'RG_START_OPTIONS_BAR' ) " label { name 'rgmainmenutitleopt' ScaleToClip area 1445 48 510 131 bam 'RGDTITLE' frame lua "rgGetTitleFrame()" } button { name 'rgmainmenubuttonopt1' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 1495 291 409 75 pad 10 8 10 8 text style "button" text lua "rgString('LANGUAGE_BUTTON')" action "Infinity_PushMenu('OPTIONS_LANGUAGE')" actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonopt2' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,2)" ScaleToClip area 1495 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('MOVIES_BUTTON')" action "e:SelectEngine(moviesScreen)" actionEnter "rgMainButtHighlight = 2" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonopt3' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,3)" ScaleToClip area 1495 441 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CREDITS_BUTTON')" action "Infinity_PushMenu('CREDITS')" actionEnter "rgMainButtHighlight = 3" actionExit "rgMainButtHighlight = 0" } button { on escape name 'rgmainmenubuttonopt4' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 1495 516 409 75 pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" action " Infinity_PopMenu() Infinity_PopMenu() e:SelectEngine(startEngine) rgMainButtHighlight = 0 " actionEnter "rgMainButtHighlight = 4" actionExit "rgMainButtHighlight = 0" } label { name 'rgmainmenuversionopt' area 1495 785 409 41 text style "normal" text align center center text lua "CBaldurChitin:GetVersionString()" } } menu { name 'RG_START_OPTIONS_BAR' align center center ignoreEsc size 1365 768 onClose " Infinity_PopMenu('OPTIONS_GAMEPLAY') Infinity_PopMenu('OPTIONS_GRAPHICS') Infinity_PopMenu('OPTIONS_SOUND') Infinity_PopMenu('OPTIONS_FEEDBACK') Infinity_PopMenu('OPTIONS_AUTOPAUSE') Infinity_PopMenu('OPTIONS_KEYBINDINGS') Infinity_PopMenu('RG_UI_SETTINGS') --Infinity_PopMenu('OPTIONS_LANGUAGE') --Infinity_PopMenu('MOVIES') " button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,1)" ScaleToClip area 100 106 300 80 pad 10 8 10 8 text style "button" text lua "rgString('GAMEPLAY_BUTTON')" --text "GAMEPLAY_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_GAMEPLAY' ) " } button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,2)" ScaleToClip area 100 186 300 80 pad 10 8 10 8 text style "button" text lua "rgString('GRAPHICS_BUTTON')" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_GRAPHICS' ) " } button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,3)" ScaleToClip area 100 266 300 80 pad 10 8 10 8 text style "button" text lua "rgString('SOUND_BUTTON')" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_SOUND' ) " } button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,4)" ScaleToClip area 100 346 300 80 pad 10 8 10 8 text style "button" text lua "rgString('FEEDBACK_BUTTON')" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_FEEDBACK' ) " } button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,5)" ScaleToClip area 100 426 300 80 pad 10 8 10 8 text style "button" text lua "rgString('AUTO_PAUSE_BUTTON')" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_AUTOPAUSE' ) " } button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,6)" ScaleToClip area 100 506 300 80 pad 10 8 10 8 text style "button" text lua "rgString('ASSIGN_KEYS_BUTTON')" clickable lua "not e:IsTouchUI()" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_KEYBINDINGS' ) " } button { bam rgdmbut1 sequence lua "rgGetSelectedHighlight(RgOptionsMode,7)" ScaleToClip area 100 586 300 80 pad 10 8 10 8 text style "button" text lua "rgString('RG_UI_SETTINGS')" action " Infinity_PopMenu() Infinity_PushMenu( 'RG_UI_SETTINGS' ) " } } ` function magePageInfo() if bookMode == 0 then -- Regular if characters[id].hasSorcererBook then return getUiString("SPELLS_CAN_CAST_LABEL") .. ": " .. characters[id].mageDetails[currentSpellLevel].slotsRemaining .. "/" .. characters[id].mageDetails[currentSpellLevel].maxMemorized else --return getUiString("MEMORIZED_LABEL") .. ": " .. #bottomSpells .. "/" .. characters[id].mageDetails[currentSpellLevel].maxMemorized return getUiString("MEMORIZED_LABEL") end elseif bookMode == 1 then -- Sequencer/Contingency return getUiString("SPELLS_LABEL") .. " :" .. #bottomSpells .. "/" .. #bottomSpellsPlaceHolder end return "" end contingencyDescription = 0 function mageBookDescription() if mageBookEnabled == true then if bookMode == 0 then if characters[id].mageSpells[currentSpellLevel][currentBookSpell] then return Infinity_FetchString(characters[id].mageSpells[currentSpellLevel][currentBookSpell].description) else return getUiString('SPELL_MEMORIZATION_HELP') end elseif bookMode == 1 then if contingencyDescription == 0 and currentBookSpell ~= 0 then return Infinity_FetchString(bookSpells[currentBookSpell].description) else lastCurrentBookSpell = 0 if contingencyDescription == 0 then contingencyDescription = mageBookStrings[contingencyResRef].tip end return Infinity_FetchString(contingencyDescription) end end end return "" end function mageBookTitle() if bookMode == 1 and mageBookStrings[contingencyResRef] then return getUiString(mageBookStrings[contingencyResRef].title) else return getUiString('MAGE_SPELLS_TITLE') end end function mageBookAction() if bookMode == 1 and mageBookStrings[contingencyResRef] then return getUiString(mageBookStrings[contingencyResRef].action) else return getUiString("MAGE_BOOK_LABEL") end end function makeBlankTable(num) local out = {} for i = 1,num do table.insert(out, {}) end return out end function contingencyComplete() if showContingency then return #bottomSpells == #bottomSpellsPlaceHolder and (currentContingencyCondition or 0) > 0 and (currentContingencyTarget or 0) > 0 else return #bottomSpells == #bottomSpellsPlaceHolder end end function contingencyDoneButtonText() if contingencyComplete() then return getUiString("DONE_BUTTON") else return getUiString("CANCEL_BUTTON") end end function filterMemorizedMageSpells() local out = {} currentSpellLevel = math.min(currentSpellLevel, 9) for k,v in pairs(characters[id].mageSpells[currentSpellLevel]) do for i=v.memorizedCount, 1, -1 do local spell = deepcopy(v) if(i <= v.castableCount) then spell.castable = 1 else spell.castable = 0 end table.insert(out, spell) end end return out end function tableInsert(out, v) if mageScreen:SpellSwappedInContingency(v.resref) then for key,value in pairs(contingencySwapTable) do value.castableCount = v.castableCount table.insert(out, value) end else table.insert(out, v) end end function filterContingencyMageSpells() local out = {} if currentSpellLevel == 99 then if characters[id].mageSpells ~= nil then local rgTempSpells = {} if maxMagePage >= 1 then for k,v in pairs(characters[id].mageSpells[1]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 2 then for k,v in pairs(characters[id].mageSpells[2]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 3 then for k,v in pairs(characters[id].mageSpells[3]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 4 then for k,v in pairs(characters[id].mageSpells[4]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 5 then for k,v in pairs(characters[id].mageSpells[5]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 6 then for k,v in pairs(characters[id].mageSpells[6]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 7 then for k,v in pairs(characters[id].mageSpells[7]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 8 then for k,v in pairs(characters[id].mageSpells[8]) do table.insert(rgTempSpells, v) end end if maxMagePage >= 9 then for k,v in pairs(characters[id].mageSpells[9]) do table.insert(rgTempSpells, v) end end for k,v in pairs(rgTempSpells) do if v.castableCount > 0 and mageScreen:SpellAllowedForContingency(v.level, v.resref) then tableInsert(out, v) end end end else if characters[id].mageSpells ~= nil and characters[id].mageSpells[currentSpellLevel] ~= nil then for k,v in pairs(characters[id].mageSpells[currentSpellLevel]) do if v.castableCount > 0 and mageScreen:SpellAllowedForContingency(v.level, v.resref) then tableInsert(out, v) end end end end if characters[id].priestSpells ~= nil and characters[id].priestSpells[currentSpellLevel] ~= nil then for k,v in pairs(characters[id].priestSpells[currentSpellLevel]) do if v.castableCount > 0 and mageScreen:SpellAllowedForContingency(v.level, v.resref) then tableInsert(out, v) end end end return out end function findFirstDifferenceInSpellList(oldList, newList) local ret = -1 local spellIndex = 1 if oldList ~= nil and newList ~= nil then while oldList[spellIndex] ~= nil do if newList[spellIndex] == nil then print("New list empty at point "..spellIndex) ret = spellIndex break end if oldList[spellIndex].icon ~= newList[spellIndex].icon then print("Lists differ at point "..spellIndex.." "..oldList[spellIndex].icon.." vs "..newList[spellIndex].icon) ret = spellIndex break end spellIndex = spellIndex + 1 end if oldList[spellIndex] == nil and newList[spellIndex] ~= nil then print("New list has a new spell at point "..spellIndex) ret = spellIndex end end return ret end showMageMemorizationFlash = false function rgFilterMemorizedMageSpellLevels(level) local out = {} for k,v in pairs(characters[id].mageSpells[level]) do for i=v.memorizedCount, 1, -1 do local spell = deepcopy(v) if(i <= v.castableCount) then spell.castable = 1 else spell.castable = 0 end table.insert(out, spell) end end return out end function refreshMageBook() if currentSpellLevel == nil then currentSpellLevel = 1 end if bookMode == 0 then if characters[id].hasMageBook then bookSpells = characters[id].mageSpells[currentSpellLevel] --table.sort(bookSpells,function (k1, k2) return k1.icon < k2.icon end) --rgBookSpells = { -- {bookSpells[1],bookSpells[2],bookSpells[3]} --,{bookSpells[4],bookSpells[5],bookSpells[6]} --,{bookSpells[7],bookSpells[8],bookSpells[9]} --,{bookSpells[10],bookSpells[11],bookSpells[12]} --} local rgSpellCountDiv = #(bookSpells)/3 if rgIsNthNumber(#(bookSpells)+1,3) == false then rgSpellCountDiv = rgSpellCountDiv+1 end rgBookSpells = { } for index = 1, rgSpellCountDiv, 1 do table.insert(rgBookSpells,{bookSpells[(3*index)-2],bookSpells[(3*index)-1],bookSpells[(3*index)]}) end newBottomSpells = filterMemorizedMageSpells() rgNewBottomSpells1 = rgFilterMemorizedMageSpellLevels(1) rgNewBottomSpells2 = rgFilterMemorizedMageSpellLevels(2) rgNewBottomSpells3 = rgFilterMemorizedMageSpellLevels(3) rgNewBottomSpells4 = rgFilterMemorizedMageSpellLevels(4) rgNewBottomSpells5 = rgFilterMemorizedMageSpellLevels(5) rgNewBottomSpells6 = rgFilterMemorizedMageSpellLevels(6) rgNewBottomSpells7 = rgFilterMemorizedMageSpellLevels(7) rgNewBottomSpells8 = rgFilterMemorizedMageSpellLevels(8) rgNewBottomSpells9 = rgFilterMemorizedMageSpellLevels(9) if showMageMemorizationFlash == true then --createMageMemorizationSparkle(0,0,36,36,"memorizedListMage", findFirstDifferenceInSpellList(bottomSpells, newBottomSpells)) --createMageMemorizationSparkle(0,0,36,36,"rgBottomSpell1", -1) --showMageMemorizationFlash = false end bottomSpells = newBottomSpells bottomSpellsPlaceHolder = makeBlankTable(characters[id].mageDetails[currentSpellLevel].maxMemorized) rgBottomSpells1 = rgNewBottomSpells1 rgBottomSpells2 = rgNewBottomSpells2 rgBottomSpells3 = rgNewBottomSpells3 rgBottomSpells4 = rgNewBottomSpells4 rgBottomSpells5 = rgNewBottomSpells5 rgBottomSpells6 = rgNewBottomSpells6 rgBottomSpells7 = rgNewBottomSpells7 rgBottomSpells8 = rgNewBottomSpells8 rgBottomSpells9 = rgNewBottomSpells9 rgBottomSpellsPlaceHolder1 = makeBlankTable(characters[id].mageDetails[1].maxMemorized) rgBottomSpellsPlaceHolder2 = makeBlankTable(characters[id].mageDetails[2].maxMemorized) rgBottomSpellsPlaceHolder3 = makeBlankTable(characters[id].mageDetails[3].maxMemorized) rgBottomSpellsPlaceHolder4 = makeBlankTable(characters[id].mageDetails[4].maxMemorized) rgBottomSpellsPlaceHolder5 = makeBlankTable(characters[id].mageDetails[5].maxMemorized) rgBottomSpellsPlaceHolder6 = makeBlankTable(characters[id].mageDetails[6].maxMemorized) rgBottomSpellsPlaceHolder7 = makeBlankTable(characters[id].mageDetails[7].maxMemorized) rgBottomSpellsPlaceHolder8 = makeBlankTable(characters[id].mageDetails[8].maxMemorized) rgBottomSpellsPlaceHolder9 = makeBlankTable(characters[id].mageDetails[9].maxMemorized) rgBottomSpells = { {rgBottomSpells1,characters[id].mageDetails[1].maxMemorized,1,1} --,{rgBottomSpells1,characters[id].mageDetails[1].maxMemorized,1,14} --,{rgBottomSpells2,characters[id].mageDetails[2].maxMemorized,2,1} --,{rgBottomSpells2,characters[id].mageDetails[2].maxMemorized,2,14} --,{rgBottomSpells3,characters[id].mageDetails[3].maxMemorized,3,1} --,{rgBottomSpells3,characters[id].mageDetails[3].maxMemorized,3,14} --,{rgBottomSpells4,characters[id].mageDetails[4].maxMemorized,4,1} --,{rgBottomSpells4,characters[id].mageDetails[4].maxMemorized,4,14} --,{rgBottomSpells5,characters[id].mageDetails[5].maxMemorized,5,1} --,{rgBottomSpells5,characters[id].mageDetails[5].maxMemorized,5,14} --,{rgBottomSpells6,characters[id].mageDetails[6].maxMemorized,6,1} --,{rgBottomSpells6,characters[id].mageDetails[6].maxMemorized,6,14} --,{rgBottomSpells7,characters[id].mageDetails[7].maxMemorized,7,1} --,{rgBottomSpells7,characters[id].mageDetails[7].maxMemorized,7,14} --,{rgBottomSpells8,characters[id].mageDetails[8].maxMemorized,8,1} --,{rgBottomSpells8,characters[id].mageDetails[8].maxMemorized,8,14} --,{rgBottomSpells9,characters[id].mageDetails[9].maxMemorized,9,1} --,{rgBottomSpells9,characters[id].mageDetails[9].maxMemorized,9,14} } --table.insert(rgBottomSpells,{rgBottomSpells1,characters[id].mageDetails[1].maxMemorized,1,1}) if characters[id].mageDetails[1].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells1,characters[id].mageDetails[1].maxMemorized,1,14}) end table.insert(rgBottomSpells,{rgBottomSpells2,characters[id].mageDetails[2].maxMemorized,2,1}) if characters[id].mageDetails[2].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells2,characters[id].mageDetails[2].maxMemorized,2,14}) end table.insert(rgBottomSpells,{rgBottomSpells3,characters[id].mageDetails[3].maxMemorized,3,1}) if characters[id].mageDetails[3].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells3,characters[id].mageDetails[3].maxMemorized,3,14}) end table.insert(rgBottomSpells,{rgBottomSpells4,characters[id].mageDetails[4].maxMemorized,4,1}) if characters[id].mageDetails[4].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells4,characters[id].mageDetails[4].maxMemorized,4,14}) end table.insert(rgBottomSpells,{rgBottomSpells5,characters[id].mageDetails[5].maxMemorized,5,1}) if characters[id].mageDetails[5].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells5,characters[id].mageDetails[5].maxMemorized,5,14}) end table.insert(rgBottomSpells,{rgBottomSpells6,characters[id].mageDetails[6].maxMemorized,6,1}) if characters[id].mageDetails[6].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells6,characters[id].mageDetails[6].maxMemorized,6,14}) end table.insert(rgBottomSpells,{rgBottomSpells7,characters[id].mageDetails[7].maxMemorized,7,1}) if characters[id].mageDetails[7].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells7,characters[id].mageDetails[7].maxMemorized,7,14}) end table.insert(rgBottomSpells,{rgBottomSpells8,characters[id].mageDetails[8].maxMemorized,8,1}) if characters[id].mageDetails[8].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells8,characters[id].mageDetails[8].maxMemorized,8,14}) end table.insert(rgBottomSpells,{rgBottomSpells9,characters[id].mageDetails[9].maxMemorized,9,1}) if characters[id].mageDetails[9].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells9,characters[id].mageDetails[9].maxMemorized,9,14}) end else bookSpells = characters[id].mageSpells[currentSpellLevel] local rgSpellCountDiv = #(bookSpells)/3 if rgIsNthNumber(#(bookSpells)+1,3) == false then rgSpellCountDiv = rgSpellCountDiv+1 end rgBookSpells = { } for index = 1, rgSpellCountDiv, 1 do table.insert(rgBookSpells,{bookSpells[(3*index)-2],bookSpells[(3*index)-1],bookSpells[(3*index)]}) end bottomSpells = {} bottomSpellsPlaceHolder = {} rgBottomSpells = { {{},0,1,1} ,{{},0,2,1} ,{{},0,3,1} ,{{},0,4,1} ,{{},0,5,1} ,{{},0,6,1} ,{{},0,7,1} ,{{},0,8,1} ,{{},0,9,1} } rgBottomSpells1 = {} rgBottomSpells2 = {} rgBottomSpells3 = {} rgBottomSpells4 = {} rgBottomSpells5 = {} rgBottomSpells6 = {} rgBottomSpells7 = {} rgBottomSpells8 = {} rgBottomSpells9 = {} rgBottomSpellsPlaceHolder1 = {} rgBottomSpellsPlaceHolder2 = {} rgBottomSpellsPlaceHolder3 = {} rgBottomSpellsPlaceHolder4 = {} rgBottomSpellsPlaceHolder5 = {} rgBottomSpellsPlaceHolder6 = {} rgBottomSpellsPlaceHolder7 = {} rgBottomSpellsPlaceHolder8 = {} rgBottomSpellsPlaceHolder9 = {} end elseif bookMode == 1 then bookSpells = filterContingencyMageSpells() local rgSpellCountDiv = #(bookSpells)/3 if rgIsNthNumber(#(bookSpells)+1,3) == false then rgSpellCountDiv = rgSpellCountDiv+1 end rgBookSpells = { } for index = 1, rgSpellCountDiv, 1 do table.insert(rgBookSpells,{bookSpells[(3*index)-2],bookSpells[(3*index)-1],bookSpells[(3*index)]}) end --bookSpells = rgMageSpells bottomSpells = sequencerSpells bottomSpellsPlaceHolder = makeBlankTable(contingencyMaxSpells) contingencyDescription = mageBookStrings[contingencyResRef].tip end end function setMageBookLevel(num) lastCurrentBookSpell = 0 currentBookSpell = 0 currentSpellLevel = num mageScreen:SetSpellLevel(num-1) refreshMageBook() end currentAnimationID = 1 updateCounterMemorizationSparkles = 1 function updateMemorizationSparkles() local sparkleNumber = 1 updateCounterMemorizationSparkles = updateCounterMemorizationSparkles + 1 if updateCounterMemorizationSparkles > 2 then updateCounterMemorizationSparkles = 1 for sparkleNumber = 1, #(memorizationFlashes), 1 do if memorizationFlashes[sparkleNumber][1] == true then memorizationFlashes[sparkleNumber][2] = memorizationFlashes[sparkleNumber][2] + 1 if memorizationFlashes[sparkleNumber][2] > 7 then memorizationFlashes[sparkleNumber][1] = false memorizationFlashes[sparkleNumber][2] = 0 memorizationFlashes[sparkleNumber][3] = true end end end end end function destroyMemorizationSparkle(instanceId) local ret = memorizationFlashes[instanceId][3] memorizationFlashes[instanceId][3] = false return ret end function showMemorizationSparkle(instanceId) updateMemorizationSparkles() return memorizationFlashes[instanceId][1] end function createMageMemorizationSparkle(x,y,w,h, fromList, listIndex) Infinity_InstanceAnimation("TEMPLATE_mageMemorizationSparkle","FLASHBR",x,y,w,h,fromList,listIndex) memorizationFlashes[currentAnimationID][1] = true memorizationFlashes[currentAnimationID][3] = false currentAnimationID = currentAnimationID + 1 if currentAnimationID > #(memorizationFlashes) then currentAnimationID = 1 end end function findMemorizedUncastable(resref) local index = 1 local sparkle = -1 for index = 1, #(bottomSpells), 1 do if bottomSpells[index].resref == resref then if bottomSpells[index].castable == 0 then sparkle = index break end end end return sparkle end function unmemorizingMageSpell(resref) local index = 1 local sparkle = -1 for index = 1, #(bottomSpells), 1 do if bottomSpells[index].resref == resref then sparkle = index if bottomSpells[index].castable == 0 then break end end end --createMageMemorizationSparkle(0, 0, 36, 36, 'rgMemorizedListMage', sparkle) --createMageMemorizationSparkle(200, 0, 36, 36, 'rgMageMemorizedLabel',-1) end function unmemorizeMageSpell(level,slot) showMageMemorizationFlash = false --mageScreen:UnmemorizeSpell( bottomSpells[slot].level, bottomSpells[slot].memorizedIndex ) if level == 1 and rgBottomSpells1[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells1[slot].level, rgBottomSpells1[slot].memorizedIndex ) elseif level == 2 and rgBottomSpells2[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells2[slot].level, rgBottomSpells2[slot].memorizedIndex ) elseif level == 3 and rgBottomSpells3[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells3[slot].level, rgBottomSpells3[slot].memorizedIndex ) elseif level == 4 and rgBottomSpells4[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells4[slot].level, rgBottomSpells4[slot].memorizedIndex ) elseif level == 5 and rgBottomSpells5[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells5[slot].level, rgBottomSpells5[slot].memorizedIndex ) elseif level == 6 and rgBottomSpells6[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells6[slot].level, rgBottomSpells6[slot].memorizedIndex ) elseif level == 7 and rgBottomSpells7[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells7[slot].level, rgBottomSpells7[slot].memorizedIndex ) elseif level == 8 and rgBottomSpells8[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells8[slot].level, rgBottomSpells8[slot].memorizedIndex ) elseif level == 9 and rgBottomSpells9[slot] then mageScreen:UnmemorizeSpell( rgBottomSpells9[slot].level, rgBottomSpells9[slot].memorizedIndex ) end Infinity_PlaySound('GAM_44') local wid = (slot*36) + 10 if slot > 13 then wid = ((slot-13)*36)+10 end createMageMemorizationSparkle(wid, 0, 50, 50, 'rgMemorizedListMage', -1) end function rgBookSpellLeftClick(slotid) local slotname = 'rgBookSpell' .. slotid local rgBottomCount = 0 if currentSpellLevel == 1 then rgBottomCount = #rgBottomSpells1 + 1 elseif currentSpellLevel == 2 then rgBottomCount = #rgBottomSpells2 + 1 elseif currentSpellLevel == 3 then rgBottomCount = #rgBottomSpells3 + 1 elseif currentSpellLevel == 4 then rgBottomCount = #rgBottomSpells4 + 1 elseif currentSpellLevel == 5 then rgBottomCount = #rgBottomSpells5 + 1 elseif currentSpellLevel == 6 then rgBottomCount = #rgBottomSpells6 + 1 elseif currentSpellLevel == 7 then rgBottomCount = #rgBottomSpells7 + 1 elseif currentSpellLevel == 8 then rgBottomCount = #rgBottomSpells8 + 1 elseif currentSpellLevel == 9 then rgBottomCount = #rgBottomSpells9 + 1 end local slotBottomName = 'rgBottomSpell' .. currentSpellLevel .. rgBottomCount if #bottomSpells < #bottomSpellsPlaceHolder then createMageMemorizationSparkle(1, 0, 40, 40, slotname, -1) createMageMemorizationSparkle(0,0,36,36,slotBottomName, -1) Infinity_PlaySound('GAM_24') showMageMemorizationFlash = true end mageScreen:MemorizeSpell( bookSpells[slotid].level, bookSpells[slotid].index ) end function rgBookSpellRightClick(slotid) if characters[id].hasSorcererBook == false then popup2Button(rgGetGameEngineStringRef(11824,11824,63745,11824), 'REMOVE_BUTTON', function() mageScreen:EraseKnownSpell(bookSpells[slotid].resref) end) end end function rgBottomSpellLeftClick(level,slotid) setMageBookLevel(level) if findMemorizedUncastable(bottomSpells[slotid].resref) == -1 and Infinity_GetOption(41, 9) ~= 0 then popup2Button(rgGetGameEngineStringRef(11824,11824,63745,11824), 'REMOVE_BUTTON', function() unmemorizeMageSpell(slotid) end, 'CANCEL_BUTTON') else --if rgMX[level] == 0 then -- rgCurrentBottomSpellSlot = 'rgBottomSpell' .. level .. slotid --else -- rgCurrentBottomSpellSlot = 'rgBottomSpell' .. level .. slotid-rgMX[level] --end unmemorizeMageSpell(level,slotid) end end function rgIncrementMageBookLevel(level) if level < 9 then setMageBookLevel(level + 1) --currentBookSpell = 0 --currentSpellLevel = level + 1 --mageScreen:SetSpellLevel(level) --rgGetSpellButtHighlight(level + 1) --refreshMageBook() end end function rgDecrementMageBookLevel(level) if level > 1 then setMageBookLevel(level - 1) --currentBookSpell = 0 --currentSpellLevel = level - 1 --mageScreen:SetSpellLevel(level-1) --rgGetSpellButtHighlight(level - 1) --refreshMageBook() end end function rgGetSpellButtHighlight(num) if currentSpellLevel == num then return 2 else return 0 end end function rgGetMemListMaxButtSeq(level) if rgMX[level] == 0 then return 3 else return 2 end end rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } function rgGetMemorizedListMax(level) if rgMX[level] == 0 then rgMX[level] = 13 else rgMX[level] = 0 end end function rgGetContMemorizedText() if currentSpellLevel == 99 then return getUiString('MEMORIZED_LABEL') else return getUiString('MEMORIZED_LABEL') .. ': ' .. Infinity_FetchString(7192) .. ' ' .. currentSpellLevel end end function rgGetBottomSpell(list,firstSpell,column) if list[firstSpell+column] ~= nil then return list[firstSpell+column] else return {} end end function rgBottomShort(row,slot) return rgGetBottomSpell(rgBottomSpells[row][1],rgBottomSpells[row][4],slot) end function rgGetSpellLvlButtBam() if RgUISkin == 0 then return 'rgdwhl1' elseif RgUISkin == 3 then return 'rgdwhl3' else return 'rgdwhl2' end end function rgGetSpellLvlButtText(str) local color = '' if RgUISkin == 3 then color = '^$' else color = '^5' end return color .. str end function rgGetSpellLvlButtOpacity() if RgUISkin == 3 then return 210 else return 255 end end memorizationFlashes = { {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false}, {false, 0, false} } ` menu { name 'MAGE' align center center modal lua "bookMode == 1" onopen " if bookMode == 1 then contingencyDescription = mageBookStrings[contingencyResRef].tip setMageBookLevel(99) elseif bookMode == 0 then Infinity_PushMenu('RG_MENU_BAR') setMageBookLevel(1) end showMageMemorizationFlash = false mgpage = nil currentContingencyCondition = 0 currentContingencyTarget = 0 currentAnimationID = 1 updateCounterMemorizationSparkles = 1 popSidebars() rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } rgSpellDescString = nil --for k,v in pairs(rgBottomSpells2) do table.insert(rgBottomSpells1, v) end " onclose " Infinity_PopMenu('RG_MENU_BAR') --Infinity_PopMenu('RG_JOURNAL') " button { enabled "CurrentlyInGame()" on escape action " --Return to world screen on escape e:SelectEngine(worldScreen) " } template { label { enabled "showMemorizationSparkle(instanceId)" ignoreEvents area 0 0 45 42 bam "FLASHBR" usealpha lua "true" frame lua "memorizationFlashes[instanceId][2]" align center center } name "TEMPLATE_mageMemorizationSparkle" } label { enabled "bookMode == 0" name 'rgdbcmag1' area 0 0 768 768 bam rgdbcmag sequence lua "RgUISkin" frame 0 scaleToClip } label { enabled "bookMode == 0" name 'rgdbcmag2' area 597 0 768 768 bam rgdbcmag sequence lua "RgUISkin" frame 1 scaleToClip } label { enabled "bookMode == 1" area 0 0 768 768 bam rgdbcmac sequence lua "RgUISkin" frame 0 scaleToClip } label { enabled "bookMode == 1" area 597 0 768 768 bam rgdbcmac sequence lua "RgUISkin" frame 1 scaleToClip } label { enabled "bookMode == 0" name 'rgmagdesc1' area 114 106 322 26 ScaleToClip text lua "rgString(rgCharDescString1(characters[id]))" text style 'rg_trajan' text color '$' text align left center } button { name 'rgmagpor1' area 452 98 64 93 portrait 0 bam rgdport2 sequence lua "RgUISkin" enabled "bookMode == 0 and Infinity_GetNumCharacters() > 0" --bitmap lua "characters[charTable[1]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 0" glow lua "draggedPortrait and draggedPortrait ~= 0" action "Infinity_OnPortraitLClick(0);rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(0)" } button { name 'rgmagpor2' area 531 98 64 93 portrait 1 bam rgdport2 sequence lua "RgUISkin" enabled "bookMode == 0 and Infinity_GetNumCharacters() > 1" --bitmap lua "characters[charTable[2]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 1" glow lua "draggedPortrait and draggedPortrait ~= 1" action "Infinity_OnPortraitLClick(1);rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(1)" } button { name 'rgmagpor3' area 610 98 64 93 portrait 2 bam rgdport2 sequence lua "RgUISkin" enabled "bookMode == 0 and Infinity_GetNumCharacters() > 2" --bitmap lua "characters[charTable[3]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 2" glow lua "draggedPortrait and draggedPortrait ~= 2" action "Infinity_OnPortraitLClick(2);rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(2)" } button { name 'rgmagpor4' area 689 98 64 93 portrait 3 bam rgdport2 sequence lua "RgUISkin" enabled "bookMode == 0 and Infinity_GetNumCharacters() > 3" --bitmap lua "characters[charTable[4]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 3" glow lua "draggedPortrait and draggedPortrait ~= 3" action "Infinity_OnPortraitLClick(3);rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(3)" } button { name 'rgmagpor5' area 768 98 64 93 portrait 4 bam rgdport2 sequence lua "RgUISkin" enabled "bookMode == 0 and Infinity_GetNumCharacters() > 4" --bitmap lua "characters[charTable[5]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 4" glow lua "draggedPortrait and draggedPortrait ~= 4" action "Infinity_OnPortraitLClick(4);rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(4)" } button { name 'rgmagpor6' area 847 98 64 93 portrait 5 bam rgdport2 sequence lua "RgUISkin" enabled "bookMode == 0 and Infinity_GetNumCharacters() > 5" --bitmap lua "characters[charTable[6]].portrait" ScaleToClip --highlightgroup rgrecport clickable lua "Infinity_GetNumCharacters() > 5" glow lua "draggedPortrait and draggedPortrait ~= 5" action "Infinity_OnPortraitLClick(5);rgMX = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(5)" } label { area 139 167 219 27 enabled "bookMode == 0" text lua "Infinity_FetchString(11945) .. ': ' .. Infinity_FetchString(7192) .. ' ' .. currentSpellLevel" text style "rg_trajan" text color '5' } label { name 'rgMageMemorizedLabel' area 939 167 284 27 text lua "magePageInfo()" enabled "rgSpellDescString == nil and bookMode == 0" --text 'MEMORIZED_LABEL' text style "rg_trajan" align right center text color '5' } button { enabled "rgSpellDescString == nil and bookMode == 0 and mageBookEnabled == false and and rgBookSpells[1][1].icon ~= nil" area 939 167 284 27 fill 0 0 0 150 scaleToClip } button { area 975 94 273 54 enabled "bookMode == 0 and (#characters[id].contingencySpells > 0 or #characters[id].sequencerSpells > 0) and RgUISkin ~= 3" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgString(getUiString('CONTINGENCY_BUTTON'))" text style "button" action "Infinity_PushMenu('MAGE_CONTINGENCY')" clickable lua "mageBookEnabled == true" } button { area 922 84 358 69 enabled "bookMode == 0 and (#characters[id].contingencySpells > 0 or #characters[id].sequencerSpells > 0) and RgUISkin == 3" bam rgdbutw1 sequence lua "RgUISkin" ScaleToClip text lua "rgString(getUiString('CONTINGENCY_BUTTON'))" text style "button" action "Infinity_PushMenu('MAGE_CONTINGENCY')" clickable lua "mageBookEnabled == true" } button { area 377 168 30 30 bam RGDAROW1 sequence 2 ScaleToClip align left top enabled "bookMode == 0" action "rgDecrementMageBookLevel(currentSpellLevel)" } button { area 410 168 30 30 bam RGDAROW1 sequence 3 ScaleToClip align left top enabled "bookMode == 0" action "rgIncrementMageBookLevel(currentSpellLevel)" } list { column { width 33 label { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top ScaleToClip } label { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil" area 0 0 50 50 icon lua "rgBookSpells[rowNumber][1].icon" } label { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString( rgBookSpells[rowNumber][1].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgBookSpells[rowNumber][2] and rgBookSpells[rowNumber][2].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top ScaleToClip } label { enabled "rgBookSpells[rowNumber][2] and rgBookSpells[rowNumber][2].icon ~= nil" area 0 0 50 50 icon lua "rgBookSpells[rowNumber][2].icon" } label { enabled "rgBookSpells[rowNumber][2] and rgBookSpells[rowNumber][2].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString( rgBookSpells[rowNumber][2].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top ScaleToClip } label { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil" area 0 0 50 50 icon lua "rgBookSpells[rowNumber][3].icon" } label { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString( rgBookSpells[rowNumber][3].name)" text style "rg_normal_spell" } } area 136 212 530 500 name "bookListMage" rowheight 60 table "rgBookSpells" var currentBookSpell scrollbar 'rgdscrl1' sound "" hidehighlight action " if mageBookEnabled == true then contingencyDescription = 0 --local rgCurrentBookSpell = (currentBookSpell*3)-(3-cellNumber) local rgCurrentBookSpell = currentBookSpell + cellNumber - 1 if bookMode == 0 then if #bottomSpells < #bottomSpellsPlaceHolder and rgBookSpells[currentBookSpell][cellNumber].icon ~= nil then createMageMemorizationSparkle((1 + (167 * (cellNumber-1))), 0, 60, 60, 'bookListMage', -1) --createMageMemorizationSparkle(0,0,36,36,'rgBottomSpell' .. currentSpellLevel .. 1, -1) Infinity_PlaySound('GAM_24') showMageMemorizationFlash = true end mageScreen:MemorizeSpell( rgBookSpells[currentBookSpell][cellNumber].level, rgBookSpells[currentBookSpell][cellNumber].index ) elseif bookMode == 1 and #bottomSpells < #bottomSpellsPlaceHolder then mageScreen:SequenceSpell( rgBookSpells[currentBookSpell][cellNumber].resref, rgBookSpells[currentBookSpell][cellNumber].masterResref ) end end " actionalt " rgSpellDescString = rgBookSpells[currentBookSpell][cellNumber].description " } button { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil and mageBookEnabled == false" area 136 212 530 500 fill 0 0 0 80 scaleToClip } list { column { width 10 label { enabled "rgBottomSpells[rowNumber][4] == 1" area 6 0 36 44 text lua "rgGetSpellLvlButtText(rgBottomSpells[rowNumber][3])" bam lua "rgGetSpellLvlButtBam()" text style 'rg_trajan' opacity lua "rgGetSpellLvlButtOpacity()" --text color '5' text point 14 ScaleToClip align left top text align center center frame lua "rgGetSpellButtHighlight(rgBottomSpells[rowNumber][3])" } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= rgBottomSpells[rowNumber][4]" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,0).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,0).icon" greyscale lua "rgBottomShort(rowNumber,0).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,0).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,0).icon" greyscale lua "rgBottomShort(rowNumber,0).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= rgBottomSpells[rowNumber][4] and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+1)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,1).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,1).icon" greyscale lua "rgBottomShort(rowNumber,1).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,1).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,1).icon" greyscale lua "rgBottomShort(rowNumber,1).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+1) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+2)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,2).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,2).icon" greyscale lua "rgBottomShort(rowNumber,2).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,2).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,2).icon" greyscale lua "rgBottomShort(rowNumber,2).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+2) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+3)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,3).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,3).icon" greyscale lua "rgBottomShort(rowNumber,3).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,3).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,3).icon" greyscale lua "rgBottomShort(rowNumber,3).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+3) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+4)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,4).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,4).icon" greyscale lua "rgBottomShort(rowNumber,4).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,4).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,4).icon" greyscale lua "rgBottomShort(rowNumber,4).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+4) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+5)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,5).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,5).icon" greyscale lua "rgBottomShort(rowNumber,5).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,5).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,5).icon" greyscale lua "rgBottomShort(rowNumber,5).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+5) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+6)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,6).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,6).icon" greyscale lua "rgBottomShort(rowNumber,6).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,6).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,6).icon" greyscale lua "rgBottomShort(rowNumber,6).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+6) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+7)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,7).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,7).icon" greyscale lua "rgBottomShort(rowNumber,7).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,7).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,7).icon" greyscale lua "rgBottomShort(rowNumber,7).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+7) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+8)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,8).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,8).icon" greyscale lua "rgBottomShort(rowNumber,8).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,8).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,8).icon" greyscale lua "rgBottomShort(rowNumber,8).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+8) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+9)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,9).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,9).icon" greyscale lua "rgBottomShort(rowNumber,9).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,9).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,9).icon" greyscale lua "rgBottomShort(rowNumber,9).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+9) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+10)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,10).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,10).icon" greyscale lua "rgBottomShort(rowNumber,10).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,10).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,10).icon" greyscale lua "rgBottomShort(rowNumber,10).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+10) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+11)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,11).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,11).icon" greyscale lua "rgBottomShort(rowNumber,11).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,11).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,11).icon" greyscale lua "rgBottomShort(rowNumber,11).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+11) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+12)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,12).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,12).icon" greyscale lua "rgBottomShort(rowNumber,12).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,12).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,12).icon" greyscale lua "rgBottomShort(rowNumber,12).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+12) and mageBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } area 690 210 540 500 name "rgMemorizedListMage" enabled "rgSpellDescString == nil and bookMode == 0" hideHighlight rowheight 50 table "rgBottomSpells" var currentBottomSpell scrollbar 'rgdscrl1' sound "" action " local level = rgBottomSpells[currentBottomSpell][3] local firstSpell = rgBottomSpells[currentBottomSpell][4] local slotid = cellNumber+firstSpell-2 --if cellNumber == 1 then -- setMageBookLevel(level) --else -- rgBottomSpellLeftClick(level,cellNumber+firstSpell-2) --end if cellNumber == 1 then setMageBookLevel(level) else setMageBookLevel(level) unmemorizeMageSpell(level,slotid) end " } button { enabled "rgSpellDescString == nil and mageBookEnabled == false" area 730 210 510 500 } text { area 743 210 505 495 text lua "Infinity_FetchString(rgSpellDescString)" text style "normal" text color '5' text point 12 scrollbar 'rgdscrl1' enabled "rgSpellDescString ~= nil" } button { area 1196 164 36 36 enabled "rgSpellDescString ~= nil" --text "X" bam rgdwbut sequence 0 ScaleToClip align left top --text style "rg_trajan" --text align center center --text color '5' action "rgSpellDescString = nil" } button { area 1156 164 36 36 enabled "rgSpellDescString ~= nil and bookMode == 0 and mageBookEnabled == true" --text "Ø" bam rgdwbut sequence 1 ScaleToClip align left top --text lua "rgSpellIndex" --text style "rg_trajan" --text align center center --text color '5' action " if bookMode == 0 and characters[id].hasSorcererBook == false then popup2Button(rgGetGameEngineStringRef(24485,24485,63745,24485), 'REMOVE_BUTTON', function() mageScreen:EraseKnownSpell(rgBookSpells[currentBookSpell][cellNumber].resref); rgSpellDescString = nil end) end " } --contingency button { area 696 164 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('*')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center enabled "bookMode == 1" --sequence 1 frame lua "rgGetSpellButtHighlight(99)" action "setMageBookLevel(99)" } button { area 696 218 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('1')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(1)" --sequence 0 enabled "maxMagePage > 0 and bookMode == 1" action "setMageBookLevel(1)" } button { area 696 274 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('2')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(2)" --sequence 1 enabled "maxMagePage > 1 and bookMode == 1" action "setMageBookLevel(2)" } button { area 696 330 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('3')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(3)" --sequence 2 enabled "maxMagePage > 2 and bookMode == 1" action "setMageBookLevel(3)" } button { area 696 384 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('4')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(4)" --sequence 3 enabled "maxMagePage > 3 and bookMode == 1" action "setMageBookLevel(4)" } button { area 696 440 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('5')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(5)" --sequence 4 enabled "maxMagePage > 4 and bookMode == 1" action "setMageBookLevel(5)" } button { area 696 494 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('6')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(6)" --sequence 5 enabled "maxMagePage > 5 and bookMode == 1" action "setMageBookLevel(6)" } button { area 696 550 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('7')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(7)" --sequence 6 enabled "maxMagePage > 6 and bookMode == 1" action "setMageBookLevel(7)" } button { area 696 604 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('8')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(8)" --sequence 7 enabled "maxMagePage > 7 and bookMode == 1" action "setMageBookLevel(8)" } button { area 696 660 36 44 bam lua "rgGetSpellLvlButtBam()" text lua "rgGetSpellLvlButtText('9')" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center --highlightgroup mgpage frame lua "rgGetSpellButtHighlight(9)" --sequence 8 enabled "maxMagePage > 8 and bookMode == 1" action "setMageBookLevel(9)" } label { enabled "bookMode == 1" area 144 36 1078 46 ScaleToClip text lua "mageBookTitle()" text style 'rg_trajan' text color '$' text align center center } label { enabled "bookMode == 1" name 'rgmagdesc1' area 118 106 1130 26 ScaleToClip text lua "rgString(rgCharDescString1(characters[id]))" text style 'rg_trajan' text color '$' text align center center } label { area 139 167 290 27 enabled "bookMode == 1" text lua "rgGetContMemorizedText()" text style "rg_trajan" text color '5' } label { area 748 167 392 27 enabled "bookMode == 1 and rgSpellDescString == nil" text lua "mageBookAction()" text style "rg_trajan" align left center text color '5' } label { area 748 316 232 27 enabled "showContingency and rgSpellDescString == nil" text "CONDITION_NORMAL" text style "rg_trajan" text color '5' } label { area 748 360 232 314 bam RGDWLBC ScaleToClip enabled "showContingency and rgSpellDescString == nil" } list { column { width 100 label { enabled "rowNumber ~= currentContingencyCondition" area 0 0 -1 -1 text lua "Infinity_FetchString( contingencyConditions[rowNumber].strref)" text style "normal" text point 12 pad 10 0 0 0 text align left center text color '5' } label { enabled "rowNumber == currentContingencyCondition" area 0 0 -1 -1 text lua "Infinity_FetchString( contingencyConditions[rowNumber].strref)" text style "normal" text point 12 pad 10 0 0 0 text align left center text color '$' bam rgdslct ScaleToClip --text shadow 1 } } area 753 367 222 297 enabled "showContingency and rgSpellDescString == nil" rowheight 36 hideHighlight table "contingencyConditions" var currentContingencyCondition scrollbar 'rgdscrl1' action " contingencyDescription = contingencyConditions[currentContingencyCondition].desc " } label { area 988 316 232 27 enabled "showContingency and rgSpellDescString == nil" text "TARGET_NORMAL" text style "rg_trajan" text color '5' } label { area 988 360 232 314 bam RGDWLBC ScaleToClip enabled "showContingency and rgSpellDescString == nil" } list { column { width 100 label { enabled "rowNumber ~= currentContingencyTarget" area 0 0 -1 -1 text lua "Infinity_FetchString( contingencyTargets[rowNumber].strref)" text style "normal" text point 12 pad 10 0 0 0 text align left center text color '5' } label { enabled "rowNumber == currentContingencyTarget" area 0 0 -1 -1 text lua "Infinity_FetchString( contingencyTargets[rowNumber].strref)" text style "normal" text point 12 pad 10 0 0 0 text align left center text color '$' bam rgdslct ScaleToClip --text shadow 1 } } area 993 367 222 297 enabled "showContingency and rgSpellDescString == nil" rowheight 36 hideHighlight table "contingencyTargets" var currentContingencyTarget scrollbar 'rgdscrl1' action " contingencyDescription = contingencyTargets[currentContingencyTarget].desc " } button { area 574 730 210 38 enabled "bookMode == 1 and rgSpellDescString == nil" --area 865 640 230 65 --bam RGDWBUT1 --text lua "contingencyDoneButtonText()" --ScaleToClip --text style "button" --text color '5' text lua "contingencyDoneButtonText()" text style "rg_trajan" text align center center --text color '$' text point 12 bam RGDSBUT3 sequence lua "RgUISkin" ScaleToClip action " if contingencyComplete() then mageScreen:DoneSequencingSpells() else mageScreen:CancelSequencingSpells() end setMageBookLevel(1) e:SelectEngine(worldScreen) " } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "bookMode == 1 and rgSpellDescString == nil" area 753 216 473 46 rowwidth 46 table "bottomSpellsPlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 icon lua "bottomSpells[rowNumber].icon" align center center greyscale lua "bottomSpells[rowNumber].castable == 0" } } area 753 216 473 46 name "memorizedListMage" enabled "bookMode == 1 and rgSpellDescString == nil" rowwidth 46 scrollbar '' table "bottomSpells" sound "" var currentBottomSpell action " if bookMode == 0 then if findMemorizedUncastable(bottomSpells[currentBottomSpell].resref) == -1 and Infinity_GetOption(41, 9) ~= 0 then popup2Button(11824, 'REMOVE_BUTTON', function() unmemorizeMageSpell(currentBottomSpell) end, 'CANCEL_BUTTON') else unmemorizeMageSpell(currentBottomSpell) end elseif bookMode == 1 then mageScreen:UnSequenceSpell( bottomSpells[currentBottomSpell].resref, bottomSpells[currentBottomSpell].masterResref ) table.remove(sequencerSpells, currentBottomSpell) bottomSpells = sequencerSpells currentBottomSpell = 0 end " } } ` function refreshMageContingency() preparedSpells = {} for k, v in pairs(characters[id].contingencySpells) do table.insert(preparedSpells, v) end for k, v in pairs(characters[id].sequencerSpells) do table.insert(preparedSpells, v) end end ` menu { name 'MAGE_CONTINGENCY' align center center modal onopen "refreshMageContingency()" label { enabled "RgUISkin == 0" area 0 0 622 660 bam RGDIDESC ScaleToClip } label { enabled "RgUISkin == 1" area 0 0 622 660 bam RGDIDESC sequence 1 ScaleToClip } label { enabled "RgUISkin > 1" area 0 0 622 660 bam RGDWCON1 ScaleToClip } label { area 24 206 572 414 bam RGDWLBX ScaleToClip } label { area 110 26 392 64 text "CONTINGENCY_TITLE" text style "rg_trajan" text align left center text color '5' } text { area 52 126 534 68 text "SPELLS_PREPARED_LABEL" scrollbar 'rgdscrl1' text style "normal" text color '5' text point 12 } button { area 550 26 50 50 bam rgdwbut sequence 0 ScaleToClip action "Infinity_PopMenu('MAGE_CONTINGENCY')" } label { area 34 30 56 54 bam rgdwctgi ScaleToClip } label { area 176 222 132 36 text "CONDITION_LABEL" text style "normal" text color '5' text align left center } label { area 308 222 142 36 text "TARGET_LABEL" text style "normal" text color '5' text align left center } label { area 450 222 146 36 text "SPELL_LABEL" text style "normal" text color '5' text align left center } list { column { width 90 label { enabled "rowNumber ~= currentContingencySpell" area 10 0 135 -1 text lua "getUiString(mageBookStrings[preparedSpells[rowNumber].resref].title)" text style "normal" text color '5' align left center } label { enabled "rowNumber ~= currentContingencySpell" area 145 0 135 -1 text lua "Infinity_FetchString(preparedSpells[rowNumber].condition)" text style "normal" text color '5' align left center } label { enabled "rowNumber ~= currentContingencySpell" area 280 0 135 -1 text lua "Infinity_FetchString(preparedSpells[rowNumber].target)" text style "normal" text color '5' align left center } label { enabled "rowNumber == currentContingencySpell" area 0 0 500 -1 bam rgdslct ScaleToClip } label { enabled "rowNumber == currentContingencySpell" area 10 0 135 -1 text lua "getUiString(mageBookStrings[preparedSpells[rowNumber].resref].title)" text style "normal" text color '$' align left center } label { enabled "rowNumber == currentContingencySpell" area 145 0 135 -1 text lua "Infinity_FetchString(preparedSpells[rowNumber].condition)" text style "normal" text color '$' align left center } label { enabled "rowNumber == currentContingencySpell" area 280 0 135 -1 text lua "Infinity_FetchString(preparedSpells[rowNumber].target)" text style "normal" text color '$' align left center } label { enabled "preparedSpells[rowNumber].spells[1] ~= nil" area 415 8 40 40 icon lua "preparedSpells[rowNumber].spells[1].icon" } label { enabled "preparedSpells[rowNumber].spells[2] ~= nil" area 447 8 40 40 icon lua "preparedSpells[rowNumber].spells[2].icon" } label { enabled "preparedSpells[rowNumber].spells[3] ~= nil" area 479 8 40 40 icon lua "preparedSpells[rowNumber].spells[3].icon" } } column { width 10 label { area 0 8 40 40 bam rgdwbut sequence 1 ScaleToClip align left top enabled "preparedSpells[rowNumber].dispellable" } } area 30 258 566 336 rowheight 56 hideHighlight table "preparedSpells" var "currentContingencySpell" action " if (cellNumber == 2) and preparedSpells[currentContingencySpell].dispellable then if Infinity_GetOption(41, 9) == 1 then popup2Button(24398, 'YES_BUTTON', function() mageScreen:OnDispellButtonClick(currentContingencySpell) end, 'NO_BUTTON') else mageScreen:OnDispellButtonClick(currentContingencySpell) end end " } } menu { name "POPUP_DETAILS" align center center --modal label { area 0 0 622 660 bam RGDIDESC ScaleToClip } label { area 30 27 62 62 icon lua "PopupDetails.icon" } label { area 112 26 388 64 text lua "Infinity_FetchString(PopupDetails.name)" text style "rg_trajan" text align left center text color '5' } text { name "rgPopupDetailsDesc" area 26 108 568 522 text lua "Infinity_FetchString(PopupDetails.description)" scrollbar 'rgdscrl1' text style "normal" text color '5' text point 12 } button { on escape area 548 26 50 50 bam rgdwbut sequence 0 ScaleToClip --bam GUIBUTMT --sequence 6 --area 328 653 230 40 --text "DONE_BUTTON" --text style "button" action " Infinity_PopMenu('POPUP_DETAILS') " } } ` function priestPageInfo() if characters[id].hasShamanBook then return getUiString("SPELLS_CAN_CAST_LABEL") .. ": " .. characters[id].priestDetails[currentSpellLevel].slotsRemaining .. "/" .. characters[id].priestDetails[currentSpellLevel].maxMemorized else --return getUiString("MEMORIZED_LABEL") .. ": " .. #bottomSpells .. "/" .. characters[id].priestDetails[currentSpellLevel].maxMemorized return getUiString("MEMORIZED_LABEL") end end function priestBookDescription() if priestBookEnabled == true then if characters[id].priestSpells[currentSpellLevel][currentBookSpell] then return Infinity_FetchString(characters[id].priestSpells[currentSpellLevel][currentBookSpell].description) else return getUiString('SPELL_MEMORIZATION_HELP') end end return "" end function filterMemorizedPriestSpells() local out = {} currentSpellLevel = math.min(currentSpellLevel, 7) for k,v in pairs(characters[id].priestSpells[currentSpellLevel]) do for i=v.memorizedCount, 1, -1 do local spell = deepcopy(v) if(i <= v.castableCount) then spell.castable = 1 else spell.castable = 0 end table.insert(out, spell) end end return out end function rgFilterMemorizedPriestSpellLevels(level) local out = {} for k,v in pairs(characters[id].priestSpells[level]) do for i=v.memorizedCount, 1, -1 do local spell = deepcopy(v) if(i <= v.castableCount) then spell.castable = 1 else spell.castable = 0 end table.insert(out, spell) end end return out end showPriestMemorizationFlash = false function refreshPriestBook() if currentSpellLevel == nil then currentSpellLevel = 1 end if currentSpellLevel > 7 then currentSpellLevel = 7 end if characters[id].hasClericBook then rgBookPriestSpells = characters[id].priestSpells[currentSpellLevel] local rgSpellCountDiv = #(rgBookPriestSpells)/3 if rgIsNthNumber(#(rgBookPriestSpells)+1,3) == false then rgSpellCountDiv = rgSpellCountDiv+1 end rgBookSpells = { } for index = 1, rgSpellCountDiv, 1 do table.insert(rgBookSpells,{rgBookPriestSpells[(3*index)-2],rgBookPriestSpells[(3*index)-1],rgBookPriestSpells[(3*index)]}) end newBottomSpells = filterMemorizedPriestSpells() rgNewBottomSpells1 = rgFilterMemorizedPriestSpellLevels(1) rgNewBottomSpells2 = rgFilterMemorizedPriestSpellLevels(2) rgNewBottomSpells3 = rgFilterMemorizedPriestSpellLevels(3) rgNewBottomSpells4 = rgFilterMemorizedPriestSpellLevels(4) rgNewBottomSpells5 = rgFilterMemorizedPriestSpellLevels(5) rgNewBottomSpells6 = rgFilterMemorizedPriestSpellLevels(6) rgNewBottomSpells7 = rgFilterMemorizedPriestSpellLevels(7) if showPriestMemorizationFlash == true then --createMageMemorizationSparkle(0,0,36,36,"memorizedListMage", findFirstDifferenceInSpellList(bottomSpells, newBottomSpells)) --createMageMemorizationSparkle(0,0,36,36,"rgBottomSpell1", -1) --showMageMemorizationFlash = false end bottomSpells = newBottomSpells bottomSpellsPlaceHolder = makeBlankTable(characters[id].priestDetails[currentSpellLevel].maxMemorized) rgBottomSpells1 = rgNewBottomSpells1 rgBottomSpells2 = rgNewBottomSpells2 rgBottomSpells3 = rgNewBottomSpells3 rgBottomSpells4 = rgNewBottomSpells4 rgBottomSpells5 = rgNewBottomSpells5 rgBottomSpells6 = rgNewBottomSpells6 rgBottomSpells7 = rgNewBottomSpells7 rgBottomSpellsPlaceHolder1 = makeBlankTable(characters[id].priestDetails[1].maxMemorized) rgBottomSpellsPlaceHolder2 = makeBlankTable(characters[id].priestDetails[2].maxMemorized) rgBottomSpellsPlaceHolder3 = makeBlankTable(characters[id].priestDetails[3].maxMemorized) rgBottomSpellsPlaceHolder4 = makeBlankTable(characters[id].priestDetails[4].maxMemorized) rgBottomSpellsPlaceHolder5 = makeBlankTable(characters[id].priestDetails[5].maxMemorized) rgBottomSpellsPlaceHolder6 = makeBlankTable(characters[id].priestDetails[6].maxMemorized) rgBottomSpellsPlaceHolder7 = makeBlankTable(characters[id].priestDetails[7].maxMemorized) rgBottomSpells = { {rgBottomSpells1,characters[id].priestDetails[1].maxMemorized,1,1} } if characters[id].priestDetails[1].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells1,characters[id].priestDetails[1].maxMemorized,1,14}) end table.insert(rgBottomSpells,{rgBottomSpells2,characters[id].priestDetails[2].maxMemorized,2,1}) if characters[id].priestDetails[2].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells2,characters[id].priestDetails[2].maxMemorized,2,14}) end table.insert(rgBottomSpells,{rgBottomSpells3,characters[id].priestDetails[3].maxMemorized,3,1}) if characters[id].priestDetails[3].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells3,characters[id].priestDetails[3].maxMemorized,3,14}) end table.insert(rgBottomSpells,{rgBottomSpells4,characters[id].priestDetails[4].maxMemorized,4,1}) if characters[id].priestDetails[4].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells4,characters[id].priestDetails[4].maxMemorized,4,14}) end table.insert(rgBottomSpells,{rgBottomSpells5,characters[id].priestDetails[5].maxMemorized,5,1}) if characters[id].priestDetails[5].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells5,characters[id].priestDetails[5].maxMemorized,5,14}) end table.insert(rgBottomSpells,{rgBottomSpells6,characters[id].priestDetails[6].maxMemorized,6,1}) if characters[id].priestDetails[6].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells6,characters[id].priestDetails[6].maxMemorized,6,14}) end table.insert(rgBottomSpells,{rgBottomSpells7,characters[id].priestDetails[7].maxMemorized,7,1}) if characters[id].priestDetails[7].maxMemorized > 13 then table.insert(rgBottomSpells,{rgBottomSpells7,characters[id].priestDetails[7].maxMemorized,7,14}) end else bookSpells = characters[id].priestSpells[currentSpellLevel] local rgSpellCountDiv = #(bookSpells)/3 if rgIsNthNumber(#(bookSpells)+1,3) == false then rgSpellCountDiv = rgSpellCountDiv+1 end rgBookSpells = { } for index = 1, rgSpellCountDiv, 1 do table.insert(rgBookSpells,{bookSpells[(3*index)-2],bookSpells[(3*index)-1],bookSpells[(3*index)]}) end bottomSpells = {} bottomSpellsPlaceHolder = {} rgBottomSpells = { {{},0,1,1} ,{{},0,2,1} ,{{},0,3,1} ,{{},0,4,1} ,{{},0,5,1} ,{{},0,6,1} ,{{},0,7,1} } rgBottomSpells1 = {} rgBottomSpells2 = {} rgBottomSpells3 = {} rgBottomSpells4 = {} rgBottomSpells5 = {} rgBottomSpells6 = {} rgBottomSpells7 = {} rgBottomSpellsPlaceHolder1 = {} rgBottomSpellsPlaceHolder2 = {} rgBottomSpellsPlaceHolder3 = {} rgBottomSpellsPlaceHolder4 = {} rgBottomSpellsPlaceHolder5 = {} rgBottomSpellsPlaceHolder6 = {} rgBottomSpellsPlaceHolder7 = {} end end function setPriestBookLevel(num) lastCurrentBookSpell = 0 currentBookSpell = 0 currentSpellLevel = num priestScreen:SetSpellLevel(num-1) refreshPriestBook() end function createPriestMemorizationSparkle(x,y,w,h, fromList, listIndex) Infinity_InstanceAnimation("TEMPLATE_priestMemorizationSparkle","FLASHBR",x,y,w,h,fromList,listIndex) memorizationFlashes[currentAnimationID][1] = true memorizationFlashes[currentAnimationID][3] = false currentAnimationID = currentAnimationID + 1 if currentAnimationID > #(memorizationFlashes) then currentAnimationID = 1 end end function unmemorizingPriestSpell(resref) local index = 1 local sparkle = -1 for index = 1, #(bottomSpells), 1 do if bottomSpells[index].resref == resref then sparkle = index if bottomSpells[index].castable == 0 then break end end end --createPriestMemorizationSparkle(0, 0, 36, 36, 'memorizedListPriest', sparkle) end --function unmemorizePriestSpell(slot) -- showPriestMemorizationFlash = false -- priestScreen:UnmemorizeSpell( bottomSpells[slot].level, bottomSpells[slot].memorizedIndex ) -- Infinity_PlaySound('GAM_44') --end function unmemorizePriestSpell(level,slot) showPriestMemorizationFlash = false if level == 1 and rgBottomSpells1[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells1[slot].level, rgBottomSpells1[slot].memorizedIndex ) elseif level == 2 and rgBottomSpells2[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells2[slot].level, rgBottomSpells2[slot].memorizedIndex ) elseif level == 3 and rgBottomSpells3[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells3[slot].level, rgBottomSpells3[slot].memorizedIndex ) elseif level == 4 and rgBottomSpells4[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells4[slot].level, rgBottomSpells4[slot].memorizedIndex ) elseif level == 5 and rgBottomSpells5[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells5[slot].level, rgBottomSpells5[slot].memorizedIndex ) elseif level == 6 and rgBottomSpells6[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells6[slot].level, rgBottomSpells6[slot].memorizedIndex ) elseif level == 7 and rgBottomSpells7[slot] then priestScreen:UnmemorizeSpell( rgBottomSpells7[slot].level, rgBottomSpells7[slot].memorizedIndex ) end Infinity_PlaySound('GAM_44') local wid = (slot*36) + 10 if slot > 13 then wid = ((slot-13)*36)+10 end createPriestMemorizationSparkle(wid, 0, 50, 50, 'rgMemorizedListPriest', -1) end function rgIncrementPriestBookLevel(level) if level < 7 then setPriestBookLevel(level + 1) end end function rgDecrementPriestBookLevel(level) if level > 1 then setPriestBookLevel(level - 1) end end ` menu { name 'PRIEST' align center center onopen " showPriestMemorizationFlash = false --pushSidebars() Infinity_PushMenu('RG_MENU_BAR') popSidebars() prpage = nil setPriestBookLevel(1) currentAnimationID = 1 updateCounterMemorizationSparkles = 1 rgSpellDescString = nil " onclose " --popSidebars() Infinity_PopMenu('RG_MENU_BAR') --Infinity_PopMenu('RG_JOURNAL') " button { on escape action " --Return to world screen on escape e:SelectEngine(worldScreen) " } template { label { enabled "showMemorizationSparkle(instanceId)" ignoreEvents area 0 0 45 42 bam "FLASHBR" usealpha lua "true" frame lua "memorizationFlashes[instanceId][2]" align center center } name "TEMPLATE_priestMemorizationSparkle" } label { area 0 0 768 768 bam rgdbcpri frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbcpri sequence lua "RgUISkin" frame 1 scaleToClip } label { area 114 106 322 26 ScaleToClip text lua "rgString(rgCharDescString1(characters[id]))" text style 'rg_trajan' text color '$' text align left center } button { area 452 98 64 93 portrait 0 bam rgdport2 enabled "Infinity_GetNumCharacters() > 0" ScaleToClip sequence lua "RgUISkin" clickable lua "Infinity_GetNumCharacters() > 0" glow lua "draggedPortrait and draggedPortrait ~= 0" action "Infinity_OnPortraitLClick(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(0)" } button { area 531 98 64 93 portrait 1 bam rgdport2 enabled "Infinity_GetNumCharacters() > 1" ScaleToClip sequence lua "RgUISkin" clickable lua "Infinity_GetNumCharacters() > 1" glow lua "draggedPortrait and draggedPortrait ~= 1" action "Infinity_OnPortraitLClick(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(1)" } button { name 'rgmagpor3' area 610 98 64 93 portrait 2 bam rgdport2 enabled "Infinity_GetNumCharacters() > 2" ScaleToClip sequence lua "RgUISkin" clickable lua "Infinity_GetNumCharacters() > 2" glow lua "draggedPortrait and draggedPortrait ~= 2" action "Infinity_OnPortraitLClick(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(2)" } button { area 689 98 64 93 portrait 3 bam rgdport2 enabled "Infinity_GetNumCharacters() > 3" ScaleToClip sequence lua "RgUISkin" clickable lua "Infinity_GetNumCharacters() > 3" glow lua "draggedPortrait and draggedPortrait ~= 3" action "Infinity_OnPortraitLClick(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(3)" } button { area 768 98 64 93 portrait 4 bam rgdport2 enabled "Infinity_GetNumCharacters() > 4" ScaleToClip sequence lua "RgUISkin" clickable lua "Infinity_GetNumCharacters() > 4" glow lua "draggedPortrait and draggedPortrait ~= 4" action "Infinity_OnPortraitLClick(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(4)" } button { area 847 98 64 93 portrait 5 bam rgdport2 enabled "Infinity_GetNumCharacters() > 5" ScaleToClip sequence lua "RgUISkin" clickable lua "Infinity_GetNumCharacters() > 5" glow lua "draggedPortrait and draggedPortrait ~= 5" action "Infinity_OnPortraitLClick(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(5)" } label { area 139 167 219 27 text lua "Infinity_FetchString(11945) .. ': ' .. Infinity_FetchString(7192) .. ' ' .. currentSpellLevel" text style "rg_trajan" text color '5' } label { area 939 167 284 27 enabled "rgSpellDescString == nil" --text 'MEMORIZED_LABEL' text lua "priestPageInfo()" text style "rg_trajan" align right center text color '5' } button { area 377 168 30 30 bam RGDAROW1 sequence 2 ScaleToClip align left top action "rgDecrementPriestBookLevel(currentSpellLevel)" } button { area 410 168 30 30 bam RGDAROW1 sequence 3 ScaleToClip align left top action "rgIncrementPriestBookLevel(currentSpellLevel)" } list { column { width 33 label { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top ScaleToClip } label { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil" area 0 0 50 50 icon lua "rgBookSpells[rowNumber][1].icon" } label { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString( rgBookSpells[rowNumber][1].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgBookSpells[rowNumber][2] and rgBookSpells[rowNumber][2].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top ScaleToClip } label { enabled "rgBookSpells[rowNumber][2] and rgBookSpells[rowNumber][2].icon ~= nil" area 0 0 50 50 icon lua "rgBookSpells[rowNumber][2].icon" } label { enabled "rgBookSpells[rowNumber][2] and rgBookSpells[rowNumber][2].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString( rgBookSpells[rowNumber][2].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top ScaleToClip } label { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil" area 0 0 50 50 icon lua "rgBookSpells[rowNumber][3].icon" } label { enabled "rgBookSpells[rowNumber][3] and rgBookSpells[rowNumber][3].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString( rgBookSpells[rowNumber][3].name)" text style "rg_normal_spell" } } area 136 212 530 500 name "bookListPriest" rowheight 60 table "rgBookSpells" var currentBookSpell scrollbar 'rgdscrl1' sound "" hidehighlight action " if priestBookEnabled == true then local rgCurrentBookSpell = currentBookSpell + cellNumber - 1 if #bottomSpells < #bottomSpellsPlaceHolder and rgBookSpells[currentBookSpell][cellNumber].icon ~= nil then createPriestMemorizationSparkle((1 + (167 * (cellNumber-1))), 0, 60, 60, 'bookListPriest', -1) Infinity_PlaySound('GAM_24') showPriestMemorizationFlash = true end priestScreen:MemorizeSpell( rgBookSpells[currentBookSpell][cellNumber].level, rgBookSpells[currentBookSpell][cellNumber].index ) --priestScreen:MemorizeSpell( characters[id].priestSpells[currentSpellLevel][currentBookSpell].level, characters[id].priestSpells[currentSpellLevel][currentBookSpell].index ) end " actionalt " rgSpellDescString = rgBookSpells[currentBookSpell][cellNumber].description " } button { enabled "rgBookSpells[rowNumber][1] and rgBookSpells[rowNumber][1].icon ~= nil and priestBookEnabled == false" area 136 212 530 500 fill 0 0 0 80 scaleToClip } list { column { width 10 label { enabled "rgBottomSpells[rowNumber][4] == 1" area 6 0 36 44 text lua "rgGetSpellLvlButtText(rgBottomSpells[rowNumber][3])" bam lua "rgGetSpellLvlButtBam()" text style 'rg_trajan' opacity lua "rgGetSpellLvlButtOpacity()" text color '5' text point 14 ScaleToClip align left top text align center center frame lua "rgGetSpellButtHighlight(rgBottomSpells[rowNumber][3])" } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= rgBottomSpells[rowNumber][4]" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,0).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,0).icon" greyscale lua "rgBottomShort(rowNumber,0).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,0).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,0).icon" greyscale lua "rgBottomShort(rowNumber,0).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+1)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,1).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,1).icon" greyscale lua "rgBottomShort(rowNumber,1).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,1).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,1).icon" greyscale lua "rgBottomShort(rowNumber,1).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+1) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+2)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,2).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,2).icon" greyscale lua "rgBottomShort(rowNumber,2).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,2).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,2).icon" greyscale lua "rgBottomShort(rowNumber,2).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+2) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+3)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,3).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,3).icon" greyscale lua "rgBottomShort(rowNumber,3).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,3).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,3).icon" greyscale lua "rgBottomShort(rowNumber,3).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+3) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+4)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,4).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,4).icon" greyscale lua "rgBottomShort(rowNumber,4).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,4).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,4).icon" greyscale lua "rgBottomShort(rowNumber,4).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+4) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+5)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,5).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,5).icon" greyscale lua "rgBottomShort(rowNumber,5).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,5).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,5).icon" greyscale lua "rgBottomShort(rowNumber,5).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+5) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+6)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,6).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,6).icon" greyscale lua "rgBottomShort(rowNumber,6).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,6).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,6).icon" greyscale lua "rgBottomShort(rowNumber,6).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+6) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+7)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,7).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,7).icon" greyscale lua "rgBottomShort(rowNumber,7).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,7).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,7).icon" greyscale lua "rgBottomShort(rowNumber,7).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+7) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+8)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,8).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,8).icon" greyscale lua "rgBottomShort(rowNumber,8).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,8).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,8).icon" greyscale lua "rgBottomShort(rowNumber,8).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+8) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+9)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,9).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,9).icon" greyscale lua "rgBottomShort(rowNumber,9).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,9).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,9).icon" greyscale lua "rgBottomShort(rowNumber,9).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+9) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+10)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,10).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,10).icon" greyscale lua "rgBottomShort(rowNumber,10).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,10).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,10).icon" greyscale lua "rgBottomShort(rowNumber,10).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+10) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+11)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,11).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,11).icon" greyscale lua "rgBottomShort(rowNumber,11).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,11).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,11).icon" greyscale lua "rgBottomShort(rowNumber,11).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+11) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } column { width 7 label { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+12)" area 0 4 36 36 bam "rgdwspb3" align left top ScaleToClip } label { enabled "rgBottomShort(rowNumber,12).icon ~= nil and rgHdIcons == 0" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,12).icon" greyscale lua "rgBottomShort(rowNumber,12).castable == 0" align center center } label { enabled "rgBottomShort(rowNumber,12).icon ~= nil and rgHdIcons == 1" area 0 4 36 36 bam lua "rgBottomShort(rowNumber,12).icon" greyscale lua "rgBottomShort(rowNumber,12).castable == 0" scaleToClip } button { enabled "rgBottomSpells[rowNumber][2] >= (rgBottomSpells[rowNumber][4]+12) and priestBookEnabled == false" area 0 4 36 36 fill 0 0 0 80 scaleToClip } } area 690 210 540 500 name "rgMemorizedListPriest" enabled "rgSpellDescString == nil" hideHighlight rowheight 50 table "rgBottomSpells" sound "" var currentBottomSpell scrollbar 'rgdscrl1' action " local level = rgBottomSpells[currentBottomSpell][3] local firstSpell = rgBottomSpells[currentBottomSpell][4] local slotid = cellNumber+firstSpell-2 if cellNumber == 1 then setPriestBookLevel(level) else setPriestBookLevel(level) unmemorizePriestSpell(level,slotid) end " } button { enabled "rgSpellDescString == nil and priestBookEnabled == false" area 730 210 510 500 } text { area 743 210 505 495 text lua "Infinity_FetchString(rgSpellDescString)" text style "normal" text color '5' text point 12 scrollbar 'rgdscrl1' enabled "rgSpellDescString ~= nil" } button { area 1196 164 36 36 enabled "rgSpellDescString ~= nil" --text "X" bam rgdwbut sequence 0 ScaleToClip align left top --text style "rg_trajan" --text align center center --text color '5' action "rgSpellDescString = nil" } } ` versionString = "" function canClickSaveLoad() return game:IsClient() == false end ` menu { name "ESC_MENU" ignoreesc align center center onOpen " RgOptionsMode = 0 rgOptLang = 0 --Infinity_PushMenu('RG_MENU_BAR') Infinity_PushMenu('RG_START_OPTIONS_BAR') Infinity_PopMenu('RG_RADAR_SETTINGS') versionString = CBaldurChitin:GetVersionString() popSidebars() Infinity_SetBackground('RG_ESC_BACKGROUND') " onClose " --Infinity_PopMenu('RG_MENU_BAR') --Infinity_PopMenu('RG_OPTIONS_BAR') Infinity_PopMenu('RG_START_OPTIONS_BAR') --Infinity_PopMenu('RG_JOURNAL') " label { area 0 0 1365 768 } --label --{ -- area 488 96 350 44 -- text "OPTIONS_TITLE" -- text style "title" --} label { area 480 725 405 43 text lua "versionString" text style "normal" text align center center } button { bam rgdmbut2 ScaleToClip area 965 500 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('RETURN_GAME_BUTTON')" action " e:SelectEngine( worldScreen ); " } button { bam rgdmbut2 ScaleToClip area 965 200 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('LOAD_GAME_BUTTON')" clickable lua "canClickSaveLoad()" action " popup2Button(19531, 'LOAD_BUTTON', function() optionsScreen:LoadGame() end) " } button { bam rgdmbut2 ScaleToClip area 965 400 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('QUIT_GAME_BUTTON')" action " if e:IsTouchUI() then popup3Button(16456, 'CANCEL_BUTTON', nil, 'MAIN_MENU_BUTTON', function() optionsScreen:QuitGame() end, 'SAVE_BUTTON', function() optionsScreen:SaveGame(0) end ) else popup4Button(16456, 'CANCEL_BUTTON', nil, 'MAIN_MENU_BUTTON', function() rgSaveCoordinates(); optionsScreen:QuitGame() end, 'QUIT_BUTTON', function() rgSaveCoordinates(); Infinity_ShutdownGame() end, 'SAVE_BUTTON', function() optionsScreen:SaveGame(0) end ) end " } button { bam rgdmbut2 ScaleToClip area 965 300 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('SAVE_GAME_BUTTON')" clickable lua "canClickSaveLoad()" action " optionsScreen:SaveGame(0) " } label { area 480 180 405 405 bam rgdblogo frame lua "rgGetTitleFrame()" scaleToClip } } ` mapnoteSettings = {} showNotes = 1 function showNote(instanceId) if(mapScreen:IsNoteVisible(mapnoteSettings[instanceId].worldCoord.x, mapnoteSettings[instanceId].worldCoord.y) and mapnoteSettings[instanceId].screenCoord.x >= 0 and mapnoteSettings[instanceId].screenCoord.y >= 0) then return showNotes else return false end end notesAlpha = 0 function getAndIncrementNotesAlpha() if(notesAlpha < .99) then notesAlpha = notesAlpha + 0.075 end if(notesAlpha > 1) then notesAlpha = 1 end return notesAlpha end function rgGetMapCheckboxFrame() if mapScreen:DisplayExploredMap() then return 2 else return 0 end end function rgGetOnlyAreaMapName() if rgGetGameEngineString(32898,32898,103241,40945) == rgGetGameEngineString(14648,14648,16310,14648) then return false else return true end end ` menu { name 'AREA_MAP_TITLE' align center top --opacity lua "notesAlpha" ignoreEsc label { enabled "RgUISkin < 3" area 594 0 595 78 bam 'rgdabcg1' frame 1 sequence lua "RgUISkin" ScaleToClip } label { enabled "RgUISkin < 3" name "AREA_MAP_BACKGROUND" area 0 0 595 78 bam 'rgdabcg1' frame 0 sequence lua "RgUISkin" ScaleToClip } label { enabled "RgUISkin == 3" area 594 8 595 70 bam 'rgdabcg1' frame 1 sequence lua "RgUISkin" ScaleToClip } label { enabled "RgUISkin == 3" name "AREA_MAP_BACKGROUND" area 0 8 595 70 bam 'rgdabcg1' frame 0 sequence lua "RgUISkin" ScaleToClip } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 42 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 108 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 174 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 335 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 401 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 467 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 533 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 599 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 665 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 731 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 797 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { enabled "RgUISkin > 0 and RgUISkin < 3" area 957 10 58 58 bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 475 82 240 26 enabled "rgGetOnlyAreaMapName()" name "AREA_MAP_TITLE" text lua "rgGetGameEngineString(32898,32898,103241,40945)" text style 'rg_trajan' text color '$' text shadow 1 align center center } --label --{ -- area 40 8 120 46 -- action "mapScreen:ToggleDisplayExploredMap()" -- text "WORLDMAP_HIGHLIGHT_LABEL" -- text style "normal" -- text align left center -- --} button { area 40 10 62 58 bam rgdabut1 scaleToClip sequence 2 frame lua "rgGetMapCheckboxFrame()" tooltip lua "getUiString('WORLDMAP_HIGHLIGHT_LABEL')" --sequence lua "mapScreen:DisplayExploredMap() and 0 or 1" action "mapScreen:ToggleDisplayExploredMap()" } button { area 106 10 62 58 bam rgdabut1 scaleToClip sequence 1 tooltip lua "getUiString('WORLD_MAP_NOTES_LABEL')" --sequence lua "showNotes == 1 and 0 or 1" toggle showNotes } button { area 172 10 62 58 bam rgdabut1 scaleToClip tooltip lua "getUiString('WORLD_MAP_BUTTON')" action " worldMapScreen:StartWorldMap(0) e:SelectEngine(worldMapScreen) " } } ` areaMapHover = -1 function showAreaMapNoteTooltip(id) if id == areaMapHover then return true else return false end end rgModernHudTemp = 0 ` menu { name 'AREA_MAP' align left top ignoreesc onOpen " rgModernHudTemp = RgIsModernHud RgIsModernHud = 0 --rgRecIsOpened = 0 --rgCloseOnKeypressJ = 0 --rgCloseOnKeypressK = 0 Infinity_PopMenu('CHARACTER') Infinity_PopMenu('RGWORLD_MESSAGES') Infinity_PopMenu('WORLD_MESSAGES') Infinity_PopMenu('WORLD_ACTIONBAR') --local w, h = Infinity_GetScreenSize() --Infinity_SetArea('AREA_MAP_TITLE', (w/2)-120, nil, nil,nil) pushSidebars(); Infinity_PushMenu('AREA_MAP_TITLE'); notesAlpha = 0 Infinity_PushMenu('RG_MENU_BAR') " onClose " RgIsModernHud = rgModernHudTemp popSidebars(); Infinity_PopMenu('AREA_MAP_TITLE'); Infinity_PopMenu('RG_MENU_BAR') " --opacity lua "getAndIncrementNotesAlpha()" template { button { enabled "showNote(instanceId)" area 0 0 45 42 bam "FLAG1" sequence lua "mapnoteSettings[instanceId].sequence" tooltip force lua "showAreaMapNoteTooltip(instanceId)" tooltip force top tooltip lua "Infinity_FetchString(mapnoteSettings[instanceId].text)" tooltip position 3 actionAlt " mapScreen:OnUserNoteClick(instanceId, mapnoteSettings[instanceId].worldCoord.x, mapnoteSettings[instanceId].worldCoord.y) Infinity_PushMenu('NOTE_ADD',0,0) " actionEnter " areaMapHover = instanceId " actionExit " areaMapHover = -1 " } name "TEMPLATE_mapnote" } } ` colorChoice = nil ` menu { name 'NOTE_ADD' align center center onOpen " if colorChoice == nil then colorChoice = Infinity_FindUIItemByName('BUTTON_mapNoteColor_' .. mapScreen:GetColorChoice()) end " onClose " colorChoice = nil " modal label { area 0 0 657 234 mosaic GUIERR6 } label { area 32 24 596 68 rectangle 0 } edit { name "mapNoteEditArea" area 40 32 584 56 var mapNoteEdit scrollbar 'rgdscrl1' text style "edit" fill 112 111 111 64 } button { area 440 170 200 40 bam GUIBUTNT text style "button" text "DONE_BUTTON" action " mapScreen:OnUserNoteDoneButtonClick() Infinity_PopMenu('NOTE_ADD',0,0) " } button { on escape area 228 170 200 40 bam GUIBUTNT text style "button" text "CANCEL_BUTTON" action " Infinity_PopMenu('NOTE_ADD',0,0) " } button { area 18 170 200 40 bam GUIBUTNT text style "button" text "DELETE_BUTTON" action " mapScreen:OnUserNoteDeleteButtonClick() Infinity_PopMenu('NOTE_ADD',0,0) " } button { name "BUTTON_mapNoteColor_0" area 29 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 0 action " mapScreen:OnColorChoice(0) " } button { name "BUTTON_mapNoteColor_1" area 108 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 1 action " mapScreen:OnColorChoice(1) " } button { name "BUTTON_mapNoteColor_2" area 187 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 2 action " mapScreen:OnColorChoice(2) " } button { name "BUTTON_mapNoteColor_3" area 266 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 3 action " mapScreen:OnColorChoice(3) " } button { name "BUTTON_mapNoteColor_4" area 345 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 4 action " mapScreen:OnColorChoice(4) " } button { name "BUTTON_mapNoteColor_5" area 424 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 5 action " mapScreen:OnColorChoice(5) " } button { name "BUTTON_mapNoteColor_6" area 503 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 6 action " mapScreen:OnColorChoice(6) " } button { name "BUTTON_mapNoteColor_7" area 582 98 45 42 bam "FLAG1" highlightgroup colorChoice sequence 7 action " mapScreen:OnColorChoice(7) " } } ` rgScrollWorldMapOnce = 0 function rgScrollWorldMap() if rgScrollWorldMapOnce == 0 then local w, h = Infinity_GetScreenSize() local n = h-768+150 local m = 500 if w < 1470 then local o = 1470 - w m = 500 - o end worldMapScreen:OnMapMouseDown(0,0) worldMapScreen:OnMapMouseMove(m,n) rgScrollWorldMapOnce = 1 end end ` menu { name "WORLD_MAP" align left top onOpen " rgScrollWorldMapOnce = 0 local w, h = Infinity_GetScreenSize() local c = w/2 local d = h/2 local x = 0 local y = 0 if rgGameEngine == 0 or rgGameEngine == 1 or rgGameEngine == 3 then x = c - 595 Infinity_SetArea('rgWorldMap1',x+95,78,1000,h-78) Infinity_SetArea('rgWorldMapBac1',x+87,78,1014,2000) Infinity_SetArea('rgWorldMapBcg1',x,0,595,78) Infinity_SetArea('rgWorldMapBcg2',x+594,0,595,78) Infinity_SetArea('rgWorldMapTitl',x+295,17,600,44) Infinity_SetArea('rgWorldMapButt',x+1122,18,42,42) Infinity_SetArea('rgWorldMap4',0,0,0,0) Infinity_SetArea('rgWorldMap2',0,0,0,0) Infinity_SetArea('rgWorldMapBac2',0,0,0,0) Infinity_SetArea('rgWorldMapBcg3',0,0,0,0) elseif rgGameEngine == 2 then if w < 1484 then x = c - 682 y = d - 384 Infinity_SetArea('rgWorldMap2',x,y+78,1365,690) Infinity_SetArea('rgWorldMapBac2',x,y+78,1365,690) Infinity_SetArea('rgWorldMapBcg1',x,y,595,78) Infinity_SetArea('rgWorldMapBcg2',x+594,y,595,78) Infinity_SetArea('rgWorldMapBcg3',x+770,y,595,78) Infinity_SetArea('rgWorldMapTitl',x+382,y+17,600,44) Infinity_SetArea('rgWorldMapButt',x+1298,y+18,42,42) else x = c - 742 y = d - 392 Infinity_SetArea('rgWorldMap2',x+7,y+78,1470,700) Infinity_SetArea('rgWorldMapBac2',x,y+71,1484,714) Infinity_SetArea('rgWorldMapBcg1',x,y,595,78) Infinity_SetArea('rgWorldMapBcg2',x+594,y,595,78) Infinity_SetArea('rgWorldMapBcg3',x+889,y,595,78) Infinity_SetArea('rgWorldMapTitl',x+442,y+17,600,44) Infinity_SetArea('rgWorldMapButt',x+1417,y+18,42,42) end Infinity_SetArea('rgWorldMap1',0,0,0,0) Infinity_SetArea('rgWorldMapBac1',0,0,0,0) Infinity_SetArea('rgWorldMap4',0,0,0,0) elseif rgGameEngine == 4 then if w < 1550 then x = c - 682 Infinity_SetArea('rgWorldMap4',x,78,1365,690) Infinity_SetArea('rgWorldMapBcg1',x,0,595,78) Infinity_SetArea('rgWorldMapBcg2',x+594,0,595,78) Infinity_SetArea('rgWorldMapBcg3',x+770,0,595,78) Infinity_SetArea('rgWorldMapTitl',x+382,17,600,44) Infinity_SetArea('rgWorldMapButt',x+1298,18,42,42) else x = c - 775 Infinity_SetArea('rgWorldMap4',x,78,1550,h-78) Infinity_SetArea('rgWorldMapBcg1',x,0,595,78) Infinity_SetArea('rgWorldMapBcg2',x+594,0,595,78) Infinity_SetArea('rgWorldMapBcg3',x+955,0,595,78) Infinity_SetArea('rgWorldMapTitl',x+475,17,600,44) Infinity_SetArea('rgWorldMapButt',x+1483,18,42,42) end Infinity_SetArea('rgWorldMap1',0,0,0,0) Infinity_SetArea('rgWorldMapBac1',0,0,0,0) Infinity_SetArea('rgWorldMap2',0,0,0,0) Infinity_SetArea('rgWorldMapBac2',0,0,0,0) end " label { name "rgWorldMapBac2" enabled "rgGameEngine == 2" area 0 0 0 0 mosaic "rgdabox2" } label { name 'rgWorldMapBcg1' area 0 0 0 0 bam 'rgdabcg1' frame 0 sequence lua "RgUISkin" ScaleToClip } label { name 'rgWorldMapBcg2' area 0 0 0 0 bam 'rgdabcg1' frame 1 sequence lua "RgUISkin" ScaleToClip } label { name 'rgWorldMapBcg3' enabled "rgGameEngine == 2 or rgGameEngine == 4" area 0 0 0 0 bam 'rgdabcg1' frame 1 sequence lua "RgUISkin" ScaleToClip } label { name 'rgWorldMapTitl' area 0 0 0 0 text "WORLD_MAP_TITLE" text style 'rg_trajan' text color '$' align center center } label { area 0 0 0 0 text lua "rgScrollWorldMap()" } button { name 'rgWorldMapButt' area 0 0 0 0 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " worldMapScreen:OnCancelButtonClick() " } label { name 'rgWorldMapBac1' enabled "rgGameEngine == 0 or rgGameEngine == 1 or rgGameEngine == 3" area 0 0 0 0 mosaic "rgdabox1" } map { enabled "rgGameEngine == 0 or rgGameEngine == 1 or rgGameEngine == 3" area 0 0 0 0 name "rgWorldMap1" worldmap action " worldMapScreen:OnMapMouseDown(eventXCoord,eventYCoord) " actionDbl " worldMapScreen:TravelToSelected() " actionDrag " worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord) " } map { enabled "rgGameEngine == 2" area 0 0 0 0 name "rgWorldMap2" worldmap action " worldMapScreen:OnMapMouseDown(eventXCoord,eventYCoord) " actionDbl " worldMapScreen:TravelToSelected() " actionDrag " worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord) " } map { enabled "rgGameEngine == 4" area 0 0 0 0 name "rgWorldMap4" worldmap action " worldMapScreen:OnMapMouseDown(eventXCoord,eventYCoord) " actionDbl " worldMapScreen:TravelToSelected() " actionDrag " worldMapScreen:OnMapMouseMove(eventXCoord,eventYCoord) " } } ` chapterBackground = "" text_CHAPTERSCROLL = "" text_CHAPTERSCROLL_timeStart = 0 text_CHAPTERSCROLL_auto = 1 function UpdateChapterScroll(top, height, contentHeight) if(text_CHAPTERSCROLL_auto == 0) then --defer to default scrolling return nil end local dT = Infinity_GetClockTicks() - text_CHAPTERSCROLL_timeStart local timerCrawl = dT * -0.01 if megacredits ~= '' then timerCrawl = dT * -0.02 end local newTop = timerCrawl + height if(newTop + contentHeight + height < height) then return top end return newTop end function setChapterBackground(id) if chapterBackgrounds[id] == nil then chapterBackground = chapterBackgrounds[0] else chapterBackground = chapterBackgrounds[id] end --chapterBackground = chapterBackgrounds[id] end function rgGetBackgroundFrame() if rgGameEngine == 3 then --iwd return 1 else return 0 end end function getChapterArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgChapterBackground', nil, nil, screenWidth, screenHeight) Infinity_SetArea('rgChapterDoneButton', (screenWidth/2) + 10, screenHeight - 70, nil, nil) Infinity_SetArea('rgChapterReplayButton',(screenWidth/2) - 410 , screenHeight - 70, nil, nil) Infinity_SetArea('rgChapterText',screenWidth - 550, nil, nil, nil) Infinity_SetArea('rgChapterTextBcg',screenWidth - 565, nil, nil, nil) end function rgChapterNumber() if rgGameEngine == 4 then return '' else chapter = Infinity_GetMaxChapterPage() if chapterBackground == chapterBackgrounds[0] or chapterBackground == chapterBackgrounds[1] or chapterBackground == chapterBackgrounds[2] or chapterBackground == chapterBackgrounds[3] or chapterBackground == chapterBackgrounds[4] or chapterBackground == chapterBackgrounds[5] or chapterBackground == chapterBackgrounds[6] or chapterBackground == chapterBackgrounds[7]then return Infinity_FetchString(16202 + chapter) .. '\n' elseif chapterBackground == chapterBackgrounds[8] or chapterBackground == chapterBackgrounds[9] or chapterBackground == chapterBackgrounds[10] or chapterBackground == chapterBackgrounds[11] or chapterBackground == chapterBackgrounds[12] then return Infinity_FetchString(70004 + chapter) .. '\n' else return '' end end end ` menu { name 'CHAPTER' align left top ignoreEsc onopen " getChapterArea() text_CHAPTERSCROLL = rgChapterNumber() .. text_CHAPTERSCROLL " label { name "rgChapterBackground" area 0 0 1024 768 bam lua "chapterBackground" frame lua "rgGetBackgroundFrame()" scaleToClip } label { name "rgChapterTextBcg" area 36 131 466 552 bam rgdchbcg scaleToClip } text { --name "text_CHAPTERSCROLL_item" name "rgChapterText" area 36 146 436 522 text lua "text_CHAPTERSCROLL" text style normal scrollbar 'rgdscrl1' scrollbar func 'UpdateChapterScroll' scrollbar hide lua 'text_CHAPTERSCROLL_auto == 1' action " text_CHAPTERSCROLL_auto = 0 " } button { name "rgChapterDoneButton" area 524 706 400 70 bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip text lua "rgString('DONE_BUTTON')" pad 10 8 10 8 text style "button" clickable lua "chapterScreen:IsDoneButtonClickable()" action " chapterScreen:OnDoneButtonClick() " } button { name "rgChapterReplayButton" area 286 706 400 70 text lua "rgString('REPLAY_BUTTON')" bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text style "button" clickable lua "chapterScreen:IsReplayButtonClickable()" action " chapterScreen:OnReplayButtonClick() " } } menu { name 'CHAPTER_WAITING_FOR_PROVIDER' modal align center center label { area 0 0 465 500 mosaic GUIERR } label --Title { area 124 134 224 112 text "WAITING_FOR_OTHER_PLAYERS" text style "label" } } ` store = {} storeGroupItemsVar = 0 storeItemsVar = 0 function rgGetStoreSlotHighlight(highlight) if(highlight == 0) then return 0 else return 1 end end function getStoreSlotHighlight(highlight) if(highlight == 0) then return 0 else return 2 end end function storeSplitStack(count) storeScreen:SelectStoreItem(storeItemsVar-1, true); storeScreen:SetStoreItemCount(storeItemsVar-1, count); end function groupSplitStack(count) storeScreen:SelectGroupItem(storeGroupItemsVar-1, true); storeScreen:SetGroupItemCount(storeGroupItemsVar-1, count); end function checkContainerText(normalStr, containerStr) if(storeScreen:IsContainer()) then return getUiString(containerStr) else return getUiString(normalStr) end end function getStoreItemCount(row) local count = store.storeItems[rowNumber].item.count if(count ~= 0xFFFF) then return count else -- maxword, infinite count. return nil end end function rgIsOddNumber(num) local num1,num2=math.modf(num/2) if(num2==0)then return false else return true end end function rgIsEvenNumber(num) local num1,num2=math.modf(num/2) if(num2==0)then return true else return false end end function rgIsNthNumber(num,nth) local res = num - 1 local num1,num2=math.modf(res/nth) if(num2==0)then return true else return false end end function rgItemNameText(num) rgItemName = store.groupItems[num].label end function rgInvItemNameText(num) rgItemName = store.storeItems[num].label end function rgGetStoreItemQuantity(num) local str = store.storeItems[num].label local out = "" if str ~= nil then out = string.match(str,"%((.-)%)") end --one, two = string:match("([^%(]+),([^%(]+)") --local out = string:match(str,"%((.-)%)") return out end function rgGetGroupItemQuantity(num) local str = store.groupItems[num].label local out = "" if str ~= nil then out = string.match(str,"%((.-)%)") end return out end ` menu { name 'STORE_BUYSELL' align center center onOpen " storeScreen:UpdateBuySellPanel() rgItemName = '' rgInvItemName = '' --rgGroupItemCount = 0 rgIsBuySell = 1 " onClose " rgIsBuySell = 0 rgPopItemDesc() Infinity_SetOffset('ITEM_DESCRIPTION',0,0) " offset 0 30 ignoreEsc label { area 0 0 1030 636 --mosaic GUISTBSC } label { area 14 2 200 50 text lua "rgItemName" text style "normal" align left center } label { area 380 2 200 50 text lua "rgInvItemName" text style "normal" align left center } button { area 630 15 175 18 encumbrance } label { area 701 2 34 46 bam rgdcontb scaleToClip } list { column { width 17 label { enabled "store.storeItems[rowNumber] and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.storeItems[rowNumber] and rgIsNthNumber(rowNumber,6)" area 0 0 80 120 } label { enabled "store.storeItems[rowNumber] and rgIsNthNumber(rowNumber,6)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber].highlight)" icon lua "store.storeItems[rowNumber].item.icon" tint lua "store.storeItems[rowNumber].item.tint" usages lua "store.storeItems[rowNumber].amountSelected" --how many selected count lua "store.storeItems[rowNumber].item.stackSize" --How many to a stack align left top } label { enabled "store.storeItems[rowNumber] and rgIsNthNumber(rowNumber,6)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetStoreItemQuantity(rowNumber)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.storeItems[rowNumber] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,6)" text lua "store.storeItems[rowNumber].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.storeItems[rowNumber] and store.storeItems[rowNumber].valid == 0 and store.storeItems[rowNumber].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.storeItems[rowNumber] and store.storeItems[rowNumber].valid == 0 and store.storeItems[rowNumber].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 80 0 8 24 fill 0 0 0 150 } } column { width 17 label { enabled "store.storeItems[rowNumber+1] and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.storeItems[rowNumber+1] and rgIsNthNumber(rowNumber,6)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber+1].highlight)" icon lua "store.storeItems[rowNumber+1].item.icon" tint lua "store.storeItems[rowNumber+1].item.tint" usages lua "store.storeItems[rowNumber+1].amountSelected" --how many selected count lua "store.storeItems[rowNumber+1].item.stackSize" --How many to a stack align left top } label { enabled "store.storeItems[rowNumber+1] and rgIsNthNumber(rowNumber,6)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetStoreItemQuantity(rowNumber+1)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.storeItems[rowNumber+1] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,6)" text lua "store.storeItems[rowNumber+1].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.storeItems[rowNumber+1] and store.storeItems[rowNumber+1].valid == 0 and store.storeItems[rowNumber+1].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.storeItems[rowNumber+1] and store.storeItems[rowNumber+1].valid == 0 and store.storeItems[rowNumber+1].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 80 0 8 24 fill 0 0 0 150 } } column { width 17 label { enabled "store.storeItems[rowNumber+2] and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.storeItems[rowNumber+2] and rgIsNthNumber(rowNumber,6)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber+2].highlight)" icon lua "store.storeItems[rowNumber+2].item.icon" tint lua "store.storeItems[rowNumber+2].item.tint" usages lua "store.storeItems[rowNumber+2].amountSelected" --how many selected count lua "store.storeItems[rowNumber+2].item.stackSize" --How many to a stack align left top } label { enabled "store.storeItems[rowNumber+2] and rgIsNthNumber(rowNumber,6)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetStoreItemQuantity(rowNumber+2)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.storeItems[rowNumber+2] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,6)" text lua "store.storeItems[rowNumber+2].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.storeItems[rowNumber+2] and store.storeItems[rowNumber+2].valid == 0 and store.storeItems[rowNumber+2].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.storeItems[rowNumber+2] and store.storeItems[rowNumber+2].valid == 0 and store.storeItems[rowNumber+2].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 80 0 8 24 fill 0 0 0 150 } } column { width 17 label { enabled "store.storeItems[rowNumber+3] and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.storeItems[rowNumber+3] and rgIsNthNumber(rowNumber,6)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber+3].highlight)" icon lua "store.storeItems[rowNumber+3].item.icon" tint lua "store.storeItems[rowNumber+3].item.tint" usages lua "store.storeItems[rowNumber+3].amountSelected" --how many selected count lua "store.storeItems[rowNumber+3].item.stackSize" --How many to a stack align left top } label { enabled "store.storeItems[rowNumber+3] and rgIsNthNumber(rowNumber,6)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetStoreItemQuantity(rowNumber+3)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.storeItems[rowNumber+3] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,6)" text lua "store.storeItems[rowNumber+3] and store.storeItems[rowNumber+3].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.storeItems[rowNumber+3] and store.storeItems[rowNumber+3].valid == 0 and store.storeItems[rowNumber+3].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.storeItems[rowNumber+3] and store.storeItems[rowNumber+3].valid == 0 and store.storeItems[rowNumber+3].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 80 0 8 24 fill 0 0 0 150 } } column { width 17 label { enabled "store.storeItems[rowNumber+4] and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.storeItems[rowNumber+4] and rgIsNthNumber(rowNumber,6)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber+4].highlight)" icon lua "store.storeItems[rowNumber+4].item.icon" tint lua "store.storeItems[rowNumber+4].item.tint" usages lua "store.storeItems[rowNumber+4].amountSelected" --how many selected count lua "store.storeItems[rowNumber+4].item.stackSize" --How many to a stack align left top } label { enabled "store.storeItems[rowNumber+4] and rgIsNthNumber(rowNumber,6)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetStoreItemQuantity(rowNumber+4)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.storeItems[rowNumber+4] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,6)" text lua "store.storeItems[rowNumber+4].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.storeItems[rowNumber+4] and store.storeItems[rowNumber+4].valid == 0 and store.storeItems[rowNumber+4].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.storeItems[rowNumber+4] and store.storeItems[rowNumber+4].valid == 0 and store.storeItems[rowNumber+4].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 80 0 8 24 fill 0 0 0 150 } } column { width 17 label { enabled "store.storeItems[rowNumber+5] and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.storeItems[rowNumber+5] and rgIsNthNumber(rowNumber,6)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber+5].highlight)" icon lua "store.storeItems[rowNumber+5].item.icon" tint lua "store.storeItems[rowNumber+5].item.tint" usages lua "store.storeItems[rowNumber+5].amountSelected" --how many selected count lua "store.storeItems[rowNumber+5].item.stackSize" --How many to a stack align left top } label { enabled "store.storeItems[rowNumber+5] and rgIsNthNumber(rowNumber,6)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetStoreItemQuantity(rowNumber+5)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.storeItems[rowNumber+5] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,6)" text lua "store.storeItems[rowNumber+5].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.storeItems[rowNumber+5] and store.storeItems[rowNumber+5].valid == 0 and store.storeItems[rowNumber+5].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.storeItems[rowNumber+5] and store.storeItems[rowNumber+5].valid == 0 and store.storeItems[rowNumber+5].highlight == 0 and rgIsNthNumber(rowNumber,6)" area 80 0 8 24 fill 0 0 0 150 } } enabled "rgStoreMode == 0" area 10 74 580 480 hidehighlight rowheight dynamic table "store.storeItems" var "storeItemsVar" --rowbackground GUISTBK2 scrollbar 'rgdscrl1' action " storeItemsVar = storeItemsVar + cellNumber - 1 rgItemName = '' if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local highlight = true if(store.storeItems[storeItemsVar].highlight == 1) then highlight = false end storeScreen:SelectStoreItem( storeItemsVar - 1, highlight) rgItemName = store.storeItems[storeItemsVar].label end end if(store.storeItems[storeItemsVar].highlight == 0) then rgItemName = '' end if storeScreen:IsContainer() then local count = store.storeItems[storeItemsVar].item.count local stock = store.storeItems[storeItemsVar].numInStock if (count > 1) then storeScreen:SetStoreItemCount(storeItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetStoreItemCount(storeItemsVar - 1, stock) end end " actionalt " storeItemsVar = storeItemsVar + cellNumber - 1 Infinity_SetOffset('ITEM_DESCRIPTION',300, 30) showItemDescription(store.storeItems[storeItemsVar].item, 1) " actionDbl " storeItemsVar = storeItemsVar + cellNumber - 1 if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local maxCount = store.storeItems[storeItemsVar].maxCount if(maxCount > 1) then popupRequester(maxCount, storeSplitStack, false) end end end " --actionEnter --" -- rgItemName = '' --" --actionExit --" -- rgItemName = '' --" } --inventory list { column { width 25 label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber].highlight)" tint lua "store.groupItems[rowNumber].item.tint" icon lua "store.groupItems[rowNumber].item.icon" count lua "store.groupItems[rowNumber].count" usages lua "store.groupItems[rowNumber].item.usages" align left top } label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber].value" text style "rg_normal_small" text color '$' text align center center } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber] and store.groupItems[rowNumber].valid == 0 and store.groupItems[rowNumber].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber] and store.groupItems[rowNumber].valid == 0 and store.groupItems[rowNumber].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } column { width 25 label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber+1].highlight)" tint lua "store.groupItems[rowNumber+1].item.tint" icon lua "store.groupItems[rowNumber+1].item.icon" count lua "store.groupItems[rowNumber+1].count" usages lua "store.groupItems[rowNumber+1].item.usages" align left top } label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber+1)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber+1] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber+1].value" text style "rg_normal_small" text color '$' text align center center } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber+1] and store.groupItems[rowNumber+1].valid == 0 and store.groupItems[rowNumber+1].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber+1] and store.groupItems[rowNumber+1].valid == 0 and store.groupItems[rowNumber+1].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } column { width 25 label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber+2].highlight)" tint lua "store.groupItems[rowNumber+2].item.tint" icon lua "store.groupItems[rowNumber+2].item.icon" count lua "store.groupItems[rowNumber+2].count" usages lua "store.groupItems[rowNumber+2].item.usages" align left top } label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber+2)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber+2] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber+2].value" text style "rg_normal_small" text color '$' text align center center } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber+2] and store.groupItems[rowNumber+2].valid == 0 and store.groupItems[rowNumber+2].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber+2] and store.groupItems[rowNumber+2].valid == 0 and store.groupItems[rowNumber+2].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } column { width 25 label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber+3].highlight)" tint lua "store.groupItems[rowNumber+3].item.tint" icon lua "store.groupItems[rowNumber+3].item.icon" count lua "store.groupItems[rowNumber+3].count" usages lua "store.groupItems[rowNumber+3].item.usages" align left top } label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber+3)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber+3] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber+3].value" text style "rg_normal_small" text color '$' text align center center } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber+3] and store.groupItems[rowNumber+3].valid == 0 and store.groupItems[rowNumber+3].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { --#21242 We don't grey out bags, even though they're not selectable, because we can open them. enabled "store.groupItems[rowNumber+3] and store.groupItems[rowNumber+3].valid == 0 and store.groupItems[rowNumber+3].item.isBag ~= 1 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } area 636 74 394 480 enabled "not storeScreen:IsCloseBagButtonClickable() and rgStoreMode == 0" hidehighlight rowheight dynamic table "store.groupItems" var "storeGroupItemsVar" --rowbackground GUISTBK2 scrollbar 'rgdscrl1' action " storeGroupItemsVar = storeGroupItemsVar + cellNumber - 1 rgInvItemName = '' if store.groupItems[storeGroupItemsVar].valid ~= 0 then local selected = true if(store.groupItems[storeGroupItemsVar].highlight == 1) then --rgGroupItemCount = rgGroupItemCount - 2 selected = false else end storeScreen:SelectGroupItem( storeGroupItemsVar - 1, selected) --storeScreen:SelectIdentifyItem( storeGroupItemsVar - 1, selected) --rgGroupItemCount = rgGroupItemCount + 1 if(store.groupItems[storeGroupItemsVar].highlight == 0) then rgInvItemName = '' else rgInvItemName = store.groupItems[storeGroupItemsVar].label end local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if (count > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, stock) end end " actionalt " storeGroupItemsVar = storeGroupItemsVar + cellNumber - 1 Infinity_SetOffset('ITEM_DESCRIPTION',-290, 30) showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " storeGroupItemsVar = storeGroupItemsVar + cellNumber - 1 if(store.groupItems[storeGroupItemsVar].item.isBag == 1) then showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) itemDescLeftButtonAction() else if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock or 0 if(count > 1) then popupRequester(count, groupSplitStack, true) elseif stock > 1 then popupRequester(stock, groupSplitStack, true) end end end " } --container list { column { width 25 label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber].highlight)" tint lua "store.groupItems[rowNumber].item.tint" icon lua "store.groupItems[rowNumber].item.icon" count lua "store.groupItems[rowNumber].count" usages lua "store.groupItems[rowNumber].item.usages" align left top } label { enabled "store.groupItems[rowNumber] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.groupItems[rowNumber] and store.groupItems[rowNumber].valid == 0 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.groupItems[rowNumber] and store.groupItems[rowNumber].valid == 0 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } column { width 25 label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber+1].highlight)" tint lua "store.groupItems[rowNumber+1].item.tint" icon lua "store.groupItems[rowNumber+1].item.icon" count lua "store.groupItems[rowNumber+1].count" usages lua "store.groupItems[rowNumber+1].item.usages" align left top } label { enabled "store.groupItems[rowNumber+1] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber+1)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber+1] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber+1].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.groupItems[rowNumber+1] and store.groupItems[rowNumber+1].valid == 0 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.groupItems[rowNumber+1] and store.groupItems[rowNumber+1].valid == 0 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } column { width 25 label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber+2].highlight)" tint lua "store.groupItems[rowNumber+2].item.tint" icon lua "store.groupItems[rowNumber+2].item.icon" count lua "store.groupItems[rowNumber+2].count" usages lua "store.groupItems[rowNumber+2].item.usages" align left top } label { enabled "store.groupItems[rowNumber+2] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber+2)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber+2] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber+2].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.groupItems[rowNumber+2] and store.groupItems[rowNumber+2].valid == 0 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.groupItems[rowNumber+2] and store.groupItems[rowNumber+2].valid == 0 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } column { width 25 label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 bam "RGDSSLOT" sequence lua "RgUISkin" ScaleToClip } label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 0 0 80 120 } label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 8 8 64 64 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber+3].highlight)" tint lua "store.groupItems[rowNumber+3].item.tint" icon lua "store.groupItems[rowNumber+3].item.icon" count lua "store.groupItems[rowNumber+3].count" usages lua "store.groupItems[rowNumber+3].item.usages" align left top } label { enabled "store.groupItems[rowNumber+3] and rgIsNthNumber(rowNumber,4)" area 64 0 24 24 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip text lua "rgGetGroupItemQuantity(rowNumber+3)" text style "rg_normal_small" text align center center } label { area 8 74 64 24 enabled "store.groupItems[rowNumber+3] and not storeScreen:IsContainer() and rgIsNthNumber(rowNumber,4)" text lua "store.groupItems[rowNumber+3].value" text style "rg_normal_small" text color '$' text align center center } label { enabled "store.groupItems[rowNumber+3] and store.groupItems[rowNumber+3].valid == 0 and rgIsNthNumber(rowNumber,4)" area 0 0 80 110 fill 0 0 0 150 } label { enabled "store.groupItems[rowNumber+3] and store.groupItems[rowNumber+3].valid == 0 and rgIsNthNumber(rowNumber,4)" area 80 0 8 24 fill 0 0 0 150 } } area 636 74 394 480 enabled "storeScreen:IsCloseBagButtonClickable() and rgStoreMode == 0" hidehighlight rowheight dynamic table "store.groupItems" var "storeGroupItemsVar" --rowbackground GUISTBK2 scrollbar 'rgdscrl1' action " storeGroupItemsVar = storeGroupItemsVar + cellNumber - 1 rgInvItemName = '' if store.groupItems[storeGroupItemsVar].valid ~= 0 then local selected = true if(store.groupItems[storeGroupItemsVar].highlight == 1) then --rgGroupItemCount = rgGroupItemCount - 2 selected = false end storeScreen:SelectGroupItem( storeGroupItemsVar - 1, selected) --storeScreen:SelectIdentifyItem( storeGroupItemsVar - 1, selected) --rgGroupItemCount = rgGroupItemCount + 1 if(store.groupItems[storeGroupItemsVar].highlight == 0) then rgInvItemName = '' else rgInvItemName = store.groupItems[storeGroupItemsVar].label end local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if (count > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, stock) end end " actionalt " storeGroupItemsVar = storeGroupItemsVar + cellNumber - 1 Infinity_SetOffset('ITEM_DESCRIPTION',-290, 30) showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " storeGroupItemsVar = storeGroupItemsVar + cellNumber - 1 if(store.groupItems[storeGroupItemsVar].item.isBag == 1) then showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) itemDescLeftButtonAction() else if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock or 0 if(count > 1) then popupRequester(count, groupSplitStack, true) elseif stock > 1 then popupRequester(stock, groupSplitStack, true) end end end " } --store mode 1 list { column { width 100 label { area 0 0 454 60 bam "RGDSTBC3" sequence lua "RgUISkin" ScaleToClip align left top frame lua "rgGetStoreSlotHighlight(store.storeItems[rowNumber].highlight)" } label { area 6 0 60 60 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.storeItems[rowNumber].highlight)" icon lua "store.storeItems[rowNumber].item.icon" tint lua "store.storeItems[rowNumber].item.tint" usages lua "store.storeItems[rowNumber].amountSelected" --how many selected count lua "store.storeItems[rowNumber].item.stackSize" --How many to a stack align left top } label { area 80 0 300 60 text lua "store.storeItems[rowNumber].label" text style "normal" text align left center } label { area 365 0 90 60 enabled "not storeScreen:IsContainer()" text lua "store.storeItems[rowNumber].value" text style "normal" text color "$" text align center center } label { enabled "store.storeItems[rowNumber].valid == 0 and store.storeItems[rowNumber].highlight == 0" area 0 0 -1 -1 fill 0 0 0 150 } } enabled "rgStoreMode == 1" area 30 64 470 496 hidehighlight rowheight 62 table "store.storeItems" var "storeItemsVar" scrollbar 'rgdscrl1' action " if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local highlight = true if(store.storeItems[storeItemsVar].highlight == 1) then highlight = false end storeScreen:SelectStoreItem( storeItemsVar - 1, highlight) end end if storeScreen:IsContainer() then local count = store.storeItems[storeItemsVar].item.count local stock = store.storeItems[storeItemsVar].numInStock if (count > 1) then storeScreen:SetStoreItemCount(storeItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetStoreItemCount(storeItemsVar - 1, stock) end end " actionalt " Infinity_SetOffset('ITEM_DESCRIPTION',300, 30) showItemDescription(store.storeItems[storeItemsVar].item, 1) " actionDbl " if store.storeItems[storeItemsVar].clickable == 1 then if not storeScreen:IsCloseBagButtonClickable() or store.storeItems[storeItemsVar].valid == 1 then local maxCount = store.storeItems[storeItemsVar].maxCount if(maxCount > 1) then popupRequester(maxCount, storeSplitStack, false) end end end " } --invetory mode 1 list { column { width 100 label { area 0 0 454 60 bam "RGDSTBC3" sequence lua "RgUISkin" ScaleToClip align left top frame lua "rgGetStoreSlotHighlight(store.groupItems[rowNumber].highlight)" } label { area 6 0 60 60 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber].highlight)" tint lua "store.groupItems[rowNumber].item.tint" icon lua "store.groupItems[rowNumber].item.icon" count lua "store.groupItems[rowNumber].count" usages lua "store.groupItems[rowNumber].item.usages" align left top } label { area 80 0 300 60 text lua "store.groupItems[rowNumber].label" text style "normal" text align left center } label { area 365 0 90 60 enabled "not storeScreen:IsContainer()" text lua "store.groupItems[rowNumber].value" text style "normal" text color "$" text align center center } label { enabled "store.groupItems[rowNumber].valid == 0 and store.groupItems[rowNumber].item.isBag ~= 1" area 0 0 -1 -1 fill 0 0 0 150 } } area 530 64 470 496 enabled "not storeScreen:IsCloseBagButtonClickable() and rgStoreMode == 1" hidehighlight rowheight 62 table "store.groupItems" var "storeGroupItemsVar" scrollbar 'rgdscrl1' action " if store.groupItems[storeGroupItemsVar].valid ~= 0 then local selected = true if(store.groupItems[storeGroupItemsVar].highlight == 1) then selected = false end storeScreen:SelectGroupItem( storeGroupItemsVar - 1, selected) local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if (count > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, stock) end end " actionalt " Infinity_SetOffset('ITEM_DESCRIPTION',-290, 30) showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " if(store.groupItems[storeGroupItemsVar].item.isBag == 1) then showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) itemDescLeftButtonAction() else if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock or 0 if(count > 1) then popupRequester(count, groupSplitStack, true) elseif stock > 1 then popupRequester(stock, groupSplitStack, true) end end end " } --container mode 1 list { column { width 100 label { area 0 0 454 60 bam "RGDSTBC3" sequence lua "RgUISkin" ScaleToClip align left top frame lua "rgGetStoreSlotHighlight(store.groupItems[rowNumber].highlight)" } label { area 6 0 60 60 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.groupItems[rowNumber].highlight)" tint lua "store.groupItems[rowNumber].item.tint" icon lua "store.groupItems[rowNumber].item.icon" count lua "store.groupItems[rowNumber].count" usages lua "store.groupItems[rowNumber].item.usages" align left top } label { area 80 0 300 60 text lua "store.groupItems[rowNumber].label" text style "normal" text align left center } label { area 365 0 90 60 enabled "not storeScreen:IsContainer()" text lua "store.groupItems[rowNumber].value" text style "normal" text color "$" text align center center } label { enabled "store.groupItems[rowNumber].valid == 0 and store.groupItems[rowNumber].item.isBag ~= 1" area 0 0 -1 -1 fill 0 0 0 150 } } area 530 64 470 496 enabled "storeScreen:IsCloseBagButtonClickable() and rgStoreMode == 1" hidehighlight rowheight 62 table "store.groupItems" var "storeGroupItemsVar" scrollbar 'rgdscrl1' action " if store.groupItems[storeGroupItemsVar].valid ~= 0 then local selected = true if(store.groupItems[storeGroupItemsVar].highlight == 1) then selected = false end storeScreen:SelectGroupItem( storeGroupItemsVar - 1, selected) local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock if (count > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, count) elseif (stock > 1) then storeScreen:SetGroupItemCount(storeGroupItemsVar - 1, stock) end end " actionalt " Infinity_SetOffset('ITEM_DESCRIPTION',-290, 30) showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) " actionDbl " if(store.groupItems[storeGroupItemsVar].item.isBag == 1) then showItemDescription(store.groupItems[storeGroupItemsVar].item, 1) itemDescLeftButtonAction() else if store.groupItems[storeGroupItemsVar].valid ~= 0 then local count = store.groupItems[storeGroupItemsVar].item.count local stock = store.groupItems[storeGroupItemsVar].numInStock or 0 if(count > 1) then popupRequester(count, groupSplitStack, true) elseif stock > 1 then popupRequester(stock, groupSplitStack, true) end end end " } button { area 35 562 320 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text lua "checkContainerText(getUiString('BUY_BUTTON') .. ' (' .. storeScreen:GetStoreCost() .. ')', 'TO_BACKPACK_BUTTON')" text style "button" clickable lua "storeScreen:IsBuyItemButtonClickable()" action " storeScreen:OnBuyItemButtonClick() rgItemName = '' rgInvItemName = '' " } button { area 675 562 320 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text lua "checkContainerText(getUiString('SELL_BUTTON') .. ' (' .. storeScreen:GetGroupCost() .. ')','TO_CONTAINER_BUTTON')" text style "button" clickable lua "storeScreen:IsSellItemButtonClickable()" action " storeScreen:OnSellItemButtonClick() --rgGroupItemCount = 0 rgItemName = '' rgInvItemName = '' " } button { area 355 566 320 70 enabled "(not storeScreen:IsContainer()) and storeScreen:IsStealEnabled()" bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "STEAL_BUTTON" text style "button" clickable lua "storeScreen:IsStealItemButtonClickable() and (not storeScreen:IsContainer()) and storeScreen:IsStealEnabled()" action " storeScreen:OnStealItemButtonClick() rgItemName = '' rgInvItemName = '' " } button { area 355 562 320 74 enabled "storeScreen:IsCloseBagButtonClickable()" bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "CLOSE_CONTAINER_BUTTON" text style "button" action " storeScreen:OnCloseBagButtonClick() " } --button --{ -- area 14 496 68 90 -- encumbrance --} label { area 10 142 442 348 enabled "storeScreen:IsSpriteOrderable() == false" rectangle 0 rectangle opacity 200 ignoreEvents } label { area 456 142 398 348 enabled "storeScreen:IsSpriteOrderable() == false" rectangle 0 rectangle opacity 200 ignoreEvents } } ` identifyItemsVar = 0 ` menu { name 'STORE_IDENTIFY' align center center offset 0 30 onOpen " storeScreen:UpdateIdentifyPanel() store.identifyText = '' " ignoreEsc label { area 0 0 1030 636 } label { area 462 56 564 572 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 254 0 521 50 text "IDENTIFY_TITLE" text style "button" } label { area 28 62 202 38 text "COST_LABEL" text style "button" text color 'B' text align left center pad 10 5 0 5 } label { area 340 62 80 38 text lua "storeScreen:GetIdentifyCost()" text style "button" text color 'B' text align center center } list { column { width 100 label { enabled "store.identifyItems[rowNumber].valid == 1" area 0 0 400 60 bam "RGDSTBC5" sequence lua "RgUISkin" ScaleToClip align left top frame lua "rgGetStoreSlotHighlight(store.identifyItems[rowNumber].highlight)" } label { enabled "store.identifyItems[rowNumber].valid == 1" area 0 0 0 62 --bam rgdslct --sequence lua "rgGetStoreSlotHighlight(store.identifyItems[rowNumber].highlight)" --ScaleToClip } label { enabled "store.identifyItems[rowNumber].valid == 1" area 6 0 60 60 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip frame lua "getStoreSlotHighlight(store.identifyItems[rowNumber].highlight)" icon lua "store.identifyItems[rowNumber].item.icon" tint lua "store.identifyItems[rowNumber].item.tint" } label { enabled "store.identifyItems[rowNumber].valid == 1" area 80 0 340 60 text lua "store.identifyItems[rowNumber].label" text style "normal" text align left center } } area 28 104 420 442 hidehighlight rowheight dynamic table "store.identifyItems" var "identifyItemsVar" --rowbackground GUISTBK2 scrollbar 'rgdscrl1' action " local highlight = true if(store.identifyItems[identifyItemsVar].highlight == 1) then highlight = false end if(highlight == true and store.identifyItems[identifyItemsVar].valid == 0) then return end storeScreen:SelectIdentifyItem( identifyItemsVar - 1, highlight) " } button { area 28 562 424 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "IDENTIFY_BUTTON" text style "button" clickable lua "storeScreen:IsIdentifyItemButtonClickable()" action " storeScreen:OnIdentifyItemButtonClick() " } text { area 486 81 518 517 text lua "store.identifyText" text style "normal_parchment" scrollbar 'rgdscrl1' } } ` function getDonationFrame() if(store.hasDonated ~= nil and store.hasDonated == 1) then return 1 else return 0 end end storeDonateAmountEdit = 0 --no longer used in ui, but the engine needs it. function changeDonationAmount(amount) if (amt == nil) then amt = 0 end amt = amt + amount if (amt > 0) then storeDonateAmountEdit = tostring(amt) else storeDonateAmountEdit = '0' end end ` menu { name 'STORE_DONATE' align center center offset 0 30 ignoreEsc onOpen " storeScreen:UpdateDonatePanel() store.donateText = '' " label { area 0 0 1030 636 } label { area 462 56 564 572 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 28 464 424 78 bam RGDSTBC2 sequence lua "RgUISkin" ScaleToClip } label { area 254 0 521 50 text "DONATE_TITLE" text style "button" } label { area 28 56 424 364 bam "RGDDONAT" frame lua "getDonationFrame()" ScaleToClip } label { area 28 431 424 38 text "ENTER_DONATION_LABEL" text style "button" text color 'B' } edit { name "storeDonateAmountEditArea" area 132 478 216 48 var storeDonateAmountEdit text style "normal" text align center center maxlines 1 fill 112 111 111 64 } button { area 34 469 68 68 bam rgdcpbt1 scaleToClip action " changeDonationAmount(1) " actionHold " changeDonationAmount(1) " } button { area 378 469 68 68 bam rgdcpbt2 scaleToClip clickable lua "tonumber(storeDonateAmountEdit) > 0" action " changeDonationAmount(-1) " actionHold " changeDonationAmount(-1) " } button { area 28 562 424 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONATE_BUTTON" text style "button" clickable lua "storeScreen:IsDonateButtonClickable()" action " storeScreen:OnDonateButtonClick() " } text { area 486 81 518 517 text lua "store.donateText" text style "normal_parchment" scrollbar 'rgdscrl1' } } ` function storeRest() storeScreen:RestParty() end ` menu { name 'STORE_ROOMS' align center center offset 0 30 onOpen " storeScreen:SetRoomType(0) storeScreen:UpdateRentRoomPanel() " ignoreEsc label { area 0 0 1030 636 --mosaic GUISTROB } label { area 594 56 432 572 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 254 0 521 50 text "ROOMS_TITLE" text style "button" } button { name "BUTTON_room_peasant" area 30 66 260 237 bam "rgdroom1" sequence lua "RgUISkin" scaleToClip clickable lua "storeScreen:IsRoomTypeClickable(1)" glow lua "storeScreen:GetRoomType() == 1" text "PEASANT_BUTTON" text style "button" text align center center pad 0 165 0 0 action " storeScreen:SetRoomType(1) selectedRoom = Infinity_FindUIItemByName('BUTTON_room_peasant') " } button { name "BUTTON_room_merchant" area 308 66 260 237 bam "rgdroom2" sequence lua "RgUISkin" scaleToClip clickable lua "storeScreen:IsRoomTypeClickable(2)" glow lua "storeScreen:GetRoomType() == 2" text "MERCHANT_BUTTON" text style "button" text align center center pad 0 165 0 0 action " storeScreen:SetRoomType(2) selectedRoom = Infinity_FindUIItemByName('BUTTON_room_merchant') " } button { name "BUTTON_room_noble" area 30 314 260 237 bam "rgdroom3" sequence lua "RgUISkin" scaleToClip clickable lua "storeScreen:IsRoomTypeClickable(3)" glow lua "storeScreen:GetRoomType() == 3" text "NOBLE_BUTTON" text style "button" text align center center pad 0 165 0 0 action " storeScreen:SetRoomType(3) selectedRoom = Infinity_FindUIItemByName('BUTTON_room_noble') " } button { name "BUTTON_room_royal" area 308 314 260 237 bam "rgdroom4" sequence lua "RgUISkin" scaleToClip clickable lua "storeScreen:IsRoomTypeClickable(4)" glow lua "storeScreen:GetRoomType() == 4" text "ROYAL_BUTTON" text style "button" text align center center pad 0 165 0 0 action " storeScreen:SetRoomType(4) selectedRoom = Infinity_FindUIItemByName('BUTTON_room_royal') " } text { area 618 78 388 522 text lua "store.roomText" text style "normal_parchment" } button { area 20 562 560 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text lua "getUiString('RENT_BUTTON') .. ' ( ' .. getUiString('COST_LABEL') .. ' ' .. storeScreen:GetRoomCost() .. ' )'" text style "button" action " storeScreen:OnRentRoomButtonClick() " } } menu { name 'STORE_HEALING' align center center offset 0 30 onOpen "storeScreen:UpdateBuySpellPanel()" ignoreEsc label { area 0 0 1030 636 } label { area 462 56 564 572 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 254 0 521 50 text "HEALING_TITLE" text style "button" } label { area 28 62 202 38 text "COST_LABEL" text style "button" text color 'B' text align left center pad 10 5 0 5 } label { area 340 62 80 38 text lua "storeScreen:GetSpellCost()" text style "button" text color 'B' text align center center } list { column { width 100 label { --enabled "store.healingSpells[rowNumber].valid == 1" area 0 0 400 60 bam "RGDSTBC5" sequence lua "RgUISkin" ScaleToClip align left top frame lua "rgGetStoreSlotHighlight(store.healingSpells[rowNumber].highlight)" } label { area 6 0 60 60 bam RGDSLOT sequence lua "RgUISkin" frame lua "getStoreSlotHighlight(store.healingSpells[rowNumber].highlight)" icon lua "store.healingSpells[rowNumber].icon" tint lua "store.healingSpells[rowNumber].tint" scaleToClip } label { area 80 0 240 60 text lua "Infinity_FetchString(store.healingSpells[rowNumber].name)" text style "normal" text align left center } label { area 320 0 80 60 text lua "store.healingSpells[rowNumber].value" text style "normal" text color '$' text align center center } label { enabled "store.healingSpells[rowNumber].valid == 0" area 0 0 400 60 fill 0 0 0 150 } } area 28 104 420 442 hidehighlight rowheight 62 table "store.healingSpells" var "healingSpellsVar" --rowbackground GUISTBK2 scrollbar 'rgdscrl1' action " local highlight = true if(store.healingSpells[healingSpellsVar].highlight == 1) then highlight = false end if(highlight == true and store.healingSpells[healingSpellsVar].valid == 0) then return end storeScreen:SelectSpellItem( healingSpellsVar - 1, highlight) " actionAlt " local spell = store.healingSpells[healingSpellsVar] popupDetails(16189, spell.name, spell.description,spell.icon) " } button { area 28 562 424 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BUY_BUTTON" --text lua "getUiString('RENT_BUTTON') .. ' ( ' .. getUiString('COST_LABEL') .. ' ' .. storeScreen:GetRoomCost() .. ' )'" text style "button" action " storeScreen:OnBuySpellButtonClick() " } text { area 486 81 518 517 text lua "store.spellText" text style "normal_parchment" scrollbar 'rgdscrl1' } } menu { name 'STORE_DRINKS' align center center offset 0 30 ignoreEsc onOpen " storeScreen:UpdateBuyDrinksPanel() store.drinkText = '' " label { area 0 0 1030 636 } label { area 462 56 564 572 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 254 0 521 50 text "DRINKS_TITLE" text style "button" } label { area 28 62 202 38 text "DRINK_LABEL" text style "button" text color 'B' text align left center pad 10 5 0 5 } label { area 317 62 111 38 text "COST_LABEL" text style "button" text color 'B' text align center center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "RgUISkin" sequence lua "rgGetSelectedHighlight(rowNumber, storeDrinksVar)" --sequence lua "rgGetStoreSlotHighlight(store.drinks[rowNumber].highlight)" ScaleToClip } label { area 5 0 285 60 text lua "store.drinks[rowNumber].name" text style "normal" pad 5 5 0 5 text align left center } label { area 289 0 111 60 text lua "store.drinks[rowNumber].value" text style "normal" text color '$' text align center center } label { enabled "store.drinks[rowNumber].valid == 0" area 0 0 400 60 fill 0 0 0 150 } } area 28 104 400 442 rowheight 60 hideHighlight table "store.drinks" var "storeDrinksVar" scrollbar 'rgdscrl1' } button { area 28 562 404 74 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BUY_BUTTON" --text lua "getUiString('RENT_BUTTON') .. ' ( ' .. getUiString('COST_LABEL') .. ' ' .. storeScreen:GetRoomCost() .. ' )'" text style "button" action " storeScreen:OnBuyDrinkButtonClick(storeDrinksVar - 1) " } label { area 480 71 107 93 bam lua "store.qualityIcon" } label { area 554 76 155 69 text "RUMORS_LABEL" text style "button" text color '5' } text { area 486 164 518 436 text lua "store.drinkText" text style "normal_parchment" scrollbar 'rgdscrl1' } } ` storePanelButtonHighlightGroup = nil function setStoreMainPanel(buttonId) local oldMenu = storeScreen:GetMenuName(storeCurMenuId) Infinity_PopMenu(oldMenu) storeCurMenuId = storeScreen:GetPanelButtonPanelId(buttonId) Infinity_PushMenu(storeScreen:GetMenuName(storeCurMenuId)) end function getBuySellTooltip() if(storeScreen:IsContainer()) then return getUiString('TRANSFER_ITEMS_TOOLTIP') else return Infinity_FetchString(storeScreen:GetPanelButtonToolTip(0)) end end ` menu { name 'STORE_CHOOSER' align center center onOpen " local menuName = storeScreen:GetMenuName(storeCurMenuId) Infinity_PushMenu(menuName) pushSidebars() local buttonId = storeScreen:GetPanelButtonId(storeCurMenuId) storePanelButtonHighlightGroup = Infinity_FindUIItemByName('BUTTON_storechooser_' .. buttonId) popSidebars() " onClose " local menuName = storeScreen:GetMenuName(storeCurMenuId) Infinity_PopMenu(menuName) popSidebars() " ignoreEsc label { area 0 0 768 768 bam rgdbcsto sequence lua "RgUISkin" frame 0 scaleToClip } label { area 597 0 768 768 bam rgdbcsto sequence lua "RgUISkin" frame 1 scaleToClip } label { area 480 32 405 52 text lua "Infinity_FetchString(storeScreen:GetStoreName())" text style 'rg_trajan' text color '$' align center center } button { enabled "rgIsBuySell == 1" area 1077 28 62 58 bam 'rgdstbut' scaleToClip toggle rgStoreMode action " Infinity_SetINIValue('Game Options','RgStoreMode',rgStoreMode) " } button { area 1200 104 71 98 portrait 0 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 0" action "Infinity_OnPortraitLClick(0) rgGroupItemCount = 0" actionAlt "Infinity_OnPortraitRClick(0)" actionDbl "Infinity_OnPortraitDblClick(0)" actiondrag "Infinity_SwapWithPortrait(0)" actionEnter "mouseOverPortrait = 0" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(0)" clickable lua "sidebarsGreyed ~= 1" } button { area 1200 206 71 98 portrait 1 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 1" action "Infinity_OnPortraitLClick(1) rgGroupItemCount = 0" actionAlt "Infinity_OnPortraitRClick(1)" actionDbl "Infinity_OnPortraitDblClick(1)" actiondrag "Infinity_SwapWithPortrait(1)" actionEnter "mouseOverPortrait = 1" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(1)" clickable lua "sidebarsGreyed ~= 1" } button { area 1200 308 71 98 portrait 2 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 2" action "Infinity_OnPortraitLClick(2) rgGroupItemCount = 0" actionAlt "Infinity_OnPortraitRClick(2)" actionDbl "Infinity_OnPortraitDblClick(2)" actiondrag "Infinity_SwapWithPortrait(2)" actionEnter "mouseOverPortrait = 2" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(2)" clickable lua "sidebarsGreyed ~= 1" } button { area 1200 410 71 98 portrait 3 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 3" action "Infinity_OnPortraitLClick(3) rgGroupItemCount = 0" actionAlt "Infinity_OnPortraitRClick(3)" actionDbl "Infinity_OnPortraitDblClick(3)" actiondrag "Infinity_SwapWithPortrait(3)" actionEnter "mouseOverPortrait = 3" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(3)" clickable lua "sidebarsGreyed ~= 1" } button { area 1200 512 71 98 portrait 4 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 4" action "Infinity_OnPortraitLClick(4) rgGroupItemCount = 0" actionAlt "Infinity_OnPortraitRClick(4)" actionDbl "Infinity_OnPortraitDblClick(4)" actiondrag "Infinity_SwapWithPortrait(4)" actionEnter "mouseOverPortrait = 4" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(4)" clickable lua "sidebarsGreyed ~= 1" } button { area 1200 614 71 98 portrait 5 bam rgdport2 sequence lua "RgUISkin" ScaleToClip enabled "Infinity_GetNumCharacters() > 5" action "Infinity_OnPortraitLClick(5) rgGroupItemCount = 0" actionAlt "Infinity_OnPortraitRClick(5)" actionDbl "Infinity_OnPortraitDblClick(5)" actiondrag "Infinity_SwapWithPortrait(5)" actionEnter "mouseOverPortrait = 5" actionExit "mouseOverPortrait = -1" tooltip lua "Infinity_GetPortraitTooltip(5)" clickable lua "sidebarsGreyed ~= 1" } label { area 1076 104 108 34 enabled "not storeScreen:IsContainer()" text lua "game:GetPartyGold()" text style "normal" text color '$' align center center } label { area 1026 102 50 38 enabled "not storeScreen:IsContainer()" bam GUIGOLD scaleToClip } label { area 95 90 60 60 bam lua "store.icon" scaleToClip } button { enabled "RgUISkin < 3 and rgIsTabletRatio() == false" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " storeScreen:OnMainDoneButtonClick() " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " storeScreen:OnMainDoneButtonClick() " } button { enabled "RgUISkin < 3 and rgIsTabletRatio() == true" on escape area 1245 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " storeScreen:OnMainDoneButtonClick() " } button { name 'BUTTON_storechooser_0' area 87 170 70 105 enabled "storeScreen:GetPanelButtonEnabled(0)" bam lua "getUiString('rgdstbt') .. RgUISkin" ScaleToClip highlightgroup storePanelButtonHighlightGroup sequence lua "storeScreen:GetPanelButtonSequence(0)" tooltip lua "getBuySellTooltip()" action " setStoreMainPanel(0) " } button { name 'BUTTON_storechooser_1' area 87 280 70 105 enabled "storeScreen:GetPanelButtonEnabled(1)" bam lua "getUiString('rgdstbt') .. RgUISkin" ScaleToClip highlightgroup storePanelButtonHighlightGroup sequence lua "storeScreen:GetPanelButtonSequence(1)" tooltip lua "Infinity_FetchString(storeScreen:GetPanelButtonToolTip(1))" action " setStoreMainPanel(1) " } button { name 'BUTTON_storechooser_2' area 87 390 70 105 enabled "storeScreen:GetPanelButtonEnabled(2)" bam lua "getUiString('rgdstbt') .. RgUISkin" ScaleToClip highlightgroup storePanelButtonHighlightGroup sequence lua "storeScreen:GetPanelButtonSequence(2)" tooltip lua "Infinity_FetchString(storeScreen:GetPanelButtonToolTip(2))" action " setStoreMainPanel(2) " } button { name 'BUTTON_storechooser_3' area 87 500 70 105 enabled "storeScreen:GetPanelButtonEnabled(3)" bam lua "getUiString('rgdstbt') .. RgUISkin" ScaleToClip highlightgroup storePanelButtonHighlightGroup sequence lua "storeScreen:GetPanelButtonSequence(3)" tooltip lua "Infinity_FetchString(storeScreen:GetPanelButtonToolTip(3))" action " setStoreMainPanel(3) " } } ` function worldDeathLoadClickable() if(e:IsMultiplayer() and not e:IsHosting()) then return false end return not worldScreen:GetHardPaused() end function worldDeathQuitClickable() return not worldScreen:GetHardPaused() end function worldDeathText() if(e:IsMultiplayer()) then if(e:IsHosting()) then return Infinity_FetchString(19377) else return Infinity_FetchString(11331) end else if(worldDeathStr == nil) then return Infinity_FetchString(16498) else return Infinity_FetchString(worldDeathStr) end end end function worldDeathQuitText() if(e:IsMultiplayer()) then return getUiString('LOGOUT_BUTTON') else return getUiString('QUIT_BUTTON') end end groundItemsButtonToggle = 0 highlightButtonToggle = 0 worldChatEdit = "" ` menu { name "WORLD_DEATH" align left top ignoreEsc modal onOpen " local w, h = Infinity_GetScreenSize() Infinity_SetArea('rgdeathback', 0, 0,w,h) Infinity_SetArea('rgdeathtext', (w/2)-290, 0,nil,nil) Infinity_SetArea('rgdeathload', (w/2)-330, h-70,nil,nil) Infinity_SetArea('rgdeathquit', (w/2)+10, h-70,nil,nil) " label { name "rgdeathback" area 0 0 1365 768 bam rgddeath scaleToClip } label { name "rgdeathtext" area 29 21 580 80 text lua "worldDeathText()" text style "button" text align center center text shadow 1 } button { name "rgdeathload" area 0 0 320 70 bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('LOAD_BUTTON')" clickable lua "worldDeathLoadClickable()" action " Infinity_PopMenu() worldScreen:OnDeathLoad() " } button { name "rgdeathquit" area 0 0 320 70 bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString(worldDeathQuitText())" clickable lua "worldDeathQuitClickable()" action " Infinity_PopMenu() worldScreen:OnDeathQuit() " } } ` actionBarTooltip = {} function rgGetActionbarPosition() if RgIsModernHud == 1 then Infinity_SetArea('rgActionbarBackground',0,0,664,118) Infinity_SetArea('rgActionbarBackground1',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton0',12,74,40,35) Infinity_SetArea('rgActionbarGoldernButton1',57,74,40,35) Infinity_SetArea('rgActionbarGoldernButton2',102,74,40,35) Infinity_SetArea('rgActionbarGoldernButton3',147,74,40,35) Infinity_SetArea('rgActionbarGoldernButton4',192,74,40,35) Infinity_SetArea('rgActionbarGoldernButton5',237,74,40,35) Infinity_SetArea('rgActionbarGoldernButton6',387,74,40,35) Infinity_SetArea('rgActionbarGoldernButton7',432,74,40,35) Infinity_SetArea('rgActionbarGoldernButton8',477,74,40,35) Infinity_SetArea('rgActionbarGoldernButton9',522,74,40,35) Infinity_SetArea('rgActionbarGoldernButton10',567,74,40,35) Infinity_SetArea('rgActionbarGoldernButton11',612,74,40,35) Infinity_SetArea('rgActionbarClock1',282,66,100,50) Infinity_SetArea('rgActionbarClock2',282,66,100,50) Infinity_SetArea('rgActionbarClock3',282,66,100,50) Infinity_SetArea('rgActionbarSlotBcg1',8,10,54,54) Infinity_SetArea('rgActionbarSlotBcg2',62,10,54,54) Infinity_SetArea('rgActionbarSlotBcg3',116,10,54,54) Infinity_SetArea('rgActionbarSlotBcg4',170,10,54,54) Infinity_SetArea('rgActionbarSlotBcg5',224,10,54,54) Infinity_SetArea('rgActionbarSlotBcg6',278,10,54,54) Infinity_SetArea('rgActionbarSlotBcg7',332,10,54,54) Infinity_SetArea('rgActionbarSlotBcg8',386,10,54,54) Infinity_SetArea('rgActionbarSlotBcg9',440,10,54,54) Infinity_SetArea('rgActionbarSlotBcg10',494,10,54,54) Infinity_SetArea('rgActionbarSlotBcg11',548,10,54,54) Infinity_SetArea('rgActionbarSlotBcg12',602,10,54,54) Infinity_SetArea('rgActionbarButton1',8,10,54,54) Infinity_SetArea('rgActionbarButton2',62,10,54,54) Infinity_SetArea('rgActionbarButton3',116,10,54,54) Infinity_SetArea('rgActionbarButton4',170,10,54,54) Infinity_SetArea('rgActionbarButton5',224,10,54,54) Infinity_SetArea('rgActionbarButton6',278,10,54,54) Infinity_SetArea('rgActionbarButton7',332,10,54,54) Infinity_SetArea('rgActionbarButton8',386,10,54,54) Infinity_SetArea('rgActionbarButton9',440,10,54,54) Infinity_SetArea('rgActionbarButton10',494,10,54,54) Infinity_SetArea('rgActionbarButton11',548,10,54,54) Infinity_SetArea('rgActionbarButton12',602,10,54,54) else Infinity_SetArea('rgActionbarBackground',0,0,0,0) Infinity_SetArea('rgActionbarBackground1',0,0,659,68) Infinity_SetArea('rgActionbarGoldernButton0',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton1',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton2',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton3',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton4',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton5',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton6',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton7',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton8',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton9',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton10',0,0,0,0) Infinity_SetArea('rgActionbarGoldernButton11',0,0,0,0) Infinity_SetArea('rgActionbarClock1',0,0,0,0) Infinity_SetArea('rgActionbarClock2',0,0,0,0) Infinity_SetArea('rgActionbarClock3',0,0,0,0) Infinity_SetArea('rgActionbarSlotBcg1',5,7,54,54) Infinity_SetArea('rgActionbarSlotBcg2',59,7,54,54) Infinity_SetArea('rgActionbarSlotBcg3',113,7,54,54) Infinity_SetArea('rgActionbarSlotBcg4',167,7,54,54) Infinity_SetArea('rgActionbarSlotBcg5',221,7,54,54) Infinity_SetArea('rgActionbarSlotBcg6',275,7,54,54) Infinity_SetArea('rgActionbarSlotBcg7',329,7,54,54) Infinity_SetArea('rgActionbarSlotBcg8',383,7,54,54) Infinity_SetArea('rgActionbarSlotBcg9',437,7,54,54) Infinity_SetArea('rgActionbarSlotBcg10',491,7,54,54) Infinity_SetArea('rgActionbarSlotBcg11',545,7,54,54) Infinity_SetArea('rgActionbarSlotBcg12',599,7,54,54) Infinity_SetArea('rgActionbarButton1',5,7,54,54) Infinity_SetArea('rgActionbarButton2',59,7,54,54) Infinity_SetArea('rgActionbarButton3',113,7,54,54) Infinity_SetArea('rgActionbarButton4',167,7,54,54) Infinity_SetArea('rgActionbarButton5',221,7,54,54) Infinity_SetArea('rgActionbarButton6',275,7,54,54) Infinity_SetArea('rgActionbarButton7',329,7,54,54) Infinity_SetArea('rgActionbarButton8',383,7,54,54) Infinity_SetArea('rgActionbarButton9',437,7,54,54) Infinity_SetArea('rgActionbarButton10',491,7,54,54) Infinity_SetArea('rgActionbarButton11',545,7,54,54) Infinity_SetArea('rgActionbarButton12',599,7,54,54) end end function rgGetActionbarButtonBam() if RgUISkin == 3 then return 'rgdmenuc' else return 'rgdmenub' end end function rgGetAdvSettingsButtonBam() if RgUISkin == 3 then return 'rgdmrnd4' else return 'rgdmrnd3' end end rgCharNames = '' rgEmptyLog = 0 function rgGetPcNames() local result = '' if #combatLog < 7 then rgEmptyLog = 0 end for i = 0, 5, 1 do local name = Infinity_GetPortraitTooltip(i) lines = {} for s in name:gmatch("[^\r\n]+") do table.insert(lines, s) end name = lines[1] if Infinity_GetNumCharacters() > i then --table.insert(rgCharNamesTable, name) result = result .. ' ' .. name end end rgCharNames = result return rgCharNames end ` menu { name "WORLD_ACTIONBAR" align center bottom --offset 0 -2 onOpen " if EEex_Active then if RgRadarKey ~= '' then if rgRadarShowAlwaysOn == 1 or rgRadarActive == 1 then Infinity_PushMenu('RADAR') --Infinity_PressKeyboardButton(rgRadarKey) end end if RgRadarShowPcEffects == 1 then Infinity_PushMenu('RG_RADAR_PC') end end if RgIsModernHud == 0 then toolbarTop = 73 Infinity_SetOffset('WORLD_ACTIONBAR',0,50) else toolbarTop = 0 if RgModernHudRight == 1 then local w, h = Infinity_GetScreenSize() Infinity_SetOffset('WORLD_ACTIONBAR',(w/2)-331,0) else Infinity_SetOffset('WORLD_ACTIONBAR',0,0) end end Infinity_PushMenu('RGWORLD_MESSAGES') Infinity_PushMenu('WORLD_MESSAGES') Infinity_PushMenu('RGWORLD_MESSAGES_UNLOCKED') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() if RgMessageboxUnlocked == 1 then Infinity_SetArea('messagesRect',nil,nil,nil,-65) end if RgIsModernHud == 1 then Infinity_SetArea('messagesRect',nil,nil,nil,-10) end Infinity_PushMenu('WORLD_QUICKLOOT'); else if RgMessageboxUnlocked == 1 then Infinity_SetArea('messagesRect',nil,nil,nil,-5) end if RgIsModernHud == 1 then Infinity_SetArea('messagesRect',nil,nil,nil,50) end end worldScreen:SetHighlightEnabled(highlightButtonToggle == 1) Infinity_PushMenu('LEFT_SIDEBAR') Infinity_PushMenu('RIGHT_SIDEBAR') " onClose " if rgRadarActive == 1 then Infinity_PopMenu('RADAR') end if RgRadarShowPcEffects == 1 then Infinity_PopMenu('RG_RADAR_PC') end Infinity_PopMenu('WORLD_QUICKLOOT'); Infinity_PopMenu('RGWORLD_MESSAGES'); Infinity_PopMenu('WORLD_MESSAGES'); Infinity_PopMenu('RGWORLD_MESSAGES_UNLOCKED') --rgGetCharTable() " ignoreEsc button { enabled "RgInvPartyFastLoad == 1" area 0 0 0 0 text lua "rgGetPcNames()" } label { name "rgActionbarBackground" enabled "RgIsModernHud == 1" area 1621 0 662 118 bam 'rgdmbcg' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 0 0 3904 68 } label { enabled "RgIsModernHud == 0" area 0 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 650 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 1300 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 1950 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 2600 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0" area 3250 0 654 68 bam 'rgdmbcg6' sequence lua "RgUISkin" ScaleToClip } label { enabled "RgIsModernHud == 0 and RgUISkin == 0" area 1598 0 49 68 bam 'rgdmbcg7' ScaleToClip } label { enabled "RgIsModernHud == 0 and RgUISkin == 0" area 2257 0 49 68 bam 'rgdmbcg7' ScaleToClip } label { name 'rgActionbarSlotBcg1' area 1628 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg2' area 1682 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg3' area 1736 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg4' area 1790 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg5' area 1844 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg6' area 1898 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg7' area 1952 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg8' area 2006 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg9' area 2060 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg10' area 2114 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg11' area 2168 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } label { name 'rgActionbarSlotBcg12' area 2222 8 54 54 bam 'rgdslot' ScaleToClip sequence lua "RgUISkin" } button { name 'rgActionbarButton1' area 1628 8 54 54 actionBar 0 ScaleToClip enabled "buttonArray:GetButtonEnabled(0)" tooltip lua "actionBarTooltip[0]" action "buttonArray:OnLButtonPressed(0)" actionAlt "buttonArray:OnRButtonPressed(0)" } button { name 'rgActionbarButton2' area 1682 8 54 54 actionBar 1 ScaleToClip enabled "buttonArray:GetButtonEnabled(1)" tooltip lua "actionBarTooltip[1]" action "buttonArray:OnLButtonPressed(1)" actionAlt "buttonArray:OnRButtonPressed(1)" } button { name 'rgActionbarButton3' area 1736 8 54 54 actionBar 2 ScaleToClip enabled "buttonArray:GetButtonEnabled(2)" tooltip lua "actionBarTooltip[2]" action "buttonArray:OnLButtonPressed(2)" actionAlt "buttonArray:OnRButtonPressed(2)" } button { name 'rgActionbarButton4' area 1790 8 54 54 actionBar 3 ScaleToClip enabled "buttonArray:GetButtonEnabled(3)" tooltip lua "actionBarTooltip[3]" action "buttonArray:OnLButtonPressed(3)" actionAlt "buttonArray:OnRButtonPressed(3)" } button { name 'rgActionbarButton5' area 1844 8 54 54 actionBar 4 ScaleToClip enabled "buttonArray:GetButtonEnabled(4)" tooltip lua "actionBarTooltip[4]" action "buttonArray:OnLButtonPressed(4)" actionAlt "buttonArray:OnRButtonPressed(4)" } button { name 'rgActionbarButton6' area 1898 8 54 54 actionBar 5 ScaleToClip enabled "buttonArray:GetButtonEnabled(5)" tooltip lua "actionBarTooltip[5]" action "buttonArray:OnLButtonPressed(5)" actionAlt "buttonArray:OnRButtonPressed(5)" } button { name 'rgActionbarButton7' area 1952 8 54 54 actionBar 6 ScaleToClip enabled "buttonArray:GetButtonEnabled(6)" tooltip lua "actionBarTooltip[6]" action "buttonArray:OnLButtonPressed(6)" actionAlt "buttonArray:OnRButtonPressed(6)" } button { name 'rgActionbarButton8' area 2006 8 54 54 actionBar 7 ScaleToClip enabled "buttonArray:GetButtonEnabled(7)" tooltip lua "actionBarTooltip[7]" action "buttonArray:OnLButtonPressed(7)" actionAlt "buttonArray:OnRButtonPressed(7)" } button { name 'rgActionbarButton9' area 2060 8 54 54 actionBar 8 ScaleToClip enabled "buttonArray:GetButtonEnabled(8)" tooltip lua "actionBarTooltip[8]" action "buttonArray:OnLButtonPressed(8)" actionAlt "buttonArray:OnRButtonPressed(8)" } button { name 'rgActionbarButton10' area 2114 8 54 54 actionBar 9 ScaleToClip enabled "buttonArray:GetButtonEnabled(9)" tooltip lua "actionBarTooltip[9]" action "buttonArray:OnLButtonPressed(9)" actionAlt "buttonArray:OnRButtonPressed(9)" } button { name 'rgActionbarButton11' area 2168 8 54 54 actionBar 10 ScaleToClip enabled "buttonArray:GetButtonEnabled(10)" tooltip lua "actionBarTooltip[10]" action "buttonArray:OnLButtonPressed(10)" actionAlt "buttonArray:OnRButtonPressed(10)" } button { name 'rgActionbarButton12' area 2222 8 54 54 actionBar 11 ScaleToClip enabled "buttonArray:GetButtonEnabled(11)" tooltip lua "actionBarTooltip[11]" action "buttonArray:OnLButtonPressed(11)" actionAlt "buttonArray:OnRButtonPressed(11)" } label { area 1627 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 1666 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 1705 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 1744 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 1783 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 1822 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 1861 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } button { name 'rgActionbarGoldernButton0' area 1628 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 0 tooltip lua "getTooltipWithHotkey(4,rgGetGameEngineStringRef(15418,15418,15418,14648))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(mapScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(1) " } button { name 'rgActionbarGoldernButton1' area 1667 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 1 tooltip lua "getTooltipWithHotkey(3,rgGetGameEngineStringRef(24359,24359,16308,16308))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "showJournal == 1" ScaleToClip clickable lua "sidebarsGreyed ~= 1 and game:GetJournalOpenable()" action " e:GetActiveEngine():OnLeftPanelButtonClick(2) " } button { name 'rgActionbarGoldernButton2' area 1706 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 2 tooltip lua "getTooltipWithHotkey(0,rgGetGameEngineStringRef(24358,24358,16307,16307))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(inventoryScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(3) " } button { name 'rgActionbarGoldernButton3' area 1745 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 3 tooltip lua "getTooltipWithHotkey(1,rgGetGameEngineStringRef(24356,24356,16306,16306))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(characterScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(4) " } button { name 'rgActionbarGoldernButton4' area 1784 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 4 tooltip lua "getTooltipWithHotkey(5,rgGetGameEngineStringRef(24360,24360,16309,16309))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(mageScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(5) " } button { name 'rgActionbarGoldernButton5' area 1823 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 5 tooltip lua "getTooltipWithHotkey(6,rgGetGameEngineStringRef(24357,24357,14930,14930))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(priestScreen)" ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(6) " } button { name 'rgActionbarGoldernButton6' area 1862 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 6 ScaleToClip tooltip lua "getTooltipWithHotkey(7,rgGetGameEngineStringRef(24362,24362,16311,16311))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top glow lua "highlightSidebarButton(optionsScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(7) " } label { area 2003 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 2042 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 2081 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 2120 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 2159 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 2198 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } label { area 2237 72 39 39 enabled "RgIsModernHud == 1 and RgUISkin > 0" bam 'rgdslot1' ScaleToClip sequence lua "RgUISkin" } button { area 2005 74 36 35 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgRadarKey == '' and B3Spell_AlwaysOpen ~= 1" bam lua "rgGetActionbarButtonBam()" sequence 7 frame lua "rgSelectedMenuButton(multiplayerScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(8,rgGetGameEngineStringRef(24363,24363,16312,16312))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(multiplayerScreen)" clickable lua "sidebarsGreyed ~= 1 and e:IsMultiplayer()" action " e:GetActiveEngine():OnLeftPanelButtonClick(8) " } button { area 2007 76 31 31 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgRadarKey ~= '' and B3Spell_AlwaysOpen ~= 1" bam lua "rgGetAdvSettingsButtonBam()" sequence 0 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_SETT')" action " Infinity_PushMenu('RG_RADAR_SETTINGS') " } button { area 2046 76 31 31 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgRadarKey ~= '' and B3Spell_AlwaysOpen == 1" bam lua "rgGetAdvSettingsButtonBam()" sequence 0 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_SETT')" action " Infinity_PushMenu('RG_RADAR_SETTINGS') " } button { area 2007 76 31 31 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and B3Spell_AlwaysOpen == 1" bam lua "rgGetAdvSettingsButtonBam()" sequence 1 ScaleToClip tooltip lua "B3Spell_Tooltip_Bubbs_Spell_Menu_Options" action "B3Spell_Menu_TEMPLATE_OptionsButton_Action()" } button { name 'rgActionbarGoldernButton7' area 2044 74 36 35 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and (RgRadarKey == '' or B3Spell_AlwaysOpen ~= 1)" bam lua "rgGetActionbarButtonBam()" sequence 8 ScaleToClip tooltip lua "getTooltipWithHotkey(28,rgGetGameEngineStringRef(31813,31813,74261,34763))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:OnQuickSaveButtonClick(false) " actionAlt " worldScreen:OnQuickSaveButtonClick(true) " } button { name 'rgActionbarGoldernButton12' area 2083 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 13 scaleToClip toggle groundItemsButtonToggle tooltip lua "rgGetGameEngineString(32217,32217,99897,34787)" action " local x,y,w,h = Infinity_GetArea('messagesRect') if(groundItemsButtonToggle == 1) then worldScreen:StartGroundItems() Infinity_SetArea('messagesRect',nil,nil,nil,h-60) else worldScreen:StopGroundItems() Infinity_SetArea('messagesRect',nil,nil,nil,h+60) end " } button { name 'rgActionbarGoldernButton8' area 2122 74 36 35 enabled "RgIsModernHud == 1" bam lua "rgGetActionbarButtonBam()" sequence 9 ScaleToClip tooltip lua "getTooltipWithHotkey(31,rgGetGameEngineStringRef(11942,11942,11942,11942))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnRestButtonClick() " } button { name 'rgActionbarGoldernButton9' area 2161 74 36 35 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1" toggle highlightButtonToggle tooltip lua "rgGetGameEngineString(32729,32729,103144,40879)" bam lua "rgGetActionbarButtonBam()" sequence 10 ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " worldScreen:SetHighlightEnabled(highlightButtonToggle == 1) " } button { name 'rgActionbarGoldernButton10' area 2200 74 36 35 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1" tooltip lua "getPartyAITooltip()" toggle aiButtonToggle bam lua "rgGetActionbarButtonBam()" sequence 11 ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " game:ToggleAI() " } button { name 'rgActionbarGoldernButton11' area 2239 74 36 35 enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1" tooltip lua "rgGetGameEngineString(10485,10485,10485,10485)" tooltip force lua "sidebarForceTooltips == 1" tooltip force top bam lua "rgGetActionbarButtonBam()" sequence 12 ScaleToClip clickable lua "sidebarsGreyed ~= 1" action " game:SelectAll() " actionDbl " game:CenterOnGroupLeader() " } --begin clock label { name 'rgActionbarClock1' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 0" area 1902 66 100 50 bam "RGDCGEAR" ScaleToClip frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } label { name 'rgActionbarClock2' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 0" area 1902 66 100 50 bam "RGDCFRAM" ScaleToClip --frame lua "timer:GetCurrentHour() % timer.TIMESCALE_HOUR_PER_DAY" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } --begin clock iwd label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 1" area 1923 62 56 54 bam "RGDCLCK1" ScaleToClip frame lua "timer:GetCurrentTime() % 59" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } --begin clock bg1 label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 2" area 1924 60 56 56 bam "RGCGEAR1" ScaleToClip frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 2" area 1924 60 56 56 bam "RGCDIAL1" ScaleToClip frame lua "rgGetClockFrame()" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } --begin clock bg2 label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 3" area 1915 64 73 53 bam "CGEAR" frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 scaletoclip } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 3" area 1915 64 73 53 bam "CDIAL" frame lua "timer:GetCurrentHour() % timer.TIMESCALE_HOUR_PER_DAY" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 scaletoclip } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 3" area 1915 64 73 53 bam "CPEN" frame lua "timer:GetCurrentTime() % 24" useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 scaletoclip } label { enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1 and RgUISkin == 3" area 1915 64 73 53 bam "RGDCPEN2" scaletoclip useOverlayTint "worldScreen:CheckIfPaused()" overlayTint 180 180 180 } button { name 'rgActionbarClock3' enabled "worldScreen == e:GetActiveEngine() and RgIsModernHud == 1" area 1902 66 100 50 tooltip lua "worldScreen:GetCurrentTimeString()" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " worldScreen:TogglePauseGame(true) " } --end clock label { --area is preset enabled "gameOptions.m_bRenderFrameTimes" frameTimes } } ` loot = { containerItems = {}, groupItems = {}, groundItems = {} } function getContainerItemProperty(index, property) local idxScrolled = index + worldScreen:GetTopContainerItem() if(loot.containerItems[idxScrolled] == nil or loot.containerItems[idxScrolled].item == nil) then return nil end return loot.containerItems[idxScrolled].item[property] end function getGroupItemProperty(index, property) local idxScrolled = index + worldScreen:GetTopGroupItem() if(loot.groupItems[idxScrolled] == nil or loot.groupItems[idxScrolled].item == nil) then return nil end return loot.groupItems[idxScrolled].item[property] end function scrollContainerItems() if scrollDirection > 0 then if worldScreen:ContainerScrollEnabled(-2) then worldScreen:OnContainerScroll(-2) end elseif scrollDirection < 0 then if worldScreen:ContainerScrollEnabled(2) then worldScreen:OnContainerScroll(2) end end end function scrollGroupItems() if scrollDirection > 0 then if worldScreen:GroupScrollEnabled(-2) then worldScreen:OnGroupScroll(-2) end elseif scrollDirection < 0 then if worldScreen:GroupScrollEnabled(2) then worldScreen:OnGroupScroll(2) end end end function showContainerItemDescription(index) local idxScrolled = index + worldScreen:GetTopContainerItem() if(loot.containerItems[idxScrolled] == nil or loot.containerItems[idxScrolled].item == nil) then return nil end Infinity_GetContainerItemDescription(idxScrolled) showItemDescription(loot.containerItems[idxScrolled].item, 2) end function showGroupItemDescription(index) local idxScrolled = index + worldScreen:GetTopGroupItem() if(loot.groupItems[idxScrolled] == nil or loot.groupItems[idxScrolled].item == nil) then return nil end Infinity_GetGroupItemDescription(idxScrolled) showItemDescription(loot.groupItems[idxScrolled].item, 2) end function rgGetBackpackFrame() local res = 1 for i = 0, 15, 1 do if loot.groupItems[i].item['name'] == nil then res = 0 break end end return res end ` menu { name "WORLD_CONTAINER" align center bottom --offset 0 0 --ignoreesc onOpen " Infinity_PopMenu('LEFT_SIDEBAR_BOTTOM') Infinity_PushMenu('LEFT_SIDEBAR_BOTTOM') Infinity_PopMenu('RIGHT_SIDEBAR_BOTTOM') Infinity_PushMenu('RIGHT_SIDEBAR_BOTTOM') Infinity_PopMenu('RADAR') toolbarTop = toolbarTop -100 if RgModernHudRight == 1 then local w, h = Infinity_GetScreenSize() Infinity_SetOffset('WORLD_CONTAINER',(w/2)-332,0) else Infinity_SetOffset('WORLD_CONTAINER',0,0) end " onClose " toolbarTop = toolbarTop +100 " button { on escape area 0 0 0 0 action " Infinity_PushMenu('WORLD_ACTIONBAR') Infinity_PopMenu('WORLD_CONTAINER') " } label { name "rgActionbarBackground1" enabled "RgIsModernHud == 0" area 2 100 659 68 bam 'rgdmbcg1' frame 0 sequence lua "RgUISkin" ScaleToClip } label { name "rgActionbarBackground1" enabled "RgIsModernHud == 0" area 659 100 659 68 bam 'rgdmbcg1' frame 1 sequence lua "RgUISkin" ScaleToClip } label { name "rgActionbarBackground1" enabled "RgIsModernHud == 0" area 1316 100 659 68 bam 'rgdmbcg1' frame 2 sequence lua "RgUISkin" ScaleToClip } label { area 659 0 659 168 bam 'rgdmbcg5' sequence lua "RgUISkin" --rectangle 0 ScaleToClip } label { area 670 26 76 67 bam lua "loot.containerIcon" scaleToClip } button { area 746 10 314 106 actionScroll "scrollContainerItems()" } button { area 746 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(0,'name')" tint lua "getContainerItemProperty(0,'tint')" icon lua "getContainerItemProperty(0,'icon')" count lua "getContainerItemProperty(0,'count')" usages lua "getContainerItemProperty(0,'usages')" action "worldScreen:OnContainerButtonClick(0)" actionAlt "showContainerItemDescription(0)" actionScroll "scrollContainerItems()" } button { area 798 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(1,'name')" tint lua "getContainerItemProperty(1,'tint')" icon lua "getContainerItemProperty(1,'icon')" count lua "getContainerItemProperty(1,'count')" usages lua "getContainerItemProperty(1,'usages')" action "worldScreen:OnContainerButtonClick(1)" actionAlt "showContainerItemDescription(1)" actionScroll "scrollContainerItems()" } button { area 850 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(2,'name')" tint lua "getContainerItemProperty(2,'tint')" icon lua "getContainerItemProperty(2,'icon')" count lua "getContainerItemProperty(2,'count')" usages lua "getContainerItemProperty(2,'usages')" action "worldScreen:OnContainerButtonClick(2)" actionAlt "showContainerItemDescription(2)" actionScroll "scrollContainerItems()" } button { area 902 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(3,'name')" tint lua "getContainerItemProperty(3,'tint')" icon lua "getContainerItemProperty(3,'icon')" count lua "getContainerItemProperty(3,'count')" usages lua "getContainerItemProperty(3,'usages')" action "worldScreen:OnContainerButtonClick(3)" actionAlt "showContainerItemDescription(3)" actionScroll "scrollContainerItems()" } button { area 954 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(4,'name')" tint lua "getContainerItemProperty(4,'tint')" icon lua "getContainerItemProperty(4,'icon')" count lua "getContainerItemProperty(4,'count')" usages lua "getContainerItemProperty(4,'usages')" action "worldScreen:OnContainerButtonClick(4)" actionAlt "showContainerItemDescription(4)" actionScroll "scrollContainerItems()" } button { area 1006 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(5,'name')" tint lua "getContainerItemProperty(5,'tint')" icon lua "getContainerItemProperty(5,'icon')" count lua "getContainerItemProperty(5,'count')" usages lua "getContainerItemProperty(5,'usages')" action "worldScreen:OnContainerButtonClick(5)" actionAlt "showContainerItemDescription(5)" actionScroll "scrollContainerItems()" } button { area 746 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(6,'name')" tint lua "getContainerItemProperty(6,'tint')" icon lua "getContainerItemProperty(6,'icon')" count lua "getContainerItemProperty(6,'count')" usages lua "getContainerItemProperty(6,'usages')" action " worldScreen:OnContainerScroll(2) worldScreen:OnContainerButtonClick(0) worldScreen:OnContainerScroll(-2) " actionAlt "showContainerItemDescription(6)" actionScroll "scrollContainerItems()" } button { area 798 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(7,'name')" tint lua "getContainerItemProperty(7,'tint')" icon lua "getContainerItemProperty(7,'icon')" count lua "getContainerItemProperty(7,'count')" usages lua "getContainerItemProperty(7,'usages')" action " worldScreen:OnContainerScroll(2) worldScreen:OnContainerButtonClick(1) worldScreen:OnContainerScroll(-2) " actionAlt "showContainerItemDescription(7)" actionScroll "scrollContainerItems()" } button { area 850 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(8,'name')" tint lua "getContainerItemProperty(8,'tint')" icon lua "getContainerItemProperty(8,'icon')" count lua "getContainerItemProperty(8,'count')" usages lua "getContainerItemProperty(8,'usages')" action " worldScreen:OnContainerScroll(2) worldScreen:OnContainerButtonClick(2) worldScreen:OnContainerScroll(-2) " actionAlt "showContainerItemDescription(8)" actionScroll "scrollContainerItems()" } button { area 902 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(9,'name')" tint lua "getContainerItemProperty(9,'tint')" icon lua "getContainerItemProperty(9,'icon')" count lua "getContainerItemProperty(9,'count')" usages lua "getContainerItemProperty(9,'usages')" action " worldScreen:OnContainerScroll(2) worldScreen:OnContainerButtonClick(3) worldScreen:OnContainerScroll(-2) " actionAlt "showContainerItemDescription(9)" actionScroll "scrollContainerItems()" } button { area 954 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(10,'name')" tint lua "getContainerItemProperty(10,'tint')" icon lua "getContainerItemProperty(10,'icon')" count lua "getContainerItemProperty(10,'count')" usages lua "getContainerItemProperty(10,'usages')" action " worldScreen:OnContainerScroll(2) worldScreen:OnContainerButtonClick(4) worldScreen:OnContainerScroll(-2) " actionAlt "showContainerItemDescription(10)" actionScroll "scrollContainerItems()" } button { area 1006 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getContainerItemProperty(11,'name')" tint lua "getContainerItemProperty(11,'tint')" icon lua "getContainerItemProperty(11,'icon')" count lua "getContainerItemProperty(11,'count')" usages lua "getContainerItemProperty(11,'usages')" action " worldScreen:OnContainerScroll(2) worldScreen:OnContainerButtonClick(5) worldScreen:OnContainerScroll(-2) " actionAlt "showContainerItemDescription(11)" actionScroll "scrollContainerItems()" } button { area 1059 13 17 46 enabled "worldScreen:ContainerScrollEnabled(-2)" bam rgdmbtar sequence 0 scaleToClip action " worldScreen:OnContainerScroll(-2) " actionScroll "scrollContainerItems()" } button { area 1059 65 17 46 enabled "worldScreen:ContainerScrollEnabled(2)" bam rgdmbtar sequence 1 scaleToClip action " worldScreen:OnContainerScroll(2) " actionScroll "scrollContainerItems()" } label { area 1188 120 34 46 bam rgdcontb scaleToClip frame lua "rgGetBackpackFrame()" } label { area 1117 133 175 18 encumbrance } button { area 1082 10 208 106 actionScroll "scrollGroupItems()" } button { area 1082 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(0,'name')" tint lua "getGroupItemProperty(0,'tint')" icon lua "getGroupItemProperty(0,'icon')" count lua "getGroupItemProperty(0,'count')" usages lua "getGroupItemProperty(0,'usages')" action "worldScreen:OnContainerButtonClick(10)" actionAlt "showGroupItemDescription(0)" actionScroll "scrollGroupItems()" } button { area 1134 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(1,'name')" tint lua "getGroupItemProperty(1,'tint')" icon lua "getGroupItemProperty(1,'icon')" count lua "getGroupItemProperty(1,'count')" usages lua "getGroupItemProperty(1,'usages')" action "worldScreen:OnContainerButtonClick(11)" actionAlt "showGroupItemDescription(1)" actionScroll "scrollGroupItems()" } button { area 1186 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(2,'name')" tint lua "getGroupItemProperty(2,'tint')" icon lua "getGroupItemProperty(2,'icon')" count lua "getGroupItemProperty(2,'count')" usages lua "getGroupItemProperty(2,'usages')" action "worldScreen:OnContainerButtonClick(12)" actionAlt "showGroupItemDescription(2)" actionScroll "scrollGroupItems()" } button { area 1238 10 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(3,'name')" tint lua "getGroupItemProperty(3,'tint')" icon lua "getGroupItemProperty(3,'icon')" count lua "getGroupItemProperty(3,'count')" usages lua "getGroupItemProperty(3,'usages')" action "worldScreen:OnContainerButtonClick(13)" actionAlt "showGroupItemDescription(3)" actionScroll "scrollGroupItems()" } button { area 1082 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(4,'name')" tint lua "getGroupItemProperty(4,'tint')" icon lua "getGroupItemProperty(4,'icon')" count lua "getGroupItemProperty(4,'count')" usages lua "getGroupItemProperty(4,'usages')" action " worldScreen:OnGroupScroll(2) worldScreen:OnContainerButtonClick(10) worldScreen:OnGroupScroll(-2) " actionAlt "showGroupItemDescription(4)" actionScroll "scrollGroupItems()" } button { area 1134 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(5,'name')" tint lua "getGroupItemProperty(5,'tint')" icon lua "getGroupItemProperty(5,'icon')" count lua "getGroupItemProperty(5,'count')" usages lua "getGroupItemProperty(5,'usages')" action " worldScreen:OnGroupScroll(2) worldScreen:OnContainerButtonClick(11) worldScreen:OnGroupScroll(-2) " actionAlt "showGroupItemDescription(5)" actionScroll "scrollGroupItems()" } button { area 1186 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(6,'name')" tint lua "getGroupItemProperty(6,'tint')" icon lua "getGroupItemProperty(6,'icon')" count lua "getGroupItemProperty(6,'count')" usages lua "getGroupItemProperty(6,'usages')" action " worldScreen:OnGroupScroll(2) worldScreen:OnContainerButtonClick(12) worldScreen:OnGroupScroll(-2) " actionAlt "showGroupItemDescription(6)" actionScroll "scrollGroupItems()" } button { area 1238 62 52 52 bam RGDSLOT sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroupItemProperty(7,'name')" tint lua "getGroupItemProperty(7,'tint')" icon lua "getGroupItemProperty(7,'icon')" count lua "getGroupItemProperty(7,'count')" usages lua "getGroupItemProperty(7,'usages')" action " worldScreen:OnGroupScroll(2) worldScreen:OnContainerButtonClick(13) worldScreen:OnGroupScroll(-2) " actionAlt "showGroupItemDescription(7)" actionScroll "scrollGroupItems()" } button { area 1291 13 17 46 enabled "worldScreen:GroupScrollEnabled(-2)" bam rgdmbtar sequence 0 scaleToClip action " worldScreen:OnGroupScroll(-2) " actionScroll "scrollGroupItems()" } button { area 1291 65 17 46 enabled "worldScreen:GroupScrollEnabled(2)" bam rgdmbtar sequence 1 scaleToClip action " worldScreen:OnGroupScroll(2) " } label { area 890 124 50 38 bam GUIGOLD scaleToClip } label { area 966 124 109 38 text lua "game:GetPartyGold()" text style "normal" text align left center text color '$' } button { area 678 125 184 34 bam "rgdmloot" text 'RG_LOOTALL' text style "button" text align left center pad 45 6 0 5 scaleToClip action " worldScreen:TakeAllFromContainer() " } } ` function getSlotContainerId(index) local idxScrolled = index + worldScreen:GetTopGroundItem() if(loot.groundItems[idxScrolled] == nil) then return nil end return loot.groundItems[idxScrolled].containerId end function getGroundItemProperty(index, property) local idxScrolled = index + worldScreen:GetTopGroundItem() if(loot.groundItems[idxScrolled] == nil or loot.groundItems[idxScrolled].item == nil) then return nil end return loot.groundItems[idxScrolled].item[property] end function groundItemClick(slotId) local slot = loot.groundItems[slotId + worldScreen:GetTopGroundItem()] if(slot and slot.item) then worldScreen:OnGroundButtonClick(slot.slotId, slot.containerId, slot.item.res) end end function rgQuicklootMassPickSameItem(slotId) local slot = loot.groundItems[slotId + worldScreen:GetTopGroundItem()] if(slot and slot.item) then Infinity_GetGroundItemDescription(slotId + worldScreen:GetTopGroundItem(), slot.slotId, slot.containerId) showItemDescription(slot.item, 2) end end function rgGetQuicklootPosition() local screenWidth, screenHeight = Infinity_GetScreenSize() if RgIsModernHud == 1 then Infinity_SetArea('rgQuicklootArrLeft',2,screenHeight-179,38,53) Infinity_SetArea('rgQuicklootArrRight',610,screenHeight-179,40,53) Infinity_SetArea('rgQuicklootSlot1',46,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot2',102,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot3',158,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot4',214,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot5',270,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot6',326,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot7',383,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot8',439,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot9',495,screenHeight-180,52,52) Infinity_SetArea('rgQuicklootSlot10',551,screenHeight-180,52,52) else Infinity_SetArea('rgQuicklootArrLeft',2,4,38,53) Infinity_SetArea('rgQuicklootArrRight',610,4,40,53) Infinity_SetArea('rgQuicklootSlot1',46,5,52,52) Infinity_SetArea('rgQuicklootSlot2',102,5,52,52) Infinity_SetArea('rgQuicklootSlot3',158,5,52,52) Infinity_SetArea('rgQuicklootSlot4',214,5,52,52) Infinity_SetArea('rgQuicklootSlot5',270,5,52,52) Infinity_SetArea('rgQuicklootSlot6',326,5,52,52) Infinity_SetArea('rgQuicklootSlot7',383,5,52,52) Infinity_SetArea('rgQuicklootSlot8',439,5,52,52) Infinity_SetArea('rgQuicklootSlot9',495,5,52,52) Infinity_SetArea('rgQuicklootSlot10',551,5,52,52) end end RgQuicklootCenter = 1 function rgGetQuicklootSlotPosition() local x = 0 local screenWidth, screenHeight = Infinity_GetScreenSize() if RgQuicklootCenter == 1 then x = (screenWidth/2)-354 end if RgQuicklootBottom == 1 then rgQlRowIndex1 = 50 rgQlRowIndex2 = 40 rgQlRowIndex3 = 30 rgQlRowIndex4 = 20 rgQlRowIndex5 = 10 rgQlRowIndex6 = 0 if RgMessageboxUnlocked == 1 then Infinity_SetOffset('WORLD_QUICKLOOT',x, screenHeight - 337 - 90) Infinity_SetArea('rgQuicklootArrLeft',22,257,nil,nil) Infinity_SetArea('rgQuicklootArrRight',50,257,nil,nil) Infinity_SetArea('rgQuicklootJunkButton',22,285,nil,nil) Infinity_SetArea('rgQuicklootPickButton',50,285,nil,nil) end if RgIsModernHud == 1 then Infinity_SetOffset('WORLD_QUICKLOOT',x, screenHeight - 337 - 120) Infinity_SetArea('rgQuicklootArrLeft',22,282,nil,nil) Infinity_SetArea('rgQuicklootArrRight',50,282,nil,nil) Infinity_SetArea('rgQuicklootJunkButton',22,310,nil,nil) Infinity_SetArea('rgQuicklootPickButton',50,310,nil,nil) end if RgMessageboxUnlocked == 0 and RgIsModernHud == 0 then Infinity_SetOffset('WORLD_QUICKLOOT',x, screenHeight - 337 -toolbarTop) Infinity_SetArea('rgQuicklootArrLeft',22,282,nil,nil) Infinity_SetArea('rgQuicklootArrRight',50,282,nil,nil) Infinity_SetArea('rgQuicklootJunkButton',22,310,nil,nil) Infinity_SetArea('rgQuicklootPickButton',50,310,nil,nil) end else rgQlRowIndex1 = 0 rgQlRowIndex2 = 10 rgQlRowIndex3 = 20 rgQlRowIndex4 = 30 rgQlRowIndex5 = 40 rgQlRowIndex6 = 50 Infinity_SetOffset('WORLD_QUICKLOOT',x, 0) Infinity_SetArea('rgQuicklootArrLeft',22,33,nil,nil) Infinity_SetArea('rgQuicklootArrRight',50,33,nil,nil) Infinity_SetArea('rgQuicklootJunkButton',22,5,nil,nil) Infinity_SetArea('rgQuicklootPickButton',50,5,nil,nil) end end --function rgGetGroundItemProperty(index, property) -- local junk = 0 -- if RgQuicklootFilterJunk == 1 then -- junk = rgQuicklootJunkTable[index+1] -- end -- return getGroundItemProperty(index+junk, property) --end function rgGetQlSlotIndex(index) local junk = 0 if RgQuicklootFilterJunk == 1 and rgQuicklootJunkTable ~= nil and #rgQuicklootJunkTable > 0 then if worldScreen:GetTopGroundItem() == 0 then junk = rgQuicklootJunkTable[index+1] else junk = rgQuicklootJunkTable[index+1] + rgQuicklootJunkTable[worldScreen:GetTopGroundItem()] end end if junk == nil then junk = 0 end return index+junk end --rgQuicklootTable = { } rgQuicklootJunkTable = { } rgQuicklootJunkTablePlaceholder = { } function rgGetQuicklootJunkIndexes() if RgQuicklootFilterJunk == 1 then --rgQlJunkStrings = { 'Short Sword','Large Shield','Arrow'} local count = 0 rgQuicklootJunkTablePlaceholder = { } for i = 0, 1000, 1 do local isJunk = false for k,v in pairs(rgQlJunkStrings) do if Infinity_FetchString(v) == getGroundItemProperty(i,'name') then isJunk = true break end end if getGroundItemProperty(i,'tint') ~= 'STORTIN2' and isJunk == true then count = count + 1 if count > 1 then for a = 0, count-2, 1 do rgQuicklootJunkTable[i-a] = count rgQuicklootJunkTablePlaceholder[i-a] = count end end end rgQuicklootJunkTable[i+1] = count rgQuicklootJunkTablePlaceholder[i+1] = count if getGroundItemProperty(i,'name') == nil then break end end end end function rgQuicklootSlotVisibility(offset) if getSlotContainerId(offset,'containerId') then return true else return false end end function rgQuicklootArrowsEnabled() if RgQuicklootFilterJunk == 0 then if worldScreen:GroundScrollEnabled(-RgQuicklootRows) or worldScreen:GroundScrollEnabled(RgQuicklootRows) then return true else return false end else local count = #rgQuicklootJunkTablePlaceholder - 1 - rgQuicklootJunkTablePlaceholder[#rgQuicklootJunkTablePlaceholder] + worldScreen:GetTopGroundItem() if count > RgQuicklootRows * 10 then return true else return false end end end function rgQuicklootFirstSlotClickable(row) if RgQuicklootRows == 1 then return true else local actRow = 1 if RgQuicklootBottom == 1 then actRow = 6 end if row == actRow then if #loot.groundItems ~= RgQuicklootRows * 10 or worldScreen:GetTopGroundItem() == 0 then return true else return false end else return true end end end function rgQuicklootMassPickSameItem(item) rgQlName = getGroundItemProperty(item,'name') local idxs = {rgQlRowIndex6,rgQlRowIndex5,rgQlRowIndex4,rgQlRowIndex3,rgQlRowIndex2,rgQlRowIndex1} for i=1,6,1 do for j=1,10,1 do local idx = idxs[i]+(10-j) if getGroundItemProperty(rgGetQlSlotIndex(idx),'name') == rgQlName then groundItemClick(rgGetQlSlotIndex(idx)) end end end end function rgQuicklootPickAllItems() local idxs = {rgQlRowIndex6,rgQlRowIndex5,rgQlRowIndex4,rgQlRowIndex3,rgQlRowIndex2,rgQlRowIndex1} for i=1,6,1 do for j=1,10,1 do local idx = idxs[i]+(10-j) groundItemClick(rgGetQlSlotIndex(idx)) end end end ` menu { name 'WORLD_QUICKLOOT' align left top ignoreEsc --offset 0 -150 --offset 0 805 onOpen " rgGetQuicklootSlotPosition() rgQlName = '' --worldScreen:GroundScrollEnabled(0) --Infinity_SetOffset('WORLD_QUICKLOOT',0, -toolbarTop) " button { area 0 0 0 0 text lua "rgGetQuicklootJunkIndexes()" } button { name 'rgQuicklootJunkButton' area 0 5 28 28 enabled "getSlotContainerId(0,'containerId')"-- and (RgMessageboxUnlocked == 1 or RgIsModernHud == 1)" bam RGDMBTQ3 Sequence lua "RgUISkin" scaleToClip toggle RgQuicklootFilterJunk tooltip lua "getUiString('RG_JUNKBUTTON')" action " Infinity_SetINIValue('Game Options','RgQuicklootFilterJunk',RgQuicklootFilterJunk) " } button { name 'rgQuicklootPickButton' area 28 5 28 28 enabled "getSlotContainerId(0,'containerId')"-- and (RgMessageboxUnlocked == 1 or RgIsModernHud == 1)" bam RGDMBTQ4 Sequence lua "RgUISkin" scaleToClip tooltip lua "getUiString('RG_LOOTALL')" action " rgQuicklootPickAllItems() " } button { name 'rgQuicklootArrLeft' area 0 35 28 28 bam RGDMBTQ1 ScaleToClip Sequence lua "RgUISkin" enabled "rgQuicklootArrowsEnabled()" action " worldScreen:OnGroundScroll(-RgQuicklootRows) " } button { name 'rgQuicklootArrRight' area 28 35 28 28 bam RGDMBTQ2 ScaleToClip Sequence lua "RgUISkin" enabled "rgQuicklootArrowsEnabled()" action " worldScreen:OnGroundScroll(RgQuicklootRows) " } button { name 'rgQuicklootSlot1' area 84 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+0)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " clickable lua "rgQuicklootFirstSlotClickable(1)" bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+0),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+0),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+0),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+0),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+0),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+0))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+0))" --actionAlt "showGroundItemDescription(rgGetQlSlotIndex(rgQlRowIndex1+0))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+0),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot2' area 140 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+1)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+1),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+1),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+1),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+1),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+1),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+1))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+1))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+1),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot3' area 196 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+2)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+2),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+2),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+2),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+2),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+2),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+2))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+2))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+2),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot4' area 252 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+3)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+3),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+3),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+3),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+3),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+3),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+3))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+3))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+3),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot5' area 308 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+4)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+4),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+4),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+4),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+4),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+4),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+4))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+4))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+4),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot6' area 365 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+5)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+5),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+5),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+5),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+5),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+5),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+5))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+5))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+5),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot7' area 421 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+6)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+6),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+6),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+6),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+6),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+6),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+6))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+6))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+6),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot8' area 477 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+7)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+7),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+7),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+7),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+7),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+7),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+7))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+7))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+7),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot9' area 533 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+8)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+8),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+8),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+8),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+8),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+8),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+8))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+8))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+8),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot10' area 589 5 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex1+9)) and RgQuicklootRows > ( rgQlRowIndex1 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+9),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+9),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+9),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+9),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex1+9),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex1+9))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex1+9))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex1+9),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot11' area 84 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+0)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " clickable lua "rgQuicklootFirstSlotClickable(2)" bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+0),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+0),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+0),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+0),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+0),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+0))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+0))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+0),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot12' area 140 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+1)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+1),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+1),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+1),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+1),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+1),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+1))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+1))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+1),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot13' area 196 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+2)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+2),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+2),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+2),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+2),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+2),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+2))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+2))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+2),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot14' area 252 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+3)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+3),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+3),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+3),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+3),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+3),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+3))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+3))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+3),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot15' area 308 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+4)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+4),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+4),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+4),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+4),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+4),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+4))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+4))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+4),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot16' area 365 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+5)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+5),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+5),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+5),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+5),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+5),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+5))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+5))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+5),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot17' area 421 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+6)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+6),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+6),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+6),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+6),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+6),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+6))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+6))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+6),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot18' area 477 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+7)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+7),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+7),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+7),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+7),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+7),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+7))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+7))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+7),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot19' area 533 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+8)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+8),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+8),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+8),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+8),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+8),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+8))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+8))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+8),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot20' area 589 61 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex2+9)) and RgQuicklootRows > ( rgQlRowIndex2 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+9),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+9),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+9),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+9),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex2+9),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex2+9))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex2+9))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex2+9),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot11' area 84 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+0)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " clickable lua "rgQuicklootFirstSlotClickable(3)" bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+0),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+0),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+0),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+0),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+0),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+0))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+0))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+0),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot12' area 140 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+1)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+1),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+1),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+1),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+1),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+1),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+1))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+1))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+1),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot13' area 196 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+2)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+2),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+2),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+2),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+2),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+2),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+2))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+2))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+2),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot14' area 252 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+3)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+3),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+3),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+3),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+3),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+3),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+3))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+3))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+3),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot15' area 308 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+4)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+4),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+4),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+4),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+4),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+4),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+4))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+4))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+4),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot16' area 365 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+5)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+5),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+5),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+5),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+5),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+5),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+5))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+5))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+5),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot17' area 421 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+6)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+6),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+6),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+6),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+6),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+6),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+6))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+6))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+6),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot18' area 477 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+7)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+7),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+7),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+7),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+7),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+7),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+7))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+7))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+7),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot19' area 533 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+8)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+8),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+8),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+8),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+8),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+8),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+8))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+8))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+8),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot20' area 589 117 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex3+9)) and RgQuicklootRows > ( rgQlRowIndex3 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+9),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+9),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+9),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+9),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex3+9),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex3+9))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex3+9))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex3+9),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot11' area 84 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+0)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " clickable lua "rgQuicklootFirstSlotClickable(4)" bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+0),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+0),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+0),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+0),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+0),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+0))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+0))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+0),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot12' area 140 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+1)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+1),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+1),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+1),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+1),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+1),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+1))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+1))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+1),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot13' area 196 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+2)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+2),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+2),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+2),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+2),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+2),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+2))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+2))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+2),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot14' area 252 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+3)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+3),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+3),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+3),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+3),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+3),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+3))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+3))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+3),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot15' area 308 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+4)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+4),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+4),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+4),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+4),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+4),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+4))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+4))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+4),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot16' area 365 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+5)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+5),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+5),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+5),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+5),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+5),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+5))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+5))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+5),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot17' area 421 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+6)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+6),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+6),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+6),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+6),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+6),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+6))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+6))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+6),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot18' area 477 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+7)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+7),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+7),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+7),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+7),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+7),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+7))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+7))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+7),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot19' area 533 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+8)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+8),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+8),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+8),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+8),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+8),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+8))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+8))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+8),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot20' area 589 173 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex4+9)) and RgQuicklootRows > ( rgQlRowIndex4 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+9),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+9),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+9),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+9),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex4+9),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex4+9))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex4+9))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex4+9),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot11' area 84 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+0)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " clickable lua "rgQuicklootFirstSlotClickable(5)" bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+0),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+0),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+0),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+0),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+0),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+0))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+0))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+0),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot12' area 140 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+1)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+1),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+1),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+1),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+1),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+1),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+1))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+1))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+1),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot13' area 196 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+2)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+2),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+2),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+2),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+2),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+2),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+2))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+2))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+2),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot14' area 252 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+3)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+3),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+3),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+3),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+3),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+3),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+3))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+3))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+3),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot15' area 308 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+4)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+4),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+4),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+4),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+4),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+4),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+4))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+4))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+4),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot16' area 365 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+5)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+5),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+5),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+5),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+5),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+5),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+5))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+5))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+5),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot17' area 421 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+6)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+6),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+6),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+6),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+6),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+6),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+6))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+6))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+6),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot18' area 477 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+7)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+7),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+7),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+7),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+7),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+7),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+7))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+7))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+7),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot19' area 533 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+8)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+8),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+8),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+8),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+8),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+8),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+8))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+8))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+8),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot20' area 589 229 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex5+9)) and RgQuicklootRows > ( rgQlRowIndex5 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+9),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+9),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+9),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+9),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex5+9),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex5+9))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex5+9))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex5+9),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot11' area 84 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+0)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " clickable lua "rgQuicklootFirstSlotClickable(6)" bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+0),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+0),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+0),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+0),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+0),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+0))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+0))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+0),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot12' area 140 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+1)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+1),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+1),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+1),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+1),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+1),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+1))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+1))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+1),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot13' area 196 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+2)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+2),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+2),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+2),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+2),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+2),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+2))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+2))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+2),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot14' area 252 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+3)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+3),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+3),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+3),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+3),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+3),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+3))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+3))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+3),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot15' area 308 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+4)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+4),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+4),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+4),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+4),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+4),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+4))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+4))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+4),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot16' area 365 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+5)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+5),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+5),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+5),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+5),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+5),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+5))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+5))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+5),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot17' area 421 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+6)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+6),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+6),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+6),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+6),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+6),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+6))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+6))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+6),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot18' area 477 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+7)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+7),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+7),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+7),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+7),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+7),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+7))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+7))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+7),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot19' area 533 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+8)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+8),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+8),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+8),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+8),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+8),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+8))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+8))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+8),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } button { name 'rgQuicklootSlot20' area 589 285 52 52 enabled "rgQuicklootSlotVisibility(rgGetQlSlotIndex(rgQlRowIndex6+9)) and RgQuicklootRows > ( rgQlRowIndex6 / 10) " bam rgdslot3 sequence lua "RgUISkin" ScaleToClip tooltip lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+9),'name') " tint lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+9),'tint') " icon lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+9),'icon') " count lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+9),'count') " usages lua "getGroundItemProperty(rgGetQlSlotIndex(rgQlRowIndex6+9),'usages') " action "groundItemClick(rgGetQlSlotIndex(rgQlRowIndex6+9))" actionAlt "rgQuicklootMassPickSameItem(rgGetQlSlotIndex(rgQlRowIndex6+9))" actionEnter "mouseOverQuicklootContainer = getSlotContainerId(rgGetQlSlotIndex(rgQlRowIndex6+9),'containerId') " actionExit "mouseOverQuicklootContainer = nil" } } menu { name 'WORLD_PICKPARTY' align center bottom ignoreEsc offset 0 100 label { area 0 0 2079 834 mosaic rgdparty } label { area 575 570 654 32 text lua "getUiString('REMOVE_MEMBERS_LABEL') .. ': ' .. game:GetCharacterOverflowCount()" text style "button" text shadow 1 align center center } button { area 575 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(0) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 669 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(1) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 763 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(2) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 857 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(3) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 951 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(4) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 1045 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(5) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 1139 606 90 126 glow lua "worldScreen:GetPickPartyCharacterId(6) == worldScreen:GetPickPartyRemoveCharacterId()" bam rgdport2 sequence lua "RgUISkin" ScaleToClip } button { area 581 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(0)" glow lua "worldScreen:GetPickPartyCharacterId(0) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(0)" } button { area 675 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(1)" glow lua "worldScreen:GetPickPartyCharacterId(1) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(1)" } button { area 771 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(2)" glow lua "worldScreen:GetPickPartyCharacterId(2) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(2)" } button { area 863 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(3)" glow lua "worldScreen:GetPickPartyCharacterId(3) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(3)" } button { area 957 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(4)" glow lua "worldScreen:GetPickPartyCharacterId(4) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(4)" } button { area 1051 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(5)" glow lua "worldScreen:GetPickPartyCharacterId(5) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(5)" } button { area 1145 610 78 118 bitmap lua "worldScreen:GetPickPartyPortrait(6)" glow lua "worldScreen:GetPickPartyCharacterId(6) == worldScreen:GetPickPartyRemoveCharacterId()" action "worldScreen:OnPickPartyPortraitButtonClick(6)" } button { area 1239 606 266 60 bam rgdbuts1 ScaleToClip text "REMOVE_BUTTON" text style "button" clickable lua "worldScreen:IsPickPartyRemoveButtonClickable()" sequence lua "RgUISkin" action " popup2Button(17518, 'REMOVE_BUTTON', function() worldScreen:RemoveCharacterFromParty() end) " } button { area 1239 672 266 60 bam rgdbuts1 ScaleToClip text "DONE_BUTTON" text style "button" sequence lua "RgUISkin" clickable lua "worldScreen:IsPickPartyDoneButtonClickable()" on esc action " worldScreen:OnPickPartyDoneButtonClick() " } } ` currentSave = 0 rgLoadNames = { } rgLoadFiltered = { } rgLoadName = '*' rgLoadSort = 0 rgLoadColumns = 1 function getSaveBackground(row) if(row == currentSave) then return "GUISAVEC" else return "GUISAVEB" end end function getLoadMenuTitle() if (gameSaves.isImporting~=1) then return getUiString('LOAD_TITLE') end return getUiString('IMPORT_TITLE') end function rgGetLoadCharNames() local outList = { } for k, v in ipairs(gameSaves.files) do table.insert(outList, v.sName) end local nameList = {"*" } table.sort(outList) local prevName = '' for k, v in ipairs(outList) do if v ~= prevName then table.insert(nameList, v) prevName = v end end rgLoadNames = nameList end function rgLoadCharNamesFilter(rowNumber) if(rgLoadName == nil or rgLoadName == "" or rgLoadName == "*") then return true end local text = gameSaves.files[rowNumber].sName if text == rgLoadName then return true else return false end end function rgGetFilterSortBackground(row) local text = rgLoadSorts[row] if(text == rgLoadSort) then return 1 else return 0 end end function rgGetLoadFilteredSaves() local outList = { } local save for k, v in ipairs(gameSaves.files) do save = deepcopy(v) if v.sName == rgLoadName or rgLoadName == '*' then table.insert(outList, save) end end if rgLoadSort == 1 then table.sort(outList,rgCompareSavesByGameTime) elseif rgLoadSort == 2 then table.sort(outList,rgCompareSavesByName) end --fix for a lag bug if rgLoadColumns > 1 then local lastsave = deepcopy(save) for i=1,rgLoadColumns,1 do if not rgIsNthNumber(#outList+1,rgLoadColumns) then lastsave.slotName = 'rgRandomEndSave' table.insert(outList, lastsave) end end end rgLoadFiltered = outList end function rgCompareSavesByGameTime(s1,s2) --return true if s1 comes before s2 --show the most recent saves first --local n1 = string.match (s1.time, "%d+") --local n2 = string.match (s2.time, "%d+") return rgGetValueFromTimeString(s1.time) > rgGetValueFromTimeString(s2.time) end function rgCompareSavesByName(s1,s2) return s1.slotName:lower() < s2.slotName:lower() end function rgGetValueFromTimeString(str) local s1 = string.match (str, '%d+') local s2 = string.gsub(str, s1, '') local s3 = string.match (s2, '%d+') local s4 = '' if s3 == nil then if string.len(s1) == 1 then s4 = '0.0' .. s1 else s4 = '0.' .. s1 end elseif string.len(s3) == 1 then s4 = s1 .. '.0' .. s3 else s4 = s1 .. '.' .. s3 end return s4 - 0 end function rgGetLoadSortTitle() if rgLoadSort == 0 then return 'RG_L_SORT_DEFA' elseif rgLoadSort == 1 then return 'RG_L_SORT_TIME' else return 'RG_L_SORT_NAME' end end function rgGetLoadNameTitle() if rgLoadName == '*' then return 'RG_L_CHARACTER' else return rgLoadName end end function rgGetLoadColsTitle() if rgLoadColumns == 1 then return 'RG_L_ROW_VIEW' else return 'RG_L_TIL_VIEW' end end ` menu { name 'LOAD' align left top ignoreEsc onOpen " if gameSaves.isImporting == 1 and e:IsIOS() and (gameSaves.files == nil or #(gameSaves.files) == 0) then popupInfo(Infinity_FetchString(71373)) end rgGetLoadCharNames() rgGetLoadFilteredSaves() rgLoadNamesFilter = 0 --rgLoadSortsFilter = 0 rgGetLoadMenuArea() selectedBeast = 0 " button { area 0 0 1365 768 action " currentSave = nil --rgLoadSortsFilter = 0 rgLoadNamesFilter = 0 " } label { name 'rgmainmenutitleload' ScaleToClip area 815 48 510 131 bam 'RGDTITLE' frame lua "rgGetTitleFrame()" } label { enabled "rgLoadColumns < 3" name "rgLoadListBackground" area 0 0 870 768 bam rgdlolbc scaleToClip } label { enabled "rgLoadColumns == 3" name "rgLoadListBackground1" area 0 0 1250 768 bam rgdlolbc scaleToClip } list { column { width 100 label { area 0 0 760 130 bam 'rgdlobc6' scaleToClip sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" align left top } button { enabled "rgLoadFiltered[rowNumber].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber].screenshot" --bitmap area 8 8 160 120 align center center } label { area 185 15 510 30 text lua "rgLoadFiltered[rowNumber].slotName" text style "normal" align left center } label { area 185 58 310 30 text lua "rgLoadFiltered[rowNumber].time" text style "normal" text color "X" text point 12 align left top } label { area 185 88 310 30 text lua "rgLoadFiltered[rowNumber].chapter" text style "normal" text color "X" text point 12 align left top } button { enabled "rgLoadFiltered[rowNumber].hasPortrait0" area 469 53 42 64 bitmap res "rgLoadFiltered[rowNumber].portrait0" align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber].portrait1" area 516 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber].portrait2" area 564 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber].portrait3" area 611 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber].portrait4" area 659 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber].portrait5" area 706 53 42 64 align center center } label { area 0 0 1 135 } label { area 0 0 760 130 bam 'rgdlobc7' sequence lua "RgUISkin" scaleToClip align left top } } action " if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil end " actionDbl " if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil else Infinity_PlaySound('GAM_09') loadScreen:LoadGame(rgLoadFiltered[currentSave].fileName) end " enabled "rgLoadColumns == 1" name "rgmainmenuloadlist1" area 28 5 780 758 rowheight dynamic hidehighlight table "rgLoadFiltered" var currentSave scrollbar 'rgdscrl1' } list { column { width 50 label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 175 5 190 30 text lua "rgLoadFiltered[rowNumber].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 175 33 190 20 text lua "rgLoadFiltered[rowNumber].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 175 53 190 20 text lua "rgLoadFiltered[rowNumber].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait0" area 176 75 29 45 bitmap res "rgLoadFiltered[rowNumber].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber].portrait1" area 209 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber].portrait2" area 241 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber].portrait3" area 274 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber].portrait4" area 307 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber].portrait5" area 339 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } column { width 50 label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber+1,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber+1].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 175 5 190 30 text lua "rgLoadFiltered[rowNumber+1].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 175 33 190 20 text lua "rgLoadFiltered[rowNumber+1].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 175 53 190 20 text lua "rgLoadFiltered[rowNumber+1].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait0" area 176 75 28 44 bitmap res "rgLoadFiltered[rowNumber+1].portrait0" --bitmap area 0 0 28 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber+1].portrait1" area 209 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber+1].portrait2" area 241 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber+1].portrait3" area 274 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber+1].portrait4" area 307 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber+1].portrait5" area 339 75 28 44 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } action " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil end " actionDbl " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil else Infinity_PlaySound('GAM_09') loadScreen:LoadGame(rgLoadFiltered[currentSave].fileName) end " enabled "rgLoadColumns == 2" name "rgmainmenuloadlist2" area 28 5 780 758 rowheight dynamic hidehighlight table "rgLoadFiltered" var currentSave scrollbar 'rgdscrl1' } list { column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 173 5 190 30 text lua "rgLoadFiltered[rowNumber].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 173 33 190 20 text lua "rgLoadFiltered[rowNumber].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 173 53 190 20 text lua "rgLoadFiltered[rowNumber].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait0" area 171 75 29 45 bitmap res "rgLoadFiltered[rowNumber].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber].portrait1" area 203 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber].portrait2" area 235 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber].portrait3" area 267 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber].portrait4" area 299 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber].portrait5" area 331 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber+1,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber+1].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 173 5 190 30 text lua "rgLoadFiltered[rowNumber+1].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 173 33 190 20 text lua "rgLoadFiltered[rowNumber+1].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 173 53 190 20 text lua "rgLoadFiltered[rowNumber+1].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait0" area 171 75 29 45 bitmap res "rgLoadFiltered[rowNumber+1].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber+1].portrait1" area 203 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber+1].portrait2" area 235 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber+1].portrait3" area 267 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber+1].portrait4" area 299 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber+1].portrait5" area 331 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber+2,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber+2].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 173 5 190 30 text lua "rgLoadFiltered[rowNumber+2].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 173 33 190 20 text lua "rgLoadFiltered[rowNumber+2].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 173 53 190 20 text lua "rgLoadFiltered[rowNumber+2].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait0" area 171 75 29 45 bitmap res "rgLoadFiltered[rowNumber+2].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber+2].portrait1" area 203 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber+2].portrait2" area 235 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber+2].portrait3" area 267 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber+2].portrait4" area 299 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber+2].portrait5" area 331 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } action " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil end " actionDbl " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil else Infinity_PlaySound('GAM_09') loadScreen:LoadGame(rgLoadFiltered[currentSave].fileName) end " enabled "rgLoadColumns == 3" name "rgmainmenuloadlist3" area 28 5 1154 758 rowheight dynamic hidehighlight table "rgLoadFiltered" var currentSave scrollbar 'rgdscrl1' } button { name 'rgmainmenubuttonload4' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" clickable lua "currentSave" ScaleToClip area 1031 291 409 75 pad 10 8 10 8 text style "button" text lua "rgString('LOAD_BUTTON')" action "loadScreen:LoadGame(rgLoadFiltered[currentSave].fileName)" actionEnter "rgMainButtHighlight = 4" actionExit "rgMainButtHighlight = 0" } button { enabled "gameSaves.isImporting ~= 1" name 'rgmainmenubuttonload5' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,5)" clickable lua "currentSave" ScaleToClip area 1031 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('DELETE_BUTTON')" action " popup2Button(15305, 'DELETE_BUTTON', function() loadScreen:DeleteGame(rgLoadFiltered[currentSave].slotIndex); rgGetLoadFilteredSaves(); currentSave = nil end) " actionEnter "rgMainButtHighlight = 5" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonload6' area 1031 591 409 75 bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,6)" ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" on escape action "loadScreen:OnMainCancelButtonClick()" actionEnter "rgMainButtHighlight = 6" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonload1' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 1031 216 409 75 pad 10 8 10 8 text style "button" text lua "rgString(rgGetLoadNameTitle())" action " if rgLoadNamesFilter == 0 then rgLoadNamesFilter = 1 else rgLoadNamesFilter = 0 end " actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonload2' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,2)" ScaleToClip area 1031 441 409 75 pad 10 8 10 8 text style "button" text color '$' text lua "rgString(rgGetLoadSortTitle())" action " if rgLoadSort == 0 then rgLoadSort = 1 rgGetLoadFilteredSaves() elseif rgLoadSort == 1 then rgLoadSort = 2 rgGetLoadFilteredSaves() else rgLoadSort = 0 rgGetLoadFilteredSaves() end Infinity_SetINIValue('Game Options','RgLoadSort',rgLoadSort) " actionEnter "rgMainButtHighlight = 2" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonload3' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,3)" ScaleToClip area 1031 516 409 75 pad 10 8 10 8 text style "button" text color '$' text lua "rgString(rgGetLoadColsTitle())" action " if rgLoadColumns == 1 then local w, h = Infinity_GetScreenSize() if w < 1700 then rgLoadColumns = 2 else rgLoadColumns = 3 end rgGetLoadFilteredSaves() else rgLoadColumns = 1 rgGetLoadFilteredSaves() end Infinity_SetINIValue('Game Options','RgLoadColumns',rgLoadColumns) " actionEnter "rgMainButtHighlight = 3" actionExit "rgMainButtHighlight = 0" } list { column { width 100 label { area 0 0 -1 -1 bam 'RGDMBUT1' --sequence lua "rgGetFilterNameBackground(rowNumber)" sequence lua "rgGetSelectedHighlight(rgLoadNames[rowNumber],rgLoadName)" ScaleToClip } label { area 0 0 -1 -1 text lua "rgLoadNames[rowNumber]" text style "normal" pad 30 0 0 0 align left center } } name "rgLoadNamesList" fill 0 0 0 200 enabled "rgLoadNamesFilter == 1" area 1031 291 420 560 rowheight 60 hidehighlight table "rgLoadNames" var rgCurrentLoadName scrollbar 'rgdscrl1' action " rgLoadName = rgLoadNames[rgCurrentLoadName] rgGetLoadFilteredSaves() currentSave = nil rgLoadNamesFilter = 0 Infinity_SetINIValue('Game Options','RgLoadName',rgLoadName) " } } ` function compareSaves(s1,s2) --return true if s1 comes before s2 --show the most recent saves first return s1.fileTime > s2.fileTime end function sortSaves() table.sort(gameSaves.files,compareSaves) end ` menu { name 'SAVE' align left top ignoreEsc onOpen " rgGetLoadCharNames() rgGetLoadFilteredSaves() rgLoadNamesFilter = 0 --rgLoadSortsFilter = 0 rgGetSaveMenuArea() selectedBeast = 0 " button { area 0 0 1365 768 action " currentSave = nil --rgLoadSortsFilter = 0 rgLoadNamesFilter = 0 " } label { enabled "rgLoadColumns < 3" name "rgSaveListBackground" area 0 0 870 768 bam rgdlolbc scaleToClip } label { enabled "rgLoadColumns == 3" name "rgSaveListBackground1" area 0 0 1250 768 bam rgdlolbc scaleToClip } list { column { width 100 label { area 0 0 760 130 bam 'rgdlobc6' scaleToClip sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" align left top } button { enabled "rgLoadFiltered[rowNumber].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber].screenshot" --bitmap area 8 8 160 120 align center center } label { area 185 15 510 30 text lua "rgLoadFiltered[rowNumber].slotName" text style "normal" align left center } label { area 185 58 310 30 text lua "rgLoadFiltered[rowNumber].time" text style "normal" text color "X" text point 12 align left top } label { area 185 88 310 30 text lua "rgLoadFiltered[rowNumber].chapter" text style "normal" text color "X" text point 12 align left top } button { enabled "rgLoadFiltered[rowNumber].hasPortrait0" area 469 53 42 64 bitmap res "rgLoadFiltered[rowNumber].portrait0" align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber].portrait1" area 516 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber].portrait2" area 564 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber].portrait3" area 611 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber].portrait4" area 659 53 42 64 align center center } button { enabled "rgLoadFiltered[rowNumber].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber].portrait5" area 706 53 42 64 align center center } label { area 0 0 1 135 } label { area 0 0 760 130 bam 'rgdlobc7' sequence lua "RgUISkin" scaleToClip align left top } } action " if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil end " actionDbl " if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil else Infinity_PlaySound('GAM_09') Infinity_PushMenu( 'SAVE_NEWSAVE' ) end " enabled "rgLoadColumns == 1" name "rgmainmenusavelist1" area 28 5 780 758 rowheight dynamic hidehighlight table "rgLoadFiltered" var currentSave scrollbar 'rgdscrl1' } list { column { width 50 label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 175 5 190 30 text lua "rgLoadFiltered[rowNumber].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 175 33 190 20 text lua "rgLoadFiltered[rowNumber].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 175 53 190 20 text lua "rgLoadFiltered[rowNumber].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait0" area 176 75 29 45 bitmap res "rgLoadFiltered[rowNumber].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber].portrait1" area 209 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber].portrait2" area 241 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber].portrait3" area 274 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber].portrait4" area 307 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber].portrait5" area 339 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } column { width 50 label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber+1,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber+1].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 175 5 190 30 text lua "rgLoadFiltered[rowNumber+1].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 175 33 190 20 text lua "rgLoadFiltered[rowNumber+1].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 175 53 190 20 text lua "rgLoadFiltered[rowNumber+1].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait0" area 176 75 28 44 bitmap res "rgLoadFiltered[rowNumber+1].portrait0" --bitmap area 0 0 28 45 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber+1].portrait1" area 209 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber+1].portrait2" area 241 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber+1].portrait3" area 274 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber+1].portrait4" area 307 75 28 44 align center center } button { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber+1].portrait5" area 339 75 28 44 align center center } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,2) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 378 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } action " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil end " actionDbl " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil else Infinity_PlaySound('GAM_09') Infinity_PushMenu( 'SAVE_NEWSAVE' ) end " enabled "rgLoadColumns == 2" name "rgmainmenusavelist2" area 28 5 780 758 rowheight dynamic hidehighlight table "rgLoadFiltered" var currentSave scrollbar 'rgdscrl1' } list { column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 173 5 190 30 text lua "rgLoadFiltered[rowNumber].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 173 33 190 20 text lua "rgLoadFiltered[rowNumber].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 173 53 190 20 text lua "rgLoadFiltered[rowNumber].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait0" area 171 75 29 45 bitmap res "rgLoadFiltered[rowNumber].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber].portrait1" area 203 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber].portrait2" area 235 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber].portrait3" area 267 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber].portrait4" area 299 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber].portrait5" area 331 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber+1,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber+1].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 173 5 190 30 text lua "rgLoadFiltered[rowNumber+1].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 173 33 190 20 text lua "rgLoadFiltered[rowNumber+1].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 173 53 190 20 text lua "rgLoadFiltered[rowNumber+1].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait0" area 171 75 29 45 bitmap res "rgLoadFiltered[rowNumber+1].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber+1].portrait1" area 203 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber+1].portrait2" area 235 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber+1].portrait3" area 267 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber+1].portrait4" area 299 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+1].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber+1].portrait5" area 331 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+1].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc8' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber+2,currentSave)" scaleToClip align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasScreenShot" area 8 8 158 114 bitmap res "rgLoadFiltered[rowNumber+2].screenshot" --bitmap area 8 8 160 120 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 173 5 190 30 text lua "rgLoadFiltered[rowNumber+2].slotName" text style "normal" align left center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 173 33 190 20 text lua "rgLoadFiltered[rowNumber+2].time" text style "normal" text color "X" align left top } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 173 53 190 20 text lua "rgLoadFiltered[rowNumber+2].chapter" text style "normal" text color "X" align left top } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait0" area 171 75 29 45 bitmap res "rgLoadFiltered[rowNumber+2].portrait0" align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait1" bitmap res "rgLoadFiltered[rowNumber+2].portrait1" area 203 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait2" bitmap res "rgLoadFiltered[rowNumber+2].portrait2" area 235 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait3" bitmap res "rgLoadFiltered[rowNumber+2].portrait3" area 267 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait4" bitmap res "rgLoadFiltered[rowNumber+2].portrait4" area 299 75 29 45 align center center } button { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave' and rgLoadFiltered[rowNumber+2].hasPortrait5" bitmap res "rgLoadFiltered[rowNumber+2].portrait5" area 331 75 29 45 align center center } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 0 0 1 135 } label { enabled "rgIsNthNumber(rowNumber,3) and rgLoadFiltered[rowNumber+2].slotName ~= 'rgRandomEndSave'" area 0 0 370 130 bam 'rgdlobc9' scaleToClip sequence lua "RgUISkin" align left top } } action " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil end " actionDbl " currentSave = currentSave + cellNumber - 1 if rgLoadFiltered[currentSave].slotName == 'rgRandomEndSave' then currentSave = nil else Infinity_PlaySound('GAM_09') Infinity_PushMenu( 'SAVE_NEWSAVE' ) end " enabled "rgLoadColumns == 3" name "rgmainmenusavelist3" area 28 5 1154 758 rowheight dynamic hidehighlight table "rgLoadFiltered" var currentSave scrollbar 'rgdscrl1' } button { name 'rgmainmenubuttonsave0' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,7)" ScaleToClip area 865 100 409 75 pad 10 8 10 8 text style "button" text lua "rgString('NEW_SAVE_LABEL')" action "currentSave = 0;Infinity_PushMenu( 'SAVE_NEWSAVE' );" actionEnter "rgMainButtHighlight = 7" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonsave4' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" clickable lua "currentSave" ScaleToClip area 865 291 409 75 pad 10 8 10 8 text style "button" text lua "rgString('SAVE_BUTTON')" action "Infinity_PlaySound('GAM_09');Infinity_PushMenu( 'SAVE_NEWSAVE' );" actionEnter "rgMainButtHighlight = 4" actionExit "rgMainButtHighlight = 0" } button { enabled "gameSaves.isImporting ~= 1" name 'rgmainmenubuttonsave5' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,5)" clickable lua "currentSave" ScaleToClip area 865 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('DELETE_BUTTON')" action " popup2Button(15305, 'DELETE_BUTTON', function() saveScreen:DeleteGame(rgLoadFiltered[currentSave].slotIndex); rgGetLoadFilteredSaves(); currentSave = nil end) " actionEnter "rgMainButtHighlight = 5" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonsave6' area 865 591 409 75 bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,6)" ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" on escape action "saveScreen:OnMainCancelButtonClick()" actionEnter "rgMainButtHighlight = 6" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonsave1' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 865 216 409 75 pad 10 8 10 8 text style "button" text lua "rgString(rgGetLoadNameTitle())" action " if rgLoadNamesFilter == 0 then rgLoadNamesFilter = 1 else rgLoadNamesFilter = 0 end " actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonsave2' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,2)" ScaleToClip area 865 441 409 75 pad 10 8 10 8 text style "button" text color '$' text lua "rgString(rgGetLoadSortTitle())" action " if rgLoadSort == 0 then rgLoadSort = 1 rgGetLoadFilteredSaves() elseif rgLoadSort == 1 then rgLoadSort = 2 rgGetLoadFilteredSaves() else rgLoadSort = 0 rgGetLoadFilteredSaves() end Infinity_SetINIValue('Game Options','RgLoadSort',rgLoadSort) " actionEnter "rgMainButtHighlight = 2" actionExit "rgMainButtHighlight = 0" } button { name 'rgmainmenubuttonsave3' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,3)" ScaleToClip area 865 516 409 75 pad 10 8 10 8 text style "button" text color '$' text lua "rgString(rgGetLoadColsTitle())" action " if rgLoadColumns == 1 then local w, h = Infinity_GetScreenSize() if w < 1700 then rgLoadColumns = 2 else rgLoadColumns = 3 end rgGetLoadFilteredSaves() else rgLoadColumns = 1 rgGetLoadFilteredSaves() end Infinity_SetINIValue('Game Options','RgLoadColumns',rgLoadColumns) " actionEnter "rgMainButtHighlight = 3" actionExit "rgMainButtHighlight = 0" } list { column { width 100 label { area 0 0 -1 -1 bam 'RGDMBUT1' --sequence lua "rgGetFilterNameBackground(rowNumber)" sequence lua "rgGetSelectedHighlight(rgLoadNames[rowNumber],rgLoadName)" ScaleToClip } label { area 0 0 -1 -1 text lua "rgLoadNames[rowNumber]" text style "normal" pad 30 0 0 0 align left center } } name "rgSaveNamesList" fill 0 0 0 200 enabled "rgLoadNamesFilter == 1" area 865 291 420 467 rowheight 60 hidehighlight table "rgLoadNames" var rgCurrentLoadName scrollbar 'rgdscrl1' action " rgLoadName = rgLoadNames[rgCurrentLoadName] rgGetLoadFilteredSaves() currentSave = nil rgLoadNamesFilter = 0 Infinity_SetINIValue('Game Options','RgLoadName',rgLoadName) " } } ` newSaveName = '' function completeSave() Infinity_Log('not overwrite') Infinity_PopMenu('SAVE_NEWSAVE') saveScreen:SaveGame(#gameSaves.files, newSaveName) end function completeOverwrite() Infinity_Log('overwrite') Infinity_PopMenu('SAVE_NEWSAVE') saveScreen:SaveGame(gameSaves.files[currentSave].slotIndex,newSaveName) end ` menu { name 'SAVE_NEWSAVE' align center center modal onOpen " bitmapbools = { hasScreenShot = 0, hasPortrait0 = 0, hasPortrait1 = 0, hasPortrait2 = 0, hasPortrait3 = 0, hasPortrait4 = 0, hasPortrait5 = 0, } newSaveName = '' if currentSave ~= 0 then newSaveName = gameSaves.files[currentSave].slotName bitmapbools = { hasScreenShot = gameSaves.files[currentSave].hasScreenShot, hasPortrait0 = gameSaves.files[currentSave].hasPortrait0, hasPortrait1 = gameSaves.files[currentSave].hasPortrait1, hasPortrait2 = gameSaves.files[currentSave].hasPortrait2, hasPortrait3 = gameSaves.files[currentSave].hasPortrait3, hasPortrait4 = gameSaves.files[currentSave].hasPortrait4, hasPortrait5 = gameSaves.files[currentSave].hasPortrait5, } end Infinity_FocusTextEdit('newSaveNameArea') " label { area 0 0 900 287 bam 'rgdlobcx' scaleToClip sequence lua "RgUISkin" align left top } label { area 100 20 700 35 text lua "rgString('ENTER_SAVE_LABEL')" text style 'rg_trajan' pad 10 3 10 3 align center center } label { area 70 64 760 130 bam 'rgdlobc6' sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,currentSave)" scaleToClip align left top } button { enabled "bitmapbools.hasScreenShot" area 78 69 160 120 bitmap res "gameSaves.files[currentSave].screenshot" align center center } edit { name "newSaveNameArea" area 255 79 510 30 var newSaveName text style "edit" maxlines 1 fill 112 111 111 64 action " --On return pressed if (key_pressed == 13) then if(currentSave ~= 0) then completeOverwrite() else completeSave() end Infinity_FocusTextEdit('') return -1 end return 1 " } label { area 255 122 310 30 text lua "gameSaves.currentGameInfo.time" text style "normal" text color "X" text point 12 align left top } label { area 255 152 310 30 text lua "gameSaves.currentGameInfo.chapter" text style "normal" text color "X" text point 12 align left top } button { enabled "bitmapbools.hasPortrait0" area 539 117 42 64 bitmap res "gameSaves.files[currentSave].portrait0" align center center } button { enabled "bitmapbools.hasPortrait1" bitmap res "gameSaves.files[currentSave].portrait1" area 586 117 42 64 align center center } button { enabled "bitmapbools.hasPortrait2" bitmap res "gameSaves.files[currentSave].portrait2" area 634 117 42 64 align center center } button { enabled "bitmapbools.hasPortrait3" bitmap res "gameSaves.files[currentSave].portrait3" area 681 117 42 64 align center center } button { enabled "bitmapbools.hasPortrait4" bitmap res "gameSaves.files[currentSave].portrait4" area 729 117 42 64 align center center } button { enabled "bitmapbools.hasPortrait5" bitmap res "gameSaves.files[currentSave].portrait5" area 776 117 42 64 align center center } label { area 70 64 760 130 bam 'rgdlobc7' sequence lua "RgUISkin" scaleToClip align left top } button { bam rgdbutm1 ScaleToClip area 450 190 380 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('SAVE_BUTTON')" action " completeSave() " } button { enabled currentSave bam rgdbutm1 ScaleToClip area 450 190 380 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('OVERWRITE_BUTTON')" action " completeOverwrite() " } button { bam rgdbutm1 ScaleToClip area 70 190 380 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "rgString('CANCEL_BUTTON')" action " Infinity_PopMenu('SAVE_NEWSAVE') " } } ` worldMessageBoxText = "" worldMessageBoxLines = 0 worldMessageBoxClickedOnce = 0 rgGotBestiaryEntryOnce = 0 RgMessageboxUnlockedTextZoom = 0 function dragMessagesY(newY) setMessagesY(newY) worldMessageBoxClickedOnce = 1 rgGetQuicklootSlotPosition() end function clampMessageBoxHeight(hNew, hOld) if(hNew <= 64) then --lower bound on height, sliced rects can't get too small and we don't want to make the message box invisible. return hOld - 64 end if(hNew >= 500) then --also don't go too high because it looks bad. return hOld - 500 end return hOld - hNew end function rgClampMessageBoxHeight(hNew, hOld) if(hNew <= 64) then return hOld - 64 end return hOld - hNew end function rgClampMessageBoxWidth(wNew, wOld) if(wNew <= 200) then return wOld - 200 end return wOld - wNew end function rgClampMessageBoxModern(hNew, hOld) if(hNew <= 118) then --lower bound on height, sliced rects can't get too small and we don't want to make the message box invisible. return hOld - 118 end if(hNew >= 700) then --also don't go too high because it looks bad. return hOld - 700 end return hOld - hNew end function setMessagesY(newY) local x,y,w,hOld = Infinity_GetArea('messagesRect') h = hOld - newY newY = clampMessageBoxHeight(h,hOld) adjustItemGroup({"messagesHandleY"},0,newY,0,0) adjustItemGroup({"messagesRect","worldMessageBox"},0,newY,0,-newY) toolbarTop = toolbarTop - newY chatboxScrollToBottom = 1 worldMessageBoxTop = y + newY end function rgSetMessagesYModern(newY) local x,y,w,hOld = Infinity_GetArea('rgmessagesRect') h = hOld - newY newY = rgClampMessageBoxModern(h,hOld) adjustItemGroup({"rgmessagesHandleY"},0,newY,0,0) adjustItemGroup({"rgmessagesRect","rgworldMessageBox"},0,newY,0,-newY) --toolbarTop = toolbarTop - newY --Infinity_SetOffset('WORLD_QUICKLOOT',0, -toolbarTop) chatboxScrollToBottom = 1 --worldMessageBoxTop = y + newY end function rgSetMessagesUnlockedYUp(newY) local x,y,w,hOld = Infinity_GetArea('rgMessagesRectUnlocked') h = hOld - newY newY = rgClampMessageBoxHeight(h,hOld) adjustItemGroup({"rgMessagesHandleYUpUnlocked","rgMessagesHandleDragUnlocked"},0,newY,0,0) adjustItemGroup({"rgMessagesRectUnlocked","rgWorldMessageBoxUnlocked","rgMessagesHandleXRightUnlocked","rgMessagesHandleXLeftUnlocked"},0,newY,0,-newY) --toolbarTop = toolbarTop - newY chatboxScrollToBottom = 1 --rgWorldMessageBoxTop = y + newY end function rgSetMessagesUnlockedYDown(newY) local x,y,w,hOld = Infinity_GetArea('rgMessagesRectUnlocked') if hOld <= 64 then hOld = 64 end h = hOld - newY --if h <= 64 then h = 64 end --if h <= 64 then h = 64 end --newY = hOld - h --h = hOld - newY --newY = rgClampMessageBoxHeightDown(h,hOld) if hOld == 64 and newY <= 0 then newY = 0 else newY = hOld - h end if hOld + newY <= 64 then newY = 0 end adjustItemGroup({"rgMessagesHandleYDownUnlocked","rgMessagesHandleDragDownUnlocked"},0,newY,0,0) adjustItemGroup({"rgMessagesRectUnlocked","rgWorldMessageBoxUnlocked","rgMessagesHandleXRightUnlocked","rgMessagesHandleXLeftUnlocked"},0,0,0,newY) chatboxScrollToBottom = 1 --rgWorldMessageBoxTop = y + newY end function rgSetMessagesUnlockedXRight(newX) local x,y,wOld,h = Infinity_GetArea('rgMessagesRectUnlocked') if wOld <= 200 then wOld = 200 end w = wOld - newX --newX = rgClampMessageBoxWidth(w,wOld) if wOld == 200 and newX <= 0 then newX = 0 else newX = wOld - w end if wOld + newX <= 200 then newX = 0 end if w < 400 then RgMessageboxUnlockedTextZoom = 1 else RgMessageboxUnlockedTextZoom = 0 end adjustItemGroup({"rgMessagesHandleXRightUnlocked","rgMessagesHandleDragDownUnlocked"},newX,0,0,0) adjustItemGroup({"rgMessagesHandleYUpUnlocked","rgMessagesHandleYDownUnlocked"},0,0,newX,0) adjustItemGroup({"rgMessagesRectUnlocked","rgWorldMessageBoxUnlocked"},0,0,newX,0) chatboxScrollToBottom = 1 --rgWorldMessageBoxTop = y + newY end function rgSetMessagesUnlockedXLeft(newX) local x,y,wOld,h = Infinity_GetArea('rgMessagesRectUnlocked') w = wOld - newX newX = rgClampMessageBoxWidth(w,wOld) if w < 400 then RgMessageboxUnlockedTextZoom = 1 else RgMessageboxUnlockedTextZoom = 0 end adjustItemGroup({"rgMessagesHandleXLeftUnlocked"},newX,0,0,0) adjustItemGroup({"rgMessagesHandleDragUnlocked"},newX,0,0,0) adjustItemGroup({"rgMessagesHandleYUpUnlocked","rgMessagesHandleYDownUnlocked"},newX,0,-newX,0) adjustItemGroup({"rgMessagesRectUnlocked","rgWorldMessageBoxUnlocked"},newX,0,-newX,0) chatboxScrollToBottom = 1 --rgWorldMessageBoxTop = y + newY end function rgDragMessageboxUnlocked() --local offsetX,offsetY,menuWidth,menuHeight = Infinity_GetMenuArea('RGWORLD_MESSAGES_UNLOCKED') local x,y,w,h = Infinity_GetArea('rgMessagesRectUnlocked') local offsetX = x + motionX local offsetY = y + motionY --clamping if(offsetX < 0) then --offsetX = 5 motionX = 0 end if(offsetY < 0) then --offsetY = 5 motionY = 0 end local screenWidth, screenHeight = Infinity_GetScreenSize() if(offsetX > screenWidth - w) then --offsetX = screenWidth - 85 - w motionX = 0 end if RgIsModernHud == 1 then if(offsetY > screenHeight - h) then motionY = 0 end else if(offsetY > screenHeight - 68 - h) then motionY = 0 end end adjustItemGroup({"rgMessagesHandleXLeftUnlocked","rgMessagesHandleXRightUnlocked","rgMessagesHandleDragUnlocked","rgMessagesHandleYUpUnlocked","rgMessagesHandleYDownUnlocked","rgMessagesRectUnlocked","rgWorldMessageBoxUnlocked","rgMessagesHandleDragDownUnlocked"},motionX,motionY,0,0) --Infinity_SetOffset('RGWORLD_MESSAGES_UNLOCKED', offsetX, offsetY) end rgMessageBoxLastRowNumber = -1 function rgGetJournalBestiaryEntry(text,row) if rgMessageBoxLastRowNumber ~= row then rgGotBestiaryEntryOnce = 0 end if (text ~= nil and string.match(text, Infinity_FetchString(14026))) then --Death if (rgGotBestiaryEntryOnce == 0) then text = string.gsub(text, "%^0x........", "") text = string.gsub(text, ": " .. Infinity_FetchString(14026), "") text = string.gsub(text, "-", "") text = string.gsub(text, "%^", "") --text = 'Beasts' .. ': ' .. text --journalDisplay local rgEntryAlreadyExists = 0 local rgBeastHasValidEntry = 0 local rgBeastEntryRef = 0 local rgNumberOfKills = 0 for k, jouEntry in pairs(journalDisplay) do --s:match('^(.-)%d+') if (string.match(Infinity_FetchString(jouEntry.text), getUiString('RG_BESTIARY'))) then str = string.gsub(Infinity_FetchString(jouEntry.text), getUiString('RG_BESTIARY'), "") local list = {} for i in string.gmatch(str, "[^;]+") do table.insert(list, i); end if #list == 1 then if list[1] == text then rgEntryAlreadyExists = 1 rgBeastEntryRef = jouEntry.text rgNumberOfKills = 2 end elseif #list == 2 then if list[1] == text then rgEntryAlreadyExists = 1 rgBeastEntryRef = jouEntry.text local n = list[2] rgNumberOfKills = n + 1 end end end end for i=1,#rgBeasts,1 do if text == Infinity_FetchString(rgBeasts[i].name) then rgBeastHasValidEntry = 1 end end if (rgEntryAlreadyExists == 0 and rgBeastHasValidEntry == 1) then rgAddNewBestiaryEntry(text) rgGotBestiaryEntryOnce = 1 elseif (rgEntryAlreadyExists == 1 and rgBeastHasValidEntry == 1) then rgMessageBoxLastRowNumber = row rgEditNewBestiaryEntry(text,rgNumberOfKills,rgBeastEntryRef) rgGotBestiaryEntryOnce = 1 end end else rgGotBestiaryEntryOnce = 0 end end rgtestx = 1 function rgAddNewBestiaryEntry(text) --if alreadyAdded == 0 then local rgLarge = 0 if rgLargeJournal == 1 then rgLarge = 1 rgLargeJournal = 0 end --e:GetActiveEngine():OnLeftPanelButtonClick(2) --journalMode = const.JOURNAL_MODE_EDIT --text = string.gsub(text, '%\n', '\n"') .. '"' journalNoteEdit = getUiString('RG_BESTIARY') .. text-- .. '; 1' journalNoteEditRef = nil --journalNoteEdit = JFStrings.JF_Notes .. '\n' .. journalNoteEdit .. '\n - ' .. Infinity_GetTimeString() Infinity_OnAddUserEntry(journalNoteEdit) --journalMode = const.JOURNAL_MODE_JOURNAL --e:GetActiveEngine():OnLeftPanelButtonClick(2) if rgLarge == 1 then rgLarge = 0 rgLargeJournal = 1 end --alreadyAdded = 1 --end end function rgEditNewBestiaryEntry(text,kills,ref) local rgLarge = 0 if rgLargeJournal == 1 then rgLarge = 1 rgLargeJournal = 0 end e:GetActiveEngine():OnLeftPanelButtonClick(2) --journalMode = const.JOURNAL_MODE_EDIT journalNoteEdit = getUiString('RG_BESTIARY') .. text .. '; ' .. kills journalNoteEditRef = nil --Infinity_OnAddUserEntry(journalNoteEdit) Infinity_OnEditUserEntry(ref, journalNoteEdit) local ch = math.max(0,Infinity_GetMaxChapterPage()); for index = 1, ch, 1 do incrChapter(-1); Infinity_OnEditUserEntry(ref, journalNoteEdit) end for index = 1, ch, 1 do incrChapter(1); end e:GetActiveEngine():OnLeftPanelButtonClick(2) if rgLarge == 1 then rgLarge = 0 rgLargeJournal = 1 end end function rgGetMessageBoxPosition() end function rgGetMessageBoxBackgroundA() return 'rgdboxa' .. RgUISkin end function rgGetMessageBoxBackgroundB() return 'rgdboxb' .. RgUISkin end function rgGetMessageBoxBackgroundC() return 'rgdboxc' .. RgUISkin end function rgGetMessageBoxBackgroundD() return 'rgdboxd' .. RgUISkin end function rgGetMessageBoxBackgroundE() return 'rgdboxe' .. RgUISkin end function rgGetMessageBoxBackgroundF() return 'rgdboxf' .. RgUISkin end function rgGetMessageBoxBackgroundG() return 'rgdboxg' .. RgUISkin end ` menu { name 'WORLD_MESSAGES' align center bottom ignoreEsc onOpen " if RgMessageboxUnlocked == 0 and RgIsModernHud == 0 then Infinity_SetOffset('WORLD_MESSAGES', 0, -toolbarTop) local x,y,w,h = Infinity_GetArea('messagesRect') toolbarTop = toolbarTop + h setMessagesY(worldMessageBoxTop - y) end " onClose " if RgMessageboxUnlocked == 0 and RgIsModernHud == 0 then local x,y,w,h = Infinity_GetArea('messagesRect') toolbarTop = toolbarTop - h end " label { name 'messagesRect' enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 0" area 0 0 664 200 --area 0 0 664 200 --rectangle 2 mosaic lua "rgGetMessageBoxBackgroundA()" --fill 0 0 0 150 --bam RGDMBCG3 } label { --name 'messagesRect' enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 0" area 0 196 664 5 mosaic lua "rgGetMessageBoxBackgroundB()" } button { enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 0" area 0 0 0 0 on pageup action " dragMessagesY(-50) " } button { enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 0" area 0 0 0 0 on pagedown action " dragMessagesY(50) " } list { column { width 100 label { area 0 0 -1 -1 text lua "combatLog[rowNumber]" text style "normal" } } --enabled "RgIsModernHud == 0" enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 0" name "worldMessageBox" area 12 12 640 176 --area 12 12 640 176 rowheight dynamic table "combatLog" hideHighlight scrollbar 'rgdscrl1' scrollbar func "chatboxScroll" scrollbar skipReset action " if e:IsTouchUI() then worldScreen:TogglePauseGame(true) end " } handle { name 'messagesHandleY' enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 0" area 0 0 664 10 --area 0 0 664 10 --bam RGDMBCG4 --ScaleToClip pulse lua "worldMessageBoxClickedOnce == 0" actionDrag " dragMessagesY(motionY) " } } menu { name 'RGWORLD_MESSAGES' align right bottom ignoreEsc onOpen " --if RgIsModernHud == 1 then -- local x,y,w,h = Infinity_GetArea('rgmessagesRect') -- setMessagesY(worldMessageBoxTop - y) --end --Infinity_SetOffset('RGWORLD_MESSAGES', 0, -toolbarTop) --local x,y,w,h = Infinity_GetArea('rgmessagesRect') --toolbarTop = toolbarTop + h --setMessagesY(worldMessageBoxTop - y) " onClose " --local x,y,w,h = Infinity_GetArea('rgmessagesRect') --toolbarTop = toolbarTop - h " label { name 'rgmessagesRect' enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 1" area 0 0 490 118 --rectangle 3 mosaic lua "rgGetMessageBoxBackgroundC()" } label { --name 'rgmessagesRect' enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 1" area 0 114 490 5 mosaic lua "rgGetMessageBoxBackgroundD()" } button { enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 1" area 0 0 0 0 on pageup action " rgSetMessagesYModern(-50) " } button { enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 1" area 0 0 0 0 on pagedown action " rgSetMessagesYModern(50) " } list { column { width 100 label { area 0 0 -1 -1 text lua "combatLog[rowNumber]" text style "normal" } } enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 1" name "rgworldMessageBox" area 10 8 474 102 rowheight dynamic table "combatLog" hideHighlight scrollbar 'rgdscrl1' scrollbar func "chatboxScroll" scrollbar skipReset } handle { name 'rgmessagesHandleY' enabled "RgMessageboxUnlocked == 0 and RgIsModernHud == 1" area 0 0 490 10 pulse lua "worldMessageBoxClickedOnce == 0" actionDrag " --dragMessagesY(motionY) rgSetMessagesYModern(motionY) " } } ` function rgGetCoordinatesFromINI(name) local rgMessUnlockedCoor = Infinity_GetINIString('Game Options',name,'0,0,0,0') local rgMessCoor = { } for i in string.gmatch(rgMessUnlockedCoor, "([^,]+)") do table.insert(rgMessCoor, i) end return rgMessCoor end function rgSetMessageBox() if RgMessageboxUnlocked == 1 then Infinity_SetArea('messagesRect',0,nil,0,-5) Infinity_SetArea('worldMessageBox',0,nil,0,0) Infinity_SetArea('messagesHandleY',0,nil,0,0) local rgCoor = rgGetCoordinatesFromINI('RgMessUnlockedCoor') if rgCoor[3] ~= 0 and rgCoor[4] ~= 0 then Infinity_SetArea('rgMessagesRectUnlocked', rgCoor[1], rgCoor[2], rgCoor[3], rgCoor[4]) Infinity_SetArea('rgWorldMessageBoxUnlocked', rgCoor[1]+12, rgCoor[2]+12, rgCoor[3]-24, rgCoor[4]-24) Infinity_SetArea('rgMessagesHandleYUpUnlocked', rgCoor[1], rgCoor[2], rgCoor[3], nil) Infinity_SetArea('rgMessagesHandleYDownUnlocked', rgCoor[1], rgCoor[2]+rgCoor[4]-10, rgCoor[3], nil) Infinity_SetArea('rgMessagesHandleXRightUnlocked', rgCoor[1]+rgCoor[3]-10, rgCoor[2], nil, rgCoor[4]) Infinity_SetArea('rgMessagesHandleXLeftUnlocked', rgCoor[1], rgCoor[2], nil, rgCoor[4]) Infinity_SetArea('rgMessagesHandleDragUnlocked', rgCoor[1], rgCoor[2], nil, nil) Infinity_SetArea('rgMessagesHandleDragDownUnlocked',rgCoor[1]+rgCoor[3]-21, rgCoor[2]+rgCoor[4]-15, nil, nil) if rgCoor[3] < '400' then RgMessageboxUnlockedTextZoom = 1 else RgMessageboxUnlockedTextZoom = 0 end end local x,y,w,h = Infinity_GetArea('rgMessagesRectUnlocked') local screenWidth, screenHeight = Infinity_GetScreenSize() if(y > screenHeight - 68 - h and RgIsModernHud == 0) then adjustItemGroup({"rgMessagesHandleXLeftUnlocked","rgMessagesHandleXRightUnlocked","rgMessagesHandleDragUnlocked","rgMessagesHandleYUpUnlocked","rgMessagesHandleYDownUnlocked","rgMessagesRectUnlocked","rgWorldMessageBoxUnlocked","rgMessagesHandleDragDownUnlocked"},0,-68,0,0) end else --Infinity_SetArea('messagesRect',0,nil,664,131) --Infinity_SetArea('worldMessageBox',13,nil,638,107) --Infinity_SetArea('messagesHandleY',0,nil,664,11) end if RgIsModernHud == 1 then Infinity_SetArea('messagesRect',0,nil,0,52) Infinity_SetArea('worldMessageBox',0,nil,0,52) Infinity_SetArea('messagesHandleY',0,nil,0,52) end end function rgResetMessageBox() Infinity_SetArea('rgMessagesRectUnlocked', 46, 41, 489, 149) Infinity_SetArea('rgWorldMessageBoxUnlocked', 58, 53, 465, 125) Infinity_SetArea('rgMessagesHandleYUpUnlocked', 46, 41, 489, 10) Infinity_SetArea('rgMessagesHandleYDownUnlocked', 46, 180, 489, 10) Infinity_SetArea('rgMessagesHandleXRightUnlocked', 525, 41, 10, 149) Infinity_SetArea('rgMessagesHandleXLeftUnlocked', 46, 41, 10, 149) Infinity_SetArea('rgMessagesHandleDragUnlocked', 46, 41, 21, 15) Infinity_SetArea('rgMessagesHandleDragDownUnlocked',514, 175, 21, 15) end function rgSaveCoordinates() local x,y,w,h = Infinity_GetArea('rgMessagesRectUnlocked') Infinity_SetINIValue('Game Options','RgMessUnlockedCoor',x .. ',' .. y .. ',' .. w .. ',' .. h) end ` menu { name 'RGWORLD_MESSAGES_UNLOCKED' align left top --offset 50 50 ignoreEsc onOpen " local x,y,w,h = Infinity_GetArea('rgMessagesRectUnlocked') local sw, sh = Infinity_GetScreenSize() if x > sw or y > sh then rgResetMessageBox() end --if RgIsModernHud == 1 then -- local x,y,w,h = Infinity_GetArea('rgmessagesRect') -- --setMessagesY(worldMessageBoxTop - y) -- rgSetMessagesUnlockedYUp(rgWorldMessageBoxTop - y) --end " onClose " " label { name 'rgMessagesRectUnlocked' enabled "RgMessageboxUnlocked == 1" area 27 38 477 189 mosaic lua "rgGetMessageBoxBackgroundE()" } list { column { width 100 label { area 0 0 -1 -1 enabled "RgMessageboxUnlockedTextZoom == 0" text lua "combatLog[rowNumber]" text style "normal" } label { area 0 0 -1 -1 enabled "RgMessageboxUnlockedTextZoom == 1" text lua "combatLog[rowNumber]" text style "normal" text point 10 } } name "rgWorldMessageBoxUnlocked" enabled "RgMessageboxUnlocked == 1" area 39 50 453 165 rowheight dynamic table "combatLog" hideHighlight scrollbar 'rgdscrl1' scrollbar func "chatboxScroll" scrollbar skipReset } handle { name 'rgMessagesHandleYUpUnlocked' enabled "RgMessageboxUnlocked == 1" area 27 38 477 10 pulse lua "worldMessageBoxClickedOnce == 0" actionDrag " --dragMessagesY(motionY) rgSetMessagesUnlockedYUp(motionY) " } handle { name 'rgMessagesHandleYDownUnlocked' enabled "RgMessageboxUnlocked == 1" mosaic lua "rgGetMessageBoxBackgroundG()" area 27 217 477 10 actionDrag " rgSetMessagesUnlockedYDown(motionY) " } handle { name 'rgMessagesHandleXRightUnlocked' enabled "RgMessageboxUnlocked == 1" mosaic lua "rgGetMessageBoxBackgroundF()" area 494 38 10 189 actionDrag " rgSetMessagesUnlockedXRight(motionX) " } handle { name 'rgMessagesHandleXLeftUnlocked' enabled "RgMessageboxUnlocked == 1" area 27 38 10 189 actionDrag " rgSetMessagesUnlockedXLeft(motionX) " } handle { name 'rgMessagesHandleDragUnlocked' enabled "RgMessageboxUnlocked == 1" bam 'rgdmboxc' sequence lua "RgUISkin" scaleToClip area 27 38 21 15 actionDrag " rgDragMessageboxUnlocked() " } handle { name 'rgMessagesHandleDragDownUnlocked' enabled "RgMessageboxUnlocked == 1" bam 'rgdmboxc' frame 1 sequence lua "RgUISkin" scaleToClip area 483 212 21 15 actionDrag " rgDragMessageboxUnlocked() " } } ` worldNPCDialogText = "" worldPlayerDialogChoices = {} --rgWorldPlayerDialogChoicesDummy = {} glowTest = nil startingDialogHeight = 0 previousTop = nil scrolled = false scrollToBottom = false rgScrollReset = false rgMergeDialogOnce = 0 rgDialogLoad = 0 function dialogScroll(top, height, contentHeight) if scrolled then if scrollToBottom and contentHeight > height then scrollToBottom = false return height - contentHeight end return nil end if previousTop ~= nil and top ~= previousTop then scrolled = true scrollToBottom = true return -1 end previousTop = -1 return -1 end function rgGetDialog() local dialog = worldPlayerDialogChoices if rgMergeDialogOnce == 0 then table.insert(dialog, 1, '') rgMergeDialogOnce = 1 end return dialog end function rgDialogChoicesCount() local n = 0 for key, value in pairs(worldPlayerDialogChoices) do if value ~= '' then n = n+1 end end return n end function dialogEntryGreyed() return not worldScreen:GetInControlOfDialog() end function getDesiredDialogHeight() --get npc area local npcX,npcY,npcW,npcH = Infinity_GetArea('worldNPCDialog') --get dialog choices height local choicesHeight = Infinity_GetListHeight('worldPlayerDialogChoicesList') return (20 + choicesHeight + npcH + 20) end function getCurrentDialogHeight() local x,y,w,contentHeight = Infinity_GetArea('worldDialogBackground') local npcX,npcY,npcW,npcH = Infinity_GetArea('worldNPCDialog') if(showWorldMessages == 1) then --Don't include the height of the message log (and its offset) if its active local xM,yM,wM,hM = Infinity_GetArea('worldDialogMessageBox') local xD,yD,wD,hD = Infinity_GetArea('worldDialogMessageDivider') Infinity_Log("yD - y = " .. yD - y) contentHeight = contentHeight - (yD - y) end return contentHeight end function resizeDialog() rgMergeDialogOnce = 0 buildResponsesList() previousTop = nil scrolled = false end function resizeDialogContent(newY) resizeDialog() end function showMessagesButtonFrame() if(showWorldMessages == 1) then return 1 else return 0 end end function getDialogEntryText(row) local text = worldPlayerDialogChoices[row].text if (row == worldPlayerDialogSelection) then --Color the text white when selected text = string.gsub(text, "%^0xff212eff", "^0xFFFFFFFF") end return text end function rgAddNewNote(text) if rgAlreadyAdded == 0 then local rgLarge = 0 if rgLargeJournal == 1 then rgLarge = 1 rgLargeJournal = 0 end text = string.gsub(text, "%^0x........", "") text = string.gsub(text, '%\n', '\n"') .. '"' journalNoteEdit = text journalNoteEditRef = nil journalNoteEdit = journalNoteEdit Infinity_OnAddUserEntry(journalNoteEdit) if rgLarge == 1 then rgLarge = 0 rgLargeJournal = 1 end rgAlreadyAdded = 1 end end rgDialogLoadCount = 0 function rgLoadFromDialog() if rgDialogLoad == 1 then if rgDialogChoicesCount() == 0 then worldScreen:StepDialog() else rgDialogLoadCount = rgDialogLoadCount + 1 for i = 1, #worldPlayerDialogChoices, 1 do if rgDialogLoadCount < i*10 then if worldPlayerDialogChoices[i].marker ~= nil then worldScreen:OnDialogReplyClick(worldPlayerDialogChoices[i].marker) end end end end end end ` menu { name 'WORLD_DIALOG' offset 0 0 align center bottom ignoreEsc onOpen " Infinity_PopMenu('ITEM_DESCRIPTION') local x,y,w,h = Infinity_GetArea('worldDialogBackground') toolbarTop = toolbarTop + h Infinity_PushMenu('WORLD_DIALOG_CONFIRM') if(isTouchActionbar() and not dialogViewMode) then Infinity_PushMenu('WORLD_DIALOG_LEFT') Infinity_PushMenu('WORLD_DIALOG_RIGHT') end Infinity_PopMenu('LEFT_SIDEBAR') Infinity_PopMenu('RIGHT_SIDEBAR') --local screenWidth, screenHeight = Infinity_GetScreenSize() --Infinity_SetArea('rgDialogLeftCorner',((1978-screenWidth)/2)-5,nil,nil,nil) --Infinity_SetArea('rgDialogRightCorner',(1978-(1978-screenWidth)/2)-85,nil,nil,nil) greySidebars() previousTop = nil scrolled = false scrollToBottom = false rgAlreadyAdded = 0 rgDialogLoad = 0 " onClose " local x,y,w,h = Infinity_GetArea('worldDialogBackground') toolbarTop = toolbarTop - h --resizeDialogContent(h - 253) Infinity_PopMenu('WORLD_DIALOG_CONFIRM') Infinity_PopMenu('WORLD_DIALOG_LEFT') Infinity_PopMenu('WORLD_DIALOG_RIGHT') Infinity_PushMenu('LEFT_SIDEBAR') Infinity_PushMenu('RIGHT_SIDEBAR') ungreySidebars() if rgDialogLoad == 1 then rgDialogLoadCount = 0 Infinity_PressKeyboardButton('l') end rgDialogLoad = 0 " label { area 0 0 1060 388 } label { on space enabled "RgSpaceAdvanceDialog == 0" area 0 0 1 1 } label { area 154 20 856 337 rectangle 0 } label { name "worldDialogBackground" area 0 0 590 393 bam rgddiab frame 0 sequence lua "RgUISkin" scaleToClip } label { name "worldDialogBackground" area 583 0 590 393 bam rgddiab frame 1 sequence lua "RgUISkin" scaleToClip } label { name "worldDialogPortraitArea" area 56 29 106 167 bitmap lua "worldNPCDialogPortrait" } label { enabled "worldNPCDialogPortrait ~= 'NONE' and worldNPCDialogPortrait ~= ''" area 51 24 116 177 bam rgdport6 sequence lua "RgUISkin" scaleToClip } label { area 1005 27 50 50 bam "rgdslot4" scaleToClip sequence lua "RgUISkin" } label { --area 1090 27 50 50 area 1005 78 50 50 bam "rgdslot4" scaleToClip sequence lua "RgUISkin" } button { area 1010 32 40 40 bam "rgdmenub" sequence 1 ScaleToClip tooltip lua "getUiString('RG_WRITE_JOURNAL')" action " rgAddNewNote(worldNPCDialogText) " } button { --area 1095 32 40 40 area 1010 83 40 40 bam "rgdhkbt6" text lua "rgLoadFromDialog()" ScaleToClip tooltip lua "getUiString('ASSIGN_KEYS_MISC_QUICKLOAD')" action " rgDialogLoad = 1 " } list { column { width 100 label { area 0 0 -1 1 enabled "rowNumber == 1 and not scrolled" } text { area 0 0 -1 -1 pad 0 0 0 6 enabled "rowNumber == 1 and scrolled" text lua "worldMessageBoxText" text style "normal" } text { area 0 0 -1 -1 pad 0 0 0 6 enabled "rowNumber == 1 and not scrolled" text lua "worldNPCDialogText:gsub('\n', ': ', 1)" text style "normal" } label { area 0 0 -1 -1 pad 6 0 0 0 enabled "rowNumber > 1 and dialogEntryGreyed()" fill 0 0 0 150 } text { area 0 0 -1 -1 enabled "rowNumber > 1" pad 6 0 0 0 text lua "getDialogEntryText(rowNumber)" text style "normal" } } name "worldPlayerDialogChoicesList" area 184 32 806 300 rowheight dynamic hideHighlight table "rgGetDialog()" var "worldPlayerDialogSelection" scrollbar 'rgdscrl1' scrollbar func "dialogScroll" actionEnter " if(gameOptions.m_bConfirmDialog == true) then return end glowTest = mouseoverRow worldPlayerDialogSelection = mouseoverRow " actionExit " if(gameOptions.m_bConfirmDialog == true) then return end glowTest = nil worldPlayerDialogSelection = 0 " action " --In confirm mode, just highlight the choice. if((gameOptions.m_bConfirmDialog == true) or (worldPlayerDialogSelection <= 0)) then return end worldScreen:OnDialogReplyClick(worldPlayerDialogChoices[worldPlayerDialogSelection].marker) worldPlayerDialogSelection = 0 rgAlreadyAdded = 0 " } } ` function getDialogButtonEnabled() if(gameOptions.m_bConfirmDialog == true) then return true else return (rgDialogChoicesCount() == 0) end end function getDialogButtonClickable() local ret = worldScreen:GetInControlOfDialog() if(gameOptions.m_bConfirmDialog == true) then return ret and ((rgDialogChoicesCount() == 0) or (worldPlayerDialogSelection and worldPlayerDialogSelection > 0)) --no choices, or we've selected a choice. else return ret end end ` menu { name 'WORLD_DIALOG_CONFIRM' align center bottom ignoreEsc offset 0 -5 button { area 0 0 410 49 --bam 'rgdmbcg1' --frame 1 bam 'RGDBUTW1' ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text style "button" text lua "dialogButtonText" enabled "getDialogButtonEnabled()" clickable lua "getDialogButtonClickable()" text style "button" action " if(isTouchActionbar() and not dialogViewMode and not showDialogButtonChoices()) then onDialogButtonClick() elseif(gameOptions.m_bConfirmDialog == true and (#worldPlayerDialogChoices > 0)) then -- if confirm dialog and choices available. worldScreen:OnDialogReplyClick(worldPlayerDialogChoices[worldPlayerDialogSelection].marker) worldPlayerDialogSelection = 0 else -- no choices, just step. worldScreen:StepDialog() end " } } menu { name 'CHARACTER_SELECT' align center center onopen "selectedCharacter = 0" ignoreesc label { area 0 0 768 768 bam rgdbccg1 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg1 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 694 100 562 552 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 144 36 1078 46 ScaleToClip text "CHARGEN_TITLE" text style 'rg_trajan' text color '$' text align center center } text { area 714 120 522 512 text lua "character_select[selectedCharacter].desc" text style "normal_parchment" scrollbar 'rgdscrl1' } list { column { width 100 label { area 0 0 -1 -1 bam 'rgdcgim3' scaleToClip sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,selectedCharacter)" align left top } label { bitmap lua "character_select[rowNumber].portrait" area 9 8 58 84 align center center } label { area 85 12 -1 35 text lua "character_select[rowNumber].name" text style "normal" } label { area 85 50 720 50 --text lua "character_select[rowNumber].desc" text style "rg_normal_small" } } hidehighlight area 100 100 590 552 rowheight dynamic table "character_select" var selectedCharacter scrollbar rgdscrl1 } button { on escape area 316 661 320 70 bam rgdbutm1 ScaleToClip sequence lua "RgUISkin" text "BACK_BUTTON" text style "button" action " createCharScreen:OnCancelButtonClick() Infinity_PopMenu('CHARACTER_SELECT') " } button { area 732 661 320 70 bam rgdbutm1 ScaleToClip sequence lua "RgUISkin" text "DONE_BUTTON" text style "button" clickable lua "selectedCharacter ~= 0" action " Infinity_OnCharacterImportItemSelect(selectedCharacter - 1) createCharScreen:OnDoneButtonClick() Infinity_PopMenu('CHARACTER_SELECT') " } } ` chargen = { races = {}, kits = {}, } function chargenAcceptOrExport() if createCharScreen:GetEngineState() == 4 then return getUiString("EXPORT_BUTTON") else return getUiString("ACCEPT_BUTTON") end end function rgChargenSteps(t) local target = t if t == 9 then --skills target = 8 end for index = 1, 10, 1 do if createCharScreen:GetCurrentStep() == target then break else createCharScreen:OnMainBackButtonClick() end end if t == 9 then --skills createCharScreen:OnMenuButtonClick() createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end end function rgGetChargenArea() local screenWidth, screenHeight = Infinity_GetScreenSize() local h = (screenHeight - 768) / 2 Infinity_SetArea('chargenButtonImport',nil,screenHeight-74,nil,nil) Infinity_SetArea('chargenButtonBio',nil,screenHeight-74,nil,nil) Infinity_SetArea('chargenButtonBack',nil,screenHeight-74,nil,nil) Infinity_SetArea('chargenButtonCancel',nil,screenHeight-74,nil,nil) Infinity_SetArea('chargenButtonAccept',nil,screenHeight-74,nil,nil) Infinity_SetArea('chargenButtonParty',nil,screenHeight-74,nil,nil) Infinity_SetArea('chargenButtonAcceptIwd',nil,screenHeight-74,nil,nil) if rgGameEngine == 3 then Infinity_SetArea('chargenButton1',20,h+140,300,60) Infinity_SetArea('chargenButton2',20,h+210,300,60) Infinity_SetArea('chargenButton3',20,h+280,300,60) Infinity_SetArea('chargenButton4',20,h+350,300,60) Infinity_SetArea('chargenButton5',20,h+420,300,60) Infinity_SetArea('chargenButtonName',20,h+490,300,60) Infinity_SetArea('chargenTitle',20,h+80,300,44) Infinity_SetArea('chargenInfoBack',nil,h+56,nil,nil) --498 196 324 552 --Infinity_SetArea('chargenInfoBack1',nil,h+56,nil,nil) Infinity_SetArea('chargenInfoText',nil,h+76,nil,nil) else Infinity_SetArea('chargenButton1',74,118,244,58) Infinity_SetArea('chargenButton2',318,118,244,58) Infinity_SetArea('chargenButton3',562,118,244,58) Infinity_SetArea('chargenButton4',806,118,244,58) Infinity_SetArea('chargenButton5',1048,118,244,58) Infinity_SetArea('chargenTitle',170,10,1025,44) end end function rgGetChargenInfo(step) local out = "" local s = chargen.information local list = {} if chargen.information ~= nil then for i in string.gmatch(chargen.information, "[^\r\n]+") do table.insert(list, i); end end if step == 1 and #list > 0 then out = list[1] elseif step == 2 and #list > 3 then out = list[2] .. '\n' .. list[3] .. '\n' .. list[4] elseif step == 3 and #list > 9 then out = list[5] .. '\n' .. list[6] .. '\n' .. list[7] .. '\n' .. list[8] .. '\n' .. list[9] .. '\n' .. list[10] elseif step == 4 then for i = 1, 12, 1 do s = string.gsub(s, '^[^\n]*\n', '') end out = s end return out end ` menu { name 'CHARGEN' align center top ignoreesc onOpen " if rgGameEngine == 3 then Infinity_SetBackground('RG_CHARGEN_BACKGROUND') end rgGetChargenArea() " label { name "rgChargenBackground" area 0 0 1365 768 } label { name "chargenTitle" area 20 216 300 44 text "CHARGEN_TITLE" --text lua "createCharScreen:GetCurrentStep()" text style "button" text shadow 1 } label { enabled "rgGameEngine ~= 3" area 74 152 244 420 bam rgdcgen2 sequence lua "RgUISkin" scaleToClip } label { enabled "rgGameEngine ~= 3" area 318 152 244 420 bam rgdcgen2 sequence lua "RgUISkin" scaleToClip } label { enabled "rgGameEngine ~= 3" area 562 152 244 420 bam rgdcgen2 sequence lua "RgUISkin" scaleToClip } label { enabled "rgGameEngine ~= 3" area 806 152 242 420 bam rgdcgen2 sequence lua "RgUISkin" scaleToClip } label { enabled "rgGameEngine ~= 3" area 1048 152 244 420 bam rgdcgen2 sequence lua "RgUISkin" scaleToClip } label { enabled "rgGameEngine ~= 3" area 96 218 200 314 bitmap lua "chargen.portrait" } label { enabled "createCharScreen:GetCurrentStep() > 0 and rgGameEngine ~= 3" area 92 214 208 322 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } text { enabled "rgGameEngine ~= 3" area 96 176 208 360 text lua "rgGetChargenInfo(1)" scrollbar 'rgdscrl1' text style "normal" text point 12 } text { enabled "rgGameEngine ~= 3" area 340 176 208 360 text lua "rgGetChargenInfo(2)" scrollbar 'rgdscrl1' text style "normal" text point 12 } text { enabled "rgGameEngine ~= 3" area 584 176 208 360 text lua "rgGetChargenInfo(3)" scrollbar 'rgdscrl1' text style "normal" text point 12 } text { enabled "createCharScreen:GetCurrentStep() > 9 and rgGameEngine ~= 3" area 828 176 208 360 text lua "rgGetChargenInfo(4)" scrollbar 'rgdscrl1' text style "normal" text point 12 } button { enabled "createCharScreen:GetCurrentStep() > 15 and rgGameEngine ~= 3" area 1112 262 114 160 paperdoll 1 } text { enabled "createCharScreen:GetCurrentStep() > 15 and rgGameEngine ~= 3" area 1070 176 208 90 text lua "getUiString('SOUND_TITLE') .. '\n' .. getSoundStringRef(currentChargenCustomSound, chargen.customSound)" scrollbar 'rgdscrl1' text style "normal" text point 12 } button { name "chargenButton1" area 20 276 300 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip --clickable lua "createCharScreen:GetCurrentStep() == 0" glow lua "createCharScreen:GetCurrentStep() == 0" text "GENDER_BUTTON" text style "button" pad 8 2 8 2 action " rgChargenSteps(0) createCharScreen:OnMenuButtonClick() " } button { name "chargenButton2" area 20 346 300 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 3" glow lua "createCharScreen:GetCurrentStep() == 3" text lua "getUiString('RACE_BUTTON') .. ' & ' .. getUiString('CLASS_BUTTON')" text style "button" pad 8 2 8 2 action " rgChargenSteps(3) currentChargenRace = nil currentChargenClass = nil currentChargenKit = nil Infinity_PushMenu('POPUP_INFO') rgChargenStepRace = 0 rgChargenStepClass = 0 rgChargenStepKit = 0 rgKitSelected = -1 createCharScreen:OnMenuButtonClick() " } button { name "chargenButton3" area 20 416 300 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 8" glow lua "createCharScreen:GetCurrentStep() == 8" text "ABILITIES_BUTTON" text style "button" pad 8 2 8 2 action " rgChargenSteps(8) createCharScreen:OnMenuButtonClick() " } button { name "chargenButton4" area 20 486 300 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 9" glow lua "createCharScreen:GetCurrentStep() == 9" text "SKILLS_BUTTON" text style "button" pad 8 2 8 2 action " rgChargenSteps(9) createCharScreen:OnMenuButtonClick() " } button { name "chargenButton5" area 20 556 300 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 15" glow lua "createCharScreen:GetCurrentStep() == 15" text "APPEARANCE_BUTTON" text style "button" pad 8 2 8 2 action " rgChargenSteps(15) createCharScreen:OnMenuButtonClick() createCharScreen:OnDoneButtonClick() createCharScreen:OnCancelButtonClick() createCharScreen:OnDoneButtonClick() " } button { name "chargenButtonImport" area 566 1006 230 60 text "IMPORT_BUTTON" text style "button" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip action "createCharScreen:OnImportCharacterButtonClick()" } button { name "chargenButtonBio" area 800 1006 230 60 text "BIOGRAPHY_BUTTON" text style "button" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 17" action "createCharScreen:OnBiographyButtonClick()" } button { name "chargenButtonBack" on escape area 96 1006 230 60 text "BACK_BUTTON" text style "button" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:IsMainBackButtonClickable()" action " createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() if rgGameEngine == 3 then createCharScreen:OnMainCancelButtonClick() end " } button { name "chargenButtonCancel" on escape area 96 1006 230 60 text "CANCEL_BUTTON" text style "button" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip enabled "not createCharScreen:IsMainBackButtonClickable()" action "createCharScreen:OnMainCancelButtonClick()" } button { enabled "rgGameEngine ~= 3" name "chargenButtonAccept" area 1036 1006 230 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 17" glow lua "createCharScreen:GetCurrentStep() == 17" --text "NAME_BUTTON" text lua "chargenAcceptOrExport()" text style "button" pad 8 2 8 2 action " rgChargenSteps(17) createCharScreen:OnMenuButtonClick() " } button { name "chargenButtonParty" area 332 1006 230 60 text "CREATE_PARTY_BUTTON" text style "button" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:IsAdvancedButtonClickable() == true" action "createCharScreen:OnAdvancedButtonClick()" } --iwd label { name "chargenInfoBack" enabled "rgGameEngine == 3" area 1025 212 340 552 --1045 212 300 530 bam rgdcgen2 ScaleToClip } button { name "chargenButtonAcceptIwd" enabled "rgGameEngine == 3" area 1036 1006 230 60 text lua "chargenAcceptOrExport()" text style "button" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:IsChargenComplete()" action " createCharScreen:AcceptCharacter(-1) if rgIwdSoloPlay == 1 then createPartyScreen:OnDoneButtonClick() end " } button { enabled "rgGameEngine == 3" name "chargenButtonName" area 20 626 300 60 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() >= 17" glow lua "createCharScreen:GetCurrentStep() == 17" text "NAME_BUTTON" text style "button" pad 8 2 8 2 action " rgChargenSteps(17) createCharScreen:OnMenuButtonClick() " } text { name "chargenInfoText" enabled "rgGameEngine == 3" area 1060 234 281 484 text lua "chargen.information" scrollbar 'rgdscrl1' text style "normal" } } ` createCharGenderHelp = 24313 rgMalePortraitList = {} rgFemalePortraitList = {} rgGenderStep = 0 function rgGetPortraitListTest() local port = createCharScreen:GetCurrentPortrait() table.insert(rgMalePortraitList, port) --createCharScreen:IncCurrentPortrait() --'MAN1L','WOMAN1L' end ` menu { name 'CHARGEN_GENDER' modal align center center ignoreesc onOpen " toggleMale = 0; toggleFemale = 0 if next(rgFemalePortraitList) == nil then createCharScreen:OnGenderSelectButtonClick(2) createCharScreen:OnDoneButtonClick() rgFemalePortraitList = {} rgGetPortraitList('WOMAN1L') currentPortrait = 1 createCharScreen:OnCancelButtonClick() elseif rgGenderStep == 1 then toggleFemale = 1 createCharScreen:OnGenderSelectButtonClick(2) elseif rgGenderStep == 2 then toggleMale = 1 createCharScreen:OnGenderSelectButtonClick(1) end " label { area 0 0 768 768 bam rgdbccg1 sequence lua "RgUISkin" frame 0 scaleToClip } label { area 597 0 768 768 bam rgdbccg1 sequence lua "RgUISkin" frame 1 scaleToClip } label { enabled "toggleMale == 1" area 111 218 212 330 bitmap lua "rgMalePortraitList[currentPortrait]" } label { enabled "toggleFemale == 1" area 111 218 212 330 bitmap lua "rgFemalePortraitList[currentPortrait]" } label { enabled "toggleFemale == 1 or toggleMale == 1" area 105 213 224 341 bam 'rgdport4' sequence lua "RgUISkin" ScaleToClip } label { area 480 32 405 52 text lua "rgString(getUiString('GENDER_TITLE') .. ' & ' .. getUiString('APPEARANCE_TITLE'))" text style 'rg_trajan' text color '$' align center center } label { enabled "toggleMale == 1" area 105 560 224 50 bam 'rgdcgen1' sequence lua "RgUISkin" ScaleToClip text lua "rgMalePortraitList[currentPortrait]" text style "normal" text align center center text lower } label { enabled "toggleFemale == 1" area 105 560 224 50 bam 'rgdcgen1' sequence lua "RgUISkin" ScaleToClip text lua "rgFemalePortraitList[currentPortrait]" text style "normal" text align center center text lower } button { area 104 96 112 110 bam RGDGEND2 sequence lua "RgUISkin" ScaleToClip toggle toggleMale action " toggleFemale = 0; createCharScreen:OnGenderSelectButtonClick(1) if rgGenderStep == 0 then rgGenderStep = 1 createCharScreen:OnDoneButtonClick() end currentPortrait = 1 " } button { area 220 96 112 110 bam RGDGEND3 sequence lua "RgUISkin" ScaleToClip toggle toggleFemale action " toggleMale = 0; createCharScreen:OnGenderSelectButtonClick(2) currentPortrait = 1 " } list { column { width 10 label { area 0 0 90 135 enabled "rgIsNthNumber(rowNumber,10)" } label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10)" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber)"} } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+1]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+1] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+1)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+2]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+2] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+2)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+3]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+3] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+3)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+4]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+4] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+4)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+5]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+5] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+5)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+6]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+6] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+6)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+7]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+7] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+7)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+8]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+8] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+8)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgMalePortraitList[rowNumber+9]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgMalePortraitList[rowNumber+9] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+9)" } } rowheight dynamic hideHighlight enabled "toggleMale == 1" area 342 100 926 550 table "rgMalePortraitList" var currentPortrait scrollbar 'rgdscrl1' action " currentPortrait = currentPortrait + cellNumber - 1 " } list { column { width 10 label { area 0 0 90 135 enabled "rgIsNthNumber(rowNumber,10)" } label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10)" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber)"} } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+1]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+1] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+1)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+2]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+2] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+2)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+3]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+3] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+3)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+4]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+4] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+4)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+5]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+5] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+5)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+6]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+6] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+6)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+7]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+7] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+7)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+8]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+8] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+8)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgFemalePortraitList[rowNumber+9]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgFemalePortraitList[rowNumber+9] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetSelectedPortrait(rowNumber+9)" } } rowheight dynamic hideHighlight enabled "toggleFemale == 1" area 342 100 926 550 table "rgFemalePortraitList" var currentPortrait scrollbar 'rgdscrl1' action " currentPortrait = currentPortrait + cellNumber - 1 " } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action " Infinity_PopMenu(); Infinity_PopMenu('CHARGEN_PORTRAIT'); currentPortrait = 1 createCharScreen:OnCancelButtonClick() if rgGameEngine == 3 then createCharScreen:OnMainCancelButtonClick() end " } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable() and ((toggleMale == 1 and rgMalePortraitList[currentPortrait] ~= nil) or (toggleFemale == 1 and rgFemalePortraitList[currentPortrait] ~= nil))" action " rgGenderStep = 3 Infinity_PopMenu(); createCharScreen:OnDoneButtonClick() --createCharScreen:OnMenuButtonClick() " } } ` --function rgGetPortraitList(gender) -- local genderM = 'MAN1L' -- local genderF = 'WOMAN1L' -- if rgGameEngine == 3 then -- if gender == 'MAN1L' then -- gender = 'DMC_L' -- else -- gender = 'DFF_L' -- end -- genderM = 'DMC_L' -- genderF = 'DFF_L' -- end -- -- local i = 1 -- local maxPortraits = 200 -- while ( i <= maxPortraits ) do -- local port = createCharScreen:GetCurrentPortrait() -- local prefix = string.sub(port, 1, 2) -- if port == gender and i > 1 then break end -- if gender == genderM and prefix ~= 'f#' then -- table.insert(rgMalePortraitList, port) -- elseif gender == genderF and prefix ~= 'm#' then -- table.insert(rgFemalePortraitList, port) -- end -- i = i + 1 -- createCharScreen:IncCurrentPortrait() --'MAN1L','WOMAN1L' -- -- end -- --for index = 1, 100, 1 do -- -- table.insert(rgMalePortraitList, createCharScreen:GetCurrentPortrait()) -- -- createCharScreen:IncCurrentPortrait() -- --end --end function rgGetPortraitList(gender) local genderM = 'MAN1L' local genderF = 'WOMAN1L' if rgGameEngine == 3 then if gender == 'MAN1L' then gender = 'DMC_L' else gender = 'DFF_L' end genderM = 'DMC_L' genderF = 'DFF_L' end local i = 1 local maxPortraits = 200 while ( i <= maxPortraits ) do local port = createCharScreen:GetCurrentPortrait() local prefix = string.sub(port, 1, 2) if port == gender and i > 1 then break end if gender == genderM and prefix ~= 'f#' then table.insert(rgMalePortraitList, port) elseif gender == genderF and prefix ~= 'm#' then table.insert(rgFemalePortraitList, port) end i = i + 1 createCharScreen:IncCurrentPortrait() --'MAN1L','WOMAN1L' end while #rgMalePortraitList > maxPortraits do local totMalePortrait = #rgMalePortraitList for i = totMalePortrait, 1, -1 do local r = math.random() if r > 0.7 then table.remove(rgMalePortraitList, i) end if #rgMalePortraitList == maxPortraits then break end end end while #rgFemalePortraitList > maxPortraits do local totFemalePortrait = #rgFemalePortraitList for i = totFemalePortrait, 1, -1 do local r = math.random() if r > 0.7 then table.remove(rgFemalePortraitList, i) end if #rgFemalePortraitList == maxPortraits then break end end end end function rgGetCustomizedPortraitList() genderM = 'MAN1L' genderF = 'WOMAN1L' if rgGameEngine == 3 then if gender == 'MAN1L' then gender = 'DMC_L' else gender = 'DFF_L' end genderM = 'DMC_L' genderF = 'DFF_L' end -- local maxPortraits = 200 local maxPortraits = 400 local i = 1 local gender = createCharScreen:GetCurrentPortrait() while ( i <= maxPortraits ) do local port = createCharScreen:GetCurrentPortrait() local prefix = string.sub(port, 1, 2) if port == gender and i > 1 then break end if gender == genderM and prefix ~= 'f#' then table.insert(rgCustomizedPortraitList, port) elseif gender == genderF and prefix ~= 'm#' then table.insert(rgCustomizedPortraitList, port) end i = i + 1 createCharScreen:IncCurrentPortrait() --'MAN1L','WOMAN1L' end end function rgGetSelectedPortrait(num) if currentPortrait == num then return 1 else return 0 end end function rgGetCustomizedSelectedPortrait(num) if currentCusPortrait == num then return 1 else return 0 end end function rgGetMediumPortrait(portrait) if portrait:sub(-1) == "L" then return portrait:sub(1, -2) .. "M" else return portrait end end ` menu { name 'CHARGEN_PORTRAIT' modal align center center ignoreesc onOpen " rgCustomizedPortraitList = {} if CurrentlyInGame() then currentCusPortrait = 1 rgGetCustomizedPortraitList() popSidebars() else if rgGenderStep == 1 then rgMalePortraitList = {} rgGetPortraitList('MAN1L') currentPortrait = 1 rgGenderStep = 2 createCharScreen:OnCancelButtonClick() elseif rgGenderStep == 3 then local i = 1 local curr = '' if toggleMale == 1 then curr = rgMalePortraitList[currentPortrait] else curr = rgFemalePortraitList[currentPortrait] end while i > 0 do local port = createCharScreen:GetCurrentPortrait() if curr == port then break end createCharScreen:IncCurrentPortrait() end rgGenderStep = 0 Infinity_PopMenu('CHARGEN_GENDER'); createCharScreen:OnDoneButtonClick() Infinity_PopMenu('CHARGEN_PORTRAIT'); else for index = 1, currentPortrait-1, 1 do createCharScreen:IncCurrentPortrait() end Infinity_PopMenu('CHARGEN_GENDER'); createCharScreen:OnDoneButtonClick() Infinity_PopMenu('CHARGEN_PORTRAIT'); end end " label { area 0 0 768 768 bam rgdbcres frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbcres frame 1 sequence lua "RgUISkin" scaleToClip } button { area 108 108 210 331 bitmap lua "rgCustomizedPortraitList[currentCusPortrait]" } label { area 102 102 223 344 bam 'rgdport7' sequence lua "RgUISkin" scaleToClip } button { area 102 450 222 50 text lua "rgString('APPEARANCE_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" frame 2 ScaleToClip action " characterScreen:OnCancelButtonClick() Infinity_PopMenu() currentPanelID = 17 characterScreen:OnAppearanceButtonClick() " } button { area 102 504 222 50 text lua "rgString('SOUNDS_BUTTON')" text style "button" bam rgdbuts3 ScaleToClip sequence lua "RgUISkin" action " characterScreen:OnCancelButtonClick() currentPanelID = 17 characterScreen:OnSoundsButtonClick() " } button { area 102 558 222 50 text lua "rgString('COLORS_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " createCharScreen:OnCancelButtonClick() currentPanelID = const.CUSTOMIZE_ID characterScreen:OnHairSkinButtonClick() " } button { area 102 612 222 50 text lua "rgString('SCRIPT_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() currentPanelID = 17 characterScreen:OnScriptButtonClick() " } button { area 102 666 222 50 text lua "rgString('BIOGRAPHY_BUTTON')" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip action " characterScreen:OnCancelButtonClick() currentPanelID = 17 characterScreen:OnCusomizeBiographyButtonClick() " } label { area 480 32 405 52 text lua "rgString('APPEARANCE_TITLE')" text style 'rg_trajan' text color '$' align center center } list { column { width 10 label { area 0 0 90 135 enabled "rgIsNthNumber(rowNumber,10)" } label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10)" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber)"} } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+1]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+1] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+1)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+2]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+2] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+2)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+3]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+3] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+3)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+4]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+4] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+4)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+5]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+5] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+5)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+6]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+6] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+6)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+7]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+7] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+7)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+8]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+8] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+8)" } } column { width 10 label { area 4 4 82 126 enabled "rgIsNthNumber(rowNumber,10)" bitmap lua "rgCustomizedPortraitList[rowNumber+9]" } label { area 0 0 90 134 enabled "rgIsNthNumber(rowNumber,10) and rgCustomizedPortraitList[rowNumber+9] ~= nil" bam "RGDPORT3" sequence lua "RgUISkin" Frame lua "rgGetCustomizedSelectedPortrait(rowNumber+9)" } } rowheight dynamic hideHighlight area 342 100 926 554 table "rgCustomizedPortraitList" var currentCusPortrait scrollbar 'rgdscrl1' action " currentCusPortrait = currentCusPortrait + cellNumber - 1 " } button { on escape area 370 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action " Infinity_PopMenu(); createCharScreen:OnCancelButtonClick() if rgGameEngine == 3 and e:GetActiveEngine() == createCharScreen then createCharScreen:OnMainCancelButtonClick() end " } button { on return area 818 660 448 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " if CurrentlyInGame() then --for index = 1, currentCusPortrait-1, 1 do -- createCharScreen:IncCurrentPortrait() --end local i = 1 local curr = rgCustomizedPortraitList[currentCusPortrait] while i > 0 do local port = createCharScreen:GetCurrentPortrait() if curr == port then break end createCharScreen:IncCurrentPortrait() end else for index = 1, currentPortrait-1, 1 do createCharScreen:IncCurrentPortrait() end end Infinity_PopMenu(); createCharScreen:OnDoneButtonClick() " } } ` function raceOrGeneralHelp() race = chargen.races[currentChargenRace] if race then return Infinity_FetchString(race.desc) else return Infinity_FetchString(17237) end end ` menu { name 'CHARGEN_RACE' modal align center center ignoreesc onopen " if currentChargenRace ~= nil and rgChargenStepRace == 0 then rgChargenStepRace = 1 currentChargenClass = nil createCharScreen:OnRaceSelectButtonClick(chargen.races[currentChargenRace].id) createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end " label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString(getUiString('RACE_BUTTON') .. ' & ' .. getUiString('CLASS_BUTTON'))" text style 'rg_trajan' text color '$' align center center } label { area 100 97 200 35 text "RACE_TITLE" text style "button" align left center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenRace)" ScaleToClip text lua "Infinity_FetchString(chargen.races[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } rowheight dynamic hidehighlight area 100 142 200 508 table "chargen.races" var currentChargenRace scrollbar 'rgdscrl1' action " if chargen.races[currentChargenRace] then createCharScreen:OnRaceSelectButtonClick(chargen.races[currentChargenRace].id) createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end " } text { area 920 100 350 550 text lua "raceOrGeneralHelp()" text style "normal_parchment" scrollbar 'rgdscrl1' text point 12 } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action "Infinity_PopMenu('POPUP_INFO'); Infinity_PopMenu(); createCharScreen:OnCancelButtonClick()" } button { --on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "false" action "createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick()" } } ` function classOrGeneralHelp() class = chargen.class[currentChargenClass] if class then return Infinity_FetchString(class.desc) else --only bit that may need to change for dual class! :) return Infinity_FetchString(17242) end end ` menu { name 'CHARGEN_CLASS' modal align center center ignoreesc onopen " if createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS then if currentChargenClass ~= nil and rgChargenStepClass == 0 then rgChargenStepClass = 1 --currentChargenKit = 0 --rgKitSelected = -1 createCharScreen:OnClassSelectButtonClick(chargen.class[currentChargenClass].id) createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end else currentChargenClass = 0 end " label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { enabled "createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS" area 480 32 405 52 text lua "rgString(getUiString('RACE_BUTTON') .. ' & ' .. getUiString('CLASS_BUTTON'))" text style 'rg_trajan' text color '$' align center center } label { enabled "createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_CLASS" area 146 36 1074 44 text lua "getUiString('CLASS_TITLE')" text style "button" } label { area 100 97 200 35 text "RACE_TITLE" text style "button" align left center enabled "createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS" } label { area 305 97 200 35 text "CLASS_TITLE" text style "button" align left center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenRace)" ScaleToClip text lua "Infinity_FetchString(chargen.races[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } enabled "createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS" rowheight dynamic hidehighlight area 100 142 200 508 table "chargen.races" var currentChargenRace scrollbar 'rgdscrl1' action " if chargen.races[currentChargenRace] then rgChargenStepRace = 0 currentChargenKit = nil rgKitSelected = -1 createCharScreen:OnRaceSelectButtonClick(chargen.races[currentChargenRace].id) createCharScreen:OnCancelButtonClick() Infinity_PopMenu('CHARGEN_CLASS') createCharScreen:OnMainBackButtonClick() createCharScreen:OnMenuButtonClick() end " } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenClass)" ScaleToClip text lua "Infinity_FetchString(chargen.class[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.class[currentChargenClass] then createCharScreen:OnClassSelectButtonClick(chargen.class[currentChargenClass].id) if createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS then createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end end " rowheight dynamic hidehighlight area 305 142 200 508 table "chargen.class" var currentChargenClass scrollbar 'rgdscrl1' } text { enabled "createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS" area 920 100 350 550 text lua "raceOrGeneralHelp()" text style "normal_parchment" scrollbar 'rgdscrl1' text point 12 } text { enabled "createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_CLASS" area 920 100 350 550 text lua "classOrGeneralHelp()" text style "normal_parchment" scrollbar 'rgdscrl1' text point 12 } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" clickable lua "createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_CLASS" action "Infinity_PopMenu('POPUP_INFO'); createCharScreen:OnCancelButtonClick(); Infinity_PopMenu('CHARGEN_CLASS'); createCharScreen:OnMainBackButtonClick()" } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "rgClassDoneButtonClickable()" action "createCharScreen:OnDoneButtonClick(); Infinity_PopMenu('CHARGEN_CLASS'); " } } ` function rgClassDoneButtonClickable() if createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_CLASS then return createCharScreen:IsDoneButtonClickable() else return false end end function kitOrGeneralHelp() kit = chargen.kit[currentChargenKit] if kit then return Infinity_FetchString(kit.desc) else return Infinity_FetchString(17242) end end ` menu { name 'CHARGEN_KIT' modal align center center ignoreesc onopen " if rgKitSelected >= 0 then currentChargenKit = rgKitSelected else currentChargenKit = nil end if rgKitSelected >= 0 and rgChargenStepKit == 0 then rgChargenStepKit = 1 currentChargenAlignment = nil createCharScreen:OnKitSelectButtonClick(chargen.kit[rgKitSelected].id) createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end " label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString(getUiString('RACE_BUTTON') .. ' & ' .. getUiString('CLASS_BUTTON'))" text style 'rg_trajan' text color '$' align center center } label { area 100 97 200 35 text "RACE_TITLE" text style "button" align left center } label { area 305 97 200 35 text "CLASS_TITLE" text style "button" align left center } label { area 510 97 200 35 text "CLASS_KIT_TITLE" text style "button" align left center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenRace)" ScaleToClip text lua "Infinity_FetchString(chargen.races[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } rowheight dynamic hidehighlight area 100 142 200 508 table "chargen.races" var currentChargenRace scrollbar 'rgdscrl1' action " if chargen.races[currentChargenRace] then rgChargenStepRace = 0 currentChargenKit = nil rgKitSelected = -1 createCharScreen:OnRaceSelectButtonClick(chargen.races[currentChargenRace].id) createCharScreen:OnCancelButtonClick() Infinity_PopMenu('CHARGEN_CLASS') createCharScreen:OnMainBackButtonClick() createCharScreen:OnMenuButtonClick() end " } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenClass)" ScaleToClip text lua "Infinity_FetchString(chargen.class[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.class[currentChargenClass] then rgChargenStepClass = 0 currentChargenKit = nil rgKitSelected = -1 createCharScreen:OnClassSelectButtonClick(chargen.class[currentChargenClass].id) createCharScreen:OnCancelButtonClick() end " rowheight dynamic hidehighlight area 305 142 200 508 table "chargen.class" var currentChargenClass scrollbar 'rgdscrl1' } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenKit)" ScaleToClip text lua "Infinity_FetchString(chargen.kit[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.kit[currentChargenKit] then rgChargenStepClass = 0 rgKitSelected = currentChargenKit createCharScreen:OnKitSelectButtonClick(chargen.kit[currentChargenKit].id) createCharScreen:OnDoneButtonClick() createCharScreen:OnMenuButtonClick() end " scrollbar 'rgdscrl1' rowheight dynamic hidehighlight area 510 142 200 508 table "chargen.kit" var currentChargenKit } text { area 920 100 350 550 text lua "classOrGeneralHelp()" text style "normal_parchment" scrollbar 'rgdscrl1' text point 12 } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action " Infinity_PopMenu('POPUP_INFO'); Infinity_PopMenu(); createCharScreen:OnCancelButtonClick(); Infinity_PopMenu('CHARGEN_CLASS'); createCharScreen:OnCancelButtonClick(); Infinity_PopMenu('CHARGEN_CLASS'); createCharScreen:OnMainBackButtonClick() " } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "false" action "Infinity_PopMenu(); createCharScreen:OnDoneButtonClick()" } } ` function alignmentOrGeneralHelp() alignment = chargen.alignment[currentChargenAlignment] if alignment then return Infinity_FetchString(alignment.desc) else return Infinity_FetchString(9602) end end function rgKitOrAlignmentDesc() if currentChargenAlignment == nil then return kitOrGeneralHelp() else return alignmentOrGeneralHelp() end end ` menu { name 'CHARGEN_ALIGNMENT' --modal align center center ignoreesc onopen "currentChargenAlignment = nil" label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString(getUiString('RACE_BUTTON') .. ' & ' .. getUiString('CLASS_BUTTON'))" text style 'rg_trajan' text color '$' align center center } label { area 100 97 200 35 text "RACE_TITLE" text style "button" align left center } label { area 305 97 200 35 text "CLASS_TITLE" text style "button" align left center } label { area 510 97 200 35 text "CLASS_KIT_TITLE" text style "button" align left center } label { area 715 97 200 35 text "ALIGNMENT_TITLE" text style "button" align left center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenRace)" ScaleToClip text lua "Infinity_FetchString(chargen.races[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.races[currentChargenRace] then rgChargenStepRace = 0 currentChargenKit = nil rgKitSelected = -1 createCharScreen:OnRaceSelectButtonClick(chargen.races[currentChargenRace].id) createCharScreen:OnCancelButtonClick() Infinity_PopMenu('CHARGEN_ALIGNMENT') createCharScreen:OnMainBackButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMenuButtonClick() end " rowheight dynamic hidehighlight area 100 142 200 508 table "chargen.races" var currentChargenRace scrollbar 'rgdscrl1' } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenClass)" ScaleToClip text lua "Infinity_FetchString(chargen.class[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.class[currentChargenClass] then rgChargenStepRace = 0 rgChargenStepClass = 0 currentChargenKit = nil rgKitSelected = -1 createCharScreen:OnClassSelectButtonClick(chargen.class[currentChargenClass].id) Infinity_PopMenu('CHARGEN_ALIGNMENT') createCharScreen:OnCancelButtonClick() createCharScreen:OnMainBackButtonClick() createCharScreen:OnMenuButtonClick() end " rowheight dynamic hidehighlight area 305 142 200 508 table "chargen.class" var currentChargenClass scrollbar 'rgdscrl1' } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenKit)" ScaleToClip text lua "Infinity_FetchString(chargen.kit[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.kit[currentChargenKit] then rgChargenStepRace = 0 rgChargenStepClass = 0 rgChargenStepKit = 0 rgKitSelected = currentChargenKit createCharScreen:OnKitSelectButtonClick(chargen.kit[currentChargenKit].id) createCharScreen:OnCancelButtonClick() Infinity_PopMenu('CHARGEN_ALIGNMENT') createCharScreen:OnMainBackButtonClick() createCharScreen:OnMenuButtonClick() end " scrollbar 'rgdscrl1' rowheight dynamic hidehighlight area 510 142 200 508 table "chargen.kit" var currentChargenKit } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenAlignment)" ScaleToClip text lua "Infinity_FetchString(chargen.alignment[rowNumber].name)" text style "normal" pad 5 5 0 5 text upper text point 11 } } action " if chargen.alignment[currentChargenAlignment] then createCharScreen:OnAlignmentSelectButtonClick(chargen.alignment[currentChargenAlignment].id) end " rowheight dynamic hidehighlight area 715 142 200 508 table "chargen.alignment" var currentChargenAlignment scrollbar 'rgdscrl1' } text { area 920 100 350 550 text lua "rgKitOrAlignmentDesc()" text style "normal_parchment" scrollbar 'rgdscrl1' text point 12 } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action "Infinity_PopMenu('POPUP_INFO'); Infinity_PopMenu(); createCharScreen:OnCancelButtonClick(); createCharScreen:OnMainBackButtonClick(); createCharScreen:OnMainBackButtonClick()" } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action "Infinity_PopMenu('POPUP_INFO'); Infinity_PopMenu(); createCharScreen:OnDoneButtonClick()" } } ` chargen.ability = { {name = 'STRENGTH_LABEL', desc = 9582}, {name = 'DEXTERITY_LABEL', desc = 9584}, {name = 'CONSTITUTION_LABEL', desc = 9583}, {name = 'INTELLIGENCE_LABEL', desc = 9585}, {name = 'WISDOM_LABEL', desc = 9586}, {name = 'CHARISMA_LABEL', desc = 9587}, } function abilityOrGeneralHelp() ability = chargen.ability[currentChargenAbility] if ability and ability.desc ~= -1 then createCharScreen:SetAbilityHelpInfo(currentChargenAbility) return Infinity_FetchString(ability.desc) else return Infinity_FetchString(17247) end end function rgAutoroll() if rgIsRolling == 1 then createCharScreen:OnAbilityReRollButtonClick() if chargen.totalRoll > rgMinimumRoll+75 then rgIsRolling = 0 if string.len(chargen.ability[1].roll) < 5 then local dif = 18 - chargen.ability[1].roll local o = 1 for i = 2, 16, 1 do local n = i if i > 11 then n = i - 10 elseif i > 6 then n = i - 5 end createCharScreen:OnAbilityPlusMinusButtonClick(n, false) if dif == chargen.extraAbilityPoints then for j = 1, dif, 1 do createCharScreen:OnAbilityPlusMinusButtonClick(1, true) end break end end end if string.len(chargen.ability[1].roll) == 5 then local mod = string.sub(chargen.ability[1].roll,4,5) local num = mod - 0 if num == 0 then num = 100 end if rgMinimumStrDesc() > num then rgIsRolling = 1 end end end end end function rgMinimumRollDesc() return rgMinimumRoll+75 end function rgMinimumStrDesc() if rgMinimumStrModifier == 0 then return 1 elseif rgMinimumStrModifier == 1 then return 51 elseif rgMinimumStrModifier == 2 then return 76 elseif rgMinimumStrModifier == 3 then return 91 elseif rgMinimumStrModifier == 4 then return 99 else return 100 end end function rgMinimumRollDesc() return rgMinimumRoll+75 end function rgRerollButtonName() if rgIsRolling == 0 then rgDragonEnabled = false return getUiString('REROLL_BUTTON') else return rgGetGameEngineString(15924,15924,15924,15924) end end function rgMinStrModEnabled() local id = chargen.class[currentChargenClass].id if id == 2 or id == 6 or id == 7 or id == 8 or id == 9 or id == 10 or id == 12 or id == 16 or id == 17 or id == 18 then return true else return false end end function StoreRoll() storedTotalRoll = chargen.totalRoll storedExceptionalStrength = GetExceptionalStrength() storedRollMeetsTarget = CurrentRollMeetsTarget() createCharScreen:OnAbilityStoreButtonClick() end function rgGetDragonFrame() if rgDragonFrame < 11 then rgDragonFrame = rgDragonFrame + 0.333 else rgDragonFrame = 0 end end rgMinimumRoll = 0 rgMinimumStrModifier = 0 rgDragonFrame = 0 ` menu { name 'CHARGEN_ABILITIES' modal align center center ignoreesc onopen "ticksPassed = 0; ticksStarting = 0; rgIsRolling = 0; rgDragonEnabled = false; rgIwdSkillPoints = 0; chargen.ability[ 1 ].storedRoll = nil; chargen.ability[ 2 ].storedRoll = nil; chargen.ability[ 3 ].storedRoll = nil; chargen.ability[ 4 ].storedRoll = nil; chargen.ability[ 5 ].storedRoll = nil; chargen.ability[ 6 ].storedRoll = nil; storedTotalRoll = nil" label { area 0 0 768 768 bam rgdbccg1 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg1 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 146 421 334 54 bam 'rgdcgen1' sequence lua "RgUISkin" ScaleToClip } label { area 480 32 405 52 text lua "rgString('ABILITIES_TITLE')" text style 'rg_trajan' text color '$' align center center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "RgUISkin*2" ScaleToClip } } rowheight 54 hidehighlight area 105 96 386 325 table "chargen.ability" } list { column { width 48 label { area 0 0 160 55 text lua "getUiString(chargen.ability[rowNumber].name)" text style "normal" align right center } } column { width 10 label { area 0 0 50 55 text lua "chargen.ability[rowNumber].roll" text style "normal" align center center } } column { width 10 label { area 0 0 50 55 text lua "chargen.ability[rowNumber].storedRoll" text style "normal" align center center text color "X" } } column { width 17 label { area 16 6 44 44 bam rgdcpbt1 scaleToClip frame lua "currentCellCheck(4)" } } column { width 15 label { area 0 6 44 44 bam rgdcpbt2 scaleToClip frame lua "currentCellCheck(5)" } } action " if ticksStarting < 10 then if cellNumber == 4 then createCharScreen:OnAbilityPlusMinusButtonClick(currentChargenAbility, true) elseif cellNumber == 5 then createCharScreen:OnAbilityPlusMinusButtonClick(currentChargenAbility, false) end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " ticksStarting = ticksStarting + 1 if ticksStarting > 10 then ticksPassed = ticksPassed + 1 if ticksPassed > 2 then if cellNumber == 4 then createCharScreen:OnAbilityPlusMinusButtonClick(currentChargenAbility, true) elseif cellNumber == 5 then createCharScreen:OnAbilityPlusMinusButtonClick(currentChargenAbility, false) end ticksPassed = 0 end end " rowheight 54 hidehighlight area 105 96 386 325 table "chargen.ability" var currentChargenAbility } label { area 105 421 166 54 text "TOTAL_ROLL_NORMAL" text style "normal" text align right center } label { area 292 421 50 54 text lua "chargen.totalRoll" text style "normal" text align center center } label { area 328 421 50 54 text lua "storedTotalRoll" text style "normal" text align center center text color "X" } label { area 375 421 105 54 text lua "chargen.extraAbilityPoints" text style "normal" text align center center } text { enabled "rgDragonEnabled == false" area 518 96 394 545 text lua "abilityOrGeneralHelp()" text style "normal" scrollbar 'rgdscrl1' } text { enabled "rgDragonEnabled" text lua "rgGetDragonFrame()" area 518 96 400 400 bam rgdragon scaleToClip frame lua "rgDragonFrame" } text { area 0 0 0 0 text lua "rgAutoroll()" } button { area 138 482 346 53 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgRerollButtonName()" text style "button" action " if rgMinimumRoll == 0 and rgMinimumStrModifier == 0 then createCharScreen:OnAbilityReRollButtonClick() else if rgIsRolling == 0 then rgIsRolling = 1 rgDragonEnabled = true else rgIsRolling = 0 rgDragonEnabled = false end end " } button { area 138 535 346 53 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "STORE_BUTTON" text style "button" action " storedTotalRoll = chargen.totalRoll chargen.ability[ 1 ].exceptional = exceptionalStrength chargen.ability[ 1 ].storedRoll = chargen.ability[ 1 ].roll chargen.ability[ 2 ].storedRoll = chargen.ability[ 2 ].roll chargen.ability[ 3 ].storedRoll = chargen.ability[ 3 ].roll chargen.ability[ 4 ].storedRoll = chargen.ability[ 4 ].roll chargen.ability[ 5 ].storedRoll = chargen.ability[ 5 ].roll chargen.ability[ 6 ].storedRoll = chargen.ability[ 6 ].roll createCharScreen:OnAbilityStoreButtonClick() " } button { area 138 588 346 53 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "RECALL_BUTTON" text style "button" clickable lua "storedTotalRoll > 0" action "createCharScreen:OnAbilityRecallButtonClick()" } button { on '8' action "createCharScreen:OnCheatyMcCheaterson()" } text { area 1066 100 200 48 text "RG_CG_MINROLL" text style "normal" --text upper } slider { area 1066 150 200 48 position "rgMinimumRoll" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 34 pad 5 0 5 0 action "" } text { area 1066 200 200 48 text lua "rgMinimumRollDesc()" text style "normal" text align center top } text { area 1066 250 200 48 text "RG_CG_MINSTRMOD" text style "normal" --text upper } slider { enabled "rgMinStrModEnabled()" area 1066 300 200 48 position "rgMinimumStrModifier" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 6 pad 5 0 5 0 action "" } text { enabled "rgMinStrModEnabled()" area 1066 350 200 48 text lua "rgMinimumStrDesc()" text style "normal" text align center top } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action "Infinity_PopMenu(); createCharScreen:OnCancelButtonClick()" } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action "Infinity_PopMenu(); createCharScreen:OnDoneButtonClick()" } } ` function proficiencyOrGeneralHelp() local prof = chargen.proficiency[currentChargenProficiency] local skill = chargen.thief_skill[currentChargenThiefSkill] if prof and prof.desc ~= -1 then return Infinity_FetchString(prof.desc) elseif skill and skill.desc ~= -1 then return Infinity_FetchString(skill.description) else if(chargen.levelingUp) then if(levelUpInfoToggle == 1) then return chargen.charInfo else return chargen.levelInfo end else return rgGetGameEngineString(24315,24315,9588,9588) end end end function getProficienciesTitle() if(chargen.levelingUp) then return getUiString("LEVEL_UP_TITLE") else return getUiString("SKILLS_LABEL") end end function isChargenProficienciesBackButtonClickable() return ((not chargen.levelingUp) and createCharScreen:GetCurrentStep() ~= const.STEP_DUALCLASS_PROFICIENCIES) end function rgGetProficiencyElementsArea() if chargen.levelingUp then Infinity_SetArea('proficiencyText',nil,nil,nil,486) else Infinity_SetArea('proficiencyText',nil,nil,nil,538) end if chargen.levelingUp and rgGameEngine == 2 then Infinity_SetArea('chargenProfBackButton',204,nil,nil,nil) Infinity_SetArea('chargenProfDoneButton',844,nil,nil,nil) else Infinity_SetArea('chargenProfBackButton',316,nil,nil,nil) Infinity_SetArea('chargenProfDoneButton',732,nil,nil,nil) end end ` menu { name 'CHARGEN_PROFICIENCIES' modal align center center ignoreesc onopen " currentChargenProficiency = nil; currentChargenThiefSkill = nil; ticksPassed = 0; ticksStarting = 0 rgGetProficiencyElementsArea() if rgGameEngine == 3 then for index = 1, rgIwdSkillPoints, 1 do createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[1].id, false) end end " label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "getProficienciesTitle()" text style 'rg_trajan' text color '$' align center center } label { area 146 92 320 44 text "PROF_SLOTS_LABEL" text style "button" --align left center } label { area 484 92 50 44 text lua "chargen.extraProficiencySlots" text style "button" } label { area 564 92 266 44 text "SKILLS_LABEL" text style "button" } label { area 830 92 50 44 text lua "chargen.extraSkillPoints" text style "button" } list { column { width 82 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenProficiency)" ScaleToClip } label { area 0 0 280 55 text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)" text style "normal" align right center } label { bam rgdstar area 284 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 4" } label { bam rgdstar area 302 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 3" } label { bam rgdstar area 320 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 2" } label { bam rgdstar area 338 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 1" } label { bam rgdstar area 356 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 0" } } column { width 9 label { area 0 5 44 44 bam rgdcpbt1 scaleToClip frame lua "getPlusFrame(2)" } } column { width 9 label { area 0 5 44 44 bam rgdcpbt2 scaleToClip frame lua "getMinusFrame(3)" } } action " currentChargenThiefSkill = nil if ticksStarting < 10 then if cellNumber == 2 and plusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true) elseif cellNumber == 3 and minusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false) end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " currentChargenThiefSkill = nil ticksStarting = ticksStarting + 1 if ticksStarting > 10 then ticksPassed = ticksPassed + 1 if ticksPassed > 7 then if cellNumber == 2 and plusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true) elseif cellNumber == 3 and minusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false) end ticksPassed = 0 end end " rowheight 54 hideHighlight area 92 148 472 494 table "chargen.proficiency" var currentChargenProficiency scrollbar 'rgdscrl1' } list { column { width 60 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenThiefSkill)" ScaleToClip } label { area 0 0 180 54 text lua "Infinity_FetchString(chargen.thief_skill[rowNumber].name)" text style "normal" text align right center } } column { width 10 label { area 0 0 40 54 text lua "chargen.thief_skill[rowNumber].value" text style "normal" text align left center } } column { width 15 label { area 10 5 44 44 bam rgdcpbt1 scaleToClip enabled "createCharScreen:IsThiefSkillPlusMinusButtonClickable()" frame lua "currentCellCheck(3)" } } column { width 15 label { area 0 5 44 44 bam rgdcpbt2 scaleToClip enabled "createCharScreen:IsThiefSkillPlusMinusButtonClickable()" frame lua "currentCellCheck(4)" } } action " currentChargenProficiency = nil if ticksStarting < 10 then if createCharScreen:IsThiefSkillPlusMinusButtonClickable() then if cellNumber == 3 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, true) elseif cellNumber == 4 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, false) end end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " currentChargenProficiency = nil if createCharScreen:IsThiefSkillPlusMinusButtonClickable() then ticksStarting = ticksStarting + 1 if ticksStarting > 10 then ticksPassed = ticksPassed + 1 if ticksPassed > 2 then if cellNumber == 3 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, true) elseif cellNumber == 4 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, false) end ticksPassed = 0 end end end " hidehighlight rowheight 54 area 564 148 358 494 table "chargen.thief_skill" var currentChargenThiefSkill scrollbar 'rgdscrl1' } text { name "proficiencyText" area 922 104 348 478 text lua "proficiencyOrGeneralHelp()" text style "normal_parchment" scrollbar 'rgdscrl1' } button { enabled "chargen.levelingUp" area 978 590 230 52 bam rgdwbut1 text "INFORMATION_BUTTON" text style "button" text color '5' scaleToClip toggle "levelUpInfoToggle" action " currentChargenProficiency = nil; currentChargenThiefSkill = nil " } button { bam rgdbutm1 sequence lua "RgUISkin" on escape area 244 662 320 70 ScaleToClip text style "button" text lua "t(reverseButtonPosition and ((chargen.levelingUp and createCharScreen:IsHighLevelAbilitiesButtonClickable()) and 'HIGH_LEVEL_ABILITIES_BUTTON' or 'DONE_BUTTON') or 'BACK_BUTTON')" clickable lua "reverseButtonPosition and ((chargen.levelingUp and createCharScreen:IsHighLevelAbilitiesButtonClickable()) or createCharScreen:IsDoneButtonClickable()) or true" action " if reverseButtonPosition then if chargen.levelingUp and createCharScreen:IsHighLevelAbilitiesButtonClickable() then createCharScreen:OnHighLevelAbilitiesButtonClick() elseif createCharScreen:IsDoneButtonClickable() then createCharScreen:OnDoneButtonClick() end else for k,v in pairs(chargen.proficiency) do while plusButtonClickable(k) do local points = chargen.extraProficiencySlots createCharScreen:OnProficiencyPlusMinusButtonClick(v.id, true) if points == chargen.extraProficiencySlots then break end end end for k,v in pairs(chargen.thief_skill) do while createCharScreen:IsThiefSkillPlusMinusButtonClickable() do local points = chargen.extraSkillPoints createCharScreen:OnThiefSkillPlusMinusButtonClick(v.id, true) if points == chargen.extraSkillPoints then break end end end createCharScreen:OnCancelButtonClick() end " } button { bam rgdbutm1 sequence lua "RgUISkin" on return area 602 662 320 70 ScaleToClip text style "button" text lua "t(reverseButtonPosition and 'BACK_BUTTON' or ((chargen.levelingUp and createCharScreen:IsHighLevelAbilitiesButtonClickable()) and 'HIGH_LEVEL_ABILITIES_BUTTON' or 'DONE_BUTTON'))" clickable lua "reverseButtonPosition and true or ((chargen.levelingUp and createCharScreen:IsHighLevelAbilitiesButtonClickable()) or createCharScreen:IsDoneButtonClickable())" action " if reverseButtonPosition then for k,v in pairs(chargen.proficiency) do while plusButtonClickable(k) do local points = chargen.extraProficiencySlots createCharScreen:OnProficiencyPlusMinusButtonClick(v.id, true) if points == chargen.extraProficiencySlots then break end end end for k,v in pairs(chargen.thief_skill) do while createCharScreen:IsThiefSkillPlusMinusButtonClickable() do local points = chargen.extraSkillPoints createCharScreen:OnThiefSkillPlusMinusButtonClick(v.id, true) if points == chargen.extraSkillPoints then break end end end createCharScreen:OnCancelButtonClick() else if chargen.levelingUp and createCharScreen:IsHighLevelAbilitiesButtonClickable() then createCharScreen:OnHighLevelAbilitiesButtonClick() elseif createCharScreen:IsDoneButtonClickable() then createCharScreen:OnDoneButtonClick() end end " } } menu { name 'CHARGEN_SKILLS' modal align center center ignoreesc onopen " currentChargenProficiency = nil; currentChargenThiefSkill = nil; ticksPassed = 0; ticksStarting = 0 rgIwdSkillPoints = chargen.extraSkillPoints - 0 for index = 1, rgIwdSkillPoints, 1 do createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[1].id, true) end createCharScreen:OnDoneButtonClick() " modal label { area 0 0 870 714 mosaic GUICGSKL } label { area 216 26 438 40 text 11983 text style "title" } label { area 402 424 106 30 text lua "chargen.extraSkillPoints" text style "label" text align center center } list { column { width 60 label { area 0 0 280 54 text lua "Infinity_FetchString(chargen.thief_skill[rowNumber].name)" text style "normal" text align right center } } column { width 10 label { area 0 0 40 54 text lua "chargen.thief_skill[rowNumber].value" text style "normal" text align center center } } column { width 20 label { area 50 6 45 42 bam GUIOSW enabled "createCharScreen:IsThiefSkillPlusMinusButtonClickable()" frame lua "currentCellCheck(3)" sequence 0 } } column { width 10 label { area 0 6 45 42 bam GUIOSW enabled "createCharScreen:IsThiefSkillPlusMinusButtonClickable()" frame lua "currentCellCheck(4)" sequence 1 } } action " currentChargenProficiency = nil if ticksStarting < 10 then if createCharScreen:IsThiefSkillPlusMinusButtonClickable() then if cellNumber == 3 then Infinity_PlaySound('GAM_09') createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, true) elseif cellNumber == 4 then Infinity_PlaySound('GAM_09') createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, false) end end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " currentChargenProficiency = nil if createCharScreen:IsThiefSkillPlusMinusButtonClickable() then ticksStarting = ticksStarting + 1 if ticksStarting > 10 then ticksPassed = ticksPassed + 1 if ticksPassed > 2 then if cellNumber == 3 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, true) elseif cellNumber == 4 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, false) end ticksPassed = 0 end end end " rowheight 47 area 36 80 486 338 hideHighlight table "chargen.thief_skill" var currentChargenThiefSkill scrollbar 'GUISCRC' } text { area 528 90 312 508 text lua "proficiencyOrGeneralHelp(17248)" text style "normal" scrollbar 'GUISCRC' } button { on escape area 198 654 232 44 bam GUIBUTMT sequenceonce lua "getRandomButtonSequence('GUIBUTMT')" text "BACK_BUTTON" text style "button" clickable lua "isChargenProficienciesBackButtonClickable()" action "createCharScreen:OnCancelButtonClick();" } button { on return area 440 654 234 46 bam GUIBUTMT sequenceonce lua "getRandomButtonSequence('GUIBUTMT')" text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action "createCharScreen:OnDoneButtonClick();" } } ` function rgGetLvlUpArea() local screenWidth, screenHeight = Infinity_GetScreenSize() local h = screenHeight * 1.777 local x = screenWidth - h local a = screenWidth - screenHeight local d = (screenWidth/2) local e = (screenHeight/2) local f = (screenHeight/2) - 384 local m = (screenWidth/2) - 682 if m > 0 then m = m / 2 end local n = (((screenWidth/2) - 682) / 2) -- 17 Infinity_SetArea('rgdlvlback1', x, 0, screenHeight, screenHeight) Infinity_SetArea('rgdlvlback2', x + a, 0, screenHeight, screenHeight) Infinity_SetArea('rglvldefbcg1', x, 0, screenHeight, screenHeight) Infinity_SetArea('rglvldefbcg2', x + a, 0, screenHeight, screenHeight) if rgIsIwdHlaEnabled == true then Infinity_SetArea("rgdlvlBackButt", d-480,screenHeight - 70,320,70 ) Infinity_SetArea("rgdlvlDoneButt", d+160,screenHeight - 70,320,70 ) Infinity_SetArea("rgdlvlHlaButt", d-160,screenHeight - 70,320,70 ) else Infinity_SetArea("rgdlvlBackButt", d-330,screenHeight - 70,320,70 ) Infinity_SetArea("rgdlvlDoneButt", d+30,screenHeight - 70,320,70 ) Infinity_SetArea("rgdlvlHlaButt", 0,0,0,0) end Infinity_SetArea("rgdlvlProfBack", m+14,f+52,472,586) Infinity_SetArea("rgdlvlProfButt", m,f,500,88) Infinity_SetArea("rgdlvlSkillButt", m,f+602,500,88) Infinity_SetArea("rgdlvlProfList", m+14,f+88,466,514) Infinity_SetArea("rgdlvlSkillList", m+14,f+88,466,514) Infinity_SetArea("rgdlvlInfoBack", d+n+315,f+52,355,586) Infinity_SetArea("rgdlvlInfo", d+n+327,f+88,336,514) Infinity_SetArea("rgdlvlInfoButt", d+n+303,f+602,379,88) Infinity_SetArea("rgdlvlInfoButt1", d+n+303,f,379,88) end function rgLvlUpTabFrame(tab) if rgLvlUpTabMode == tab then return 2 else return 0 end end rgIsIwdHlaEnabled = false ` menu { name 'LEVELUP_PROFICIENCIES' --modal align left top ignoreesc onopen " currentChargenProficiency = nil; currentChargenThiefSkill = nil; ticksPassed = 0; ticksStarting = 0; rgLvlUpTabMode = 0 rgGetLvlUpArea() Infinity_PopMenu('RIGHT_SIDEBAR') " label { area 0 0 1365 768 } label { name 'rglvldefbcg1' area 0 0 768 768 bam rgdbccg3 frame 0 scaleToClip } label { name 'rglvldefbcg2' area 597 0 768 768 bam rgdbccg3 frame 1 scaleToClip } label { name 'rgdlvlback1' area 0 0 768 768 bam lua "characters[currentID].portrait" sequence lua "rgGetTitleFrame()" frame 0 scaleToClip } label { name 'rgdlvlback2' area 597 0 768 768 bam lua "characters[currentID].portrait" sequence lua "rgGetTitleFrame()" frame 1 scaleToClip } label { name "rgdlvlInfoBack" area 998 56 355 586 bam rgdlvbox ScaleToClip } label { name "rgdlvlProfBack" area 14 52 472 586 bam rgdlvbox sequence lua "RgUISkin" scaleToClip } button { name "rgdlvlProfButt" area 0 0 500 88 text lua "rgString('PROF_SLOTS_LABEL') .. ': ' .. chargen.extraProficiencySlots" text style "button" bam rgdmbut2 sequence lua "RgUISkin" scaleToClip frame lua "rgLvlUpTabFrame(0)" action "rgLvlUpTabMode = 0" } button { name "rgdlvlSkillButt" area 0 602 500 88 text lua "rgString('SKILLS_LABEL') .. ': ' .. chargen.extraSkillPoints" text style "button" bam rgdmbut2 sequence lua "RgUISkin" frame lua "rgLvlUpTabFrame(1)" clickable lua "#chargen.thief_skill > 0" scaleToClip action "rgLvlUpTabMode = 1" } list { column { width 82 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenProficiency)" ScaleToClip } label { area 0 0 280 55 text lua "Infinity_FetchString(chargen.proficiency[rowNumber].name)" text style "normal" align right center } label { bam rgdstar area 284 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 4" } label { bam rgdstar area 302 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 3" } label { bam rgdstar area 320 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 2" } label { bam rgdstar area 338 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 1" } label { bam rgdstar area 356 19 16 16 scaleToClip enabled "chargen.proficiency[rowNumber].value > 0" } } column { width 9 label { area 0 5 44 44 bam rgdcpbt1 scaleToClip frame lua "getPlusFrame(2)" } } column { width 9 label { area 0 5 44 44 bam rgdcpbt2 scaleToClip frame lua "getMinusFrame(3)" } } name "rgdlvlProfList" enabled "rgLvlUpTabMode == 0" rowheight 54 hideHighlight area 14 88 466 514 table "chargen.proficiency" var currentChargenProficiency scrollbar 'rgdscrl1' action " currentChargenThiefSkill = nil if ticksStarting < 10 then if cellNumber == 2 and plusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true) elseif cellNumber == 3 and minusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false) end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " currentChargenThiefSkill = nil ticksStarting = ticksStarting + 1 if ticksStarting > 10 then ticksPassed = ticksPassed + 1 if ticksPassed > 7 then if cellNumber == 2 and plusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, true) elseif cellNumber == 3 and minusButtonClickable(currentChargenProficiency) then createCharScreen:OnProficiencyPlusMinusButtonClick(chargen.proficiency[currentChargenProficiency].id, false) end ticksPassed = 0 end end " } list { column { width 70 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenThiefSkill)" ScaleToClip } label { area 0 0 200 54 text lua "Infinity_FetchString(chargen.thief_skill[rowNumber].name)" text style "normal" text align right center } label { area 240 0 40 54 text lua "chargen.thief_skill[rowNumber].value" text style "normal" text align left center } } column { width 15 label { area 10 5 44 44 bam rgdcpbt1 scaleToClip enabled "createCharScreen:IsThiefSkillPlusMinusButtonClickable()" frame lua "currentCellCheck(2)" } } column { width 15 label { area 0 5 44 44 bam rgdcpbt2 scaleToClip enabled "createCharScreen:IsThiefSkillPlusMinusButtonClickable()" frame lua "currentCellCheck(3)" } } name "rgdlvlSkillList" enabled "rgLvlUpTabMode == 1" rowheight 54 hideHighlight area 14 88 472 514 table "chargen.thief_skill" var currentChargenThiefSkill scrollbar 'rgdscrl1' action " currentChargenProficiency = nil if ticksStarting < 10 then if createCharScreen:IsThiefSkillPlusMinusButtonClickable() then if cellNumber == 2 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, true) elseif cellNumber == 3 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, false) end end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " currentChargenProficiency = nil if createCharScreen:IsThiefSkillPlusMinusButtonClickable() then ticksStarting = ticksStarting + 1 if ticksStarting > 10 then ticksPassed = ticksPassed + 1 if ticksPassed > 2 then if cellNumber == 2 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, true) elseif cellNumber == 3 then createCharScreen:OnThiefSkillPlusMinusButtonClick(chargen.thief_skill[currentChargenThiefSkill].id, false) end ticksPassed = 0 end end end " } text { name "rgdlvlInfo" area 1010 88 336 514 text lua "proficiencyOrGeneralHelp()" text style "normal" scrollbar 'rgdscrl1' } button { name "rgdlvlInfoButt" enabled "chargen.levelingUp" area 986 602 379 88 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "INFORMATION_BUTTON" text style "button" toggle "levelUpInfoToggle" action " currentChargenProficiency = nil currentChargenThiefSkill = nil " } button { name "rgdlvlInfoButt1" enabled "chargen.levelingUp" area 986 0 379 88 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "characters[currentID].name .. ', ' .. characters[currentID].class" text style "button" action " currentChargenProficiency = nil currentChargenThiefSkill = nil " } button { name "rgdlvlBackButt" on escape area 390 698 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" clickable lua "isChargenProficienciesBackButtonClickable()" action "createCharScreen:OnCancelButtonClick();" } button { name "rgdlvlDoneButt" on return area 730 698 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " Infinity_PopMenu() createCharScreen:OnDoneButtonClick() " } button { name "rgdlvlHlaButt" enabled "rgIsIwdHlaEnabled" area 524 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "HIGH_LEVEL_ABILITIES_BUTTON" text style "button" toggle "levelUpInfoToggle" clickable lua "createCharScreen:IsHighLevelAbilitiesButtonClickable()" action " createCharScreen:OnHighLevelAbilitiesButtonClick() " } } ` function specialistFrame(num) if spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[num].key].specialist then return 3 end return 0 end function spellLearnOrUnlearnText() if currentChargenChooseMageSpell == nil or not chargen.choose_spell[currentChargenChooseMageSpell].enabled then return getUiString("BUTTON_LEARN") else return getUiString("BUTTON_UNLEARN") end end function spellLearnOrUnlearnClickable() spl = chargen.choose_spell[currentChargenChooseMageSpell] if chargen.extraSpells == 0 and spl ~= nil and spl.enabled == false or spl == nil or spl.known then return false else return true end end function chooseSpellOrGeneralHelp() local helpText = chargen.helpText spl = chargen.choose_spell[currentChargenChooseMageSpell] if spl == nil then return helpText end local desc = spellBook[chargen.currentSpellLevelChoice][spl.key].desc if currentChargenChooseMageSpell and desc ~= -1 then return Infinity_FetchString(desc) else return helpText end end function nextOrDone() if(createCharScreen:HasMoreMageLevels()) then return getUiString('NEXT_BUTTON') else return getUiString('DONE_BUTTON') end end function shouldShowSpecialistMessage() local ret = false if chargen.extraSpells == 0 and not createCharScreen:IsDoneButtonClickable() then ret = true end return ret end function rgChooseSpellsMenuOnOpen() if rgChooseSpellsMenuOnOpenOnce == 0 then if not CurrentlyInGame() then for k,v in pairs(chargen.choose_spell) do if v.enabled or v.known then createCharScreen:OnLearnMageSpellButtonClick(k) end end end if chargen.currentSpellLevelChoice == 1 then rgChooseSpellsMenuList1PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 2 then rgChooseSpellsMenuList2PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 3 then rgChooseSpellsMenuList3PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 4 then rgChooseSpellsMenuList4PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 5 then rgChooseSpellsMenuList5PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 6 then rgChooseSpellsMenuList6PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 7 then rgChooseSpellsMenuList7PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 8 then rgChooseSpellsMenuList8PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 9 then rgChooseSpellsMenuList9PlaceHolder = makeBlankTable(chargen.extraSpells) end if chargen.currentSpellLevelChoice < 2 then rgChargenSpellDescString = chargen.helpText end table.sort(chargen.choose_spell, sortBySpellName) currentChargenChooseMageSpell = nil if currentChargenKit == nil then currentChargenKit = 0 end local currentKitName = '' --gnome illusionists if currentChargenRace ~= 6 and chargen.kit and currentChargenKit > 0 then currentKitName = Infinity_FetchString(chargen.kit[currentChargenKit].name) else currentKitName = rgGetGameEngineString(25323,25323,2862,2862) end if currentKitName == rgGetGameEngineString(25319,25319,597,597) then setStringTokenLua('',getUiString('ABJURATION_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25320,25320,2179,2179) then setStringTokenLua('',getUiString('CONJURATION_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25321,25321,2846,2846) then setStringTokenLua('',getUiString('DIVINATION_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25322,25322,2861,2861) then setStringTokenLua('',getUiString('ENCHANTMENT_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25323,25323,2862,2862) then setStringTokenLua('',getUiString('ILLUSION_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25324,25324,3015,3015) then setStringTokenLua('',getUiString('EVOCATION_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25325,25325,12744,12744) then setStringTokenLua('',getUiString('NECROMANCY_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25326,25326,12745,12745) then setStringTokenLua('',getUiString('TRANSMUTATION_SCHOOL_TOKEN')) elseif currentKitName == rgGetGameEngineString(25327,25327,54893,34656) then setStringTokenLua('',rgGetGameEngineString(25327,25327,54893,34656)) end rgChooseSpellsMenuOnOpenOnce = 1 end end function rgChooseSpellsMenuSpellLevelFrame(lvl) if chargen.currentSpellLevelChoice == lvl then return 2 else return 0 end end function rgInsertChargenSpell(spell) if chargen.currentSpellLevelChoice == 1 then table.insert(rgChooseSpellsMenuList1, spell) elseif chargen.currentSpellLevelChoice == 2 then table.insert(rgChooseSpellsMenuList2, spell) elseif chargen.currentSpellLevelChoice == 3 then table.insert(rgChooseSpellsMenuList3, spell) elseif chargen.currentSpellLevelChoice == 4 then table.insert(rgChooseSpellsMenuList4, spell) elseif chargen.currentSpellLevelChoice == 5 then table.insert(rgChooseSpellsMenuList5, spell) elseif chargen.currentSpellLevelChoice == 6 then table.insert(rgChooseSpellsMenuList6, spell) elseif chargen.currentSpellLevelChoice == 7 then table.insert(rgChooseSpellsMenuList7, spell) elseif chargen.currentSpellLevelChoice == 8 then table.insert(rgChooseSpellsMenuList8, spell) elseif chargen.currentSpellLevelChoice == 9 then table.insert(rgChooseSpellsMenuList9, spell) end end function rgRemoveChargenSpell(current) if chargen.currentSpellLevelChoice == 1 then for k, v in ipairs(rgChooseSpellsMenuList1) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList1, k) break end end elseif chargen.currentSpellLevelChoice == 2 then for k, v in ipairs(rgChooseSpellsMenuList2) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList2, k) break end end elseif chargen.currentSpellLevelChoice == 3 then for k, v in ipairs(rgChooseSpellsMenuList3) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList3, k) break end end elseif chargen.currentSpellLevelChoice == 4 then for k, v in ipairs(rgChooseSpellsMenuList4) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList4, k) break end end elseif chargen.currentSpellLevelChoice == 5 then for k, v in ipairs(rgChooseSpellsMenuList5) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList5, k) break end end elseif chargen.currentSpellLevelChoice == 6 then for k, v in ipairs(rgChooseSpellsMenuList6) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList6, k) break end end elseif chargen.currentSpellLevelChoice == 7 then for k, v in ipairs(rgChooseSpellsMenuList7) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList7, k) break end end elseif chargen.currentSpellLevelChoice == 8 then for k, v in ipairs(rgChooseSpellsMenuList8) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList8, k) break end end elseif chargen.currentSpellLevelChoice == 9 then for k, v in ipairs(rgChooseSpellsMenuList9) do if v.key == chargen.choose_spell[current].key then table.remove(rgChooseSpellsMenuList9, k) break end end end end function rgChargenSpellReset() rgChooseSpellsMenuOnOpenOnce = 0 rgChooseSpellsMenuList1 = {} rgChooseSpellsMenuList2 = {} rgChooseSpellsMenuList3 = {} rgChooseSpellsMenuList4 = {} rgChooseSpellsMenuList5 = {} rgChooseSpellsMenuList6 = {} rgChooseSpellsMenuList7 = {} rgChooseSpellsMenuList8 = {} rgChooseSpellsMenuList9 = {} rgChooseSpellsMenuList1PlaceHolder = {} rgChooseSpellsMenuList2PlaceHolder = {} rgChooseSpellsMenuList3PlaceHolder = {} rgChooseSpellsMenuList4PlaceHolder = {} rgChooseSpellsMenuList5PlaceHolder = {} rgChooseSpellsMenuList6PlaceHolder = {} rgChooseSpellsMenuList7PlaceHolder = {} rgChooseSpellsMenuList8PlaceHolder = {} rgChooseSpellsMenuList9PlaceHolder = {} end rgChooseSpellsMenuOnOpenOnce = 0 rgChooseSpellsMenuList1 = {} rgChooseSpellsMenuList2 = {} rgChooseSpellsMenuList3 = {} rgChooseSpellsMenuList4 = {} rgChooseSpellsMenuList5 = {} rgChooseSpellsMenuList6 = {} rgChooseSpellsMenuList7 = {} rgChooseSpellsMenuList8 = {} rgChooseSpellsMenuList9 = {} rgChooseSpellsMenuList1PlaceHolder = {} rgChooseSpellsMenuList2PlaceHolder = {} rgChooseSpellsMenuList3PlaceHolder = {} rgChooseSpellsMenuList4PlaceHolder = {} rgChooseSpellsMenuList5PlaceHolder = {} rgChooseSpellsMenuList6PlaceHolder = {} rgChooseSpellsMenuList7PlaceHolder = {} rgChooseSpellsMenuList8PlaceHolder = {} rgChooseSpellsMenuList9PlaceHolder = {} ` menu { name 'CHARGEN_CHOOSE_SPELLS' modal align center center ignoreesc onOpen " " label { area 0 0 1 1 text lua "rgChooseSpellsMenuOnOpen()" } label { area 0 0 768 768 bam rgdbccgm frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccgm frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString(getUiString(chargen.title) .. ': ' .. getUiString('LEVEL_LABEL') .. ' ' .. chargen.currentSpellLevelChoice)" text style 'rg_trajan' text color '$' align center center } label { area 136 109 219 27 text lua "getUiString('SPELLS_REMAINING_NORMAL') .. ': ' .. chargen.extraSpells" text style "rg_trajan" text color '5' } label { enabled "rgChargenSpellDescString == nil" area 942 109 284 27 text lua "Infinity_FetchString(11945)" text style "rg_trajan" align right center text color '5' } list { column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 60 } label { enabled "rgIsNthNumber(rowNumber,3) and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 50 50 icon lua "spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil and chargen.choose_spell[rowNumber].enabled == false and chargen.choose_spell[rowNumber].known == false" area 0 0 -1 50 text lua "Infinity_FetchString(spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].name)" text style "rg_normal_spell" } label { enabled "rgIsNthNumber(rowNumber,3) and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil and (chargen.choose_spell[rowNumber].enabled or chargen.choose_spell[rowNumber].known)" area 0 0 -1 50 text lua "Infinity_FetchString(spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].name)" text style "rg_normal_spell" text color '$' --text shadow 1 } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber+1)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 50 50 icon lua "spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil and chargen.choose_spell[rowNumber+1].enabled == false and chargen.choose_spell[rowNumber+1].known == false" area 0 0 -1 50 text lua "Infinity_FetchString(spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].name)" text style "rg_normal_spell" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil and (chargen.choose_spell[rowNumber+1].enabled or chargen.choose_spell[rowNumber+1].known)" area 0 0 -1 50 text lua "Infinity_FetchString(spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].name)" text style "rg_normal_spell" text color '$' } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber+2)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 50 50 icon lua "spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil and chargen.choose_spell[rowNumber+2].enabled == false and chargen.choose_spell[rowNumber+2].known == false" area 0 0 -1 50 text lua "Infinity_FetchString(spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].name)" text style "rg_normal_spell" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil and (chargen.choose_spell[rowNumber+2].enabled or chargen.choose_spell[rowNumber+2].known)" area 0 0 -1 50 text lua "Infinity_FetchString(spellBook[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].name)" text style "rg_normal_spell" text color '$' } } area 136 156 530 483 rowheight dynamic scrollbar 'rgdscrl1' hidehighlight table "chargen.choose_spell" var currentChargenChooseMageSpell action " currentChargenChooseMageSpell = currentChargenChooseMageSpell + cellNumber - 1 if not chargen.choose_spell[currentChargenChooseMageSpell].known then createCharScreen:OnLearnMageSpellButtonClick(currentChargenChooseMageSpell) if (chargen.choose_spell[currentChargenChooseMageSpell].enabled or chargen.choose_spell[currentChargenChooseMageSpell].known) then for k, v in ipairs(chargen.choose_spell) do spell = deepcopy(v) if k == currentChargenChooseMageSpell then rgInsertChargenSpell(spell) end end else rgRemoveChargenSpell(currentChargenChooseMageSpell) end rgChargenSpellDescString = nil end " actionalt " currentChargenChooseMageSpell = currentChargenChooseMageSpell + cellNumber - 1 rgChargenSpellDescString = chooseSpellOrGeneralHelp() " } text { area 742 156 505 485 text lua "rgChargenSpellDescString" text style "normal_parchment" text point 12 scrollbar 'rgdscrl1' enabled "rgChargenSpellDescString ~= nil" } button { enabled "rgChargenSpellDescString ~= nil" area 1204 108 36 36 bam rgdwbut sequence 0 ScaleToClip align left top action "rgChargenSpellDescString = nil" } text { area 696 156 36 44 text lua "rgGetSpellLvlButtText('1')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' --text color '5' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(1)" enabled "chargen.currentSpellLevelChoice > 0" } text { area 696 210 36 44 text lua "rgGetSpellLvlButtText('2')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' --text color '5' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(2)" enabled "chargen.currentSpellLevelChoice > 1" } text { area 696 264 36 44 text lua "rgGetSpellLvlButtText('3')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(3)" enabled "chargen.currentSpellLevelChoice > 2" } text { area 696 318 36 44 text lua "rgGetSpellLvlButtText('4')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(4)" enabled "chargen.currentSpellLevelChoice > 3" } text { area 696 372 36 44 text lua "rgGetSpellLvlButtText('5')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(5)" enabled "chargen.currentSpellLevelChoice > 4" } text { area 696 426 36 44 text lua "rgGetSpellLvlButtText('6')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(6)" enabled "chargen.currentSpellLevelChoice > 5" } text { area 696 480 36 44 text lua "rgGetSpellLvlButtText('7')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(7)" enabled "chargen.currentSpellLevelChoice > 6" } text { area 696 534 36 44 text lua "rgGetSpellLvlButtText('8')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(8)" enabled "chargen.currentSpellLevelChoice > 7" } text { area 696 588 36 44 text lua "rgGetSpellLvlButtText('9')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(9)" enabled "chargen.currentSpellLevelChoice > 8" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 156 473 44 rowwidth 44 table "rgChooseSpellsMenuList1PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 210 473 44 rowwidth 44 table "rgChooseSpellsMenuList2PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 264 473 44 rowwidth 44 table "rgChooseSpellsMenuList3PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 318 473 44 rowwidth 44 table "rgChooseSpellsMenuList4PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 372 473 44 rowwidth 44 table "rgChooseSpellsMenuList5PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 426 473 44 rowwidth 44 table "rgChooseSpellsMenuList6PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 480 473 44 rowwidth 44 table "rgChooseSpellsMenuList7PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 534 473 44 rowwidth 44 table "rgChooseSpellsMenuList8PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 588 473 44 rowwidth 44 table "rgChooseSpellsMenuList9PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[1][rgChooseSpellsMenuList1[rowNumber].key].icon" } } area 753 156 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList1" var currentChargenChooseMageSpell1Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[2][rgChooseSpellsMenuList2[rowNumber].key].icon" } } area 753 210 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList2" var currentChargenChooseMageSpell2Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[3][rgChooseSpellsMenuList3[rowNumber].key].icon" } } area 753 264 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList3" var currentChargenChooseMageSpell3Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[4][rgChooseSpellsMenuList4[rowNumber].key].icon" } } area 753 318 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList4" var currentChargenChooseMageSpell4Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[5][rgChooseSpellsMenuList5[rowNumber].key].icon" } } area 753 372 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList5" var currentChargenChooseMageSpell5Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[6][rgChooseSpellsMenuList6[rowNumber].key].icon" } } area 753 426 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList6" var currentChargenChooseMageSpell6Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[7][rgChooseSpellsMenuList7[rowNumber].key].icon" } } area 753 480 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList7" var currentChargenChooseMageSpell7Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[8][rgChooseSpellsMenuList8[rowNumber].key].icon" } } area 753 534 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList8" var currentChargenChooseMageSpell8Selected } list { column { width 100 label { area 0 0 -1 -1 icon lua "spellBook[9][rgChooseSpellsMenuList9[rowNumber].key].icon" } } area 753 588 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgChooseSpellsMenuList9" var currentChargenChooseMageSpell9Selected } label { area 434 86 500 70 enabled "shouldShowSpecialistMessage()" text lua "getUiString('SPECIALIST_SPELL_REQ')" text style "normal" text align center center rectangle 0 } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" clickable lua "not chargen.levelingUp" action " rgChargenSpellReset() Infinity_PopMenu() createCharScreen:OnCancelButtonClick() " } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text lua "nextOrDone()" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " if createCharScreen:HasMoreMageLevels() then rgChooseSpellsMenuOnOpenOnce = 0 else rgChargenSpellReset() end createCharScreen:OnDoneButtonClick() " } } ` function mageMemorizeSpellOrGeneralHelp() spl = chargen.choose_spell[currentChargenMemorizeMageSpell] if spl == nil then return Infinity_FetchString(17253) end local desc = mageSpells[chargen.currentSpellLevelChoice][spl.key].desc if currentChargenMemorizeMageSpell and desc ~= -1 then return Infinity_FetchString(desc) else return Infinity_FetchString(17253) end end function rgInsertChargenMemorizedSpell(spell) if chargen.currentSpellLevelChoice == 1 then table.insert(rgMageMemorizedSpellsMenuList1, spell) elseif chargen.currentSpellLevelChoice == 2 then table.insert(rgMageMemorizedSpellsMenuList2, spell) elseif chargen.currentSpellLevelChoice == 3 then table.insert(rgMageMemorizedSpellsMenuList3, spell) elseif chargen.currentSpellLevelChoice == 4 then table.insert(rgMageMemorizedSpellsMenuList4, spell) elseif chargen.currentSpellLevelChoice == 5 then table.insert(rgMageMemorizedSpellsMenuList5, spell) elseif chargen.currentSpellLevelChoice == 6 then table.insert(rgMageMemorizedSpellsMenuList6, spell) elseif chargen.currentSpellLevelChoice == 7 then table.insert(rgMageMemorizedSpellsMenuList7, spell) elseif chargen.currentSpellLevelChoice == 8 then table.insert(rgMageMemorizedSpellsMenuList8, spell) elseif chargen.currentSpellLevelChoice == 9 then table.insert(rgMageMemorizedSpellsMenuList9, spell) end end function rgChargenMageMemorizedSpellReset() rgMageMemorizedSpellsMenuList1 = {} rgMageMemorizedSpellsMenuList2 = {} rgMageMemorizedSpellsMenuList3 = {} rgMageMemorizedSpellsMenuList4 = {} rgMageMemorizedSpellsMenuList5 = {} rgMageMemorizedSpellsMenuList6 = {} rgMageMemorizedSpellsMenuList7 = {} rgMageMemorizedSpellsMenuList8 = {} rgMageMemorizedSpellsMenuList9 = {} rgMageMemorizedSpellsMenuList1PlaceHolder = {} rgMageMemorizedSpellsMenuList2PlaceHolder = {} rgMageMemorizedSpellsMenuList3PlaceHolder = {} rgMageMemorizedSpellsMenuList4PlaceHolder = {} rgMageMemorizedSpellsMenuList5PlaceHolder = {} rgMageMemorizedSpellsMenuList6PlaceHolder = {} rgMageMemorizedSpellsMenuList7PlaceHolder = {} rgMageMemorizedSpellsMenuList8PlaceHolder = {} rgMageMemorizedSpellsMenuList9PlaceHolder = {} end function rgChargenMageUnmemorizeSpell(lvl,current,list) if chargen.currentSpellLevelChoice == lvl then for k, v in ipairs(chargen.choose_spell) do if v.key == list[current].key then createCharScreen:OnMemorizeMageSpellButtonClick(k, -1) break end end table.remove(list, current) end end rgMageMemorizedSpellsMenuList1 = {} rgMageMemorizedSpellsMenuList2 = {} rgMageMemorizedSpellsMenuList3 = {} rgMageMemorizedSpellsMenuList4 = {} rgMageMemorizedSpellsMenuList5 = {} rgMageMemorizedSpellsMenuList6 = {} rgMageMemorizedSpellsMenuList7 = {} rgMageMemorizedSpellsMenuList8 = {} rgMageMemorizedSpellsMenuList9 = {} rgMageMemorizedSpellsMenuList1PlaceHolder = {} rgMageMemorizedSpellsMenuList2PlaceHolder = {} rgMageMemorizedSpellsMenuList3PlaceHolder = {} rgMageMemorizedSpellsMenuList4PlaceHolder = {} rgMageMemorizedSpellsMenuList5PlaceHolder = {} rgMageMemorizedSpellsMenuList6PlaceHolder = {} rgMageMemorizedSpellsMenuList7PlaceHolder = {} rgMageMemorizedSpellsMenuList8PlaceHolder = {} rgMageMemorizedSpellsMenuList9PlaceHolder = {} ` menu { name 'CHARGEN_MEMORIZE_MAGE' modal align center center ignoreesc onOpen " table.sort(chargen.choose_spell, sortByMageSpellName) currentChargenMemorizeMageSpell = nil if chargen.currentSpellLevelChoice == 1 then rgMageMemorizedSpellsMenuList1PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 2 then rgMageMemorizedSpellsMenuList2PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 3 then rgMageMemorizedSpellsMenuList3PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 4 then rgMageMemorizedSpellsMenuList4PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 5 then rgMageMemorizedSpellsMenuList5PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 6 then rgMageMemorizedSpellsMenuList6PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 7 then rgMageMemorizedSpellsMenuList7PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 8 then rgMageMemorizedSpellsMenuList8PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 9 then rgMageMemorizedSpellsMenuList9PlaceHolder = makeBlankTable(chargen.extraSpells) end " label { area 0 0 768 768 bam rgdbccgm frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccgm frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString(chargen.title)" text style 'rg_trajan' text color '$' align center center } label { area 136 109 219 27 text lua "getUiString('SPELLS_REMAINING_NORMAL') .. ': ' .. chargen.extraSpells" text style "rg_trajan" text color '5' } label { enabled "rgChargenSpellDescString == nil" area 942 109 284 27 text "MEMORIZED_LABEL" text style "rg_trajan" align right center text color '5' } list { column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 60 } label { enabled "rgIsNthNumber(rowNumber,3) and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 50 50 icon lua "mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString(mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber+1)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 50 50 icon lua "mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString(mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber+2)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 50 50 icon lua "mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString(mageSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].name)" text style "rg_normal_spell" } } area 136 156 530 483 rowheight dynamic scrollbar 'rgdscrl1' hidehighlight table "chargen.choose_spell" var currentChargenMemorizeMageSpell action " currentChargenMemorizeMageSpell = currentChargenMemorizeMageSpell + cellNumber - 1 if chargen.extraSpells > 0 then for k, v in ipairs(chargen.choose_spell) do spell = deepcopy(v) if k == currentChargenMemorizeMageSpell then rgInsertChargenMemorizedSpell(spell) end end end createCharScreen:OnMemorizeMageSpellButtonClick(currentChargenMemorizeMageSpell, 1) rgChargenSpellDescString = nil " actionalt " currentChargenMemorizeMageSpell = currentChargenMemorizeMageSpell + cellNumber - 1 rgChargenSpellDescString = mageMemorizeSpellOrGeneralHelp() " } text { area 742 156 505 485 text lua "rgChargenSpellDescString" text style "normal_parchment" text point 12 scrollbar 'rgdscrl1' enabled "rgChargenSpellDescString ~= nil" } button { enabled "rgChargenSpellDescString ~= nil" area 1204 108 36 36 bam rgdwbut sequence 0 ScaleToClip align left top action "rgChargenSpellDescString = nil" } text { area 696 156 36 44 text lua "rgGetSpellLvlButtText('1')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(1)" enabled "chargen.currentSpellLevelChoice > 0" } text { area 696 210 36 44 text lua "rgGetSpellLvlButtText('2')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(2)" enabled "chargen.currentSpellLevelChoice > 1" } text { area 696 264 36 44 text lua "rgGetSpellLvlButtText('3')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(3)" enabled "chargen.currentSpellLevelChoice > 2" } text { area 696 318 36 44 text lua "rgGetSpellLvlButtText('4')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(4)" enabled "chargen.currentSpellLevelChoice > 3" } text { area 696 372 36 44 text lua "rgGetSpellLvlButtText('5')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(5)" enabled "chargen.currentSpellLevelChoice > 4" } text { area 696 426 36 44 text lua "rgGetSpellLvlButtText('6')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(6)" enabled "chargen.currentSpellLevelChoice > 5" } text { area 696 480 36 44 text lua "rgGetSpellLvlButtText('7')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(7)" enabled "chargen.currentSpellLevelChoice > 6" } text { area 696 534 36 44 text lua "rgGetSpellLvlButtText('8')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(8)" enabled "chargen.currentSpellLevelChoice > 7" } text { area 696 588 36 44 text lua "rgGetSpellLvlButtText('9')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(9)" enabled "chargen.currentSpellLevelChoice > 8" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 156 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList1PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 210 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList2PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 264 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList3PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 318 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList4PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 372 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList5PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 426 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList6PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 480 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList7PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 534 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList8PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 588 473 44 rowwidth 44 table "rgMageMemorizedSpellsMenuList9PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[1][rgMageMemorizedSpellsMenuList1[rowNumber].key].icon" } } area 753 156 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList1" var currentChargenMemorizeMageSpell1Selected action "rgChargenMageUnmemorizeSpell(1,currentChargenMemorizeMageSpell1Selected,rgMageMemorizedSpellsMenuList1)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[2][rgMageMemorizedSpellsMenuList2[rowNumber].key].icon" } } area 753 210 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList2" var currentChargenMemorizeMageSpell2Selected action "rgChargenMageUnmemorizeSpell(2,currentChargenMemorizeMageSpell2Selected,rgMageMemorizedSpellsMenuList2)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[3][rgMageMemorizedSpellsMenuList3[rowNumber].key].icon" } } area 753 264 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList3" var currentChargenMemorizeMageSpell3Selected action "rgChargenMageUnmemorizeSpell(3,currentChargenMemorizeMageSpell3Selected,rgMageMemorizedSpellsMenuList3)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[4][rgMageMemorizedSpellsMenuList4[rowNumber].key].icon" } } area 753 318 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList4" var currentChargenMemorizeMageSpell4Selected action "rgChargenMageUnmemorizeSpell(4,currentChargenMemorizeMageSpell4Selected,rgMageMemorizedSpellsMenuList4)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[5][rgMageMemorizedSpellsMenuList5[rowNumber].key].icon" } } area 753 372 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList5" var currentChargenMemorizeMageSpell5Selected action "rgChargenMageUnmemorizeSpell(5,currentChargenMemorizeMageSpell5Selected,rgMageMemorizedSpellsMenuList5)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[6][rgMageMemorizedSpellsMenuList6[rowNumber].key].icon" } } area 753 426 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList6" var currentChargenMemorizeMageSpell6Selected action "rgChargenMageUnmemorizeSpell(6,currentChargenMemorizeMageSpell6Selected,rgMageMemorizedSpellsMenuList6)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[7][rgMageMemorizedSpellsMenuList7[rowNumber].key].icon" } } area 753 480 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList7" var currentChargenMemorizeMageSpell7Selected action "rgChargenMageUnmemorizeSpell(7,currentChargenMemorizeMageSpell7Selected,rgMageMemorizedSpellsMenuList7)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[8][rgMageMemorizedSpellsMenuList8[rowNumber].key].icon" } } area 753 534 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList8" var currentChargenMemorizeMageSpell8Selected action "rgChargenMageUnmemorizeSpell(8,currentChargenMemorizeMageSpell8Selected,rgMageMemorizedSpellsMenuList8)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "mageSpells[9][rgMageMemorizedSpellsMenuList9[rowNumber].key].icon" } } area 753 588 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgMageMemorizedSpellsMenuList9" var currentChargenMemorizeMageSpell9Selected action "rgChargenMageUnmemorizeSpell(9,currentChargenMemorizeMageSpell9Selected,rgMageMemorizedSpellsMenuList9)"} label { area 434 86 500 70 enabled "shouldShowSpecialistMessage()" text lua "getUiString('SPECIALIST_SPELL_REQ')" text style "normal" text align center center rectangle 0 } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action " rgChargenMageMemorizedSpellReset() Infinity_PopMenu() createCharScreen:OnCancelButtonClick() " } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text lua "nextOrDone()" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " if createCharScreen:HasMoreMageLevels() then else rgChargenMageMemorizedSpellReset() end createCharScreen:OnDoneButtonClick() " } } ` function priestMemorizeSpellOrGeneralHelp() spl = chargen.choose_spell[currentChargenMemorizePriestSpell] if spl == nil then return Infinity_FetchString(17253) end local desc = priestSpells[chargen.currentSpellLevelChoice][spl.key].desc if currentChargenMemorizePriestSpell and desc ~= -1 then return Infinity_FetchString(desc) else return Infinity_FetchString(17253) end end function rgInsertChargenMemorizedPriestSpell(spell) if chargen.currentSpellLevelChoice == 1 then table.insert(rgPriestMemorizedSpellsMenuList1, spell) elseif chargen.currentSpellLevelChoice == 2 then table.insert(rgPriestMemorizedSpellsMenuList2, spell) elseif chargen.currentSpellLevelChoice == 3 then table.insert(rgPriestMemorizedSpellsMenuList3, spell) elseif chargen.currentSpellLevelChoice == 4 then table.insert(rgPriestMemorizedSpellsMenuList4, spell) elseif chargen.currentSpellLevelChoice == 5 then table.insert(rgPriestMemorizedSpellsMenuList5, spell) elseif chargen.currentSpellLevelChoice == 6 then table.insert(rgPriestMemorizedSpellsMenuList6, spell) elseif chargen.currentSpellLevelChoice == 7 then table.insert(rgPriestMemorizedSpellsMenuList7, spell) end end function rgChargenPriestMemorizedSpellReset() rgPriestMemorizedSpellsMenuList1 = {} rgPriestMemorizedSpellsMenuList2 = {} rgPriestMemorizedSpellsMenuList3 = {} rgPriestMemorizedSpellsMenuList4 = {} rgPriestMemorizedSpellsMenuList5 = {} rgPriestMemorizedSpellsMenuList6 = {} rgPriestMemorizedSpellsMenuList7 = {} rgPriestMemorizedSpellsMenuList1PlaceHolder = {} rgPriestMemorizedSpellsMenuList2PlaceHolder = {} rgPriestMemorizedSpellsMenuList3PlaceHolder = {} rgPriestMemorizedSpellsMenuList4PlaceHolder = {} rgPriestMemorizedSpellsMenuList5PlaceHolder = {} rgPriestMemorizedSpellsMenuList6PlaceHolder = {} rgPriestMemorizedSpellsMenuList7PlaceHolder = {} end function rgChargenPriestUnmemorizeSpell(lvl,current,list) if chargen.currentSpellLevelChoice == lvl then for k, v in ipairs(chargen.choose_spell) do if v.key == list[current].key then createCharScreen:OnMemorizePriestSpellButtonClick(k, -1) break end end table.remove(list, current) end end rgPriestMemorizedSpellsMenuList1 = {} rgPriestMemorizedSpellsMenuList2 = {} rgPriestMemorizedSpellsMenuList3 = {} rgPriestMemorizedSpellsMenuList4 = {} rgPriestMemorizedSpellsMenuList5 = {} rgPriestMemorizedSpellsMenuList6 = {} rgPriestMemorizedSpellsMenuList7 = {} rgPriestMemorizedSpellsMenuList1PlaceHolder = {} rgPriestMemorizedSpellsMenuList2PlaceHolder = {} rgPriestMemorizedSpellsMenuList3PlaceHolder = {} rgPriestMemorizedSpellsMenuList4PlaceHolder = {} rgPriestMemorizedSpellsMenuList5PlaceHolder = {} rgPriestMemorizedSpellsMenuList6PlaceHolder = {} rgPriestMemorizedSpellsMenuList7PlaceHolder = {} ` menu { name 'CHARGEN_MEMORIZE_PRIEST' modal align center center ignoreesc onOpen " table.sort(chargen.choose_spell, sortByPriestSpellName) currentChargenMemorizePriestSpell = nil if chargen.currentSpellLevelChoice == 1 then rgPriestMemorizedSpellsMenuList1PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 2 then rgPriestMemorizedSpellsMenuList2PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 3 then rgPriestMemorizedSpellsMenuList3PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 4 then rgPriestMemorizedSpellsMenuList4PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 5 then rgPriestMemorizedSpellsMenuList5PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 6 then rgPriestMemorizedSpellsMenuList6PlaceHolder = makeBlankTable(chargen.extraSpells) elseif chargen.currentSpellLevelChoice == 7 then rgPriestMemorizedSpellsMenuList7PlaceHolder = makeBlankTable(chargen.extraSpells) end " label { area 0 0 768 768 bam rgdbccgp frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccgp frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString(chargen.title)" text style 'rg_trajan' text color '$' align center center } label { area 136 109 219 27 text lua "getUiString('SPELLS_REMAINING_NORMAL') .. ': ' .. chargen.extraSpells" text style "rg_trajan" text color '5' } label { enabled "rgChargenSpellDescString == nil" area 942 109 284 27 text "MEMORIZED_LABEL" text style "rg_trajan" align right center text color '5' } list { column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 60 } label { enabled "rgIsNthNumber(rowNumber,3) and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 50 50 icon lua "priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString(priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber].key].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber+1)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 50 50 icon lua "priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+1] and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString(priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+1].key].name)" text style "rg_normal_spell" } } column { width 33 label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 -1 50 bam "rgdwspbc" align left top frame lua "specialistFrame(rowNumber+2)" ScaleToClip } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 50 50 icon lua "priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon" } label { enabled "rgIsNthNumber(rowNumber,3) and chargen.choose_spell[rowNumber+2] and priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].icon ~= nil" area 0 0 -1 50 text lua "Infinity_FetchString(priestSpells[chargen.currentSpellLevelChoice][chargen.choose_spell[rowNumber+2].key].name)" text style "rg_normal_spell" } } area 136 156 530 483 rowheight dynamic scrollbar 'rgdscrl1' hidehighlight table "chargen.choose_spell" var currentChargenMemorizePriestSpell action " currentChargenMemorizePriestSpell = currentChargenMemorizePriestSpell + cellNumber - 1 if chargen.extraSpells > 0 then for k, v in ipairs(chargen.choose_spell) do spell = deepcopy(v) if k == currentChargenMemorizePriestSpell then rgInsertChargenMemorizedPriestSpell(spell) end end end createCharScreen:OnMemorizePriestSpellButtonClick(currentChargenMemorizePriestSpell, 1) rgChargenSpellDescString = nil " actionalt " currentChargenMemorizePriestSpell = currentChargenMemorizePriestSpell + cellNumber - 1 rgChargenSpellDescString = priestMemorizeSpellOrGeneralHelp() " } text { area 742 156 505 485 text lua "rgChargenSpellDescString" text style "normal_parchment" text point 12 scrollbar 'rgdscrl1' enabled "rgChargenSpellDescString ~= nil" } button { enabled "rgChargenSpellDescString ~= nil" area 1204 108 36 36 bam rgdwbut sequence 0 ScaleToClip align left top action "rgChargenSpellDescString = nil" } text { area 696 156 36 44 text lua "rgGetSpellLvlButtText('1')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(1)" enabled "chargen.currentSpellLevelChoice > 0" } text { area 696 210 36 44 text lua "rgGetSpellLvlButtText('2')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(2)" enabled "chargen.currentSpellLevelChoice > 1" } text { area 696 264 36 44 text lua "rgGetSpellLvlButtText('3')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(3)" enabled "chargen.currentSpellLevelChoice > 2" } text { area 696 318 36 44 text lua "rgGetSpellLvlButtText('4')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(4)" enabled "chargen.currentSpellLevelChoice > 3" } text { area 696 372 36 44 text lua "rgGetSpellLvlButtText('5')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(5)" enabled "chargen.currentSpellLevelChoice > 4" } text { area 696 426 36 44 text lua "rgGetSpellLvlButtText('6')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(6)" enabled "chargen.currentSpellLevelChoice > 5" } text { area 696 480 36 44 text lua "rgGetSpellLvlButtText('7')" bam lua "rgGetSpellLvlButtBam()" opacity lua "rgGetSpellLvlButtOpacity()" text style 'rg_trajan' text point 14 ScaleToClip align left top text align center center frame lua "rgChooseSpellsMenuSpellLevelFrame(7)" enabled "chargen.currentSpellLevelChoice > 6" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 156 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList1PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 210 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList2PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 264 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList3PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 318 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList4PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 372 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList5PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 426 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList6PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 bam "rgdwspb3" align left top ScaleToClip } } enabled "rgChargenSpellDescString == nil" area 753 480 473 44 rowwidth 44 table "rgPriestMemorizedSpellsMenuList7PlaceHolder" } list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[1][rgPriestMemorizedSpellsMenuList1[rowNumber].key].icon" } } area 753 156 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList1" var currentChargenMemorizePriestSpell1Selected action "rgChargenPriestUnmemorizeSpell(1,currentChargenMemorizePriestSpell1Selected,rgPriestMemorizedSpellsMenuList1)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[2][rgPriestMemorizedSpellsMenuList2[rowNumber].key].icon" } } area 753 210 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList2" var currentChargenMemorizePriestSpell2Selected action "rgChargenPriestUnmemorizeSpell(2,currentChargenMemorizePriestSpell2Selected,rgPriestMemorizedSpellsMenuList2)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[3][rgPriestMemorizedSpellsMenuList3[rowNumber].key].icon" } } area 753 264 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList3" var currentChargenMemorizePriestSpell3Selected action "rgChargenPriestUnmemorizeSpell(3,currentChargenMemorizePriestSpell3Selected,rgPriestMemorizedSpellsMenuList3)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[4][rgPriestMemorizedSpellsMenuList4[rowNumber].key].icon" } } area 753 318 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList4" var currentChargenMemorizePriestSpell4Selected action "rgChargenPriestUnmemorizeSpell(4,currentChargenMemorizePriestSpell4Selected,rgPriestMemorizedSpellsMenuList4)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[5][rgPriestMemorizedSpellsMenuList5[rowNumber].key].icon" } } area 753 372 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList5" var currentChargenMemorizePriestSpell5Selected action "rgChargenPriestUnmemorizeSpell(5,currentChargenMemorizePriestSpell5Selected,rgPriestMemorizedSpellsMenuList5)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[6][rgPriestMemorizedSpellsMenuList6[rowNumber].key].icon" } } area 753 426 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList6" var currentChargenMemorizePriestSpell6Selected action "rgChargenPriestUnmemorizeSpell(6,currentChargenMemorizePriestSpell6Selected,rgPriestMemorizedSpellsMenuList6)"} list { column { width 100 label { area 0 0 -1 -1 icon lua "priestSpells[7][rgPriestMemorizedSpellsMenuList7[rowNumber].key].icon" } } area 753 480 473 44 enabled "rgChargenSpellDescString == nil" rowwidth 44 table "rgPriestMemorizedSpellsMenuList7" var currentChargenMemorizePriestSpell7Selected action "rgChargenPriestUnmemorizeSpell(7,currentChargenMemorizePriestSpell7Selected,rgPriestMemorizedSpellsMenuList7)"} button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action " rgChargenPriestMemorizedSpellReset() Infinity_PopMenu() createCharScreen:OnCancelButtonClick() " } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text lua "nextOrDone()" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " if createCharScreen:HasMoreMageLevels() then else rgChargenPriestMemorizedSpellReset() end createCharScreen:OnDoneButtonClick() " } } ` currentChargenCustomSound = 0 rgCustomSound = 0 function rgGetSoundListHighlight(row,var) if(row == var) then return 1 else return 0 end end ` menu { name 'CHARGEN_CUSTOMSOUNDS' modal align center center ignoreesc onOpen " Infinity_UpdateLuaStats() SLIDER_color_hair = characters[id].colors.hair SLIDER_color_skin = characters[id].colors.skin SLIDER_color_major = characters[id].colors.major SLIDER_color_minor = characters[id].colors.minor SLIDER_color_hair_start = SLIDER_color_hair SLIDER_color_skin_start = SLIDER_color_skin SLIDER_color_major_start = SLIDER_color_major SLIDER_color_minor_start = SLIDER_color_minor --rgCustomSound = 1 --currentChargenCustomSound = 1 currentChargenCustomSound = rgCustomSound prepareSounds(chargen.customSound) " onClose " if(SLIDER_color_hair_start ~= -1) then Infinity_SetHairColor(SLIDER_color_hair_start) end if(SLIDER_color_skin_start ~= -1) then Infinity_SetSkinColor(SLIDER_color_skin_start) end if(SLIDER_color_major_start ~= -1) then Infinity_SetMajorColor(SLIDER_color_major_start) end if(SLIDER_color_minor_start ~= -1) then Infinity_SetMinorColor(SLIDER_color_minor_start) end " label { area 0 0 768 768 bam lua "rgGetAppearanceBackground()" frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam lua "rgGetAppearanceBackground()" frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString('APPEARANCE_LABEL')" text style 'rg_trajan' text color '$' align center center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSoundListHighlight(rowNumber, currentChargenCustomSound)" ScaleToClip text lua "getSoundStringRef(rowNumber, chargen.customSound)" text style "normal_parchment" pad 8 0 0 0 } } area 926 146 338 440 hideHighlight enabled "e:GetActiveEngine() == createCharScreen" rowheight 30 table "chargen.customSound" var "currentChargenCustomSound" scrollbar 'rgdscrl1' action " rgCustomSound = currentChargenCustomSound createCharScreen:OnSoundItemSelect(chargen.customSound[currentChargenCustomSound].index-1) " } label { enabled "e:GetActiveEngine() == createCharScreen" area 926 108 318 38 text "SOUND_TITLE" text style 'normal_parchment' text align center top text upper } button { enabled "e:GetActiveEngine() == createCharScreen" area 978 590 230 52 bam rgdwbut1 text "PLAY_SOUND_BUTTON" text style "button" text color '5' scaleToClip action "createCharScreen:OnPlayButtonClick()" } button { area 378 140 114 160 paperdoll 0 } button { area 496 140 114 160 paperdoll 1 } label { enabled "characters[id].PC == 1" area 854 332 42 42 colordisplay 6 } label { enabled "characters[id].PC == 1" area 854 408 42 42 colordisplay 3 } label { area 854 524 42 42 colordisplay 2 } label { area 854 598 42 42 colordisplay 1 } label { area 100 100 792 28 text "COLOR_CHOICES_TITLE" text style "button" text point 14 } label { enabled "characters[id].PC == 1" area 100 300 792 30 text "HAIR_LABEL" text style "normal" } slider { palette 6 enabled "characters[id].PC == 1" area 100 330 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_hair" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(6)" action " Infinity_SetHairColor(SLIDER_color_hair) " } label { enabled "characters[id].PC == 1" area 100 374 792 32 text "SKIN_LABEL" text style "normal" } slider { palette 3 enabled "characters[id].PC == 1" area 100 406 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_skin" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(3)" action " Infinity_SetSkinColor(SLIDER_color_skin) " } label { area 100 462 792 28 text "CLOTHING_LABEL" text style "button" text point 14 } label { area 100 490 792 32 text "MAJOR_LABEL" text style "normal" } slider { palette 2 area 100 522 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_major" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(2)" action " Infinity_SetMajorColor(SLIDER_color_major) " } label { area 100 566 792 32 text "MINOR_LABEL" align center center text style "normal" } slider { palette 1 area 100 598 754 44 bam 'RGDSLDRS' scaleToClip position "SLIDER_color_minor" sequence lua "RgUISkin" frame 1 settings lua "game:GetPaletteSize(1)" action " Infinity_SetMinorColor(SLIDER_color_minor) " } button { on escape area 316 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "CANCEL_BUTTON" text style "button" action " rgCharSoundCancel = 1 Infinity_PopMenu(); createCharScreen:OnCancelButtonClick() " } button { on return area 732 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" action " --save settings SLIDER_color_hair_start = SLIDER_color_hair SLIDER_color_skin_start = SLIDER_color_skin SLIDER_color_major_start = SLIDER_color_major SLIDER_color_minor_start = SLIDER_color_minor if (e:GetActiveEngine() == createCharScreen) then createCharScreen:OnDoneButtonClick() end Infinity_PopMenu('CHARACTER_COLOR',0,0) " } } ` function hatedRaceOrGeneralHelp() race = chargen.hatedRace[currentChargenHatedRace] if race then return Infinity_FetchString(race.desc) else return Infinity_FetchString(17256) end end ` menu { name 'CHARGEN_HATEDRACE' modal align center center ignoreesc label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString('SKILLS_LABEL')" text style 'rg_trajan' text color '$' align center center } label { area 146 92 320 44 text "HATED_RACE_TITLE" text style "button" --align left center } list { column { width 100 label { area 0 0 340 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentChargenHatedRace)" ScaleToClip } label { area 0 0 340 -1 text lua "Infinity_FetchString(chargen.hatedRace[rowNumber].name)" text style "normal" text align left center pad 8 0 0 0 } } action " if chargen.hatedRace[currentChargenHatedRace] then createCharScreen:OnRacialEnemySelectButtonClick(chargen.hatedRace[currentChargenHatedRace].id) end " rowheight 44 hideHighlight area 104 148 790 496 table "chargen.hatedRace" var currentChargenHatedRace scrollbar 'rgdscrl1' } text { area 922 108 340 526 text lua "hatedRaceOrGeneralHelp()" text style "normal_parchment" scrollbar 'rgdscrl1' } button { on escape area 316 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action "Infinity_PopMenu(); createCharScreen:OnCancelButtonClick()" } button { on return area 732 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action "Infinity_PopMenu(); createCharScreen:OnDoneButtonClick()" } } ` charNameEdit = "" ` menu { name 'CHARGEN_NAME' modal align center center ignoreesc onopen " if chargen.name then charNameEdit = chargen.name else charNameEdit = '' end Infinity_FocusTextEdit('charNameEditArea') " button { on escape area 235 150 400 75 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text "BACK_BUTTON" text style "button" action "Infinity_PopMenu(); createCharScreen:OnCancelButtonClick()" } button { on return area 235 75 400 75 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " Infinity_PopMenu(); createCharScreen:OnDoneButtonClick(); if rgGameEngine ~= 3 then createCharScreen:AcceptCharacter(-1) end " } label { area 0 0 300 300 bam rgdpopup sequence lua "RgUISkin" ScaleToClip } label { area 50 70 200 50 text "ENTER_NAME_LABEL" text style "button" text color B } label { area 40 128 220 44 fill 112 111 111 64 } edit { name "charNameEditArea" area 46 132 208 40 var charNameEdit text style "normal" maxlines 1 maxchars 20 } button { area 110 186 80 80 bam 'rgdcgen3' sequence lua "RgUISkin" scaleToClip action " if toggleMale == 1 then charNameEdit = rgMaleNames[math.random(1, 98)] elseif toggleFemale == 1 then charNameEdit = rgFemaleNames[math.random(1, 100)] end " } } ` createBioEdit = "" ` menu { name 'CHARGEN_BIO' modal align center center ignoreesc onopen " generateBioText() if bioRace == '' then createBioEdit = bioClass else createBioEdit = bioClass .. '\n\n' .. bioRace end " label { area 0 0 768 768 bam rgdbccg1 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg1 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 480 32 405 52 text lua "rgString('BIOGRAPHY_TITLE')" text style 'rg_trajan' text color '$' align center center } label { area 282 106 800 530 fill 112 111 111 64 } edit { name "createBioEditArea" area 290 114 784 514 var createBioEdit scrollbar 'rgdscrl1' text style "edit" } button { on escape area 200 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "BACK_BUTTON" text style "button" action "createCharScreen:OnCancelButtonClick()" } button { on return area 858 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" action "createCharScreen:OnDoneButtonClick()" } button { area 524 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "CLEAR_BUTTON" text style "button" toggle "levelUpInfoToggle" action "createBioEdit = ''" } } ` list_GUICG_20_2_idx = 0 function NextOrDone() if createCharScreen:GetImportState() == 1 then return getUiString("NEXT_BUTTON") else return getUiString("DONE_BUTTON") end end ` menu { name 'CHARGEN_IMPORT' modal align center center ignoreesc onOpen " list_GUICG_20_2_idx = 0 " label { area 0 0 768 768 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, list_GUICG_20_2_idx)" ScaleToClip } label { area 10 0 -1 -1 text lua "list_GUICG_20_2[rowNumber]" text style "normal" pad 8 0 0 0 } } area 96 96 252 498 rowheight 34 hideHighlight table "list_GUICG_20_2" var "list_GUICG_20_2_idx" scrollbar 'rgdscrl1' action " Infinity_OnCharacterImportItemSelect(list_GUICG_20_2_idx - 1) " } text { area 364 96 300 490 text 10963 text style normal scrollbar 'rgdscrl1' } button { on escape area 152 670 222 50 bam rgdbuts1 scaleToClip sequence lua "RgUISkin" text "BACK_BUTTON" text style "button" action "Infinity_PopMenu('CHARGEN_IMPORT'); createCharScreen:OnCancelButtonClick()" } button { on return area 394 670 222 50 bam rgdbuts1 scaleToClip text lua "NextOrDone()" sequence lua "RgUISkin" text style "button" clickable lua "list_GUICG_20_2_idx ~= 0" action "Infinity_PopMenu('CHARGEN_IMPORT'); createCharScreen:OnDoneButtonClick()" } } ` chargenExportCharacterEdit = "" list_GUICG_21_2_idx = 0 ` menu { name 'CHARGEN_EXPORT' modal align center center ignoreesc onopen "chargenExportListId = 0" label { area 0 0 864 710 mosaic 'GUIPOP46' } list { column { width 100 label { area 0 0 -1 -1 text lua "list_GUICG_21_2[rowNumber]" text style "list" pad 8 0 0 0 } } area 42 100 312 282 rowheight 18 table "list_GUICG_21_2" var "chargenExportListId" scrollbar 'rgdscrl1' action " createCharScreen:OnCharacterExportItemSelect(chargenExportListId - 1) " } text { area 362 100 466 498 text 24461 text style "normal" } label { area 42 382 312 23 text "EXPORT_FILENAME_LABEL" text style "label" text color 3 } label { area 42 405 312 51 rectangle 0 } edit { name "chargenExportCharacterEditArea" area 48 416 298 30 var chargenExportCharacterEdit text style "edit" maxlines 1 fill 112 111 111 64 } button { on escape area 196 650 230 40 bam GUIBUTMT text "BACK_BUTTON" text style "button" action "Infinity_PopMenu('CHARGEN_EXPORT'); createCharScreen:OnCancelButtonClick()" } button { on return area 438 650 230 40 bam GUIBUTMT text "DONE_BUTTON" text style "button" action "Infinity_PopMenu('CHARGEN_EXPORT'); createCharScreen:OnDoneButtonClick()" } } menu { name 'CHARGEN_DUALCLASS' align center center ignoreesc label { area 0 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 0 } label { area 597 0 768 768 bam 'rgdbcres' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('DUALCLASS_TITLE')" text style 'rg_trajan' text color '$' align center center } label { area 102 102 223 344 bam rgdport7 sequence lua "RgUISkin" scaleToClip } button { area 108 108 210 331 bitmap lua "characters[currentID].portrait" } label { area 102 102 223 344 bam rgdbcrep scaleToClip } button { area 102 504 222 50 text "CLASS_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_CLASS" action " createCharScreen:OnMenuButtonClick() " } button { area 102 558 222 50 text "SKILLS_BUTTON" text style "button" bam rgdbuts3 sequence lua "RgUISkin" ScaleToClip clickable lua "createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_PROFICIENCIES" action " createCharScreen:OnMenuButtonClick() " } label { area 102 454 222 42 text lua "characters[currentID].class" text style "normal" text align center center } text { area 370 102 896 546 text 10811 --dual class info text style "normal" scrollbar 'rgdscrl1' } button { area 370 660 448 70 bam rgdmbut2 clickable false ScaleToClip sequence lua "RgUISkin" pad 10 8 10 8 text lua "rgString('BACK_BUTTON')" text style "button" action " createCharScreen:OnCancelButtonClick() " } button { area 818 660 448 70 clickable lua "createCharScreen:GetCurrentStep() == const.STEP_DUALCLASS_DONE" bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" text style "button" action " createCharScreen:OnDoneButtonClick() " } } ` difficulties = { {icon = "COLRSPRY", name = "DIFFICULTY_LABEL_STORYMODE", description = "DIFFICULTY_DESCRIPTION_STORYMODE"}, {icon = "CONTSHLF", name = "DIFFICULTY_LABEL_EASY", description = "DIFFICULTY_DESCRIPTION_EASY"}, {icon = "CONTSACK", name = "DIFFICULTY_LABEL_NORMAL", description = "DIFFICULTY_DESCRIPTION_NORMAL"}, {icon = "CONTGRND", name = "DIFFICULTY_LABEL_CORERULES", description = "DIFFICULTY_DESCRIPTION_CORERULES"}, {icon = "CONTBODY", name = "DIFFICULTY_LABEL_HARD", description = "DIFFICULTY_DESCRIPTION_HARD"}, {icon = "CONTSKL1", name = "DIFFICULTY_LABEL_INSANE", description = "DIFFICULTY_DESCRIPTION_INSANE"}, {icon = "CONTSKL2", name = "DIFFICULTY_LABEL_LEGACYOFBHAAL", description = "DIFFICULTY_DESCRIPTION_LEGACYOFBHAAL"}, } fromSinglePlayer = false fromMultiPlayer = false function WhoYouGonnaCall() fromSinglePlayer = (createCharScreen:GetEngineState() == 1 or createCharScreen:GetEngineState() == 7) and multiplayerScreen:GetEngineState() ~= 1 end ` menu { name 'CHARGEN_DIFFICULTY' modal align center center ignoreesc onopen " currentDifficulty = 3 WhoYouGonnaCall() " label { area 0 0 768 768 bam rgdbccg1 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg1 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 146 36 1074 44 text "DIFFICULTY_TITLE" text style "button" } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentDifficulty)" ScaleToClip } label { area 20 5 60 60 bam "GUIDIFFS" frame lua "rowNumber-1" align center center } label { area 100 0 200 -1 text lua "getUiString( difficulties[rowNumber].name )" text style "normal" text align center center text color B } label { area 320 0 798 -1 text lua "getUiString( difficulties[rowNumber].description )" text style "normal" text point 8 text align left center text color B } } hideHighlight area 100 106 1165 494 rowheight 70 table "difficulties" var "currentDifficulty" scrollbar 'rgdscrl1' action " " } button { on escape area 316 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text 15416 text style "button" action " Infinity_PopMenu() if(createCharScreen:GetEngineState() == 7) then --If we're in import character mode, go back to the import screen. e:SelectEngine(startEngine) Infinity_PopMenu() startEngine:OnImportCharacterButtonClick() end if Infinity_GetCurrentScreenName() == 'CHARGEN' then createCharScreen:OnMainBackButtonClick() end " } button { area 732 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getUiString('VENTURE_FORTH')" text style "button" enabled "fromSinglePlayer" action " Infinity_PopMenu() createCharScreen:AcceptCharacter(currentDifficulty) " } button { area 732 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text 11973 text style "button" enabled "fromMultiPlayer" action " Infinity_PopMenu() Infinity_PopMenu() Infinity_PopMenu() Infinity_PopMenu() if connectionLocalNetworkGame == 1 then connectionIsHosting = true chooseNetworkProtocol(2) end fromMultiPlayer = false mulitplayerPreexistingDifficulty = currentDifficulty connectionScreen:OnNewGameButtonClick() " } } ` currentHLASelection = nil function chargenHLADescription() if currentHLASelection == nil then return rgGetGameEngineString(32711,32711,63817,34713) else return Infinity_FetchString(chargen.HLAs[currentHLASelection].description) end end function chargenHLAPlusMinusFrame(cell, rownumber) if cell == 3 then if chargen.HLAs[rownumber].canAdd then return currentCellCheck(cell) else return 3 end elseif cell == 4 then if chargen.HLAs[rownumber].canSubtract then return currentCellCheck(cell) else return 3 end end end ` menu { name 'CHARGEN_HIGH_LEVEL_ABILITIES' align center center ignoreesc modal onOpen " currentHLASelection = nil " label { area 0 0 768 768 bam rgdbccg1 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg1 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 664 100 592 552 bam RGDSTBC1 sequence lua "RgUISkin" ScaleToClip } label { area 146 36 1074 44 text "HIGH_LEVEL_ABILITIES_TITLE" text style 'button' } label { area 100 100 526 52 text lua "chargen.numHLAs" text style "rg_trajan" align center center } text { area 684 120 552 512 text lua "chargenHLADescription()" text style "normal_parchment" scrollbar 'rgdscrl1' } list { column { width 80 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentHLASelection)" ScaleToClip } label { area 0 0 52 52 bam "RGDSLOT" sequence lua "RgUISkin" scaleToClip icon lua "chargen.HLAs[rowNumber].icon" glow lua "chargen.HLAs[rowNumber].count > 0" count lua "chargen.HLAs[rowNumber].count" } label { area 60 0 -1 -1 text lua "Infinity_FetchString(chargen.HLAs[rowNumber].name)" text style "normal" align left center } } column { width 10 label { area 0 4 44 44 bam rgdcpbt1 scaleToClip frame lua "chargenHLAPlusMinusFrame(3, rowNumber)" } } column { width 10 label { area 0 4 44 44 bam rgdcpbt2 scaleToClip frame lua "chargenHLAPlusMinusFrame(4, rowNumber)" } } rowheight 52 hideHighlight area 100 168 526 484 table "chargen.HLAs" var currentHLASelection scrollbar 'rgdscrl1' action " print(chargen.HLAs[currentHLASelection].count) if cellNumber == 2 and chargenHLAPlusMinusFrame(3, currentHLASelection) ~= 3 then createCharScreen:OnHLAButtonClick(currentHLASelection, 1) elseif cellNumber == 3 and chargenHLAPlusMinusFrame(4, currentHLASelection) ~= 3 then createCharScreen:OnHLAButtonClick(currentHLASelection, -1) end cellNumber = nil " } button { area 524 661 320 70 bam rgdbutm1 ScaleToClip sequence lua "RgUISkin" text "DONE_BUTTON" text style "button" clickable lua "createCharScreen:IsDoneButtonClickable()" action " createCharScreen:OnDoneButtonClick() " } } ` TEXT_popup_big = 0 ` menu { name 'POPUP_BIG' align center center modal label { area 0 0 864 710 mosaic GUIPOPF } text { area 40 98 788 496 text lua "Infinity_FetchString(TEXT_popup_big)" text style "label" text align left top scrollbar 'rgdscrl1' } button { area 317 634 230 40 bam GUIBUTMT text "DONE_BUTTON" text style "button" action " Infinity_PopMenu() " } } ` list_GUIMOVIE_0_0_idx = 0 ` menu { name 'MOVIES' align center center button { on escape action " --Return to world screen on escape e:SelectEngine(optionsScreen) " } text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('MOVIES_TITLE')" text style 'rg_trajan' align center center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, list_GUIMOVIE_0_0_idx)" ScaleToClip } label { area 10 0 -1 -1 text lua "list_GUIMOVIE_0_0[rowNumber].description" text style "normal" pad 8 2 0 0 text align left center } } area 420 114 530 546 rowheight 40 hideHighlight table "list_GUIMOVIE_0_0" var "list_GUIMOVIE_0_0_idx" scrollbar 'rgdscrl1' action " moviesScreen:OnMovieItemSelect(list_GUIMOVIE_0_0[list_GUIMOVIE_0_0_idx].movieCode) " } button { area 528 660 310 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('PLAY_MOVIE_BUTTON')" text style "button" action "moviesScreen:OnPlayButtonClick()" } button { area 100 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('CREDITS_MOVIE_BUTTON')" text style "button" action "moviesScreen:OnCreditsButtonClick()" } button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action "moviesScreen:OnDoneButtonClick()" } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action "moviesScreen:OnDoneButtonClick()" } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action "moviesScreen:OnDoneButtonClick()" } } ` --Multiplayer start. mp_shownSessions = {} selectedMp = 0 detailsStr = "" passwordReq = 0 passwordMp = "" connectionPlayerNameEdit = "" connectionFilterNoPasswords = 0 connectionFilterNoFullGames = 0 selectedIndex = 0 connectionIsHosting = false function connectionBuildGameList() local index = 1 local count = 0 local entryOK = true local foundSelected = false for index = 1, #(mp_sessions), 1 do entryOK = true Infinity_GetPasswordRequired(index) if mp_sessions[index] == nil then entryOK = false elseif mp_sessions[index]["flags"] == nil then entryOK = false elseif connectionFilterNoPasswords == 1 and passwordReq ~= 0 then entryOK = false elseif connectionFilterNoFullGames == 1 and mp_sessions[index]["players"] == 6 then entryOK = false end if e:IsTouchUI() and mp_sessions[index]["version"] ~= "bgee-sod" then entryOK = false end if entryOK == true then count = count + 1 mp_shownSessions[count] = {} mp_shownSessions[count]["actualIndex"] = index mp_shownSessions[count]["updated_at"] = mp_sessions[index]["updated_at"] if mp_sessions[index]['sessionIDString'] == selectedIndex then selectedMp = count foundSelected = true end end end local tableCount = #(mp_shownSessions) while tableCount > count do mp_shownSessions[tableCount] = nil tableCount = tableCount - 1 end if foundSelected == false then selectedMp = 0 end end function chooseNetworkProtocol(num) connectionScreen:SelectServiceProvider(num) end function joinGameEnabled() if selectedMp <= 0 or mp_shownSessions[selectedMp]['actualIndex'] == nil then return 0 else return 1 end end function gameHasPassword(slot) if(mp_sessions[mp_shownSessions[slot]["actualIndex"]] == nil) then --if the session isn't loaded don't show anything. return "" end Infinity_GetPasswordRequired(mp_shownSessions[slot]["actualIndex"]) if passwordReq ~= 0 then ret = getUiString("YES") else ret = getUiString("NO") end return ret end function connectionGetGameName(slot) ret = "" ret = mp_sessions[mp_shownSessions[slot]["actualIndex"]]['name'] return ret end function connectionGetNumPlayers(slot) ret = 0 ret = mp_sessions[mp_shownSessions[slot]["actualIndex"]]['players'] return ret end function connectionGetGameType(slot) ret = "" if mp_sessions[mp_shownSessions[slot]["actualIndex"]] ~= nil then if rgGameEngine == 0 or rgGameEngine == 1 then --bg1 if mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bgee-main" then ret = getUiString("MAIN_GAME_LABEL") elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bgee-bp" then ret = getUiString("ARENA_MODE_LABEL") elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bgee-sod" then ret = getUiString("EXPANSION_LABEL") end elseif rgGameEngine == 2 or rgGameEngine == 4 then --bg2 eet if mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bg2ee-main" then ret = getUiString("MAIN_GAME_BG2_LABEL") elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bg2ee-bp" then ret = getUiString("ARENA_MODE_BG2_LABEL") elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bg2ee-tob" then ret = getUiString("EXPANSION_BG2_LABEL") end elseif rgGameEngine == 3 then --iwd if mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "iwd-main" then ret = getUiString(16509) elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "iwd-how" then ret = getUiString(26799) end end end return ret end function matchMultiplayerGameType(gameVersion) if rgGameEngine == 0 or rgGameEngine == 1 then --bg1 if gameVersion == "bgee-main" then startEngine:OnSoAButtonClick(false) e:CheckGUISong() elseif gameVersion == "bgee-bp" then startEngine:OnTBPButtonClick(false) e:CheckGUISong() elseif gameVersion == "bgee-sod" then startEngine:OnCampaignButtonClick('SOD',false) e:CheckGUISong() end elseif rgGameEngine == 2 then --bg2 if gameVersion == "bg2ee-main" then startEngine:OnSoAButtonClick(false) e:CheckGUISong() elseif gameVersion == "bg2ee-bp" then startEngine:OnTBPButtonClick(false) e:CheckGUISong() elseif gameVersion == "bg2ee-tob" then startEngine:OnToBButtonClick(false) e:CheckGUISong() end elseif rgGameEngine == 3 then --iwd if gameVersion == "iwd-main" then startEngine:OnSoAButtonClick(false) e:CheckGUISong() elseif gameVersion == "iwd-how" then startEngine:OnToBButtonClick(false) e:CheckGUISong() end elseif rgGameEngine == 4 then --eet if gameVersion == "bgee-main" then startEngine:OnCampaignButtonClick('BG1',false) e:CheckGUISong() elseif gameVersion == "bgee-bp" then startEngine:OnCampaignButtonClick('BP1',false) e:CheckGUISong() elseif gameVersion == "bgee-sod" then startEngine:OnCampaignButtonClick('SOD',false) e:CheckGUISong() elseif gameVersion == "bg2ee-main" then startEngine:OnCampaignButtonClick('SOA',false) e:CheckGUISong() elseif gameVersion == "bg2ee-bp" then startEngine:OnCampaignButtonClick('BP2',false) e:CheckGUISong() elseif gameVersion == "bg2ee-tob" then startEngine:OnCampaignButtonClick('TOB',false) e:CheckGUISong() end end end function rgGetPlayerNameText() if connectionPlayerNameEdit == '' then return getUiString('PLAYER_NAME_LABEL') else return connectionPlayerNameEdit end end function rgGameHasPassword(slot) if(mp_sessions[mp_shownSessions[slot]["actualIndex"]] == nil) then --if the session isn't loaded don't show anything. return 1 end Infinity_GetPasswordRequired(mp_shownSessions[slot]["actualIndex"]) if passwordReq ~= 0 then ret = 0 else ret = 1 end return ret end function rgConnectionGetGameType(slot) ret = 0 if mp_sessions[mp_shownSessions[slot]["actualIndex"]] ~= nil then if rgGameEngine == 0 or rgGameEngine == 1 then --bg1 if mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bgee-main" then ret = 0 elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bgee-bp" then ret = 2 elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bgee-sod" then ret = 1 end elseif rgGameEngine == 2 or rgGameEngine == 4 then --bg2 eet if mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bg2ee-main" then ret = 0 elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bg2ee-bp" then ret = 2 elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "bg2ee-tob" then ret = 1 end elseif rgGameEngine == 3 then --iwd if mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "iwd-main" then ret = 0 elseif mp_sessions[mp_shownSessions[slot]["actualIndex"]]["version"] == "iwd-how" then ret = 1 end end end return ret end ` menu { name 'CONNECTION' align left top onOpen " rgGetMultiMenuArea() connectionFilterNoPasswords = 0 connectionFilterNoFullGames = 0 connectionIsHosting = false connectionBuildGameList() if connectionPlayerNameEdit == '' then connectionSetDefaultGameSettings() end " label -- Background { name 'rgmainmenuemptymulti' area 0 0 1365 768 } label { name 'rgmainmenubackmulti' area 0 0 870 768 bam rgdlolbc scaleToClip } label { name 'rgmainmenutitlemulti' ScaleToClip area 815 48 510 131 bam 'RGDTITLE' frame lua "rgGetTitleFrame()" } list -- Multiplayer sessions { column { width 100 label { area 5 0 -1 58 bam 'rgdlobc5' sequence lua "RgUISkin" scaleToClip frame lua "rgGetSelectedHighlight(rowNumber,selectedMp)" align left top } label { area 20 0 500 58 text lua "connectionGetGameName(rowNumber)" text style "normal" align left center } label { area 515 8 42 42 --text lua "gameHasPassword(rowNumber)" --text style "normal" bam 'rgdlock' frame lua "rgGameHasPassword(rowNumber)" align left top scaleToClip } label { area 583 4 42 34 text lua "connectionGetNumPlayers(rowNumber)" text style "button" align left center } label { area 630 8 42 42 --text lua "connectionGetGameType(rowNumber)" --text style "normal" bam 'rgdblogs' frame lua "rgConnectionGetGameType(rowNumber)" align left top scaleToClip } } area 0 5 700 698 name 'rgmainmenulistmulti' hideHighlight rowheight 60 table "mp_shownSessions" var selectedMp scrollbar 'rgdscrl1' action " selectedIndex = mp_sessions[mp_shownSessions[selectedMp]['actualIndex']]['sessionIDString'] " } label -- filter options { name 'rgmainmenufiltermulti1' area 74 710 215 40 text style 'normal' text "CONNECTION_NOT_PASSWORD_PROTECTED_LABEL" align left center tooltip lua "getUiString('CONNECTION_NO_PASSWORDS_TOOLTIP')" } button { name 'rgmainmenufiltermulti2' area 38 714 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip glow lua "connectionFilterNoPasswords" tooltip lua "getUiString('CONNECTION_NO_PASSWORDS_TOOLTIP')" action " connectionFilterNoPasswords = 1 - connectionFilterNoPasswords connectionBuildGameList() " } label { name 'rgmainmenufiltermulti3' area 458 710 215 44 text style 'normal' text "CONNECTION_NOT_FULL_LABEL" align left center tooltip lua "getUiString('CONNECTION_NO_FULL_GAMES_TOOLTIP')" } button { name 'rgmainmenufiltermulti4' area 422 714 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip glow lua "connectionFilterNoFullGames" tooltip lua "getUiString('CONNECTION_NO_FULL_GAMES_TOOLTIP')" action " connectionFilterNoFullGames = 1 - connectionFilterNoFullGames connectionBuildGameList() " } button -- player name { name 'rgmainmenubuttonmulti1' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,1)" ScaleToClip area 865 216 409 75 pad 10 8 10 8 text style "button" text lua "rgString(rgGetPlayerNameText())" action " Infinity_PushMenu('RG_CONNECTION_PLAYERNAME') " actionEnter "rgMainButtHighlight = 1" actionExit "rgMainButtHighlight = 0" } button -- join { name 'rgmainmenubuttonmulti2' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,2)" ScaleToClip area 865 291 409 75 pad 10 8 10 8 text style "button" text lua "rgString('JOIN_BUTTON')" clickable lua "joinGameEnabled()" action " Infinity_GetPasswordRequired(mp_shownSessions[selectedMp]['actualIndex']) if string.find(connectionPlayerNameEdit, '%S') == nil then Infinity_PushMenu('CONNECTION_NAME') elseif passwordReq == 0 then Infinity_PopMenu(); Infinity_PopMenu(); mp_sessions[mp_shownSessions[selectedMp]['actualIndex']]['password'] = passwordMp Infinity_JoinMultiplayerGame(mp_shownSessions[selectedMp]['actualIndex']) else Infinity_PushMenu('CONNECTION_PASSWORD') end " actionEnter "rgMainButtHighlight = 2" actionExit "rgMainButtHighlight = 0" } button -- Create game { name 'rgmainmenubuttonmulti3' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,3)" ScaleToClip area 865 366 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CONNECTION_CREATE_NEW_GAME_BUTTON')" action "Infinity_PushMenu('CONNECTION_CREATE')" actionEnter "rgMainButtHighlight = 3" actionExit "rgMainButtHighlight = 0" } button -- refresh { name 'rgmainmenubuttonmulti4' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 865 441 409 75 pad 10 8 10 8 text style "button" text lua "rgString('RG_MM_REFRESH')" tooltip lua "getUiString('CONNECTION_REFRESH_TOOLTIP')" action " selectedMp = nil mp_shownSessions = {} mp_sessions = {} connectionScreen:ClearSessions() " actionEnter "rgMainButtHighlight = 4" actionExit "rgMainButtHighlight = 0" } button -- Direct Connect { name 'rgmainmenubuttonmulti5' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,5)" ScaleToClip area 865 516 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CONNECTION_DIRECT_CONNECTION_BUTTON')" tooltip lua "getUiString('CONNECTION_DIRECT_CONNECT_TOOLTIP')" action " connectionIsHosting = false chooseNetworkProtocol(2) " actionEnter "rgMainButtHighlight = 5" actionExit "rgMainButtHighlight = 0" } button -- Back/ Log out { name 'rgmainmenubuttonmulti6' bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,6)" ScaleToClip area 865 591 409 75 pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" on escape action " Infinity_PopMenu(); connectionScreen:OnMainCancelButtonClick() " actionEnter "rgMainButtHighlight = 6" actionExit "rgMainButtHighlight = 0" } } menu { name 'RG_CONNECTION_PLAYERNAME' modal align center center onopen "Infinity_FocusTextEdit('ConnectionPlayerNameEditArea')" button { area 235 75 400 75 bam rgdmbut2 clickable false ScaleToClip sequence lua "RgUISkin" } label { area 295 95 320 35 fill 112 111 111 64 } edit { name "ConnectionPlayerNameEditArea" area 305 98 300 28 var connectionPlayerNameEdit text style "edit" maxlines 1 } button { area 235 150 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" sequence lua "RgUISkin" action " Infinity_PopMenu(); " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text "PLAYER_NAME_LABEL" text style "normal" text align center center } } ` connectionTCPIPEdit = "" ` menu { name 'CONNECTION_IP' modal align center center onopen "Infinity_FocusTextEdit('ConnectionTCPIPEditArea')" button { area 235 38 400 75 bam rgdmbut2 clickable false ScaleToClip sequence lua "RgUISkin" } label { area 275 58 340 35 fill 112 111 111 64 } edit { name "ConnectionTCPIPEditArea" area 285 61 320 28 var connectionTCPIPEdit text style "edit" maxlines 1 } button { on escape area 235 188 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" sequence lua "RgUISkin" action " Infinity_PopMenu(); chooseNetworkProtocol(1) " } button { area 235 113 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" clickable lua "connectionScreen:IsValidAddress(connectionTCPIPEdit)" sequence lua "RgUISkin" action " Infinity_PopMenu(); connectionScreen:JoinGameIPAddress(connectionTCPIPEdit) " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text 20681 text style "normal" text align center center } } ` connection = {} connectionSessionNameEdit = "" connectionSessionPasswordEdit = "" connectionPasswordProtected = 0 connectionLocalNetworkGame = 0 function connectionCreateGameClickable() local ret = string.find(connectionPlayerNameEdit, '%S') ~= nil and string.find(connectionSessionNameEdit, '%S') ~= nil if connectionPasswordProtected == 1 then ret = ret and string.find(connectionSessionPasswordEdit, '%S') ~= nil end return ret end function connectionSetDefaultGameSettings() local player = getUiString("MULTIPLAYER_DEFAULT_PLAYER") local game = getUiString("MULTIPLAYER_ENTER_GAME_NAME") local pass = getUiString("MULTIPLAYER_ENTER_GAME_PASSWORD") if connectionPlayerNameEdit == "" then connectionPlayerNameEdit = Infinity_GetINIString('Multiplayer', 'Player Name', player) Infinity_SetINIValue('Multiplayer', 'Player Name', connectionPlayerNameEdit) end if connectionSessionPasswordEdit == "" then connectionSessionPasswordEdit = Infinity_GetINIString('Multiplayer', 'Session Password', pass) Infinity_SetINIValue('Multiplayer', 'Session Password', connectionSessionPasswordEdit) end if connectionSessionNameEdit == "" then connectionSessionNameEdit = Infinity_GetINIString('Multiplayer', 'Session Name', game) Infinity_SetINIValue('Multiplayer', 'Session Name', connectionSessionNameEdit) end if connectionSessionPasswordEdit ~= "" then connectionPasswordProtected = 1 else connectionPasswordProtected = 0 end if connectionScreen:HasServiceProvider() then connectionLocalNetworkGame = 0 else connectionLocalNetworkGame = 1 end end ` menu { name 'CONNECTION_CREATE' align center center ignoreEsc modal onOpen " connectionSetDefaultGameSettings() " label { area 0 0 666 666 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } label { area 104 26 462 45 text style 'button' text "CREATEGAME_TITLE" } label -- player { area 104 88 462 24 text style 'button' text "PLAYER_NAME_LABEL" } label { area 165 116 344 45 fill 112 111 111 64 } edit { name "connectionPlayerNameEditArea" area 170 122 334 32 var connectionPlayerNameEdit text style "edit" maxlines 1 maxchars 32 } label -- session { area 104 178 462 24 text style 'button' text "SESSION_NAME_LABEL" } label { area 165 206 344 44 fill 112 111 111 64 } edit { name "connectionSessionNameEditArea" area 170 212 334 32 var connectionSessionNameEdit text style "edit" maxlines 1 } text -- password option { area 280 262 241 40 text style 'normal' text "CONNECTION_PASSWORD_PROTECTED" tooltip lua "getUiString('CONNECTION_PASSWORD_PROTECTED_TOOLTIP')" align left center } button { area 237 266 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip glow lua "connectionPasswordProtected" tooltip lua "getUiString('CONNECTION_PASSWORD_PROTECTED_TOOLTIP')" action " connectionPasswordProtected = 1 - connectionPasswordProtected if connectionPasswordProtected == 1 then Infinity_FocusTextEdit('connectionSessionPasswordEditArea') end " } text -- local option { area 280 314 241 40 text style 'normal' text "CONNECTION_LOCAL_NETWORK_GAME" tooltip lua "getUiString('CONNECTION_LOCAL_NETWORK_GAME_TOOLTIP')" align left center } button { area 237 318 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip glow lua "connectionLocalNetworkGame" tooltip lua "getUiString('CONNECTION_LOCAL_NETWORK_GAME_TOOLTIP')" action " if connectionScreen:HasServiceProvider() then connectionLocalNetworkGame = 1 - connectionLocalNetworkGame end " } label -- password { area 104 372 462 24 text style 'button' text "CHOOSE_PASSWORD_LABEL" enabled connectionPasswordProtected } label { area 165 401 344 43 fill 112 111 111 64 enabled connectionPasswordProtected } edit { name "connectionSessionPasswordEditArea" area 170 406 334 32 var connectionSessionPasswordEdit text style "edit" maxlines 1 enabled connectionPasswordProtected } button { clickable lua "connectionCreateGameClickable()" bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 130 473 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CREATEGAME_BUTTON')" action " local stringStart = string.find(connectionPlayerNameEdit, '%S'); connectionPlayerNameEdit = string.sub(connectionPlayerNameEdit, stringStart, string.len(connectionPlayerNameEdit)) stringStart = string.find(connectionSessionNameEdit, '%S'); connectionSessionNameEdit = string.sub(connectionSessionNameEdit, stringStart, string.len(connectionSessionNameEdit)) if connectionPasswordProtected == 1 then stringStart = string.find(connectionSessionPasswordEdit, '%S'); connectionSessionPasswordEdit = string.sub(connectionSessionPasswordEdit, stringStart, string.len(connectionSessionPasswordEdit)) end if connectionPasswordProtected == 0 then connectionSessionPasswordEdit = '' end Infinity_PushMenu('CONNECTION_NEWORSAVED') " } button { bam 'RGDMBUT2' on escape sequence lua "RgUISkin" ScaleToClip area 130 548 409 75 pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" action " Infinity_PopMenu() " } } menu { name 'CONNECTION_NEWORSAVED' align center center modal label { area 0 0 666 666 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } label { area 104 26 462 45 text style 'button' text "CONNECTION_NEW_OR_SAVED_GAME_TITLE" } label { area 130 140 392 45 text style 'button' text "CONNECTION_SELECT_GAME_TYPE_LABEL" } button { bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 130 250 409 75 pad 10 8 10 8 text style "button" text lua "rgString('NEW_GAME_BUTTON')" tooltip lua "getUiString('CONNECTION_NEW_GAME_TOOLTIP')" action " fromMultiPlayer = true Infinity_PushMenu('CHARGEN_DIFFICULTY') " } button { bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 130 332 409 75 pad 10 8 10 8 text style "button" text lua "rgString('LOAD_BUTTON')" tooltip lua "getUiString('CONNECTION_LOAD_GAME_TOOLTIP')" action " Infinity_PopMenu() Infinity_PopMenu() Infinity_PopMenu() if connectionLocalNetworkGame == 1 then connectionIsHosting = true chooseNetworkProtocol(2) end connectionScreen:OnLoadGameButtonClick() " } button { bam 'RGDMBUT1' sequence lua "rgGetHighlightSkin(rgMainButtHighlight,4)" ScaleToClip area 130 548 409 75 pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" action " Infinity_PopMenu() " } } ` connectionPasswordPasswordEdit = "" ` menu { name 'CONNECTION_PASSWORD' align center center modal onOpen " if mp_sessions[selectedMp]['name'] == Infinity_GetINIString('Multiplayer', 'Session Name', '') then connectionPasswordPasswordEdit = Infinity_GetINIString('Multiplayer', 'Session Password', '') else connectionPasswordPasswordEdit = '' end Infinity_FocusTextEdit('connectionPasswordPasswordEditArea') " button { area 235 38 400 75 bam rgdmbut2 clickable false ScaleToClip sequence lua "RgUISkin" } label { area 275 58 340 35 fill 112 111 111 64 } edit { name "connectionPasswordPasswordEditArea" area 285 61 320 28 var connectionPasswordPasswordEdit text style "edit" text align center center maxlines 1 action " --On return pressed if (key_pressed == 13) then local stringStart = string.find(connectionNameNameEdit, '%S') if stringStart ~= nil then local stringStart = string.find(connectionPasswordPasswordEdit, '%S') mp_sessions[selectedMp]['password'] = string.sub(connectionPasswordPasswordEdit, stringStart, string.len(connectionPasswordPasswordEdit) ) Infinity_PopMenu() Infinity_JoinMultiplayerGame(mp_shownSessions[selectedMp]['actualIndex']) end return -1 end return 1 " } button { on escape area 235 113 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" sequence lua "RgUISkin" action " Infinity_PopMenu() " } button { area 235 188 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" clickable lua "connectionPasswordPasswordEdit ~='' and string.find(connectionPasswordPasswordEdit, '%S') ~= nil" sequence lua "RgUISkin" action " Infinity_PopMenu(); local stringStart = string.find(connectionPasswordPasswordEdit, '%S') mp_sessions[selectedMp]['password'] = string.sub(connectionPasswordPasswordEdit, stringStart, string.len(connectionPasswordPasswordEdit) ) Infinity_JoinMultiplayerGame(mp_shownSessions[selectedMp]['actualIndex']) " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text lua "getUiString('PASSWORD_REQUIRED_LABEL') .. ', ' .. getUiString('ENTER_PASSWORD_LABEL')" text style "normal" text align center center } } ` connectionNameNameEdit = "" ` menu { name 'CONNECTION_NAME' align center center modal onOpen " connectionNameNameEdit = '' Infinity_FocusTextEdit('connectionNameNameEditArea') " button { area 235 38 400 75 bam rgdmbut2 clickable false ScaleToClip sequence lua "RgUISkin" } label { area 275 58 340 35 fill 112 111 111 64 } edit { name "connectionNameNameEditArea" area 285 61 320 28 var connectionNameNameEdit text style "edit" text align center center maxlines 1 action " --On return pressed if (key_pressed == 13) then local stringStart = string.find(connectionNameNameEdit, '%S') if stringStart ~= nil then connectionPlayerNameEdit = string.sub(connectionNameNameEdit, stringStart, string.len(connectionNameNameEdit) ) Infinity_PopMenu() Infinity_GetPasswordRequired(mp_shownSessions[selectedMp]['actualIndex']) if passwordReq == 0 then Infinity_PopMenu(); Infinity_PopMenu(); mp_sessions[mp_shownSessions[selectedMp]['actualIndex']]['password'] = passwordMp Infinity_JoinMultiplayerGame(mp_shownSessions[selectedMp]['actualIndex']) else Infinity_PushMenu('CONNECTION_PASSWORD') end end return -1 end return 1 " } button { on escape area 235 113 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('BACK_BUTTON')" sequence lua "RgUISkin" action " Infinity_PopMenu() " } button { area 235 188 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" sequence lua "RgUISkin" clickable lua "connectionNameNameEdit ~='' and string.find(connectionNameNameEdit, '%S') ~= nil" action " Infinity_PopMenu(); local stringStart = string.find(connectionNameNameEdit, '%S') connectionPlayerNameEdit = string.sub(connectionNameNameEdit, stringStart, string.len(connectionNameNameEdit) ) Infinity_GetPasswordRequired(mp_shownSessions[selectedMp]['actualIndex']) if passwordReq == 0 then Infinity_PopMenu(); Infinity_PopMenu(); mp_sessions[mp_shownSessions[selectedMp]['actualIndex']]['password'] = passwordMp Infinity_JoinMultiplayerGame(mp_shownSessions[selectedMp]['actualIndex']) else Infinity_PushMenu('CONNECTION_PASSWORD') end " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text "PLAYER_NAME_LABEL" text style "normal" text align center center } } menu { name 'CONNECTION_PLAYERNAME' align center center ignoreEsc modal onOpen " connectionPlayerNameEdit = Infinity_GetINIString('Multiplayer', 'Player Name', 'Player Name') Infinity_FocusTextEdit('connectionPlayerNameEditArea') " label { area 0 0 666 666 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } label { area 104 26 462 45 text style 'button' text "CURRENT_PLAYERS_LABEL" } label { area 163 446 338 32 text style "button" text "PLAYER_NAME_LABEL" } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, connectionSelectedPlayer)" ScaleToClip } label { area 0 0 -1 -1 text lua "connection.currentPlayers[rowNumber].name" text style "edit" align center center } } action " " hidehighlight rowheight 50 area 158 99 350 338 table "connection.currentPlayers" var connectionSelectedPlayer } edit { name "connectionPlayerNameEditArea" area 164 479 338 32 var connectionPlayerNameEdit text style "edit" text align center center maxlines 1 maxchars 32 fill 112 111 111 64 } button { clickable lua "connectionPlayerNameEdit ~= ''" bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 130 548 409 75 pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" on return action " Infinity_PopMenu(); Infinity_PopMenu(); connectionScreen:SetPlayerName(connectionPlayerNameEdit) " } } menu { name 'CONNECTION_JOINING' modal align center center button { area 235 112 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" sequence lua "RgUISkin" on escape action " Infinity_PopMenu() " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text 20274 text style "normal" text align center center } } menu { name 'CONNECTION_ERROR' modal align center center button { area 235 112 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" sequence lua "RgUISkin" on escape action " Infinity_PopMenu() " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text lua "Infinity_FetchString(CONNECTION_ERROR_MESSAGE)" text style "normal" text align center center } } menu { name 'CONNECTION_WAITING_FOR_PROVIDER' modal align center center button { on escape area 235 150 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" sequence lua "RgUISkin" action " Infinity_PopMenu('CONNECTION_WAITING_FOR_PROVIDER') Infinity_PopMenu('CONNECTION'); connectionScreen:OnMainCancelButtonClick() " } button { on return area 235 75 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CONNECTION_LOCAL_NETWORK_GAME')" sequence lua "RgUISkin" action " Infinity_PopMenu('CONNECTION_WAITING_FOR_PROVIDER') connectionScreen:StopConnectingToProvider() " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text "CONNECTION_FINDING_DEVICES" text style "normal" text align center center } } menu { name 'CONNECTION_WAITING_FOR_SERVER' modal align center center button { area 235 112 400 75 bam rgdmbut2 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" sequence lua "RgUISkin" on escape action " Infinity_PopMenu('CONNECTION_WAITING_FOR_SERVER') connectionScreen:CancelJoinGame(); " } label { area 0 0 300 300 bam rgdpopup ScaleToClip sequence lua "RgUISkin" } label { area 50 50 200 200 text "CONNECTION_WAITING_FOR_SERVER" text style "normal" text align center center } } ` function getCampaignBackground() local campaign = startEngine:GetCampaign() return startCampaignData[campaign].background end function rgGetScreenSize() local screenWidth, screenHeight = Infinity_GetScreenSize() local a = screenWidth / 2.369 local b = screenHeight / 1.333 local c = screenHeight / 3.413 local d = screenWidth - a local e = screenHeight - c local f = d / 2 Infinity_SetArea('rgdmmenu1', 0, 0, a, b) Infinity_SetArea('rgdmmenu2', f, 0, a, b) Infinity_SetArea('rgdmmenu3', d, 0, a, b) Infinity_SetArea('rgdmmenu4', 0, e, a, c) Infinity_SetArea('rgdmmenu5', f, e, a, c) Infinity_SetArea('rgdmmenu6', d, e, a, c) end function rgGetScreenSizeChargen() local screenWidth, screenHeight = Infinity_GetScreenSize() local a = screenWidth / 2.369 local b = screenHeight / 1.333 local c = screenHeight / 3.413 local d = screenWidth - a local e = screenHeight - c local f = d / 2 Infinity_SetArea('rgdmmenu1x', 0, 0, a, b) Infinity_SetArea('rgdmmenu2x', f, 0, a, b) Infinity_SetArea('rgdmmenu3x', d, 0, a, b) Infinity_SetArea('rgdmmenu4x', 0, e, a, c) Infinity_SetArea('rgdmmenu5x', f, e, a, c) Infinity_SetArea('rgdmmenu6x', d, e, a, c) end ` menu { name 'BACKGROUND' align left top onOpen " rgGetScreenSize() " label { name 'rgdmmenu1' area 0 0 842 626 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 0 } label { name 'rgdmmenu2' area 576 0 842 626 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 1 } label { name 'rgdmmenu3' area 1152 0 842 626 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 2 } label { name 'rgdmmenu4' area 0 590 842 244 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 3 } label { name 'rgdmmenu5' area 576 590 842 244 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 4 } label { name 'rgdmmenu6' area 1152 590 842 244 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 5 } } menu { name 'RG_ESC_BACKGROUND' align left top onOpen " local screenWidth, screenHeight = Infinity_GetScreenSize() local w = screenWidth / 1.777 local a = screenWidth - w Infinity_SetArea('rgdescback1', 0, 0, w, screenHeight) Infinity_SetArea('rgdescback2', a, 0, w, screenHeight) " label { name 'rgdescback1' area 0 0 861 861 bam "rgdebcg1" sequence lua "rgGetTitleFrame()" frame 0 scaleToClip } label { name 'rgdescback2' area 669 0 861 861 bam "rgdebcg1" sequence lua "rgGetTitleFrame()" frame 1 scaleToClip } } menu { name 'RG_CHARGEN_BACKGROUND' align left top onOpen " rgGetScreenSizeChargen() local screenWidth, screenHeight = Infinity_GetScreenSize() local h = screenHeight * 1.777 local x = screenWidth - h local a = screenWidth - screenHeight local n = (screenHeight - 768) / 2 Infinity_SetArea('rgdchback0', (screenWidth/2) - 682,n+56 , nil,nil) Infinity_SetArea('rgdchback1', x, 0, screenHeight, screenHeight) Infinity_SetArea('rgdchback2', x + a, 0, screenHeight, screenHeight) Infinity_SetArea('rgdchport0', (screenWidth/2) - 170,n+56 , nil,nil) Infinity_SetArea('rgdchport1', (screenWidth/2) - 145,n+90 , nil,nil) Infinity_SetArea('rgdchport2', (screenWidth/2) - 149, n+86, nil,nil) " label { name 'rgdmmenu1x' area 0 0 576 576 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 0 } label { name 'rgdmmenu2x' area 394 0 576 576 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 1 } label { name 'rgdmmenu3x' area 788 0 576 576 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 2 } label { name 'rgdmmenu4x' area 0 542 576 225 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 3 } label { name 'rgdmmenu5x' area 394 542 576 225 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 4 } label { name 'rgdmmenu6x' area 788 542 576 225 bam "RGDMENU1" ScaleToClip sequence lua "rgGetTitleFrame()" frame 5 } label { name "rgdchback0" enabled "rgGameEngine == 3" area 0 212 340 552 bam rgdcgen2 ScaleToClip } label { name "rgdchport0" enabled "rgGameEngine == 3" area 0 212 340 552 bam rgdcgen2 ScaleToClip } label { name 'rgdchport1' area 746 172 290 456 bitmap lua "chargen.portrait" } label { name 'rgdchport2' enabled "rgGameEngine == 3" area 742 168 298 464 bam 'rgdport4' ScaleToClip } label { name 'rgdchback1' area 0 0 1080 1080 bam lua "chargen.portrait" sequence lua "rgGetTitleFrame()" frame 0 scaleToClip } label { name 'rgdchback2' area 840 0 1080 1080 bam lua "chargen.portrait" sequence lua "rgGetTitleFrame()" frame 1 scaleToClip } } ` multiplayer = {} mpChatEdit = "" mpHelpTextString = "" mpModifyingCharacter = -1 mpErrorText = -1 mpErrorState = -1 text_GUIMP_0_25 = "" text_GUIMP_0_25_lines = 0 multiplayerInPermission = false multiplayerInPermissionForPlayer = 0 multiplayerSessionName = "" multiplayerSaveName = "" multiplayerChapter = "" multiplayerTimePlayed = "" multiplayerDifficultyLabel = "" multiplayerDifficultyImage = 0 mulitplayerPreexistingDifficulty = 0; multiplayerLocalPlayerID = 1 multiplayerFromInGame = false mpaCharacters = { {ready = false, name = "", class = "", player = 1, portrait = "NOPORTLS", inprogress = false, color = "0xffffff"}, {ready = false, name = "", class = "", player = 1, portrait = "NOPORTLS", inprogress = false, color = "0xffffff"}, {ready = false, name = "", class = "", player = 1, portrait = "NOPORTLS", inprogress = false, color = "0xffffff"}, {ready = false, name = "", class = "", player = 1, portrait = "NOPORTLS", inprogress = false, color = "0xffffff"}, {ready = false, name = "", class = "", player = 1, portrait = "NOPORTLS", inprogress = false, color = "0xffffff"}, {ready = false, name = "", class = "", player = 1, portrait = "NOPORTLS", inprogress = false, color = "0xffffff"} } mpaPlayers = { {name = "", id = 0, color = "0x7a7aFF"}, {name = "", id = 0, color = "0xFFAF7A"}, {name = "", id = 0, color = "0x7aFFa3"}, {name = "", id = 0, color = "0x57F9FF"}, {name = "", id = 0, color = "0xF2F188"}, {name = "", id = 0, color = "0xFE97FF"} } function updateMultiplayerPlayerSlot(slot,setting,value) if multiplayerLocalPlayerID == 1 and setting == "name" and mpaPlayers[slot][setting] == "" and value ~= "" then mpaPlayers[slot][setting] = value broadcastPlayerAdded(slot) elseif multiplayerLocalPlayerID == 1 and setting == "name" and mpaPlayers[slot][setting] ~= "" and value == "" then broadcastPlayerRemoved(slot) mpaPlayers[slot][setting] = value else mpaPlayers[slot][setting] = value end end function updateMultiplayerCharacterSlot(slot,setting,value) if multiplayerLocalPlayerID == 1 and setting == "color" and mpaCharacters[slot][setting] == "0xffffff" and value ~= "0xffffff" then mpaCharacters[slot][setting] = value broadcastCharacterAdded(slot) elseif multiplayerLocalPlayerID == 1 and setting == "ready" and mpaCharacters[slot][setting] == false and value == true then broadcastCharacterReady(slot) mpaCharacters[slot][setting] = value elseif multiplayerLocalPlayerID == 1 and setting == "ready" and mpaCharacters[slot][setting] == true and value == false then broadcastCharacterNotReady(slot) mpaCharacters[slot][setting] = value else mpaCharacters[slot][setting] = value end end function clearCharacterSlot(slot, announce) if announce == true and mpaCharacters[slot]['name'] ~= "" then broadcastCharacterRemoved(slot) end mpaCharacters[slot]['ready'] = false mpaCharacters[slot]['name'] = "" mpaCharacters[slot]['class'] = "" mpaCharacters[slot]['portrait'] = "NOPORTLS" mpaCharacters[slot]['inprogress'] = false mpaCharacters[slot]['color'] = "0xffffff" end function clearPlayerSlot(slot, announce) if announce == true and mpaPlayers[slot]["name"] ~= "" then broadcastPlayerRemoved(slot) end mpaPlayers[slot]["name"] = "" mpaPlayers[slot]["id"] = 0 end function getMultiplayerCharacterName(slot, newLine, getClass) local ret = "" local separator = ", " if newLine == true then separator = "\n" end if mpaCharacters[slot]["name"] == "" and multiplayerLocalPlayerID == mpaCharacters[slot]["player"] then ret = getUiString("MULTIPLAYER_CREATE_CHARACTER_MESSAGE") elseif mpaCharacters[slot]["name"] == "" and multiplayerLocalPlayerID ~= mpaCharacters[slot]["player"] and mpaCharacters[slot]["inprogress"] == false then ret = getUiString("MULTIPLAYER_EMPTY_CHARACTER_MESSAGE") elseif mpaCharacters[slot]["inprogress"] == true and mpaCharacters[slot]["class"] == "" then setStringTokenLua("",getMultiplayerPlayerName(mpaCharacters[slot]["player"], false, true)) setStringTokenLua("",separator) ret = getUiString("MULTIPLAYER_CREATING_CHARACTER_MESSAGE") removeStringTokenLua("") removeStringTokenLua("") elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" then ret = "^0xff"..mpaCharacters[slot]["color"]..mpaCharacters[slot]["name"].."^-" if getClass == true then ret = ret..separator..mpaCharacters[slot]["class"] end end return ret end function getMultiplayerCharacterButtonText(slot) local ret = "" if mpaCharacters[slot]["name"] == "" and multiplayerLocalPlayerID == mpaCharacters[slot]["player"] then ret = getUiString("CREATE_CHAR_BUTTON") elseif mpaCharacters[slot]["name"] == "" and multiplayerLocalPlayerID ~= mpaCharacters[slot]["player"] then ret = "" elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] == "" then ret = "" elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" and mpaCharacters[slot]["player"] ~= multiplayerLocalPlayerID then ret = getUiString("MULTIPLAYER_VIEW_DETAILS_BUTTON") elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" and mpaCharacters[slot]["player"] == multiplayerLocalPlayerID and multiplayer.allowreformparty == false and multiplayerDifficultyLabel ~= "" then ret = getUiString("MULTIPLAYER_VIEW_DETAILS_BUTTON") elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" and mpaCharacters[slot]["player"] == multiplayerLocalPlayerID then ret = getUiString("MULTIPLAYER_EDIT_CHAR_BUTTON") end return ret end function shouldGreyscaleEditButton(slot) local ret = false local storedString = getUiString("MULTIPLAYER_VIEW_DETAILS_BUTTON") if multiplayerFromInGame == true then ret = true end if ret == true and getMultiplayerCharacterButtonText(slot) == storedString then ret = false end if ret == true and (multiplayerLocalPlayerID == 1 or multiplayer.player[multiplayerLocalPlayerID].permissions[7] == true) then ret = false end if ret == true and mpaCharacters[slot]["name"] == "" then ret = false end if ret == false and mpaCharacters[slot]['ready'] == true and getMultiplayerCharacterButtonText(slot) ~= storedString and multiplayerFromInGame == false then ret = true end return ret end function getMultiplayerCharacterReadyText(slot) local ret = "" if mpaCharacters[slot]["name"] == "" and mpaCharacters[slot]["inprogress"] == false then ret = "" elseif mpaCharacters[slot]["ready"] == false then ret = getUiString("MULTIPLAYER_NOT_READY_MESSAGE") elseif mpaCharacters[slot]["ready"] == true then ret = getUiString("MULTIPLAYER_READY_MESSAGE") end return ret end function getMultiplayerPlayerName(slot,newLine,hostyou) local ret = mpaPlayers[slot]["name"] if ret ~= "" then ret = "^0x"..mpaPlayers[slot]["color"]..mpaPlayers[slot]["name"].."^-" end local separator = " " if newLine == true then separator = "\n" end if hostyou == true then if slot == multiplayerLocalPlayerID then ret = ret..separator.."^0xFFFFFFFF"..getUiString("MULTIPLAYER_PLAYER_YOU").."^-" elseif slot == 1 then ret = ret..separator.."^0xFFFFFFFF"..getUiString("MULTIPLAYER_PLAYER_HOST").."^-" elseif ret == "" then ret = "^0xFF9B9B9B"..getUiString("MULTIPLAYER_EMPTY_PLAYER").."^-" end end return ret end function getMultiplayerPlayerControlledCharacter(player,slot) local count = 0 local ret = "NOCTRL" -- need blank square or something local index = 1 for index = 1, 6, 1 do if mpaCharacters[index]["player"] == player then count = count + 1 end if currentMultiplayerSelectPlayer == player and mpDraggedCharacter == index then slot = slot + 1 end if count == slot then ret = mpaCharacters[index]["portrait"] break end end return ret end function getMultiplayerPlayerControlledCharacterSlot(player,slot) local count = 0 local ret = -1 local index = 1 for index = 1, 6, 1 do if mpaCharacters[index]["player"] == player then count = count + 1 end if count == slot then ret = index break end end return ret end function getPlayerKickWidth(slot) if multiplayerLocalPlayerID ~= 1 or slot == 1 then return 0 else return 10 end end function getPlayerNameWidth(slot) if multiplayerLocalPlayerID ~= 1 or slot == 1 then return 45 else return 35 end end function getStartGameButtonTooltip() if multiplayer.donebuttonclickable then return "" else return getUiString("MULTIPLAYER_CANNOT_START") end end function updateMultiplayerSessionData(sessionName, saveName, chapter, timePlayed, difficulty) local gold = "^0xffc7f8fb" multiplayerSessionName = gold..sessionName.."^-" if areaName ~= "" then multiplayerSaveName = gold..getUiString("MULTIPLAYER_SAVED_GAME_LABEL").."^- ^0xffffffff"..saveName.."^-" multiplayerChapter = gold..getUiString("MULTIPLAYER_CHAPTER_LABEL").."^- ^0xffffffff"..chapter.."^-" multiplayerTimePlayed = gold..getUiString("MULTIPLAYER_TIME_PLAYED_LABEL").."^- ^0xffffffff"..timePlayed.."^-" if difficulty > 0 then mulitplayerPreexistingDifficulty = difficulty multiplayerDifficultyLabel = gold..getUiString("MULTIPLAYER_DIFFICULTY_LABEL").."^-^0xffffffff"..getUiString(difficulties[difficulty].name).."^-" multiplayerDifficultyImage = difficulty - 1 end else multiplayerSaveName = gold..getUiString("MULTIPLAYER_NEW_GAME_LABEL").."^- ^0xffffffff"..saveName.."^-" multiplayerChapter = gold..getUiString("MULTIPLAYER_CHAPTER_LABEL").."^- ^0xffffffff"..chapter.."^-" multiplayerTimePlayed = gold..getUiString("MULTIPLAYER_TIME_PLAYED_NEW_GAME").."^-" if difficulty > 0 then multiplayerDifficultyLabel = gold..getUiString("MULTIPLAYER_DIFFICULTY_LABEL").."^-^0xffffffff"..getUiString(difficulties[difficulty].name).."^-" multiplayerDifficultyImage = difficulty - 1 end end end function broadcastCharacterControlChange(slot, newPlayer) print("newPlayer "..newPlayer.." current "..currentMultiplayerSelectPlayer.." playernumber "..mpaCharacters[slot]["player"]) if mpaCharacters[slot]["player"] ~= newPlayer then local host = getMultiplayerPlayerName(1,false,false) local player = getMultiplayerPlayerName(newPlayer,false,false) setStringTokenLua("",host) setStringTokenLua("",player) local message = getUiString("MULTIPLAYER_SLOT_"..slot.."_ASSIGNED_TO") removeStringTokenLua("") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end end function broadcastCharacterAdded(slot) local player = getMultiplayerPlayerName(mpaCharacters[slot]["player"],false,false) local character = getMultiplayerCharacterName(slot, false, true) setStringTokenLua("",player) setStringTokenLua("",character) local message = getUiString("MULTIPLAYER_HAS_ADDED") removeStringTokenLua("") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end function broadcastCharacterRemoved(slot) local player = getMultiplayerPlayerName(mpaCharacters[slot]["player"],false,false) local character = getMultiplayerCharacterName(slot, false, true) setStringTokenLua("",player) setStringTokenLua("",character) local message = getUiString("MULTIPLAYER_HAS_REMOVED") removeStringTokenLua("") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end function broadcastCharacterReady(slot) local character = getMultiplayerCharacterName(slot, false, false) setStringTokenLua("",character) local message = getUiString("MULTIPLAYER_IS_READY_TO_START") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end function broadcastCharacterNotReady(slot) local character = getMultiplayerCharacterName(slot, false, false) setStringTokenLua("",character) local message = getUiString("MULTIPLAYER_IS_NO_LONGER_READY") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end function broadcastPlayerAdded(slot) local player = getMultiplayerPlayerName(slot,false,false) setStringTokenLua("",player) local message = getUiString("MULTIPLAYER_HAS_JOINED_THE_GAME") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end function broadcastPlayerRemoved(slot) local player = getMultiplayerPlayerName(slot,false,false) setStringTokenLua("",player) local message = getUiString("MULTIPLAYER_HAS_LEFT_THE_GAME") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end mpDraggedCharacter = nil mpDraggedPortrait = 'NOCTRL' function multiplayerStartSwapPortraits(player, character) if multiplayerLocalPlayerID == 1 and player > 0 and player < 7 and mpaPlayers[player]["name"] ~= "" then print("Starting the drag of player "..player.." character slot "..character) mpDraggedCharacter = character multiplayerScreen:SetModifiedCharacterSlot(character - 1) currentMultiplayerSelectPlayer = player mpDraggedPortrait = mpaCharacters[character]["portrait"] end end function multiplayerStopSwapPortraits(player) if multiplayerLocalPlayerID == 1 then if player > 0 and player < 7 and mpaPlayers[player]["name"] ~= "" and currentMultiplayerSelectPlayer ~= nil then if mpaCharacters[mpDraggedCharacter]['ready'] == true and mpaCharacters[mpDraggedCharacter]['player'] ~= player then multiplayerScreen:OnReadyButtonClick(mpDraggedCharacter-1) end broadcastCharacterControlChange(mpDraggedCharacter, player) multiplayerScreen:OnPlayerSelection(player-1) end mpDraggedCharacter = nil currentMultiplayerSelectPlayer = nil mpDraggedPortrait = 'NOCTRL' end end function getMultiplayerReadyTooltip(character) local ret = "" if mpaCharacters[character]["ready"] == true then ret = getUiString("MULTIPLAYER_READY_BUTTON_ON_TOOLTIP") else ret = getUiString("MULTIPLAYER_READY_BUTTON_OFF_TOOLTIP") end return ret end function multiplayerUpdateDraggedPortrait() if mpDraggedPortrait ~= 'NOCTRL' and multiplayerLocalPlayerID == 1 then local x,y,w,h = Infinity_GetArea('multiplayerDraggingPortraitImage') x,y = Infinity_GetMousePosition(); x = x - 20 y = y - 30 Infinity_SetArea('multiplayerDraggingPortraitImage',x,y,w,h) return true else local x,y,w,h = Infinity_GetArea('multiplayerDraggingPortraitImage') Infinity_SetArea('multiplayerDraggingPortraitImage',-20,-20,w,h) return false end end function get4CheckFrame(slot) local ret = 1 if mpaCharacters[slot]['ready'] == true and mpaCharacters[slot]['player'] == multiplayerLocalPlayerID then ret = 0 elseif mpaCharacters[slot]['ready'] == true then ret = 2 end return ret end function rgPlayerButtonAction(slot) selectedCharacter = slot if multiplayerLocalPlayerID == 1 and slot ~= 1 then if multiplayerFromInGame == false then multiplayerScreen:SetModifiedCharacterSlot(slot - 1) currentMultiplayerSelectPlayer = mpaCharacters[slot]['player'] Infinity_PushMenu('MP_PICKPLAYER') elseif shouldGreyscaleEditButton(slot) == false then multiplayerScreen:OnModifyButtonClick() end end end function rgGetCharacterSlotName(slot) local ret = "" if mpaCharacters[slot]["name"] == "" and multiplayerLocalPlayerID == mpaCharacters[slot]["player"] then ret = '^$' .. string.lower(getUiString("CREATE_CHAR_BUTTON")) elseif mpaCharacters[slot]["name"] == "" and multiplayerLocalPlayerID ~= mpaCharacters[slot]["player"] then ret = "" elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] == "" then ret = "" elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" and mpaCharacters[slot]["player"] ~= multiplayerLocalPlayerID then ret = getUiString("MULTIPLAYER_VIEW_DETAILS_BUTTON") elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" and mpaCharacters[slot]["player"] == multiplayerLocalPlayerID and multiplayer.allowreformparty == false and multiplayerDifficultyLabel ~= "" then ret = getUiString("MULTIPLAYER_VIEW_DETAILS_BUTTON") elseif mpaCharacters[slot]["name"] ~= "" and mpaCharacters[slot]["class"] ~= "" and mpaCharacters[slot]["player"] == multiplayerLocalPlayerID then ret = getMultiplayerCharacterName(slot, false, true) end return ret end function rgCharacterButtonAction(slot) selectedCharacter = slot if shouldGreyscaleEditButton(slot) == false then if getMultiplayerCharacterButtonText(slot) == getUiString('MULTIPLAYER_VIEW_DETAILS_BUTTON') then multiplayerScreen:OnPortraitButtonClick(slot-1) elseif getMultiplayerCharacterButtonText(slot) == getUiString('CREATE_CHAR_BUTTON') then if multiplayerFromInGame == false then multiplayerScreen:SetModifiedCharacterSlot(slot-1) multiplayerScreen:UpdateModifyCharacterPanel() elseif shouldGreyscaleEditButton(slot) == false then multiplayerScreen:OnModifyButtonClick() end elseif getMultiplayerCharacterButtonText(slot) == getUiString('MULTIPLAYER_EDIT_CHAR_BUTTON') then if multiplayerFromInGame == false then mpModifyingCharacter = slot - 1 Infinity_PushMenu('MP_MODIFYCHARACTER') elseif shouldGreyscaleEditButton(slot) == false then multiplayerScreen:OnModifyButtonClick() end end end end function rgReadyButtonAction(slot) selectedCharacter = slot if multiplayerFromInGame == false then if multiplayerLocalPlayerID == mpaCharacters[slot]['player'] then multiplayerScreen:OnReadyButtonClick(slot-1) end end end function rgPermissionButtonAction(slot) if mpaPlayers[slot]['name'] ~= '' then multiplayerInPermission = true multiplayerInPermissionForPlayer = slot Infinity_PushMenu('MP_PERMISSIONS') end end function rgKickButtonAction(slot) if mpaPlayers[slot]['name'] ~= '' then multiplayerScreen:OnKickPlayerButtonClick(slot-1) end end ` menu { name 'MULTIPLAYER' align center center ignoreesc onOpen " existingDifficulty = Infinity_GetOption(12, 8) + 1; multiplayerFromInGame = multiplayerScreen:GetEngineState() == 2 --Infinity_PushMenu('RG_MENU_BAR') popSidebars() " label { area 0 0 1365 768 bam rgdbcmpl scaleToClip sequence lua "RgUISkin" } label { area 146 36 1074 44 text "ARBITRATION_TITLE" text style 'button' } label { area 1223 90 50 34 text lua "getUiString('READY_TO_PLAY_LABEL')" text style "normal" align center center text color 'X' text point 12 } button { area 570 104 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getMultiplayerPlayerName(mpaCharacters[1]['player'],false,true)" text style "rg_trajan" text align center center text point 12 action "rgPlayerButtonAction(1)" } button { area 570 198 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getMultiplayerPlayerName(mpaCharacters[2]['player'],false,true)" text style "rg_trajan" text align center center text point 12 action "rgPlayerButtonAction(2)" } button { area 570 292 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getMultiplayerPlayerName(mpaCharacters[3]['player'],false,true)" text style "rg_trajan" text align center center text point 12 action "rgPlayerButtonAction(3)" } button { area 570 386 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getMultiplayerPlayerName(mpaCharacters[4]['player'],false,true)" text style "rg_trajan" text align center center text point 12 action "rgPlayerButtonAction(4)" } button { area 570 480 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getMultiplayerPlayerName(mpaCharacters[5]['player'],false,true)" text style "rg_trajan" text align center center text point 12 action "rgPlayerButtonAction(5)" } button { area 570 574 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getMultiplayerPlayerName(mpaCharacters[6]['player'],false,true)" text style "rg_trajan" text align center center text point 12 action "rgPlayerButtonAction(6)" } button { area 910 104 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCharacterSlotName(1)" clickable lua "not shouldGreyscaleEditButton(1)" text style "rg_trajan" text align center center text point 12 action "rgCharacterButtonAction(1)" } button { area 910 198 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCharacterSlotName(2)" clickable lua "not shouldGreyscaleEditButton(2)" text style "rg_trajan" text align center center text point 12 action "rgCharacterButtonAction(2)" } button { area 910 292 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCharacterSlotName(3)" clickable lua "not shouldGreyscaleEditButton(3)" text style "rg_trajan" text align center center text point 12 action "rgCharacterButtonAction(3)" } button { area 910 386 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCharacterSlotName(4)" clickable lua "not shouldGreyscaleEditButton(4)" text style "rg_trajan" text align center center text point 12 action "rgCharacterButtonAction(4)" } button { area 910 480 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCharacterSlotName(5)" clickable lua "not shouldGreyscaleEditButton(5)" text style "rg_trajan" text align center center text point 12 action "rgCharacterButtonAction(5)" } button { area 910 574 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "rgGetCharacterSlotName(6)" clickable lua "not shouldGreyscaleEditButton(6)" text style "rg_trajan" text align center center text point 12 action "rgCharacterButtonAction(6)" } label { area 868 91 64 93 bam rgdport2 sequence lua "RgUISkin" align left top scaleToClip } label { area 868 185 64 93 bam rgdport2 sequence lua "RgUISkin" align left top scaleToClip } label { area 868 279 64 93 bam rgdport2 sequence lua "RgUISkin" align left top scaleToClip } label { area 868 373 64 93 bam rgdport2 sequence lua "RgUISkin" align left top scaleToClip } label { area 868 467 64 93 bam rgdport2 sequence lua "RgUISkin" align left top scaleToClip } label { area 868 561 64 93 bam rgdport2 sequence lua "RgUISkin" align left top scaleToClip } label { area 872 95 54 85 bitmap lua 'mpaCharacters[1]["portrait"]' align center center } label { area 872 189 54 85 bitmap lua 'mpaCharacters[2]["portrait"]' align center center } label { area 872 283 54 85 bitmap lua 'mpaCharacters[3]["portrait"]' align center center } label { area 872 377 54 85 bitmap lua 'mpaCharacters[4]["portrait"]' align center center } label { area 872 471 54 85 bitmap lua 'mpaCharacters[5]["portrait"]' align center center } label { area 872 565 54 85 bitmap lua 'mpaCharacters[6]["portrait"]' align center center } button { area 1233 120 40 40 bam lua "getUiString('rgdchec') .. RgUISkin" scaleToClip sequence lua "get4CheckFrame(1)" align left top tooltip lua "getMultiplayerReadyTooltip(1)" action "rgReadyButtonAction(1)" } --text lua "getMultiplayerCharacterReadyText(1)" text style "normal" button { area 1233 214 40 40 bam lua "getUiString('rgdchec') .. RgUISkin" scaleToClip sequence lua "get4CheckFrame(2)" align left top tooltip lua "getMultiplayerReadyTooltip(2)" action "rgReadyButtonAction(2)" } button { area 1233 308 40 40 bam lua "getUiString('rgdchec') .. RgUISkin" scaleToClip sequence lua "get4CheckFrame(3)" align left top tooltip lua "getMultiplayerReadyTooltip(3)" action "rgReadyButtonAction(3)" } button { area 1233 402 40 40 bam lua "getUiString('rgdchec') .. RgUISkin" scaleToClip sequence lua "get4CheckFrame(4)" align left top tooltip lua "getMultiplayerReadyTooltip(4)" action "rgReadyButtonAction(4)" } button { area 1233 496 40 40 bam lua "getUiString('rgdchec') .. RgUISkin" scaleToClip sequence lua "get4CheckFrame(5)" align left top tooltip lua "getMultiplayerReadyTooltip(5)" action "rgReadyButtonAction(5)" } button { area 1233 590 40 40 bam lua "getUiString('rgdchec') .. RgUISkin" scaleToClip sequence lua "get4CheckFrame(6)" align left top tooltip lua "getMultiplayerReadyTooltip(6)" action "rgReadyButtonAction(6)" } label { area 106 316 207 21 text lua "getUiString('PLAYERS_LABEL')" text style "normal" text color 'X' align center center } label { area 313 316 187 21 text lua "getUiString('PARTY_SLOTS_LABEL')" text style "normal" text color 'X' align center center } label { area 500 316 60 21 text lua "getUiString('RULES_LABEL')" text style "normal" text color 'X' align center center } label { area 101 336 461 51 bam "rgdmmbc1" sequence lua "RgUISkin" scaleToClip align left top } label { area 101 388 461 51 bam "rgdmmbc1" sequence lua "RgUISkin" scaleToClip align left top } label { area 101 440 461 51 bam "rgdmmbc1" sequence lua "RgUISkin" scaleToClip align left top } label { area 101 492 461 51 bam "rgdmmbc1" sequence lua "RgUISkin" scaleToClip align left top } label { area 101 544 461 51 bam "rgdmmbc1" sequence lua "RgUISkin" scaleToClip align left top } label { area 101 596 461 51 bam "rgdmmbc1" sequence lua "RgUISkin" scaleToClip align left top } label { area 154 336 195 51 text lua "getMultiplayerPlayerName(1, false, true)" text style "normal" align left center } label { area 154 388 195 51 text lua "getMultiplayerPlayerName(2, false, true)" text style "normal" align left center } label { area 154 440 195 51 text lua "getMultiplayerPlayerName(3, false, true)" text style "normal" align left center } label { area 154 492 195 51 text lua "getMultiplayerPlayerName(4, false, true)" text style "normal" align left center } label { area 154 544 195 51 text lua "getMultiplayerPlayerName(5, false, true)" text style "normal" align left center } label { area 154 596 195 51 text lua "getMultiplayerPlayerName(6, false, true)" text style "normal" align left center } list -- player list { column -- kick { width lua "getPlayerKickWidth(rowNumber)" label { area 6 5 45 45 } } column --player { width lua "getPlayerNameWidth(rowNumber)" label { area 0 0 195 55 } } column --portraits { width 45 label { area 6 5 25 38 } } column -- permissions { width 10 label { area 6 5 45 45 } } area 101 336 461 311 rowheight 51 table "mpaPlayers" var selectedPlayer --scrollbar 'rgdscrl1' hidehighlight action " if cellNumber == 1 and selectedPlayer > 1 then cellNumber = 0 elseif cellNumber == 2 then cellNumber = 0 elseif cellNumber == 3 then cellNumber = 0 elseif cellNumber == 4 and selectedPlayer > 1 then cellNumber = 0 end " } --kick button { area 106 391 46 44 bam rgdmmkck scaleToClip clickable lua "mpaPlayers[2]['name'] ~= ''" align left top enabled "multiplayerLocalPlayerID == 1" tooltip lua "getUiString('MULTIPALYER_KICK_TOOLTIP')" action "rgKickButtonAction(2)" } button { area 106 443 46 44 bam rgdmmkck scaleToClip clickable lua "mpaPlayers[3]['name'] ~= ''" align left top enabled "multiplayerLocalPlayerID == 1" tooltip lua "getUiString('MULTIPALYER_KICK_TOOLTIP')" action "rgKickButtonAction(3)" } button { area 106 495 46 44 bam rgdmmkck scaleToClip clickable lua "mpaPlayers[4]['name'] ~= ''" align left top enabled "multiplayerLocalPlayerID == 1" tooltip lua "getUiString('MULTIPALYER_KICK_TOOLTIP')" action "rgKickButtonAction(4)" } button { area 106 547 46 44 bam rgdmmkck scaleToClip clickable lua "mpaPlayers[5]['name'] ~= ''" align left top enabled "multiplayerLocalPlayerID == 1" tooltip lua "getUiString('MULTIPALYER_KICK_TOOLTIP')" action "rgKickButtonAction(5)" } button { area 106 599 46 44 bam rgdmmkck scaleToClip clickable lua "mpaPlayers[6]['name'] ~= ''" align left top enabled "multiplayerLocalPlayerID == 1" tooltip lua "getUiString('MULTIPALYER_KICK_TOOLTIP')" action "rgKickButtonAction(6)" } --permissions button { area 512 391 46 44 bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip clickable lua "mpaPlayers[2]['name'] ~= '' and multiplayerLocalPlayerID == 1" align left top tooltip lua "getUiString('MULTIPALYER_PERMISSION_TOOLTIP')" action "rgPermissionButtonAction(2)" } button { area 512 443 46 44 bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip clickable lua "mpaPlayers[3]['name'] ~= '' and multiplayerLocalPlayerID == 1" align left top tooltip lua "getUiString('MULTIPALYER_PERMISSION_TOOLTIP')" action "rgPermissionButtonAction(3)" } button { area 512 495 46 44 bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip clickable lua "mpaPlayers[4]['name'] ~= '' and multiplayerLocalPlayerID == 1" align left top tooltip lua "getUiString('MULTIPALYER_PERMISSION_TOOLTIP')" action "rgPermissionButtonAction(4)" } button { area 512 547 46 44 bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip clickable lua "mpaPlayers[5]['name'] ~= '' and multiplayerLocalPlayerID == 1" align left top tooltip lua "getUiString('MULTIPALYER_PERMISSION_TOOLTIP')" action "rgPermissionButtonAction(5)" } button { area 512 599 46 44 bam lua "rgGetActionbarButtonBam()" sequence 14 ScaleToClip clickable lua "mpaPlayers[6]['name'] ~= '' and multiplayerLocalPlayerID == 1" align left top tooltip lua "getUiString('MULTIPALYER_PERMISSION_TOOLTIP')" action "rgPermissionButtonAction(6)" } --character drag/drop --player 1 button { area 320 342 180 38 actionSimpleDrop " multiplayerStopSwapPortraits(1) " } button { area 320 342 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(1,1)' sequence 1 align center center --No changing control of character 1 } button { area 351 342 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(1,2)' sequence 1 align center center actionSimpleDrag " if multiplayerFromInGame == false then local slot = getMultiplayerPlayerControlledCharacterSlot(1,2) multiplayerStartSwapPortraits(1,slot) elseif multiplayerLocalPlayerID == 1 or multiplayer.player[multiplayerLocalPlayerID].permissions[1] == true then multiplayerScreen:OnModifyButtonClick() end " actionSimpleDrop " multiplayerStopSwapPortraits(1) " } button { area 382 342 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(1,3)' sequence 1 align center center actionSimpleDrag " if multiplayerFromInGame == false then local slot = getMultiplayerPlayerControlledCharacterSlot(1,3) multiplayerStartSwapPortraits(1,slot) elseif multiplayerLocalPlayerID == 1 or multiplayer.player[multiplayerLocalPlayerID].permissions[1] == true then multiplayerScreen:OnModifyButtonClick() end " actionSimpleDrop " multiplayerStopSwapPortraits(1) " } button { area 413 342 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(1,4)' sequence 1 align center center actionSimpleDrag " if multiplayerFromInGame == false then local slot = getMultiplayerPlayerControlledCharacterSlot(1,4) multiplayerStartSwapPortraits(1,slot) elseif multiplayerLocalPlayerID == 1 or multiplayer.player[multiplayerLocalPlayerID].permissions[1] == true then multiplayerScreen:OnModifyButtonClick() end " actionSimpleDrop " multiplayerStopSwapPortraits(1) " } button { area 444 342 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(1,5)' sequence 1 align center center actionSimpleDrag " if multiplayerFromInGame == false then local slot = getMultiplayerPlayerControlledCharacterSlot(1,5) multiplayerStartSwapPortraits(1,slot) elseif multiplayerLocalPlayerID == 1 or multiplayer.player[multiplayerLocalPlayerID].permissions[1] == true then multiplayerScreen:OnModifyButtonClick() end " actionSimpleDrop " multiplayerStopSwapPortraits(1) " } button { area 475 342 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(1,6)' sequence 1 align center center actionSimpleDrag " if multiplayerFromInGame == false then local slot = getMultiplayerPlayerControlledCharacterSlot(1,6) multiplayerStartSwapPortraits(1,slot) elseif multiplayerLocalPlayerID == 1 or multiplayer.player[multiplayerLocalPlayerID].permissions[1] == true then multiplayerScreen:OnModifyButtonClick() end " actionSimpleDrop " multiplayerStopSwapPortraits(1) " } --player 2 button { area 320 394 180 38 actionSimpleDrop " multiplayerStopSwapPortraits(2) " } button { area 320 394 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(2,1)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(2,1) multiplayerStartSwapPortraits(2,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(2) " } button { area 351 394 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(2,2)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(2,2) multiplayerStartSwapPortraits(2,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(2) " } button { area 382 394 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(2,3)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(2,3) multiplayerStartSwapPortraits(2,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(2) " } button { area 413 394 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(2,4)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(2,4) multiplayerStartSwapPortraits(2,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(2) " } button { area 444 394 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(2,5)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(2,5) multiplayerStartSwapPortraits(2,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(2) " } button { area 475 394 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(2,6)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(2,6) multiplayerStartSwapPortraits(2,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(2) " } --player 3 button { area 320 446 180 38 actionSimpleDrop " multiplayerStopSwapPortraits(3) " } button { area 320 446 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(3,1)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(3,1) multiplayerStartSwapPortraits(3,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(3) " } button { area 351 446 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(3,2)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(3,2) multiplayerStartSwapPortraits(3,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(3) " } button { area 382 446 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(3,3)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(3,3) multiplayerStartSwapPortraits(3,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(3) " } button { area 413 446 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(3,4)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(3,4) multiplayerStartSwapPortraits(3,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(3) " } button { area 444 446 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(3,5)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(3,5) multiplayerStartSwapPortraits(3,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(3) " } button { area 475 446 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(3,6)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(3,6) multiplayerStartSwapPortraits(3,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(3) " } --player 4 button { area 320 498 180 38 actionSimpleDrop " multiplayerStopSwapPortraits(4) " } button { area 320 498 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(4,1)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(4,1) multiplayerStartSwapPortraits(4,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(4) " } button { area 351 498 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(4,2)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(4,2) multiplayerStartSwapPortraits(4,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(4) " } button { area 382 498 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(4,3)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(4,3) multiplayerStartSwapPortraits(4,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(4) " } button { area 413 498 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(4,4)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(4,4) multiplayerStartSwapPortraits(4,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(4) " } button { area 444 498 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(4,5)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(4,5) multiplayerStartSwapPortraits(4,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(4) " } button { area 475 498 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(4,6)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(4,6) multiplayerStartSwapPortraits(4,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(4) " } --player 5 button { area 320 550 180 38 actionSimpleDrop " multiplayerStopSwapPortraits(5) " } button { area 320 550 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(5,1)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(5,1) multiplayerStartSwapPortraits(5,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(5) " } button { area 351 550 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(5,2)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(5,2) multiplayerStartSwapPortraits(5,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(5) " } button { area 382 550 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(5,3)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(5,3) multiplayerStartSwapPortraits(5,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(5) " } button { area 413 550 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(5,4)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(5,4) multiplayerStartSwapPortraits(5,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(5) " } button { area 444 550 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(5,5)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(5,5) multiplayerStartSwapPortraits(5,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(5) " } button { area 475 550 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(5,6)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(5,6) multiplayerStartSwapPortraits(5,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(5) " } --player 6 button { area 320 602 180 38 actionSimpleDrop " multiplayerStopSwapPortraits(6) " } button { area 320 602 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(6,1)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(6,1) multiplayerStartSwapPortraits(6,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(6) " } button { area 351 602 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(6,2)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(6,2) multiplayerStartSwapPortraits(6,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(6) " } button { area 382 602 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(6,3)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(6,3) multiplayerStartSwapPortraits(6,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(6) " } button { area 413 602 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(6,4)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(6,4) multiplayerStartSwapPortraits(6,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(6) " } button { area 444 602 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(6,5)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(6,5) multiplayerStartSwapPortraits(6,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(6) " } button { area 475 602 25 38 bitmap lua 'getMultiplayerPlayerControlledCharacter(6,6)' sequence 1 align center center actionSimpleDrag " local slot = getMultiplayerPlayerControlledCharacterSlot(6,6) multiplayerStartSwapPortraits(6,slot) " actionSimpleDrop " multiplayerStopSwapPortraits(6) " } label -- game name { area 106 100 454 47 text lua "multiplayerSessionName" text style 'normal' text point 15 align center center } label -- new game type/save name { area 272 156 288 38 text lua "multiplayerSaveName" text style 'normal' align left center } label -- chapter { area 272 194 288 38 text lua "multiplayerChapter" text style 'normal' align left center } label -- time played { area 272 232 288 38 text lua "multiplayerTimePlayed" text style 'normal' align left center } label -- difficulty { area 272 270 288 38 text lua "multiplayerDifficultyLabel" text style 'normal' align left center } label -- other difficulty { area 106 156 166 152 bam "GUIDIFF" frame lua "multiplayerDifficultyImage" sequence 0 align center center } button { enabled "multiplayerLocalPlayerID == 1" area 524 661 320 70 bam rgdbutm1 ScaleToClip text "MULTIPLAYER_GAME_OPTIONS_BUTTON" text style "button" toggle "levelUpInfoToggle" sequence lua "RgUISkin" clickable lua "createCharScreen:IsHighLevelAbilitiesButtonClickable()" action " helpTextString = Infinity_FetchString(11323) Infinity_PushMenu('MP_OPTIONS') " } button { area 116 661 320 70 bam rgdbutm1 ScaleToClip text "LOGOUT_BUTTON" -- Logout text style "button" sequence lua "RgUISkin" action "multiplayerScreen:OnLogoutButtonClick()" } button { area 932 661 320 70 bam rgdbutm1 ScaleToClip text "START_GAME_BUTTON" -- Done text style "button" sequence lua "RgUISkin" clickable lua "multiplayer.donebuttonclickable" enabled "not multiplayerFromInGame" tooltip lua "getStartGameButtonTooltip()" action "multiplayerScreen:OnMainDoneButtonClick(mulitplayerPreexistingDifficulty)" } button { on escape area 932 661 320 70 bam rgdbutm1 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "multiplayer.donebuttonclickable" enabled "multiplayerFromInGame" tooltip lua "getStartGameButtonTooltip()" action "multiplayerScreen:OnMainDoneButtonClick(mulitplayerPreexistingDifficulty)" } --dragged portrait label { name "multiplayerDraggingPortraitImage" area -20 -20 37 57 bitmap lua 'mpDraggedPortrait' sequence 1 align center center enabled "multiplayerUpdateDraggedPortrait()" } } ` multiplayerPermissions = { {'MULTIPLAYER_PERMISSIONS_MODIFY', 'MULTIPLAYER_PERMISSIONS_MODIFY_TOOLTIP', false, false, 7}, {'MULTIPLAYER_PERMISSIONS_GOLD', 'MULTIPLAYER_PERMISSIONS_GOLD_TOOLTIP', false, false, 0}, {'MULTIPLAYER_PERMISSIONS_TRAVEL', 'MULTIPLAYER_PERMISSIONS_TRAVEL_TOOLTIP', false, false, 1}, {'MULTIPLAYER_PERMISSIONS_VIEW', 'MULTIPLAYER_PERMISSIONS_VIEW_TOOLTIP', false, false, 3}, {'MULTIPLAYER_PERMISSIONS_DIALOGUE','MULTIPLAYER_PERMISSIONS_DIALOGUE_TOOLTIP', false, false, 2}, {'MULTIPLAYER_PERMISSIONS_PAUSE', 'MULTIPLAYER_PERMISSIONS_PAUSE_TOOLTIP', false, false, 4} } function broadcastPermissionChange(player,permission,setting) local player = getMultiplayerPlayerName(player,false,true) local todo = getUiString(multiplayerPermissions[permission][1]) setStringTokenLua("",player) setStringTokenLua("",todo) if setting == true then message = getUiString("MULTIPLAYER_IS_NOW_PERMITTED") else message = getUiString("MULTIPLAYER_IS_NOT_PERMITTED") end removeStringTokenLua("") removeStringTokenLua("") print(message) Infinity_SendChatMessage(message, true) end function getMultiplayerPlayerPermissionDescription() local player = getMultiplayerPlayerName(multiplayerInPermissionForPlayer,false,false) setStringTokenLua("",player) local canPerform = getUiString("MULTIPLAYER_CAN_PERFORM") removeStringTokenLua("") return canPerform end ` menu { name 'MP_PERMISSIONS' align center center modal onOpen " local index = 1 for index = 0, #(multiplayer.player[multiplayerInPermissionForPlayer].permissions), 1 do local luaIndex = -1 local loopLuaIndex = -1 for loopLuaIndex = 1, #multiplayerPermissions, 1 do if multiplayerPermissions[loopLuaIndex][5] == index then luaIndex = loopLuaIndex break end end if luaIndex ~= -1 then if multiplayer.player[multiplayerInPermissionForPlayer].permissions[index] == true then multiplayerPermissions[luaIndex][3] = true multiplayerPermissions[luaIndex][4] = true elseif multiplayer.player[multiplayerInPermissionForPlayer].permissions[index] == false then multiplayerPermissions[luaIndex][3] = false multiplayerPermissions[luaIndex][4] = false else multiplayerPermissions[luaIndex][3] = false multiplayerPermissions[luaIndex][4] = false end end end " label { area 0 0 666 666 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } label { area 104 26 462 45 text style 'button' text "PERMISSIONS_TITLE" } label { area 100 90 470 46 text lua "getMultiplayerPlayerPermissionDescription()" text style "normal" } --bottom buttons button { on return bam 'RGDMBUT1' sequence lua "RgUISkin" ScaleToClip area 130 548 409 75 pad 10 8 10 8 enabled "multiplayerLocalPlayerID == 1" text style "button" text lua "rgString('DONE_BUTTON')" action " local index = 1 for index = #(multiplayerPermissions), 1, -1 do if multiplayerPermissions[index][3] ~= multiplayerPermissions[index][4] then broadcastPermissionChange(multiplayerInPermissionForPlayer,index,multiplayerPermissions[index][3]) multiplayerScreen:OnPermissionButtonClick(multiplayerInPermissionForPlayer - 1, multiplayerPermissions[index][5]) end end multiplayerInPermission = false multiplayerScreen:OnDoneButtonClick() Infinity_PopMenu() " } button { on escape bam 'RGDMBUT1' sequence lua "RgUISkin" ScaleToClip area 130 473 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" action " multiplayerScreen:OnCancelButtonClick() Infinity_PopMenu() " } --permissions button { area 104 154 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerPermissions[1][3] == true" tooltip lua "getUiString(multiplayerPermissions[1][2])" scaleToClip action " if multiplayerLocalPlayerID == 1 then multiplayerPermissions[1][3] = not multiplayerPermissions[1][3] end " } text { area 154 148 416 46 text lua "getUiString(multiplayerPermissions[1][1])" tooltip lua "getUiString(multiplayerPermissions[1][2])" text style "normal" align left center } button { area 104 200 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerPermissions[2][3] == true" tooltip lua "getUiString(multiplayerPermissions[2][2])" scaleToClip action " if multiplayerLocalPlayerID == 1 then multiplayerPermissions[2][3] = not multiplayerPermissions[2][3] end " } text { area 154 194 416 46 text lua "getUiString(multiplayerPermissions[2][1])" tooltip lua "getUiString(multiplayerPermissions[2][2])" text style "normal" align left center } button { area 104 246 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerPermissions[3][3] == true" tooltip lua "getUiString(multiplayerPermissions[3][2])" scaleToClip action " if multiplayerLocalPlayerID == 1 then multiplayerPermissions[3][3] = not multiplayerPermissions[3][3] end " } text { area 154 240 416 46 text lua "getUiString(multiplayerPermissions[3][1])" tooltip lua "getUiString(multiplayerPermissions[3][2])" text style "normal" align left center } button { area 104 292 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerPermissions[4][3] == true" tooltip lua "getUiString(multiplayerPermissions[4][2])" scaleToClip action " if multiplayerLocalPlayerID == 1 then multiplayerPermissions[4][3] = not multiplayerPermissions[4][3] end " } text { area 154 286 416 46 text lua "getUiString(multiplayerPermissions[4][1])" tooltip lua "getUiString(multiplayerPermissions[4][2])" text style "normal" align left center } button { area 104 338 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerPermissions[5][3] == true" tooltip lua "getUiString(multiplayerPermissions[5][2])" scaleToClip action " if multiplayerLocalPlayerID == 1 then multiplayerPermissions[5][3] = not multiplayerPermissions[5][3] end " } text { area 154 332 416 46 text lua "getUiString(multiplayerPermissions[5][1])" tooltip lua "getUiString(multiplayerPermissions[5][2])" text style "normal" align left center } button { area 104 384 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerPermissions[6][3] == true" tooltip lua "getUiString(multiplayerPermissions[6][2])" scaleToClip action " if multiplayerLocalPlayerID == 1 then multiplayerPermissions[6][3] = not multiplayerPermissions[6][3] end " } text { area 154 378 416 46 text lua "getUiString(multiplayerPermissions[6][1])" tooltip lua "getUiString(multiplayerPermissions[6][2])" text style "normal" align left center } } ` multiplayerGameOptions = { {"LISTEN_JOIN_LABEL", "LISTEN_JOIN_TOOLTIP", false, false}, {"ALLOW_REFORM_LABEL", "ALLOW_REFORM_TOOLTIP", false, false} } multiplayerImportOptions = { {"MULTIPLAYER_IMPORT_CHARACTER_RULES_SEI"}, {"MULTIPLAYER_IMPORT_CHARACTER_RULES_SE"}, {"MULTIPLAYER_IMPORT_CHARACTER_RULES_S"} } multiplayerImportOption = 0 function broadcastOptionChange(slot, onOff) if multiplayerLocalPlayerID == 1 then local message = "" if slot < 3 then local setting = getUiString(multiplayerGameOptions[slot][1]) setStringTokenLua("",setting) if onOff == true then message = getUiString("MULTIPLAYER_GAME_WILL_NOW") else message = getUiString("MULTIPLAYER_GAME_WILL_NO_LONGER") end removeStringTokenLua("") else local setting = getUiString(multiplayerImportOptions[slot-2][1]) setStringTokenLua("",setting) message = getUiString("MULTIPLAYER_IMPORT_SETTINGS_CHANGE") removeStringTokenLua("") end print(message) Infinity_SendChatMessage(message, true) end end ` menu { name 'MP_OPTIONS' align center center modal onOpen " multiplayerGameOptions[1][3] = multiplayer.listentojoin multiplayerGameOptions[1][4] = multiplayerGameOptions[1][3] multiplayerGameOptions[2][3] = multiplayer.allowreformparty multiplayerGameOptions[2][4] = multiplayerGameOptions[2][3] multiplayerImportOption = multiplayer.importsetting + 1 " label { area 0 0 666 666 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } label { area 104 26 462 45 text style 'button' text "OPTIONS_TITLE" } label { area 98 96 470 46 text "MULTIPLAYER_IMPORT_CHARACTER_RULES_LABEL" text style "button" } button { area 210 168 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerGameOptions[1][3] == true" tooltip lua "getUiString(multiplayerGameOptions[1][2])" scaleToClip action " multiplayerGameOptions[1][3] = not multiplayerGameOptions[1][3] " } text { area 252 162 303 42 text lua "getUiString(multiplayerGameOptions[1][1])" text style "normal" tooltip lua "getUiString(multiplayerGameOptions[1][2])" align left center } button { area 210 222 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "multiplayerGameOptions[2][3] == true" tooltip lua "getUiString(multiplayerGameOptions[2][2])" scaleToClip action " multiplayerGameOptions[2][3] = not multiplayerGameOptions[2][3] " } text { area 252 216 303 42 text lua "getUiString(multiplayerGameOptions[2][1])" text style "normal" tooltip lua "getUiString(multiplayerGameOptions[2][2])" align left center } button { area 210 332 32 32 bam rgdrnbut sequence lua "RgUISkin" frame lua "currentCellCheck(3)" glow lua "multiplayerImportOption == 1" tooltip lua "getUiString('IMPORT_RULES_TOOLTIP')" scaleToClip action " multiplayerImportOption = 1 " } text { area 252 326 303 42 text lua "getUiString('MULTIPLAYER_IMPORT_CHARACTER_RULES_SEI')" tooltip lua "getUiString('IMPORT_RULES_TOOLTIP')" text style "normal" align left center } button { area 210 380 32 32 bam rgdrnbut sequence lua "RgUISkin" frame lua "currentCellCheck(3)" glow lua "multiplayerImportOption == 2" tooltip lua "getUiString('IMPORT_RULES_TOOLTIP')" scaleToClip action " multiplayerImportOption = 2 " } text { area 252 374 303 42 text lua "getUiString('MULTIPLAYER_IMPORT_CHARACTER_RULES_SE')" tooltip lua "getUiString('IMPORT_RULES_TOOLTIP')" text style "normal" align left center } button { area 210 428 32 32 bam rgdrnbut sequence lua "RgUISkin" frame lua "currentCellCheck(3)" glow lua "multiplayerImportOption == 3" tooltip lua "getUiString('IMPORT_RULES_TOOLTIP')" scaleToClip action " multiplayerImportOption = 3 " } text { area 252 422 212 42 text lua "getUiString('MULTIPLAYER_IMPORT_CHARACTER_RULES_S')" tooltip lua "getUiString('IMPORT_RULES_TOOLTIP')" text style "normal" align left center } --bottom buttons button { on return bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 130 548 409 75 pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" action " if multiplayerImportOption ~= multiplayer.importsetting + 1 then multiplayerScreen:SetImportSetting(multiplayerImportOption - 1) broadcastOptionChange(multiplayerImportOption+2) end if multiplayerGameOptions[1][3] ~= multiplayerGameOptions[1][4] then broadcastOptionChange(1, multiplayerGameOptions[1][3]) multiplayerScreen:ToggleListenToJoin() end if multiplayerGameOptions[2][3] ~= multiplayerGameOptions[2][4] then broadcastOptionChange(2, multiplayerGameOptions[2][3]) multiplayerScreen:ToggleAllowReformParty() end Infinity_PopMenu() " } button { on escape bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 130 473 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" action " multiplayerScreen:OnCancelButtonClick() Infinity_PopMenu() " } } ` function getActivePlayerIndex(index) local ret = -1 local count = 0 local slot = 0 for slot = 1, 6, 1 do if mpaPlayers[slot]["name"] ~= '' then count = count + 1 end if count == index then ret = slot break end end return ret end ` menu { name 'MP_PICKPLAYER' align center center modal label { area 0 0 666 666 bam 'rgdbcsml' scaleToClip sequence lua "RgUISkin" } label { area 104 26 462 45 text style 'button' text "SELECT_PLAYER_TITLE" } label { area 98 102 470 46 text "SELECT_PLAYER_DESCRIPTION" text style "normal" } -- list list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentMultiplayerSelectPlayer)" ScaleToClip } label { area 10 0 340 -1 text lua "getMultiplayerPlayerName(getActivePlayerIndex(rowNumber), false, true)" text style "normal" align left center } } action " " hidehighlight rowheight 44 area 158 165 350 280 table "multiplayer.player" var currentMultiplayerSelectPlayer } button { on return bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 130 548 409 75 pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" action " if mpaCharacters[selectedCharacter]['ready'] == true and mpaCharacters[selectedCharacter]['player'] ~= getActivePlayerIndex(currentMultiplayerSelectPlayer) then multiplayerScreen:OnReadyButtonClick(selectedCharacter-1) end broadcastCharacterControlChange(selectedCharacter, getActivePlayerIndex(currentMultiplayerSelectPlayer)) multiplayerScreen:OnPlayerSelection(getActivePlayerIndex(currentMultiplayerSelectPlayer)-1) Infinity_PopMenu() " } button { on escape bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip area 130 473 409 75 pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" action " Infinity_PopMenu() " } } ` function multiplayerIsDelete () if (multiplayer.character[mpModifyingCharacter+1].portrait ~= '') then return getUiString("DELETE_BUTTON") else return getUiString("CREATE_BUTTON") end end function getModifyConfirmationLabel() print(mpModifyingCharacter+1) return getUiString('MULTIPLAYER_EDIT_CONFIRM').. ' ' .. getMultiplayerCharacterName(mpModifyingCharacter+1) end ` menu { name 'MP_MODIFYCHARACTER' align center center modal button { on escape area 235 75 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" action " Infinity_PopMenu() " } button { on return area 235 150 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString(multiplayerIsDelete())" action " Infinity_PopMenu() multiplayerScreen:SetModifiedCharacterSlot(mpModifyingCharacter) if (multiplayer.character[mpModifyingCharacter+1].portrait ~= '') then multiplayerScreen:OnModifyCharacterDelete() else multiplayerScreen:UpdateModifyCharacterPanel() end " } label { area 0 0 300 300 bam rgdpopup ScaleToClip } label { area 50 50 200 200 text lua "getModifyConfirmationLabel()" text style "normal" text align center center } } menu { name 'MP_ERRORONE' align center center modal button { on return area 235 112 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('DONE_BUTTON')" action " Infinity_PopMenu() " } label { area 0 0 300 300 bam rgdpopup ScaleToClip } label { area 50 50 200 200 text lua "Infinity_FetchString( mpErrorText )" text style "normal" text align center center } } menu { name 'MP_ERRORTWO' align center center modal button { on return enabled "mpErrorState == 2" area 235 150 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('MODIFY_BUTTON')" -- modify action " Infinity_PopMenu() multiplayerScreen:ModifyCharacters() " } button { on return enabled "mpErrorState == 3" area 235 150 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('KICK_BUTTON')" -- kick player action " Infinity_PopMenu() multiplayerScreen:KickPlayer() " } button { on return enabled "mpErrorState == 4" area 235 150 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('LOGOUT_BUTTON')" -- log out action " local index = 1 Infinity_PopMenu() multiplayerScreen:Logout() " } button { on escape area 235 75 400 75 bam rgdmbut1 ScaleToClip pad 10 8 10 8 text style "button" text lua "rgString('CANCEL_BUTTON')" action " Infinity_PopMenu() " } label { area 0 0 300 300 bam rgdpopup ScaleToClip } label { area 50 50 200 200 text lua "Infinity_FetchString( mpErrorText )" text style "normal" text align center center } } ` function dragMPChat(newY) --do a quick bounds check. local area = {Infinity_GetArea("mpChatDisplayBackground")} if(area[4] + newY <= 150) then newY = 150 - area[4] end area = {Infinity_GetArea("mpChatHandle")} local screenWidth, screenHeight = Infinity_GetScreenSize() if(area[2] + area[4] + newY > screenHeight) then newY = screenHeight - area[2] - area[4] end adjustItemGroup({"mpChatDisplayBackground","mpChatDisplay"}, 0, 0, 0, newY) adjustItemGroup({"mpChatEditBackground","mpChatEdit","mpChatHandle"}, 0, newY, 0 , 0) end mpChatTable = {} showMpChat = 0 function updateChatViewed() if(showMpChat == 0) then chatViewed = 0 end end function updateMPChatPreview(message) if(showMpChat == 0) then table.insert(mpChatTable,{text = message}) end end function getMPMessageOpacity() local current = mpChatTable[#mpChatTable] if(current == nil) then return 0 end if(current.displayTime == nil) then current.displayTime = 500 --set the box size Infinity_ScaleToText("mpChatPreview") --give some extra room for the padding adjustItemGroup({"mpChatPreview"},0,0,0,16) end if(current.displayTime > 0) then current.displayTime = current.displayTime - 4 end if(current.displayTime > 255) then return 255 else return current.displayTime end end function getMPMessage() if(#mpChatTable > 0 and mpChatTable[#mpChatTable].displayTime ~= nil) then return mpChatTable[#mpChatTable].text end return nil end function getChatIconOpacity() if(chatViewed == 1) then return 255 end local sinWave = math.sin(Infinity_GetFrameCounter() / 15) local sinWaveAdjusted = (sinWave / 2) + 0.5 return sinWaveAdjusted * 255 end function getChatBarTooltip() if(showMpChat == 0) then return getUiString("MULTIPLAYER_CHAT_BAR_COLLAPSED") else return getUiString("MULTIPLAYER_CHAT_BAR_EXPANDED") end end function resizeMpEditBox() Infinity_ScaleToText('mpChatEdit') local x,y,w,h = Infinity_GetArea('mpChatEdit') local offset = 20 if(h + offset < 42) then h = (42 - offset) end Infinity_SetArea('mpChatEdit',x,y,w,h) Infinity_SetArea('mpChatEditBackground',nil,nil,nil,h + offset) Infinity_SetArea('mpChatHandle',nil,y+h+(offset/2),nil,nil) end function mpChatboxScroll(top, height, contentHeight) if(mpChatboxJumpToBottom and contentHeight > height) then mpChatboxJumpToBottom = nil return height-contentHeight end if(mpChatboxScrollToBottom == 0 and mpChatboxScrollLastHeight == contentHeight) then --defer to default scrolling return nil elseif mpChatboxScrollToBottom == 0 then mpChatboxScrollLastHeight = contentHeight return height-contentHeight end if(contentHeight < height) then --no scrolling required, content fits mpChatboxScrollToBottom = nil return nil end local dT = Infinity_GetClockTicks() - mpChatboxScrollTimeLast mpChatboxScrollTimeLast = Infinity_GetClockTicks() top = top + lastTrimmedContentHeight lastTrimmedContentHeight = 0 local newTop = (dT * -0.25) + top if (newTop + contentHeight > height + 200) then return (height - contentHeight + 200) end if(newTop + contentHeight < height) then mpChatboxScrollToBottom = 0 return height - contentHeight end return newTop end mpChatboxScrollLastHeight = 0 mpChatboxScrollToBottom = nil mpChatboxScrollTimeLast = 0 mpChatEditOverlay = "" ` menu { name "MP_CHAT_OVERLAY" enabled "e:IsMultiplayer()" align right top ignoreEsc offset -120 0 onOpen " chatViewed = 1 " label { name "mpChatDisplayBackground" enabled "showMpChat" area 0 0 300 281 rectangle 4 rectangle opacity 200 } label { area 0 0 300 42 rectangle 0 } label { area 10 8 28 28 bam "CHTICN" frame 1 opacity lua "getChatIconOpacity()" } label { area 10 8 28 28 bam "CHTICN" frame 0 opacity lua "255 - getChatIconOpacity()" } label { area 42 0 252 42 text "MULTIPLAYER_CHAT_LABEL" text style "normal" text align left center } button { area 0 0 300 42 toggle "showMpChat" tooltip lua "getChatBarTooltip()" action " chatViewed = 1 mpChatboxScrollToBottom = 1 if showMpChat == 1 then Infinity_FocusTextEdit('mpChatEdit') else Infinity_FocusTextEdit('') end " } label { name "mpChatPreview" enabled "showMpChat == 0" opacity lua "getMPMessageOpacity()" area 0 42 300 56 text style "normal" text lua "getMPMessage()" pad 8 8 8 8 --rectangle 1 fill 0 0 0 150 ignoreEvents } text { name "mpChatDisplay" enabled "showMpChat" area 20 46 258 180 text lua "mpChatText" scrollbar 'rgdscrl1' scrollbar func "mpChatboxScroll" text style normal } label { name "mpChatEditBackground" enabled "showMpChat" area 0 233 300 48 rectangle 0 } edit { name "mpChatEdit" enabled "showMpChat" area 10 243 280 28 var mpChatEditOverlay scrollbar 'rgdscrl1' text style "edit" maxchars 255 fill 112 111 111 64 action " --On return pressed if (key_pressed == 13) then if (mpChatEditOverlay ~= '') then Infinity_SendChatMessage(mpChatEditOverlay, false) Infinity_PlaySound('WAL_19B') mpChatEditOverlay='' resizeMpEditBox() mpChatboxScrollToBottom = 1 return -1 end end return 1 " actionalt " resizeMpEditBox() " } handle { name "mpChatHandle" area 104 280 95 36 bam "rgdbut3" scaleToClip enabled "showMpChat" tooltip lua "getUiString('MULTIPLAYER_CHAT_RESIZE_TOOLTIP')" actionDrag " dragMPChat(motionY) " } } ` function reinitQuests() for questIdx, quest in pairs(quests) do local noquest = true for objIdx,objective in pairs(quest.objectives) do local noobjective = true for entryIdx,entry in pairs(objective.entries) do if quests[questIdx].objectives[objIdx].entries[entryIdx].stateType ~= const.ENTRY_TYPE_NONE and quests[questIdx].objectives[objIdx].entries[entryIdx].stateType ~= nil then noobjective = false end end if noobjective then quests[questIdx].objectives[objIdx].stateType = const.ENTRY_TYPE_NONE end if quests[questIdx].objectives[objIdx].stateType ~= const.ENTRY_TYPE_NONE and quests[questIdx].objectives[objIdx].stateType ~= nil then noquest = false end end if noquest then quests[questIdx].stateType = const.ENTRY_TYPE_NONE end end end function initQuests() --instead of always searching the quests, just map entry ids to their quests entryToQuest = {} for questIdx, quest in pairs(quests) do quests[questIdx].stateType = const.ENTRY_TYPE_NONE for objIdx,objective in pairs(quest.objectives) do quests[questIdx].objectives[objIdx].stateType = const.ENTRY_TYPE_NONE for entryIdx,entry in pairs(objective.entries) do quests[questIdx].objectives[objIdx].entries[entryIdx].stateType = const.ENTRY_TYPE_NONE entryToQuest[entry.id] = questIdx end end end end function compareByRecvTime(o1,o2) if(not o1.recvTime and not o2.recvTime) then return false end if(not o1.recvTime) then return false end if(not o2.recvTime) then return true end return o1.recvTime > o2.recvTime end function buildEntry(text, recvTime, stateType, chapter, timeStamp) local entry = { text = text, recvTime = recvTime, stateType = stateType, timeStamp = timeStamp, chapters = {} } entry.chapters[chapter] = 1 return entry end --Update a journal entry by the strref/journalId function updateJournalEntry(journalId, recvTime, stateType, chapter, timeStamp) if(stateType == const.ENTRY_TYPE_USER) then local entry = buildEntry(journalId, recvTime, stateType, chapter, timeStamp) table.insert(userNotes,entry) --update display data buildQuestDisplay() return end --find the quest that is parent to this entry. --NOTE this can be placed in a loop if there needs to be more than quest to an entry --this would just mean entryToQuest returns a table that we iterate over local questId = entryToQuest[journalId] if questId == nil or stateType == const.ENTRY_TYPE_INFO then --add loose entries into the looseEntries table so they still get displayed. for _,entry in pairs(looseEntries) do if entry.text == journalId then return end end local entry = buildEntry(journalId, recvTime, stateType, chapter, timeStamp) table.insert(looseEntries,entry) --update display data buildQuestDisplay() return end local quest = quests[questId] if quest == nil then print("JOURNAL ERROR - no quest entry associated with questId "..questId) return end local previous = nil --traverse quest to find objective and entry for objIdx,objective in pairs(quest.objectives) do for entryIdx,entry in pairs(objective.entries) do if(entry.id == journalId) then --now we know where our quest, objective, and entry are --update quest, objective and entry appropriately entry.recvTime = recvTime entry.stateType = stateType if(not entry.chapters) then entry.chapters = {} end entry.chapters[chapter] = 1 entry.timeStamp = timeStamp objective.entries[entryIdx] = entry objective.recvTime = recvTime if(not objective.chapters) then objective.chapters = {} end objective.chapters[chapter] = 1 if(objective.stateType ~= const.ENTRY_TYPE_COMPLETE) then objective.stateType = stateType end quest.objectives[objIdx] = objective quest.recvTime = recvTime if(not quest.chapters) then quest.chapters = {} end quest.chapters[chapter] = 1 if(quest.stateType ~= const.ENTRY_TYPE_COMPLETE) then quest.stateType = stateType end --mark any previous objective as complete if(entry.previous ~= nil) then for objIdx2,objective2 in pairs(quest.objectives) do for k, prevObj in pairs(entry.previous) do if(prevObj == objective2.text) then quest.objectives[objIdx2].stateType = const.ENTRY_TYPE_COMPLETE end end end end quests[questId] = quest --remove all in subgroup (except myself!) if(stateType == const.JOURNAL_STATE_COMPLETE and entry.subGroup) then for k,v in pairs(subGroups[entry.subGroup]) do if(v.id ~= entry.id) then removeJournalEntry(v.id) end end end end end end --sort the objectives. table.sort(quest.objectives,compareByRecvTime) --update display data buildQuestDisplay() end function checkEntryComplete(journalId, stateType) --Check if a journal entry is part of a quest that's already complete --If anything other than an unfinished entry return false. if(stateType ~= const.ENTRY_TYPE_INPROGRESS) then return false end --Check if my quest is marked complete. local questIndex = entryToQuest[journalId] if (quests[questIndex].stateType == const.ENTRY_TYPE_COMPLETE) then return 1 else return 0 end end --this should maybe be done recursively, but i kinda want direct control over each level function buildQuestDisplay() --this is basically just a flatten questDisplay = {} journalDisplay = {} local journalEntries = {} --temp holding table for sorting the entries for k,quest in pairs(quests) do --skip inactive quests if(quest.stateType ~= nil and quest.stateType ~= const.ENTRY_TYPE_NONE) then quest.quest = 1 -- tell the renderer what type of entry this is table.insert(questDisplay, quest) local curQuestIdx = #questDisplay --we'll need to modify current quest with it's children, store a reference. local questChildren = {} for k2,objective in pairs(quest.objectives) do if(objective.stateType ~= const.ENTRY_TYPE_NONE) then objective.objective = 1 objective.parent = curQuestIdx if(objective.text == Infinity_FetchString(quest.text) or objective.text == nil) then objective.text = objective.entries[1].timeStamp end if(objective.stateType ~= const.ENTRY_TYPE_INFO) then --info entries should not go into quests table.insert(questDisplay, objective) table.insert(questChildren, #questDisplay) end local curObjectiveIdx = #questDisplay local objectiveChildren = {} for k3,entry in pairs(objective.entries) do entry.entry = 1 entry.parent = curObjectiveIdx table.insert(questDisplay, entry) table.insert(objectiveChildren, #questDisplay) end questDisplay[curObjectiveIdx].children = objectiveChildren end end questDisplay[curQuestIdx].children = questChildren end end -- add the user entries to the journal display for k,entry in pairs(userNotes) do entry.entry = 1 table.insert(journalEntries,entry) end --add the loose entries (entries without quests) to the journal display for k,entry in pairs(looseEntries) do entry.entry = 1 table.insert(journalEntries,entry) end table.sort(journalEntries, compareByRecvTime) for k,entry in pairs(journalEntries) do local title = {} title.title = 1 title.text = entry.timeStamp title.chapters = entry.chapters table.insert(journalDisplay,title) table.insert(journalDisplay, entry) end end function questContainsSearchString(row) if(journalSearchString == nil or journalSearchString == "") then return 1 end --no search string, do nothing local text = Infinity_FetchString(questDisplay[row].text) if(string.find(string.lower(text),string.lower(journalSearchString))) then return 1 end -- string contains search string. if(questDisplay[row].children == nil) then return nil end --no children, does not contain search string. for k,v in pairs(questDisplay[row].children) do --Infinity_Log(v) if(containsSearchString(v)) then return 1 end -- one of children contains search string end return nil --does not contain search string end function containsChapter(tab, chapter) if(not tab) then return nil end return tab[chapter] end function entryEnabled(row) local rowTab = questDisplay[row] if(rowTab == nil or rowTab.entry == nil or not containsChapter(rowTab.chapters,chapter)) then return nil end if(objectiveEnabled(rowTab.parent)) then return 1 else return nil end -- and questDisplay[rowTab.parent].expanded end function getEntryText(row) return questDisplay[row].timeStamp .. "\n" .. questDisplay[row].text end function objectiveEnabled(row) local rowTab = questDisplay[row] if(rowTab == nil or rowTab.objective == nil or not containsChapter(rowTab.chapters,chapter)) then return nil end if(questEnabled(rowTab.parent) and questDisplay[rowTab.parent].expanded) then return 1 else return nil end end function getObjectiveText(row) local rowTab = questDisplay[row] if (rowTab == nil) then return nil end local text = rowTab.text if(text == "" or text == nil) then text = getUiString("NO_OBJECTIVE_NORMAL") end --objectives shouldn't really display a completed state since they don't actually follow a progression. --if(getFinished(row)) then -- text = "^0xFF666666" .. text .. " (Finished)^-" --end return text end --Many thanks to 'lefreut' function childrenContainsChapter(children) for k,v in pairs(children) do if containsChapter(questDisplay[v].chapters,chapter) then return true end end return nil end function questEnabled(row) --return (questDisplay[row] and questDisplay[row].quest and containsChapter(questDisplay[row].chapters,chapter) and (#questDisplay[row].children > 0)) return (questDisplay[row] and questDisplay[row].quest and containsChapter(questDisplay[row].chapters,chapter) and childrenContainsChapter(questDisplay[row].children)) end function getQuestText(row) local rowTab = questDisplay[row] if (rowTab == nil) then return nil end local text = Infinity_FetchString(rowTab.text) return text end function getArrowFrame(row) if(questDisplay[row] == nil or (questDisplay[row].objective == nil and questDisplay[row].quest == nil)) then return "" end if(questDisplay[row].expanded) then return 0 else return 1 end end function getArrowEnabled(row) if(questDisplay[row].quest == nil and questDisplay[row].objective == nil) then return nil end if(questDisplay[row].objective and not objectiveEnabled(row)) then return nil end if(questDisplay[row].quest and not questEnabled(row)) then return nil end return 1 end function getFinished(row) if(questDisplay[row].stateType == const.ENTRY_TYPE_COMPLETE) then return 1 else return nil end end function showObjectiveSeperator(row) local tab = questDisplay[row] if(objectiveEnabled(row) or entryEnabled(row)) then --seperator is enabled for objective or entry as long as the next thing is an objective. --search until we find something enabled or end of table. local idx = row + 1 while(questDisplay[idx]) do if(objectiveEnabled(idx)) then return 1 else if(questEnabled(idx) or entryEnabled(idx)) then return nil end end idx = idx + 1 end end end function getJournalTitleEnabled(row) return journalDisplay[row].title and containsChapter(journalDisplay[row].chapters,chapter) and journalContainsSearchString(row) end function getJournalTitleText(row) return journalDisplay[row].text end function getJournalEntryEnabled(row) return journalDisplay[row].entry and containsChapter(journalDisplay[row].chapters,chapter) and journalContainsSearchString(row) end function getJournalEntryText(row) local text = Infinity_FetchString(journalDisplay[row].text) if(text == nil or text == "") then text = journalDisplay[row].text end if(journalSearchString and journalSearchString ~= "") then --do the search string highlight text = highlightString(text, journalSearchString, "^0xFF0000FF") end return text end function getJournalDarken(row) local entry = journalDisplay[row] if(entry.title) then return (row == selectedJournal or row + 1 == selectedJournal) end if(entry.entry) then return (row == selectedJournal or row - 1 == selectedJournal) end end function journalContainsSearchString(row) if(journalSearchString == nil or journalSearchString == "") then return 1 end --no search string, do nothing local text = Infinity_FetchString(journalDisplay[row].text) if(text == "") then text = journalDisplay[row].text end --no stringref, use the text. if(string.find(string.lower(text),string.lower(journalSearchString))) then return 1 end -- string contains search string. --check if the corresponding row to this one contains the string. local pairText = nil if(journalDisplay[row].title) then --check the corresponding entry pairText = Infinity_FetchString(journalDisplay[row+1].text) or journalDisplay[row+1].text if(pairText == "") then pairText = journalDisplay[row+1].text end else if (journalDisplay[row].entry) then pairText = Infinity_FetchString(journalDisplay[row-1].text) or journalDisplay[row-1].text if(pairText == "") then pairText = journalDisplay[row-1].text end end end if(string.find(string.lower(pairText),string.lower(journalSearchString))) then return 1 end -- pair string contains search string. return nil --does not contain search string end rgJournalOffsetX = 0 rgJournalOffsetY = 0 function dragJournal() local offsetX,offsetY,menuWidth,menuHeight = Infinity_GetMenuArea('JOURNAL') offsetX = offsetX + motionX offsetY = offsetY + motionY if(offsetY < 0) then offsetY = 0 end if(offsetX < 0) then offsetX = 0 end local screenWidth, screenHeight = Infinity_GetScreenSize() if(offsetX > screenWidth - 440) then offsetX = screenWidth - 440 end rgJournalOffsetX = offsetX rgJournalOffsetY = offsetY Infinity_SetOffset('JOURNAL', offsetX, offsetY) end function rgResizeJournal(newY) local x,y,w,hOld = Infinity_GetArea('rgSmallJournalArea') if hOld <= 200 then hOld = 200 end h = hOld - newY if hOld == 200 and newY <= 0 then newY = 0 else newY = hOld - h end if hOld + newY <= 200 then newY = 0 end adjustItemGroup({"rgSmallJournalHandle"},0,newY,0,0) adjustItemGroup({"rgSmallJournalArea","rgSmallJournalQuests","rgSmallJournalList","journalNoteEditArea"},0,0,0,newY) end function journalEntryClickable(selectedJournal) local entry = journalDisplay[selectedJournal] if(entry) then return true end end function getJournalEntryRef(selectedJournal) local entry = journalDisplay[selectedJournal] if(not entry) then return end if(entry.title) then return journalDisplay[selectedJournal + 1].text else return entry.text end end function getJournalBackgroundFrame() if(journalMode == const.JOURNAL_MODE_QUESTS) then return 0 else return 1 end end function rgCurrentFinishedQuests(row) if rgIsCurrentQuests == 1 then return (questDisplay[row].stateType ~= const.ENTRY_TYPE_COMPLETE) else return (questDisplay[row].stateType == const.ENTRY_TYPE_COMPLETE) end end function rgCurrentFinishedLabel() if journalMode == const.JOURNAL_MODE_QUESTS then if rgIsCurrentQuests == 1 then return getUiString('QUESTS_LABEL') .. ': ' .. getUiString('CURRENT_LABEL') else return getUiString('QUESTS_LABEL') .. ': ' .. getUiString("OBJECTIVE_FINISHED_NORMAL") end else return getUiString('JOURNAL_LABEL') end end function rgGetQuestText(rowNumber) if RgUISkin == 0 then if questDisplay[rowNumber].expanded == 1 then return '^1• ' .. getQuestText(rowNumber) else return '^D• ' .. getQuestText(rowNumber) end else if questDisplay[rowNumber].expanded == 1 then return '^B• ' .. getQuestText(rowNumber) else return '^1• ' .. getQuestText(rowNumber) end end end function rgGetQuestSelection(rowNumber) if questDisplay[rowNumber].expanded == 1 then return (RgUISkin*2) + 1 else return RgUISkin*2 end end function rgBestiaryJournalEntry(text) if (string.match(text, getUiString('RG_BESTIARY'))) then return 1 else return 0 end end function rgBestiaryJournalEntryCount() local ret = 0 for i=1,#rgJournalBestiary,1 do if rgBestiaryJournalEntry(Infinity_FetchString(rgJournalBestiary[i].text)) == 1 then ret = ret + 1 end end return ret end function rgGetBestiaryEntryTitle(text) local list = {} for i in string.gmatch(text, "[^;]+") do table.insert(list, i); end str = string.gsub(list[1], getUiString('RG_BESTIARY'), "") return str end function rgGetBestiaryCategory(text) local ret = '' if (string.match(text, getUiString('RG_BESTIARY'))) then local list = {} for i in string.gmatch(text, "[^;]+") do table.insert(list, i); end str = string.gsub(list[1], getUiString('RG_BESTIARY'), "") for i=1,#rgBeasts,1 do if Infinity_FetchString(rgBeasts[i].name) == str and rgBeasts[i].grp ~= '' and rgBeasts[i].name ~= rgBeasts[i].grp then if string.find(rgBeasts[i].grp, "RGG") then ret = BestiaryStrings[rgBeasts[i].grp] .. ', ' else ret = Infinity_FetchString(rgBeasts[i].grp) .. ', ' end break end end end return ret end function rgGetBestiaryBoss(row) if rgGetBestiaryCategory(Infinity_FetchString(rgJournalBestiary[row].text)) == BestiaryStrings['RGG_BOSS'] .. ', ' then return true else return false end end function rgGetBestiaryCategoryOrder(text) local ret = '' if (string.match(text, getUiString('RG_BESTIARY'))) then local list = {} for i in string.gmatch(text, "[^;]+") do table.insert(list, i); end str = string.gsub(list[1], getUiString('RG_BESTIARY'), "") ret = str for i=1,#rgBeasts,1 do if Infinity_FetchString(rgBeasts[i].name) == str and rgBeasts[i].grp ~= '' and rgBeasts[i].name ~= rgBeasts[i].grp then local r = '' if string.find(rgBeasts[i].grp, "RGG") then ret = BestiaryStrings[rgBeasts[i].grp] .. ', ' else ret = Infinity_FetchString(rgBeasts[i].grp) .. ', ' end break end end end return ret end function rgRemoveFirstLine(str) local Lines = {} for i in string.gmatch(str, "[^\n]+") do table.insert(Lines, i); end table.remove(Lines, 1) return table.concat(Lines, "\n") --return Lines[1] end function rgGetBestiaryDescription(text) local list = {} local ret = '' return ret end function rgGetBestiaryDesc(text) local ret = '' if string.find(text, "RGB") then ret = BestiaryStrings[text] else local stref = text - 0 ret = Infinity_FetchString(text) if stref < 16100 and stref > 15000 then --bg1 descriptions ret = rgRemoveFirstLine(Infinity_FetchString(text)) end end return ret end function rgGetBestiaryKills(text) local list = {} for i in string.gmatch(text, "[^;]+") do table.insert(list, i); end local kills = 1 if #list == 2 then kills = list[2] end return kills - 0 end function rgGetBestiaryResistancesList(index,kills) local list = {} table.insert(list,rgGetGameEngineString( 24445,24445,32204,15544))--resistances if kills >= RgBestiaryKoef * 6 then if rgBeasts[index].res.fir > 0 then if rgBeasts[index].res.mfi > 0 then table.insert(list,rgGetGameEngineString(24446,24446,32213,15545) .. ' (' .. rgGetGameEngineString(24450,24450,62146,15581) .. '): ' .. rgBeasts[index].res.fir .. ' (' .. rgBeasts[index].res.mfi .. ')') else table.insert(list,rgGetGameEngineString(24446,24446,32213,15545) .. ': ' .. rgBeasts[index].res.fir) end end if rgBeasts[index].res.col > 0 then if rgBeasts[index].res.mco > 0 then table.insert(list,rgGetGameEngineString(24447,24447,32214,15546) .. ' (' .. rgGetGameEngineString(24450,24450,62146,15581) .. '): ' .. rgBeasts[index].res.col .. ' (' .. rgBeasts[index].res.mco .. ')') else table.insert(list,rgGetGameEngineString(24447,24447,32214,15546) .. ': ' .. rgBeasts[index].res.fir) end end if rgBeasts[index].res.ele > 0 then table.insert(list,rgGetGameEngineString(24448,24448,32220,15577) .. ': ' .. rgBeasts[index].res.ele) end if rgBeasts[index].res.aci > 0 then table.insert(list,rgGetGameEngineString(24449,24449,32221,15577) .. ': ' .. rgBeasts[index].res.aci) end if rgBeasts[index].res.mag > 0 then table.insert(list,rgGetGameEngineString(24450,24450,62146,15581) .. ': ' .. rgBeasts[index].res.mag) end if rgBeasts[index].res.mis > 0 then table.insert(list,Infinity_FetchString(11767) .. ': ' .. rgBeasts[index].res.mis) end if rgBeasts[index].res.sla > 0 then table.insert(list,Infinity_FetchString(11768) .. ': ' .. rgBeasts[index].res.sla) end if rgBeasts[index].res.pie > 0 then table.insert(list,Infinity_FetchString(11769) .. ': ' .. rgBeasts[index].res.pie) end if rgBeasts[index].res.cru > 0 then table.insert(list,Infinity_FetchString(11770) .. ': ' .. rgBeasts[index].res.cru) end if #list == 1 then table.insert(list,rgGetGameEngineString( 24455,24455,61560,17093))--none end else table.insert(list,'???') end return list end function rgGetBestiaryResistances(index,kills) local list = {} if kills >= RgBestiaryKoef * 6 then if rgBeasts[index].res.fir ~= 0 then --table.insert(list,10) table.insert(list,rgBeasts[index].res.fir .. ';' .. 10) end if rgBeasts[index].res.col ~= 0 then --table.insert(list,11) table.insert(list,rgBeasts[index].res.col .. ';' .. 11) end if rgBeasts[index].res.ele ~= 0 then --table.insert(list,12) table.insert(list,rgBeasts[index].res.ele .. ';' .. 12) end if rgBeasts[index].res.aci ~= 0 then --table.insert(list,13) table.insert(list,rgBeasts[index].res.aci .. ';' .. 13) end if rgBeasts[index].res.mag ~= 0 then --table.insert(list,8) table.insert(list,rgBeasts[index].res.mag .. ';' .. 8) end if rgBeasts[index].res.mfi ~= 0 then --table.insert(list,14) table.insert(list,rgBeasts[index].res.mfi .. ';' .. 14) end if rgBeasts[index].res.mco ~= 0 then --table.insert(list,15) table.insert(list,rgBeasts[index].res.mco .. ';' .. 15) end if rgBeasts[index].res.mis ~= 0 then --table.insert(list,1) table.insert(list,rgBeasts[index].res.mis .. ';' .. 1) end if rgBeasts[index].res.sla ~= 0 then --table.insert(list,2) table.insert(list,rgBeasts[index].res.sla .. ';' .. 2) end if rgBeasts[index].res.pie ~= 0 then --table.insert(list,4) table.insert(list,rgBeasts[index].res.pie .. ';' .. 4) end if rgBeasts[index].res.cru ~= 0 then --table.insert(list,3) table.insert(list,rgBeasts[index].res.cru .. ';' .. 3) end if #list < 12 then local dif = 12-#list for i=1,dif,1 do table.insert(list,'') end end else for i=1,12,1 do table.insert(list,'') end end return list end function rgGetBestiResistRow(text) local list = {} for i in string.gmatch(text, "[^;]+") do table.insert(list, i); end return list end function rgGetBestiStatText(text, row) if row == 8 or row == 9 then return rgGetBestiResistRow(text)[1] else return text end end function rgGetBestiaryStat(kills,treshold,text) if kills < RgBestiaryKoef*treshold then text = '???' end return text end function rgGetBestiaryResi(kills,res1) local text = '' if kills < RgBestiaryKoef*6 then text = rgGetGameEngineString( 24445,24445,32204,15544) .. ': ' .. '???' else text = rgGetGameEngineString( 24445,24445,32204,15544) if res1 == '' then text = rgGetGameEngineString( 24445,24445,32204,15544) .. ': ' .. rgGetGameEngineString( 24455,24455,61560,17093)--none end end return text end function rgBestCircFrame(row) local ret = 0 if row > 4 then return 1 end return ret end function rgBestApr(text) if text == 6 then return '1/2' elseif text == 7 then return '3/2' elseif text == 8 then return '5/2' elseif text == 9 then return '7/2' elseif text == 10 then return '9/2' else return text end end function rgGetBestiaryStatistics(text) local kills = rgGetBestiaryKills(text) local endList = {} for i=1,#rgBeasts,1 do if Infinity_FetchString(rgBeasts[i].name) == str then local kil = rgGetBestiaryStat(kills,0,rgFirstLetterUpper(Infinity_FetchString(11954) .. ': ' .. kills)) local exp = rgGetBestiaryStat(kills,0,getUiString('XP_LABEL') .. ': ' .. rgBeasts[i].xp) local lvl = rgGetBestiaryStat(kills,2,rgBeasts[i].lvl) local hps = rgGetBestiaryStat(kills,1,rgBeasts[i].hp) local acb = rgGetBestiaryStat(kills,1,rgBeasts[i].ac) local thc = rgGetBestiaryStat(kills,2,rgBeasts[i].thc) local apr = rgBestApr(rgGetBestiaryStat(kills,2,rgBeasts[i].apr)) local abi = rgGetBestiaryStat(kills,0,getUiString('HIGH_LEVEL_ABILITIES_TITLE')) local str = rgGetBestiaryStat(kills,3,rgBeasts[i].abi.str) local dex = rgGetBestiaryStat(kills,3,rgBeasts[i].abi.dex) local con = rgGetBestiaryStat(kills,3,rgBeasts[i].abi.con) local int = rgGetBestiaryStat(kills,4,rgBeasts[i].abi.int) local wis = rgGetBestiaryStat(kills,4,rgBeasts[i].abi.wis) local cha = rgGetBestiaryStat(kills,4,rgBeasts[i].abi.cha) local sav = rgGetBestiaryStat(kills,0,Infinity_FetchString(17379)) local dea = rgGetBestiaryStat(kills,5,rgBeasts[i].sav.dea) local wan = rgGetBestiaryStat(kills,5,rgBeasts[i].sav.wan) local pol = rgGetBestiaryStat(kills,5,rgBeasts[i].sav.pol) local bre = rgGetBestiaryStat(kills,5,rgBeasts[i].sav.bre) local spe = rgGetBestiaryStat(kills,5,rgBeasts[i].sav.spe) local res = rgGetBestiaryResistances(i,kills) local rez = rgGetBestiaryResi(kills,res[1]) local alg = Infinity_FetchString(1049) .. ': ' .. rgGetBestiaryStat(kills,7,Infinity_FetchString(rgBeasts[i].alg)) local des = rgGetBestiaryStat(kills,0,rgGetBestiaryDesc(rgBeasts[i].desc)) table.insert(endList, {kil,exp,'','','',''}) table.insert(endList, {lvl,hps,acb,thc,apr,''}) table.insert(endList, {abi,'','','','',''}) table.insert(endList, {str,dex,con,int,wis,cha}) table.insert(endList, {sav,'','','','',''}) table.insert(endList, {dea,wan,pol,bre,spe,''}) table.insert(endList, {rez,'','','','',''}) table.insert(endList, {res[1],res[2],res[3],res[4],res[5],res[6]}) table.insert(endList, {res[7],res[8],res[9],res[10],res[11],''}) table.insert(endList, {alg,'','','','',''}) --table.insert(endList, {'','','','','',''}) table.insert(endList, {des,'','','','',''}) end end return endList end function rgGetAlignmentShort(strref) if strref == 1102 then return 'LG' elseif strref == 1103 then return 'LE' elseif strref == 1104 then return 'LN' elseif strref == 1105 then return 'NG' elseif strref == 1106 then return 'TN' elseif strref == 1107 then return 'NE' elseif strref == 1108 then return 'CG' elseif strref == 1109 then return 'CN' elseif strref == 1110 then return 'CE' end end function rgGetBestiaryPicture(text) local ret = 0 local list = {} for i in string.gmatch(text, "[^;]+") do table.insert(list, i); end str = string.gsub(list[1], getUiString('RG_BESTIARY'), "") for i=1,#rgBeasts,1 do if Infinity_FetchString(rgBeasts[i].name) == str then ret = rgBeasts[i].pic end end return ret end function rgGetJournalRowTextColor(row, var) if(rgGetHighlightSkin(row, var) == 0) then return '^D• ' else return '^1• ' end end function rgBestiaryGetHighestPartyLevel() local charTable = {} local curCharId = id Infinity_OnPortraitLClick(0) local CharId1 = id --Infinity_UpdateLuaStats() table.insert(charTable, rgGetClassLevelNumber()) Infinity_OnPortraitLClick(1) local CharId2 = id --Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 1 then table.insert(charTable, rgGetClassLevelNumber()) end Infinity_OnPortraitLClick(2) local CharId3 = id --Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 2 then table.insert(charTable, rgGetClassLevelNumber()) end Infinity_OnPortraitLClick(3) local CharId4 = id --Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 3 then table.insert(charTable, rgGetClassLevelNumber()) end Infinity_OnPortraitLClick(4) local CharId5 = id --Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 4 then table.insert(charTable, rgGetClassLevelNumber()) end Infinity_OnPortraitLClick(5) local CharId6 = id --Infinity_UpdateLuaStats() if Infinity_GetNumCharacters() > 5 then table.insert(charTable, rgGetClassLevelNumber()) end table.sort(charTable) local out = charTable[#charTable] return out end function rgGetClassLevelNumber() local rgLevel1 = string.match(characters[id].classlevel.first.details, '%d.') local rgLevel2 = '' local rgLevel3 = '' local rgLevel1x = string.match(rgLevel1, '[^\n]+') - 0 local rgLevel2x = 0 local rgLevel3x = 0 local list = {} table.insert(list,rgLevel1x) if characters[id].classlevel.second ~= nil then rgLevel2 = string.match(characters[id].classlevel.second.details, '%d.') rgLevel2x = string.match(rgLevel2, '[^\n]+') - 0 table.insert(list,rgLevel2x) end if characters[id].classlevel.third ~= nil then rgLevel3 = string.match(characters[id].classlevel.third.details, '%d.') rgLevel3x = string.match(rgLevel3, '[^\n]+') - 0 table.insert(list,rgLevel3x) end table.sort(list) local out = list[#list] return out end function rgOrderBestiary(s1,s2) local out1 = rgGetBestiaryCategoryOrder(Infinity_FetchString(s1.text)):lower() .. Infinity_FetchString(s1.text):lower() local out2 = rgGetBestiaryCategoryOrder(Infinity_FetchString(s2.text)):lower() .. Infinity_FetchString(s2.text):lower() return out1 < out2 end function rgOrderJournalLibrary(s1,s2) return s1.text < s2.text end function rgLibraryJournalEntry(text) if (string.match(text, getUiString('RG_LIBRARY'))) then return 1 else return 0 end end function rgGetLibraryEntryTitle(text) str = string.gsub(text, getUiString('RG_LIBRARY'), "") return str end function rgGetLibraryDescription(text) str = string.gsub(text, getUiString('RG_LIBRARY'), "") for i=1,#rgLibrary,1 do if Infinity_FetchString(rgLibrary[i][1]) == str then return Infinity_FetchString(rgLibrary[i][2]) end end end function rgLibraryJournalEntryCount() local ret = 0 for i=1,#rgJournalLibrary,1 do if rgLibraryJournalEntry(Infinity_FetchString(rgJournalLibrary[i].text)) == 1 then ret = ret + 1 end end return ret end function rgJournalTabFrame1(jMode,jState) if journalMode == jMode and rgIsCurrentQuests == jState then return 2 else return 0 end end function rgJournalTabFrame2(jMode,jState) if journalMode == jMode and rgIsJournalBestiary == jState then return 2 else return 0 end end function rgJournalBackground() if journalMode == const.JOURNAL_MODE_QUESTS then return 'rgdbcjou' else return 'rgdbcjo1' end end journalMode = const.JOURNAL_MODE_QUESTS journalSearchString = "" rgLargeJournal = 1 rgLargeJournalOpenOnce = 0 rgJournalActive = 0 rgJournalBestiary = {} rgJournalLibrary = {} rgBeastStats = {} rgBestiaryCount = 0 rgLibraryCount = 0 rgBestiaryBoss = 0 ` menu { name 'JOURNAL' align left top ignoreEsc --modal onopen " rgIsCurrentQuests = 1 rgJournalActive = 1 rgJournalBestiary = journalDisplay rgJournalLibrary = journalDisplay --rgTestb = rgBestiaryGetHighestPartyLevel() if rgLargeJournal == 1 then if rgLargeJournalOpenOnce == 0 then rgLargeJournalOpenOnce = 1 e:GetActiveEngine():OnLeftPanelButtonClick(0) e:SelectEngine(journalScreen) else rgLargeJournalOpenOnce = 0 Infinity_PushMenu('RG_MENU_BAR') local screenWidth, screenHeight = Infinity_GetScreenSize() local w = (screenWidth - 1365) / 2 local h = (screenHeight - 768) / 2 Infinity_SetOffset('JOURNAL',w, h) end else Infinity_SetOffset('JOURNAL',rgJournalOffsetX, rgJournalOffsetY) end if RgUISkin == 3 then Infinity_SetArea('rgQuestTable',634,178,624,536) Infinity_SetArea('rgJournalTable',568,178,690,532) Infinity_SetArea('rgBeastTable',552,215,720,480) Infinity_SetArea('rgBeastsTable',87,174,446,542) else Infinity_SetArea('rgQuestTable',622,178,624,526) Infinity_SetArea('rgJournalTable',556,178,690,522) Infinity_SetArea('rgBeastTable',550,215,710,480) Infinity_SetArea('rgBeastsTable',87,174,449,542) end reinitQuests() buildQuestDisplay() chapter = math.max(0,Infinity_GetMaxChapterPage()); local rgbj = rgBestiaryJournalEntryCount() local rgbc = rgBestiaryCount if rgbj ~= rgbc then selectedBeast = nil end rgBestiaryCount = rgBestiaryJournalEntryCount() table.sort(rgJournalBestiary,rgOrderBestiary) local rglj = rgLibraryJournalEntryCount() local rglc = rgLibraryCount if rglj ~= rglc then rgSelectedBook = nil end rgLibraryCount = rglj rgLibraryDescString = rgGetLibraryDescription(rgGetLibraryEntryTitle(Infinity_FetchString(rgJournalLibrary[rgSelectedBook].text))) --if selectedBeast ~= 0 then rgBeastDescString = rgGetBestiaryDescription(rgGetBestiaryEntryTitle(Infinity_FetchString(rgJournalBestiary[selectedBeast].text))) rgBeastTitleString = rgGetBestiaryEntryTitle(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) rgBeastStats = rgGetBestiaryStatistics(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) rgGetBestiaryFrame = rgGetBestiaryPicture(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) --end table.sort(rgJournalLibrary,rgOrderJournalLibrary) " onClose " rgJournalActive = 0 Infinity_PopMenu('RG_MENU_BAR') if rgLargeJournal == 1 then showJournal = 0 end " label { enabled "rgLargeJournal == 1" name 'rgdbcjou1' area 0 0 768 768 bam lua "rgJournalBackground()" frame 0 sequence lua "RgUISkin" scaleToClip } label { enabled "rgLargeJournal == 1" name 'rgdbcjou2' area 597 0 768 768 bam lua "rgJournalBackground()" frame 1 sequence lua "RgUISkin" scaleToClip } button { enabled "rgLargeJournal == 1 and rgGameEngine ~= 3" area 1077 34 58 54 bam rgdjobut scaleToClip tooltip lua "getUiString('RG_JOURNAL_MODE1')" sequence lua "rgGetInvModeSequence()" --toggle rgLargeJournal action " --e:SelectEngine(journalScreen) rgLargeJournal = 0 e:GetActiveEngine():OnLeftPanelButtonClick(0) if showJournal == 0 then e:GetActiveEngine():OnLeftPanelButtonClick(2) end --Infinity_PopMenu('RG_MENU_BAR') --e:GetActiveEngine():OnLeftPanelButtonClick(2) --e:GetActiveEngine():OnLeftPanelButtonClick(2) --e:GetActiveEngine():OnLeftPanelButtonClick(2) --local act = rgJournalActive --e:GetActiveEngine():OnLeftPanelButtonClick(0) --if act == 0 and rgLargeJournal == 1 then -- e:GetActiveEngine():OnLeftPanelButtonClick(2) --end " } label -- Chapter { enabled "rgLargeJournal == 1 and (rgIsJournalBestiary == 0 or journalMode == const.JOURNAL_MODE_QUESTS) and RgUISkin < 3" area 206 108 228 42 text lua "rgString(chapterText())" text style "rg_trajan" text align center center text color '$' } button --prev chapter { enabled "rgLargeJournal == 1 and (rgIsJournalBestiary == 0 or journalMode == const.JOURNAL_MODE_QUESTS) and RgUISkin < 3" area 445 103 50 50 bam RGDAROW1 ScaleToClip Sequence 1 action " incrChapter(1); " } button { enabled "rgLargeJournal == 1 and (rgIsJournalBestiary == 0 or journalMode == const.JOURNAL_MODE_QUESTS) and RgUISkin < 3" area 145 103 50 50 bam RGDAROW1 ScaleToClip action " incrChapter(-1); " } label -- Chapter { enabled "rgLargeJournal == 1 and (rgIsJournalBestiary == 0 or journalMode == const.JOURNAL_MODE_QUESTS) and RgUISkin == 3" area 196 100 228 42 text lua "rgString(chapterText())" text style "rg_trajan" text align center center text color '$' } button --prev chapter { enabled "rgLargeJournal == 1 and (rgIsJournalBestiary == 0 or journalMode == const.JOURNAL_MODE_QUESTS) and RgUISkin == 3" area 435 95 50 50 bam RGDAROW1 ScaleToClip Sequence 1 action " incrChapter(1); " } button { enabled "rgLargeJournal == 1 and (rgIsJournalBestiary == 0 or journalMode == const.JOURNAL_MODE_QUESTS) and RgUISkin == 3" area 135 95 50 50 bam RGDAROW1 ScaleToClip action " incrChapter(-1); " } label -- bestiary { enabled "rgLargeJournal == 1 and rgIsJournalBestiary == 1 and journalMode == const.JOURNAL_MODE_JOURNAL and rgBestiaryBoss == 0 and RgUISkin < 3" area 206 108 228 42 --text lua "rgString(getUiString('RG_BEASTS') .. ': ' .. rgBestiaryCount .. ' / ' .. #rgBeasts)" text lua "rgString(getUiString('RG_BEASTS'))" text style "rg_trajan" text align center center } label -- bestiary bosses { enabled "rgLargeJournal == 1 and rgIsJournalBestiary == 1 and journalMode == const.JOURNAL_MODE_JOURNAL and rgBestiaryBoss == 1 and RgUISkin < 3" area 206 108 228 42 text lua "rgString(getUiString('RG_BOSSES'))" text style "rg_trajan" text align center center } label -- library count { enabled "rgLargeJournal == 1 and rgIsJournalBestiary == 2 and journalMode == const.JOURNAL_MODE_JOURNAL and RgUISkin < 3" area 206 108 228 42 text lua "rgString(getUiString('RG_BOOKS') .. ': ' .. rgLibraryCount .. ' / ' .. #rgLibrary)" text style "rg_trajan" text align center center } label -- bestiary { enabled "rgLargeJournal == 1 and rgIsJournalBestiary == 1 and journalMode == const.JOURNAL_MODE_JOURNAL and rgBestiaryBoss == 0 and RgUISkin == 3" area 196 100 228 42 --text lua "rgString(getUiString('RG_BEASTS') .. ': ' .. rgBestiaryCount .. ' / ' .. #rgBeasts)" text lua "rgString(getUiString('RG_BEASTS'))" text style "rg_trajan" text align center center } label -- bestiary bosses { enabled "rgLargeJournal == 1 and rgIsJournalBestiary == 1 and journalMode == const.JOURNAL_MODE_JOURNAL and rgBestiaryBoss == 1 and RgUISkin == 3" area 196 100 228 42 text lua "rgString(getUiString('RG_BOSSES'))" text style "rg_trajan" text align center center } label -- library count { enabled "rgLargeJournal == 1 and rgIsJournalBestiary == 2 and journalMode == const.JOURNAL_MODE_JOURNAL and RgUISkin == 3" area 196 100 228 42 text lua "rgString(getUiString('RG_BOOKS') .. ': ' .. rgLibraryCount .. ' / ' .. #rgLibrary)" text style "rg_trajan" text align center center } button { enabled "rgLargeJournal == 1" area 550 96 142 54 text lua "rgString('CURRENT_LABEL')" text style "rg_trajan" text align center center text color '$' text point 12 bam RGDSBUT2 sequence lua "RgUISkin" frame lua "rgJournalTabFrame1(const.JOURNAL_MODE_QUESTS,1)" ScaleToClip --glow lua "journalMode == const.JOURNAL_MODE_QUESTS and rgIsCurrentQuests == 1" --highlightgroup rgjournalbutts action " journalMode = const.JOURNAL_MODE_QUESTS rgIsCurrentQuests = 1 " } button { enabled "rgLargeJournal == 1" area 692 96 142 54 text lua "rgString('OBJECTIVE_FINISHED_NORMAL')" text style "rg_trajan" text align center center text color '$' text point 12 bam RGDSBUT2 sequence lua "RgUISkin" frame lua "rgJournalTabFrame1(const.JOURNAL_MODE_QUESTS,0)" ScaleToClip --glow lua "journalMode == const.JOURNAL_MODE_QUESTS and rgIsCurrentQuests == 0" --highlightgroup rgjournalbutts action " journalMode = const.JOURNAL_MODE_QUESTS rgIsCurrentQuests = 0 " } button { enabled "rgLargeJournal == 1" area 834 96 142 54 text lua "rgString('JOURNAL_LABEL')" text style "rg_trajan" text point 12 text align center center text color '$' bam RGDSBUT2 sequence lua "RgUISkin" ScaleToClip frame lua "rgJournalTabFrame2(const.JOURNAL_MODE_JOURNAL,0)" --glow lua "journalMode == const.JOURNAL_MODE_JOURNAL and rgIsJournalBestiary == 0" --highlightgroup rgjournalbutts action " journalMode = const.JOURNAL_MODE_JOURNAL rgIsJournalBestiary = 0 " } button { enabled "rgLargeJournal == 1" area 976 96 142 54 text lua "rgString('RG_BESTIARY_TITLE')" text style "rg_trajan" text point 12 text align center center text color '$' bam RGDSBUT2 sequence lua "RgUISkin" ScaleToClip frame lua "rgJournalTabFrame2(const.JOURNAL_MODE_JOURNAL,1)" --glow lua "journalMode == const.JOURNAL_MODE_JOURNAL and rgIsJournalBestiary == 1" --highlightgroup rgjournalbutts action " journalMode = const.JOURNAL_MODE_JOURNAL rgIsJournalBestiary = 1 table.sort(rgJournalBestiary,rgOrderBestiary) " } --1088 96 172 54 button { enabled "rgLargeJournal == 1" area 1118 96 142 54 text lua "rgString('RG_LIBRARY_TITLE')" text style "rg_trajan" text point 12 text align center center text color '$' bam RGDSBUT2 sequence lua "RgUISkin" ScaleToClip frame lua "rgJournalTabFrame2(const.JOURNAL_MODE_JOURNAL,2)" --glow lua "journalMode == const.JOURNAL_MODE_JOURNAL and rgIsJournalBestiary == 1" --highlightgroup rgjournalbutts action " journalMode = const.JOURNAL_MODE_JOURNAL rgIsJournalBestiary = 2 table.sort(rgJournalLibrary,rgOrderJournalLibrary) " } list { column { width 100 label { enabled "(questEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber)) or getQuestText(rowNumber) == rgGetGameEngineString(31270, 31270, 74295, 37872)" -- and questDisplay[rowNumber].expanded == 1 area 0 0 -1 -1 bam rgdslct --sequence lua "rgGetSelectedHighlight(rowNumber, selectedQuest)" sequence lua "rgGetQuestSelection(rowNumber)" --sequence lua "RgUISkin + 1" ScaleToClip } label { enabled "(questEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber)) or getQuestText(rowNumber) == rgGetGameEngineString(31270, 31270, 74295, 37872)" area 15 0 -1 -1 --text lua "getQuestText(rowNumber)" text lua "rgGetQuestText(rowNumber)" --text lua "questDisplay[rowNumber].parent" text style "normal" text point 14 pad 0 15 0 15 align left center } } enabled "journalMode == const.JOURNAL_MODE_QUESTS and rgLargeJournal == 1" rowheight dynamic hidehighlight table "questDisplay" var selectedQuest scrollbar 'rgdscrl1' area 87 174 515 542 action " if(questDisplay[selectedQuest].expanded) then questDisplay[selectedQuest].expanded = nil else rgCloseAll() questDisplay[selectedQuest].expanded = 1 end " } list { column { width 100 label { enabled "objectiveEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber) and rgGameEngine > 1" area 16 0 -1 -1 pad 0 5 0 5 text lua "getObjectiveText(rowNumber)" text style "normal" text color M } label { enabled "objectiveEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber) and rgGameEngine <= 1" area 16 0 -1 -1 pad 0 5 0 5 text lua "getObjectiveText(rowNumber)" text style "normal" text color '5' } label { enabled "entryEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber) and rgGameEngine > 1" area 16 0 -1 -1 pad 0 5 0 5 text lua "rgRemoveFirstLine(getEntryText(rowNumber))" text style "normal" text color '5' } label { enabled "entryEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber) and rgGameEngine <= 1" area 16 0 -1 -1 pad 0 5 0 5 text lua "getEntryText(rowNumber)" text style "normal" text color M } } name "rgQuestTable" enabled "journalMode == const.JOURNAL_MODE_QUESTS and rgLargeJournal == 1" rowheight dynamic seperator "showObjectiveSeperator(rowNumber)" hidehighlight table "questDisplay" var selectedQuest scrollbar 'rgdscrl1' area 622 178 624 526 action " if(questDisplay[selectedQuest].expanded) then questDisplay[selectedQuest].expanded = nil else rgCloseAll() questDisplay[selectedQuest].expanded = 1 end " } label { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 0" area 152 220 343 62 fill 50 50 50 150 } edit { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 0" area 156 232 332 40 var journalSearchString --placeholder "ENTER_SEARCH_TERM_NORMAL" text style "edit" maxlines 1 } list --journal { column { width 100 --light label { enabled "getJournalTitleEnabled(rowNumber) and not getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber+1)) == 0 and rgLibraryJournalEntry(getJournalEntryText(rowNumber+1)) == 0" area 0 0 -1 -1 pad 0 16 0 0 text lua "getJournalTitleText(rowNumber)" text style "rg_trajan" text point 10 text color 0 80 0 255 } label { enabled "getJournalEntryEnabled(rowNumber) and not getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber),rowNumber) == 0 and rgLibraryJournalEntry(getJournalEntryText(rowNumber),rowNumber) == 0" area 0 0 -1 -1 pad 8 16 0 16 text lua "getJournalEntryText(rowNumber)" text style "normal" text color '5' } --dark --label --{ -- enabled "(getJournalTitleEnabled(rowNumber) or getJournalEntryEnabled(rowNumber)) and getJournalDarken(rowNumber)" -- area 0 0 -1 -1 -- fill 0 0 0 150 --} label { enabled "getJournalTitleEnabled(rowNumber) and getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber+1)) == 0 and rgLibraryJournalEntry(getJournalEntryText(rowNumber+1)) == 0" area 0 0 -1 -1 pad 0 16 0 0 text lua "getJournalTitleText(rowNumber)" text style "rg_trajan" text point 10 --text color 255 100 100 255 text color 'M' } label { enabled "getJournalEntryEnabled(rowNumber) and getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber)) == 0 and rgLibraryJournalEntry(getJournalEntryText(rowNumber)) == 0" area 0 0 -1 -1 pad 8 16 0 16 text lua "getJournalEntryText(rowNumber)" text style "normal" text color 'M' } } name "rgJournalTable" enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 0" seperator "getJournalEntryEnabled(rowNumber)" rowheight dynamic hidehighlight table "journalDisplay" var selectedJournal scrollbar 'rgdscrl1' area 556 178 690 522 } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 0" area 156 334 332 80 bam RGDMBUT2 sequence lua "RgUISkin" text style "rg_trajan" --text point 8 align center center --sequence 2 ScaleToClip text "ADD_ENTRY_LABEL" text color '$' action " journalMode = const.JOURNAL_MODE_EDIT journalNoteEdit = '' journalNoteEditRef = nil " } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 0" clickable lua "journalEntryClickable(selectedJournal)" greyscale lua "not journalEntryClickable(selectedJournal)" area 156 446 332 80 bam RGDMBUT2 sequence lua "RgUISkin" text style "rg_trajan" --text point 8 align center center --sequence 2 ScaleToClip text "EDIT_ENTRY_LABEL" text color '$' action " journalNoteEditRef = getJournalEntryRef(selectedJournal) journalNoteEdit = Infinity_FetchString(journalNoteEditRef) journalMode = const.JOURNAL_MODE_EDIT " } label { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 1" area 628 174 624 58 text style "normal" text "WRITE_ENTRY_TEXT" text color '5' } label { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 1" area 622 228 630 4 fill 10 71 1 255 } label { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 1" area 628 238 624 44 text style "rg_trajan" text color 0 80 0 255 text point 10 text lua "Infinity_GetTimeString()" } edit { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 1" area 628 288 624 407 text style "edit" var journalNoteEdit scrollbar 'GUISCRP' text color '5' } button { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 1" area 136 516 356 78 bam RGDBUTS1 text style "rg_trajan" text color '$' align center center sequence lua "RgUISkin" ScaleToClip text "CANCEL_BUTTON" action " journalMode = const.JOURNAL_MODE_JOURNAL " } button { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 1" area 136 608 356 78 bam RGDBUTS1 text style "rg_trajan" text color '$' align center center sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" action " if(journalNoteEditRef == nil) then Infinity_OnAddUserEntry(journalNoteEdit) else Infinity_OnEditUserEntry(journalNoteEditRef, journalNoteEdit) end journalMode = const.JOURNAL_MODE_JOURNAL " } list --bestiary { column { width 100 label { --Infinity_FetchString(rgJournalBestiary[rowNumber].text) enabled "rgBestiaryJournalEntry(Infinity_FetchString(rgJournalBestiary[rowNumber].text)) == 1 and rgGetBestiaryBoss(rowNumber) == false and rgBestiaryBoss == 0" sequence lua "rgGetHighlightSkin(rowNumber, selectedBeast)" area 0 0 -1 -1 bam rgdslct ScaleToClip } label { --Infinity_FetchString(rgJournalBestiary[rowNumber].text) enabled "rgBestiaryJournalEntry(Infinity_FetchString(rgJournalBestiary[rowNumber].text)) == 1 and rgGetBestiaryBoss(rowNumber) == true and rgBestiaryBoss == 1" sequence lua "rgGetHighlightSkin(rowNumber, selectedBeast)" area 0 0 -1 -1 bam rgdslct ScaleToClip } label { --enabled "getJournalEntryEnabled(rowNumber) and not getJournalDarken(rowNumber)" enabled "rgBestiaryJournalEntry(Infinity_FetchString(rgJournalBestiary[rowNumber].text)) == 1 and rgGetBestiaryBoss(rowNumber) == false and rgBestiaryBoss == 0" area 0 0 -1 -1 pad 20 5 0 5 text lua "rgGetJournalRowTextColor(rowNumber, selectedBeast) .. rgGetBestiaryCategory(Infinity_FetchString(rgJournalBestiary[rowNumber].text)) .. rgGetBestiaryEntryTitle(Infinity_FetchString(rgJournalBestiary[rowNumber].text))" text style "normal" } label { enabled "rgBestiaryJournalEntry(Infinity_FetchString(rgJournalBestiary[rowNumber].text)) == 1 and rgGetBestiaryBoss(rowNumber) == true and rgBestiaryBoss == 1" area 0 0 -1 -1 pad 20 5 0 5 text lua "rgGetJournalRowTextColor(rowNumber, selectedBeast) .. rgGetBestiaryEntryTitle(Infinity_FetchString(rgJournalBestiary[rowNumber].text))" text style "normal" } } name "rgBeastsTable" enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1" rowheight dynamic hidehighlight table "rgJournalBestiary" var selectedBeast scrollbar 'rgdscrl1' area 87 174 449 542 action " --rgBeastDescString = rgGetBestiaryDescription(rgGetBestiaryEntryTitle(getJournalEntryText(selectedBeast)),2) --rgBeastTitleString = rgGetBestiaryEntryTitle(getJournalEntryText(selectedBeast)) --rgBeastStatsString = rgGetBestiaryDescription(rgGetBestiaryEntryTitle(getJournalEntryText(selectedBeast)),1) if selectedBeast == 0 then rgBeastDescString = '' rgBeastTitleString = '' --rgBeastKillsString = '' rgBeastStats = {} rgGetBestiaryFrame = 0 else rgBeastDescString = rgGetBestiaryDescription(rgGetBestiaryEntryTitle(Infinity_FetchString(rgJournalBestiary[selectedBeast].text))) rgBeastTitleString = rgGetBestiaryEntryTitle(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) --rgBeastKillsString = rgGetBestiaryKills(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) rgBeastStats = rgGetBestiaryStatistics(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) rgGetBestiaryFrame = rgGetBestiaryPicture(Infinity_FetchString(rgJournalBestiary[selectedBeast].text)) end " } label { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and selectedBeast ~= 0 and selectedBeast ~= nil" area 550 168 372 50 text lua "rgBeastTitleString" text style "normal" text color '5' text point 16 pad 10 0 0 0 } label { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and selectedBeast ~= 0 and selectedBeast ~= nil" area 560 204 255 10 bam rgdjrow scaleToClip } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and RgUISkin == 3" area 435 95 50 50 bam RGDAROW1 ScaleToClip Sequence 1 action " if rgBestiaryBoss == 0 then rgBestiaryBoss = 1 else rgBestiaryBoss = 0 end selectedBeast = nil " } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and RgUISkin ==3" area 135 95 50 50 bam RGDAROW1 ScaleToClip action " if rgBestiaryBoss == 0 then rgBestiaryBoss = 1 else rgBestiaryBoss = 0 end selectedBeast = nil " } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and RgUISkin < 3" area 445 103 50 50 bam RGDAROW1 ScaleToClip Sequence 1 action " if rgBestiaryBoss == 0 then rgBestiaryBoss = 1 else rgBestiaryBoss = 0 end selectedBeast = nil " } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and RgUISkin < 3" area 145 103 50 50 bam RGDAROW1 ScaleToClip action " if rgBestiaryBoss == 0 then rgBestiaryBoss = 1 else rgBestiaryBoss = 0 end selectedBeast = nil " } label { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and selectedBeast ~= 0 and selectedBeast ~= nil" area 932 196 320 480 bam rgdbst2 frame lua "rgGetBestiaryFrame" scaleToClip } list { column { width 60 label { enabled "rowNumber == 1 or rowNumber == 3 or rowNumber == 5 or rowNumber == 7 or rowNumber == 10" area 0 0 -1 -1 text lua "rgBeastStats[rowNumber][1]" text style "normal_parchment" pad 10 0 0 3 } label { enabled "rowNumber == 11" area 0 0 -1 -1 text lua "rgBeastStats[rowNumber][1]" text style "normal_parchment" pad 10 20 0 3 } label { enabled "rowNumber == 1" area 260 0 -1 -1 text lua "rgBeastStats[rowNumber][2]" text style "normal_parchment" pad 0 2 0 3 } label { area 14 7 41 41 bam rgdjcirc frame 2 scaleToClip align left top enabled "rowNumber == 2"} label { area 10 3 50 50 bam rgdjcirc frame lua "rgBestCircFrame(rowNumber)" scaleToClip align left top enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][1] ~= ''"} label { area 70 3 50 50 bam rgdjcirc frame lua "rgBestCircFrame(rowNumber)" scaleToClip align left top enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][2] ~= ''"} label { area 130 3 50 50 bam rgdjcirc frame lua "rgBestCircFrame(rowNumber)" scaleToClip align left top enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][3] ~= ''"} label { area 190 3 50 50 bam rgdjcirc frame lua "rgBestCircFrame(rowNumber)" scaleToClip align left top enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][4] ~= ''"} label { area 250 3 50 50 bam rgdjcirc frame lua "rgBestCircFrame(rowNumber)" scaleToClip align left top enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][5] ~= ''"} label { area 310 3 50 50 bam rgdjcirc frame lua "rgBestCircFrame(rowNumber)" scaleToClip align left top enabled "(rowNumber == 4 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][6] ~= ''"} label { area 10 15 66 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][1], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][1] ~= '' and rgBeastStats[11][1] ~= ''"} label { area 70 15 66 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][2], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][2] ~= '' and rgBeastStats[11][1] ~= ''"} label { area 130 15 66 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][3], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][3] ~= '' and rgBeastStats[11][1] ~= ''"} label { area 190 15 66 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][4], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][4] ~= '' and rgBeastStats[11][1] ~= ''"} label { area 250 15 66 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][5], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][5] ~= '' and rgBeastStats[11][1] ~= ''"} label { area 310 15 66 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][6], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][6] ~= '' and rgBeastStats[11][1] ~= ''"} label { area 10 6 66 14 text "RG_B_LVL" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] ~= ''"} label { area 70 6 66 14 text "RG_B_HPS" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] ~= ''"} label { area 130 6 66 14 text "RG_B_ACB" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] ~= ''"} label { area 190 6 66 12 text "RG_B_THA" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] ~= ''"} label { area 250 6 66 14 text "RG_B_APR" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] ~= ''"} label { area 10 6 66 14 text "RG_B_STR" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] ~= ''"} label { area 70 6 66 14 text "RG_B_DEX" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] ~= ''"} label { area 130 6 66 14 text "RG_B_CON" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] ~= ''"} label { area 190 6 66 14 text "RG_B_INT" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] ~= ''"} label { area 250 6 66 14 text "RG_B_WIS" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] ~= ''"} label { area 310 6 66 14 text "RG_B_CHA" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] ~= ''"} label { area 26 0 18 18 bam rgdjsts1 frame 5 scaleToClip align left top enabled "rowNumber == 6"} label { area 86 0 18 18 bam rgdjsts1 frame 6 scaleToClip align left top enabled "rowNumber == 6"} label { area 146 0 18 18 bam rgdjsts1 frame 9 scaleToClip align left top enabled "rowNumber == 6"} label { area 206 0 18 18 bam rgdjsts1 frame 7 scaleToClip align left top enabled "rowNumber == 6"} label { area 266 0 18 18 bam rgdjsts1 frame 8 scaleToClip align left top enabled "rowNumber == 6"} label { area 26 0 18 18 bam rgdjsts1 frame lua "rgGetBestiResistRow(rgBeastStats[rowNumber][1])[2]" scaleToClip align left top enabled "(rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][1] ~= ''"} label { area 86 0 18 18 bam rgdjsts1 frame lua "rgGetBestiResistRow(rgBeastStats[rowNumber][2])[2]" scaleToClip align left top enabled "(rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][2] ~= ''"} label { area 146 0 18 18 bam rgdjsts1 frame lua "rgGetBestiResistRow(rgBeastStats[rowNumber][3])[2]" scaleToClip align left top enabled "(rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][3] ~= ''"} label { area 206 0 18 18 bam rgdjsts1 frame lua "rgGetBestiResistRow(rgBeastStats[rowNumber][4])[2]" scaleToClip align left top enabled "(rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][4] ~= ''"} label { area 266 0 18 18 bam rgdjsts1 frame lua "rgGetBestiResistRow(rgBeastStats[rowNumber][5])[2]" scaleToClip align left top enabled "(rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][5] ~= ''"} label { area 326 0 18 18 bam rgdjsts1 frame lua "rgGetBestiResistRow(rgBeastStats[rowNumber][6])[2]" scaleToClip align left top enabled "(rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][6] ~= ''"} label { area 10 15 50 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][1], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][1] ~= '' and rgBeastStats[11][1] == ''"} label { area 70 15 50 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][2], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][2] ~= '' and rgBeastStats[11][1] == ''"} label { area 130 15 50 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][3], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][3] ~= '' and rgBeastStats[11][1] == ''"} label { area 190 15 50 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][4], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][4] ~= '' and rgBeastStats[11][1] == ''"} label { area 250 15 50 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][5], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][5] ~= '' and rgBeastStats[11][1] == ''"} label { area 310 15 50 30 text lua "rgGetBestiStatText(rgBeastStats[rowNumber][6], rowNumber)" text style "normal_parchment" text align center center pad 0 0 0 0 enabled "(rowNumber == 2 or rowNumber == 4 or rowNumber == 6 or rowNumber == 8 or rowNumber == 9) and rgBeastStats[rowNumber][6] ~= '' and rgBeastStats[11][1] == ''"} label { area 10 6 50 14 text "RG_B_LVL" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] == ''"} label { area 70 6 50 14 text "RG_B_HPS" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] == ''"} label { area 130 6 50 14 text "RG_B_ACB" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] == ''"} label { area 190 6 50 12 text "RG_B_THA" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] == ''"} label { area 250 6 50 14 text "RG_B_APR" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 2 and rgBeastStats[11][1] == ''"} label { area 10 6 50 14 text "RG_B_STR" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] == ''"} label { area 70 6 50 14 text "RG_B_DEX" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] == ''"} label { area 130 6 50 14 text "RG_B_CON" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] == ''"} label { area 190 6 50 14 text "RG_B_INT" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] == ''"} label { area 250 6 50 14 text "RG_B_WIS" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] == ''"} label { area 310 6 50 14 text "RG_B_CHA" text style "normal_parchment" text align center top pad 0 0 0 0 enabled "rowNumber == 4 and rgBeastStats[11][1] == ''"} } name "rgBeastTable" area 550 215 710 480 enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 1 and selectedBeast ~= 0 and selectedBeast ~= nil" rowheight dynamic hidehighlight table "rgBeastStats" var selectedBeastStat scrollbar 'rgdscrl1' --scrollbar func "resetScrollbar" --scrollbar respectConstraints --scrollbar hide lua "0" } list --library { column { width 100 label { enabled "rgLibraryJournalEntry(Infinity_FetchString(rgJournalLibrary[rowNumber].text)) == 1" sequence lua "rgGetHighlightSkin(rowNumber, rgSelectedBook)" area 0 0 -1 -1 bam rgdslct ScaleToClip } label { enabled "rgLibraryJournalEntry(Infinity_FetchString(rgJournalLibrary[rowNumber].text)) == 1" area 0 0 -1 -1 pad 20 5 0 5 text lua "rgGetJournalRowTextColor(rowNumber, rgSelectedBook) .. rgGetLibraryEntryTitle(Infinity_FetchString(rgJournalLibrary[rowNumber].text))" text style "normal" } } enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 2" rowheight dynamic hidehighlight table "rgJournalLibrary" var rgSelectedBook scrollbar 'rgdscrl1' area 87 174 445 542 action " if rgSelectedBook == 0 then rgLibraryDescString = '' else rgLibraryDescString = rgGetLibraryDescription(rgGetLibraryEntryTitle(Infinity_FetchString(rgJournalLibrary[rgSelectedBook].text))) end " } text { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 1 and rgIsJournalBestiary == 2 and rgSelectedBook ~= 0 and rgSelectedBook ~= nil" area 582 178 664 522 text lua "rgLibraryDescString" text style "normal" scrollbar 'rgdscrl1' text color '5' pad 10 0 0 0 } --small journal label --background background { enabled "rgLargeJournal == 0" name "rgSmallJournalArea" area 10 30 420 690 --mosaic "QUESTBAK" mosaic lua "'rgdjbox' .. RgUISkin" } button { enabled "rgLargeJournal == 0" bam 'RGDJSHND' sequence lua "RgUISkin" ScaleToClip area 0 0 440 75 } handle { enabled "rgLargeJournal == 0" area 0 0 440 80 actionDrag " dragJournal() " } button { enabled "rgLargeJournal == 0" area 14 8 62 58 bam rgdjobut tooltip lua "getUiString('RG_JOURNAL_MODE2')" scaleToClip toggle rgLargeJournal action " e:GetActiveEngine():OnLeftPanelButtonClick(2) e:SelectEngine(journalScreen) " } button { enabled "rgLargeJournal == 0" area 121 8 62 58 bam "rgdjbt1" scaleToClip tooltip lua "getUiString('CURRENT_LABEL')" glow lua "journalMode == const.JOURNAL_MODE_QUESTS and rgIsCurrentQuests == 1" action " journalMode = const.JOURNAL_MODE_QUESTS rgIsCurrentQuests = 1 " } button { enabled "rgLargeJournal == 0" area 184 8 62 58 bam "rgdjbt2" scaleToClip tooltip lua "getUiString('OBJECTIVE_FINISHED_NORMAL')" glow lua "journalMode == const.JOURNAL_MODE_QUESTS and rgIsCurrentQuests == 0" action " journalMode = const.JOURNAL_MODE_QUESTS rgIsCurrentQuests = 0 " } button { enabled "rgLargeJournal == 0" area 247 8 62 58 bam "rgdjbt3" scaleToClip tooltip lua "getUiString('JOURNAL_LABEL')" glow lua "journalMode == const.JOURNAL_MODE_JOURNAL" action "journalMode = const.JOURNAL_MODE_JOURNAL" } button { enabled "rgLargeJournal == 0" on esc area 382 16 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " e:GetActiveEngine():OnLeftPanelButtonClick(2) --e:SelectEngine(journalScreen) --e:SelectEngine(worldScreen) " } label -- Chapter { enabled "rgLargeJournal == 0" area 145 74 146 42 text lua "chapterText()" text style "rg_trajan" text align center center text color '$' } button --prev chapter { enabled "rgLargeJournal == 0" area 308 76 40 40 bam RGDAROW1 ScaleToClip Sequence 1 action " incrChapter(1); " } button { enabled "rgLargeJournal == 0" area 87 76 40 40 bam RGDAROW1 ScaleToClip action " incrChapter(-1); " } label { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 0" area 20 116 396 28 fill 50 50 50 150 } edit { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 0" area 25 120 357 32 var journalSearchString placeholder "ENTER_SEARCH_TERM_NORMAL" text style "edit" maxlines 1 } list { column { width 100 label { enabled "objectiveEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber)" area 0 0 -1 5 bam rgdslct sequence 1 ScaleToClip } label { enabled "questEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber)" area 8 0 -1 -1 --text lua "getQuestText(rowNumber)" text lua "rgGetQuestText(rowNumber)" text style "normal" align left center } label { enabled "objectiveEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber)" area 16 0 -1 -1 pad 0 5 0 5 text lua "getObjectiveText(rowNumber)" text style "normal" --text color '$' } label { enabled "entryEnabled(rowNumber) and rgCurrentFinishedQuests(rowNumber)" area 16 0 -1 -1 pad 0 5 0 5 text lua "getEntryText(rowNumber)" text style "normal" text color M } } enabled "journalMode == const.JOURNAL_MODE_QUESTS and rgLargeJournal == 0" name "rgSmallJournalQuests" rowheight dynamic hidehighlight --seperator "showObjectiveSeperator(rowNumber)" table "questDisplay" var selectedQuest scrollbar 'rgdscrl1' area 15 120 409 590 action " if(questDisplay[selectedQuest].expanded) then questDisplay[selectedQuest].expanded = nil else rgCloseAll() questDisplay[selectedQuest].expanded = 1 end " } list --journal { column { width 100 --light label { enabled "getJournalTitleEnabled(rowNumber) and not getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber+1)) == 0" area 0 0 -1 -1 pad 0 16 0 0 text lua "getJournalTitleText(rowNumber)" text style "normal" text color 0 120 0 255 } label { enabled "getJournalEntryEnabled(rowNumber) and not getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber)) == 0" area 0 0 -1 -1 pad 8 16 0 16 text lua "getJournalEntryText(rowNumber)" text style "normal" } --dark --label --{ -- enabled "(getJournalTitleEnabled(rowNumber) or getJournalEntryEnabled(rowNumber)) and getJournalDarken(rowNumber)" -- area 0 0 -1 -1 -- fill 0 0 0 150 --} label { enabled "getJournalTitleEnabled(rowNumber) and getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber+1)) == 0" area 0 0 -1 -1 pad 0 16 0 0 text lua "getJournalTitleText(rowNumber)" text style "normal" text color 255 100 100 255 } label { enabled "getJournalEntryEnabled(rowNumber) and getJournalDarken(rowNumber) and rgBestiaryJournalEntry(getJournalEntryText(rowNumber)) == 0" area 0 0 -1 -1 pad 8 16 0 16 text lua "getJournalEntryText(rowNumber)" text style "normal" text color 'B' } } name "rgSmallJournalList" enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 0" seperator "getJournalEntryEnabled(rowNumber)" rowheight dynamic hidehighlight table "journalDisplay" var selectedJournal scrollbar 'rgdscrl1' area 25 152 391 558 } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 0" area 25 88 62 28 --bam "PAPERBUT" --sequence 1 text "ADD_ENTRY_LABEL" text style "normal" action " journalMode = const.JOURNAL_MODE_EDIT journalNoteEdit = '' journalNoteEditRef = nil Infinity_FocusTextEdit('journalNoteEditArea') " } button { enabled "journalMode == const.JOURNAL_MODE_JOURNAL and rgLargeJournal == 0" clickable lua "journalEntryClickable(selectedJournal)" area 348 88 68 28 --bam "PAPERBUT" --sequence 1 text "EDIT_ENTRY_LABEL" text style "normal" action " journalNoteEditRef = getJournalEntryRef(selectedJournal) journalNoteEdit = Infinity_FetchString(journalNoteEditRef) journalMode = const.JOURNAL_MODE_EDIT " } label { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 0" area 25 120 392 36 text style "normal" text "WRITE_ENTRY_TEXT" } label { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 0" area 30 156 376 4 fill 10 71 1 255 } label { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 0" area 24 218 392 42 text style "normal" text color 0 120 0 255 text lua "Infinity_GetTimeString()" } edit { name "journalNoteEditArea" enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 0" area 24 260 392 450 text style "normal" var journalNoteEdit scrollbar 'GUISCRP' } button { on escape enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 0" area 220 167 196 47 bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip text "CANCEL_BUTTON" text style "button" action " journalMode = const.JOURNAL_MODE_JOURNAL " } button { enabled "journalMode == const.JOURNAL_MODE_EDIT and rgLargeJournal == 0" area 24 167 196 47 bam 'RGDMBUT2' sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" action " if(journalNoteEditRef == nil) then Infinity_OnAddUserEntry(journalNoteEdit) else Infinity_OnEditUserEntry(journalNoteEditRef, journalNoteEdit) end journalMode = const.JOURNAL_MODE_JOURNAL " } handle { name "rgSmallJournalHandle" enabled "rgLargeJournal == 0" area 0 710 440 30 bam 'RGDJSHND' sequence lua "RgUISkin" frame 1 ScaleToClip actionDrag " rgResizeJournal(motionY) " } } menu { name 'JOURNAL_RECENT_EVENTS' align center center modal label { area 0 0 672 672 mosaic "RECENTEV" } label { area 158 52 354 46 text "RECENT_EVENTS_TITLE" text style "title" } button { area 594 10 33 35 bam "XBUTT" action " Infinity_PopMenu('JOURNAL_RECENT_EVENTS') " } text { area 126 106 422 458 text "Recent events text will go here." text style "normal" } button { area 320 572 200 40 text "DONE_BUTTON" text style 'button' bam GUIBUTNT sequence 2 action " Infinity_PopMenu('JOURNAL_RECENT_EVENTS') " } } ` function processQuestsWithStyle() out = "" for k,v in pairs(quests_old) do local questStrref = v[3] out = out .. "createQuest ( " .. questStrref .. " )\n" for k2,v2 in pairs(journals_quests_old) do if(v2[2] == k) then local subgroup = v2[const.ENTRIES_IDX_SUBGROUP] if(subgroup == 0) then subgroup = "nil" end out = out .. "createEntry ( " .. questStrref .. ", -1, " .. v2[1] .. ", {}, " .. subgroup .." )\n" end end end Infinity_Log(out) end ` menu { name 'MESSAGE_SCREEN' align center center label { area 0 0 657 234 mosaic GUIERR6 } label { area 29 21 580 126 text lua "Infinity_FetchString(messageScreenText)" text style "label" } } ` function rgGetEpilogueArea() local screenWidth, screenHeight = Infinity_GetScreenSize() --Infinity_SetArea('rgEpilogueBackground', nil, nil, screenWidth, screenHeight) Infinity_SetArea('rgEpilogueDoneButton', nil, screenHeight - 70, nil, nil) Infinity_SetArea('rgEpilogueReplayButton',nil, screenHeight - 70, nil, nil) Infinity_SetArea('rgEpilogueText',nil, (screenHeight/2)-261, nil, nil) Infinity_SetArea('rgEpilogueTextBcg',nil, (screenHeight/2)-276, nil, nil) Infinity_SetArea('rgEpilogueImage',nil, (screenHeight/2)-165, nil, nil) Infinity_SetArea('rgEpilogueImageFrame',nil, (screenHeight/2)-169, nil, nil) end function rgGetEpilogueText() if rgGameEngine == 1 then return megacredits else return text_CHAPTERSCROLL end end megacredits = '' epilogueImage = "GUIOSTUR" ` menu { name 'EPILOGUE' align center top ignoreEsc onOpen " rgGetEpilogueArea() Infinity_SetBackground('BACKGROUND') generateMegaCredits() " label { area 0 0 1024 1024 } label { name "rgEpilogueTextBcg" area 129 131 766 552 bam rgdchbcg scaleToClip } label { name "rgEpilogueImageFrame" area 176 172 218 338 bam 'rgdport4' ScaleToClip } label { name "rgEpilogueImage" area 180 176 210 330 bitmap lua "epilogueImage" } text { --name "text_CHAPTERSCROLL_item" name "rgEpilogueText" area 444 146 436 522 --36 146 436 522 --text lua "megacredits" --text lua "text_CHAPTERSCROLL" text lua "rgGetEpilogueText()" text style normal text align center top scrollbar 'rgdscrl1' scrollbar func 'UpdateChapterScroll' scrollbar hide lua 'text_CHAPTERSCROLL_auto == 1' action " text_CHAPTERSCROLL_auto = 0 " } button { name "rgEpilogueDoneButton" area 512 706 400 70 bam 'RGDMBUT2' text lua "rgString('DONE_BUTTON')" sequence lua "RgUISkin" ScaleToClip text style "button" clickable lua "chapterScreen:IsDoneButtonClickable()" action " megacredits = '' chapterScreen:OnDoneButtonClick() " } button { name "rgEpilogueReplayButton" area 112 706 400 70 bam 'RGDMBUT2' text lua "rgString('REPLAY_BUTTON')" sequence lua "RgUISkin" ScaleToClip text style "button" clickable lua "chapterScreen:IsReplayButtonClickable()" action " chapterScreen:OnReplayButtonClick() " } } ` function getDLCDescription() return Infinity_FetchString(dlcScreen:GetDLCDescription()) end function getDLCTitle() return Infinity_FetchString(dlcScreen:GetDLCTitle()) end function getDLCIndex() return dlcScreen:GetDLCIndex() .. "/" .. dlcScreen:GetDLCCount() end function isDLCBuyButtonClickable() local isBought = dlcScreen:GetDLCBought() return isBought == false end function setDLCPurchased(index, purchaseLevel) purchasedDLC[index] = purchaseLevel; end ` menu { name 'START_DLC' align center center label { area 0 0 1024 768 mosaic 'GUIDLC' } label { area 60 0 906 56 text "STRREF_GUI_LOWER_DLC_STORE" text style 'title' text align center center } label { area 588 568 326 48 text lua "getDLCIndex()" text style 'title' text align center center } label { area 576 132 348 54 text lua "getDLCTitle()" text style 'title' text align center center } text { area 588 228 326 334 text lua "getDLCDescription()" text style 'normal' scrollbar 'rgdscrl1' } label { area 154 92 362 568 bitmap lua "dlcScreen:GetDLCImage()" } button { bam 'GUIPRC' sequence 0 area 22 274 56 140 align center center action " dlcScreen:DecrementDLCIndex() " } button { bam 'GUIPRC' sequence 1 area 946 270 52 140 align center center action " dlcScreen:IncrementDLCIndex() " } button { on escape bam 'GUIBUTNT' sequence 0 area 316 713 200 40 align center center text style "button" text "BACK_BUTTON" action " dlcScreen:OnDoneButtonClick() " } button { bam 'GUIBUTNT' frame 3 area 526 713 200 40 align center center text style "button" text "STRREF_GUI_DLC_INSTALLED" --text color 'E' enabled "not isDLCBuyButtonClickable()" action " dlcScreen:OnBuyButtonClick() " } button { bam 'GUIBUTNT' sequence 2 area 526 713 200 40 align center center text style "button" text "BUY_BUTTON" enabled "isDLCBuyButtonClickable()" action " dlcScreen:OnBuyButtonClick() " } button { bam 'GUIBUTWT' sequence 2 area 600 648 298 40 align center center text style "button" text "STRREF_GUI_DLC_RESTORE_PURCHASES" action " dlcScreen:RestorePurchases() " } } ` dlcStatusDescriptionText = "" dlcStatusButtonText = "" dlcStatusState = 0 DLC_STATE_WAITING = 0 DLC_STATE_IN_PROGRESS = 1 DLC_STATE_SUCCESS = 2 DLC_STATE_FAILED = 3 DLC_STATE_CANCELLED = 4 DLC_STATE_RESTORING_PURCHASES = 5 DLC_STATE_RESTORING_PURCHASES_COMPLETE = 6 DLC_STATE_DOWNLOADING = 7 function checkDLCState() dlcStatusState = dlcScreen:GetDLCState() if dlcStatusState == DLC_STATE_WAITING then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_WAITING") dlcStatusButtonText = getUiString("BACK_BUTTON") elseif dlcStatusState == DLC_STATE_IN_PROGRESS then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_IN_PROGRESS") dlcStatusButtonText = getUiString("BACK_BUTTON") elseif dlcStatusState == DLC_STATE_SUCCESS then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_SUCCESS") dlcStatusButtonText = getUiString("CONTINUE_BUTTON") elseif dlcStatusState == DLC_STATE_FAILED then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_FAILED") dlcStatusButtonText = getUiString("CONTINUE_BUTTON") elseif dlcStatusState == DLC_STATE_CANCELLED then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_CANCELLED") dlcStatusButtonText = getUiString("CONTINUE_BUTTON") elseif dlcStatusState == DLC_STATE_RESTORING_PURCHASES then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_RESTORING_PURCHASES") dlcStatusButtonText = getUiString("BACK_BUTTON") elseif dlcStatusState == DLC_STATE_RESTORING_PURCHASES_COMPLETE then dlcStatusDescriptionText = getUiString("STRREF_GUI_DLC_RESTORING_PURCHASES_COMPLETE") dlcStatusButtonText = getUiString("CONTINUE_BUTTON") elseif dlcStatusState == DLC_STATE_DOWNLOADING then dlcScreen:GetDownloadString() dlcStatusButtonText = "" else dlcStatusDescriptionText = "WAFFLES_Dont Know How We Got Here_WAFFLES" dlcStatusButtonText = "WAFFLES_WAFFLES_WAFFLES" end end function getDLCStatusText() checkDLCState() return dlcStatusDescriptionText end ` menu { name 'START_DLC_STATUS' align center center label { area 0 0 408 420 mosaic 'GUIERR' } label { area 86 76 236 84 text style "label" text lua "getDLCStatusText()" } button { bam 'GUIOSTUM' sequence 0 area 104 320 202 46 align center center text style "button" text lua "dlcStatusButtonText" enabled "dlcStatusState ~= DLC_STATE_DOWNLOADING" action " dlcScreen:OnErrorButtonClick(); " } } ` dialogTable = {} dialogOverflowTable = {} hasDialogResponse = nil chatboxScrollToBottom = nil chatboxScrollTimeLast = 0 chatboxContentHeight = 0 chatboxOverflowed = nil chatboxJumpToBottom = nil -- The following two values determine how many item entries can exist. We trim -- the number of entries to numDialogTrimEntries once it has overflowed that value -- by numDialogOverflowLimit. numDialogTrimEntries = 512 numDialogOverflowEntries = numDialogTrimEntries + 128 lastTrimmedContentHeight = 0 function getNumDialogTableEntries() local count = 0 for _ in pairs(dialogTable) do count = count + 1 end return count end function trimDialogTableSize() local numTableEntries = getNumDialogTableEntries() if (numTableEntries > numDialogOverflowEntries) then local numEntriesToRemove = numTableEntries - numDialogTrimEntries while (numEntriesToRemove > 0) do -- Get our table entry and calculate its size local tableEntry = dialogTable[1] local delta = Infinity_GetContentHeight(styles.normal.font, w, tableEntry.text, styles.normal.point, 1, styles.normal.useFontZoom) --1 for indent. chatboxContentHeight = chatboxContentHeight - delta lastTrimmedContentHeight = lastTrimmedContentHeight + delta table.remove(dialogTable, 1) numEntriesToRemove = numEntriesToRemove - 1 end end end function buildResponsesList() hasDialogResponse = nil dialogResponses = {} for k,v in pairs(worldPlayerDialogChoices) do if v.marker then table.insert(dialogResponses, v) hasDialogResponse = 1 end end end function canShowDialogButton(num) -- Show the buttons if we have a response, and the dialog button is not enabled return dialogResponses and dialogResponses[num] ~= nil and showDialogButtonChoices() end function addDialogMessage(text,marker,makeTop) local tab = {} tab.text = text tab.marker = marker if(marker) then dialogViewMode = nil if(text == "") then --empty markers are a signal, we shouldn't actually display them. if(makeTop == true) then --we'll ensure the next line is included in the visible content. chatboxContentHeight = 0 end return else hasDialogResponse = 1 end end --Calculate running total of dialog content height local x,y,w,h = Infinity_GetArea("worldPlayerDialogChoicesList") w = w - 18 --account for scrollbar influence on width local delta = Infinity_GetContentHeight(styles.normal.font, w, text, styles.normal.point, 1, styles.normal.useFontZoom) --1 for indent. chatboxContentHeight = chatboxContentHeight + delta if(marker and chatboxContentHeight > h) then --More to display than we have room for, put the responses in overflow and hide them behind button table.insert(dialogOverflowTable,tab) else table.insert(dialogTable,tab) end if(makeTop == true) then --we'll ensure the next line is included in the visible content. chatboxContentHeight = 0 end trimDialogTableSize() triggerChatboxScroll() buildResponsesList() end function clearDialogResponses() for k,v in pairs(dialogTable) do if(v.marker) then table.remove(dialogTable,k) clearDialogResponses() end end hasDialogResponse = nil chatboxOverflowed = nil chatboxContentHeight = 0 dialogOverflowTable = {} end function dialogEntrySelectable(row) return (dialogTable[row].marker ~= nil) end function showDialogButtonChoices() return not (not hasDialogResponse or dialogViewMode or #dialogOverflowTable > 0) end function getResponsePickable() return not hasDialogResponse or dialogViewMode or (gameOptions.m_bConfirmDialog == true) end function getDialogButtonText() if(dialogViewMode) then return getUiString("DONE_BUTTON") end if(#dialogOverflowTable > 0) then return getUiString("SHOW_MORE_RESPONSES_BUTTON") end if(gameOptions.m_bConfirmDialog == true) then return getUiString("CHOOSE_RESPONSE_BUTTON") end return dialogButtonText end function triggerChatboxScroll() chatboxScrollToBottom = 1 chatboxScrollTimeLast = Infinity_GetClockTicks() end function chatboxScroll(top, height, contentHeight) rgGetJournalBestiaryEntry(combatLog[rowNumber],rowNumber) if(chatboxJumpToBottom and contentHeight > height) then chatboxJumpToBottom = nil return height-contentHeight end if(chatboxScrollToBottom == 0) then --defer to default scrolling return nil end if(contentHeight < height) then --no scrolling required, content fits chatboxScrollToBottom = nil return nil end local dT = Infinity_GetClockTicks() - chatboxScrollTimeLast chatboxScrollTimeLast = Infinity_GetClockTicks() top = top + lastTrimmedContentHeight lastTrimmedContentHeight = 0 local newTop = (dT * -0.25) + top if (newTop + contentHeight > height + 200) then return (height - contentHeight + 200) end if(newTop + contentHeight < height) then chatboxScrollToBottom = 0 return height - contentHeight end return newTop end function displayOverflowResponses() for k,v in pairs(dialogOverflowTable) do table.insert(dialogTable,v) end dialogOverflowTable = {} triggerChatboxScroll() buildResponsesList() end function GetFirstMarkedResponse() for k,v in pairs(dialogTable) do if v.marker ~= nil then return k end end return -1 end function onDialogButtonClick() if(dialogViewMode) then --In dialog view mode this button closes the menu. worldScreen:StopDialogHistory() return end if(#dialogOverflowTable > 0) then displayOverflowResponses() return end if(gameOptions.m_bConfirmDialog == true and hasDialogResponse) then -- if confirm dialog and choices available. worldScreen:OnDialogReplyClick(dialogTable[worldPlayerDialogSelection].marker) worldPlayerDialogSelection = 0 return else -- no choices, just step. worldScreen:StepDialog() end end function getDialogRowClickable(row) return dialogTable[row].marker ~= nil end function isTouchActionbar() --Make this read from an option to make it easy to switch out. local default = 0 if(e:IsTouchUI()) then default = 1 end local val = Infinity_GetINIValue('Program Options', 'Use Touch Actionbar', default) if (val ~= 0) then return 1 else return nil end end ` menu { name 'WORLD_DIALOG_LEFT' align left center ignoreEsc --ignoreFocus 1 onOpen " Infinity_PushMenu('WORLD_DIALOG_LEFT_BUTTONS') " onClose " Infinity_PopMenu('WORLD_DIALOG_LEFT_BUTTONS') " label { area 0 0 80 1536 --mosaic GUIWLSP } } menu { name 'WORLD_DIALOG_LEFT_BUTTONS' align left center ignoreEsc button { area 15 25 54 54 bam CBUTT scaleToClip text lua "'...'" text style "button" pad -3 -6 0 0 enabled "not showDialogButtonChoices()" clickable lua "not dialogEntryGreyed()" action " onDialogButtonClick() " } button { area 15 25 54 54 bam CBUTT scaleToClip text lua "'1'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(1)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[1].marker) " } button { area 15 100 54 54 bam CBUTT scaleToClip text lua "'2'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(2)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[2].marker) " } button { area 15 175 54 54 bam CBUTT scaleToClip text lua "'3'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(3)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[3].marker) " } button { area 15 250 54 54 bam CBUTT scaleToClip text lua "'4'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(4)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[4].marker) " } button { area 15 325 54 54 bam CBUTT scaleToClip text lua "'5'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(5)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[5].marker) " } button { area 15 400 54 54 bam CBUTT scaleToClip text lua "'6'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(6)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[6].marker) " } button { area 15 475 54 54 bam CBUTT scaleToClip text lua "'7'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(7)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[7].marker) " } button { area 15 550 54 54 bam CBUTT scaleToClip text lua "'8'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(8)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[8].marker) " } button { area 15 625 54 54 bam CBUTT scaleToClip text lua "'9'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(9)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[9].marker) " } button { area 15 700 54 54 bam CBUTT scaleToClip text lua "'10'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(10)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[10].marker) " } } menu { name 'WORLD_DIALOG_RIGHT' align right center ignoreEsc --ignoreFocus 1 enabled "canShowDialogButton(11)" onOpen " Infinity_PushMenu('WORLD_DIALOG_RIGHT_BUTTONS') " onClose " Infinity_PopMenu('WORLD_DIALOG_RIGHT_BUTTONS') " label { area 0 0 80 1536 --mosaic GUIWRSP } } menu { name 'WORLD_DIALOG_RIGHT_BUTTONS' align right center ignoreEsc --ignoreFocus 1 enabled "canShowDialogButton(11)" button { area 15 25 54 54 bam CBUTT scaleToClip text lua "'11'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(11)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[11].marker) " } button { area 15 100 54 54 bam CBUTT scaleToClip text lua "'12'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(12)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[12].marker) " } button { area 15 175 54 54 bam CBUTT scaleToClip text lua "'13'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(13)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[13].marker) " } button { area 15 250 54 54 bam CBUTT scaleToClip text lua "'14'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(14)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[14].marker) " } button { area 15 325 54 54 bam CBUTT scaleToClip text lua "'15'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(15)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[15].marker) " } button { area 15 400 54 54 bam CBUTT scaleToClip text lua "'16'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(16)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[16].marker) " } button { area 15 475 54 54 bam CBUTT scaleToClip text lua "'17'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(17)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[17].marker) " } button { area 15 550 54 54 bam CBUTT scaleToClip text lua "'18'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(18)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[18].marker) " } button { area 15 625 54 54 bam CBUTT scaleToClip text lua "'19'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(19)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[19].marker) " } button { area 15 700 54 54 bam CBUTT scaleToClip text lua "'20'" text style "button" pad -3 -6 0 0 enabled "canShowDialogButton(20)" clickable lua "not dialogEntryGreyed()" action " worldScreen:OnDialogReplyClick(dialogResponses[20].marker) " } } ` currentButtonHelp = 11 buttonHelp = { {'GUILS10', 0, -1, 0, 0, -1, '', 'HELPTUTORIAL_RETURNTOGAME'}, -- 1 return to game {'GUILS10', 1, -1, 0, 0, -1, '', 'HELPTUTORIAL_MAP'}, -- 2 map {'GUILS10', 2, -1, 0, 0, -1, '', 'HELPTUTORIAL_JOURNAL'}, -- 3 journal {'GUILS10', 3, -1, 0, 0, -1, '', 'HELPTUTORIAL_INVENTORY'}, -- 4 inventory {'GUILS10', 4, -1, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERRECORD'}, -- 5 record {'GUILS10', 5, -1, 0, 0, -1, '', 'HELPTUTORIAL_MAGESPELLS'}, -- 6 mage book {'GUILS10', 6, -1, 0, 0, -1, '', 'HELPTUTORIAL_PRIESTSPELLS'}, -- 7 priest scroll {'GUILS10', 7, -1, 0, 0, -1, '', 'HELPTUTORIAL_OPTIONS'}, -- 8 options {'GUILS10', 8, -1, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERARBITRATION'}, -- 9 arbitration {'GUILS10', 15, -1, 0, 0, -1, '', 'HELPTUTORIAL_QUICKSAVE'}, -- 10 quick save {'GUILS10', 16, -1, 0, 0, -1, '', 'HELPTUTORIAL_HELP'}, -- 11 help {'GUILS10', 9, -1, 0, 0, -1, '', 'HELPTUTORIAL_REST'}, -- 12 rest {'GUILS10', 14, -1, 0, 0, -1, '', 'HELPTUTORIAL_SELECT'}, -- 13 drag {'GUILS10', 11, -1, 0, 0, -1, '', 'HELPTUTORIAL_HIGHLIGHT'}, -- 14 highlight {'GUILS10', 10, -1, 0, 0, -1, '', 'HELPTUTORIAL_TOGGLEAI'}, -- 15 ai {'GUILS10', 13, -1, 0, 0, -1, '', 'HELPTUTORIAL_SELECTALL'}, -- 16 select all {'', -1, 0, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERPORTRAITS'}, -- 17 player 1 {'', -1, 1, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERPORTRAITS'}, -- 18 player 2 {'', -1, 2, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERPORTRAITS'}, -- 19 player 3 {'', -1, 3, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERPORTRAITS'}, -- 20 player 4 {'', -1, 4, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERPORTRAITS'}, -- 21 player 5 {'', -1, 5, 0, 0, -1, '', 'HELPTUTORIAL_CHARACTERPORTRAITS'}, -- 22 player 6 {'', -1, -1, 1, 0, -1, '', 'HELPTUTORIAL_CLOCK'}, -- 23 clock {'ROUNDBUT', 0, -1, 0, 1, -1, '', 'HELPTUTORIAL_QUICKLOOT'}, -- 24 quick loot {'GUIBTACT', 64, -1, 0, 0, 0, '', 'HELPTUTORIAL_ARROWLEFT'}, -- 25 {'GUIBTACT', 66, -1, 0, 0, 1, '', 'HELPTUTORIAL_ARROWRIGHT'}, -- 26 {'GUIBTACT', 22, -1, 0, 0, 2, '', 'HELPTUTORIAL_BARDSONG'}, -- 27 {'GUIBTACT', 12, -1, 0, 0, 3, '', 'HELPTUTORIAL_CASTSPELLS'}, -- 28 {'GUIBTACT', 34, -1, 0, 0, 4, '', 'HELPTUTORIAL_FINDTRAPS'}, -- 29 {'GUIBTACT', 4, -1, 0, 0, 5, '', 'HELPTUTORIAL_DIALOG'}, -- 30 {'GUIBTACT', 20, -1, 0, 0, 6, '', 'HELPTUTORIAL_QUICKFORMATION'}, -- 31 {'GUIBTACT', 0, -1, 0, 0, 7, '', 'HELPTUTORIAL_DEFEND'}, -- 32 {'GUIBTACT', 14, -1, 0, 0, 8, '', 'HELPTUTORIAL_ATTACK'}, -- 33 {'GUIBTACT', 40, -1, 0, 0, 9, '', 'HELPTUTORIAL_SHAPECHANGE'}, -- 34 {'GUIBTACT', 38, -1, 0, 0, 10, '', 'HELPTUTORIAL_SPECIALABILITIES'}, -- 35 {'GUIBTACT', 30, -1, 0, 0, 11, '', 'HELPTUTORIAL_STEALTH'}, -- 36 {'GUIBTACT', 26, -1, 0, 0, 12, '', 'HELPTUTORIAL_THIEVING'}, -- 37 {'GUIBTACT', 8, -1, 0, 0, 13, '', 'HELPTUTORIAL_TURNUNDEAD'}, -- 38 {'GUIBTACT', 18, -1, 0, 0, 14, '', 'HELPTUTORIAL_USEITEM'}, -- 39 {'GUIBTACT', 58, -1, 0, 0, 15, '', 'HELPTUTORIAL_STOP'}, -- 40 {'GUIBTACT', 20, -1, 0, 0, 16, '', 'HELPTUTORIAL_QUICKFORMATION'}, -- 41 {'GUIBTACT', 20, -1, 0, 0, 17, '', 'HELPTUTORIAL_QUICKFORMATION'}, -- 42 {'GUIBTACT', 20, -1, 0, 0, 18, '', 'HELPTUTORIAL_QUICKFORMATION'}, -- 43 {'GUIBTACT', 20, -1, 0, 0, 19, '', 'HELPTUTORIAL_QUICKFORMATION'}, -- 44 {'GUIBTACT', 20, -1, 0, 0, 20, '', 'HELPTUTORIAL_QUICKFORMATION'}, -- 45 {'STONSLOT', -1, -1, 0, 0, 21, 'STONITEM', 'HELPTUTORIAL_QUICKITEM'}, -- 46 {'STONSLOT', -1, -1, 0, 0, 22, 'STONITEM', 'HELPTUTORIAL_QUICKITEM'}, -- 47 {'STONSLOT', -1, -1, 0, 0, 23, 'STONITEM', 'HELPTUTORIAL_QUICKITEM'}, -- 48 {'STONSLOT', 12, -1, 0, 0, 24, 'STONSPEL', 'HELPTUTORIAL_QUICKSPELLS'}, -- 49 {'STONSLOT', 12, -1, 0, 0, 25, 'STONSPEL', 'HELPTUTORIAL_QUICKSPELLS'}, -- 50 {'STONSLOT', 12, -1, 0, 0, 26, 'STONSPEL', 'HELPTUTORIAL_QUICKSPELLS'}, -- 51 {'STONSLOT', -1, -1, 0, 0, 27, 'STONWEAP', 'HELPTUTORIAL_QUICKWEAPON'}, -- 52 {'STONSLOT', -1, -1, 0, 0, 28, 'STONWEAP', 'HELPTUTORIAL_QUICKWEAPON'}, -- 53 {'STONSLOT', -1, -1, 0, 0, 29, 'STONWEAP', 'HELPTUTORIAL_QUICKWEAPON'}, -- 54 {'STONSLOT', -1, -1, 0, 0, 30, 'STONWEAP', 'HELPTUTORIAL_QUICKWEAPON'}, -- 55 {'STONSLOT', -1, -1, 0, 0, 31, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 56 {'STONSLOT', -1, -1, 0, 0, 32, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 57 {'STONSLOT', -1, -1, 0, 0, 33, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 58 {'STONSLOT', -1, -1, 0, 0, 34, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 59 {'STONSLOT', -1, -1, 0, 0, 35, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 60 {'STONSLOT', -1, -1, 0, 0, 36, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 61 {'STONSLOT', -1, -1, 0, 0, 37, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 62 {'STONSLOT', -1, -1, 0, 0, 38, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 63 {'STONSLOT', -1, -1, 0, 0, 39, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 64 {'STONSLOT', -1, -1, 0, 0, 40, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 65 {'STONSLOT', -1, -1, 0, 0, 41, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 66 {'STONSLOT', -1, -1, 0, 0, 42, '', 'HELPTUTORIAL_CONFIGURATION'}, -- 67 {'STONSLOT', -1, -1, 0, 0, 43, '', 'HELPTUTORIAL_ARROWLEFT'}, -- 68 {'STONSLOT', -1, -1, 0, 0, 44, '', 'HELPTUTORIAL_ARROWRIGHT'}, -- 69 {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {'STONSLOT', -1, -1, 0, 0, 67, '', 'HELPTUTORIAL_SWITCHTOMAGE'}, -- 91 {}, {'STONSLOT', -1, -1, 0, 0, 69, '', 'HELPTUTORIAL_SWITCHTOCLERIC'}, -- 93 } ` menu { name 'HELP' align center center ignoreEsc onOpen " currentButtonHelp = 11 Infinity_PushMenu('LEFT_SIDEBAR_HELP') Infinity_PushMenu('RIGHT_SIDEBAR_HELP') Infinity_PushMenu('WORLD_ACTIONBAR_HELP') " onClose " Infinity_PopMenu('LEFT_SIDEBAR_HELP') Infinity_PopMenu('RIGHT_SIDEBAR_HELP') Infinity_PopMenu('WORLD_ACTIONBAR_HELP') " label { area 0 0 912 244 mosaic GUIERR7 } label { enabled "buttonHelp[currentButtonHelp][3] == -1 and buttonHelp[currentButtonHelp][4] == 0 and buttonHelp[currentButtonHelp][5] == 0 and buttonHelp[currentButtonHelp][6] == -1" area 34 24 75 54 bam lua "buttonHelp[currentButtonHelp][1]" sequence lua "buttonHelp[currentButtonHelp][2]" } label { enabled "buttonHelp[currentButtonHelp][3] == -1 and buttonHelp[currentButtonHelp][4] == 0 and buttonHelp[currentButtonHelp][5] ~= 0 and buttonHelp[currentButtonHelp][6] == -1" area 34 24 44 44 bam lua "buttonHelp[currentButtonHelp][1]" sequence lua "buttonHelp[currentButtonHelp][2]" scaleToClip } label { enabled "buttonHelp[currentButtonHelp][3] == -1 and buttonHelp[currentButtonHelp][4] == 0 and buttonHelp[currentButtonHelp][5] == 0 and buttonHelp[currentButtonHelp][6] ~= -1" area 34 24 75 54 bam lua "buttonHelp[currentButtonHelp][1]" frame lua "buttonHelp[currentButtonHelp][2]" } button { area 34 24 64 90 enabled "buttonHelp[currentButtonHelp][3] ~= -1" portrait lua "buttonHelp[currentButtonHelp][3]" } label { enabled "buttonHelp[currentButtonHelp][4] ~= 0" area 29 16 95 120 bam "CGEAR" frame lua "timer:GetCurrentTime() % 24" } label { enabled "buttonHelp[currentButtonHelp][4] ~= 0" area 29 16 95 120 bam "CDIAL" frame lua "timer:GetCurrentHour() % timer.TIMESCALE_HOUR_PER_DAY" } label { enabled "buttonHelp[currentButtonHelp][4] ~= 0" area 29 16 95 120 bam "CPEN" frame lua "timer:GetCurrentTime() % 24" } label { enabled "buttonHelp[currentButtonHelp][7] ~= ''" area 34 24 52 52 align center center bam lua "buttonHelp[currentButtonHelp][7]" frame lua "buttonHelp[currentButtonHelp][7]" } label { area 118 24 752 120 text lua "getUiString(buttonHelp[currentButtonHelp][8])" text style "label" text align left top } button { area 306 164 300 40 bam GUIBUTWT text "DONE_BUTTON" text style "button" action " Infinity_PopMenu('HELP') " } } menu { name "WORLD_ACTIONBAR_HELP" align center bottom onOpen " " onClose " " ignoreEsc label { area 0 0 746 57 mosaic GUWBTP10 } button { area 21 12 32 32 bam rgdrnbut sequence lua "RgUISkin" glow lua "true" scaleToClip action " currentButtonHelp = 24 " } button { area 68 1 52 52 actionBar 0 enabled "buttonArray:GetButtonEnabled(0)" tooltip lua "actionBarTooltip[0]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(0) " } button { area 122 1 52 52 actionBar 1 enabled "buttonArray:GetButtonEnabled(1)" tooltip lua "actionBarTooltip[1]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(1) " } button { area 177 1 52 52 actionBar 2 enabled "buttonArray:GetButtonEnabled(2)" tooltip lua "actionBarTooltip[2]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(2) " } button { area 231 1 52 52 actionBar 3 enabled "buttonArray:GetButtonEnabled(3)" tooltip lua "actionBarTooltip[3]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(3) " } button { area 299 1 52 52 actionBar 4 enabled "buttonArray:GetButtonEnabled(4)" tooltip lua "actionBarTooltip[4]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(4) " } button { area 353 1 52 52 actionBar 5 enabled "buttonArray:GetButtonEnabled(5)" tooltip lua "actionBarTooltip[5]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(5) " } button { area 407 1 52 52 actionBar 6 enabled "buttonArray:GetButtonEnabled(6)" tooltip lua "actionBarTooltip[6]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(6) " } button { area 461 1 52 52 actionBar 7 enabled "buttonArray:GetButtonEnabled(7)" tooltip lua "actionBarTooltip[7]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(7) " } button { area 528 1 52 52 actionBar 8 enabled "buttonArray:GetButtonEnabled(8)" tooltip lua "actionBarTooltip[8]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(8) " } button { area 582 1 52 52 actionBar 9 enabled "buttonArray:GetButtonEnabled(9)" tooltip lua "actionBarTooltip[9]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(9) " } button { area 636 1 52 52 actionBar 10 enabled "buttonArray:GetButtonEnabled(10)" tooltip lua "actionBarTooltip[10]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(10) " } button { area 689 1 52 52 actionBar 11 enabled "buttonArray:GetButtonEnabled(11)" tooltip lua "actionBarTooltip[11]" glow lua "true" action " currentButtonHelp = 25 + buttonArray:GetButtonType(11) " } } ` function rgSetUIZoomText() local t = 100 - (RgSettingEEexZoomUI * 3) return t .. ' %' end function rgSetUIZoomWidth() local res = 1365 + (82 * RgSettingEEexZoomUI) return res end function rgGetUISkinString() if rgUISkin == 0 then return getUiString('RG_SET_SKIN_SOD') elseif rgUISkin == 1 then return getUiString('RG_SET_SKIN_IWD') elseif rgUISkin == 2 then return getUiString('RG_SET_SKIN_BG1') else return getUiString('RG_SET_SKIN_BG2') end end function rgGetSelectedUiOption(opt) if rgUiOptSelected == opt then return (RgUISkin*2) + 1 else return RgUISkin*2 end end function rgGetUiOptDescription() if rgUiOptSelected == 0 then return getUiString('RG_SET_DESC') elseif rgUiOptSelected == 1 then return getUiString('RG_SET_FREE_MSGBOX_D') elseif rgUiOptSelected == 2 then return getUiString('RG_SET_MODERN_HUD_D') elseif rgUiOptSelected == 3 then return getUiString('RG_SET_MODERN_HUD_R_D') elseif rgUiOptSelected == 4 then return getUiString('RG_SET_HOTKEY_BUTT_D') elseif rgUiOptSelected == 5 then return getUiString('RG_SET_BOTTOM_QLOOT_D') elseif rgUiOptSelected == 6 then return getUiString('RG_SET_INV_LOAD_D') elseif rgUiOptSelected == 7 then return getUiString('RG_SET_SPACE_DLG_D') elseif rgUiOptSelected == 8 then return getUiString('RG_SET_QLOOT_ROWS_D') elseif rgUiOptSelected == 9 then return getUiString('RG_SET_SKIN_D') elseif rgUiOptSelected == 10 then return getUiString('RG_SET_EEEX_ZOOM_D') elseif rgUiOptSelected == 11 then return getUiString('RG_SET_BEST_KOEF_D') elseif rgUiOptSelected == 12 then return getUiString('RG_SET_LARGE_PORT_D') elseif rgUiOptSelected == 13 then return getUiString('RG_SET_CENTER_QLOOT_D') elseif rgUiOptSelected == 14 then return getUiString('RG_SET_EEEX_PCEFF_D') elseif rgUiOptSelected == 15 then return getUiString('RG_SET_EEEX_NPCBAR_D') elseif rgUiOptSelected == 16 then return getUiString('RG_SET_INV_SPRITE_D') else return getUiString('RG_SET_DESC') end end function rgIsRightHudClickable() if rgIsModernHud == 1 and rgMessageboxUnlocked == 1 then return true else return false end end function rgGetNewPaperdollString() if rgInvPaperdolls == 0 then return getUiString('RG_SET_INV_SPRITE_OLD') elseif rgInvPaperdolls == 1 then return getUiString('RG_SET_INV_SPRITE_NEW') elseif rgInvPaperdolls == 2 then return getUiString('RG_SET_INV_SPRITE_POR') elseif rgInvPaperdolls == 3 then return getUiString('RG_SET_INV_SPRITE_FBP') else return getUiString('RG_SET_INV_SPRITE_NON') end end ` menu { name 'RG_UI_SETTINGS' align center center ignoreEsc modal onOpen " RgOptionsMode = 7 Infinity_PushMenu('RG_START_OPTIONS_BAR') --RgSettingEEexZoomUI = 10 RgSettingEEexZoomUI = Infinity_GetINIValue('Graphics','RgSettingEEexZoomUI',0) rgHotkeyButtonsVisibility = RgHotkeyButtonsVisibility rgIsModernHud = RgIsModernHud rgMessageboxUnlocked = RgMessageboxUnlocked rgQuicklootRows = RgQuicklootRows rgQuicklootBottom = RgQuicklootBottom rgQuicklootCenter = RgQuicklootCenter rgBestiaryKoef = RgBestiaryKoef --rgInvPartyModeHover = RgInvPartyModeHover rgInvPartyFastLoad = RgInvPartyFastLoad rgSpaceAdvanceDialog = RgSpaceAdvanceDialog rgModernHudRight = RgModernHudRight rgUISkin = RgUISkin rgLargePortraits = RgLargePortraits rgRadarShowPcEffects = RgRadarShowPcEffects rgRadarKey = RgRadarKey rgInvPaperdolls = RgInvPaperdolls rgUiOptSelected = 0 " text { area 0 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 0 } text { area 597 0 768 768 bam 'rgdbcset' sequence lua "RgUISkin" ScaleToClip frame 1 } label { area 480 32 405 52 text lua "rgString('RG_UI_SETTINGS')" text style 'rg_trajan' align center center } label { area 838 444 425 216 bam rgdobcg sequence lua "RgUISkin" scaleToClip } text { area 408 106 340 46 text "RG_SET_FREE_MSGBOX" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(1)" align left center action "rgUiOptSelected = 1" } button { area 758 114 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgMessageboxUnlocked action "rgUiOptSelected = 1" } text { area 408 152 340 46 text "RG_SET_MODERN_HUD" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(2)" align left center action "rgUiOptSelected = 2" } button { area 758 160 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgIsModernHud action "rgUiOptSelected = 2" } text { area 408 198 340 46 text "RG_SET_MODERN_HUD_R" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(3)" align left center action "rgUiOptSelected = 3" } button { clickable lua "rgIsRightHudClickable()" area 758 206 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgModernHudRight action "rgUiOptSelected = 3" } text { area 408 244 340 46 text "RG_SET_HOTKEY_BUTT" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(4)" align left center action "rgUiOptSelected = 4" } button { area 758 252 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" scaleToClip toggle rgHotkeyButtonsVisibility action "rgUiOptSelected = 4" } text { area 408 290 340 46 text "RG_SET_BOTTOM_QLOOT" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(5)" align left center action "rgUiOptSelected = 5" } button { area 758 298 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" scaleToClip toggle rgQuicklootBottom action "rgUiOptSelected = 5" } text { area 408 336 340 46 text "RG_SET_CENTER_QLOOT" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(13)" align left center action "rgUiOptSelected = 13" } button { area 758 344 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" scaleToClip toggle rgQuicklootCenter action "rgUiOptSelected = 13" } text { area 408 382 340 46 text "RG_SET_INV_LOAD" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(6)" align left center action "rgUiOptSelected = 6" } button { area 758 390 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" toggle rgInvPartyFastLoad action "rgUiOptSelected = 6" } text { area 408 428 340 46 text "RG_SET_SPACE_DLG" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(7)" align left center action "rgUiOptSelected = 7" } button { area 758 436 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" toggle rgSpaceAdvanceDialog action "rgUiOptSelected = 7" } text { area 408 474 340 46 text "RG_SET_LARGE_PORT" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(12)" align left center action "rgUiOptSelected = 12" } button { area 758 482 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" toggle rgLargePortraits action "rgUiOptSelected = 12" } text { area 852 110 200 47 text "RG_SET_QLOOT_ROWS" text style normal text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedUiOption(8)" action "rgUiOptSelected = 8" } slider { area 1066 110 200 47 position "rgQuicklootRows" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 7 pad 5 0 4 0 action "rgUiOptSelected = 8" } text { area 1066 157 200 32 text lua "rgQuicklootRows" --bam rgdslct ScaleToClip sequence lua "RgUISkin*2" text style normal text align center center } text { area 852 193 200 47 text "RG_SET_SKIN" text style normal text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedUiOption(9)" action "rgUiOptSelected = 9" } slider { area 1066 193 200 47 position "rgUISkin" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 4 pad 5 0 4 0 action "rgUiOptSelected = 9" } text { area 1066 240 200 32 text lua "rgGetUISkinString()" --bam rgdslct ScaleToClip sequence lua "RgUISkin*2" text style normal text align center center } text { area 852 276 200 47 text "RG_SET_BEST_KOEF" text style normal text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedUiOption(11)" action "rgUiOptSelected = 11" } slider { area 1066 276 200 47 position "rgBestiaryKoef" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 4 pad 5 0 4 0 action "rgUiOptSelected = 11" } text { area 1066 323 200 32 text lua "rgBestiaryKoef" --bam rgdslct ScaleToClip sequence lua "RgUISkin*2" text style normal text align center center } text { area 852 359 200 47 text "RG_SET_INV_SPRITE" text style normal text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedUiOption(16)" action "rgUiOptSelected = 16" } slider { area 1066 359 200 47 position "rgInvPaperdolls" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 5 pad 5 0 4 0 action "rgUiOptSelected = 16" } text { area 1066 406 200 32 text lua "rgGetNewPaperdollString()" --bam rgdslct ScaleToClip sequence lua "RgUISkin*2" text style normal text align center center } text { enabled "EEex_Active and EEex_Modules['B3Scale']" area 402 536 200 47 --area 852 329 200 47 text "RG_SET_EEEX_ZOOM" text style normal text align left center pad 8 0 0 0 bam rgdslct ScaleToClip sequence lua "rgGetSelectedUiOption(10)" action "rgUiOptSelected = 10" } slider { enabled "EEex_Active and EEex_Modules['B3Scale']" area 614 536 200 47 --area 1066 329 200 47 position "RgSettingEEexZoomUI" bam 'RGDSLDRS' sliderBackground 'RGDSLDRB' scaleToClip sequence lua "RgUISkin" frame 1 settings 11 pad 5 0 4 0 action " --w, h = Infinity_GetScreenSize() rgUiOptSelected = 10 B3Scale_SetPercentage(RgSettingEEexZoomUI/10) --B3Scale_SetWidth(RgSettingEEexZoomUI/10) " } text { enabled "EEex_Active and EEex_Modules['B3Scale']" area 614 583 200 33 --area 1066 376 200 47 text lua "RgSettingEEexZoomUI*10 .. '%'" --bam rgdslct ScaleToClip sequence lua "RgUISkin*2" text style normal text align center center } text { area 848 454 404 196 text lua "rgGetUiOptDescription()" text style normal text align left top scrollbar 'rgdscrl1' } text { enabled "EEex_Active" area 408 614 340 46 text "RG_SET_EEEX_PCEFF" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(14)" align left center action "rgUiOptSelected = 14" } button { enabled "EEex_Active" area 758 622 32 32 bam rgdrnbut scaleToClip sequence lua "RgUISkin" toggle rgRadarShowPcEffects action "rgUiOptSelected = 14" } text { enabled "EEex_Active" area 408 660 340 46 text "RG_SET_EEEX_NPCBAR" text style "normal" bam rgdslct ScaleToClip pad 10 0 0 0 sequence lua "rgGetSelectedUiOption(15)" align left center action "rgUiOptSelected = 15" } label { enabled "EEex_Active" enabled "RgUISkin == 1" area 758 668 32 32 fill 0 0 0 200 } edit { enabled "EEex_Active" area 758 668 32 32 var rgRadarKey text style "edit" maxlines 1 fill 112 111 111 64 align center center action " if (#tostring(rgRadarKey) == 0) then return 1 else rgRadarKey = '' end " } --eeex end button { enabled "RgUISkin < 3" on escape area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('RG_UI_SETTINGS') RgOptionsMode = 0 " } button { enabled "RgUISkin == 3" on escape area 1259 30 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " Infinity_PopMenu('RG_UI_SETTINGS') RgOptionsMode = 0 " } button { area 838 590 428 70 bam rgdmbut2 enabled "rgUiOptSelected == 1" sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('RG_RESET_BUTTON')" -- Done text style "button" action "rgResetMessageBox()" } button { area 838 660 428 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip pad 10 8 10 8 text lua "rgString('DONE_BUTTON')" -- Done text style "button" action " Infinity_SetINIValue('Graphics','RgSettingEEexZoomUI',RgSettingEEexZoomUI) RgHotkeyButtonsVisibility = rgHotkeyButtonsVisibility Infinity_SetINIValue('Game Options','RgHotkeyButtonsVisibility',RgHotkeyButtonsVisibility) RgIsModernHud = rgIsModernHud Infinity_SetINIValue('Game Options','RgIsModernHud',RgIsModernHud) RgMessageboxUnlocked = rgMessageboxUnlocked Infinity_SetINIValue('Game Options','RgMessageboxUnlocked',RgMessageboxUnlocked) RgQuicklootBottom = rgQuicklootBottom Infinity_SetINIValue('Game Options','RgQuicklootBottom',RgQuicklootBottom) RgQuicklootCenter = rgQuicklootCenter Infinity_SetINIValue('Game Options','RgQuicklootCenter',RgQuicklootCenter) RgQuicklootRows = rgQuicklootRows Infinity_SetINIValue('Game Options','RgQuicklootRows',RgQuicklootRows) RgBestiaryKoef = rgBestiaryKoef Infinity_SetINIValue('Game Options','RgBestiaryKoef',RgBestiaryKoef) RgInvPartyFastLoad = rgInvPartyFastLoad Infinity_SetINIValue('Game Options','RgInvPartyFastLoad',RgInvPartyFastLoad) RgUISkin = rgUISkin Infinity_SetINIValue('Game Options','RgUISkin',RgUISkin) RgInvPaperdolls = rgInvPaperdolls Infinity_SetINIValue('Game Options','RgInvPaperdolls',RgInvPaperdolls) if RgIsModernHud == 1 and RgMessageboxUnlocked == 1 then RgModernHudRight = rgModernHudRight else RgModernHudRight = 0 end Infinity_SetINIValue('Game Options','RgModernHudRight',RgModernHudRight) Infinity_SetArea('worldMessageBox',13,12,638,52) Infinity_SetArea('messagesRect',0,0,664,76) Infinity_SetArea('messagesHandleY',0,0,664,10) --rgGetHotkeySlotPosition() RgSpaceAdvanceDialog = rgSpaceAdvanceDialog Infinity_SetINIValue('Game Options','RgSpaceAdvanceDialog',RgSpaceAdvanceDialog) RgLargePortraits = rgLargePortraits Infinity_SetINIValue('Game Options','RgLargePortraits',RgLargePortraits) RgRadarShowPcEffects = rgRadarShowPcEffects Infinity_SetINIValue('Game Options','RgRadarShowPcEffects',RgRadarShowPcEffects) RgRadarKey = rgRadarKey Infinity_SetINIValue('Game Options','RgRadarKey',RgRadarKey) B3Spell_Menu_TEMPLATE_OptionsButton_Bam = rgGetAdvSettingsButtonBam() Infinity_PopMenu('RG_UI_SETTINGS') RgOptionsMode = 0 rgGetHotkeySlotPosition() " } } ` function rgSetMenubarArea() local w, h = Infinity_GetScreenSize() local r = 0 if w < 1360 then r = 45 end Infinity_SetArea('rgmenubackg1',0,0,1365,1) Infinity_SetArea('rgmenubackg2',0,0,1,768) Infinity_SetArea('rgmenubutton1',423,30,58,54) Infinity_SetArea('rgmenubutton2',489,30,58,54) Infinity_SetArea('rgmenubutton3',555,30,58,54) Infinity_SetArea('rgmenubutton4',621,30,58,54) Infinity_SetArea('rgmenubutton5',687,30,58,54) Infinity_SetArea('rgmenubutton6',753,30,58,54) Infinity_SetArea('rgmenubutton7',819,30,58,54) Infinity_SetArea('rgmenubutton8',885,30,58,54) --Infinity_SetArea('rgmenubutton9',1143,28,62,58) if RgUISkin == 3 then Infinity_SetArea('rgmenubutton9',1014,32,54,50) Infinity_SetArea('rgmenubuttclose',1259,26,42,42) else Infinity_SetArea('rgmenubutton9',1147,32,54,50) Infinity_SetArea('rgmenubuttclose',1290-r,7,42,42) end if e:GetActiveEngine() == characterScreen then Infinity_SetArea('flames4',615,10,70,76) elseif e:GetActiveEngine() == journalScreen then Infinity_SetArea('flames4',483,10,70,76) elseif e:GetActiveEngine() == inventoryScreen then Infinity_SetArea('flames4',549,10,70,76) elseif e:GetActiveEngine() == mageScreen then Infinity_SetArea('flames4',681,10,70,76) elseif e:GetActiveEngine() == priestScreen then Infinity_SetArea('flames4',747,10,70,76) elseif e:GetActiveEngine() == optionsScreen then Infinity_SetArea('flames4',813,10,70,76) elseif e:GetActiveEngine() == mapScreen then local top = (h-768)/2 Infinity_SetArea('flames4',417,-top,70,76) Infinity_SetArea('rgmenubutton1',423,12-top,58,54) Infinity_SetArea('rgmenubutton2',489,12-top,58,54) Infinity_SetArea('rgmenubutton3',555,12-top,58,54) Infinity_SetArea('rgmenubutton4',621,12-top,58,54) Infinity_SetArea('rgmenubutton5',687,12-top,58,54) Infinity_SetArea('rgmenubutton6',753,12-top,58,54) Infinity_SetArea('rgmenubutton7',819,12-top,58,54) Infinity_SetArea('rgmenubutton8',885,12-top,58,54) Infinity_SetArea('rgmenubutton9',1047,14-top,54,50) Infinity_SetArea('rgmenubuttclose',1210,18-top,42,42) Infinity_SetArea('rgmenubackg1',0,0-top,1365,1) Infinity_SetArea('rgmenubackg2',0,0,1,1) end if RgUISkin == 3 then Infinity_SetOffset('RG_MENU_BAR',0,4) else Infinity_SetOffset('RG_MENU_BAR',0,0) end end function rgSelectedMenuButton(screen) if e:GetActiveEngine() == screen then return 2 else return 0 end end ` menu { name 'RG_MENU_BAR' align center center ignoreEsc onOpen " rgSetMenubarArea() Infinity_PlayMovie('flames','flames4') " label { name 'rgmenubackg1' area 0 0 1365 1 } label { name 'rgmenubackg2' area 0 0 1 768 } movie { enabled "rgGameEngine ~= 2" name "flames4" area 483 10 70 76 loop } button { name 'rgmenubutton1' area 421 28 62 58 bam "rgdmenub" sequence 0 frame lua "rgSelectedMenuButton(mapScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(4,rgGetGameEngineStringRef(15418,15418,15418,15418))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(mapScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(1) " } button { on 'J' name 'rgmenubutton2' area 487 28 62 58 bam "rgdmenub" sequence 1 frame lua "rgSelectedMenuButton(journalScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(3,rgGetGameEngineStringRef(24359,24359,16308,16308))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(journalScreen)" clickable lua "sidebarsGreyed ~= 1" action " local act = rgJournalActive e:GetActiveEngine():OnLeftPanelButtonClick(0) if act == 0 and rgLargeJournal == 1 then e:GetActiveEngine():OnLeftPanelButtonClick(2) end " } button { --on 'i' name 'rgmenubutton3' area 553 28 62 58 bam "rgdmenub" sequence 2 frame lua "rgSelectedMenuButton(inventoryScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(0,rgGetGameEngineStringRef(24358,24358,16307,16307))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(inventoryScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(3) " } button { --on 'R' name 'rgmenubutton4' area 619 28 62 58 bam "rgdmenub" sequence 3 frame lua "rgSelectedMenuButton(characterScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(1,rgGetGameEngineStringRef(24356,24356,16306,16306))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(characterScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(4) " } button { name 'rgmenubutton5' area 685 28 62 58 bam "rgdmenub" sequence 4 frame lua "rgSelectedMenuButton(mageScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(5,rgGetGameEngineStringRef(24360,24360,16309,16309))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(mageScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(5) " } button { name 'rgmenubutton6' area 751 28 62 58 bam "rgdmenub" sequence 5 frame lua "rgSelectedMenuButton(priestScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(6,rgGetGameEngineStringRef(24357,24357,14930,14930))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(priestScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(6) " } button { name 'rgmenubutton7' area 817 28 62 58 bam "rgdmenub" sequence 6 frame lua "rgSelectedMenuButton(optionsScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(7,rgGetGameEngineStringRef(24362,24362,16311,16311))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(optionsScreen)" clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnLeftPanelButtonClick(7) " } button { name 'rgmenubutton8' area 883 28 62 58 --enabled "e:IsMultiplayer()" bam "rgdmenub" sequence 7 frame lua "rgSelectedMenuButton(multiplayerScreen)" ScaleToClip tooltip lua "getTooltipWithHotkey(8,rgGetGameEngineStringRef(24363,24363,16312,16312))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top --glow lua "highlightSidebarButton(multiplayerScreen)" clickable lua "sidebarsGreyed ~= 1 and e:IsMultiplayer()" action " e:GetActiveEngine():OnLeftPanelButtonClick(8) " } button { enabled "e:GetActiveEngine() ~= optionsScreen" name 'rgmenubutton9' area 1143 28 54 50 bam "rgdmenub" sequence 9 ScaleToClip tooltip lua "getTooltipWithHotkey(31,rgGetGameEngineStringRef(11942,11942,11942,11942))" tooltip force lua "sidebarForceTooltips == 1" tooltip force top clickable lua "sidebarsGreyed ~= 1" action " e:GetActiveEngine():OnRestButtonClick() " } button { enabled "e:GetActiveEngine() ~= optionsScreen" name 'rgmenubuttclose' area 1290 7 42 42 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action " --Infinity_PopMenu('CHARACTER') --rgJournalOpened = 0 e:GetActiveEngine():OnLeftPanelButtonClick(0) --// BY_ME - CLOSE RADAR MENU if Infinity_IsMenuOnStack('RADAR') then Infinity_PopMenu('RADAR') end --Infinity_PopMenu('JOURNAL') --rgJournalOpened = 1 " } } ` function rgFormatKeyCode(number,row) local ret = '' if number < 127 and number > 32 then return string.format('%c', rgHotkeyTable[row][6]) end ret = getUiString("SDL_" .. string.format('%d', rgHotkeyTable[row][6])) return ret end function rgGetHotkeyName(row) local ret = "" if row < 100 then ret = getUiString(rgHotkeyTable[row][4]) if ret == rgHotkeyTable[row][4] then ret = Infinity_FetchString(rgHotkeyTable[row][4]) end else ret = Infinity_FetchString(rgHotkeyTable[row][4]) end return ret end function rgGetHotkeyIcon(number) local ret = '' if number == 0 then if rgHdIcons == 0 then ret = 'rgdhkbt2' else ret = 'rgdhkbt5' end elseif rgHotkeyTable[number][2] == 2 then if rgHdIcons == 0 then ret = 'rgdhkbt1' else ret = 'rgdhkbt4' end elseif rgHotkeyTable[number][2] == 3 then if rgHdIcons == 0 then ret = 'rgdhkbt3' else ret = 'rgdhkbt6' end else if rgHdIcons == 0 then ret = rgHotkeyTable[number][3] .. 'B' else ret = rgHotkeyTable[number][3] .. 'C' end end return ret end function rgGetHotkeyIconSequence(number) local ret = 0 if rgHotkeyTable[number] ~= nil and rgHotkeyTable[number][2] == 2 then for i,v in ipairs(keybindings[2]) do if keybindings[2][i][3] == rgHotkeyTable[number][3] then ret = keybindings[2][i][1]-10 end end --ret = rgHotkeyTable[number][3] end return ret end function rgGetHotkeyFrame(row,val) if row == val then return 2 else return 0 end end function rgGetHotkeySlotName() local ret = getUiString('RG_HB_CHOOSEKEY') if key > 0 then ret = getUiString('RG_HB_CHOOSEKEY') .. rgGetHotkeyName(key) end return ret end function rgGetHotkeySelectionName() local ret = getUiString('RG_HB_CHOOSESEL') if sel > 1 then ret = getUiString('RG_HB_CHOOSEPOR') .. sel-1 else ret = getUiString('RG_HB_CHOOSENON') end return ret end function rgGetHotkeySlotSelectionName(row) local ret = rgHotkeySelection[row] if row == 1 then ret = getUiString('RG_HB_NONE') elseif row == 8 then ret = getUiString('RG_HB_ALL') end return ret end function rgGetHotkeySlotPosition() local screenWidth, screenHeight = Infinity_GetScreenSize() local count = {0,0,0,0,0,0 } local nosel = 0 local lp = 100 if RgLargePortraits == 1 then lp = 130 end local ls = lp - 15 for i,v in ipairs(_rgHotkeyButtonsTable) do local sel = _rgHotkeyButtonsTable[i][2]-1 local name = 'rgHotkeyButton' .. i local c = 0 local p = 0 if sel > 0 and sel < 7 then c = count[sel]+1 count[sel] = c local d = c/2 if RgIsModernHud == 0 then if rgIsEvenNumber(c) == true then p = 42 else d = d+ 0.5 end Infinity_SetArea(name, screenWidth - 80 - (d*42), (lp*sel)-ls+p, nil, nil) else if rgIsEvenNumber(c) == true then p = 41 else d = d+ 0.5 end Infinity_SetArea(name, (82*sel)-82+p, screenHeight - 120 - (d*41), nil, nil) end else if _rgHotkeyButtonsTable[i][3] == 0 then nosel = nosel+1 Infinity_SetArea(name, 10, 100 + (42*nosel), nil, nil) else Infinity_SetArea(name, _rgHotkeyButtonsTable[i][3], _rgHotkeyButtonsTable[i][4], nil, nil) end end end end function rgGetHotkeySlotPositionCheck() local screenWidth, screenHeight = Infinity_GetScreenSize() for i=1,12,1 do local x,y,w,h = Infinity_GetArea('rgHotkeyButton' .. i) Infinity_SetArea('rgHotkeyButtonHandle' .. i, x, y, nil, nil) end end function rgGetHotkeyPortraitSlotsDrag() if draggedPortrait ~= nil then for i,v in ipairs(_rgHotkeyButtonsTable) do if _rgHotkeyButtonsTable[i][2] == draggedPortrait+2 then _rgHotkeyButtonsTable[i][2] = mouseOverPortrait+2 elseif _rgHotkeyButtonsTable[i][2] == mouseOverPortrait+2 then _rgHotkeyButtonsTable[i][2] = draggedPortrait+2 end end rgGetHotkeySlotPosition() --RgHotkeyButtonsTable = _rgHotkeyButtonsTable for i=1,12,1 do RgHotkeyButtonsTable[i][1] = _rgHotkeyButtonsTable[i][1] RgHotkeyButtonsTable[i][2] = _rgHotkeyButtonsTable[i][2] RgHotkeyButtonsTable[i][3] = _rgHotkeyButtonsTable[i][3] RgHotkeyButtonsTable[i][4] = _rgHotkeyButtonsTable[i][4] end rgGetHotkeySlotPositionCheck() rgSaveHotkeyButtonsINI() end end function rgGetHotkeyButtonsFromINI() for i=1,12,1 do local rghtb1 = rgGetCoordinatesFromINI('RgHotkeyButton' .. i) _rgHotkeyButtonsTable[i][1] = rghtb1[1]-0 _rgHotkeyButtonsTable[i][2] = rghtb1[2]-0 _rgHotkeyButtonsTable[i][3] = rghtb1[3]-0 _rgHotkeyButtonsTable[i][4] = rghtb1[4]-0 end rgGetHotkeyTable() rgGetHotkeySlotPosition() --RgHotkeyButtonsTable = _rgHotkeyButtonsTable for i=1,12,1 do RgHotkeyButtonsTable[i][1] = _rgHotkeyButtonsTable[i][1] RgHotkeyButtonsTable[i][2] = _rgHotkeyButtonsTable[i][2] RgHotkeyButtonsTable[i][3] = _rgHotkeyButtonsTable[i][3] RgHotkeyButtonsTable[i][4] = _rgHotkeyButtonsTable[i][4] end rgGetHotkeySlotPositionCheck() end function rgGetHotkeyTable() rgHotkeyTable = { } for i,v in ipairs(keybindings[3]) do if keybindings[3][i][1] == 24 and keybindings[3][i][6] ~= 0 then table.insert(rgHotkeyTable, v) end end for i,v in ipairs(keybindings[2]) do if keybindings[2][i][6] ~= 0 then table.insert(rgHotkeyTable, v) end end for i,v in ipairs(keybindings[5]) do if keybindings[5][i][6] ~= 0 then table.insert(rgHotkeyTable, v) end end for i,v in ipairs(keybindings[6]) do if keybindings[6][i][6] ~= 0 then table.insert(rgHotkeyTable, v) end end end function rgSaveHotkeyButtonsINI() for i=1,12,1 do Infinity_SetINIValue('Game Options','RgHotkeyButton' .. i, RgHotkeyButtonsTable[i][1] .. ',' .. RgHotkeyButtonsTable[i][2] .. ',' .. RgHotkeyButtonsTable[i][3] .. ',' .. RgHotkeyButtonsTable[i][4]) end end function rgDragHotkeyButton(num) local button = 'rgHotkeyButton' .. num local handle = 'rgHotkeyButtonHandle' .. num local x,y,w,h = Infinity_GetArea(button) local offsetX = x + motionX local offsetY = y + motionY if(offsetX < 0) then motionX = 0 end if(offsetY < 0) then motionY = 0 end local screenWidth, screenHeight = Infinity_GetScreenSize() if(offsetX > screenWidth - w) then motionX = 0 end if(offsetY > screenHeight - h) then motionY = 0 end adjustItemGroup({button,handle},motionX,motionY,0,0) _rgHotkeyButtonsTable[num][3] = x+motionX _rgHotkeyButtonsTable[num][4] = y+motionY end rgHotkeyButtonsUnlocked = 0 rgHotkeySelection = {0,1,2,3,4,5,6,7} rgHotkeySlots = {1,2,3,4,5,6,7,8,9,10,11,12} rgHotkeyTable = { } _rgHotkeyButtonsTable = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}} RgHotkeyButtonsTable = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}} ` menu { name 'RG_HOTKEY_BUTTONS' align center top --modal --ignoreEsc onOpen " rgGetHotkeyTable() if _rgHotkeyButtonsTable[1][1] > 0 then key = _rgHotkeyButtonsTable[1][1] end if _rgHotkeyButtonsTable[1][2] > 0 then sel = _rgHotkeyButtonsTable[1][2] else sel = 1 end RgHotkeyButtonsVisibility = 0 rgHotkeyButtonsUnlocked = 0 Infinity_SetArea('rgHotkeyButtonsList', nil, nil, #rgHotkeyTable*56, nil) rghotkey = 0 rgHotkeySlot = 1 hslot = 1 --Infinity_PushMenu('RG_HOTKEY_BUTTONS') " onClose " RgHotkeyButtonsVisibility = 1 rgHotkeyButtonsUnlocked = 0 rgGetHotkeySlotPositionCheck() " label { area 0 0 800 300 rectangle 0 ScaleToClip } button { area 4 232 264 66 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" text "BACK_BUTTON" text style "button" action "Infinity_PopMenu()" } button { area 268 232 264 66 bam rgdmbut2 ScaleToClip sequence lua "RgUISkin" text "REVERT_BUTTON" text style "button" action " _rgHotkeyButtonsTable[rgHotkeySlot][1] = 0 _rgHotkeyButtonsTable[rgHotkeySlot][2] = 0 key = 0 sel = 0 " } button { area 532 232 264 66 bam rgdmbut2 ScaleToClip text "DONE_BUTTON" text style "button" sequence lua "RgUISkin" --clickable lua "rgKey1 > 0 and rgKey2 > 0 and rgKey3 > 0" action " rgGetHotkeySlotPosition() --RgHotkeyButtonsTable = _rgHotkeyButtonsTable for i=1,12,1 do RgHotkeyButtonsTable[i][1] = _rgHotkeyButtonsTable[i][1] RgHotkeyButtonsTable[i][2] = _rgHotkeyButtonsTable[i][2] RgHotkeyButtonsTable[i][3] = _rgHotkeyButtonsTable[i][3] RgHotkeyButtonsTable[i][4] = _rgHotkeyButtonsTable[i][4] end rgSaveHotkeyButtonsINI() Infinity_PopMenu() " } button { area 468 176 40 40 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgHotkeyButtonsUnlocked } label { area 518 176 274 40 text "RG_HB_DRAG" text style "normal" align left center } list -- slots { column { width 100 label { area 0 0 54 54 bam 'rgdslot3' sequence lua "RgUISkin" frame lua "rgGetHotkeyFrame(rowNumber,hslot)" ScaleToClip } label { enabled "rgHdIcons == 0" area 0 0 54 54 bam lua "rgGetHotkeyIcon(_rgHotkeyButtonsTable[rowNumber][1])" sequence lua "rgGetHotkeyIconSequence(_rgHotkeyButtonsTable[rowNumber][1])" align center center } label { enabled "rgHdIcons == 1" area 0 0 54 54 bam lua "rgGetHotkeyIcon(_rgHotkeyButtonsTable[rowNumber][1])" sequence lua "rgGetHotkeyIconSequence(_rgHotkeyButtonsTable[rowNumber][1])" scaleToClip } } hideHighlight area 10 10 700 56 rowwidth 56 table "rgHotkeySlots" var hslot action " rgHotkeySlot = hslot; key = _rgHotkeyButtonsTable[hslot][1] sel = _rgHotkeyButtonsTable[hslot][2] " } label { area 10 67 450 20 text lua "rgGetHotkeySlotName()" text style "button" align left center } label { area 10 145 450 20 text lua "rgGetHotkeySelectionName()" text style "button" align left center } list -- Key bindings { column { width 100 -- label { area 0 0 54 54 bam 'rgdslot3' sequence lua "RgUISkin" frame lua "rgGetHotkeyFrame(rowNumber,key)" ScaleToClip } label { enabled "rgHdIcons == 0" area 0 0 54 54 bam lua "rgGetHotkeyIcon(rowNumber)" sequence lua "rgGetHotkeyIconSequence(rowNumber)" align center center } label { enabled "rgHdIcons == 1" area 0 0 54 54 bam lua "rgGetHotkeyIcon(rowNumber)" sequence lua "rgGetHotkeyIconSequence(rowNumber)" scaleToClip } label { area 2 0 20 20 text lua "rgFormatKeyCode(rgHotkeyTable[rowNumber][6],rowNumber)" text style "button" align left top } } hideHighlight area 10 88 672 56 rowwidth 56 name "rgHotkeyButtonsList" table "rgHotkeyTable" --tooltip lua "rgGetHotkeyName(key)" var key scrollbar 'rgdscrl1' action " _rgHotkeyButtonsTable[rgHotkeySlot][1] = key " } list -- selection { column { width 100 label { area 0 0 54 54 bam 'rgdslot3' sequence lua "RgUISkin" frame lua "rgGetHotkeyFrame(rowNumber,sel)" ScaleToClip } label { enabled "rowNumber ~= 1" area 5 5 44 44 bitmap 'rgnopor' } label { area 0 0 -1 -1 --text lua "rgHotkeySelection[rowNumber]" text lua "rgGetHotkeySlotSelectionName(rowNumber)" text style "button" } } hideHighlight area 10 166 450 56 rowwidth 56 table "rgHotkeySelection" var sel action " _rgHotkeyButtonsTable[rgHotkeySlot][2] = sel " } } ` function rgGetOptionsbarGlow(num) if RgOptionsMode == num then return 1 else return 0 end end ` menu { name 'RG_OPTIONS_BAR' align center center ignoreEsc onClose " Infinity_PopMenu('OPTIONS_GAMEPLAY') Infinity_PopMenu('OPTIONS_GRAPHICS') Infinity_PopMenu('OPTIONS_SOUND') Infinity_PopMenu('OPTIONS_FEEDBACK') Infinity_PopMenu('OPTIONS_AUTOPAUSE') Infinity_PopMenu('OPTIONS_KEYBINDINGS') Infinity_PopMenu('RG_UI_SETTINGS') Infinity_PopMenu('OPTIONS_LANGUAGE') Infinity_PopMenu('MOVIES') " label { name 'rgmenubackg1x' area 0 0 1365 1 } label { name 'rgmenubackg2x' area 0 0 1 768 } button { bam rgdmbut2 ScaleToClip area 100 106 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "GAMEPLAY_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_GAMEPLAY' ) " } button { bam rgdmbut2 ScaleToClip area 100 186 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "GRAPHICS_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_GRAPHICS' ) " } button { bam rgdmbut2 ScaleToClip area 100 266 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "SOUND_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_SOUND' ) " } button { bam rgdmbut2 ScaleToClip area 100 346 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "FEEDBACK_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_FEEDBACK' ) " } button { bam rgdmbut2 ScaleToClip area 100 426 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "AUTO_PAUSE_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_AUTOPAUSE' ) " } button { bam rgdmbut2 ScaleToClip area 100 506 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "ASSIGN_KEYS_BUTTON" clickable lua "not e:IsTouchUI()" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_KEYBINDINGS' ) " } button { bam rgdmbut2 ScaleToClip area 100 586 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "RG_UI_SETTINGS" action " Infinity_PopMenu() Infinity_PushMenu( 'RG_UI_SETTINGS' ) " } button { enabled "rgOptLang == 1" bam rgdmbut2 ScaleToClip area 100 666 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text "LANGUAGE_BUTTON" action " Infinity_PopMenu() Infinity_PushMenu( 'OPTIONS_LANGUAGE' ) " } button { enabled "rgOptLang == 1" bam rgdmbut2 ScaleToClip area 100 26 300 80 pad 10 8 10 8 text style "button" sequence lua "RgUISkin" text lua "getUiString('CREDITS_TITLE') .. ' & ' .. getUiString('MOVIES_TITLE')" action " Infinity_PopMenu() Infinity_PushMenu( 'MOVIES' ) " } } ` createPartyOffset = 0 prerollCharacters = {} function scrollPregens() if scrollDirection > 0 then scrollPregenUp() elseif scrollDirection < 0 then scrollPregenDown() end end function scrollPregenUp() if createPartyOffset > 0 then createPartyOffset = createPartyOffset - 1 end end function scrollPregenDown() if createPartyOffset < (#prerollCharacters - 4) then createPartyOffset = createPartyOffset + 1 end end function getPregenCharacterName(slotNumber) local ret = "" if slotNumber + createPartyOffset < #prerollCharacters+1 then ret = prerollCharacters[slotNumber+createPartyOffset]["name"] end return ret end function getPregenCharacterBiography(slotNumber) local ret = "" if slotNumber + createPartyOffset < #prerollCharacters+1 then ret = prerollCharacters[slotNumber+createPartyOffset]["description"] end return ret end function getPregenCharacterPortrait(slotNumber) local ret = "noportsm" if slotNumber + createPartyOffset < #prerollCharacters+1 then ret = prerollCharacters[slotNumber+createPartyOffset]["image"] end return ret end function getPregenCharacterFileName(slotNumber) local ret = "" if slotNumber + createPartyOffset < #prerollCharacters+1 then ret = prerollCharacters[slotNumber+createPartyOffset]["file"] end return ret end function playAsPreroll(slotNumber) local fileName = getPregenCharacterFileName(slotNumber) if fileName ~= "" then end end function rgGetImportArea() local screenWidth, screenHeight = Infinity_GetScreenSize() Infinity_SetArea('rgImportBackButton',nil,screenHeight-74,nil,nil) Infinity_SetArea('rgImportList',nil,84,nil,screenHeight-168) end function rgGetImportInfo(text) local list = {} for i in string.gmatch(text, "[^\r\n]+") do table.insert(list, i); end return list[1] end ` menu { name 'CHARGEN_SELECTPREGEN' align center top onOpen " rgGetImportArea() createPartyOffset = 0 createCharScreen:GetImportableCharacters() ticksPassed = 0 ticksStarting = 0 " label { area 0 0 1365 768 } label { area 170 10 1025 44 text "CHARGEN_TITLE" text style "button" text shadow 1 } list { column { width 80 label { area 0 0 -1 -1 bam 'rgdcgim1' scaleToClip sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,rgImportCharacter)" align left top } label { bitmap lua 'prerollCharacters[rowNumber].image' area 9 8 58 84 align center center } label { area 85 12 -1 35 text lua "prerollCharacters[rowNumber].name" text style "normal" } label { area 85 50 720 50 text lua "rgGetImportInfo(prerollCharacters[rowNumber].description)" text style "rg_normal_small" } } column { width 20 label { area 0 0 -1 -1 bam 'rgdcgim2' scaleToClip sequence lua "RgUISkin" frame lua "rgGetSelectedHighlight(rowNumber,rgImportCharacter)" align left top } label { area 0 20 187 60 bam rgdbuts1 ScaleToClip frame lua "currentCellCheck(2)" text "PLAY_IMPORT_BUTTON" text style "button" pad 8 2 8 2 } } name "rgImportList" area 182 84 1000 912 rowheight 100 hidehighlight var rgImportCharacter table "prerollCharacters" scrollbar 'rgdscrl1' action " if ticksStarting < 20 then if(cellNumber == 2) then Infinity_PopMenu() createCharScreen:OnPrerollCharacterPick(rgImportCharacter-1) end end cellNumber = nil ticksPassed = 0 ticksStarting = 0 " actionUpdate " ticksStarting = ticksStarting + 1 if ticksStarting > 20 then ticksPassed = ticksPassed + 1 if ticksPassed > 2 then ticksPassed = 0 ticksStarting = 0 if(cellNumber == 2) then --Infinity_PopMenu() --createCharScreen:OnPrerollCharacterPick(rgImportCharacter-1) end end end " } button { name "rgImportBackButton" on escape area 532 1006 300 64 bam rgdmbut1 ScaleToClip align center center text style "button" text "BACK_BUTTON" pad 8 2 8 2 action " Infinity_PopMenu() createCharScreen:OnMainCancelButtonClick() " } } ` contingencySpellType = 0 contingencySpellLevel = 1 contingencySwapTable = {} function getContingencyTitle() return getUiString(mageBookStrings[contingencyResRef].title) end function getContingencySpellType() local ret = "" if contingencySpellType == 0 then ret = getUiString("MAGE_SPELLS_TITLE") else ret = getUiString("ASSIGN_KEYS_PRIESTSPELLS") end return ret end function getContingencySpellLevel() local ret = "" ret = getUiString("LEVEL_LABEL").." "..contingencySpellLevel return ret end function getContingencyTypeButtonText() local ret if contingencySpellType == 0 then ret = Infinity_FetchString(7204) else ret = Infinity_FetchString(7203) end return ret end function filterContingencyMageSpellsIwd() local out = {} if contingencySpellType == 0 then if characters[id].mageSpells ~= nil and characters[id].mageSpells[contingencySpellLevel] ~= nil then for k,v in pairs(characters[id].mageSpells[contingencySpellLevel]) do if v.castableCount > 0 and mageScreen:SpellAllowedForContingency(v.level, v.resref) then tableInsert(out, v) end end end else if characters[id].priestSpells ~= nil and characters[id].priestSpells[contingencySpellLevel] ~= nil then for k,v in pairs(characters[id].priestSpells[contingencySpellLevel]) do if v.castableCount > 0 and mageScreen:SpellAllowedForContingency(v.level, v.resref) then tableInsert(out, v) end end end end return out end function getContingencySpellIcon(slotNumber) local ret = "" if slotNumber <= #bookSpells then ret = bookSpells[slotNumber].icon end return ret end function getContingencySpellCastableCount(slotNumber) local ret = "" if slotNumber <= #bookSpells and bookSpells[slotNumber].castableCount > 1 then ret = bookSpells[slotNumber].castableCount end return ret end function contingencyDisplaySpellDescription(slotNumber) if slotNumber <= #bookSpells then contingencyDescription = bookSpells[slotNumber].description end end function contingencyDisplaySetSpellDescription(slotNumber) if slotNumber <= #sequencerSpells then contingencyDescription = sequencerSpells[slotNumber].description end end function changeContingencySpellLevel(changeAmount) local newLevel = contingencySpellLevel + changeAmount if newLevel >= 1 and newLevel <= maxMagePage then contingencySpellLevel = newLevel bookSpells = filterContingencyMageSpellsIwd() end end function swapContingencySpellType() contingencySpellType = 1 - contingencySpellType if contingencySpellType == 0 and contingencySpellLevel > maxMagePage then contingencySpellLevel = maxMagePage elseif contingencySpellType == 1 and contingencySpellLevel > math.min(maxMagePage, 7) then contingencySpellLevel = math.min(maxMagePage, 7) end end function getContingencySetSpellIcon(slotNumber) local ret = "" if sequencerSpells ~= nil and #sequencerSpells >= slotNumber then ret = sequencerSpells[slotNumber].icon end return ret end function contingencyCompleteIwd() local ret = false if showContingency and #sequencerSpells == contingencyMaxSpells and (currentContingencyCondition or 0) > 0 and (currentContingencyTarget or 0) > 0 then ret = true elseif not showContingency and #sequencerSpells == contingencyMaxSpells then ret = true end return ret end ` menu { name 'CONTINGENCY' align center center modal onOpen " currentContingencyCondition = 0 currentContingencyTarget = 0 contingencySpellType = 0 contingencySpellLevel = 1 bookSpells = filterContingencyMageSpellsIwd() contingencyDescription = mageBookStrings[contingencyResRef].tip " label { area 0 0 768 768 bam rgdbccg2 frame 0 sequence lua "RgUISkin" scaleToClip } label { area 597 0 768 768 bam rgdbccg2 frame 1 sequence lua "RgUISkin" scaleToClip } label { area 146 36 1074 44 text lua "getContingencyTitle()" text style "button" } label { area 114 100 356 37 text "CONDITION_LABEL" enabled "showContingency" text style "normal" text align left center } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentContingencyCondition)" ScaleToClip } label { area 10 0 -1 -1 text lua "Infinity_FetchString( contingencyConditions[rowNumber].strref)" text style "normal" text align left center } } area 114 144 358 246 hidehighlight rowheight 40 enabled "showContingency" table "contingencyConditions" var currentContingencyCondition scrollbar 'rgdscrl1' action " contingencyDescription = contingencyConditions[currentContingencyCondition].desc " } label { area 518 100 380 37 text "TARGET_LABEL" text style "normal" text align left center enabled "showContingency" } list { column { width 100 label { area 0 0 -1 -1 bam rgdslct sequence lua "rgGetSelectedHighlight(rowNumber, currentContingencyTarget)" ScaleToClip } label { area 10 0 -1 -1 text lua "Infinity_FetchString( contingencyTargets[rowNumber].strref)" text style "normal" text align left center } } area 518 144 358 246 hideHighlight enabled "showContingency" rowheight 40 table "contingencyTargets" var currentContingencyTarget scrollbar 'rgdscrl1' action " contingencyDescription = contingencyTargets[currentContingencyTarget].desc " } label { area 110 418 250 49 text lua "getContingencySpellType()" text style "normal" text align left center } label { area 354 418 176 49 text lua "getContingencySpellLevel()" text style "normal" text align right center } button { area 534 418 44 44 bam rgdcpbt1 scaleToClip action " changeContingencySpellLevel(1) " } button { area 578 418 44 44 bam rgdcpbt2 scaleToClip action " changeContingencySpellLevel(-1) " } button { area 636 414 231 58 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text lua "getContingencyTypeButtonText()" text style "button" action " swapContingencySpellType() bookSpells = filterContingencyMageSpellsIwd() " } button { area 110 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(1)" count lua "getContingencySpellCastableCount(1)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(1) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[1].resref, bookSpells[1].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(1) " } button { area 180 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(2)" count lua "getContingencySpellCastableCount(2)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(2) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[2].resref, bookSpells[2].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(2) " } button { area 250 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(3)" count lua "getContingencySpellCastableCount(3)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(3) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[3].resref, bookSpells[3].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(3) " } button { area 320 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(4)" count lua "getContingencySpellCastableCount(4)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(4) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[4].resref, bookSpells[4].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(4) " } button { area 390 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(5)" count lua "getContingencySpellCastableCount(5)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(5) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[5].resref, bookSpells[5].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(5) " } button { area 460 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(6)" count lua "getContingencySpellCastableCount(6)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(6) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[6].resref, bookSpells[6].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(6) " } button { area 530 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(7)" count lua "getContingencySpellCastableCount(7)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(7) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[7].resref, bookSpells[7].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(7) " } button { area 600 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(8)" count lua "getContingencySpellCastableCount(8)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(8) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[8].resref, bookSpells[8].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(8) " } button { area 670 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(9)" count lua "getContingencySpellCastableCount(9)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(9) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[9].resref, bookSpells[9].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(9) " } button { area 740 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(10)" count lua "getContingencySpellCastableCount(10)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(10) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[10].resref, bookSpells[10].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(10) " } button { area 810 486 52 52 bam "RGDSLOT" scaleToClip icon lua "getContingencySpellIcon(11)" count lua "getContingencySpellCastableCount(11)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySpellDescription(11) if #sequencerSpells < contingencyMaxSpells then mageScreen:SequenceSpell( bookSpells[11].resref, bookSpells[11].masterResref ) end " actionAlt " contingencyDisplaySpellDescription(11) " } button { area 110 570 64 64 enabled "contingencyMaxSpells >= 1" bam "RGDSLOT" scaleToClip icon lua "getContingencySetSpellIcon(1)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySetSpellDescription(1) mageScreen:UnSequenceSpell( sequencerSpells[1].resref, sequencerSpells[1].masterResref ) table.remove(sequencerSpells, 1) " actionAlt " contingencyDisplaySetSpellDescription(1) " } button { area 200 570 64 64 enabled "contingencyMaxSpells >= 2" bam "RGDSLOT" scaleToClip icon lua "getContingencySetSpellIcon(2)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySetSpellDescription(2) mageScreen:UnSequenceSpell( sequencerSpells[2].resref, sequencerSpells[2].masterResref ) table.remove(sequencerSpells, 2) " actionAlt " contingencyDisplaySetSpellDescription(2) " } button { area 290 570 64 64 enabled "contingencyMaxSpells >= 3" bam "RGDSLOT" scaleToClip icon lua "getContingencySetSpellIcon(3)" sequenceonce "getRandomButtonSequence('GUIBTBUT')" action " contingencyDisplaySetSpellDescription(3) mageScreen:UnSequenceSpell( sequencerSpells[3].resref, sequencerSpells[3].masterResref ) table.remove(sequencerSpells, 3) " actionAlt " contingencyDisplaySetSpellDescription(3) " } text { area 922 108 340 526 text lua "Infinity_FetchString(contingencyDescription)" text style "normal_parchment" scrollbar 'rgdscrl1' } button { on escape area 316 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "CANCEL_BUTTON" text style "button" action " mageScreen:CancelSequencingSpells() e:SelectEngine(worldScreen) " } button { on return area 732 661 320 70 bam rgdmbut2 sequence lua "RgUISkin" ScaleToClip text "DONE_BUTTON" text style "button" clickable lua "contingencyCompleteIwd()" action " mageScreen:DoneSequencingSpells() e:SelectEngine(worldScreen) " } } ` function rgGetRadarEfectsArea() --local n = (#my_radar_sprite.timed_effects)*30 local n = 0 local m = 0 local o = 0 local w, h = Infinity_GetScreenSize() local a = h - 135 - 120 - 10 local b = w - 110 if my_radar_sprite.all_info ~= nil then n = (#my_radar_sprite.all_info)*25 end if my_radar_sprite ~= nil then m = (#my_radar_sprites)*72 - (rgRadarPcNumber*72) end --if my_radar_sprite.items ~= nil then o = (#my_radar_sprite.items)*25 end --if o == 25 then o = 30 end local ql = 0 if rgQuicklootSlotVisibility(rgGetQlSlotIndex(0)) and RgQuicklootRows > ( 0) then ql = 1 end if rgQuicklootSlotVisibility(rgGetQlSlotIndex(10)) and RgQuicklootRows > ( 1) then ql = 2 end if rgQuicklootSlotVisibility(rgGetQlSlotIndex(20)) and RgQuicklootRows > ( 2) then ql = 3 end if rgQuicklootSlotVisibility(rgGetQlSlotIndex(30)) and RgQuicklootRows > ( 3) then ql = 4 end if rgQuicklootSlotVisibility(rgGetQlSlotIndex(40)) and RgQuicklootRows > ( 4) then ql = 5 end if rgQuicklootSlotVisibility(rgGetQlSlotIndex(50)) and RgQuicklootRows > ( 5) then ql = 6 end if groundItemsButtonToggle == 1 then a = a - 30 - (ql * 52) end --if o > a then o = a end if n > a then n = a end if m > b then m = b end Infinity_SetArea('ui_radar_sprites',nil,nil,m,nil) Infinity_SetArea('ui_radar_sprites_name',nil,nil,m,nil) if rgRadarShowNames == 1 then Infinity_SetArea('ui_radar_sprites_states',nil,125,m,nil) --Infinity_SetArea('ui_radar_sprites_states_single',nil,125,nil,nil) else Infinity_SetArea('ui_radar_sprites_states',nil,92,m,nil) --Infinity_SetArea('ui_radar_sprites_states_single',nil,95,nil,nil) end local maxEff = 0 if my_radar_sprites ~= nil then for i=1, #my_radar_sprites do if my_radar_sprites[i].pc == false then if #my_radar_sprites[i].effects > maxEff then maxEff = #my_radar_sprites[i].effects end end end end if maxEff > 6 then Infinity_SetArea('ui_radar_sprites_states',nil,nil,nil,69) --Infinity_SetArea('ui_radar_sprites_states_single',nil,nil,nil,69) elseif maxEff > 3 then Infinity_SetArea('ui_radar_sprites_states',nil,nil,nil,46) --Infinity_SetArea('ui_radar_sprites_states_single',nil,nil,nil,46) elseif maxEff > 0 then Infinity_SetArea('ui_radar_sprites_states',nil,nil,nil,23) --Infinity_SetArea('ui_radar_sprites_states_single',nil,nil,nil,23) else Infinity_SetArea('ui_radar_sprites_states',nil,nil,nil,0) --Infinity_SetArea('ui_radar_sprites_states_single',nil,nil,nil,0) end --local pw = Infinity_GetNumCharacters()*82 for i=1, Infinity_GetNumCharacters() do if my_radar_sprites[rgRadarPcOrder[i]] ~= nil then if #my_radar_sprites[rgRadarPcOrder[i]].effects > 6 then Infinity_SetArea('ui_radar_sprites_states_pc_m' .. i,nil,h-189,nil ,69) elseif #my_radar_sprites[rgRadarPcOrder[i]].effects > 3 then Infinity_SetArea('ui_radar_sprites_states_pc_m' .. i,nil,h-166,nil ,46) elseif #my_radar_sprites[rgRadarPcOrder[i]].effects > 0 then Infinity_SetArea('ui_radar_sprites_states_pc_m' .. i,nil,h-143,nil ,23) else Infinity_SetArea('ui_radar_sprites_states_pc_m' .. i,nil,h-143,nil ,0) end end end Infinity_SetArea('ui_screen_radar_all',nil,nil,nil,n) Infinity_SetArea('ui_screen_radar_all_box',nil,nil,nil,n+10) Infinity_SetArea('rgRadarSingleCreature',(w/2)-100,nil,nil,nil) if rgRadarShowNames == 1 then Infinity_SetArea('ui_radar_sprites_states_single',(w/2)-100+72,44,nil,46) else Infinity_SetArea('ui_radar_sprites_states_single',(w/2)-100+72,20,nil,70) end end function rgGetRadarHealthbarFrame(row) local a = my_radar_sprites[row].m_baseStats.m_hitPoints local b = my_radar_sprites[row]:getStat(STATS_MAXHITPOINTS) local res = (a / b) * 100 if rgRadarShowTresholds == 1 then if res == 100 then res = 100 elseif res > 80 then res = 80 elseif res > 60 then res = 60 elseif res > 40 then res = 40 elseif res > 20 then res = 20 else res = 0 end end return res end function rgGetRadarTimeEffect(row,effect) local a = my_radar_sprites[row].effects[effect].remaining local b = my_radar_sprites[row].effects[effect].duration return (a / b) * 100 end function rgGetRadarListFrame(row) if row == SPRITE_ROW then return 1 else return 0 end end function rgGetRadarCreatureSlot(row) local alg = my_radar_sprites[row].m_liveTypeAI.m_EnemyAlly if alg == 2 or alg == 3 or alg == 4 then return 'rgdslotg' elseif alg == 255 then return 'rgdslotr' else return 'rgdslotb' end end function rgGetRadarPcRightClick(pc) if rgRadarAllowInfo == 0 then Infinity_OnPortraitRClick(pc) else local name = Infinity_GetPortraitTooltip(pc) lines = {} for s in name:gmatch("[^\r\n]+") do table.insert(lines, s) end name = lines[1] for i=1,#my_radar_sprites do if my_radar_sprites[i].displayed_name_short == name then SPRITE_ROW = i my_screen_radar_Inspect_sprite(i) if rgSpriteRow ~= SPRITE_ROW then my_screen_radar_Inspect_sprite(SPRITE_ROW) else SPRITE_ROW = nil end rgSpriteRow = SPRITE_ROW break end end end end function rgGetRadarPcOrder() for i=1, Infinity_GetNumCharacters() do local pc = Infinity_GetPortraitTooltip(i-1) for j=1, Infinity_GetNumCharacters() do if my_radar_sprites[j] ~= nil then local sp = my_radar_sprites[j].tooltip if pc == sp then rgRadarPcOrder[i] = j break end end end end end function rgRev(row,num) local num = #my_radar_sprites[rgRadarPcOrder[num]].effects if row == 1 then if num <= 3 then return 1 elseif num <= 6 then return 2 else return 3 end end if row == 2 then if num <= 6 then return 1 else return 2 end end if row == 3 then return 1 end end function rgRadarPcEffectsAction(char,vari) Infinity_PopMenu('RG_RADAR_EFFDESC'); rgRadarDesc = my_radar_sprites[rgRadarPcOrder[char]].effects[vari] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end end function rgRadarPcEffectsIcon(num,row) return my_radar_sprites[rgRadarPcOrder[num]].effects[row].icon end function rgRadarPcEffectsTimer(num,row) return #my_radar_sprites[rgRadarPcOrder[num]].effects >= row and rgGetRadarTimeEffect(rgRadarPcOrder[num],row) < -1 end function rgRadarPcEffectsFrame(num,row) return rgGetRadarTimeEffect(rgRadarPcOrder[num],row) end function rgRadarPcEffectsEnabled(num,eff) return my_radar_sprites[rgRadarPcOrder[num]] ~= nil and RgRadarShowPcEffects == 1 and #my_radar_sprites[rgRadarPcOrder[num]].effects > eff and RgIsModernHud == 0 end function rgRadarGetPcEffLoc() local w, h = Infinity_GetScreenSize() if RgLargePortraits == 0 then rgpCoef = 4 Infinity_SetArea('ui_radar_sprites_states_pc_c11',w-159,10,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c12',w-136,10,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c13',w-113,10,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c21',w-159,110,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c22',w-136,110,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c23',w-113,110,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c31',w-159,210,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c32',w-136,210,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c33',w-113,210,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c41',w-159,310,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c42',w-136,310,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c43',w-113,310,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c51',w-159,410,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c52',w-136,410,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c53',w-113,410,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c61',w-159,510,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c62',w-136,510,nil,92) Infinity_SetArea('ui_radar_sprites_states_pc_c63',w-113,510,nil,92) else rgpCoef = 5 Infinity_SetArea('ui_radar_sprites_states_pc_c11',w-159,10,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c12',w-136,10,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c13',w-113,10,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c21',w-159,140,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c22',w-136,140,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c23',w-113,140,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c31',w-159,270,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c32',w-136,270,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c33',w-113,270,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c41',w-159,400,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c42',w-136,400,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c43',w-113,400,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c51',w-159,530,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c52',w-136,530,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c53',w-113,530,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c61',w-159,660,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c62',w-136,660,nil,115) Infinity_SetArea('ui_radar_sprites_states_pc_c63',w-113,660,nil,115) end end function rgRadarUpdateHotkeySlotPosition(close) if RgRadarShowPcEffects == 1 then local screenWidth, screenHeight = Infinity_GetScreenSize() -- local count = {0,0,0,0,0,0 } for i,v in ipairs(_rgHotkeyButtonsTable) do local sel = _rgHotkeyButtonsTable[i][2]-1 local name = 'rgHotkeyButton' .. i local c = 0 --local p = 0 if sel > 0 and sel < 7 then c = count[sel]+1 count[sel] = c local d = c/2 local offset = 0 if my_radar_sprites[rgRadarPcOrder[sel]] ~= nil then if RgIsModernHud == 0 then if #my_radar_sprites[rgRadarPcOrder[sel]].effects > 0 then offset = 33 end if #my_radar_sprites[rgRadarPcOrder[sel]].effects > rgpCoef then offset = 56 end if #my_radar_sprites[rgRadarPcOrder[sel]].effects > (2*rgpCoef) then offset = 79 end --adjustItemGroup({name},offset,0,0,0) if rgIsEvenNumber(c) == false then d = d+ 0.5 end Infinity_SetArea(name, screenWidth - 80 - (d*42) - offset, nil, nil, nil) --rgteststts = d .. ' ' .. offset .. ' ' .. rgRadarPcOrder[sel] .. ' ' .. #my_radar_sprites[rgRadarPcOrder[sel]].effects .. ' ' .. rgpCoef --if rgIsEvenNumber(c) == true then p = 42 else d = d+ 0.5 end --Infinity_SetArea(name, screenWidth - 80 - (d*42), (lp*sel)-ls+p, nil, nil) else if #my_radar_sprites[rgRadarPcOrder[sel]].effects > 0 then offset = 25 end if #my_radar_sprites[rgRadarPcOrder[sel]].effects > 3 then offset = 47 end if #my_radar_sprites[rgRadarPcOrder[sel]].effects > 6 then offset = 71 end if rgIsEvenNumber(c) == true then p = 41 else d = d+ 0.5 end if close == 0 then Infinity_SetArea(name, nil, screenHeight - 120 - (d*41)- offset, nil, nil) else Infinity_SetArea(name, nil, screenHeight - 120 - (d*41), nil, nil) end end end end end end end function rgRadarInspectSprite() if SPRITE_ROW ~= nil then for s=1,#my_radar_sprites do local candidate = my_radar_sprites[s] if candidate.m_id == rgRadarSelectedCreId then SPRITE_ROW = s end end my_screen_radar_Inspect_sprite(SPRITE_ROW) end end rgRadarPcOrder = {0,0,0,0,0,0} rgRadarActive = 0 rgpCoef = 0 rgSingleCreInfo = 0 rgRadarPcNumber = 0 rgRadarSelectedCreId = 0 rgRadarShowAdvInfo = 0 rgRadarShowSettings = 0 ` menu { name 'RADAR' --// BY_ME align left top --offset 0 100 ignoreEsc onOpen " rgRadarActive = 1 my_screen_radar_Search_sprites() rgSpriteRow = nil " onClose " charTable = {} " button { area 0 0 0 0 text lua "my_screen_radar_Search_sprites()" } button { area 0 0 0 0 text lua "rgRadarInspectSprite()" } button { area 0 0 0 0 text lua "rgGetRadarEfectsArea()" } list -- UI DISPLAYING THE CREATURES VISIBLE BY PARTY { column { width 100 label { area 0 0 70 70 bam "rgdslot" ScaleToClip align left top } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil" area 4 4 62 62 bitmap lua "my_radar_sprites[rowNumber+rgRadarPcNumber].image" text style normal } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil" area 4 0 62 94 bitmap lua "my_radar_sprites[rowNumber+rgRadarPcNumber].portrait" } label { area 0 68 70 2 fill 1 1 1 255 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil" area 4 4 62 62 bam rgdhlba1 frame lua "rgGetRadarHealthbarFrame(rowNumber+rgRadarPcNumber)" ScaleToClip align left top } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil" area 0 0 70 70 bam lua "rgGetRadarCreatureSlot(rowNumber+rgRadarPcNumber)" frame lua "rgGetRadarListFrame(rowNumber+rgRadarPcNumber)" ScaleToClip align left top } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and rgRadarShowWeapons == 1" area 40 0 30 30 icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].selected" frame 1 align center center } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and rgRadarShowHitPoints == 1" area 6 3 56 20 text lua "my_radar_sprites[rowNumber+rgRadarPcNumber].hp" text style 'rg_label' text shadow 1 } } enabled "rgRadarShowSingleCre == 0" name "ui_radar_sprites" area 20 20 432 70 rowwidth 72 table "my_radar_sprites" scrollbar 'rgdscrl1' var "SPRITE_ROW" action " SPRITE_ROW = SPRITE_ROW+rgRadarPcNumber center_on_sprite(my_radar_sprites[SPRITE_ROW]) rgSingleCreInfo = 0 " actionAlt " SPRITE_ROW = SPRITE_ROW+rgRadarPcNumber if rgRadarShowMetaInfo == 1 then if rgSpriteRow ~= SPRITE_ROW then my_screen_radar_Inspect_sprite(SPRITE_ROW) else SPRITE_ROW = nil end rgSpriteRow = SPRITE_ROW rgSingleCreInfo = 1 end " } list { column { width 100 label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil" --enabled "#my_radar_sprites[rowNumber+rgRadarPcNumber].effects < 1" area 0 0 70 35 text lua "my_radar_sprites[rowNumber+rgRadarPcNumber].displayed_name_short" --text lua "rgGetRadarPcRightClick(0)" text style 'rg_normal_small' text align center top text shadow 1 } } enabled "rgRadarShowNames == 1 and rgRadarShowSingleCre == 0" name "ui_radar_sprites_name" area 20 90 432 35 rowwidth 72 table "my_radar_sprites" } list { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 1 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[1].icon" } label { area 23 0 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 2 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[2].icon" } label { area 46 0 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 3 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[3].icon" } label { area 1 23 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 4 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[4].icon" } label { area 23 23 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 5 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[5].icon" } label { area 46 23 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 6 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[6].icon" } label { area 1 46 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 7 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[7].icon" } label { area 23 46 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 8 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[8].icon" } label { area 46 46 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 9 and rgHdIcons == 0" icon lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[9].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 1 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[1].icon" scaleToClip frame 1 } label { area 23 0 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 2 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[2].icon" scaleToClip frame 1 } label { area 46 0 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 3 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[3].icon" scaleToClip frame 1 } label { area 1 23 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 4 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[4].icon" scaleToClip frame 1 } label { area 23 23 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 5 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[5].icon" scaleToClip frame 1 } label { area 46 23 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 6 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[6].icon" scaleToClip frame 1 } label { area 1 46 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 7 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[7].icon" scaleToClip frame 1 } label { area 23 46 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 8 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[8].icon" scaleToClip frame 1 } label { area 46 46 22 22 enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 9 and rgHdIcons == 1" bam lua "my_radar_sprites[rowNumber+rgRadarPcNumber].effects[9].icon" scaleToClip frame 1 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 1" area 1 0 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,1)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 2" area 23 0 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,2)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 3" area 46 0 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,3)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 4" area 1 23 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,4)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 5" area 23 23 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,5)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 6" area 46 23 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,6)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 7" area 1 46 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,7)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 8" area 23 46 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,8)" ScaleToClip align left top opacity 120 } label { enabled "my_radar_sprites[rowNumber+rgRadarPcNumber] ~= nil and #my_radar_sprites[rowNumber+rgRadarPcNumber].effects >= 9" area 46 46 22 22 bam rgdciba3 frame lua "rgGetRadarTimeEffect(rowNumber+rgRadarPcNumber,9)" ScaleToClip align left top opacity 120 } } enabled "rgRadarShowSingleCre == 0 and rgRadarShowNpcEffects == 1" name "ui_radar_sprites_states" area 20 125 432 0 rowwidth 72 table "my_radar_sprites" } list -- single creature { column { width 100 label { area 0 0 200 70 bam "rgdsltbg" ScaleToClip align left top } label { area 0 0 200 70 bam "rgdsltbg" ScaleToClip align left top } label { area 0 0 70 70 bam "rgdslot" --text lua "SPRITE_ROW" --text style normal ScaleToClip align left top } label { enabled "my_radar_sprites[SPRITE_ROW] ~= nil" area 4 4 62 62 bitmap lua "my_radar_sprites[SPRITE_ROW].image" text style normal } label { enabled "my_radar_sprites[SPRITE_ROW] ~= nil" area 4 0 62 94 bitmap lua "my_radar_sprites[SPRITE_ROW].portrait" } label { area 0 0 70 2 fill 1 1 1 255 } label { area 0 68 70 2 fill 1 1 1 255 } label { enabled "my_radar_sprites[SPRITE_ROW] ~= nil" area 4 4 62 62 bam rgdhlba1 frame lua "rgGetRadarHealthbarFrame(SPRITE_ROW)" ScaleToClip align left top } label { enabled "my_radar_sprites[SPRITE_ROW] ~= nil" area 0 0 70 70 bam lua "rgGetRadarCreatureSlot(SPRITE_ROW)" frame lua "rgSingleCreInfo" ScaleToClip align left top } label { enabled "my_radar_sprites[SPRITE_ROW] ~= nil and rgRadarShowWeapons == 1" area 40 0 30 30 icon lua "my_radar_sprites[SPRITE_ROW].selected" frame 1 align center center } label { enabled "my_radar_sprites[SPRITE_ROW] ~= nil and rgRadarShowHitPoints == 1" area 6 3 56 20 text lua "my_radar_sprites[SPRITE_ROW].hp" text style 'rg_label' text shadow 1 } label { area 72 0 128 30 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and rgRadarShowNames == 1" text lua "my_radar_sprites[SPRITE_ROW].displayed_name_short" text style 'rg_normal_small' text align left top text shadow 1 } } name "rgRadarSingleCreature" enabled "my_radar_sprites[SPRITE_ROW] ~= nil and rgRadarShowSingleCre == 1 and my_radar_sprites[SPRITE_ROW].m_id == rgRadarSelectedCreId" area 665 20 200 70 rowwidth 200 table "my_radar_sprites" scrollbar 'rgdscrl1' action " --SPRITE_ROW = SPRITE_ROW+rgRadarPcNumber center_on_sprite(my_radar_sprites[SPRITE_ROW]) rgSingleCreInfo = 0 " actionAlt " --SPRITE_ROW = SPRITE_ROW+rgRadarPcNumber if rgRadarShowMetaInfo == 1 then my_screen_radar_Inspect_sprite(SPRITE_ROW) if rgSingleCreInfo == 0 then rgSingleCreInfo = 1 else rgSingleCreInfo = 0 end end " } list { column { width 20 label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-4 and andrgHdIcons == 0" icon lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-4].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-4 and rgHdIcons == 1" bam lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-4].icon" scaleToClip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-4 and rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-4) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-4)" ScaleToClip align left top opacity 120 } } column { width 20 label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-3 and rgHdIcons == 0" icon lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-3 and rgHdIcons == 1" bam lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-3].icon" scaleToClip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-3 and rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-3)" ScaleToClip align left top opacity 120 } } column { width 20 label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-2 and rgHdIcons == 0" icon lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-2 and rgHdIcons == 1" bam lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-2].icon" scaleToClip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-2 and rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-2)" ScaleToClip align left top opacity 120 } } column { width 20 label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-1 and rgHdIcons == 0" icon lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-1 and rgHdIcons == 1" bam lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)-1].icon" scaleToClip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5)-1 and rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)-1)" ScaleToClip align left top opacity 120 } } column { width 20 label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5) and rgHdIcons == 0" icon lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5) and rgHdIcons == 1" bam lua "my_radar_sprites[SPRITE_ROW].effects[(rowNumber*5)].icon" scaleToClip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[SPRITE_ROW] ~= nil and #my_radar_sprites[SPRITE_ROW].effects >= (rowNumber*5) and rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5)) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(SPRITE_ROW,(rowNumber*5))" ScaleToClip align left top opacity 120 } } enabled "my_radar_sprites[SPRITE_ROW] ~= nil and rgRadarShowSingleCre == 1 and my_radar_sprites[SPRITE_ROW].m_id == rgRadarSelectedCreId and rgRadarShowNpcEffects == 1" name "ui_radar_sprites_states_single" area 737 44 125 46 hidehighlight rowheight 23 table "my_radar_sprites" var "single_effects" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 5-cellNumber rgRadarDesc = my_radar_sprites[SPRITE_ROW].effects[(single_effects*5)-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } --all info label { name "ui_screen_radar_all_box" enabled "my_radar_sprite.all_info ~= nil and rgSingleCreInfo == 1 and rgRadarShowMetaInfo == 1" area 20 135 310 360 rectangle 0 } list { column { width 100 label { area 0 0 30 30 icon lua "my_radar_sprite.all_info[rowNumber].icon" count lua "my_radar_sprite.all_info[rowNumber].count" align center center } label { area 10 0 280 25 text lua "my_radar_sprite.all_info[rowNumber].desc" text style 'rg_normal_small' text align left center } label { area 35 0 255 25 text lua "my_radar_sprite.all_info[rowNumber].text" text style 'rg_normal_small' text align left center } } enabled "my_radar_sprite.all_info ~= nil and rgSingleCreInfo == 1 and rgRadarShowMetaInfo == 1" name "ui_screen_radar_all" area 25 140 300 350 rowheight 25 hideHighlight table "my_radar_sprite.all_info" var "SPRITE_ALL_ROW" scrollbar 'rgdscrl1' action " if my_radar_sprite.all_info[SPRITE_ALL_ROW].text ~= nil and my_radar_sprite.all_info[SPRITE_ALL_ROW].text ~= '' then local block = my_radar_sprite.all_info[SPRITE_ALL_ROW] showItemDescription(block, 0) end " } button { enabled "my_radar_sprite.all_info ~= nil and rgSingleCreInfo == 1 and rgRadarShowMetaInfo == 1" area 290 142 20 20 bam rgdxbt1 sequence 0 ScaleToClip toggle rgRadarShowAdvInfo } button { enabled "rgRadarShowMinimizedBar == 1" area 20 0 20 20 bam rgdmrnd2 sequence 5 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_WEAPON')" toggle rgRadarShowWeapons } button { enabled "rgRadarShowMinimizedBar == 1" area 40 0 20 20 bam rgdmrnd2 sequence 4 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_CRE')" toggle rgRadarShowNames } button { enabled "rgRadarShowMinimizedBar == 1" area 60 0 20 20 bam rgdmrnd2 sequence 8 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_HP')" toggle rgRadarShowHitPoints } button { enabled "rgRadarShowMinimizedBar == 1" area 80 0 20 20 bam rgdmrnd2 sequence 6 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_EFF')" toggle rgRadarShowNpcEffects } button { enabled "rgRadarShowMinimizedBar == 1" area 100 0 20 20 bam rgdmrnd2 sequence 9 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_AREA')" toggle rgRadarShowExtendRadius } button { enabled "rgRadarShowMinimizedBar == 1" area 120 0 20 20 bam rgdmrnd2 sequence 7 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_SELECT')" toggle rgRadarShowSingleCre } button { enabled "rgRadarShowMinimizedBar == 1" area 140 0 20 20 bam rgdmrnd2 sequence 2 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_ENEMY')" toggle rgRadarShowCreaturesR } button { enabled "rgRadarShowMinimizedBar == 1" area 160 0 20 20 bam rgdmrnd2 sequence 0 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_ALLY')" toggle rgRadarShowCreaturesG } button { enabled "rgRadarShowMinimizedBar == 1" area 180 0 20 20 bam rgdmrnd2 sequence 1 ScaleToClip tooltip lua "getUiString('RG_NPCBAR_NEUTR')" toggle rgRadarShowCreaturesB } button { enabled "rgRadarShowMinimizedBar == 1" area 200 0 20 20 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action "Infinity_PopMenu('RG_RADAR_SETTINGS'); rgRadarActive = 0; if Infinity_IsMenuOnStack('RADAR') then Infinity_PopMenu('RADAR') end" } } ` function rgRadarSearchSpritesPc() if rgRadarActive == 0 then my_screen_radar_Search_sprites() rgRadarInspectSprite() rgGetRadarEfectsArea() end end ` menu { name 'RG_RADAR_PC' align left top ignoreEsc onOpen " my_screen_radar_Search_sprites() rgRadarGetPcEffLoc() " onClose " rgRadarUpdateHotkeySlotPosition(1) charTable = {} " button { area 0 0 0 0 text lua "rgRadarUpdateHotkeySlotPosition(0)" text style normal } button { area 0 0 0 0 text lua "rgGetRadarPcOrder()" text style normal } button { area 0 0 0 0 text lua "rgRadarSearchSpritesPc()" } list --pc effects1 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber+(2*rgpCoef)) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(1,rowNumber+(2*rgpCoef))" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber+(2*rgpCoef)) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(1,rowNumber+(2*rgpCoef))" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber+(2*rgpCoef))" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(1,rowNumber+(2*rgpCoef))" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(1,(2*rgpCoef))" name "ui_radar_sprites_states_pc_c11" area 1372 10 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_1" action "rgRadarPcEffectsAction(1,pc_effectsc_1+(2*rgpCoef))" } list --pc effects1 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber+rgpCoef) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(1,rowNumber+rgpCoef)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber+rgpCoef) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(1,rowNumber+rgpCoef)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber+rgpCoef)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(1,rowNumber+rgpCoef)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(1,rgpCoef)" name "ui_radar_sprites_states_pc_c12" area 1395 10 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_1" action "rgRadarPcEffectsAction(1,pc_effectsc_1+rgpCoef)" } list --pc effects1 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(1,rowNumber)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(1,rowNumber)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and rgRadarPcEffectsTimer(1,rowNumber)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(1,rowNumber)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(1,0)" name "ui_radar_sprites_states_pc_c13" area 1418 10 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_1" action "rgRadarPcEffectsAction(1,pc_effectsc_1)" } list --pc effects2 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber+(2*rgpCoef)) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(2,rowNumber+(2*rgpCoef))" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber+(2*rgpCoef)) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(2,rowNumber+(2*rgpCoef))" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber+(2*rgpCoef))" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(2,rowNumber+(2*rgpCoef))" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(2,(2*rgpCoef))" name "ui_radar_sprites_states_pc_c21" area 1372 110 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_2" action "rgRadarPcEffectsAction(2,pc_effectsc_2+(2*rgpCoef))" } list --pc effects2 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber+rgpCoef) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(2,rowNumber+rgpCoef)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber+rgpCoef) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(2,rowNumber+rgpCoef)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber+rgpCoef)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(2,rowNumber+rgpCoef)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(2,rgpCoef)" name "ui_radar_sprites_states_pc_c22" area 1395 110 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_2" action "rgRadarPcEffectsAction(2,pc_effectsc_2+rgpCoef)" } list --pc effects2 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(2,rowNumber)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(2,rowNumber)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and rgRadarPcEffectsTimer(2,rowNumber)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(2,rowNumber)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(2,0)" name "ui_radar_sprites_states_pc_c23" area 1418 110 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_2" action "rgRadarPcEffectsAction(2,pc_effectsc_2)" } list --pc effects3 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber+(2*rgpCoef)) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(3,rowNumber+(2*rgpCoef))" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber+(2*rgpCoef)) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(3,rowNumber+(2*rgpCoef))" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber+(2*rgpCoef))" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(3,rowNumber+(2*rgpCoef))" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(3,(2*rgpCoef))" name "ui_radar_sprites_states_pc_c31" area 1372 210 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_3" action "rgRadarPcEffectsAction(3,pc_effectsc_3+(2*rgpCoef))" } list --pc effects3 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber+rgpCoef) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(3,rowNumber+rgpCoef)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber+rgpCoef) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(3,rowNumber+rgpCoef)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber+rgpCoef)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(3,rowNumber+rgpCoef)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(3,rgpCoef)" name "ui_radar_sprites_states_pc_c32" area 1395 210 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_3" action "rgRadarPcEffectsAction(3,pc_effectsc_3+rgpCoef)" } list --pc effects3 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(3,rowNumber)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(3,rowNumber)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and rgRadarPcEffectsTimer(3,rowNumber)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(3,rowNumber)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(3,0)" name "ui_radar_sprites_states_pc_c33" area 1418 210 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_3" action "rgRadarPcEffectsAction(3,pc_effectsc_3)" } list --pc effects4 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber+(2*rgpCoef)) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(4,rowNumber+(2*rgpCoef))" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber+(2*rgpCoef)) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(4,rowNumber+(2*rgpCoef))" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber+(2*rgpCoef))" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(4,rowNumber+(2*rgpCoef))" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(4,(2*rgpCoef))" name "ui_radar_sprites_states_pc_c41" area 1372 310 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_4" action "rgRadarPcEffectsAction(4,pc_effectsc_4+(2*rgpCoef))" } list --pc effects4 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber+rgpCoef) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(4,rowNumber+rgpCoef)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber+rgpCoef) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(4,rowNumber+rgpCoef)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber+rgpCoef)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(4,rowNumber+rgpCoef)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(4,rgpCoef)" name "ui_radar_sprites_states_pc_c42" area 1395 310 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_4" action "rgRadarPcEffectsAction(4,pc_effectsc_4+rgpCoef)" } list --pc effects4 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(4,rowNumber)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(4,rowNumber)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and rgRadarPcEffectsTimer(4,rowNumber)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(4,rowNumber)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(4,0)" name "ui_radar_sprites_states_pc_c43" area 1418 310 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_4" action "rgRadarPcEffectsAction(4,pc_effectsc_4)" } list --pc effects5 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber+(2*rgpCoef)) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(5,rowNumber+(2*rgpCoef))" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber+(2*rgpCoef)) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(5,rowNumber+(2*rgpCoef))" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber+(2*rgpCoef))" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(5,rowNumber+(2*rgpCoef))" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(5,(2*rgpCoef))" name "ui_radar_sprites_states_pc_c51" area 1372 410 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_5" action "rgRadarPcEffectsAction(5,pc_effectsc_5+(2*rgpCoef))" } list --pc effects5 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber+rgpCoef) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(5,rowNumber+rgpCoef)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber+rgpCoef) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(5,rowNumber+rgpCoef)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber+rgpCoef)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(5,rowNumber+rgpCoef)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(5,rgpCoef)" name "ui_radar_sprites_states_pc_c52" area 1395 410 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_5" action "rgRadarPcEffectsAction(5,pc_effectsc_5+rgpCoef)" } list --pc effects5 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(5,rowNumber)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(5,rowNumber)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and rgRadarPcEffectsTimer(5,rowNumber)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(5,rowNumber)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(5,0)" name "ui_radar_sprites_states_pc_c53" area 1418 410 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_5" action "rgRadarPcEffectsAction(5,pc_effectsc_5)" } list --pc effects6 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber+(2*rgpCoef)) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(6,rowNumber+(2*rgpCoef))" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber+(2*rgpCoef)) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(6,rowNumber+(2*rgpCoef))" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber+(2*rgpCoef))" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(6,rowNumber+(2*rgpCoef))" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(6,(2*rgpCoef))" name "ui_radar_sprites_states_pc_c61" area 1372 510 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_6" action "rgRadarPcEffectsAction(6,pc_effectsc_6+(2*rgpCoef))" } list --pc effects6 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber+rgpCoef) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(6,rowNumber+rgpCoef)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber+rgpCoef) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(6,rowNumber+rgpCoef)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber+rgpCoef)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(6,rowNumber+rgpCoef)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(6,rgpCoef)" name "ui_radar_sprites_states_pc_c62" area 1395 510 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_6" action "rgRadarPcEffectsAction(6,pc_effectsc_6+rgpCoef)" } list --pc effects6 { column { width 100 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber) and rgHdIcons == 0" icon lua "rgRadarPcEffectsIcon(6,rowNumber)" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber) and rgHdIcons == 1" bam lua "rgRadarPcEffectsIcon(6,rowNumber)" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and rgRadarPcEffectsTimer(6,rowNumber)" bam rgdciba3 frame lua "rgRadarPcEffectsFrame(6,rowNumber)" ScaleToClip align left top opacity 120 } } enabled "rgRadarPcEffectsEnabled(6,0)" name "ui_radar_sprites_states_pc_c63" area 1418 510 23 92 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effectsc_6" action "rgRadarPcEffectsAction(6,pc_effectsc_6)" } list --pc effects { column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3-2 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(rowNumber,1)*3-2].icon" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3-2 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(rowNumber,1)*3-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3-2 and rgGetRadarTimeEffect(rgRadarPcOrder[1],rgRev(rowNumber,1)*3-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[1],rgRev(rowNumber,1)*3-2)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3-1 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(rowNumber,1)*3-1].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3-1 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(rowNumber,1)*3-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3-1 and rgGetRadarTimeEffect(rgRadarPcOrder[1],rgRev(rowNumber,1)*3-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[1],rgRev(rowNumber,1)*3-1)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(rowNumber,1)*3].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(rowNumber,1)*3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[1]] ~= nil and #my_radar_sprites[rgRadarPcOrder[1]].effects >= rgRev(rowNumber,1)*3 and rgGetRadarTimeEffect(rgRadarPcOrder[1],rgRev(rowNumber,1)*3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[1],rgRev(rowNumber,1)*3)" ScaleToClip align left top opacity 120 } } enabled "RgRadarShowPcEffects == 1 and RgIsModernHud == 1" name "ui_radar_sprites_states_pc_m1" area 4 718 72 23 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effects_1" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 3-cellNumber rgRadarDesc = my_radar_sprites[rgRadarPcOrder[1]].effects[rgRev(pc_effects_1,1)*3-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } list --pc effects2 { column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3-2 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(rowNumber,2)*3-2].icon" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3-2 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(rowNumber,2)*3-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3-2 and rgGetRadarTimeEffect(rgRadarPcOrder[2],rgRev(rowNumber,2)*3-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[2],rgRev(rowNumber,2)*3-2)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3-1 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(rowNumber,2)*3-1].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3-1 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(rowNumber,2)*3-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3-1 and rgGetRadarTimeEffect(rgRadarPcOrder[2],rgRev(rowNumber,2)*3-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[2],rgRev(rowNumber,2)*3-1)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(rowNumber,2)*3].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(rowNumber,2)*3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[2]] ~= nil and #my_radar_sprites[rgRadarPcOrder[2]].effects >= rgRev(rowNumber,2)*3 and rgGetRadarTimeEffect(rgRadarPcOrder[2],rgRev(rowNumber,2)*3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[2],rgRev(rowNumber,2)*3)" ScaleToClip align left top opacity 120 } } enabled "RgRadarShowPcEffects == 1 and Infinity_GetNumCharacters() >= 2 and RgIsModernHud == 1" name "ui_radar_sprites_states_pc_m2" area 86 718 72 23 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effects_2" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 3-cellNumber rgRadarDesc = my_radar_sprites[rgRadarPcOrder[2]].effects[rgRev(pc_effects_2,2)*3-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } list --pc effects3 { column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3-2 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(rowNumber,3)*3-2].icon" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3-2 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(rowNumber,3)*3-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3-2 and rgGetRadarTimeEffect(rgRadarPcOrder[3],rgRev(rowNumber,3)*3-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[3],rgRev(rowNumber,3)*3-2)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3-1 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(rowNumber,3)*3-1].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3-1 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(rowNumber,3)*3-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3-1 and rgGetRadarTimeEffect(rgRadarPcOrder[3],rgRev(rowNumber,3)*3-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[3],rgRev(rowNumber,3)*3-1)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(rowNumber,3)*3].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(rowNumber,3)*3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[3]] ~= nil and #my_radar_sprites[rgRadarPcOrder[3]].effects >= rgRev(rowNumber,3)*3 and rgGetRadarTimeEffect(rgRadarPcOrder[3],rgRev(rowNumber,3)*3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[3],rgRev(rowNumber,3)*3)" ScaleToClip align left top opacity 120 } } enabled "RgRadarShowPcEffects == 1 and Infinity_GetNumCharacters() >= 3 and RgIsModernHud == 1" name "ui_radar_sprites_states_pc_m3" area 168 718 72 0 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effects_3" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 3-cellNumber rgRadarDesc = my_radar_sprites[rgRadarPcOrder[3]].effects[rgRev(pc_effects_3,3)*3-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } list --pc effects4 { column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3-2 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(rowNumber,4)*3-2].icon" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3-2 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(rowNumber,4)*3-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3-2 and rgGetRadarTimeEffect(rgRadarPcOrder[4],rgRev(rowNumber,4)*3-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[4],rgRev(rowNumber,4)*3-2)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3-1 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(rowNumber,4)*3-1].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3-1 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(rowNumber,4)*3-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3-1 and rgGetRadarTimeEffect(rgRadarPcOrder[4],rgRev(rowNumber,4)*3-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[4],rgRev(rowNumber,4)*3-1)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(rowNumber,4)*3].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(rowNumber,4)*3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[4]] ~= nil and #my_radar_sprites[rgRadarPcOrder[4]].effects >= rgRev(rowNumber,4)*3 and rgGetRadarTimeEffect(rgRadarPcOrder[4],rgRev(rowNumber,4)*3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[4],rgRev(rowNumber,4)*3)" ScaleToClip align left top opacity 120 } } enabled "RgRadarShowPcEffects == 1 and Infinity_GetNumCharacters() >= 4 and RgIsModernHud == 1" name "ui_radar_sprites_states_pc_m4" area 250 718 72 23 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effects_4" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 3-cellNumber rgRadarDesc = my_radar_sprites[rgRadarPcOrder[4]].effects[rgRev(pc_effects_4,4)*3-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } list --pc effects5 { column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3-2 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(rowNumber,5)*3-2].icon" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3-2 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(rowNumber,5)*3-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3-2 and rgGetRadarTimeEffect(rgRadarPcOrder[5],rgRev(rowNumber,5)*3-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[5],rgRev(rowNumber,5)*3-2)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3-1 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(rowNumber,5)*3-1].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3-1 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(rowNumber,5)*3-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3-1 and rgGetRadarTimeEffect(rgRadarPcOrder[5],rgRev(rowNumber,5)*3-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[5],rgRev(rowNumber,5)*3-1)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(rowNumber,5)*3].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(rowNumber,5)*3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[5]] ~= nil and #my_radar_sprites[rgRadarPcOrder[5]].effects >= rgRev(rowNumber,5)*3 and rgGetRadarTimeEffect(rgRadarPcOrder[5],rgRev(rowNumber,5)*3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[5],rgRev(rowNumber,5)*3)" ScaleToClip align left top opacity 120 } } enabled "RgRadarShowPcEffects == 1 and Infinity_GetNumCharacters() >= 5 and RgIsModernHud == 1" name "ui_radar_sprites_states_pc_m5" area 332 718 72 0 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effects_5" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 3-cellNumber rgRadarDesc = my_radar_sprites[rgRadarPcOrder[5]].effects[rgRev(pc_effects_5,5)*3-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } list --pc effects6 { column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3-2 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(rowNumber,6)*3-2].icon" scaletoclip frame 1 } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3-2 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(rowNumber,6)*3-2].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3-2 and rgGetRadarTimeEffect(rgRadarPcOrder[6],rgRev(rowNumber,6)*3-2) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[6],rgRev(rowNumber,6)*3-2)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3-1 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(rowNumber,6)*3-1].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3-1 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(rowNumber,6)*3-1].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3-1 and rgGetRadarTimeEffect(rgRadarPcOrder[6],rgRev(rowNumber,6)*3-1) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[6],rgRev(rowNumber,6)*3-1)" ScaleToClip align left top opacity 120 } } column { width 33 label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3 and rgHdIcons == 1" bam lua "my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(rowNumber,6)*3].icon" scaletoclip frame 1} label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3 and rgHdIcons == 0" icon lua "my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(rowNumber,6)*3].icon" } label { area 1 0 22 22 enabled "my_radar_sprites[rgRadarPcOrder[6]] ~= nil and #my_radar_sprites[rgRadarPcOrder[6]].effects >= rgRev(rowNumber,6)*3 and rgGetRadarTimeEffect(rgRadarPcOrder[6],rgRev(rowNumber,6)*3) < -1" bam rgdciba3 frame lua "rgGetRadarTimeEffect(rgRadarPcOrder[6],rgRev(rowNumber,6)*3)" ScaleToClip align left top opacity 120 } } enabled "RgRadarShowPcEffects == 1 and Infinity_GetNumCharacters() >= 6 and RgIsModernHud == 1" name "ui_radar_sprites_states_pc_m6" area 414 737 72 69 hidehighlight rowheight 23 table "my_radar_sprites" var "pc_effects_6" action " Infinity_PopMenu('RG_RADAR_EFFDESC'); local d = 3-cellNumber rgRadarDesc = my_radar_sprites[rgRadarPcOrder[6]].effects[rgRev(pc_effects_6,6)*3-d] if rgRadarDesc ~= nil then Infinity_PushMenu('RG_RADAR_EFFDESC'); end " } } menu { name 'RG_RADAR_EFFDESC' align center center onOpen " " label { area 0 0 622 660 bam RGDIDESC ScaleToClip } label { area 36 30 52 52 icon lua "rgRadarDesc.icon" } label { area 112 26 388 64 text lua "rgRadarDesc.name" text style "rg_trajan" text align left center text color '5' } text { area 32 96 566 536 text lua "rgRadarDesc.description" scrollbar 'rgdscrl1' text style "normal" text color '5' text point 12 } button { on esc area 548 26 50 50 bam rgdwbut sequence 0 ScaleToClip action " Infinity_PopMenu('RG_RADAR_EFFDESC'); " } } menu { name 'RG_RADAR_SETTINGS' align left top onOpen " " --settings label { area 10 90 370 640 rectangle 0 } text { area 60 100 310 40 text style "normal" align left center text "RG_NPCBAR_WEAPON" } text { area 60 140 310 40 text style "normal" align left center text "RG_NPCBAR_CRE" } text { area 60 180 310 40 text style "normal" align left center text "RG_NPCBAR_HP" } text { area 60 220 310 40 text style "normal" align left center text "RG_NPCBAR_HPT" } text { area 60 260 310 40 text style "normal" align left center text "RG_NPCBAR_EFF" } text { area 60 300 310 40 text style "normal" align left center text "RG_NPCBAR_ENEMY" } text { area 60 340 310 40 text style "normal" align left center text "RG_NPCBAR_NEUTR" } text { area 60 380 310 40 text style "normal" align left center text "RG_NPCBAR_ALLY" } text { area 60 420 310 40 text style "normal" align left center text "RG_NPCBAR_SELECT" } text { area 60 460 310 40 text style "normal" align left center text "RG_NPCBAR_INFO" } text { area 60 500 310 40 text style "normal" align left center text "RG_NPCBAR_AREA" } text { area 60 540 310 40 text style "normal" align left center text "RG_NPCBAR_MINI" } text { area 60 580 310 40 text style "normal" align left center text "RG_NPCBAR_ALWAYS" } button { area 20 104 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowWeapons action "Infinity_SetINIValue('Game Options','RgRadarShowWeapons',rgRadarShowWeapons)"} button { area 20 144 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowNames action "Infinity_SetINIValue('Game Options','RgRadarShowNames',rgRadarShowNames)" } button { area 20 184 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowHitPoints action "Infinity_SetINIValue('Game Options','RgRadarShowHitPoints',rgRadarShowHitPoints)" } button { area 20 224 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowTresholds action "Infinity_SetINIValue('Game Options','RgRadarShowTresholds',rgRadarShowTresholds)" } button { area 20 264 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowNpcEffects action "Infinity_SetINIValue('Game Options','RgRadarShowNpcEffects',rgRadarShowNpcEffects)" } button { area 20 304 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowCreaturesR action "Infinity_SetINIValue('Game Options','RgRadarShowCreaturesR',rgRadarShowCreaturesR)" } button { area 20 344 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowCreaturesB action "Infinity_SetINIValue('Game Options','RgRadarShowCreaturesB',rgRadarShowCreaturesB)" } button { area 20 384 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowCreaturesG action "Infinity_SetINIValue('Game Options','RgRadarShowCreaturesG',rgRadarShowCreaturesG)" } button { area 20 424 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowSingleCre action "Infinity_SetINIValue('Game Options','RgRadarShowSingleCre',rgRadarShowSingleCre)" } button { area 20 464 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowMetaInfo action "Infinity_SetINIValue('Game Options','RgRadarShowMetaInfo',rgRadarShowMetaInfo)" } button { area 20 504 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowExtendRadius action "Infinity_SetINIValue('Game Options','RgRadarShowExtendRadius',rgRadarShowExtendRadius)" } button { area 20 544 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowMinimizedBar action "Infinity_SetINIValue('Game Options','RgRadarShowMinimizedBar',rgRadarShowMinimizedBar)" } button { area 20 584 32 32 bam rgdrnbut sequence lua "RgUISkin" scaleToClip toggle rgRadarShowAlwaysOn action "Infinity_SetINIValue('Game Options','RgRadarShowAlwaysOn',rgRadarShowAlwaysOn)" } button { area 348 98 25 25 bam rgdbtcls sequence lua "RgUISkin" ScaleToClip action "Infinity_PopMenu('RG_RADAR_SETTINGS')"} button { area 20 660 350 60 bam 'RGDBUTS1' scaleToClip sequence lua "RgUISkin" text style "button" text lua "rgString('RG_NPCBAR_CLOSE')" action "Infinity_PopMenu('RG_RADAR_SETTINGS'); rgRadarActive = 0; if Infinity_IsMenuOnStack('RADAR') then Infinity_PopMenu('RADAR') end"} } ` B3Spell_Menu_SearchBackground_W = 408 B3Spell_Menu_SearchBackground_Bam = "rgdb3ser" B3Spell_Menu_Options_TEMPLATE_Toggle_Bam = "RGDRNBUT" B3Spell_Menu_Options_TEMPLATE_Toggle_Sequence = RgUISkin B3Spell_Menu_OptimizeSlotSize_Bam = "rgdbuts1" B3Spell_Menu_TEMPLATE_OptionsButton_Bam = "rgdmrnd3" B3Spell_Menu_TEMPLATE_OptionsButton_Sequence = 1 `