From 886faa35b07728b3f3009197a7143daa3d624840 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 9 Feb 2019 19:05:29 -0200 Subject: Introduce @maximus so players cannot trade received boxes, but can still keep trading monster boxes --- npc/001-11/Demure.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'npc') diff --git a/npc/001-11/Demure.txt b/npc/001-11/Demure.txt index 276029d6d..c90ae0a10 100644 --- a/npc/001-11/Demure.txt +++ b/npc/001-11/Demure.txt @@ -30,11 +30,11 @@ // (account id, list of names) function SendGift { mesn; - mesq l("How many chocolate do you want to send? You currenly have: @@", countitem(BoxOfChocolates)); + mesq l("How many chocolate do you want to send? You can trade: @@", @maximus); input @Val_Ammo; mes ""; - if (@Val_Ammo > countitem(BoxOfChocolates) || @Val_Ammo < 1) { + if (@Val_Ammo > @maximus || @Val_Ammo < 1) { mesc l("You don't have that many!"); return; } @@ -142,18 +142,19 @@ L_Main: next; do { mesc l("You currently have @@ points, @@ boxes of chocolate and @@ love letters.", #VALENTINE_POINTS, countitem(BoxOfChocolates), countitem(LoveLetter)); + @maximus=countitem(BoxOfChocolates); if (#VALENTINE_RECEIVED-#VALENTINE_OPENED > 0) { - mesc l("@@ boxes of chocolate were given to you as a gift.", #VALENTINE_OPENED-#VALENTINE_RECEIVED); + mesc l("@@ boxes of chocolate were given to you as a gift.", #VALENTINE_RECEIVED-#VALENTINE_OPENED), 1; // Demure can just send Soren's Chocolate to somebody else. // Everyone else cannot send their gift chocolates. Please don't lose the boxes. if (!is_gm()) - .@eatfirst=true; + @maximus-=#VALENTINE_RECEIVED-#VALENTINE_OPENED; } mes ""; select l("Information"), l("Scoreboards"), - rif(!.@eatfirst, l("Send Chocolate")), + rif(@maximus >= 0, l("Send Chocolate")), l("Receive Chocolate"), l("Okay, bye"); mes ""; -- cgit v1.2.3-60-g2f50