Welcome Interface Fixup (#421)

Fixed last logged in from IP
Various other changes/fixes
This commit is contained in:
Josh Shippam
2020-11-09 19:34:36 +00:00
committed by GitHub
parent ebd55e6e8d
commit e3b98a53c0
4 changed files with 10 additions and 45 deletions
-41
View File
@@ -5180,18 +5180,6 @@ public class Game extends RSApplet {
class9.disabledText = "";
}
}
if (j == 660) {
int k1 = anInt1170 - anInt1215;
String s1;
if (k1 <= 0)
s1 = "earlier today";
else if (k1 == 1)
s1 = "yesterday";
else
s1 = k1 + " days ago";
class9.disabledText = "You last logged in @red@" + s1
+ "@bla@ from: @red@" + Signlink.dns;
}
if (j == 661)
if (anInt1034 == 0)
class9.disabledText = "\\nYou have not yet set any recovery questions.\\nIt is @lre@strongly@yel@ recommended that you do so.\\n\\nIf you don't you will be @lre@unable to recover your\\n@lre@password@yel@ if you forget it, or it is stolen.";
@@ -5212,41 +5200,12 @@ public class Game extends RSApplet {
+ method104(anInt1034)
+ "\\n\\nIf you do not remember making this request\\ncancel it immediately, and change your password.";
}
if (j == 662) {
String s;
if (anInt1273 == 0)
s = "@yel@0 unread messages";
else if (anInt1273 == 1)
s = "@gre@1 unread message";
else
s = "@gre@" + anInt1273 + " unread messages";
class9.disabledText = "You have " + s + "\\nin your message centre.";
}
if (j == 663)
if (anInt1083 <= 0 || anInt1083 > anInt1170 + 10)
class9.disabledText = "Last password change:\\n@gre@Never changed";
else
class9.disabledText = "Last password change:\\n@gre@"
+ method104(anInt1083);
if (j == 665)
if (anInt992 > 2 && !isMembers)
class9.disabledText = "This is a non-members\\nworld. To enjoy your\\nmembers benefits we\\nrecommend you play on a\\nmembers world instead.";
else if (anInt992 > 2)
class9.disabledText = "\\n\\nYou have @gre@" + anInt992
+ "@yel@ days of\\nmember credit remaining.";
else if (anInt992 > 0)
class9.disabledText = "You have @gre@"
+ anInt992
+ "@yel@ days of\\nmember credit remaining.\\n\\n@lre@Credit low! Renew now\\n@lre@to avoid losing members.";
else
class9.disabledText = "You are not a member.\\n\\nChoose to subscribe and\\nyou'll get loads of extra\\nbenefits and features.";
if (j == 667)
if (anInt992 > 2 && !isMembers)
class9.disabledText = "To switch to a members-only world:\\n1) Logout and return to the world selection page.\\n2) Choose one of the members world with a gold star next to it's name.\\n\\nIf you prefer you can continue to use this world,\\nbut members only features will be unavailable here.";
else if (anInt992 > 0)
class9.disabledText = "To extend or cancel a subscription:\\n1) Logout and return to the frontpage of this website.\\n2)Choose the relevant option from the 'membership' section.\\n\\nNote: If you are a credit card subscriber a top-up payment will\\nautomatically be taken when 3 days credit remain.\\n(unless you cancel your subscription, which can be done at any time.)";
else
class9.disabledText = "To start a subscripton:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Start a new subscription'";
if (j == 668) {
if (anInt1034 > anInt1170) {
class9.disabledText = "To cancel this request:\\n1) Logout and return to the frontpage of this website.\\n2) Choose 'Cancel recovery questions'.";
@@ -97,6 +97,7 @@ import com.rebotted.world.ObjectManager;
public abstract class Player {
public byte buffer[] = null;
public String lastConnectedFrom;
private Compost compost = new Compost(this);
private Allotments allotment = new Allotments(this);
private Flowers flower = new Flowers(this);
@@ -107,18 +107,18 @@ public class PlayerAssistant {
if (player.lastLoginDate <= 0) {
player.getPacketSender().sendString("This is your first time logging in!", 15258);
} else if (player.lastLoginDate == 1) {
player.getPacketSender().sendString("You last login @red@yesterday@bla@", 15258);
player.getPacketSender().sendString("You last logged in @red@yesterday @bla@ from: @red@" + player.lastConnectedFrom, 15258);
} else {
player.getPacketSender().sendString("You last login @red@" + (currentDay > 1 ? (currentDay + " @bla@days ago") : ("ealier today")) + " @bla@", 15258);
player.getPacketSender().sendString("You last logged in @red@" + (currentDay > 1 ? (currentDay + " @bla@days ago") : ("earlier today")) + " @bla@ from: @red@" + player.lastConnectedFrom, 15258);
}
player.getPacketSender().sendString("" +GameConstants.SERVER_NAME + " will NEVER email you.\\n We use the forums or we \\nWill contact you through game.", 15260);
player.getPacketSender().sendString("You have 0 unread messages\\nOn forums!", 15261);
player.getPacketSender().sendString("You have 0 unread messages\\nin your message centre.", 15261);
player.getPacketSender().sendString("You have @gre@unlimited@yel@ days of member credit.", 15262);
player.getPacketSender().sendString("CLICK HERE TO PLAY", 15263);
if (!player.hasBankpin) {
player.getPacketSender().sendString("You currently have no bank pin set!\\nWe strongly advise you to set\\n one.", 15270);
} else {
player.getPacketSender().sendString("\\nYou currently have a bank pin set.\\nBank pins are coming soon!.", 15270);
player.getPacketSender().sendString("\\nYou currently have a bank pin set.\\nYour bank is secure!.", 15270);
}
int random = Misc.random(3);
player.getPacketSender().sendString(welcomeMessages[random][0], 15803);
@@ -91,6 +91,9 @@ public class PlayerSave {
case "character-rights":
player.playerRights = Integer.parseInt(token2);
break;
case "last-ip":
player.lastConnectedFrom = token2;
break;
case "isBot":
player.isBot = Boolean.parseBoolean(token2);
break;
@@ -559,6 +562,8 @@ public class PlayerSave {
characterfile.newLine();
characterfile.write("character-rights = " + player.playerRights);
characterfile.newLine();
characterfile.write("last-ip = " + player.connectedFrom);
characterfile.newLine();
characterfile.write("isBot = " + player.isBot);
characterfile.newLine();
characterfile.write("hideYell = " + player.hideYell);