[EVENT] antiTrash - antiTheft system for houses [TFS 1.x]

Discussion in 'GlobalEvents, Spells & CreatureEvents' started by Printer, Oct 6, 2015.

  1. primate

    primate •Ci Śmierdzieć•

    Joined:
    Apr 14, 2009
    Messages:
    37
    Likes Received:
    4
    Best Answers:
    0
    It is possible to avoid the use of trade?
     
  2. HeberPcL

    HeberPcL [PowerOT.com.br]

    Joined:
    Aug 21, 2007
    Messages:
    1,275
    Likes Received:
    38
    Best Answers:
    0
    What?
     
  3. primate

    primate •Ci Śmierdzieć•

    Joined:
    Apr 14, 2009
    Messages:
    37
    Likes Received:
    4
    Best Answers:
    0
    By means of the trade they can steal the articles of the house!
     
  4. Red

    Red Cyntara Admin Staff Member Global Moderator Premium User

    Joined:
    Aug 9, 2008
    Messages:
    4,320
    Likes Received:
    649
    Best Answers:
    1
    You're right, the original code only works if there's one character invited / subowner.
    The code snippet you provided works better, but would also allow my character "Red" to move an item if their invite list had a character named "Predator"

    Red
     
    imkingran likes this.
  5. Zothion

    Zothion Well-Known Member

    Joined:
    Apr 28, 2014
    Messages:
    1,085
    Likes Received:
    377
    Best Answers:
    0
    Code (Text):
    1. if (house ~= self:getHouse() and not string.find(house:getAccessList(SUBOWNER_LIST):lower(), "%f[%a]" .. self:getName():lower() .. "%f[%A]") then
    if you want to match exact name, should work
     
    imkingran likes this.
  6. imkingran

    imkingran Learning everyday. Premium User

    Joined:
    Jan 15, 2014
    Messages:
    1,194
    Likes Received:
    358
    Best Answers:
    5
    @Red @Zothion
    Thanks guys for pointing that out, completely overlooked that! Something I'll keep in mind next time I use string.find().

    Now that you guys reminded me about this system (I no longer use it) there was one other thing that players were doing but I forgot to post here:
    If you place a backpack/bag down on top of a tile --> open it --> then in the inventory area press the "up arrow" you can bypass the onBrowseField check and take the items from the browse field window.

    Maybe you guys have a solution for that one?

    Edit:
    Maybe an onUse check when trying to open the container following the same criteria as other checks could do it.
     

Share This Page

Loading...