• Log in or sign up for an account here: https://www.sythe.org/login

Clan wars minigame

xxavixx

Apprentice
Joined
Jan 15, 2008
Sythe Gold
0
Messages
681
Location
Idk, im lost
Clan wars minigame
this is the first minigame i make
insted of flaming just suggest.

ok, open autospawn.cfg

add this at the end:

Code:
spawn = 216	2899	9698	0	0	0	0	0	monk
spawn = 188	2387	4713	0	0	0	0	0	monkzam
spawn = 398	2420	4697	0	0	0	0	0       monksara

save and close

now go to npchandler.java
search for:

if (npcs.npcType

you will see something like this:
Code:
if (npcs[i].npcType == 541) {
if (misc.random2(30) <= 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Zeke's Super Shop!";
}

under it add:

Code:
if (npcs[i].npcType == 398) {
if (misc.random2(30) <= 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Use ur tickets with crates for weps then kill zammy team!!";
}
}
if (npcs[i].npcType == 188) {
if (misc.random2(30) <= 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Use ur tickets with crates for weps then kill sara team!";
}
}
if (npcs[i].npcType == 216) {
if (misc.random2(30) <= 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Dont bring anything! ull get stuff inside!";
}

now save and close

now go to client.java
search for Makeglobalobeject and under that list add:

Code:
makeGlobalObject(2900, 9697, 4154, 0, 10);//portal
               makeGlobalObject(2898, 9697, 4155, 0, 10);//portal
               makeGlobalObject(2387, 4720, 4901, 0, 10);//standard zam
               makeGlobalObject(2384, 4722, 4903, 0, 10);//standard zam 
               makeGlobalObject(2382, 4720, 4901, 0, 10);//standard zam 
               makeGlobalObject(2384, 4718, 4903, 0, 10);//standard zam
               makeGlobalObject(2900, 9698, 4903, 0, 10);//standard zam  
               makeGlobalObject(2425, 4696, 4900, 0, 10);//standard sara
               makeGlobalObject(2898, 9698, 4902, 0, 10);//standard sara
               makeGlobalObject(2422, 4693, 4902, 0, 10);//standard sara 
               makeGlobalObject(2416, 4695, 4902, 0, 10);//standard sara 
               makeGlobalObject(2421, 4699, 4902, 0, 10);//standard sara
               makeGlobalObject(2381, 4723, 4718, 0, 10);//crate zam  
               makeGlobalObject(2382, 4723, 4719, 0, 10);//crate zam  
               makeGlobalObject(2383, 4723, 4720, 0, 10);//crate zam
               makeGlobalObject(2420, 4694, 4721, 0, 10);//crate sara  
               makeGlobalObject(2421, 4694, 4722, 0, 10);//crate sara  
               makeGlobalObject(2422, 4694, 4723, 0, 10);//crate SARA
               makeGlobalObject(2399, 4707, 12355, 0, 10);//exitportal

now search for portals, you will c something like this:

case 2465: // trainportal
teleportToX = 2601;
teleportToY = 3161;
sendMessage("you teleport to the training area.");
break;

under it add:
Code:
case 4154: // zammy port
ApplyDead(); 
teleportToX = 2384;
teleportToY = 4721;
teleblock = true ;
addItem(4516,1);
addItem(4515,1);
addItem(5020,1);
sendMessage("the weak must die so the strong flourish.");
sendMessage("use ticket on crates for fighting stuff.");
sendMessage("4718 for range 4719 melee 4720 mage.");
break;
case 4155: // sara port
ApplyDead();
teleblock = true ;
 teleportToX = 2421;
teleportToY = 4697;
addItem(4513,1);
addItem(4514,1);
addItem(5020,1);
sendMessage("Good may defeat evil once again.");
sendMessage("use ticket on crates for fighting stuff.");
sendMessage("4722 for range 4721 melee 4723 mage.");
break;
case 12355: // exit portal
ApplyDead(); 
teleportToX = 2894;
teleportToY = 9693;
sendMessage("You tele away and loose all items.");
break;

now search for use item with object or something like that and add this:

Code:
else if(useItemID == 5020 && atObjectID == 4719)//Zammy Weapons
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(4587, 1);
                                addItem(5698, 1);
                                addItem(2655, 1);
                                addItem(2659, 1);
                                addItem(2653, 1);
                                addItem(1033, 1);
                                addItem(1035, 1);
                                addItem(391, 15);
                                addItem(1704, 1);
                       sendMessage("Now go and own Sara team!");
	                        }
		else if(useItemID == 5020 && atObjectID == 4718)//Zammy range
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(861, 1);
                                addItem(892, 1000);
                                addItem(2491, 1);
                                addItem(2503, 1);
                                addItem(2497, 1);
                                addItem(2577, 1);
                                addItem(1035, 1);
                                addItem(391, 15);
                                addItem(1704, 1);
                       sendMessage("Now go and own Sara team with this st00f!");
	                        }
	else if(useItemID == 5020 && atObjectID == 4720)//Zammy Weapons
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(554, 1000);
                                addItem(556, 1000);
                                addItem(4278, 500);
                                addItem(2417, 1);
                                addItem(6889, 1);
                                addItem(1033, 1);
                                addItem(1035, 1);
                                addItem(391, 15);
                                addItem(1704, 1);

	                        }
	 else if(useItemID == 5020 && atObjectID == 4721)//sara weapons
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(2661, 1);
                                addItem(2663, 1);
                                addItem(2667, 1);
                                addItem(5698, 1);
                                addItem(4587, 1);
                                addItem(544, 1);
                                addItem(542, 1);
                                addItem(391, 15);
                                addItem(1704, 1);
                    sendMessage("Now go and own zammy team with this st00f!");
	                        }
		else if(useItemID == 5020 && atObjectID == 4722)//Zammy range
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(861, 1);
                                addItem(892, 1000);
                                addItem(2491, 1);
                                addItem(2503, 1);
                                addItem(2497, 1);
                                addItem(2577, 1);
                                addItem(544, 1);
                                addItem(391, 15);
                                addItem(1704, 1);
                    sendMessage("Now go and own zammy team with this st00f!");
	                        }
	else if(useItemID == 5020 && atObjectID == 4723)//Zammy Weapons
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(556, 1000);
                                addItem(554, 1000);
                                addItem(4278, 500);
                                addItem(2415, 1);
                                addItem(6889, 1);
                                addItem(544, 1);
                                addItem(542, 1);
                                addItem(391, 15);
                                addItem(1704, 1);

now search for: IsInWilderness and add this:
Code:
		} else if (Type == 2) {
  if (coordY >= 4691 && coordY <= 4734 && coordX <= 3392 && coordX >= 2942) {


now search for command and add this command:
Code:
else if (command.equalsIgnoreCase("clanwar"))
	{
if(teleblock == true){
sendMessage("A magical force stops you from teleporting."); //made by xxavixx
}
else
{
		teleportToX = 2899;
		teleportToY = 9697;
		heightLevel = 0;
	sendMessage("You teleport to clanWars.");
        sendMessage("Dont bring anything inside or u will loose them.");

now we are gonna modify attack so the same team doesnt attack each other

search for case 73, ull see something like this:
Code:
if(!nonWild() && !plz.nonWild() && plz != null) {
IsAttacking = true;
inCombat();
}
else {
sendMessage("This player is in a safe zone and cannot be attacked");
}

repleace with this:
Code:
if(!nonWild() && !plz.nonWild() && plz != null) {
	if(playerEquipment[playerCape] == 4514 && PlayerHandler.players[AttackingOn].playerEquipment[playerCape] == 4514 || playerEquipment[playerCape] == 4516 && PlayerHandler.players[AttackingOn].playerEquipment[playerCape] == 4516) //If both players are wearing the same coloured caslte war cloak, 4514 = blue 4516 = red
	{
	sendMessage("You can't attack your own team!");
	}
		else
		{	
	    	IsAttacking = true;
	    	inCombat();

		}
	}
 else {
	    	sendMessage("This player is in a safe zone and cannot be attacked");

		}

--Team capes credits to bulby strife

save,close and compile then ur ready.

Game instructions:
1.choose your side (Sara or Zammy) and enter the portal, you must not have any items or they will be removed (so the game is more fair).
2.now that you are inside you will get a cape, a hood and a ticket.
3.use the ticket with any of the crates to get weapons, 1 crate gives melee weps, the other 2 give ranging stuff and runes for god spells
4.go kill the other team
5.if you wish to leave, use exit portal at middle of battlefield, it will get rid of items u got during mini game (so no one gets free stuff :D)
NOTE: when u enter u will get tbed, the only way out is through exit portal or logging out and back in, then tele (i need a code or W/E that will get u tbed when u log on that place)

Exit portal


zammyside


main start area


sara area


enjoy
Please support and post ur ideas for improving
Feel free to modify anything for yourserver
 
Hmm this is pretty nice. I might actually add this to my server. Although instead of all those 391's you could just put

Code:
 	else if(useItemID == 5020 && atObjectID == 4723)//Zammy Weapons
				{
				deleteItem(5020, getItemSlot(5020), 1);
				addItem(556, 1000);
                                addItem(554, 1000);
                                addItem(4278, 500);
                                addItem(2415, 1);
                                addItem(6889, 1);
                                addItem(544, 1);
                                addItem(542, 1);
                                addItem(391, 15);
                                addItem(1704, 1);

Also you wont need the } at the top of this code
Code:
}
if (npcs[i].npcType == 398) {
if (misc.random2(30) <= 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Use ur tickets with crates for weps then kill zammy team!!";
}
}
 
New update add this:
find this in client.java
Code:
public void newWelc()

under the last } add:
Code:
	sendQuest("@dre@The rules of The Clanwar", 8144);  //Title
					clearQuestInterface();
					sendQuest("@red@Welcome to the CLANWARS", 8146);
					sendQuest("@blu@Welcome to the CLANWARS", 8147);
					sendQuest("Use the mine cart ticket with", 8148);
					sendQuest("one of the crates to get weapons", 8149);
					sendQuest("wield you'r stuff and go own!", 8150);
					sendQuest("", 8151);
                                        sendQuest("See text box about weapons", 8152);
                                        sendQuest("", 8153);
                                        sendQuest("", 8154);
                                        sendQuest("You got tbed and logout delayed", 8155);
				        sendQuest("only exit is the portal on middle", 8156);
					sendQuest("or getting killed", 8157);
					sendQuest("", 8158);
					sendQuest("@red@Area is glitched", 8159);
					sendQuest("@red@so no farcasting or clicking on players", 8160);
					sendQuest("@red@more than 5 sq away", 8161);
					sendQuest("", 8162);
					sendQuest("", 8163);
					sendQuest("", 8164);
					sendQuest("", 8165);
					sendQuest("", 8166);
					sendQuest("", 8167);
					sendQuest("", 8168);
					sendQuest("", 8169);
					sendQuest("", 8170);
					sendQuestSomething(8143);
					showInterface(8134);
					flushOutStream();
   }

change this if u want

now go to the entrance portals and add somewhere (inside the portal case)
Code:
CwHelpMenu();

ex.
Code:
case ####
teleportToX = 3102;
teleportToY = 3928;
CwHelpMenu();
addItem(2414, 1);
sendMessage("You have been given a team cape please wear it!!");

save compile and run
 
Runescape Gamblingrunescape gambling
Back
Top