Try this.
Code:EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer c) { c.logout; } }, 5000);
|
FIXED
how can I make it so it logs me out after 5 seconds?
Code:if (itemId == 18344) // #### = itemID if (c.isDonator == true) { // checks if your a donator c.sendMessage("You are already a donator!"); // sends them a message if they are return; //stops the statement if they are a donator } else { if (c.getItems().playerHasItem(18344)) { // again #### is your item id, it makes sure you have the item to use c.getItems().deleteItem(18344, 1); c.isDonator = true; c.logout(); } return; }
Thanks!
Try this.
Code:EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer c) { c.logout; } }, 5000);
can't find the symbol for logout, it wont let you put client c and EventContainer c in the same void :[
should be logout(); sorry.
do Client client = new Client();
then client.logout();
Code:if (itemId == 18344) { if (c.isDonator == true) { // checks if your a donator c.sendMessage("You are already a donator!"); // sends them a message if they are return; //stops the statement if they are a donator } else { if (c.getItems().playerHasItem(18344)) { // again #### is your item id, it makes sure you have the item to use c.getItems().deleteItem(18344, 1); c.isDonator = true; EventManager.getSingleton().addEvent(new Event() { public void execute(EventContainer container) { c.logout(); container.stop(); } }, 5000); } return; } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |