Code-x

Code-x Private Server
 
HomeHome  PortalPortal  SearchSearch  RegisterRegister  Log inLog in  

 

 Crystal bow degrade

Go down 
AuthorMessage
Mod Wouter
Global Moderator
Global Moderator


Number of posts : 52
Registration date : 2008-08-08

Crystal bow degrade Empty
PostSubject: Crystal bow degrade   Crystal bow degrade Icon_minitimeSun Aug 10, 2008 2:11 pm

Purpose: Making crystal bows degrade after shooting it 250 times (2500 times total)

Difficulty: 1 (if u know some java)

Assumed Knowledge: Copy and paste, Java

Server Base: Ranger-Scape

Classes Modified: Client.java

Procedure
Add this method
Code:

public int equipbow = 0;Next find:
next find
Code:

Boolean Process()
And add this in there
Code:

      if(equipbow == 250)
         {
         deleteequiment(4212, playerWeapon);
         equipbow = 0;
         addequiment(4215, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4214, playerWeapon);
         equipbow = 0;
         addequiment(4215, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4215, playerWeapon);
         equipbow = 0;
         addequiment(4216, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4216, playerWeapon);
         equipbow = 0;
         addequiment(4217, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4217, playerWeapon);
         equipbow = 0;
         addequiment(4218, playerChest);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4218, playerWeapon);
         equipbow = 0;
         addequiment(4219, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4219, playerWeapon);
         equipbow = 0;
         addequiment(4220, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4220, playerWeapon);
         equipbow = 0;
         addequiment(4221, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4221, playerWeapon);
         equipbow = 0;
         addequiment(4222, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4222, playerWeapon);
         equipbow = 0;
         addequiment(4223, playerWeapon);
         sendMessage("The Crystal Bow has degraded.");
         }
      if(equipbow == 250)
         {
         deleteequiment(4223, playerWeapon);
         equipbow = 0;
         addequiment(4207, playerWeapon);
         sendMessage("The Crystal Bow has degraded into a crystal seed.");
         }
Search for
Code:

public void DeleteArrow()
In that method add this
Code:

  else if(playerEquipment[playerWeapon] == 4212) || playerEquipment[playerWeapon] ==4214 || playerEquipment[playerWeapon] ==4215 || playerEquipment[playerWeapon] ==4216 || playerEquipment[playerWeapon] ==4217 || playerEquipment[playerWeapon] ==4218 || playerEquipment[playerWeapon] ==4219 || playerEquipment[playerWeapon] ==4220 || playerEquipment[playerWeapon] ==4221 || playerEquipment[playerWeapon] ==4222 || playerEquipment[playerWeapon] ==4223)
  {
  equipbow += 1;
  }
Don't know where to add this? look for
Code:

else {
after the last bracket add it or...
Search for
Code:

updateRequired = true;
and add it above that

Search for
Code:


                  } else if (token.equals("character-height")) {
                      heightLevel = Integer.parseInt(token2);
Under that add this:
Code:


                  } else if (token.equals("equipbow")) {
                      equipbow = Integer.parseInt(token2);
Search for
Code:


         characterfile.write("character-height = ", 0, 19);
         characterfile.write(Integer.toString(heightLevel), 0, Integer.toString(heightLevel).length());
         characterfile.newLine();
Under that add:

Code:

         characterfile.write("equipbow = ", 0, 11);
         characterfile.write(Integer.toString(equipbow), 0, Integer.toString(equipbow).length());
         characterfile.newLine();

And ur done !
Compile , run and test !
Back to top Go down
 
Crystal bow degrade
Back to top 
Page 1 of 1
 Similar topics
-
» Valentine's Day Crystal Hearts
» 7 Continents, 7 Crystals Part 5: Cool as the Rising Sun
» Game Quest Walk-Thrus

Permissions in this forum:You cannot reply to topics in this forum
Code-x :: General Chat :: runescape private [TUT] section-
Jump to: