From 204d9f6d883b3a9cf7b53321a8e0fb077e09085b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 31 Mar 2022 14:35:34 +0200
Subject: [PATCH] version bump (#1312)
- fix podwojny spec barba
- wspinanie sie na otwarte bramy prawidlowo cofnie pozycje
- /postepy2+ [id] [ile] dodane
- leczenie magikow + tasak dodane jako prefix
---
Arkadia.xml | 30 ++++++++++++++++++++++++++---
skrypty.lua | 2 +-
skrypty/help.lua | 1 +
skrypty/inventory/magic-weapons.lua | 20 +++++++++++++------
skrypty/misc/improve/improve2.lua | 24 ++++++++++++++++-------
skrypty/misc/postepy.lua | 6 +++++-
skrypty/ui/gags/gags.lua | 4 ++++
7 files changed, 69 insertions(+), 18 deletions(-)
diff --git a/Arkadia.xml b/Arkadia.xml
index 0fb7400b..ca5f9f2d 100644
--- a/Arkadia.xml
+++ b/Arkadia.xml
@@ -5591,8 +5591,12 @@ trigger_func_skrypty_inventory_equipment_zagladanie_depozyt()
#000000
#000000
-
-
+
+ return scripts.gags:is_type("combat.avatar")
+
+
+ 4
+
str
@@ -25466,6 +25470,26 @@ trigger_func_skrypty_ui_misc_ptakopodobny_inkantuje()
+
+ blocker_exprimental
+
+ 0
+ 0
+ 0
+
+
+ #ff0000
+ #ffff00
+
+ #000000
+ #000000
+
+ Przeciez brama jest otwarta!
+
+
+ 2
+
+
jedziesz-wozem
@@ -26801,7 +26825,7 @@ trigger_func_skrypty_ui_misc_ptakopodobny_inkantuje()
- ^/postepy2\+ ([0-9]+)$
+ ^/postepy2\+ ([0-9]+)(?: ([\d+]))?$
postepy2-
diff --git a/skrypty.lua b/skrypty.lua
index 30151f6a..8053f9ad 100644
--- a/skrypty.lua
+++ b/skrypty.lua
@@ -1,4 +1,4 @@
-scripts = scripts or { ver = "4.61" }
+scripts = scripts or { ver = "4.62" }
scripts.event_handlers = scripts.event_handlers or {}
function alias_func_skrypty_help()
diff --git a/skrypty/help.lua b/skrypty/help.lua
index c5f420ff..03bfd1f8 100644
--- a/skrypty/help.lua
+++ b/skrypty/help.lua
@@ -44,6 +44,7 @@ function scripts:print_help()
cecho("| /postepy2+ - dodaje jeden postep do globalnego licznika. |\n")
cecho("| /postepy2+ [ile] - dodaje [ile] postepow do globalnego licznika. |\n")
cecho("| np /postepy2+ 4 doda 4 postepy. Musi to byc liczba mniejsza badz rowna 15! |\n")
+ cecho("| /postepy2+ [id] [ile] - dodaje [ile] postepow z globalnego licznika o [id]. |\n")
cecho("| /postepy2- [id] - usuwa wpis z globalnego licznika o tym [id]. id mozna |\n")
cecho("| znalezc jako pierwsza kolumna od lewej w /postepy2. |\n")
cecho("| /postepy2- [id] [ile] - odejmuje [ile] postepow z globalnego licznika o [id]. |\n")
diff --git a/skrypty/inventory/magic-weapons.lua b/skrypty/inventory/magic-weapons.lua
index 17811f6b..1d8dc12c 100644
--- a/skrypty/inventory/magic-weapons.lua
+++ b/skrypty/inventory/magic-weapons.lua
@@ -1,21 +1,29 @@
+local function magic_prefix(text)
+ text = string.format("[ %s ] ", text)
+ prefix(text)
+ if selectString(text, 1) > -1 then
+ fg("orange")
+ end
+ resetFormat()
+end
+
function trigger_func_skrypty_inventory_magic_weapons_widelec_leczy()
- cecho("\n Widelec leczy\n")
+ magic_prefix("HP+")
end
function trigger_func_skrypty_inventory_magic_weapons_amu_leczy()
- cecho("\n Amulet leczy\n")
+ magic_prefix("HP+")
end
function trigger_func_skrypty_inventory_magic_weapons_tasak_dziala()
- resetFormat()
- cecho("\n Tasak dziala\n")
+ magic_prefix("Tasak")
end
function trigger_func_skrypty_inventory_magic_weapons_gadacz_leczy()
- cecho("\n Gadacz leczy\n")
+ magic_prefix("HP+")
end
function trigger_func_skrypty_inventory_magic_weapons_plaszcz_leczy()
- cecho("\n Plaszcz leczy\n")
+ magic_prefix("HP+")
end
diff --git a/skrypty/misc/improve/improve2.lua b/skrypty/misc/improve/improve2.lua
index 3d6e61ee..77a8a770 100644
--- a/skrypty/misc/improve/improve2.lua
+++ b/skrypty/misc/improve/improve2.lua
@@ -1,22 +1,32 @@
-function misc.improve:add_improvee2(val)
+function misc.improve:add_improvee2(val, id)
if not scripts.character_name then
scripts:print_log("Korzystanie z globalnej bazy postepow po ustawieniu 'scripts.character_name' w configu")
return
end
+ local entry
+
local hour = getTime(true, "hh:mm:ss")
local year = getTime(true, "yyyy")
local month = getTime(true, "MM")
local day = getTime(true, "dd")
- local entry = db:fetch(misc.improve.db_improvee.improvee, {
- db:eq(misc.improve.db_improvee.improvee.year, year),
- db:eq(misc.improve.db_improvee.improvee.month, month),
- db:eq(misc.improve.db_improvee.improvee.day, day),
- db:eq(misc.improve.db_improvee.improvee.character, scripts.character_name)
- })
+ display(id)
+
+ if not id then
+ entry = db:fetch(misc.improve.db_improvee.improvee, {
+ db:eq(misc.improve.db_improvee.improvee.year, year),
+ db:eq(misc.improve.db_improvee.improvee.month, month),
+ db:eq(misc.improve.db_improvee.improvee.day, day),
+ db:eq(misc.improve.db_improvee.improvee.character, scripts.character_name)
+ })
+ else
+ local sql_query = "SELECT * FROM improvee WHERE character=\"" .. scripts.character_name ..
+ "\" AND _row_id=\"" .. id .. "\" ORDER BY _row_id ASC"
+ entry = db:fetch_sql(misc.improve.db_improvee.improvee, sql_query)
+ end
local ret = true
diff --git a/skrypty/misc/postepy.lua b/skrypty/misc/postepy.lua
index 42fc8173..6176bc8d 100644
--- a/skrypty/misc/postepy.lua
+++ b/skrypty/misc/postepy.lua
@@ -23,7 +23,11 @@ function alias_func_skrypty_misc_postepy_postepy2_plus()
end
function alias_func_skrypty_misc_postepy_postepy2__val()
- misc.improve:add_improvee2(tonumber(matches[2]))
+ if matches[3] then
+ misc.improve:add_improvee2(tonumber(matches[3]), tonumber(matches[2]))
+ else
+ misc.improve:add_improvee2(tonumber(matches[2]))
+ end
end
function alias_func_skrypty_misc_postepy_postepy2_minus()
diff --git a/skrypty/ui/gags/gags.lua b/skrypty/ui/gags/gags.lua
index 1a2d174b..ba15a45d 100644
--- a/skrypty/ui/gags/gags.lua
+++ b/skrypty/ui/gags/gags.lua
@@ -13,6 +13,10 @@ function scripts.gags:is_combat()
return gmcp and gmcp.gmcp_msgs and table.index_of(combat_types, gmcp.gmcp_msgs.type)
end
+function scripts.gags:is_type(type)
+ return gmcp and gmcp.gmcp_msgs and gmcp.gmcp_msgs.type == type
+end
+
function scripts.gags:gag(power, total_power, kind)
self:gag_prefix(string.format("%d/%d", power, total_power), kind)
end