Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $StoreGems = 1; //Store gems while deus mining?
- $CD::Publicdustcalc = 0; //Public dust calc for everyone to use. Example, someone says in zone or global 'dust from 145 to 174'
- $TellHouseData = 1; // Set this to 0 to keep House and RP private (for !myinfo)
- $TellBounty = 1; // Set this to 0 to keep Bounty private (for !myinfo)
- //Don't touch these variables unless you know what you're doing.
- $itemamt = "none";
- $CD::lastamt = "0";
- $CD::Gem[1, Desc] = "Keldrinite";
- $CD::Gem[2, Desc] = "Diamond";
- $CD::Gem[3, Desc] = "Emerald";
- $CD::Gem[4, Desc] = "Silver";
- $CD::Gem[5, Desc] = "Gold";
- $CD::Gem[6, Desc] = "Titanium";
- $CD::Gem[7, Desc] = "Sapphire";
- $CD::Gem[8, Desc] = "Ruby";
- $CD::Gem[9, Desc] = "Topaz";
- $CD::Gem[10, Desc] = "Iron";
- $CD::Gem[11, Desc] = "Turquoise";
- $CD::Gem[1, Price] = 20032;
- $CD::Gem[2, Price] = 2650;
- $CD::Gem[3, Price] = 1552;
- $CD::Gem[4, Price] = 664;
- $CD::Gem[5, Price] = 780;
- $CD::Gem[6, Price] = 1332;
- $CD::Gem[7, Price] = 468;
- $CD::Gem[8, Price] = 192;
- $CD::Gem[9, Price] = 256;
- $CD::Gem[10, Price] = 232;
- $CD::Gem[11, Price] = 136;
- $CD::GemCount = 11;
- $StoreGems == 1
- //End no touch vars
- Include("presto\\match.cs");
- Include("presto\\event.cs");
- Event::Attach(eventClientMessage, CD::OnMessage);
- function CD::OnMessage(%client, %msg) {
- if(%client)
- $lastClientMessage = %client;
- else {
- if(%msg == "You say, \"!myinfozone\"") {
- CD::GetMyInfo("zone");
- }
- if(%msg == "You say, \"!myinfo\"") {
- CD::GetMyInfo("global");
- }
- if(%msg == "You say, \"!mycoins\"") {
- schedule("say(0, \"#global I have \" @ DeusRPG::FetchData(COINS) @ \" coins on hand and \"@ DeusRPG::FetchData(BANK) @ \" coins banked.\");", 1.0);
- }
- if($BuyAll == 1) { //For retreiving hundreds of items from your storage. Used in CD::BuyAll()
- %outofitem = Match::String(%msg, "You only have * of this item.");
- %numitem = Match::Result(0);
- if (%outofitem) {
- $itemamt = %numitem;
- }
- }
- if($Roll == 1) { // Used in the doroll() function
- %roll = Match::String(%msg, "*: *");
- %yourroll = Match::Result(0);
- %result = Match::Result(1);
- if (%roll) {
- if($rollnum != 1) {
- $RollResult[$rollnum] = %result;
- $rollnum++;
- } else {
- $rollnum = 1;
- $RollResult[1] = %result;
- $rollnum++;
- }
- }
- }
- if($MiningMove == 1) { //Keeps track fo the gems you've mined.
- %foundgem = Match::String(%msg, "You found *.");
- %gem = Match::Result(0);
- if (%foundgem) {
- if(String::findSubStr(%gem, "backpacks") == -1) {
- $CD::gem[Amt, %gem] = $CD::gem[Amt, %gem] + 1;
- }
- }
- }
- if($CD::publicdustcalc == 1) {
- %pubdustcalcy = Match::String(%msg, "You say, \"dust from * to *\"");
- if(%pubdustcalcy) {
- %person = Client::GetName(GetManagerID());
- %firstlvl = Match::Result(0);
- %secondlvl = Match::Result(1);
- Schedule("showdustreq("@%firstlvl@","@%secondlvl@",\"tell "@%person@",\");", 1.0);
- Schedule("$pubcalctimer = 0;", 4.0);
- }
- %pubdustcalc = Match::String(%msg, "[*] * \"dust from * to *\"");
- if(%pubdustcalc) {
- %person = Match::Result(1);
- %firstlvl = Match::Result(2);
- %secondlvl = Match::Result(3);
- Schedule("showdustreq("@%firstlvl@","@%secondlvl@",\"tell "@%person@",\");", 1.0);
- Schedule("$pubcalctimer = 0;", 4.0);
- }
- %pubdustcalcs = Match::String(%msg, "* says, \"dust from * to *\"");
- if(%pubdustcalcs) {
- %person = Match::Result(0);
- %firstlvl = Match::Result(1);
- %secondlvl = Match::Result(2);
- Schedule("showdustreq("@%firstlvl@","@%secondlvl@",\"tell "@%person@",\");", 1.0);
- Schedule("$pubcalctimer = 0;", 4.0);
- }
- %pubdustcalct = Match::String(%msg, "* tells you, \"dust from * to *\"");
- if(%pubdustcalct) {
- %person = Match::Result(0);
- %firstlvl = Match::Result(1);
- %secondlvl = Match::Result(2);
- Schedule("showdustreq("@%firstlvl@","@%secondlvl@",\"tell "@%person@",\");", 1.0);
- Schedule("$pubcalctimer = 0;", 4.0);
- }
- }
- //I wish sounds worked on PCRPG
- //if(String::findSubStr(%msg, "You say, \"hi") != -1) {
- // schedule("remoteEval(2048, lmsg, hello);", 0);
- // }
- //if(String::findSubStr(%msg, "You say, \"buy") != -1) {
- // schedule("remoteEval(2048, lmsg, bye);", 0);
- // }
- //if(String::findSubStr(%msg, "You say, \"yes") != -1) {
- // schedule("remoteEval(2048, lmsg, yes);", 0);
- // }
- %gotbash = Match::String(%msg, "You were bashed by * for * points of damage!");
- %gotbashed = Match::Result(0);
- %gotbashdmg = Match::Result(1);
- if(%gotbash) {
- remoteeval(2048, "PlayAnim", 0); //Wave your arms around
- if($ConfigLoaded == 1) { //Only do this if you have taurik script pack.
- if($RPGStatsLoaded[Client::GetName(GetManagerID())] != 1) {
- %RPGStatsScript = "afkmodule_stats-" @ Client::GetName(GetManagerID()) @ ".cs";
- exec(%RPGStatsScript);
- // Reset loaded flag on all configs.
- // If a player changes names without quitting tribes (which removes the $RPGStatsLoaded tag)
- // the next players stats will be loaded overtop of the first one. If the
- // player then switches back to the original name it will not reload the config because the
- // $RpgStatsLoaded flag is already set for that player.
- deleteVariables("$RPGStatsLoaded*");
- // Set this player as loaded.
- $RPGStatsLoaded[Client::GetName(GetManagerID())] = 1;
- }
- $RPGPlayerStats::LastgotBashed = %gotbashed;
- $RPGPlayerStats::gotBashedFor = %gotbashdmg;
- $RPGPlayerStats::GotBashes++;
- export("$RPGPlayerStats::*", "config\\afkmodule_stats-" @ Client::GetName(GetManagerID()) @ ".cs", False);
- }
- }
- }
- }
- function String::replace(%string, %search, %replace) //Not mine, found it on some tribes scripting tutorial site.
- {
- %loc = String::findSubStr(%string, %search);
- for(%loc; %loc != -1; %i++)
- {
- %lenstr = String::len(%string);
- %lenser = String::len(%search);
- %part1 = String::getSubStr(%string, 0, %loc - 1);
- %part2 = String::getSubStr(%string, %loc + %lenser, %lenstr - %loc - %lenser);
- %string = %part1 @ " " @ %replace @ %part2;
- %loc = String::findSubStr(%string, %search);
- }
- return %string;
- }
- // For autostoring gems while mining. Needs hooks into DeusSkillTraining.cs to work.
- // The examples show the code surrounding the changes so you know what it should look like.
- // To Install:
- // 1. Open Tribes\Config\DeusRpgPack\DeusSkillTraining.cs
- // 2. Search for this line: "if(%opt == "old")"
- // 3. Right above that line put if($StoreGems == 1) CD::StoreGems();
- //
- // Example: $MiningMove = 1;
- // $Xin_::MineWatch = 0;
- // $Xin_::MoveCount = 0;
- // if($StoreGems == 1) CD::StoreGems();
- // if(%opt == "old")
- // Mining::Movement();
- // else
- // Xin_::AutoMine();
- //
- // 4. Search for this line: "Client::centerPrint("<jc><f0>Auto Mining <f1>stopped", 1)"
- // 5. Right above that line put: CD::StoreGemsStop();
- //
- // Example: Schedule("DeusRPG::StopMoving();", 6);
- // Schedule::Cancel(MineMover);
- // postAction(2048, IDACTION_BREAK1, 1);
- // CD::StoreGemsStop();
- // Client::centerPrint("<jc><f0>Auto Mining <f1>stopped", 1);
- // Schedule("Client::centerPrint(\"\", 1);", 4);
- //
- // 6. Make sure $StoreGems == 1; at the top of this script. Save the file.
- //
- function CD::StoreGems() {
- if($minestatusloaded != 1) {
- %CDAFKMineScript = "afk_minestatus-" @ Client::GetName(GetManagerID()) @ ".cs";
- exec(%CDAFKMineScript);
- $minestatusloaded = 1;
- }
- if($MiningMove == 1) {
- %i = 1;
- if(getItemCount("Keldrinite")) { schedule::Add("CD::Store(\"Keldrinite\");", %i); %i++; }
- if(getItemCount("Diamond")) { schedule::Add("CD::Store(\"Diamond\");", %i); %i++; }
- if(getItemCount("Emerald")) { schedule::Add("CD::Store(\"Emerald\");", %i); %i++;}
- if(getItemCount("Silver")) { schedule::Add("CD::Store(\"Silver\");", %i); %i++; }
- if(getItemCount("Gold")) { schedule::Add("CD::Store(\"Gold\");", %i); %i++; }
- if(getItemCount("Titanium")) { schedule::Add("CD::Store(\"Titanium\");", %i); %i++; }
- if(getItemCount("Sapphire")) { schedule::Add("CD::Store(\"Sapphire\");", %i); %i++; }
- if(getItemCount("Ruby")) { schedule::Add("CD::Store(\"Ruby\");", %i); %i++; }
- if(getItemCount("Topaz")) { schedule::Add("CD::Store(\"Topaz\");", %i); %i++; }
- if(getItemCount("Iron")) { schedule::Add("CD::Store(\"Iron\");", %i); %i++; }
- if(getItemCount("Turquoise")) { schedule::Add("CD::Store(\"Turquoise\");", %i); %i++; }
- Schedule::Add("say(0, \"#savecharacter\");", 115, SaveCharacter);
- Schedule::Add("CD::StoreGems();", 120, StoreGems);
- export("$CD::gemAmt*", "config\\afk_minestatus-" @ Client::GetName(GetManagerID()) @ ".cs", False);
- }
- }
- //Sweet OSD that shows what you have mined and put in storage.
- function showtotalgems(%var) {
- if (%var == "reset") {
- for(%i = 1; %i <= $CD::GemCount; %i++) {
- $CD::gem[Amt, $CD::Gem[%i, Desc]] = 0;
- }
- $CD::gem[Amt, "reset"] = CD::currenttime();
- export("$CD::gemAmt*", "config\\afk_minestatus-" @ Client::GetName(GetManagerID()) @ ".cs", False);
- }
- if (%var == "close") {
- Schedule("Client::centerPrint(\"\", 0.1);", 0.1);
- Schedule::Cancel(showtotalgems);
- }
- if (%var == "") {
- if ($CD::gemresettime == false || $CD::gem[Amt, "reset"] == "") {
- %totaltext = "<f1>Total gems mined since last reset:<n>";
- } else {
- %totaltext = "<f1>Total gems mined since "@$CD::gem[Amt, "reset"]@":<n>";
- }
- for(%i = 1; %i <= $CD::GemCount; %i++) {
- %price = $CD::Gem[%i, Price];
- %count = $CD::gem[Amt, $CD::Gem[%i, Desc]];
- %totalcoins = %totalcoins + (%count * %price);
- %totaltext = ""@ %totaltext @" <f3>"@$CD::Gem[%i, Desc] @":<f2> " @ $CD::gem[Amt, $CD::Gem[%i, Desc]]@"<n>";
- }
- %totaltext = ""@ %totaltext @" <n>";
- %totaltext = ""@ %totaltext @"Total: <f2>"@%totalcoins@" coins.";
- Client::centerPrint("<jc><f2>"@%totaltext@"", 1);
- Schedule::Add("showtotalgems();", 5, showtotalgems);
- }
- }
- function CD::StoreGemsStop() {
- Schedule::Cancel(SaveCharacter);
- Schedule::Cancel(StoreGems);
- $RPGPlayerName = Client::GetName(GetManagerID());
- export("$CD::gemAmt*", "config\\afk_minestatus-" @ Client::GetName(GetManagerID()) @ ".cs", False);
- $minestatusloaded = 0;
- }
- //Retreives all of an item from your storage. If you tell it to remove topa instead of topaz it will go and keep erroring.
- function CD::BuyAll($CD::BItem) {
- $BuyAll = 1; //Enables watching for the "You only have X of this item." message
- if($itemamt != "none") { //If you hit this then you must have less than 100 of the item.
- say(0, $itemamt);
- $itemamt = "none"; //Change back to none because this is done running.
- %nosched = 1;
- } else {
- say(0, "100");
- }
- buy($CD::BItem);
- if($CD::lastamt != 0) { //Second+ loop
- if(getitemcount($CD::bitem) > $CD::lastamt) { //Make sure your count now is higher than last time so you know to continue retreiving.
- $CD::lastamt = getitemcount($CD::bitem);
- schedule::Add("$BuyAll = 0;", 0.5); // Turn off message watching.
- if(%nosched != 1) schedule::Add("CD::BuyAll($CD::BItem);", 1.2, CDBuyAll); //Run again.
- } else {
- schedule::Add("$BuyAll = 0;", 0.2); // Turn off message watching.
- schedule::Add("$CD::lastamt = 0;", 0.3); // Reset $CD::lastamt
- schedule::Add("$CD::BItem = \"\";", 0.4); //Reset the item var
- //DONE
- }
- } else { //Goes here on the first time run.
- $CD::lastamt = getitemcount($CD::bitem);
- schedule::Add("$BuyAll = 0;", 0.5); // Turn off message watching.
- if(%nosched != 1) schedule::Add("CD::BuyAll($CD::BItem);", 1.2, CDBuyAll); //Run again.
- }
- }
- //Returns the item number of an equipped item.
- function CD::ItemNumEquip(%item) {
- %type = getItemType(%item);
- return %type + 1;
- }
- function doroll(%die) {
- //Rolls a dice
- //Returns $RollResult[number]
- //Example: doroll("1d6");
- //This will roll a 6 sided die one time.
- $RollResult = 0;
- $Roll = 1;
- say(0, "#roll " @%die);
- schedule("$Roll = 0;", 0.5);
- }
- //Stores up to 100 of an item in one pass.
- function CD::Store(%item) {
- say(0, getItemCount(%item));
- sell(%item);
- }
- //Sells all of the item you specify as fast as possible.
- function CD::SellAll($CD::SItem) {
- if(getItemCount($CD::SItem)) {
- say(0, getItemCount($CD::SItem));
- sell($CD::SItem);
- }
- if(getItemCount($CD::SItem)) schedule::Add("CD::SellAll($CD::SItem);", 1, CDsellall);
- }
- //Drops the item until you have none.
- function CD::dropall($CD::dropitem) {
- if(getItemCount($CD::dropitem)) {
- drop($CD::dropitem);
- }
- if(getitemcount($CD::dropitem)) schedule::Add("CD::dropall($CD::dropitem);", 1, CDdropitem);
- }
- function bashstats (%say) {
- if($RPGStatsLoaded != 1) {
- %RPGStatsScript = "afkmodule_stats-" @ Client::GetName(GetManagerID()) @ ".cs";
- exec(%RPGStatsScript);
- $RPGStatsLoaded = 1;
- }
- say(0, "#"@%say@" Bash Stats: I last got bashed by "@$RPGPlayerStats::LastgotBashed@" for "@$RPGPlayerStats::gotBashedFor@" dmg. Total times bashed: "@$RPGPlayerStats::GotBashes@". I last bashed "@$RPGPlayerStats::LastBashed@" for "@$RPGPlayerStats::BashedFor@" dmg. Total bashes: "@$RPGPlayerStats::Bashes@"");
- }
- //Fix me
- //Works but could be better.
- function CD::buyparchment() {
- //Make sure you are talking to thorin or it wont stop until you have less than 1mil coins.
- if(DeusRPG::FetchData(COINS) >= 1e6) {
- schedule("say(0, \"hi\");", 0.4);
- schedule("say(0, \"yes\");", 1.4);
- }
- if(DeusRPG::FetchData(COINS) >= 1e6) schedule::Add("CD::buyparchment();", 2.2, CDbuyparchment);
- }
- //Fix me
- //Works but could be better.
- function CD::buydust() {
- if(getItemCount("Parchment")) {
- schedule("say(0, \"hi\");", 0.4);
- schedule("say(0, \"yes\");", 1.4);
- }
- if(getItemCount("Parchment")) schedule::Add("CD::buydust();", 2.2, CDbuydust);
- }
- //Fix me
- //Works but could be better.
- function CD::usedust() {
- if(getItemCount("Magic Dust")) {
- schedule("say(0, \"hi\");", 0.4);
- schedule("say(0, \"yes\");", 1.4);
- }
- if(getItemCount("Magic Dust")) schedule::Add("CD::usedust();", 2.2, CDusedust);
- }
- //Fix me.
- //Works but could be better.
- function CD::withdraw(%amount) {
- schedule("say(0, \"hi\");", 0.4);
- schedule("say(0, \"withdraw\");", 1.4);
- schedule("say(0, \""@%amount@"\");", 2.4);
- }
- function showdustreq(%startlvl,%endlvl,%say) {
- if(%say == ""){
- %say = "say";
- }
- %startlvl = floor(%startlvl);
- %endlvl = floor(%endlvl);
- if(%startlvl < 0) %startlvl = 0;
- if(%endlvl < 0) %endlvl = 0;
- %startexp = (%startlvl - 1 ) * (200 + 50 * ((%startlvl - 1) - 1));
- %endexp = (%endlvl - 1) * (200 + 50 * ((%endlvl -1) - 1));
- %expdiff = %endexp - %startexp;
- %DustNeed = round(%expdiff / 4625);
- say(0, "#" @%say@ " From level " @ %startlvl @ " to level " @ %endLvl @ " is " @ %DustNeed @ " dusts. (" @ %expdiff @ " exp)");
- }
- function targetcalc(%lvl,%say) { //Arguments are optional. If none are specified then it will use your level and #say the results.
- //This uses the PCRPG values.
- //This is only functional when you use the higher of the two levels. Ex. You are lvl 30 and you want to see if you can target a lvl 50.
- //Do targetcalc(50); instead of 30 (your level) to do it. If you are the lvl 50 wanting to target a lvl 30 then you use targetcalc(50);
- if(%lvl == ""){
- %lvl = DeusRPG::FetchData(LVL);
- }
- if(%say == ""){
- %say = "say";
- }
- %tgtpercent = 34.5/100;
- %lvldifference = %tgtpercent * %lvl;
- %tgtmin = round(%lvl - %lvldifference);
- %tgtmax = round(%lvldifference + %lvl);
- say(0, "#" @%say@ " A level " @%lvl@ " can target people from LVL " @%tgtmin@ " to LVL " @%tgtmax@ ".");
- }
- //Need to echo() twice for it to return something.
- function sellcost(%item) {
- %cost = DeusRPG::FetchData("getsellcost " @ %item);
- return %cost;
- }
- //Need to echo() twice for it to return something.
- function buycost(%item) {
- %cost = DeusRPG::FetchData("getbuycost " @ %item);
- return %cost;
- }
- function CD::currenttime() {
- return timestamp();
- }
- function CD::cancelall() {
- schedule::cancel(CDbuyall);
- schedule::cancel(CDsellall);
- schedule::cancel(CDbuyparchment);
- schedule::cancel(CDbuydust);
- schedule::cancel(CDusedust);
- schedule::cancel(CDcreatepack);
- schedule::cancel(CDdropitem);
- }
- function CD::GetMyInfo(%say) {
- //Update all the deus player variables.
- DeusRPG::FetchData("HP");
- DeusRPG::FetchData("MaxHP");
- DeusRPG::FetchData("MANA");
- DeusRPG::FetchData("MaxMANA");
- DeusRPG::FetchData("CLASS");
- DeusRPG::FetchData("RemortStep");
- DeusRPG::FetchData("zonedesc");
- DeusRPG::FetchData("SPcredits");
- DeusRPG::FetchData("LCK");
- DeusRPG::FetchData("LVL");
- DeusRPG::FetchData("RankPoints");
- DeusRPG::FetchData("bounty");
- DeusRPG::FetchData("MyHouse");
- schedule("CD::ShowMyInfo(\""@%say@"\");", 1.0);
- }
- function CD::ShowMyInfo(%say) {
- // Modified Tauriks Myinfo function
- // Original at www.linneberg.com
- //
- // It was pretty much rewritten by me to use local variables and have the code easier to read.
- // This one REQUIRES Deus pack
- //
- //Preset all the data
- %MyHP = $rpgdata["HP"];
- %MyMaxHP = $rpgdata["MaxHP"];
- %MyMANA = $rpgdata["MANA"];
- %MyMaxMANA = $rpgdata["MaxMANA"];
- %MyClass = $rpgdata["CLASS"];
- %MyRemort = $rpgdata["RemortStep"];
- %MyZone = $rpgdata["zonedesc"];
- %MySP = $rpgdata["SPcredits"];
- %MyLCK = $rpgdata["LCK"];
- %MyLVL = $rpgdata["LVL"];
- %MyRank = $rpgdata["RankPoints"];
- %MyBounty = $rpgdata["bounty"];
- %MyHouse = $rpgdata["MyHouse"];
- %RLRoman = Roman(%MyRemort);
- //If you have tauriks scripts then you can show your bash and spells casted
- if ($ConfigLoaded == 1) {
- %RPGStatsScript = "afkmodule_stats-" @ Client::GetName(GetManagerID()) @ ".cs";
- if (Client::GetName(GetManagerID()) != "") {
- exec(%RPGStatsScript);
- }
- %BashMessage = "";
- if ($RPGPlayerStats::LastBashed == "" && $RPGPlayerStats::BashedFor == "") {
- // Sigh.
- } else {
- %BashMessage = "I've bashed " @ $RPGPlayerStats::Bashes @ " times. I last bashed " @ $RPGPlayerStats::LastBashed @ " for " @ $RPGPlayerStats::BashedFor @ ".";
- }
- %SpellsMessage = "";
- if ($RPGPlayerStats::SpellsCasted == "") {
- //Double sigh?
- } else {
- %SpellsMessage = "Spells Casted: " @$RPGPlayerStats::SpellsCasted@ ".";
- }
- }
- %HouseMessage = "";
- %BountyMessage = "";
- %housestuff = Match::String(%MyHouse, "House *");
- %housename = Match::Result(0);
- if(%housestuff && $TellHouseData == "1") { %HouseMessage = "House: "@%housename@" RP: "@%MyRank@"."; }
- if($TellBounty = "1") { %BountyMessage = "Bounty: "@%MyBounty@"."; }
- if (%MyRemort == 0) {
- %RemortName = %MyClass;
- }
- if (%MyRemort == 1) {
- if (%MyClass == "Cleric") {
- %RemortName = "Bishop"; }
- else if (%MyClass == "Druid") {
- %RemortName = "Archdruid"; }
- else if (%MyClass == "Theif") {
- %RemortName = "Bandit"; }
- else if (%MyClass == "Bard") {
- %RemortName = "Lyricist"; }
- else if (%MyClass == "Fighter") {
- %RemortName = "Berzerker"; }
- else if (%MyClass == "Paladin") {
- %RemortName = "Avenger"; }
- else if (%MyClass == "Ranger") {
- %RemortName = "Woodsman"; }
- else if (%MyClass == "Mage") {
- %RemortName = "Archmage"; }
- }
- if (%MyRemort == 2) {
- if (%MyClass == "Cleric") {
- %RemortName = "Saint"; }
- else if (%MyClass == "Druid") {
- %RemortName = "Mystic"; }
- else if (%MyClass == "Theif") {
- %RemortName = "Outlaw"; }
- else if (%MyClass == "Bard") {
- %RemortName = "Musician"; }
- else if (%MyClass == "Fighter") {
- %RemortName = "Knight"; }
- else if (%MyClass == "Paladin") {
- %RemortName = "Centurian"; }
- else if (%MyClass == "Ranger") {
- %RemortName = "Marksman"; }
- else if (%MyClass == "Mage") {
- %RemortName = "Sorcerer"; }
- }
- if (%MyRemort == 3) {
- if (%MyClass == "Cleric") {
- %RemortName = "Pope"; }
- else if (%MyClass == "Druid") {
- %RemortName = "Head Mystic"; }
- else if (%MyClass == "Theif") {
- %RemortName = "Klepto"; }
- else if (%MyClass == "Bard") {
- %RemortName = "Producer"; }
- else if (%MyClass == "Fighter") {
- %RemortName = "Guardian"; }
- else if (%MyClass == "Paladin") {
- %RemortName = "Centurian"; }
- else if (%MyClass == "Ranger") {
- %RemortName = "Archer"; }
- else if (%MyClass == "Mage") {
- %RemortName = "Wizard"; }
- }
- if (%MyRemort >= 4) {
- if (%MyClass == "Cleric") {
- %RemortName = "Pope"; }
- else if (%MyClass == "Druid") {
- %RemortName = "Head Mystic"; }
- else if (%MyClass == "Theif") {
- %RemortName = "Klepto"; }
- else if (%MyClass == "Bard") {
- %RemortName = "Artiste"; }
- else if (%MyClass == "Fighter") {
- %RemortName = "Guardian"; }
- else if (%MyClass == "Paladin") {
- %RemortName = "Crusader"; }
- else if (%MyClass == "Ranger") {
- %RemortName = "Archer"; }
- else if (%MyClass == "Mage") {
- %RemortName = "Wizard"; }
- }
- if (%MyRemort == 99) {
- if (%MyClass == "Cleric") {
- %RemortName = "Master Clerian"; }
- else if (%MyClass == "Druid") {
- %RemortName = "Druidian Leader"; }
- else if (%MyClass == "Theif") {
- %RemortName = "Elder Thief"; }
- else if (%MyClass == "Bard") {
- %RemortName = "Seasoned Rogue"; }
- else if (%MyClass == "Fighter") {
- %RemortName = "Swordsman Elite"; }
- else if (%MyClass == "Paladin") {
- %RemortName = "Holy Crusader"; }
- else if (%MyClass == "Ranger") {
- %RemortName = "High Archer"; }
- else if (%MyClass == "Mage") {
- %RemortName = "Master of Magic"; }
- }
- if (%MyRemort >= 100) {
- %RemortName = "God";
- }
- if (%MyRemort < 99) { %RemortFinal = %RemortName@%RLRoman; }
- if (%MyRemort == 99 || %MyRemort == 100) { %RemortFinal = %RemortName; }
- if (%MyRemort > 100) { %RemortFinal = %RemortName@%RLRoman; }
- if (%MyRemort <= 99) { %HPFinal = %MyHP@"/"@%MyMaxHP; %ManaFinal = %MyMANA@"/"@%MyMaxMANA; } else { %HPFinal = %MyMaxHP; %ManaFinal = %MyMANA; }
- //Shorten your zone name
- if (%MyZone == -1) { %Myzone = "the unknown"; }
- else if (%MyZone == "Minotaur's Lair") { %Myzone = "Mino's"; }
- else if (%MyZone == "Jaten Outpost") { %Myzone = "Jaten"; }
- else if (%MyZone == "Keldrin Town") { %Myzone = "K-Town"; }
- else if (%MyZone == "Uber Zone") { %Myzone = "Ubers"; }
- else if (%MyZone == "Stronghold Yolanda") { %Myzone = "Yolanda"; }
- else if (%MyZone == "Fort Ethren") { %Myzone = "Ethren"; }
- else if (%MyZone == "Keldrin Mine") { %Myzone = "the Mines"; }
- else if (%MyZone == "Delkin Port") { %Myzone = "Delkin"; }
- else if (%MyZone == "Centuria Highhold") { %Myzone = "Centuria"; }
- else if (%MyZone == "Traveller's Den") { %Myzone = "Trav's"; }
- else if (%MyZone == "Ancient Crypt") { %Myzone = "the Crypt"; }
- else if (%MyZone == "Gran'Kar Ruins") { %Myzone = "the Ruins"; }
- else if (%MyZone == "water") { %Myzone = "the water"; }
- schedule("say(0, \"#"@%say@" I am a Level "@%MyLVL@" "@%RemortFinal@" in "@%Myzone@", with "@%MyLCK@" LCK, "@%MySP@" SP, "@%HPFinal@" HP and "@%ManaFinal@" Mana. "@%BashMessage@" "@%HouseMessage@" EXP TNL: "@$DeusRPGHud::expneeded@". "@%SpellsMessage@" "@%BountyMessage@"\");", 1.0);
- }
- //Cowboys awesome conversion
- //http://www.cowboyscripts.org
- function Roman(%number) {
- %roman = "";
- while (%number >= 1000) {
- %roman = %roman @ "M";
- %number = %number - 1000;
- }
- if (%number >= 900) {
- %roman = %roman @ "CM";
- %number = %number - 900;
- }
- if (%number >= 500) {
- %roman = %roman @ "D";
- %number = %number - 500;
- }
- if (%number >= 400) {
- %roman = %roman @ "CD";
- %number = %number - 400;
- }
- while (%number >= 100) {
- %roman = %roman @ "C";
- %number = %number - 100;
- }
- if (%number >= 90) {
- %roman = %roman @ "XC";
- %number = %number - 90;
- }
- if (%number >= 50) {
- %roman = %roman @ "L";
- %number = %number - 50;
- }
- if (%number >= 40) {
- %roman = %roman @ "XL";
- %number = %number - 40;
- }
- while (%number >= 10) {
- %roman = %roman @ "X";
- %number = %number - 10;
- }
- if (%number >= 9) {
- %roman = %roman @ "IX";
- %number = %number - 9;
- }
- if (%number >= 5) {
- %roman = %roman @ "V";
- %number = %number - 5;
- }
- if (%number >= 4) {
- %roman = %roman @ "IV";
- %number = %number - 4;
- }
- while (%number >= 1) {
- %roman = %roman @ "I";
- %number = %number - 1;
- }
- return %roman;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement