Full ardougne stalls (thieving, without Handler)
Purpose: Adding full ardy stall thieving to your server
Difficulty: 8/10
Compatible Sources: All with that handle object voids
Credits: Sam Server, 100%
Modified Classes: Client.java, player.java and item.java.
Warning: Backup your files this is a huge tut
First of all add these to item.java
Code:
public static int gem[] = {1623,1623,1623,1623,1623,1621,1621,1621,1621,1619,1619,1619,1617,1617,16311623,1623,1623,1623,1623,1621,1621,1621,1621,1619,1619,1619,1617,1617,1631};
public static int randomGem()
{
return gem[(int)(Math.random()*gem.length)];
}
Save and close item.java and open player.java and add this
Code:
public int cake, cake2, silk, silk2, fur, spice, silver, gem, cakeSB, cakeSB2, silkSB, silkSB2, furSB, spiceSB, silverSB, gemSB = 0;
Save and close player.java and open client.java and add these voids:
Code:
public void cake()
{
sendMessage("You manage to steal the cake!");
addItem(1891,1);
deleteObj(2667,3310);
Object(2667,3310,634,-1,10);
addSkillXP(50 + playerLevel[17], 17);
resetAnimation();
cakeSB = 21;
}
public void cake2()
{
sendMessage("You manage to steal the cake!");
addItem(1891,1);
deleteObj(2655,3311);
Object(2655,3311,634,-1,10);
addSkillXP(50 + playerLevel[17], 17);
resetAnimation();
cakeSB2 = 21;
}
public void silk()
{
sendMessage("You manage to steal the silk!");
addItem(950,1);
deleteObj(2662,3314);
Object(2662,3314,634,-2,10);
addSkillXP(100 + playerLevel[17], 17);
resetAnimation();
silkSB = 21;
}
public void silk2()
{
sendMessage("You manage to steal the silk!");
addItem(950,1);
deleteObj(2656,3302);
Object(2656,3302,634,-3,10);
addSkillXP(100 + playerLevel[17], 17);
resetAnimation();
silkSB2 = 21;
}
public void fur()
{
sendMessage("You manage to steal the fur!");
addItem(948,1);
deleteObj(2663,3296);
Object(2663,3296,634,0,10);
addSkillXP(200 + playerLevel[17], 17);
resetAnimation();
furSB = 21;
}
public void spice()
{
sendMessage("You manage to steal the spice!");
addItem(2007,1);
deleteObj(2658,3297);
Object(2658,3297,634,0,10);
addSkillXP(310 + playerLevel[17], 17);
resetAnimation();
spiceSB = 21;
}
public void silver()
{
sendMessage("You manage to steal the silver bar!");
addItem(2355,1);
deleteObj(2657,3314);
Object(2657,3314,634,-2,10);
addSkillXP(500 + playerLevel[17], 17);
resetAnimation();
silverSB = 21;
}
public void gem()
{
sendMessage("You manage to steal the gem!");
addItem(Item.randomGem(),1);
deleteObj(2667,3303);
Object(2667,3303,634,-1,10);
addSkillXP(1000 + playerLevel[17], 17);
resetAnimation();
gemSB = 21;
}
Add all this under boolean process
Code:
/* Thieving */
if (cake >= -1)
{
cake -= 1;
}
if (cakeSB >= -1)
{
cakeSB -= 1;
}
if (cake2 >= -1)
{
cake2 -= 1;
}
if (cakeSB2 >= -1)
{
cakeSB2 -= 1;
}
if (silk >= -1)
{
silk -= 1;
}
if (silkSB >= -1)
{
silkSB -= 1;
}
if (silk2 >= -1)
{
silk2 -= 1;
}
if (silkSB2 >= -1)
{
silkSB2 -= 1;
}
if (fur >= -1)
{
fur -= 1;
}
if (furSB >= -1)
{
furSB -= 1;
}
if (spice >= -1)
{
spice -= 1;
}
if (spiceSB >= -1)
{
spiceSB -= 1;
}
if (silver >= -1)
{
silver -= 1;
}
if (silverSB >= -1)
{
silverSB -= 1;
}
if (gem >= -1)
{
gem -= 1;
}
if (gemSB >= -1)
{
gemSB -= 1;
}
if(cake == 0)
{
cake();
}
if(cakeSB == 0)
{
deleteObj(2667,3310);
Object(2667,3310,2561,-1,10);
}
if(cake2 == 0)
{
cake2();
}
if(cakeSB2 == 0)
{
deleteObj(2655,3311);
Object(2655,3311,2561,-1,10);
}
if(silk == 0)
{
silk();
}
if(silkSB == 0)
{
deleteObj(2662,3314);
Object(2662,3314,2560,-2,10);
}
if(silk2 == 0)
{
silk2();
}
if(silkSB2 == 0)
{
deleteObj(2656,3302);
Object(2656,3302,2560,-3,10);
}
if(fur == 0)
{
fur();
}
if(furSB == 0)
{
deleteObj(2663,3296);
Object(2663,3296,2563,0,10);
}
if(spice == 0)
{
spice();
}
if(spiceSB == 0)
{
deleteObj(2658,3297);
Object(2658,3297,2564,0,10);
}
if(silver == 0)
{
silver();
}
if(silverSB == 0)
{
deleteObj(2657,3314);
Object(2657,3314,2565,-2,10);
}
if(gem == 0)
{
gem();
}
if(gemSB == 0)
{
deleteObj(2667,3303);
Object(2667,3303,2562,-1,10);
}
/* End */
All done, Post errors, rep is appreciated