NirvanaPKScape
December 14, 2019, 02:17:33 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Server Going to be back on soon and better than ever!!! Cheesy
 
  Home Help Search Staff List Login Register  

  Show Posts
Pages: [1]
1  RS2 Private Servers / Server Help/Tuturials / Re: TuT on: April 27, 2007, 05:42:39 am
Well.. im making a tut, which will hopefully be added to make ultimate server guide 3
havent been changing recently and these are my old forums
2  RS2 Private Servers / Server Help/Tuturials / TuT on: April 17, 2007, 04:42:36 pm
Basic Java Rules:

If you put “//” in a java file it will disregard the rest of the line from that point. e.g:
Code:
  actionTimer = 25;    //Timer to reset animation

Always in .cfg files you have to use tab! Not spacebar, it work work otherwise.

Stopping People From Mass Clicking:

People clicking others really fast in wildy makes them hit much fast than the actual wepon speed. It is a very common problem in alot of servers, but i will show you how to disable it

Firstly,
Open Client.java, Hit Ctrl + F, Then search for:
Code:
Public Boolean Process

Above it you should see this:
Code:
public int eX = 0;
public int eY = 0;
public int etimer = 0;


public boolean showingCity = false;
public int showCityTimer = 0;
public int cityX = 0;
public int cityY = 0;

public boolean drunk = false;
public int drunkTimer = 0;

public boolean newAnimRequired = false;
public int newAnimDelay = 0;
public int newAnim = 0;
public int kitstarter = 0;
public int blackmark = 0;
public int mageTimer = 0;
public int Reptimer = 0;

In there add this line
Code:
long lastProcess = System.currentTimeMillis();

So it looks something like this:
Code:
public int eX = 0;
public int eY = 0;
public int etimer = 0;


public boolean showingCity = false;
public int showCityTimer = 0;
public int cityX = 0;
public int cityY = 0;

public boolean drunk = false;
public int drunkTimer = 0;
long lastProcess = System.currentTimeMillis();

public boolean newAnimRequired = false;
public int newAnimDelay = 0;
public int newAnim = 0;
public int kitstarter = 0;
public int blackmark = 0;
public int mageTimer = 0;
public int Reptimer = 0;

Then Below
Code:
Public Boolean Process

Add this:
Code:
    long timeSpent = System.currentTimeMillis()-lastProcess; //stop rapid clicking to speed up timers - By nirvana
    if(timeSpent >= server.cycleTime) {
    timeSpent = server.cycleTime;
    lastProcess = System.currentTimeMillis(); // By Nirvana
}

So it looks like this:
Code:
  public boolean process() {    // is being called regularily every 500ms
    long timeSpent = System.currentTimeMillis()-lastProcess; //stop rapid clicking to speed up timers - By nirvana
    if(timeSpent >= server.cycleTime) {
    timeSpent = server.cycleTime;
    lastProcess = System.currentTimeMillis(); // By Nirvana
}

There no more anoying mass clickers in wildy!

Player Rights:

Player Rights is the amount of power a player has, normally used for Commands, Teles in the Emote tab, uses of items, and much, much more.

Player Rights = 0 // Normal Player
Player Rights = 1 // Moderator
Player Rights = 2 // Admin
Player Rights = 3+ // (co)Owner

To change Player Rights Open the Characters Folder > (TheUser).txt open and in there it should say Player Rights = 0 (default). Change to anything.

Commands:

To Make Commands you have to follow a simple piece of code, commands are one of the simplest things in server coding.

Search for
Code:
else if(command
Then after a command Under the last } of it add in a command

Heres some examples:

Code:
if (command.startsWith("COMMANDNAME") && playerRights >= PLAYERRIGHTS) {
     addItem(ITEMID, AMT);
}

you can add multiple items like this

Code:
if (command.startsWith("COMMANDNAME") && playerRights >= PLAYERRIGHTS) {
     addItem(ITEMID, AMT);
     addItem(ITEMID, AMT);
     addItem(ITEMID, AMT);
     addItem(ITEMID, AMT);
}

Then theres Tele Commands

Code:
else if (command.equalsIgnoreCase("COMMANDNAME") && playerRights >= PLAYERRIGHTS)
  {
    teleportToX = XCO;
    teleportToY = YCO;
}

Code:
else if (command.equalsIgnoreCase("COMMANDNAME") && playerRights >= PLAYERRIGHTS)
  {
    teleportToX = XCO;
    teleportToY = YCO;
    addItem(ITEMID, AMT); // You can mix then up.
  sendmessage("WANT TO SEND A MESSAGE TYPE IT HERE"); // <<< used for discriptions normally
  }

You can make commands to lots of things those are the most basic

You can just add the lines doesn’t matter how many times
and it doesn’t matter which sort it will operate all the commands it is set

so in game you type ::COMMANDNAME

Talking Npcs

To make an npc something something is quite simple. Open up NpcHandler.java, Hit Ctrl +f and type "moo" in the box and find next you should see this
Code:
if (misc.random2(50) == 1) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Moo";
}
}
Or something like it

To add a Npc Talking use this layout
Code:
if (npcs[i].npcType == NPCID) {
if (misc.random2(50) == 1) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "YOUR TEXT HERE";
}
}
And if you want it to say in someone in online use this
Code:
if (npcs[i].npcType == NPC ID) {
if (misc.random2(25) <= 3) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
if (PlayerHandler.isPlayerOn("PERSONSNAME")){
npcs[i].textUpdate = "Owner PERSONSNAME is Online";
}
else{
npcs[i].textUpdate = "Owner PERSONNAME is Offline";
}
}
}

To change what an npc is saying just use Ctrl + f in there and change the line of what they are saying rather simple..
3  General Category / General Forum / Re: General Chat (About Server) on: February 17, 2007, 03:52:39 am
hehe thanks Grin
4  RS2 Private Servers / Advertise You Own Servers Here / LAYOUT [MUST FOLLOW] on: February 17, 2007, 01:31:43 am
MUST FOLLOW OR YOUR TOPICc WILL BE DELETED!

Code:
[b]Server Name: [/b][i] Name of Your Server here[/i]

[b]Server IP: [/b][i] IP of Your Server here[/i]

[b]Server Port: [/b][i] Port of Your Server here[/i]

[b]Hamachi: [/b][i] Yes/No[/i] (If its yes add the Pass/Name)

[b]Online Status:[/b][i] Status of Your Server here[/i] (You can delete this)

[b]Server Features: [/b][i] Features of Your Server here[/i]

[b]Server Staff: [/b][i] Staff of Your Server here[/i]

[b]Server Pictures: [/b]
[i] Pictures of Your Server here[/i]

If these rules are not kept, you topic will be locked. If you complain, you will be warned/moderated/muted/banned. These rules WILL be kept.
5  RS2 Private Servers / Advertise You Own Servers Here / RULES on: February 17, 2007, 01:28:34 am
MUST! follow these http://nirvanapkscape.smfforfree2.com/index.php/topic,6.0.html
6  RS2 Private Servers / Server Help/Tuturials / RULES on: February 17, 2007, 01:27:05 am
MUST! follow these http://nirvanapkscape.smfforfree2.com/index.php/topic,6.0.html
7  RS2 Private Servers / Server Sources Link To Downloads of Your Servers / RULES on: February 17, 2007, 01:25:44 am
MUST! follow these http://nirvanapkscape.smfforfree2.com/index.php/topic,6.0.html
8  General Category / Rules / Re: Rule Suggestions on: February 17, 2007, 01:23:04 am
RULE SUGGESTION LAYOUT MUCH FOLLOW OR YOUR SUGGESTION WILL BE DISREGUARDED

Title Must be the Rule u want (eg. No Massing)

Format on the topic

The Rule: (your new rule)

The Reason: (why you think the rule should be added)

Other People that Agree with Rule Change: (list) (optional but more likely to change my mind if more than 1 person is unhappy)


And others feel free to reply with support
9  General Category / Rules / Rule Suggestions on: February 17, 2007, 01:19:17 am
For any New Rules make a new topic i will check the forum every now and then and make my disicision
10  General Category / Rules / InGame Rules on: February 17, 2007, 01:17:34 am
THE RULES1 no massing
2 no flaming
3 no abusing mods/admins/owner
4 no mass teleporting or training
5 HAVE FUN!!! Grin
11  General Category / Rules / Forum Rules on: February 17, 2007, 01:14:36 am
The Rules
1 No flaming
2 No discouraging use of NirvanaPKScape
3 No "BUMPING"
4 No spawmming
5 No abusing or continually anoying anyone on forums
6 No Keyloggers or viruses
7 Follow all rules of http://moparscape.org/smf/index.php
12  General Category / General Forum / Rant About Server on: February 17, 2007, 12:53:08 am
Complain About/Discuss Servers Faults

REMEMBER NO FLAMING OR TELLING PEOPLE NOT TO PLAY IT!

PS> if u got an idea put in the suggestions area
13  General Category / General Forum / General Chat (About Server) on: February 17, 2007, 12:41:14 am
Talk about the Server all you want Cheesy (no Flaming or Ranting)
14  NirvanaPKScape / Server Updates and Status / Redent Updates on: February 17, 2007, 12:37:49 am
UPDATES!

List of all updates

Changed title
Fixed med helms
Added dancing nights
Removed all swearing
Changed what shops say
Changed some shops

Updates comming soon:
Owner Spell
Some real runescape updates!!!

I'll be looking for tuts on moparscape forums

If you have any please post

~Nirvana~
15  NirvanaPKScape / Server Updates and Status / Server Status on: February 17, 2007, 12:34:58 am
THE SERVER IS OFFLINE Grin

Fixing error!!!
Pages: [1]
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum
Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy