Looks good, i might convert that into PI if i want to,

.
if (objectID == 4121) { //object ID
if (playerHasItem(995, 50000)) { //50k GP needed or you can't gamble
addItem(Item.randomLowGamble(), 1); //Adds a random item from LowGamble (in item.java)
addItem(533, misc.random(8)); //Adds a random amount of big bones from 1-8
addItem(890, misc.random(15)); //Adds a random amount of adamant arrows from 1-15
deleteItem(995, 50000); //Removes 50k from your inventory
sM("You bet 50,000 coins and gain some random items"); //sends a message
} else if(playerHasItem(995, 0)) {
addItem(995, misct.random(1000000));
sM("You have been rewarded some money, use that."); // sends a message
} else {
sM("We have given you some you jerk, you can't afford then GTFO");
}
} 