PDA

View Full Version : [508\525]Pot combining[508/525]



Chevy
January 11th, 2011, 21:48
Difficulty:1\10(Just copy and paste)
Source:Codeusa


Open up ItemOnItem.java

Put this in there:

//Pots n stuff - Coded by Chevy


//PRAY POTS

if(itemUsed == 139) { //Prayer potion(3)
switch(usedWith) {
case 143: // Prayer potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,139,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,143,1)) {
Engine.playerItems.deleteItem(player,139,pi.getIte mSlot(player,139),1);
Engine.playerItems.deleteItem(player,143,pi.getIte mSlot(player,143),1);
pi.addItem(player,2434,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 143) { //Prayer Potion(1)
switch(usedWith) {
case 139: //Prayer potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,139,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,143,1)) {
Engine.playerItems.deleteItem(player,139,pi.getIte mSlot(player,139),1);
Engine.playerItems.deleteItem(player,143,pi.getIte mSlot(player,143),1);
pi.addItem(player,2434,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 141) { //Prayer potion(2)
switch(usedWith) {
case 143: //Prayer potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,141,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,143,1)) {
Engine.playerItems.deleteItem(player,141,pi.getIte mSlot(player,141),1);
Engine.playerItems.deleteItem(player,143,pi.getIte mSlot(player,143),1);
pi.addItem(player,139,1);
pi.addItem(player,229,1);
}
break;
case 141: //Prayer potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,141,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,141,1)) {
Engine.playerItems.deleteItem(player,141,pi.getIte mSlot(player,141),1);
Engine.playerItems.deleteItem(player,141,pi.getIte mSlot(player,141),1);
pi.addItem(player,2434,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 143) { //Prayer potion(1)
switch(usedWith) {
case 141: //Prayer potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,141,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,143,1)) {
Engine.playerItems.deleteItem(player,141,pi.getIte mSlot(player,141),1);
Engine.playerItems.deleteItem(player,143,pi.getIte mSlot(player,143),1);
pi.addItem(player,139,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 143) { //Prayer potion(1)
switch(usedWith) {
case 143: //Prayer potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,143,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,143,1)) {
Engine.playerItems.deleteItem(player,143,pi.getIte mSlot(player,143),1);
Engine.playerItems.deleteItem(player,143,pi.getIte mSlot(player,143),1);
pi.addItem(player,141,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 139) { //Prayer potion(3)
switch(usedWith) {
case 141: //Prayer potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,139,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,141,1)) {
Engine.playerItems.deleteItem(player,139,pi.getIte mSlot(player,139),1);
Engine.playerItems.deleteItem(player,141,pi.getIte mSlot(player,141),1);
pi.addItem(player,2434,1);
pi.addItem(player,143,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 139) { //Prayer potion(3)
switch(usedWith) {
case 139: //Prayer potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,139,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,139,1)) {
Engine.playerItems.deleteItem(player,139,pi.getIte mSlot(player,139),1);
Engine.playerItems.deleteItem(player,139,pi.getIte mSlot(player,139),1);
pi.addItem(player,2434,1);
pi.addItem(player,141,1);
pi.addItem(player,229,1);
}
break;
}
}
//End of pray pots

//SUPER STRENGTH POTS

if(itemUsed == 157) { //Super strength potion(3)
switch(usedWith) {
case 161: // Super strength potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,157,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,161,1)) {
Engine.playerItems.deleteItem(player,157,pi.getIte mSlot(player,157),1);
Engine.playerItems.deleteItem(player,161,pi.getIte mSlot(player,161),1);
pi.addItem(player,2440,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 161) { //Super strength Potion(1)
switch(usedWith) {
case 157: //Super strength potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,157,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,161,1)) {
Engine.playerItems.deleteItem(player,157,pi.getIte mSlot(player,157),1);
Engine.playerItems.deleteItem(player,161,pi.getIte mSlot(player,161),1);
pi.addItem(player,2440,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 159) { //Super strength potion(2)
switch(usedWith) {
case 161: //Super strength potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,159,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,161,1)) {
Engine.playerItems.deleteItem(player,159,pi.getIte mSlot(player,159),1);
Engine.playerItems.deleteItem(player,161,pi.getIte mSlot(player,161),1);
pi.addItem(player,157,1);
pi.addItem(player,229,1);
}
break;
case 159: //Super strength potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,159,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,159,1)) {
Engine.playerItems.deleteItem(player,159,pi.getIte mSlot(player,159),1);
Engine.playerItems.deleteItem(player,159,pi.getIte mSlot(player,159),1);
pi.addItem(player,2440,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 161) { //Super strength potion(1)
switch(usedWith) {
case 159: //Super strength potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,161,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,159,1)) {
Engine.playerItems.deleteItem(player,161,pi.getIte mSlot(player,161),1);
Engine.playerItems.deleteItem(player,159,pi.getIte mSlot(player,159),1);
pi.addItem(player,157,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 161) { //Super strength potion(1)
switch(usedWith) {
case 161: //Super strength potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,161,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,161,1)) {
Engine.playerItems.deleteItem(player,161,pi.getIte mSlot(player,161),1);
Engine.playerItems.deleteItem(player,161,pi.getIte mSlot(player,161),1);
pi.addItem(player,159,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 157) { //Super strength potion(3)
switch(usedWith) {
case 159: //Super strength potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,157,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,159,1)) {
Engine.playerItems.deleteItem(player,157,pi.getIte mSlot(player,157),1);
Engine.playerItems.deleteItem(player,159,pi.getIte mSlot(player,159),1);
pi.addItem(player,2440,1);
pi.addItem(player,161,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 157) { //Super strength potion(3)
switch(usedWith) {
case 157: //Super strength potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,157,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,157,1)) {
Engine.playerItems.deleteItem(player,157,pi.getIte mSlot(player,157),1);
Engine.playerItems.deleteItem(player,157,pi.getIte mSlot(player,157),1);
pi.addItem(player,2440,1);
pi.addItem(player,159,1);
pi.addItem(player,229,1);
}
break;
}
}
//End of Super Strength pots

//SUPER ATTACK POTS

if(itemUsed == 145) { //Super attack potion(3)
switch(usedWith) {
case 149: // Super attack potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,145,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,149,1)) {
Engine.playerItems.deleteItem(player,145,pi.getIte mSlot(player,157),1);
Engine.playerItems.deleteItem(player,145,pi.getIte mSlot(player,161),1);
pi.addItem(player,2436,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 149) { //Super attack Potion(1)
switch(usedWith) {
case 145: //Super attack potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,149,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,145,1)) {
Engine.playerItems.deleteItem(player,145,pi.getIte mSlot(player,149),1);
Engine.playerItems.deleteItem(player,149,pi.getIte mSlot(player,145),1);
pi.addItem(player,2436,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 147) { //Super attack potion(2)
switch(usedWith) {
case 149: //Super attack potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,147,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,149,1)) {
Engine.playerItems.deleteItem(player,147,pi.getIte mSlot(player,147),1);
Engine.playerItems.deleteItem(player,149,pi.getIte mSlot(player,149),1);
pi.addItem(player,145,1);
pi.addItem(player,229,1);
}
break;
case 147: //Super attack potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,147,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,147,1)) {
Engine.playerItems.deleteItem(player,147,pi.getIte mSlot(player,147),1);
Engine.playerItems.deleteItem(player,147,pi.getIte mSlot(player,147),1);
pi.addItem(player,2436,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 149) { //Super attack potion(1)
switch(usedWith) {
case 147: //Super attack potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,147,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,149,1)) {
Engine.playerItems.deleteItem(player,147,pi.getIte mSlot(player,147),1);
Engine.playerItems.deleteItem(player,149,pi.getIte mSlot(player,149),1);
pi.addItem(player,145,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 149) { //Super attack potion(1)
switch(usedWith) {
case 149: //Super attack potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,149,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,149,1)) {
Engine.playerItems.deleteItem(player,149,pi.getIte mSlot(player,149),1);
Engine.playerItems.deleteItem(player,149,pi.getIte mSlot(player,149),1);
pi.addItem(player,147,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 145) { //Super attack potion(3)
switch(usedWith) {
case 147: //Super attack potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,145,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,147,1)) {
Engine.playerItems.deleteItem(player,145,pi.getIte mSlot(player,145),1);
Engine.playerItems.deleteItem(player,147,pi.getIte mSlot(player,147),1);
pi.addItem(player,2436,1);
pi.addItem(player,149,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 145) { //Super attack potion(3)
switch(usedWith) {
case 145: //Super attack potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,145,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,145,1)) {
Engine.playerItems.deleteItem(player,145,pi.getIte mSlot(player,145),1);
Engine.playerItems.deleteItem(player,145,pi.getIte mSlot(player,145),1);
pi.addItem(player,2436,1);
pi.addItem(player,147,1);
pi.addItem(player,229,1);
}
break;
}
}
//End of Super Attack pots

//SUPER DEFENCE POTS

if(itemUsed == 163) { //Super defence potion(3)
switch(usedWith) {
case 167: // Super defence potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,163,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,167,1)) {
Engine.playerItems.deleteItem(player,163,pi.getIte mSlot(player,163),1);
Engine.playerItems.deleteItem(player,167,pi.getIte mSlot(player,167),1);
pi.addItem(player,2442,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 167) { //Super defence Potion(1)
switch(usedWith) {
case 163: //Super defence potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,167,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,163,1)) {
Engine.playerItems.deleteItem(player,167,pi.getIte mSlot(player,167),1);
Engine.playerItems.deleteItem(player,163,pi.getIte mSlot(player,163),1);
pi.addItem(player,2442,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 165) { //Super defence potion(2)
switch(usedWith) {
case 167: //Super defence potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,165,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,167,1)) {
Engine.playerItems.deleteItem(player,165,pi.getIte mSlot(player,165),1);
Engine.playerItems.deleteItem(player,167,pi.getIte mSlot(player,167),1);
pi.addItem(player,163,1);
pi.addItem(player,229,1);
}
break;
case 165: //Super defence potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,165,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,165,1)) {
Engine.playerItems.deleteItem(player,165,pi.getIte mSlot(player,165),1);
Engine.playerItems.deleteItem(player,165,pi.getIte mSlot(player,165),1);
pi.addItem(player,2442,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 167) { //Super defence potion(1)
switch(usedWith) {
case 165: //Super defence potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,167,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,165,1)) {
Engine.playerItems.deleteItem(player,167,pi.getIte mSlot(player,167),1);
Engine.playerItems.deleteItem(player,165,pi.getIte mSlot(player,165),1);
pi.addItem(player,163,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 167) { //Super defence potion(1)
switch(usedWith) {
case 167: //Super defence potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,167,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,167,1)) {
Engine.playerItems.deleteItem(player,167,pi.getIte mSlot(player,167),1);
Engine.playerItems.deleteItem(player,167,pi.getIte mSlot(player,167),1);
pi.addItem(player,165,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 163) { //Super defence potion(3)
switch(usedWith) {
case 165: //Super defencepotion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,163,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,165,1)) {
Engine.playerItems.deleteItem(player,163,pi.getIte mSlot(player,163),1);
Engine.playerItems.deleteItem(player,165,pi.getIte mSlot(player,165),1);
pi.addItem(player,2442,1);
pi.addItem(player,167,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 163) { //Super defence potion(3)
switch(usedWith) {
case 163: //Super defence potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,163,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,163,1)) {
Engine.playerItems.deleteItem(player,163,pi.getIte mSlot(player,163),1);
Engine.playerItems.deleteItem(player,163,pi.getIte mSlot(player,163),1);
pi.addItem(player,2442,1);
pi.addItem(player,165,1);
pi.addItem(player,229,1);
}
break;
}
}
//End of Super Defence pots



//Saradomin brews

if(itemUsed == 6687) { //Saradomin brew(3)
switch(usedWith) {
case 6692: // Saradomin brew(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6687,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6692,1)) {
Engine.playerItems.deleteItem(player,6687,pi.getIt emSlot(player,6687),1);
Engine.playerItems.deleteItem(player,6692,pi.getIt emSlot(player,6692),1);
pi.addItem(player,6685,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 6691) { //Saradomin brew(1)
switch(usedWith) {
case 6687: //Saradomin brew(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6691,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6687,1)) {
Engine.playerItems.deleteItem(player,6691,pi.getIt emSlot(player,6691),1);
Engine.playerItems.deleteItem(player,6687,pi.getIt emSlot(player,6687),1);
pi.addItem(player,6685,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 6689) { //Saradomin brew(2)
switch(usedWith) {
case 6691: //Saradomin brew(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6689,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6691,1)) {
Engine.playerItems.deleteItem(player,6689,pi.getIt emSlot(player,6689),1);
Engine.playerItems.deleteItem(player,6691,pi.getIt emSlot(player,6691),1);
pi.addItem(player,6687,1);
pi.addItem(player,229,1);
}
break;
case 6689: //Saradomin brew(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6689,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6689,1)) {
Engine.playerItems.deleteItem(player,6689,pi.getIt emSlot(player,6689),1);
Engine.playerItems.deleteItem(player,6689,pi.getIt emSlot(player,6689),1);
pi.addItem(player,6685,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 6691) { //Saradomin brew(1)
switch(usedWith) {
case 6689: //Saradomin brew(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6691,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6689,1)) {
Engine.playerItems.deleteItem(player,6691,pi.getIt emSlot(player,6691),1);
Engine.playerItems.deleteItem(player,6689,pi.getIt emSlot(player,6689),1);
pi.addItem(player,6687,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 6691) { //Saradomin brew(1)
switch(usedWith) {
case 6691: //Saradomin brew(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6691,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6691,1)) {
Engine.playerItems.deleteItem(player,6691,pi.getIt emSlot(player,6691),1);
Engine.playerItems.deleteItem(player,6691,pi.getIt emSlot(player,6691),1);
pi.addItem(player,6689,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 6687) { //Saradomin brew(3)
switch(usedWith) {
case 6689: //Saradomin brew(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6687,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6689,1)) {
Engine.playerItems.deleteItem(player,6687,pi.getIt emSlot(player,6687),1);
Engine.playerItems.deleteItem(player,6689,pi.getIt emSlot(player,6689),1);
pi.addItem(player,6685,1);
pi.addItem(player,6691,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 6687) { //Saradomin brew(3)
switch(usedWith) {
case 6687: //Saradomin brew(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,6687,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,6687,1)) {
Engine.playerItems.deleteItem(player,6687,pi.getIt emSlot(player,6687),1);
Engine.playerItems.deleteItem(player,6687,pi.getIt emSlot(player,6687),1);
pi.addItem(player,6685,1);
pi.addItem(player,6689,1);
pi.addItem(player,229,1);
}
break;
}
}
//End of Saradomin brews



//Super Restore potions

if(itemUsed == 3026) { //Super Restore potion(3)
switch(usedWith) {
case 3030: // Super Restore potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3026,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3030,1)) {
Engine.playerItems.deleteItem(player,3026,pi.getIt emSlot(player,3026),1);
Engine.playerItems.deleteItem(player,3030,pi.getIt emSlot(player,3030),1);
pi.addItem(player,3024,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 3030) { //Super Restore potion(1)
switch(usedWith) {
case 3026: //Super Restore potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3030,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3026,1)) {
Engine.playerItems.deleteItem(player,3030,pi.getIt emSlot(player,3030),1);
Engine.playerItems.deleteItem(player,6687,pi.getIt emSlot(player,6687),1);
pi.addItem(player,3024,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 3028) { //Super Restore potion(2)
switch(usedWith) {
case 3030: //Super Restore potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3028,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3030,1)) {
Engine.playerItems.deleteItem(player,3028,pi.getIt emSlot(player,3028),1);
Engine.playerItems.deleteItem(player,3030,pi.getIt emSlot(player,3030),1);
pi.addItem(player,3026,1);
pi.addItem(player,229,1);
}
break;
case 3028: //Super Restore potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3028,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3028,1)) {
Engine.playerItems.deleteItem(player,3028,pi.getIt emSlot(player,3028),1);
Engine.playerItems.deleteItem(player,3028,pi.getIt emSlot(player,3028),1);
pi.addItem(player,3024,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 3030) { //Super Restore potion(1)
switch(usedWith) {
case 3028: //Super Restore potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3030,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3028,1)) {
Engine.playerItems.deleteItem(player,3030,pi.getIt emSlot(player,3030),1);
Engine.playerItems.deleteItem(player,3028,pi.getIt emSlot(player,3028),1);
pi.addItem(player,3026,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 3030) { //Super Restore potion(1)
switch(usedWith) {
case 3030: //Super Restore potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3030,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3030,1)) {
Engine.playerItems.deleteItem(player,3030,pi.getIt emSlot(player,3030),1);
Engine.playerItems.deleteItem(player,3030,pi.getIt emSlot(player,3030),1);
pi.addItem(player,3028,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 3026) { //Super Restore potion(3)
switch(usedWith) {
case 3028: //Super Restore potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3026,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3028,1)) {
Engine.playerItems.deleteItem(player,3026,pi.getIt emSlot(player,3026),1);
Engine.playerItems.deleteItem(player,3028,pi.getIt emSlot(player,3028),1);
pi.addItem(player,3024,1);
pi.addItem(player,3030,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 3026) { //Super Restore potion(3)
switch(usedWith) {
case 3026: //Super Restore potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,3026,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,3026,1)) {
Engine.playerItems.deleteItem(player,3026,pi.getIt emSlot(player,3026),1);
Engine.playerItems.deleteItem(player,3026,pi.getIt emSlot(player,3026),1);
pi.addItem(player,3024,1);
pi.addItem(player,3028,1);
pi.addItem(player,229,1);
}
break;
}
}
//End of Super Restore potions







//Ranging potions

if(itemUsed == 169) { //Ranging(3)
switch(usedWith) {
case 173: // Ranging(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,169,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,173,1)) {
Engine.playerItems.deleteItem(player,169,pi.getIte mSlot(player,169),1);
Engine.playerItems.deleteItem(player,173,pi.getIte mSlot(player,173),1);
pi.addItem(player,2444,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 173) { //Ranging potion(1)
switch(usedWith) {
case 169: //Ranging potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,173,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,169,1)) {
Engine.playerItems.deleteItem(player,173,pi.getIte mSlot(player,173),1);
Engine.playerItems.deleteItem(player,169,pi.getIte mSlot(player,169),1);
pi.addItem(player,2444,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 171) { //Ranging potion(2)
switch(usedWith) {
case 173: //Ranging potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,171,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,173,1)) {
Engine.playerItems.deleteItem(player,171,pi.getIte mSlot(player,171),1);
Engine.playerItems.deleteItem(player,173,pi.getIte mSlot(player,173),1);
pi.addItem(player,169,1);
pi.addItem(player,229,1);
}
break;
case 171: //Ranging potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,171,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,171,1)) {
Engine.playerItems.deleteItem(player,171,pi.getIte mSlot(player,171),1);
Engine.playerItems.deleteItem(player,171,pi.getIte mSlot(player,171),1);
pi.addItem(player,2444,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 173) { //Ranging potion(1)
switch(usedWith) {
case 171: //Ranging potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,173,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,171,1)) {
Engine.playerItems.deleteItem(player,173,pi.getIte mSlot(player,173),1);
Engine.playerItems.deleteItem(player,171,pi.getIte mSlot(player,171),1);
pi.addItem(player,169,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 173) { //Ranging potion(1)
switch(usedWith) {
case 173: //Ranging potion(1)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,173,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,173,1)) {
Engine.playerItems.deleteItem(player,173,pi.getIte mSlot(player,173),1);
Engine.playerItems.deleteItem(player,173,pi.getIte mSlot(player,173),1);
pi.addItem(player,171,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 169) { //Ranging potion(3)
switch(usedWith) {
case 171: //Ranging potion(2)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,169,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,171,1)) {
Engine.playerItems.deleteItem(player,169,pi.getIte mSlot(player,169),1);
Engine.playerItems.deleteItem(player,171,pi.getIte mSlot(player,171),1);
pi.addItem(player,2444,1);
pi.addItem(player,173,1);
pi.addItem(player,229,1);
}
break;
}
}
if(itemUsed == 169) { //Ranging potion(3)
switch(usedWith) {
case 169: //Ranging potion(3)
if(Server.engine.playerItems.hasPlayerItemAmount(p layer,169,1) &&
Server.engine.playerItems.hasPlayerItemAmount(play er,169,1)) {
Engine.playerItems.deleteItem(player,169,pi.getIte mSlot(player,169),1);
Engine.playerItems.deleteItem(player,169,pi.getIte mSlot(player,169),1);
pi.addItem(player,2444,1);
pi.addItem(player,171,1);
pi.addItem(player,229,1);
}
break;
}
}
else {

player.getActionSender().sendMessage(player, "Nothing interesting happens.");
}
//End of Ranging potions


Was this hard? No...
Just takes time to do it all....kinda a pain in the ass ;)

skulledace22
January 11th, 2011, 22:16
Thank you!

Tricky
January 12th, 2011, 07:28
Looks Nice Gona Add Thanks :D

Kurdz
January 13th, 2011, 15:49
pot combining? what does this accually do

Chevy
January 13th, 2011, 19:11
^Try reading the code, pretty easy to tell..?
It combines pots...
like a (2) + a (1) use on each other and you get a 3 and a vial..

Kurdz
January 13th, 2011, 19:19
all of the sources have that..

Chevy
January 13th, 2011, 19:21
No they don't dumb fuck.

0r4nge ownz
January 18th, 2011, 07:47
Lol, there are a few with it,

Still, Gj for the time consuming coding i guess. + boring.

Codeusa
January 18th, 2011, 15:13
Ew, why not use an array?

The fact you're calling Codeusa a 517 makes me want to slap you in the mouth. 517 didn't even have claws or pvp items

crezzy
January 18th, 2011, 15:23
Lol all that code just for combining potions? Try redoing it it could be done with a lot less code.

Codeusa
January 18th, 2011, 15:27
Lol all that code just for combining potions? Try redoing it it could be done with a lot less code.

Oh shut up, because you probably would do it just like that.

crezzy
January 18th, 2011, 15:31
Oh shut up, because you probably would do it just like that.

That's rich coming from a idiot like you.

Codeusa
January 18th, 2011, 15:42
That's rich coming from a idiot like you.

You didn't even know who i was 15 mins ago, but now you can judge my programing skill based off a post?

crezzy
January 18th, 2011, 15:44
You didn't even know who i was 15 mins ago, but now you can judge my programing skill based off a post?

Lol yea.... If you go around flaming and flaming what you think I am going to think? Your ovb just a kid if you abuse everyone. Time to grow up I think?
Got nothing better to do try getting a life and going outside lol.

Codeusa
January 18th, 2011, 15:46
Lol yea.... If you go around flaming and flaming what you think I am going to think? Your ovb just a kid if you abuse everyone. Time to grow up I think?
Got nothing better to do try getting a life and going outside lol.

I'm 20 years old, so your statement just fell through. That isn't important tho, so because I flame that makes me less of a programmer? Shit man, super_ & peter must be idiots then.

crezzy
January 18th, 2011, 15:49
I'm 20 years old, so your statement just fell through. That isn't important tho, so because I flame that makes me less of a programmer? Shit man, super_ & peter must be idiots then.

I don't know who super and peter are for a start + I am 20 my self and I am acting a lot older than you. I don't come on these forums just to abuse people, I got better things to do with my time like blocking you.

Codeusa
January 18th, 2011, 15:52
I don't know who super and peter are for a start + I am 20 my self and I am acting a lot older than you. I don't come on these forums just to abuse people, I got better things to do with my time like blocking you.
For a 20 year old you are pretty stupid, you keep saying im abusing you like I'm hurting your ego or something. Also if you don't know who super_ or peter hell, if you don't at least know who light232 is or hotyute. I'll pray to whatever deity will listen that you gain some knowledge from this experience.

Chevy
January 19th, 2011, 23:39
Could you guys please stop argueing on my thread? Take it to your PM or MSN. There is no need for it on my thread...
If you like my tut, cool, thanks. If not, then okay, I don't really care. Alot of people will like it, and it's not hard, I know that, but it just takes time, and I figured I'd be nice and release it, same thing with my overload\turmoil tuts.. :\

u back 4 m0r
January 30th, 2011, 00:13
Thanks helped a ton :) must've taken a couple hours tbh.

jessewhitley
January 30th, 2011, 16:45
Compiler
Compiling net/com/codeusa/Engine.java
.
.
.
.\net\com\codeusa\net\packethandler\ItemOnItem.jav a:607: unreachable statement
if (itemUsed == 139) { //Prayer potion(3)
^
1 error
Press any key to continue . . .

what do i do?

SolitudeX
January 30th, 2011, 16:53
Compiler
Compiling net/com/codeusa/Engine.java
.
.
.
.\net\com\codeusa\net\packethandler\ItemOnItem.jav a:607: unreachable statement
if (itemUsed == 139) { //Prayer potion(3)
^
1 error
Press any key to continue . . .

what do i do?

Your missing an If
^

u back 4 m0r
January 30th, 2011, 20:53
Compiler
Compiling net/com/codeusa/Engine.java
.
.
.
.\net\com\codeusa\net\packethandler\ItemOnItem.jav a:607: unreachable statement
if (itemUsed == 139) { //Prayer potion(3)
^
1 error
Press any key to continue . . .

what do i do?

Put a } above if, It should work.

Aros
February 22nd, 2011, 14:51
Compiling files...
.\net\com\codeusa\net\packethandler\ItemOnItem.jav a:78: unreachable statement
if(itemUsed == 139) { //Prayer potion(3)
^
Note: .\net\com\codeusa\Gui.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Press any key to continue . . .


Could anyone tell me why?

Aros
February 22nd, 2011, 14:53
Put a } above if, It should work.

I did but then i get 11 errors.

Aros
February 22nd, 2011, 15:24
Put a } above if, It should work.

Ok i sussed it put case 13759: above it and it should work, you might get errors if you have used that case number so just swapp them :)

0r4nge ownz
February 22nd, 2011, 16:16
Ok i sussed it put case 13759: above it and it should work, you might get errors if you have used that case number so just swapp them :)

Lol, alex you fail .. xD

OT: gj on this i guess.

Aros
February 22nd, 2011, 16:19
tom i done it, but it still didnt work, the pots still dont re-fill xD

Chevy
March 18th, 2011, 20:08
Most of done something wrong? Lol. Anyway, enjoy guys, I've quit computers so I don't play, code, anything anymore.