diff --git a/ConnectAnnounce/scripting/ConnectAnnounce.sp b/ConnectAnnounce/scripting/ConnectAnnounce.sp index 851cc4bf..4dd72f65 100644 --- a/ConnectAnnounce/scripting/ConnectAnnounce.sp +++ b/ConnectAnnounce/scripting/ConnectAnnounce.sp @@ -25,7 +25,7 @@ public void OnClientPostAdminCheck(int client) GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth)); if(GetClientIP(client, sIP, sizeof(sIP)) && GeoipCountry(sIP, sCountry, sizeof(sCountry))) - PrintToChatAll("\x04%L [\x03%s\x04] connected from %s", client, sAuth, sCountry); + PrintToChatAll("\x04%N [\x03%s\x04] connected from %s", client, sAuth, sCountry); else - PrintToChatAll("\x04%L [\x03%s\x04] connected", client, sAuth); + PrintToChatAll("\x04%N [\x03%s\x04] connected", client, sAuth); } diff --git a/SaveLevel/configs/savelevel/ze_FFVII_Mako_Reactor_v6.cfg b/SaveLevel/configs/savelevel/ze_FFVII_Mako_Reactor_v6.cfg index 34935469..ef40a5e5 100644 --- a/SaveLevel/configs/savelevel/ze_FFVII_Mako_Reactor_v6.cfg +++ b/SaveLevel/configs/savelevel/ze_FFVII_Mako_Reactor_v6.cfg @@ -5,10 +5,9 @@ "name" "Level 1" "match" { - "outputs" + "math" { "m_OnUser1" "leveling_counter,Add,1" - "ExactMatches" "1" } } "restore" @@ -22,16 +21,14 @@ "name" "Level 2" "match" { - "outputs" + "math" { - "m_OnUser1" "leveling_counter,Add,1" - "ExactMatches" "2" + "m_OnUser1" "leveling_counter,Add,2" } } "restore" { - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" + "AddOutput" "OnUser1 leveling_counter,Add,2,0,-1" "m_iFrags" "200" } } @@ -40,17 +37,14 @@ "name" "Level 3" "match" { - "outputs" + "math" { - "m_OnUser1" "leveling_counter,Add,1" - "ExactMatches" "3" + "m_OnUser1" "leveling_counter,Add,3" } } "restore" { - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" + "AddOutput" "OnUser1 leveling_counter,Add,3,0,-1" "m_iFrags" "300" } } @@ -59,18 +53,14 @@ "name" "Level 4" "match" { - "outputs" + "math" { - "m_OnUser1" "leveling_counter,Add,1" - "MinMatches" "4" + "m_OnUser1" "leveling_counter,Add,4" } } "restore" { - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" - "AddOutput" "OnUser1 leveling_counter,Add,1,0,-1" + "AddOutput" "OnUser1 leveling_counter,Add,4,0,-1" "m_iFrags" "400" } } diff --git a/SaveLevel/configs/savelevel/ze_FFXII_Feywood_b3_1.cfg b/SaveLevel/configs/savelevel/ze_FFXII_Feywood_b3_1.cfg index 0ba0fbed..2daa9486 100644 --- a/SaveLevel/configs/savelevel/ze_FFXII_Feywood_b3_1.cfg +++ b/SaveLevel/configs/savelevel/ze_FFXII_Feywood_b3_1.cfg @@ -5,10 +5,9 @@ "name" "Level 1" "match" { - "outputs" + "math" { "m_OnUser4" "Map_Level_Check,Add,1" - "ExactMatches" "1" } } "restore" @@ -22,16 +21,14 @@ "name" "Level 2" "match" { - "outputs" + "math" { - "m_OnUser4" "Map_Level_Check,Add,1" - "ExactMatches" "2" + "m_OnUser4" "Map_Level_Check,Add,2" } } "restore" { - "AddOutput" "OnUser4 Map_Level_Check,Add,1,0,-1" - "AddOutput" "OnUser4 Map_Level_Check,Add,1,0,-1" + "AddOutput" "OnUser4 Map_Level_Check,Add,2,0,-1" "m_iFrags" "200" } } @@ -40,17 +37,14 @@ "name" "Level 3" "match" { - "outputs" + "math" { - "m_OnUser4" "Map_Level_Check,Add,1" - "MinMatches" "3" + "m_OnUser4" "Map_Level_Check,Add,3" } } "restore" { - "AddOutput" "OnUser4 Map_Level_Check,Add,1,0,-1" - "AddOutput" "OnUser4 Map_Level_Check,Add,1,0,-1" - "AddOutput" "OnUser4 Map_Level_Check,Add,1,0,-1" + "AddOutput" "OnUser4 Map_Level_Check,Add,3,0,-1" "m_iFrags" "300" } } diff --git a/SaveLevel/configs/savelevel/ze_FFXII_Paramina_Rift_v1_3.cfg b/SaveLevel/configs/savelevel/ze_FFXII_Paramina_Rift_v1_3.cfg index c69054ce..bf759c4e 100644 --- a/SaveLevel/configs/savelevel/ze_FFXII_Paramina_Rift_v1_3.cfg +++ b/SaveLevel/configs/savelevel/ze_FFXII_Paramina_Rift_v1_3.cfg @@ -5,10 +5,9 @@ "name" "Level 1" "match" { - "outputs" + "math" { "m_OnUser2" "leveling_counter,add,1" - "ExactMatches" "1" } } "restore" @@ -22,16 +21,14 @@ "name" "Level 2" "match" { - "outputs" + "math" { - "m_OnUser2" "leveling_counter,add,1" - "ExactMatches" "2" + "m_OnUser2" "leveling_counter,add,2" } } "restore" { - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" + "AddOutput" "OnUser2 leveling_counter,add,2,0,-1" "m_iFrags" "200" } } @@ -40,17 +37,14 @@ "name" "Level 3" "match" { - "outputs" + "math" { - "m_OnUser2" "leveling_counter,add,1" - "ExactMatches" "3" + "m_OnUser2" "leveling_counter,add,3" } } "restore" { - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" + "AddOutput" "OnUser2 leveling_counter,add,3,0,-1" "m_iFrags" "300" } } @@ -59,18 +53,14 @@ "name" "Level 4" "match" { - "outputs" + "math" { - "m_OnUser2" "leveling_counter,add,1" - "ExactMatches" "4" + "m_OnUser2" "leveling_counter,add,4" } } "restore" { - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" + "AddOutput" "OnUser2 leveling_counter,add,4,0,-1" "m_iFrags" "400" } } @@ -79,19 +69,14 @@ "name" "Level 5" "match" { - "outputs" + "math" { - "m_OnUser2" "leveling_counter,add,1" - "MinMatches" "5" + "m_OnUser2" "leveling_counter,add,5" } } "restore" { - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" - "AddOutput" "OnUser2 leveling_counter,add,1,0,-1" + "AddOutput" "OnUser2 leveling_counter,add,5,0,-1" "m_iFrags" "500" } } diff --git a/SaveLevel/configs/savelevel/ze_harry_potter_v1_3.cfg b/SaveLevel/configs/savelevel/ze_harry_potter_v1_3.cfg index ce583713..632a7a54 100644 --- a/SaveLevel/configs/savelevel/ze_harry_potter_v1_3.cfg +++ b/SaveLevel/configs/savelevel/ze_harry_potter_v1_3.cfg @@ -5,10 +5,9 @@ "name" "Level 1" "match" { - "outputs" + "math" { "m_OnUser3" "map_wandlevels,Add,1" - "ExactMatches" "1" } } "restore" @@ -22,16 +21,14 @@ "name" "Level 2" "match" { - "outputs" + "math" { - "m_OnUser3" "map_wandlevels,Add,1" - "ExactMatches" "2" + "m_OnUser3" "map_wandlevels,Add,2" } } "restore" { - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" + "AddOutput" "OnUser3 map_wandlevels,Add,2,0,-1" "m_iFrags" "200" } } @@ -40,17 +37,14 @@ "name" "Level 3" "match" { - "outputs" + "math" { - "m_OnUser3" "map_wandlevels,Add,1" - "ExactMatches" "3" + "m_OnUser3" "map_wandlevels,Add,3" } } "restore" { - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" + "AddOutput" "OnUser3 map_wandlevels,Add,3,0,-1" "m_iFrags" "300" } } @@ -59,18 +53,14 @@ "name" "Level 4" "match" { - "outputs" + "math" { - "m_OnUser3" "map_wandlevels,Add,1" - "MinMatches" "4" + "m_OnUser3" "map_wandlevels,Add,4" } } "restore" { - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" - "AddOutput" "OnUser3 map_wandlevels,Add,1,0,-1" + "AddOutput" "OnUser3 map_wandlevels,Add,4,0,-1" "m_iFrags" "400" } } diff --git a/SaveLevel/scripting/SaveLevel.sp b/SaveLevel/scripting/SaveLevel.sp index 4cbf464f..0661a165 100644 --- a/SaveLevel/scripting/SaveLevel.sp +++ b/SaveLevel/scripting/SaveLevel.sp @@ -256,6 +256,48 @@ public void OnClientDisconnect(int client) } g_Config.GoBack(); + Matches += CalcMatches(_Matches, _ExactMatches, _MinMatches, _MaxMatches); + } + else if(StrEqual(sSection, "math")) + { + int _Matches = 0; + int _ExactMatches = g_Config.GetNum("ExactMatches", -1); + int _MinMatches = g_Config.GetNum("MinMatches", -1); + int _MaxMatches = g_Config.GetNum("MaxMatches", -1); + + if(g_Config.GotoFirstSubKey(false)) + { + do + { + g_Config.GetSectionName(sKey, sizeof(sKey)); + g_Config.GetString(NULL_STRING, sValue, sizeof(sValue)); + + int Count = GetOutputCount(client, sKey); + for(int i = 0; i < Count; i++) + { + int Target; + int Input; + int Parameter; + + int Len = GetOutputTarget(client, sKey, i, sOutput); + + Input = Len; + Len += GetOutputTargetInput(client, sKey, i, sOutput[Len]); + + Parameter = Len; + Len += GetOutputParameter(client, sKey, i, sOutput[Len]); + + PrintToChatAll("Target: %d -> \"%s\"", sOutput[Target]); + PrintToChatAll("Input: %d -> \"%s\"", sOutput[Input]); + PrintToChatAll("Parameter: %d -> \"%s\"", sOutput[Parameter]); + } + } + while(g_Config.GotoNextKey(false)); + + g_Config.GoBack(); + } + g_Config.GoBack(); + Matches += CalcMatches(_Matches, _ExactMatches, _MinMatches, _MaxMatches); } }