Well, I've been working hard on a lot of cool things for my private server, and i decided i would release a few pieces of code to help you make your own - NO i am NOT releasing my entire code people can leech it.
Skill Cape Emotes-
Code:
public void blahblah() {
if (playerEquipment[playerCape] == ####) { //This also works for helms, bodies, etc.
stillgfx(###, absY, absX);
stillgfx(###, absY, absX);//Throw in GFX IDs
stillgfx(###, absY, absX -1);
stillgfx(###, absY, absX +1);
stillgfx(###, absY -1, absX);
stillgfx(###, absY +1, absX);
stillgfx(###, absY +1, absX +1);
stillgfx(###, absY -1, absX -1);
stillgfx(###, absY +1, absX -1);
stillgfx(###, absY -1, absX +1);
} }
Now the above void will make some button do that.
Go under case 185 (Clicking most buttons) and make one of your buttons use the above void. Like this:
Code:
Case #####:
blahblah(); //the void
sendMessage("dfsfsga"); //if you want it to say a message when you click the button.
break;
And if your worried about people massing the emote, throw in
Code:
if(actionTimer == 0) {
stuff
}
____
My Construction-
Code:
case #####: //Make OBJECT NAME
if(inConArea()) {
if(playerLevel[24] >= ##) { //the level you need to build it
if(actionTimer == 0) { //prevent mass building
actionTimer = 15; //prevent mass building
sM("You Magically Construct A @@@@!");
addSkillXP((##*playerLevel[24]), 24); /*## = how much xp multiplied by the con lvl you get for building it */
makeGlobalObject(absX,absY,####,*,10);//#### = Object ID, * = Position
startAnimation(898); //Building Emote
} else if(!inConArea()) { //You can only construct in a con area
sM("You need to be at the con site... Type ::con");
} else if(playerLevel[24] < ##) {
sM("You need ## Construction to Build a @@@@."); }
}
}
break;
Make a con zone -
Code:
public boolean inConArea() {
if((absX >=#### && absY >=#### && absX <=#### && absY <=#### ))
return true;
else
return false;
}
Add construction as a skill everywhere you need to, like
Code:
if (Con < getLevelForXP(playerXP[24])) {
playerLevel[24] = getLevelForXP(playerXP[24]);
levelup(24);
updateRequired = true;
appearanceUpdateRequired = true;
}
and
Code:
int Con = getLevelForXP(playerXP[24]);
etc.
Little bonus if you have a Construction skill cape, it'll take 99 construction to wear it if you do this -
Under
Code:
int CLAttack = GetCLAttack(wearID);
add
Code:
int CLConstruction = GetCLConstruction(wearID);
/*-- Construction --*/
if (CLAttack > getLevelForXP(playerXP[24])) {
sendMessage("You need "+CLConstruction+" "+statName[playerAttack]+" to equip this item.");
GoFalse = true;
}
then add
Code:
public int GetCLConstruction(int ItemID) {
if(ItemID == ####){ //Construction Cape ID here
return 99;
}
return 1;
}
I May release some more things in a bit.
Enjoy.