question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancment Request: worn/inventory

See original GitHub issue

hello i see you have player:NAME(REGEX), npc:NAME(REGEX), entityname:NAME(REGEX), helditem:MATERIALNAME(REGEX), group:GROUPNAME(EXACT), event:pvp/pvnpc/pve what about the items on players like armor/hats ? and inventory items?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mcmonkey4evacommented, Aug 25, 2016

Try this:

NPC:
    type: assignment
    debug: false
    actions:
        on assignment:
        - chat "Duty calls"
        - trigger name:proximity state:true radius:15
        - trigger name:click state:true
        on enter proximity:
        - if <player.inventory.contains[302|303|304|305|357|442|81|373|289|338|46|407|261|385|259|353]> {
          - execute as_server "npc sel <npc.id>" silent
          - execute as_server "sentinel addtarget player:<player.name>" silent
          }
          else {
          - execute as_server "npc sel <npc.id>" silent
          - execute as_server "sentinel removetarget player:<player.name>" silent
          }
        on click:
        - chat "<red>Get back in line inmate"

In particular, the else block. Optionally throw in a sentinel forgive inside the else block as well to make sure all combat ceases. If you want them to be able to stop the moment the player gives up their illegal items, change on enter proximity: to on move proximity:

1reaction
mcmonkey4evacommented, Aug 24, 2016

You should probably supplement your Sentinel NPCs with a Denizen script then. http://wiki.citizensnpcs.co/Denizen

Something like this:

mynpc:
    type: assignment
    debug: false
    actions:
        on assignment:
        - trigger name:proximity state:true radius:10
        on enter proximity:
        - if <player.equipment.contains_text[chain]> {
          - execute as_server "npc sel <npc.id>" silent
          - execute as_server "sentinel addtarget player:<player.name>" silent
          }
Read more comments on GitHub >

github_iconTop Results From Across the Web

New R12.2.x Feature / Enhancement Request Implemented
Information in this document applies to any platform. Goal. How does one transfer material back to consigned after using the stock on a...
Read more >
Change / Enhancement Request - Texas A&M System IT
Request a change, improvement or new functionality for items such as FAMIS screens ... This form must be used for all FAMIS change...
Read more >
Enhancement - Office Hours
Enhancement Status: We have had requests for a “Redo” function to be ... it possible to multi-select inventory items so they can be...
Read more >
Enhancement Request: Equipment & Fashion Macros :: SoulWorker ...
... define hotkey to switch to that gear and/or fashion set instantly putting the currently worn stuff back into the inventory That would...
Read more >
Inventory management UCRM feature request
Inventory management UCRM feature request ... This requests could be helpful ... Condition (New would be new, used may be a returned customer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found