Suggestion ActorListener/GroundItemListener

Discussion in 'Client & Site Suggestions' started by Algo_, May 31, 2016.

  1. Examples of methods(probably should rename them):

    onSpawned - when a new actor(npc/player) was found
    onMoved - actor moved to another position
    onDisappeared - when an npc is either killed or, for players, teleported away

    onDiscovered - when a new GroundItem is dropped or just appeared
    onDisappeared - when an item is taken by either you or someone else or just disappeared

    The only other option in the meanwhile is to use a seperate thread that watches actors/grounditems but this seems somehow.. well not good
    #1 Algo_, May 31, 2016
    Last edited: May 31, 2016
    noobtagonist likes this.
  2. What purpose would this serve given the functionality that is currently available?
  3. Well this could make bots more dynamic in a way that they can interact with certain events simultaneously.
  4. Such as....? :p
  5. Let's say you want something to happen when another player comes close; or when a certain npc spawns enable a specific protection prayer; etc.
  6. if(!Npcs.newQuery().within(new Area.Circular(Players.getLocal().getPosition(), 8)).names("Monster name").results().isEmpty()){
    --- Double Post Merged, May 31, 2016, Original Post Date: May 31, 2016 ---
    Same thing for players.
  7. I know that; but without my suggestion you would need to make a thread that runs this query let's say every 100ms, which seems resource intensive (I don't know the computational complexity of that chained query but it seems at least quad/cubic)

    Working with triggers just feels more naturally than working with tasks that are validated every loop.
    #7 Algo_, May 31, 2016
    Last edited: May 31, 2016

Share This Page