Author Topic: Another failed plugin attempt  (Read 3123 times)

1cec0ld

  • Frozen Hearted Admin
  • Professor
  • Fighting Blaine
  • *****
  • Posts: 3084
  • Friendliness: 94
  • Who am I to judge others?
  • Pokemon Team: Typhlosion, Espeon, Aerodactyl, Glalie, Jolteon, Mew the HM Slave
In response to the "duplicated" thread, in Problems, I tried to make a plugin that, when an item is clicked (InventoryClickEvent) the plugin checks if the itemid is part of the Not Allowed To Be Stacked List
Code: [Select]
int[] notAllowed = {310,311,312,313,
298,299,300,301,
302,303,304,305,
306,307,308,309,
314,315,316,317,
272,273,274,275,
276,277,278,279,
283,284,285,286,
267,256,257,258,
290,291,292,293,294,
261};

And if the amount is greater than one, simply drop the items individually at the player's feet to be picked up naturally.
I failed. Paradox, if you could possibly handle this, please do. Unless yall can think of a better solution.

Ad...

Paradox

  • Professor
  • Fighting Giovanni
  • *****
  • Posts: 966
  • Friendliness: 39
  • Registered User
Re: Another failed plugin attempt
« Reply #1 on: April 03, 2013, 06:10:19 pm »
I can easily implement a plugin that'll prevent people form being able to pick up items out of an anvil or whatnot if it's not meant suppose to be stacked. I think making it so that it "drops the items" on ground so the player can pick it up will be the tricky part. Thanks for the array, I'll see what I can do right now.


EDIT: Wait. do you want this so that if a person tries to take something out of an avil that it doesn't allow them? Or do you want it so if they have something they shouldn't have stacked in their inventory, it throws it on the ground? The second is much much easier and seems to make more sense to me.
« Last Edit: April 03, 2013, 06:14:03 pm by Paradox »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email: