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

codeing for free and helping

Status
Not open for further replies.
yo dude i have my own server....im ok at coding but, i can't figure out how to add objects into my server. if you help and it works ill vouch for you.

(i have a globalobjects thing in my server ...not quite sure how to use it)
 
what exacly do u need how to add or how to make items and exp comne from objects. //------ClsdID---XCoord--YCoord--CDir----OpenID--OpenX---OpenY---ODir
ObID = 1530 3260 3400 0 1531 3259 3400 -1
ObID = 1530 3268 3382 0 1531 3267 3382 -1
ObID = 1530 3284 3396 0 1531 3283 3396 -1
ObID = 1530 3243 3450 0 1531 3242 3450 -1
ObID = 1530 3218 3386 0 1531 3217 3386 -1
ObID = 1530 3240 3449 0 1531 3239 3449 -1
ObID = 1530 3243 3473 0 1531 3242 3473 -1
ObID = 1530 3243 3500 0 1531 3242 3500 -1
ObID = 1530 3277 3421 0 1531 3276 3421 -1
ObID = 1530 3256 3388 0 1531 3255 3388 -1
ObID = 1530 3248 3396 0 1531 3247 3396 -1
ObID = 1530 3246 3385 -1 1531 3246 3386 -2
ObID = 1530 3235 3386 -1 1531 3235 3387 -2
ObID = 1530 3231 3386 -1 1531 3231 3387 -2
ObID = 1530 3253 3398 -1 1531 3253 3399 -2
ObID = 1530 3253 3430 -1 1531 3253 3431 -2
ObID = 1530 3234 3426 -2 1531 3235 3426 -3
ObID = 1530 3241 3382 -2 1531 3242 3382 -3
ObID = 1530 3224 3386 -2 1531 3225 3386 -3
ObID = 1530 3232 3438 -2 1531 3233 3438 -3
ObID = 1530 3248 3435 -2 1531 3249 3435 -3
ObID = 1530 3274 3389 -2 1531 3275 3389 -3
ObID = 1530 3274 3382 -2 1531 3275 3382 -3
ObID = 1530 3244 3396 -3 1531 3244 3395 0
ObID = 1530 3239 3392 -3 1531 3239 3391 0
ObID = 1530 3205 3378 -3 1531 3205 3377 0
ObID = 1530 3273 3380 -3 1531 3273 3379 0
ObID = 1530 3268 3388 -3 1531 3268 3387 0
ObID = 1531 3233 3427 0 1530 3233 3428 -3
ObID = 1531 3231 3433 -2 1530 3231 3432 -1
ObID = 1531 3277 3397 -2 1530 3278 3397 -3
ObID = 1531 3277 3404 -2 1530 3278 3404 -3
ObID = 1528 3259 3391 -3 1529 3259 3391 -3
ObID = 2550 2674 3305 -1 2551 2674 3306 -2
here
//------StallID-StallX--StallY--SDir----Lvl-----Exp-----Stat----ItemA---SType
Stall = 2562 2667 3303 -40 75 345 17 1 1 //Gem
Stall = 2561 2667 3310 -40 1 45 17 1 2 //Baker
Stall = 2561 2655 3311 -40 1 45 17 1 2 //Baker
Stall = 2560 2662 3314 -40 15 75 17 1 3 //Silk
Stall = 2560 2656 3302 -40 15 75 17 1 3 //Silk
Stall = 2563 2663 3296 -40 30 125 17 1 4 //Fur
Stall = 2565 2657 3314 -40 45 170 17 1 5 //Silver
Stall = 2564 2658 3297 -40 60 250 17 1 6 //Spice
[ENDOFOPENLIST] if its somethin like dis u need to copy ObID = 2550 2674 3305 -1 2551 2674 3306 -2 add another one were is say here and then just edit to wat u need
 
adding new stuff like this import java.io.*; //JAVA IMPORT
import java.util.StringTokenizer; //JAVA IMPORT
import java.util.Calendar; //JAVA IMPORT
import java.util.GregorianCalendar; //JAVA IMPORT
import java.net.InetAddress; //JAVA IMPORT
import java.net.URL; //JAVA IMPORT
import java.awt.*; //JAVA IMPORT
import java.awt.event.*; //JAVA IMPORT
import java.net.*; //JAVA IMPORT


public class CastleWars {

public static int CastleWarsTimer = 1320; //Timer for the actual CastleWars game (10 Minutes)
public static int StartTimer = 500; //Timer that initates the CastleWarz Game
public static int SaraScore = 0; //Team Saradomin's Score
public static int ZammyScore = 0; //Team Zamorak's Score
public static boolean castleWarsOn = false; //Turns CastleWars On or Off
public static boolean castleinterface = false; //Turns the CW Interface ON/OFF
public static boolean ZammyFlagCapture = false; //Tells if the Zammy Flag has been captured
public static boolean SaraFlagCapture = false; //Tells if the Sara Flag has been captured
public static boolean catoperational = true; //Makes Catapult Operational
public static int doorhealth = 1000; //Makes the castles's doors have 100% health.
public static int maxPlayers = 50; //Max players allowed total in CW
public static int maxZammy = 0; //Max players on Zammy Team
public static int maxSara = 0; //Max players on Saradomin Team

public CastleWars() {
//misc.println("[CW] Castle Wars!");
}

public static boolean setUp() {
/* Skill Setup */
return true;
}

public boolean process () { //Happening every 500MS

StartTimer += 1; //Makes the Timer to start cw go up

if (StartTimer >= 600 && castleWarsOn == false) { //If castle wars is not on, and the start timer reaches 5 mins,
PlayerHandler.messageToAll = "A CastleWars game has begun! (CW NOT MADE YET)";
castleWarsOn = true;
StartTimer = 0;
castleinterface = false;
}


if (castleWarsOn == true && CastleWarsTimer >= 0) {
CastleWarsTimer -= 1;
}

if (castleWarsOn == true && CastleWarsTimer < 0) {
castleWarsEnd();
}

return true;
}



public static void castleLoop(int cwTimer) {

if(cwTimer == 0)
return;
}

public static void castleWarsEnd() { //Void to end CastleWars

CastleWarsTimer = 1320;
StartTimer = 0; //Timer that initates the CastleWarz Game (loops back to 0)
SaraScore = 0; //Team Saradomin's Score
ZammyScore = 0; //Team Zamorak's Score
castleinterface = true; //Turns the CW Interface ON/OFF
castleWarsOn = false; //Stop Castle Wars from Running.
SaraFlagCapture = false; //Makes Saradomin Flag Uncaptured
ZammyFlagCapture = false; //Makes Zamorak Flag Uncaptured
PlayerHandler.messageToAll = "A CastleWars game has just ended"; //Tell's everyone that the CastleWars game ended.
maxSara = 0;
maxZammy = 0;
}

} this is part of my c wars code thats wat i call codeing!
 
if u guys wantn my grand excahnge code here it is wit the tut title: how to make a grand exchange
difficutly: 2/10
files edited: client.java , autospawn.cfg, NPCHandler.java
tested on server: hustlascape and project czar
GUYS THIS IS NOT MINE IM JUST POSTING CAUSE I THOUGH IT WAS COOL AND FOR THOSE WHO DO NOT KNOW ABOUT RUNE-SERVER

1. ok first go to client.java and search for


CODE
} else if (useItemID == 601 && atObjectID == 4126) // reward

you should see something like this


CODE
} else if (useItemID == 601 && atObjectID == 4126) // reward
{
sendMessage(
"Well done, you have just finished your mini game, here's your reward :)");
addSkillXP((300000 * playerLevel[6]), 6);
deleteItem(601, getItemSlot(601), 1);
addItem(15336, 1);
teleportToX = 2845;
teleportToY = 4832;


Add these under that code



CODE
} else if (useItemID == 15334 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling bandos godsword at Ge!:)");
} else if (useItemID == 15350 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling bandos boots at Ge!:)");
} else if (useItemID == 15348 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling bandos chest at Ge!:)");
} else if (useItemID == 15349 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling bandos tasset at Ge!:)");
} else if (useItemID == 15348 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling sara gs at Ge!:)");
} else if (useItemID == 15335 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling zammy gs at Ge!:)");
} else if (useItemID == 15333 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling arm gs at Ge!:)");
} else if (useItemID == 15351 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling sara sword at Ge!:)");
} else if (useItemID == 9099 && atObjectID == 75) // Ge reward
{
PlayerHandler.messageToAll = (playerName
+ " is selling zammy cloak at Ge!:)");
{
Code:
those are some items i have added my self you will have to add some other items by yerself for it to work

ok now go into your make global objects and add these

  [code]makeGlobalObject(3251, 3421, 75, -3, 10); // Ge-chest


add these with your commands


CODE
} else if (command.equalsIgnoreCase("GE")) {
            if (teleblock == true) {
                sendMessage("A magical force stops you from teleporting."); // made by pk frenzy
            } else {
                teleportToX = 3253;
                teleportToY = 3421;
                heightLevel = 0;
                sendMessage("You teleport to ge sell stuff here");
                sendMessage("some items are not in the database more items will be added soon");
            }


and for the custom command


CODE
case 167:                 
                if (teleblock == true) { // Made by pk frenzy
                    sendMessage("A magical force stops you from teleporting."); 
                } else {
                    customCommand("GrandE"); // made by pk frenzy
                }
                break;


and this to youre autospawn.cfg


CODE
spawn = 793    3252    3423    0    0    0    0    0    1    ge banker


DO NOT TRADE OR TALK TO IT, IT WILL DC YOU EVERY TIME UNLESS YOU CAN FIX!!!

now.... add this to your npcs speaking to do this go into npchandler.java and search for moo you should see something like this or something similar


CODE
if (npcs[i].npcType == 409) {
                        if (misc.random2(30) <= 2) {
                            npcs[i].updateRequired = true;
                            npcs[i].textUpdateRequired = true;
                            npcs[i].textUpdate = "Type ::info to begin";
                        }
                    }


under that add this



CODE
if (npcs[i].npcType == 793) {
                        if (misc.random2(30) <= 2) {
                            npcs[i].updateRequired = true;
                            npcs[i].textUpdateRequired = true;
                            npcs[i].textUpdate = "Welcome to the grand Exchange Sell stuff here";
                        }
                    }
wii add more items to it soon!:!
 
Status
Not open for further replies.
duelarena.gg
Back
Top