From 810f3778c44c2f2e4ae9b998228767a48b576c63 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 9 Feb 2019 18:55:24 -0200 Subject: BoxOfChocolates - Prevent dropping or trading to fix possible exploit and prevent player from being unable to participate on event note: #item still works --- npc/001-11/Demure.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'npc/001-11') diff --git a/npc/001-11/Demure.txt b/npc/001-11/Demure.txt index 0378a5bce..37aafbf64 100644 --- a/npc/001-11/Demure.txt +++ b/npc/001-11/Demure.txt @@ -59,11 +59,11 @@ .@ref$=""; // Send the Chocolate - .@m = htget($@VALENTINE_GIFTSTACKS, .@ref); + .@m = htget($@VALENTINE_GIFTSTACKS, str(.@ref)); if (!.@m) - htput $@VALENTINE_GIFTSTACKS, .@ref, @Val_Ammo; + htput $@VALENTINE_GIFTSTACKS, str(.@ref), @Val_Ammo; else - htput $@VALENTINE_GIFTSTACKS, .@ref, .@m+@Val_Ammo; + htput $@VALENTINE_GIFTSTACKS, str(.@ref), .@m+@Val_Ammo; // Get 1 Point per sent box #VALENTINE_POINTS+=1; @@ -80,9 +80,9 @@ // Register your name on love letter .@s$ = htget($@VALENTINE_LOVELETTER, .@ref); if (.@s$ == "") - htput $@VALENTINE_LOVELETTER, .@ref, strip(strcharinfo(0)); + htput $@VALENTINE_LOVELETTER, str(.@ref), strip(strcharinfo(0)); else - htput $@VALENTINE_LOVELETTER, .@ref, .@s$+", "+strip(strcharinfo(0)); + htput $@VALENTINE_LOVELETTER, str(.@ref), .@s$+", "+strip(strcharinfo(0)); // Get the bonus // Old rule: 1 point for 2 boxes, capped at 25 and minimum 1 extra point @@ -107,16 +107,16 @@ return; } function GetGift { - .@m = htget($@VALENTINE_GIFTSTACKS, getcharid(3)); + .@m = htget($@VALENTINE_GIFTSTACKS, str(getcharid(3))); if (.@m > 0) { mesq l("Hey, look, you have @@ boxes to collect!", .@m); - .@n$ = htget($@VALENTINE_LOVELETTER, getcharid(3), l("Secret Admirer")); + .@n$ = htget($@VALENTINE_LOVELETTER, str(getcharid(3)), l("Secret Admirer")); mesq l("They were given with @@ by @@.", any(l("love"), l("passion"), l("affection")), .@n$); inventoryplace BoxOfChocolates, .@m; getitem BoxOfChocolates, .@m; - htput $@VALENTINE_GIFTSTACKS, getcharid(3), 0; - htput $@VALENTINE_LOVELETTER, getcharid(3), ""; + htput $@VALENTINE_GIFTSTACKS, str(getcharid(3)), 0; + htput $@VALENTINE_LOVELETTER, str(getcharid(3)), ""; } else { mesq l("Sorry, you don't have any chocolate to pick up."); -- cgit v1.2.3-60-g2f50