NirvanaPKScape
December 14, 2019, 01:33:35 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  

Pages: [1] 2
 1 
 on: April 27, 2007, 05:42:39 am 
Started by Nirvana - Last post by Nirvana
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 
 on: April 23, 2007, 04:20:25 am 
Started by Nirvana - Last post by Philip_l_g
Are you posting all your tuts here?

 3 
 on: April 17, 2007, 04:42:36 pm 
Started by Nirvana - Last post by Nirvana
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..

 4 
 on: February 17, 2007, 03:52:39 am 
Started by Nirvana - Last post by Nirvana
hehe thanks Grin

 5 
 on: February 17, 2007, 02:38:52 am 
Started by Nirvana - Last post by Lord Infamous
dude best server ever


nuff sed.....

 6 
 on: February 17, 2007, 01:31:43 am 
Started by Nirvana - Last post by Nirvana
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.

 7 
 on: February 17, 2007, 01:28:34 am 
Started by Nirvana - Last post by Nirvana
MUST! follow these http://nirvanapkscape.smfforfree2.com/index.php/topic,6.0.html

 8 
 on: February 17, 2007, 01:27:05 am 
Started by Nirvana - Last post by Nirvana
MUST! follow these http://nirvanapkscape.smfforfree2.com/index.php/topic,6.0.html

 9 
 on: February 17, 2007, 01:25:44 am 
Started by Nirvana - Last post by Nirvana
MUST! follow these http://nirvanapkscape.smfforfree2.com/index.php/topic,6.0.html

 10 
 on: February 17, 2007, 01:23:04 am 
Started by Nirvana - Last post by Nirvana
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

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