// TMW2 Scripts
// Evol functions.
// Author:
// 4144
// Jesusalva
// Description:
// Function checking the client version and reports if it is too old.
// This also handles all updates, and usually have priority.
function script checkclientversion {
// Skip any update for newcomers
if (getmap() ~= "000-0*") {
UPDATE=gettimetick(2);
}
// Update handler (use `date +%s` for this)
// Current UPDATE value: Qui Jun 7 08:10:55 -03 2018
if (Lang > 5 && UPDATE < 1528369855) {
UPDATE=1528369855;
Lang=0;
mesn "Jesus Saves";
mesc l("Oh, noes! Due lack of translators, some languages were removed from this project.");
mesc l("You might have been affected. Please, select your desired language.");
asklanguage(LANG_IN_SHIP);
}
// Report client version for debugging purposes
if (is_admin() && UPDATE < 1528369855) {
UPDATE=1528369855;
dispbottom l("Client Version: @@", ClientVersion); // This is to debug UPDATE system.
}
// New skills introduced
if (UPDATE < 1531786864) {
UPDATE=1531786864;
skill TMW2_FAKESKILL, 1, 0;
skill TMW2_FAKESKILL2, 1, 0;
}
// Update new quest exp, and make sure you have the extended basic skills with you
if (UPDATE < 1545228412) {
UPDATE=1545228412;
adddefaultskills;
if (getq(TulimsharQuests_Fishman) >= 2)
getexp 12, 0;
if (getq(MineQuest_Tycoon) >= 3)
getexp 250, 0;
if (getq(MineQuest_Tycoon) >= 6)
getexp 642, 0;
if (getq(MineQuest_Tycoon) >= 9)
getexp 100, 0;
if (getq(MineQuest_Tycoon) >= 12)
getexp 2435, 0;
if (getq(MineQuest_Tycoon) >= 15)
Zeny=Zeny+1000;
if (getq(TulimsharQuests_Sailors) >= 2)
getexp 200, 0;
if (getq(TulimsharQuests_Devoir) >= 1)
getexp 500, 0;
if (getq(TulimsharQuests_AnwarField) >= 11)
getexp 650, 0;
if (getq(TulimsharQuests_WoodenSword) >= 2)
getexp 1100, 0; // Off value on purpose
if (getq(MineQuest_Caelum) >= 2)
getexp 2000, 40;
if (getq(HalinarzoQuest_Foxhound) >= 6)
getexp 1500, 0;
if (getq(HalinarzoQuest_TraderKing) >= 2)
getexp 5000, 0;
if (getq(HurnscaldQuest_Bandits) >= 8)
getexp 1000, 0; //getexp 5000, 0;
dispbottom l("Your experience level has been updated.");
}
// Gallery Contest and 2019-12-29 no-drop incident
// ter jan 8 03:52:20 -02 2019
if (UPDATE < 1546926740) {
UPDATE=1546926740;
skill TMW2_FAKESKILL, 1, 0;
skill TMW2_FAKESKILL2, 1, 0;
}
// #ADD_LVL means the user have to right to get some levels. This is a sketch. The code might be deleted.
if (#ADD_LVL) {
mesn "Jesus Saves";
mesc l("Oh - Welcome to TMW2: Moubootaur Legends!"), 3;
next;
mesn "Jesus Saves";
mesc l("Please, fell at home. You can use ##B#world##b channel to speak to everyone on Discord, IRC and ingame."), 3;
next;
mesn "Jesus Saves";
mesc l("Our mission statement is to bring fun to all players. You'll get some levels automatically. We advise you to join a guild."), 3;
next;
mesn "Jesus Saves";
mesc l("If you have any trouble or doubt, don't hesit to call us. There are some cooperative quests, and more of them are being added."), 3;
next;
mesn "Jesus Saves";
mesc l("Anyway, ##Bwelcome##b, and have fun! If you need anything, we are a keypress from distance!"), 3;
//atcommand "@blvl "+#ADD_LVL;
getitem TimeFlask, 1;
#ADD_LVL=(#ADD_LVL*9)/10;
if ((readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp))) {
do {
.@v=readparam(NextBaseExp)-readparam(BaseExp);
getexp .@v, 0;
#ADD_LVL-=.@v;
} while (readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp));
}
getexp #ADD_LVL, 0;
#ADD_LVL=0;
// TODO: Use @super debug functions and force player to join a guild. We will need the guild ID, though.
rodex_sendmail(getcharid(0), "TMW2 Team", "Welcome to Moubootaur Legends", "Hey, thanks for believing on us! We hope to have a great time togheter. Any problem, ask for help in #world - the Discord bridge! Enjoy our game!", 20);
if (ClientVersion >= 24) close;
next;
mesn "Failsafe Mechanism";
mesc l("Ah... You must update your client first."), 1;
next;
}
if (ClientVersion >= 24) return;
mesn "Narrator";
mesc l("Warning."), 1;
mesc l("Warning."), 1;
mesc l("Warning: You are using an old client."), 1;
next;
mesc l("Please install the new client from [@@https://manaplus.org/|https://manaplus.org/@@]");
next;
if (ClientVersion >= 20) mesc l("Compatibility Support mode enabled. Client may crash AT RANDOM, beware.");
if (ClientVersion >= 20) mesc l("Crazy stuff can happen in overall. YOU HAVE BEEN WARNED TO UPDATE YOUR CLIENT.");
if (ClientVersion >= 20) close;
if (ClientVersion >= 20) return;
mesc l("You won't be allowed to play this game until you have an updated client.");
next;
// Force user to disconnect
atcommand "@kick "+strcharinfo(0);
return;
}