PDA

View Full Version : [317] Add a usefull questtab. ~Works 100% & Easy~



gilles
June 23rd, 2010, 00:03
What are you making? A questtab with Account information, picture at the end.
Difficulty 1/10
What to do Copy and Paste
What files textHandler.java
Credits 100% me.
Base used Delta


Ok, let's start. Open textHandler.java in the source side.
You will see something like this:


public class textHandler {
public void startText(int ID) {
client c = (client) server.playerHandler.players[ID];

Delete everything under this untill this:


c.sendQuest("", 7348);

Now you have something like this at the top of the textHandler:


public class textHandler {
public void startText(int ID) {
client c = (client) server.playerHandler.players[ID];

c.sendQuest("Please enter your PIN using the buttons below.", 14920);
c.sendQuest("First click the FIRST digit", 15313);
c.sendQuest("1", 14883);
c.sendQuest("2", 14884);
c.sendQuest("3", 14885);
c.sendQuest("4", 14886);
c.sendQuest("5", 14887);
c.sendQuest("6", 14888);
c.sendQuest("7", 14889);
c.sendQuest("8", 14890);
c.sendQuest("9", 14891);
c.sendQuest("0", 14892);
c.sendQuest("I don't know it.", 14921);
c.sendQuest("Exit", 14922);
c.sendQuest("", 15075);
c.sendQuest("", 15076);
c.sendQuest("", 15176);
c.sendQuest("", 15171);
c.sendQuest("", 15079);
c.sendQuest("", 15080);
if(c.bankPin != -1){
c.sendQuest("@gre@Set", 15105);
}
if(c.bankPin == -1){
c.sendQuest("@red@NONE", 15105);
}

Now add this:


c.sendQuest("SERVERNAME Highscores", 6399);
c.sendQuest(" SERVERNAME", 640);
c.sendQuest(" Info about "+c.playerName+"", 663);
c.sendQuest("@or1@Players online: @gre@"+PlayerHandler.getPlayerCount()+" ", 7332);
c.sendQuest("@or1@Uptime: @gre@"+ (server.uptime / 2 / 60) +" Mins", 7333);
c.sendQuest("@or1@Combat: @gre@"+c.combatLevel+"", 7334);
if(c.donator == 0){
c.sendQuest("@or1@Donator: @red@No", 7336);
}
if(c.donator == 1){
c.sendQuest("@or1@Donator: @gre@Yes", 7336);
}
c.sendQuest("@or1@Name: @gre@"+c.playerName+" ", 7383);
c.sendQuest("@or1@PkPoints: @gre@"+c.pkPoints+" ", 7339);
if(c.playerRights == 1){
c.sendQuest("@or1@Rank: @gre@Moderator", 7338);
}
if(c.playerRights == 2){
c.sendQuest("@or1@Rank: @gre@Administrator", 7338);
}
if(c.playerRights == 3){
c.sendQuest("@or1@Rank: @gre@Owner", 7338);
}
if(c.playerRights == 4){
c.sendQuest("@or1@Rank: @gre@Hidden Owner", 7338);
}
if(c.playerRights == 0){
c.sendQuest("@or1@Rank: @gre@Normal Player", 7338);
}
if(c.playerName.equalsIgnoreCase("PLAYERNAME")){
c.sendQuest("@or1@Rank: @gre@Owner", 7338);
}
c.sendQuest("@or1@Pest Control: @gre@"+c.pcPoints+"", 7340);
c.sendQuest("@or1@Assaults: @gre@"+c.assaultKills+"", 7346);
c.sendQuest("@or1@---------------------", 7341);
c.sendQuest("", 15239);
c.sendQuest("", 15241);
c.sendQuest("", 15240);
c.sendQuest("", 15242);
c.sendQuest("", 15243);
c.sendQuest("", 7342);
c.sendQuest("", 7337);
c.sendQuest("", 7343);
c.sendQuest("", 7335);
c.sendQuest("", 7344);
c.sendQuest("", 7345);
c.sendQuest("", 7347);
c.sendQuest("", 7348);

Under this:


public class textHandler {
public void startText(int ID) {
client c = (client) server.playerHandler.players[ID];

Note: Change the red SERVERNAME to you servername and the PLAYERNAME to the owner's ingame name.

Picture
You will get something like this:

Only the registered members can see the link.

Explain


c.sendQuest("@or1@Players online: @gre@"+PlayerHandler.getPlayerCount()+" ", 7332)
Playercount


c.sendQuest("@or1@Uptime: @gre@"+ (server.uptime / 2 / 60) +" Mins", 7333);
Uptime


c.sendQuest("@or1@Combat: @gre@"+c.combatLevel+"", 7334);

Player combat level


if(c.donator == 0){
c.sendQuest("@or1@Donator: @red@No", 7336);
}
if(c.donator == 1){
c.sendQuest("@or1@Donator: @gre@Yes", 7336);
}

When a player is a donator (c.donator == 1) you will see this:
Donator: Yes

When a player is a normal player, so no donator (c.donator == 0) you will see:
Donator: No


c.sendQuest("@or1@Name: @gre@"+c.playerName+" ", 7383);

Player his name.


c.sendQuest("@or1@PkPoints: @gre@"+c.pkPoints+" ", 7339);

Player's PKPoints.


if(c.playerRights == 1){
c.sendQuest("@or1@Rank: @gre@Moderator", 7338);
}
if(c.playerRights == 2){
c.sendQuest("@or1@Rank: @gre@Administrator", 7338);
}
if(c.playerRights == 3){
c.sendQuest("@or1@Rank: @gre@Owner", 7338);
}
if(c.playerRights == 4){
c.sendQuest("@or1@Rank: @gre@Hidden Owner", 7338);
}
if(c.playerRights == 0){
c.sendQuest("@or1@Rank: @gre@Normal Player", 7338);
}
if(c.playerName.equalsIgnoreCase("PLAYERNAME")){
c.sendQuest("@or1@Rank: @gre@Owner", 7338);
}

If a player is just a normal player (c.playerRights == 0) you will see this:
Rank: Normal Player

If a player is a Moderator (c.playerRights == 1) you will see this:
Rank: Moderator

If a player is a Administrator (c.playerRights == 2) you will see this:
Rank: Administrator

If a player is a Co-owner (c.playerRights == 3) you will see this:
Rank: Co-owner

If a player is a Hidden owner (c.playerRights == 4) you will see this:
Rank: Hidden Owner

If a player his name is the name you typed in (c.playerName.equalsIgnoreCase("PLAYERNAME") you will see this:
Rank: Owner


c.sendQuest("@or1@Pest Control: @gre@"+c.pcPoints+"", 7340);

This will show your Pest Control point.


c.sendQuest("@or1@Assaults: @gre@"+c.assaultKills+"", 7346);

This will show your Assault kills.


c.sendQuest("@or1@---------------------", 7341);

This is the line, you can add quests under it.


c.sendQuest("", 15239);
c.sendQuest("", 15241);
c.sendQuest("", 15240);
c.sendQuest("", 15242);
c.sendQuest("", 15243);
c.sendQuest("", 7342);
c.sendQuest("", 7337);
c.sendQuest("", 7343);
c.sendQuest("", 7335);
c.sendQuest("", 7344);
c.sendQuest("", 7345);
c.sendQuest("", 7347);
c.sendQuest("", 7348);

Empty field, you can add quests here.

Questions


For Me It Wont Work For Uptime I Get A Error When i Compile If I Take It out It Works Can You Help ME With That.

You can replace it with something else, like:

"@or1@Donator Points: @gre@"+playerdonorPoints+""

This is for donator points in my server, I don't think every server has this, you can replace with something else too.

Hope this helped!
~Gilles~

Vitality-Scape
June 23rd, 2010, 01:02
Nice ill try it

Charlie`
June 23rd, 2010, 01:04
Really GOOD! Thanks It Helped ME Lots.

Jared
June 23rd, 2010, 05:57
For Me It Wont Work For Uptime I Get A Error When i Compile If I Take It out It Works Can You Help ME With That.

Aaron
June 23rd, 2010, 06:13
Nice guide, Very helpful:D

gilles
June 23rd, 2010, 06:34
For Me It Wont Work For Uptime I Get A Error When i Compile If I Take It out It Works Can You Help ME With That.

You can replace it with something else, like:

"@or1@Donator Points: @gre@"+playerdonorPoints+""

This is for donator points in my server, I don't think every server has this, you can replace with something else too.

XxBryantD
June 23rd, 2010, 06:46
nice im use

Klomp3
June 23rd, 2010, 08:04
Good job, however its kinda a basic thing to 317.

Ryan
June 23rd, 2010, 13:35
"@or1@Donator Points: @gre@"+playerdonorPoints+""
=

"@or1@Donator Points: @gre@"+playerdonorPoints

And doing it this way, nothing will update, like when you login if the player count is 100, then 10 minutes latter its 125, itl still say 100.

gilles
June 23rd, 2010, 14:54
Deleted

Austin
June 25th, 2010, 01:34
Mind suppying the missing voids?

Mohammad
June 26th, 2010, 03:44
Damn can you make for Devolution that is pretty sick and awesome

gilles
June 26th, 2010, 04:26
Damn can you make for Devolution that is pretty sick and awesome

Hmmm... I can try, but I need someone with devolution then to help me. I only have Delta on my computer.

Dead 4 Real
June 26th, 2010, 05:00
Nice tutorial

Aaron
June 26th, 2010, 05:01
Thank you so much, I added to mine:D

xLightning
June 26th, 2010, 23:16
Very nice and clean. :)

TehCow
June 26th, 2010, 23:31
Good tut, didnt help me since I knew this.

Mohammad
June 28th, 2010, 13:45
If i got some working quests that i want to stay there can i add those withour removing the quests?

gilles
June 28th, 2010, 23:05
You can add them, under the rest of the text. Just change the clickmost.java then.

tlozoot
August 2nd, 2010, 22:47
100% Flawless! :D

Chi kitory
August 3rd, 2010, 01:51
Does this update it self?

gilles
August 4th, 2010, 01:52
Does this update it self?

I will make a newer version, because i have a updatable.

Billy
August 4th, 2010, 09:43
ew, no.. just no...-_- i just almost threw up where it said: Donator:Yes. Thats retarded..>.>

Runeultimate
August 6th, 2010, 21:43
Omfg thanks !!!!!

Joshua F
August 6th, 2010, 21:55
Very nice, but to shorter up this code a little bit make it..

if(c.donator == 0){
c.sendQuest("@or1@Donator: @red@No", 7336);
}
if(c.donator == 1){
c.sendQuest("@or1@Donator: @gre@Yes", 7336);
}


if(c.donator == 0){
c.sendQuest("@or1@Donator: @red@No", 7336);
}else{
c.sendQuest("@or1@Donator: @gre@Yes", 7336);
}

Fenway`
August 9th, 2010, 00:32
ill do something similar but inthe music tab to save my quest tab for actual quests :s

nice job

Skiller onmo
August 11th, 2010, 14:42
Thanks I was trying to do the same thing but it was starting to mess up on me.

HillyV2
August 12th, 2010, 01:47
Wow, In the end i managed to convert it into [PI] And it works GREAT! Thank you so much :)

Fatal
December 10th, 2010, 16:36
Thanks, but when I delete some things and I compile and I restart again it still shows me what I had before.
For example. I added player name: ... That works. When I delete it and I update it still shows it.
Help?

KushScape2011
February 5th, 2011, 10:06
Thanks alot, really helped. BUT Server.uptime doesnt work for me.. You know any fixs? i could post what error its giving me in the compiler if you like.

overture
February 20th, 2011, 18:02
Half of this stuff was already in a DeltaSource lol I think it was AcrylixScape or something

Gillez
April 13th, 2011, 13:40
I think AcrylixScape used this from me, because this was writen before that one was released.

scrub and yonas
April 16th, 2011, 01:37
I got an error...Can anyone help me with it?

specced v2
July 23rd, 2011, 12:34
Worked TYSM u Shmexy BEAST