this for barrows? i dont understand what ur tryna do
|
When I compile and run the code everything is fine except for the chest does the instant open/close because I didn't put some sort of stop between the two. How would I make this work so that when the interface button is pushed it opens the first time and closes on the second button press?
I comment out either the open or the closed line and it works the way it should except for the fact that I cant do the opposite action.Code:case 0: //Chest open and close (server.chest.openChest(c, c.chest); (server.chest.closeChest(c, c.chest); break;
this for barrows? i dont understand what ur tryna do
I'm working on a chest , that when you open it there is a random item (1 of 10 different items), The player places a bet before hand and if they guess correctly they win. the only problem is when they click the button, the chest opens and closes instantly and they don't get to see the object inside along with their winnings.
It tells them that they won but they don't get anything.
The original code was
But I changed case 1: to randomize the "contents".Code:case 49022: switch (c.chestOptions) { case 0: //Chest open (server.chest.openChest(c, c.chest) break; case 1: //Chest close (server.chest.closeChest(c, c.chest) break; } break;
Try It like this
java reads from top to bottom, like you read a book. So you have to make it "read" content coding before it closes the chest if that is what you wish for.Code:case 49022: switch (c.chestOptions) { case 0: //Chest open (server.chest.openChest(c, c.chest) break; case 1: //Chest close //All of your content coding here. (server.chest.closeChest(c, c.chest) break; } break;
Nvrmind
Hey im trying to add this to if anyone can help me do it please add me on msn or skype
Msn: [email protected]
Skype name: juggalo-pride
P.S I'm using project insanity's base new eras server
This code already worked,
however I changed case 1: from closing to randomizing (which works), the only problem is the open and close.Code:case 49022: switch (c.chestOptions) { case 0: //Chest open (server.chest.openChest(c, c.chest) break; case 1: //Chest close (server.chest.closeChest(c, c.chest) break; } break;
I need case 0: to be the switch between open and closed so you would use the same button to do both actions. as for the "else if" I have no idea how to do that for a case.
Sorry about the two different accounts but my brother stopped by and decided to mess with me i guess.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |