Zarius / Bukkit-OtherBlocks

OtherBlocks (now known as OtherDrops) plugin for Bukkit (dev build: https://www.mediafire.com/?i6ows1g6kus2o0l)
http://dev.bukkit.org/server-mods/otherdrops/
GNU General Public License v3.0
17 stars 17 forks source link

Exucute a command in a drops #191

Closed salvokt closed 11 years ago

salvokt commented 11 years ago

is possible to add a command on a book and when it will ve used it disappear??

Zarius commented 11 years ago

You could execute a command on rightclick based on the displayname (lorename) of the book held, eg:

   ANY:
    - action: rightclick
      tool: book
      lorename: blah
      command: "/!*runme"
      toolconsume: 1
salvokt commented 11 years ago

afterthis the book disappear?

Zarius commented 11 years ago

Yes, if you use the toolconsume parameter. Forgot to add that, I just editted the example above.

israelcurtis commented 11 years ago

this sounds fun, but:

[WARNING] [OtherDrops:2.8b.382] Unrecognized target (skipping): BOOK
Zarius commented 11 years ago

Oops, it was late :D Fixed the example above.

israelcurtis commented 11 years ago

hmm.. no errors, but it does nothing... not really sure you can rightclick a plain book anyway. A signed and written book (WRITTEN_BOOK), however would be nice in that the player would expect to hold it and then rightclick to read it. Upon which, the text would inform them that they had just been cursed, they'd get poisoned and blinded and would thus die ... ;-)

Zarius commented 11 years ago

It's not rightclicking a book - it's rightclicking on any block (or mob) with a "book" as the tool, so should work fine although I haven't had a chance to test it yet (not currently at home).

A written book should work fine too - and would be nice to make the title a condition, eventually :)

israelcurtis commented 11 years ago

yes - i am clicking blocks with the book in hand as a tool. Does nothing...

israelcurtis commented 11 years ago

well, LEFT_CLICK while holding a book or written_book in hand works great. But usually players don't use books as tools to hit things or try to break things. so it seems just RIGHT_CLICK isn't working, likely because, with books - right clicking is used to read the book itself, and not to act upon a block like some other things can...

salvokt commented 11 years ago

other drops is compatible with epicboss?

Zarius commented 11 years ago

@salvokt Should be, in regards to commands at least - OtherDrops can run the commands from any plugin that you want.

@somaticstudios Ah, of course, hadn't been thinking of a book rightclick taking effect before the playerinteractevent. It'll have to be on the leftclick unless I add a trigger for BOOKREAD or something.

salvokt commented 11 years ago

is possible to add custom drops to custom mobs created with epicboss thanks for reply

israelcurtis commented 11 years ago

BOOKREAD trigger would make the scenario I imagined above possible.. yes please ;-) just make sure it supports delay on the drop so I can give them a chance to read what horrors are about to befall them...

Zarius commented 11 years ago

I've tested this recently - the rightclick trigger still works for a written book even though the book opens up.

@somaticstudios - so it's quite possible to do the open, read text and be cursed/poisoned part :)

  WRITTEN_BOOK:
    - action: RIGHTCLICK
      delay: 60
      potioneffect: POISON@200@2
      message: "The curse has taken effect!"