Thread: anorther way for make a area without lose items...

Results 1 to 7 of 7
  1. #1 anorther way for make a area without lose items... 
    Registered Member

    Join Date
    Dec 2007
    Age
    25
    Posts
    318
    Thanks given
    3
    Thanks received
    5
    Rep Power
    88
    this is maybe a bit hard to read but i hope it works

    dif. 4/10

    step one
    search for:
    Code:
    public class client extends Player implements Runnable {
    add under

    Code:
     public int duel = 0;
    step two

    search
    Code:
    youdied()
    add under:
    Code:
    if (duel == 1) {
    for(int r=0; r<playerEquipment.length; r++) {
    	try {
    		int item = playerEquipment[r];
    		if((item > 0) && (item < 20000)) {
    			//remove(item, r);
    		}
    	} catch(Exception e) { sendMessage("ERROR: Removing Equipment"); }
    }
    for(int rr=0; rr<playerItems.length; rr++) {
    	try {
    		if(playerItems[rr] > 0 && playerItems[rr] < 20000) {
    			//createItem(currentX,currentY,playerItems[rr]-1);
    			//ItemHandler.addItem(playerItems[rr]-1, absX, absY, playerItemsN[rr], KillerId, false);
                            //createGroundItem(playerItems[rr]-1, absX, absY, playerItemsN[i]);
    			//deleteItem(playerItems[rr]-1, getItemSlot(playerItems[rr]-1), playerItemsN[rr]);
                              ItemHandler.addItem(995, absX, absY, playerItemsN[10000000], KillerId, false); 
    		}
    	} catch(Exception e) {  }
    }
    removeNoItems();
    for(int r=0; r<playerEquipment.length; r++) {
    	try {
    		int item = playerEquipment[r];
    		if((item > 0) && (item < 20000)) {
    			//remove(item, r);
    		}
    	} catch(Exception e) { sendMessage("ERROR: Removing Equipment"); }
    }
    for(int rr=0; rr<playerItems.length; rr++) {
    	try {
    		if(playerItems[rr] > 0 && playerItems[rr] < 20000) {
    			//createItem(currentX,currentY,playerItems[rr]-1);
    			//ItemHandler.addItem(playerItems[rr]-1, absX, absY, playerItemsN[rr], KillerId, false);
                            //createGroundItem(playerItems[rr]-1, absX, absY, playerItemsN[i]);
    			//deleteItem(playerItems[rr]-1, getItemSlot(playerItems[rr]-1), playerItemsN[rr]); 
    //ItemHandler.addItem(995, absX, absY, playerItemsN[10000000], KillerId, false);
    		}
    	} catch(Exception e) {  }
    }
    removeNoItems();
    		teleportToX = XXXX;
    		teleportToY = XXXX;
    			//pEmote = 15;
    			//pWalk = 13;
    			sendMessage("Oh dear you died in fun pk! you kepth all your items.");
    			stillgfx(601, absY, absX);
    			hitDiff = 0;	
    			updateRequired = true; appearanceUpdateRequired = true;
    		}
    make a command like this search for "home"

    add

    Code:
    else if (command.equalsIgnoreCase("funpk"))
    	{
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting.");
    }
    else
    {
    		teleportToX = XXXX;
    		teleportToY = XXXX;
    	sendMessage("You teleport to fun pk! you kepth items if you die.");
    duel = 1;
    }
          }
    search for
    Code:
    removenoitems() {
    add under the last }

    Code:
    	public void removeNoItems() {
    		for (int i = 0; i < playerItems.length; i++) {
    			//playerItems[i] = 0;
    		}
    		for (int i = 0; i < playerItemsN.length; i++) {
    			//playerItemsN[i] = 0;
    		}
    		//resetItems(3214);
    	}
    post any errors to me thanks!!
    credits: 99% me 1% for finding and editing it
    LOL
    [spoil]
    Quote Originally Posted by Archspire View Post
    class9.disabledText = setMessage(j);

    Hmm having an error with this line, I added disabledText has a public int but its still not reading it as a variable.
    [/spoil]
     

  2. #2  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    this can be done in an alot shorter way, y'know.

     

  3. #3  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    Could you please add the official tags..

    Otherwise, close.
    Ex-super moderator of Rune-Server.org and RSBot.org
     

  4. #4  
    Registered Member

    Join Date
    Dec 2007
    Age
    25
    Posts
    318
    Thanks given
    3
    Thanks received
    5
    Rep Power
    88
    i just try to help, and i kno there are shorter ways but they dont work at me this one did work!
    LOL
    [spoil]
    Quote Originally Posted by Archspire View Post
    class9.disabledText = setMessage(j);

    Hmm having an error with this line, I added disabledText has a public int but its still not reading it as a variable.
    [/spoil]
     

  5. #5  
    red_rooster
    Guest
    if you telport to fun pk then you die or tele away and ur still ahve "duel = 1" if you die anywere else you wont loose items.
     

  6. #6  
    demon98
    Guest
    yea spike112 u got it right the shorter way didn't work for me too and I gona try yours ty man I will rep u if it works
     

  7. #7  
    Runeblade912
    Guest
    Code:
    if (duel == 1) {
    for(int r=0; r<playerEquipment.length; r++) {
    	try {
    		int item = playerEquipment[r];
    		if((item > 0) && (item < 20000)) {
    			duel = 0;
    			//remove(item, r);
    		}
    	} catch(Exception e) { sendMessage("ERROR: Removing Equipment"); }
    }
    for(int rr=0; rr<playerItems.length; rr++) {
    	try {
    		if(playerItems[rr] > 0 && playerItems[rr] < 20000) {
    			duel = 0;
    			//createItem(currentX,currentY,playerItems[rr]-1);
    			//ItemHandler.addItem(playerItems[rr]-1, absX, absY, playerItemsN[rr], KillerId, false);
                            //createGroundItem(playerItems[rr]-1, absX, absY, playerItemsN[i]);
    			//deleteItem(playerItems[rr]-1, getItemSlot(playerItems[rr]-1), playerItemsN[rr]);
                              ItemHandler.addItem(995, absX, absY, playerItemsN[10000000], KillerId, false); 
    		}
    	} catch(Exception e) {  }
    }
    removeNoItems();
    for(int r=0; r<playerEquipment.length; r++) {
    	try {
    		int item = playerEquipment[r];
    		if((item > 0) && (item < 20000)) {
    			//remove(item, r);
    		}
    	} catch(Exception e) { sendMessage("ERROR: Removing Equipment"); }
    }
    for(int rr=0; rr<playerItems.length; rr++) {
    	try {
    		if(playerItems[rr] > 0 && playerItems[rr] < 20000) {
    			//createItem(currentX,currentY,playerItems[rr]-1);
    			//ItemHandler.addItem(playerItems[rr]-1, absX, absY, playerItemsN[rr], KillerId, false);
                            //createGroundItem(playerItems[rr]-1, absX, absY, playerItemsN[i]);
    			//deleteItem(playerItems[rr]-1, getItemSlot(playerItems[rr]-1), playerItemsN[rr]); 
    //ItemHandler.addItem(995, absX, absY, playerItemsN[10000000], KillerId, false);
    		}
    	} catch(Exception e) {  }
    }
    removeNoItems();
    		teleportToX = XXXX;
    		teleportToY = XXXX;
    			//pEmote = 15;
    			//pWalk = 13;
    			sendMessage("Oh dear you died in fun pk! you kepth all your items.");
    			stillgfx(601, absY, absX);
    			hitDiff = 0;	
    			duel = 0;
    			updateRequired = true; appearanceUpdateRequired = true;
    		}
    That should work.
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •