CASTLE WAR ( SCRIPT ) Purpose: Create a castle wars with pk-compatibility
Difficulty: 3/10
Assumed Knowledge: Voids..Java..editing client
Server Base: Testscape
Classes Modified: Client.java
Credits: 85% MooMoo22 for the making on the Pvp thing, 15% me
Procedure
Step 1: Find "Wilderness Check" and under
Code:
if (IsInWilderness(absX, absY, 1) == true && IsInWilderness == false) {
outStream.createFrameVarSize(104);
outStream.writeByteC(3); // command slot (does it matter which one?)
outStream.writeByteA(1); // 0 or 1; 1 if command should be placed on top in context menu
outStream.writeString("FIGHT");
outStream.endFrameVarSize();
IsInWilderness = true;Add:
Code:
} else if (IsInPvp(absX, absY, 1) == true) {
outStream.createFrameVarSize(104);
outStream.writeByteC(3); // command slot (does it matter which one?)
outStream.writeByteA(1); // 0 or 1; 1 if command should be placed on top in context menu
outStream.writeString("FIGHT");
outStream.endFrameVarSize();
Step 2: Find "case 73: //Attack (Wilderness)" which should look like
Code:
case 73: //Attack (Wilderness)
/*AttackingOn = inStream.readSignedWordBigEndian();
Player pl = server.playerHandler.players;
if(pl == null) return;
CheckWildrange(pl.combat);
if(InWildrange == false)
{
sendMessage("You need to move deeper into the wilderness to attack this player");
}
In the
Code:
else if(InWildrange == truepart, replace it with:
Code:
else if(InWildrange == true || IsInPvp(EnemyX, EnemyY, 1) == true)
Step 3: Find "public boolean IsInWilderness(int coordX, int coordY, int Type) {" and under the boolean, add
Code:
public boolean IsInPvp(int coordX, int coordY, int Type) {
if (Type == 1) {
if (coordY >= 3069 && coordY <= 3137 && coordX <= 2435 && coordX >= 2366) {
return true;
}
}
Step 4: Find "if (GoodDistance(EnemyX, EnemyY, absX, absY, 1) == true" and then replace it with
Code:
if (GoodDistance(EnemyX, EnemyY, absX, absY, 1) == true || IsInPvp(EnemyX, EnemyY, 1) == true || playerEquipment == 859 || playerEquipment == 861 || playerEquipment == 4214) {And under that, at the
Code:
if (inwildy2 == truepart, replace it with
Code:
if (inwildy2 == true || IsInPvp(EnemyX, EnemyY, 1) == true) {
Step 5: Find "deleteArrows(playerEquipment, playerArrows, 1); " and replace the
Code:
if (IsInWilderness(EnemyX, EnemyY, 1) == truepart with
Code:
if (IsInWilderness(EnemyX, EnemyY, 1) == true || IsInPvp(EnemyX, EnemyY, 1) == true) {
Step 6: Find "sendMessage(" Move to the wild or make your Y coordinate higher than 3523 and x higher than 2954 to pk");" and replace the "else if" part underneath it with
Code:
else if (absY >= 3523 && castOnPlayer.absY >= 3523 && PkingDelay <= 1 || absY >= 3069 && absY <= 3137 && absX <= 2435 && absX >= 2366 && castOnPlayer.absY >= 3069 && castOnPlayer.absY <= 3137 && castOnPlayer.absX <= 2435 && castOnPlayer.absX >= 2366 && PkingDelay <= 1)And replace the
Code:
if (absY < 3523thing with
Code:
if (absY < 3523 && absX < 2100)
halson- 03-27-2007
CASTLE WAR SCORE BOARD ( SCRIPT ) CASTLE WAR SCORE BOARD
Purpose: To make the cw notice board when you click view open up a menu and other viewing things should work
Difficulty: 2
Assumed Knowledge: How to open client.java and search for stuff and add stuff
Classes Modified: client.java
Procedure
Step 1: The menu what will be loaded from viewing scoreboard or you can use another menu
Open up client.java and please search for
Code:
public void TheifHelpMenu()
you should find
Code:
public void TheifHelpMenu()
{
sendQuest("@dre@Theiving", 8144); //Title
clearQuestInterface();
sendQuest("@dbl@Theiving help guide", 8145);
sendQuest("@dbl@@dre@Silver stall@dbl@", 8147);
sendQuest("@dbl@@dre@Requirents: 85 theiving@dbl@", 8148);
sendQuest("@dbl@@dre@Located at: 2658,3312@dbl@", 8149);
sendQuest("@dbl@-------------@dbl@", 8150);
sendQuest("@dbl@@dre@Tea Stall@dbl@", 8151);
sendQuest("@dbl@@dre@Requirements: None@dbl@", 8152);
sendQuest("@dbl@@dre@Located at: 3269,3412@dbl@", 8153);
sendQuest("@dbl@-------------@dbl@", 8154);
sendQuest("@dbl@@dre@Secret crate@dbl@", 8155);
sendQuest("@dbl@@dre@Requirements: 99 theiving@dbl@", 8156);
sendQuest("@dbl@@dre@Located at: 2954,3303 @dbl@", 8157);
sendQuest("@dbl@-------------", 8160);
sendQuest("@dbl@@dre@Type ::castlewars for info on theiving stalls there@dbl@", 8161);
sendQuest("@dbl@@dre@-------------@dbl@", 8162);
sendQuest("@dbl@@dre@-------------@dbl@", 8163);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
Step 2: At the last
Code:
} hit enter and paste in
Code:
public void UpdateMenu()
{
sendQuest("@blu@Updates", 8144); //Title
clearQuestInterface();
sendQuest("@whi@Now enter Guthix portal to train def and get a shark!", 8145);
sendQuest("@whi@Enter Sara portal to train str and get a whip!@whi@", 8147);
sendQuest("@whi@Enter Zammy portal to train attack and get a dragon skimmy @whi@", 8148);
sendQuest("@whi@ future update @whi@", 8149);
sendQuest("@whi@ future update @whi@", 8150);
sendQuest("@whi@ future update @whi@", 8151);
sendQuest("@whi@ future update @whi@", 8152);
sendQuest("@whi@ future update @whi@", 8153);
sendQuest("@bla@ future update @bla@", 8154);
sendQuest("@bla@ future update @bla@", 8155);
sendQuest("@bla@ future update @bla@", 8156);
sendQuest("@bla@ future update @bla@", 8157);
sendQuest("@whi@ future update", 8158);
sendQuest("@whi@ future update @whi@", 8159);
sendQuest("@whi@ future update @whi@", 8160);
sendQuest("@whi@ future update@whi@", 8161);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}Then just make into one colum thing like the others for neetnece
And you can edit it in any way or form
Step 3: The command for menu to open
Search for
Code:
else if (command.equalsIgnoreCase("theifmenu"))
{
TheifHelpMenu();
}
Under the } hit enter and add
Code:
else if (command.equalsIgnoreCase("updates"))
{
UpdateMenu();
}
That is the menu command
Step 4: Making the scoreboard open
depending on what source you use search for
Code:
case 1292:
case 1306:
Woodcutting("magic", 1, 75, 1513, 1, objectID, objectX, objectY, 875);
break;if u cant find that search for
Code:
case 4484:it should be the hay training xp. under the break; at the end of one of them and hit enter and type in
Code:
case 4484:
UpdateMenu();
break;that is saying 4484 what is the id of the scoreboard will be opend and inside it will be the updatemenu what we made earlyer
blobboy- 03-28-2007
sweet will see if this works and get back to u
this code doesnt allow collecting the flag and scoring the points so its not what im looking for all it does it enable pking and that location
tom- 04-06-2007
i like castle warz
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.