Jump to content

Recommended Posts

Hello, I need help with the action with the Krampus sack. The idea is to click the item on the bag, but it puts it in the bag and that's it. Maybe you can somehow set the priority
Here is the code I use:

AddAction("DISMANTLE_TRINKET", "Разобрать", function(act)
    if act.invobject then
    act.invobject.components.disassembly_trinket:dismantle(act.target, act.doer)
    return true
    end
    return false
end)

AddComponentAction("USEITEM", "disassembly_trinket", function(inst, doer, target, actions, right)
    if doer:HasTag("technician") then
      if target:HasTag("disassemblytrinket") then
        table.insert(actions, GLOBAL.ACTIONS.DISMANTLE_TRINKET)
        end
    end
end)

AddStategraphActionHandler("wilson", ActionHandler(ACTIONS.DISMANTLE_TRINKET, "dolongaction"))
AddStategraphActionHandler("wilson_client", ActionHandler(ACTIONS.DISMANTLE_TRINKET, "dolongaction"))

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...