From 49db8d1900834e5d2304479d86d8325410e83fa9 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Tue, 4 Aug 2026 21:01:34 +0200 Subject: [PATCH] dont allow people to give you stuff when looting chests --- af/legendary_chestsmm.af | 2 ++ af/legendary_chestsub.af | 8 +++++--- met/legendary_chestsmm.met | 12 ++++++++++-- met/legendary_chestsub.met | 12 ++++++++++-- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/af/legendary_chestsmm.af b/af/legendary_chestsmm.af index 211ac10..1901582 100644 --- a/af/legendary_chestsmm.af +++ b/af/legendary_chestsmm.af @@ -44,6 +44,7 @@ STATE: {Default} ~~ { DoExpr {setvar[ChestType,Legendary Chest]} Chat {/vt opt set enablenav true} Chat {/vt opt set enablelooting true} + Chat {/ub playeroption AllowGive true} IF: All MainSlotsLE 4 DO: SetState {go_to_chests} @@ -52,6 +53,7 @@ STATE: {go_to_chests} ~~ { IF: Always DO: DoAll Chat {/vt nav load legendary_chests} + Chat {/ub playeroption AllowGive false} SetWatchdog 10 300 {recall} IF: NavEmpty DO: SetState {LootChest} diff --git a/af/legendary_chestsub.af b/af/legendary_chestsub.af index 4c7d05b..192474d 100644 --- a/af/legendary_chestsub.af +++ b/af/legendary_chestsub.af @@ -48,18 +48,20 @@ STATE: {Check} ~~ { STATE: {Default} ~~ { IF: Always DO: DoAll - Chat {/vt nav load None} + Chat {/vt nav load None} DoExpr {setvar[ChestType,Legendary Chest]} Chat {/vt opt set enablenav true} Chat {/vt opt set enablelooting true} + Chat {/ub playeroption AllowGive true} IF: All MainSlotsLE 4 DO: SetState {go_to_chests} ~~ } STATE: {go_to_chests} ~~ { IF: Always - DO: DoAll + DO: DoAll Chat {/vt nav load legendary_chests} + Chat {/ub playeroption AllowGive false} SetWatchdog 10 300 {recall} IF: NavEmpty DO: SetState {Check} @@ -76,7 +78,7 @@ STATE: {LootChest} ~~ { ~~ } STATE: {recall} ~~ { IF: Always - DO: DoAll + DO: DoAll Chat {/vt nav load legendary_chests_ah} SetWatchdog 10 300 {recall} IF: NavEmpty diff --git a/met/legendary_chestsmm.met b/met/legendary_chestsmm.met index 42b5aaa..1194b1c 100644 --- a/met/legendary_chestsmm.met +++ b/met/legendary_chestsmm.met @@ -24,7 +24,7 @@ K V n n -4 +5 i 2 s @@ -50,6 +50,10 @@ i 2 s /vt opt set enablelooting true +i +2 +s +/ub playeroption AllowGive true s Default i @@ -83,12 +87,16 @@ K V n n -2 +3 i 2 s /vt nav load legendary_chests i +2 +s +/ub playeroption AllowGive false +i 9 TABLE 2 diff --git a/met/legendary_chestsub.met b/met/legendary_chestsub.met index 79d55ad..00b7d45 100644 --- a/met/legendary_chestsub.met +++ b/met/legendary_chestsub.met @@ -88,7 +88,7 @@ K V n n -4 +5 i 2 s @@ -114,6 +114,10 @@ i 2 s /vt opt set enablelooting true +i +2 +s +/ub playeroption AllowGive true s Default i @@ -147,12 +151,16 @@ K V n n -2 +3 i 2 s /vt nav load legendary_chests i +2 +s +/ub playeroption AllowGive false +i 9 TABLE 2