Put (GreencharmItemID, Amount) ?
|
Hi, I'm trying to make an object that when you used a summoning charm on it, you would gain X amount of Summoning Experience. The problem is, when I try and use the charm on the obelisk, I disconnect and never gain any experience. Do you know why?
Here is my UseItem.java: Java - Rune-Server Official Pastebin
The code for my object is at line 50.
Thanks!
Put (GreencharmItemID, Amount) ?
I tried that with Gold Charms but I still DC.
Add it in ActionHandler.java
somthing like that so when u click the object
it checks for item id, and if u have it, it deletes it then
gives u XP
You gunna have to find the addexp method your self.Code:case ####: if (c.getItems().playerHasItem(ID, Amount)) { c.getItems().deleteItem(ID, Amount); c.addXp(ID, Amount); c.sendMessage("You have gained EXP"); } Else { c.sendMessage("you need whatevere amount of whaterver to use this obilesk"); } break;
Alright, thanks man, repped. The case number is the Obby ID right?
EDIT: It didn't work. =/
Pastebin your actionhandler, and pm me the link ill fix it
Pmed.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |