0% found this document useful (0 votes)
3 views120 pages

Orion Auto Bot Script for Targeting

The document is a JavaScript code for a bot in a game that automates various tasks such as walking, targeting enemies, healing allies, and managing timers for buffs. It includes functions to find and target enemies, heal the lowest health allies, and manage a custom targeting interface. Additionally, it handles mounting and dismounting of characters and incorporates random timers for specific abilities.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views120 pages

Orion Auto Bot Script for Targeting

The document is a JavaScript code for a bot in a game that automates various tasks such as walking, targeting enemies, healing allies, and managing timers for buffs. It includes functions to find and target enemies, heal the lowest health allies, and manage a custom targeting interface. Additionally, it handles mounting and dismounting of characters and incorporates random timers for specific abilities.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

//#include Auto_Bot.

js
if ([Link]('Autostart') === '0') {
[Link]('Autostart', 1);
}
//--#Targeting
function walk(){
while(true){
[Link](100);
[Link](1252, 1937);
[Link](1251, 1937);
}}
function FindEnemy(){
[Link]('self');
var enemy = [Link]('any','any',ground,'near|inlos|live|ignorefriends|
ignoreenemies','18','orange');
if (![Link]){
[Link]('self');
enemy = [Link]('any', 'any', ground, 'near |live|inlos|
ignoreenemies|ignorefriends', '12', 'blue|gray|criminal|red|orange');
if(![Link]){
[Link](self,6,'no enemy found');
[Link]();
[Link](lasttarget);
return '';
}
}
return enemy[0];
}
function TargetEnemy(){
var serial = FindEnemy();
[Link]();
if(![Link]) return;
var enemy = [Link](serial);
[Link](self, 33, [Link]());
[Link](lasttarget);
[Link]([Link](),33,0, [Link]());
[Link]([Link](), '29', true);
[Link](serial);
[Link](serial);
[Link](serial);
}
function HealLowestGreenieCleansingWinds() {
const greensNearby = [Link]('any', 'any', ground, 'human|live|inlos', 10,
'green');
[Link](function (e1, e2) {
return [Link]() - [Link]()
})
if ([Link]) {
const lowestHpGreen = greensNearby[0];
const lowestHpGreenSerial = [Link]();
[Link](lowestHpGreenSerial);
if([Link]()<[Link]()-2) {
[Link]([Link]());
}
}
}
function HealLowestGreenie() {
const greensNearby = [Link]('any', 'any', ground, 'human|live|inlos', 10,
'green');
[Link](function (e1, e2) {
return [Link]() - [Link]()
})
if ([Link]) {
const lowestHpGreen = greensNearby[0];
const lowestHpGreenSerial = [Link]();
[Link](lowestHpGreenSerial);
if([Link]()<[Link]()-2 && !
[Link]() && ![Link]()) {
[Link]([Link]());
}
}
}

function pennysTargetGump() {
//Version 1.0.0
var xStartPos = (([Link]('GameWindowX')-100) +
([Link]('GameWindowWidth')/2) + 100);
var yStartPos = (([Link]('GameWindowY')-100) +
([Link]('GameWindowHeight')/2) - 200);
var semiPersistentArray = [];
var tempArray = [];
var toggle = 0;
while (true) {
[Link](50);
var mobileID = [Link]("0x02EC|0x029A|0x029B|0x025D|0x025E|
0x0190|0x0191|0x0192|0x0193|0x03DB|0x03DF|0x03E2|0x04E6|0x00DC|0x00F6|0x00DB|
0x0019|0x0084|0x007A", any, ground, "mobile|ignorefriends|ignoreself", 24, "gray|
criminal|orange|red");
//This will exclude some from the array.
if ([Link]) {
for (k = [Link] - 1; k >= 0; k--) {
if ([Link](mobileID[k].Properties(),'The Priest Of
Mondain|a llama|A Wolf|A Dog|A Rat|A Kirin|A Bake-kitsune|A Bullfrog|A Ostard|A
Giant Serpent|A Rabbit|A Timber Wolf|A Grey Wolf|The Raider|The Brigand')) {
[Link](k, 1);
}
}
}
if ([Link]) {
var tempArray = [];
for (d=0;d<[Link];d++) {

[Link]([[[Link]([Link](mobileID[d].Serial()))],
[[Link]([Link](mobileID[d].Name()))],
[[Link]([Link](mobileID[d].Properties()))]]);
}
}
//this will exclude stuff that has the same name but no VvV tag like
shadow clones
if ([Link]) {
for (i=0;i<[Link];i++) {
for (j=[Link] - 1; j>=0 ; j--) {
if (mobileID[j].Name() == tempArray[i][1] &&
mobileID[j].Serial() != tempArray[i][0]) {
if (![Link](mobileID[j].Properties(),
'[VvV]')) {
[Link]('im ehre');
[Link](j,1);
}
}
}
}
}
var enemyList = [Link]();
//add enemies to the array. (mobileID);
for (f=0;f<[Link];f++) {
var enemyObject = [Link](enemyList[f]);
if (enemyObject != null) {
if ([Link]() <= 24) {
[Link](enemyObject);
}
}
}
//will exclude the dead from being added.
if ([Link]) {
for (l = [Link] - 1; l >= 0; l--) {
[Link](mobileID[l].Serial());
if (mobileID[l].Hits() === 0) {
[Link](l, 1);
}
}
}
//This is where duplicates are being added.
if ([Link] === 0 && [Link]) {
for (y=0;y<[Link];y++) {
//check here. Adding some speggeti to make sure after the
first mobile id gets added the array is checked for duplicates.
if ([Link] > 0 ){
for (x=0;x<[Link];x++) {
if (mobileID[y].Serial() ==
semiPersistentArray[x][0]) {
toggle = 0;
break;
}
else {
toggle = 1;
}
}
if (toggle === 1) {

[Link]([[[Link]([Link](mobileID[y].Serial()))],
[[Link]([Link](mobileID[y].Name().toUpperCase()))],[0]]);
}
}
else {

[Link]([[[Link]([Link](mobileID[y].Serial()))],
[[Link]([Link](mobileID[y].Name().toUpperCase()))],[0]]);
}
}
}
if ([Link]) {
for (y=0;y<[Link];y++) {
for (x=0;x<[Link];x++) {
if (mobileID[y].Serial() == semiPersistentArray[x]
[0]) {
toggle = 0;
break;
}
else {
toggle = 1;
}
}
if (toggle === 1) {

[Link]([[[Link]([Link](mobileID[y].Serial()))],
[[Link]([Link](mobileID[y].Name().toUpperCase()))],[0]]);
}
}
}
if ([Link] || [Link]) {
for (y=0;y<[Link];y++) {
for (x=0;x<[Link];x++) {
if (mobileID[y].Serial() == semiPersistentArray[x]
[0]) {
[Link](semiPersistentArray[x][0]);
}
}
}
}
if ([Link]) {
for (x=[Link] - 1;x >= 0;x--) {
if ([Link](semiPersistentArray[x][0])) {
if ([Link](semiPersistentArray[x][0]) > 60000) {
[Link](semiPersistentArray[x][0]);
[Link](x,1);
}
}
}
}
function compare( a, b ) {
if ( a[1] < b[1] ){
return -1;
}
if ( a[1] > b[1] ){
return 1;
}
return 0;
}
[Link](compare);
[Link]('targetList', semiPersistentArray);
var gump = [Link](69);
[Link]();
[Link](false);
[Link](xStartPos, yStartPos, '13000', 200,
[Link] * 20); //40000, 6000, 3000, 13000
for (z=0;z<[Link];z++) {
if (semiPersistentArray[z][0] == [Link]()) {
[Link](xStartPos, yStartPos + ((z) * 20), 17, "<h2>"
+ ">" + semiPersistentArray[z][1] + "</h2>"); //Place to set hue for active target
}
else {
[Link](xStartPos, yStartPos + ((z) * 20),
0x0B8B,"<h2>" + semiPersistentArray[z][1] + "</h2>"); //Place to set hue for
everyone in list thats not target
}
}
[Link]();
}
}

function cyclePennysTargetGumpUp() {
var toggle = 0;
[Link]('pennysTargetGump',true);
var semiPersistentArray = [Link]('targetList');
for (a=0;a<[Link];a++) {
if (semiPersistentArray[a][0] == [Link]()) {
toggle = 0;
break;
}
else {
toggle = 1;
}
}
if (toggle == 0) {
for (d=0;d<[Link];d++) {
if ([Link]() == semiPersistentArray[d][0] && d ==
0) {
[Link](true);
[Link](self, 0x09C2,
semiPersistentArray[[Link]-1][1]);

[Link](semiPersistentArray[[Link]-1]
[0], 0x0AAC, true);

[Link](semiPersistentArray[[Link]-1][0]);

[Link](semiPersistentArray[[Link]-1]
[0]);
}
else if ([Link]() == semiPersistentArray[d][0] &&
d != 0) {
[Link](true);
[Link](self, 0x09C2, semiPersistentArray[d-1][1]);
[Link](semiPersistentArray[d-1][0], 0x0AAC,
true);
[Link](semiPersistentArray[d-1][0]);
[Link](semiPersistentArray[d-1][0]);
}
}
}
if (toggle == 1) {
[Link](true);
[Link](self, 0x09C2,
semiPersistentArray[[Link]-1][1]);

[Link](semiPersistentArray[[Link]-1][0],
0x0AAC, true);
[Link](semiPersistentArray[[Link]-1]
[0]);
[Link](semiPersistentArray[[Link]-
1][0]);
}
}
function cyclePennysTargetGumpDown() {
var toggle = 0;
[Link]('pennysTargetGump',true);
var semiPersistentArray = [Link]('targetList');
for (a=0;a<[Link];a++) {
if (semiPersistentArray[a][0] == [Link]()) {
toggle = 0;
break;
}
else {
toggle = 1;
}
}
if (toggle == 0) {
for (d=0;d<[Link];d++) {
if ([Link]() == semiPersistentArray[d][0] && d ==
[Link]-1) {
[Link](true);
[Link](self, 0x09C2, semiPersistentArray[0][1]);
[Link](semiPersistentArray[0][0], 0x0AAC,
true);
[Link](semiPersistentArray[0][0]);
[Link](semiPersistentArray[0][0]);
}
else if ([Link]() == semiPersistentArray[d][0] &&
d != [Link]-1) {
[Link](true);
[Link](self, 0x09C2, semiPersistentArray[d+1][1]);
[Link](semiPersistentArray[d+1][0], 0x0AAC,
true);
[Link](semiPersistentArray[d+1][0]);
[Link](semiPersistentArray[d+1][0]);
}
}
}
if (toggle == 1) {
[Link](true);
[Link](self, 0x09C2, semiPersistentArray[0][1]);
[Link](semiPersistentArray[0][0], 0x0AAC, true);
[Link](semiPersistentArray[0][0]);
[Link](semiPersistentArray[0][0]);
}
}

//--#Random Timers
function Nova(){
var nova = [Link]('0x0F09', '0x000D', backpack);
[Link](nova);
[Link]('Nova', 120000, 'UnderChar', 'Circle|Bar', 'Nova', -
180, 220, '33', 1, '0xFFFFFFFE');
}
function EvadeTimer(){
[Link]('Evasion');
[Link](750)
if([Link]('0x75f8')){
[Link]('evadetimer', 25000, 'UnderChar', 'Circle|
Bar', 'Evade', 0, 220, '33', 1, '0xFFFFFFFE');
}
}
function AttunementTimer(){
[Link]('Attunement');
[Link](2000)
if([Link]('0x7540')){
[Link]('Attune', 180000, 'Bottom', 'Circle|Bar',
'Attune', -150, 0, '33', 1, '0xFFFFFFFE');
}
}
function GiftTimer(){
[Link]('Gift Of Renewal');
[Link](5000)
if([Link]('0x7554')){
[Link]('Gift', 90000, 'Bottom', 'Circle|Bar',
'Gift', -220, 0, '33', 1, '0xFFFFFFFE');
}
}

//--#Mount Dismount
function Mounting (){ //"horsey" is the VvV vendor horse mount
var horsey = [Link]('0x05E6|0x031A|0x00F3|0x00e2|0x00E4|0x0076|
0x0072|0x00cc|0x0079|0x0115|0x20DD|0x00C8', -1, ground, 'near|live|nothuman', 4);
var ethy = [Link]('0x25A0'); // ADD ETHY GRAPHIC HERE IF NOT WORKING
if([Link]('Mount') == null && [Link]() > 0){
[Link](horsey);
[Link](100);
[Link]('all follow me');
} else if([Link]('Mount') == null){
[Link](ethy);
}
}
function PopHorse(){
var horsey = [Link]('0x00e2|0x00E4|0x0076|0x0072|0x00cc|0x0079|
0x0115|0x20DD|0x00C8', -1, ground, 'near|live|nothuman', 4);
if ([Link](100)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]() ===
'0x00002340')){
[Link](150);
[Link]([Link](7));
[Link](150);
}
}
}

//--#AutoPvp
function attackNearestEnemy(){
while(true){
[Link](100);
var enemy = [Link](any, any, ground, 'mobile|ignorefriends|near',
8, 'orange');
var c = [Link];
if([Link]('0x7611')){
if([Link] && ![Link]('Invisibility') && !
[Link]('Hiding')){
for(j = c - 1; j >= 0; j--){
if([Link](enemy[j].Properties(),'The Priest Of Mondain|
A Llama|A Wolf|A Dog|A Rat|A Kirin|A Bake-kitsune|A Bullfrog|A Ostard|A Giant
Serpent|A Cat|A Rabbit|A Timber Wolf|A Grey Wolf|summoned')){
[Link](j, 1);
}
}
if([Link]){
[Link](enemy[0].Serial());
}
}
}
}
}
function disarmAlways(){
// [Link]('trackCooldowns', true);
[Link]('attackNearestEnemy', true);
[Link]('leashedTeleport', true);
[Link]('PotsHelper', true);
if([Link]('Inscription') == 1000){
[Link]('magicreflect', true);
}
while([Link]('Wrestling') >= 700){
while([Link]('Primary') !== true && ![Link]() && !
[Link]()){
[Link]('Primary',true);
[Link](200);
}
[Link](20);
}
}
function trackCooldowns() {
var howFarBackInJournal = 60;
///////////////////////////////////////////////////0x02EC|0x029A|0x029B|
0x025D|0x025E|0x0190|0x0191|0x0192|0x0193|0x03DB|0x03DF|0x03E2|0x04E6|0x00DC|
0x00F6|0x00DB|0x0019|0x0084|0x007A
while (true) {
var targetsToTrack = [Link](any, any, ground, " ", 24, "gray|
criminal|orange|red|blue|green");
var mortalArray = [];
var splinterArray = [];
var splinterCooldownArray = [];
var splinterEnd = [];
var appleArray = [];
var evasionArray = [];
var evasionCooldownArray = [];
var disarmArray = [];
var disarmCooldownArray = [];
var sleepArray = [];
var paraArray = [];
for (i=0;i<[Link];i++) {
if ([Link]('graphic=0x3728', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()) && [Link]('id=0x01DF',
'sys', any, any, [Link]()-howFarBackInJournal, [Link]())) {
var effect = [Link]('0x3728', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]());
var effectText = [Link]();
var effectSerial = /src_serial=.{10}/.exec(effectText);
var effectReplace = effectSerial[0].replace(/^.{11}/,"");
var effectSerialTwo = /.{10}/.exec(effectReplace);
splinterCooldownArray[i] = effectSerialTwo + "splinterCooldown";
splinterArray[i] = effectSerialTwo + "Splinter";
[Link](splinterCooldownArray[i], 20000,
'UnderChar', 'Line|Bar','',0,20,any,-1,"0xFF0000FE");
[Link](splinterCooldownArray[i],
effectSerialTwo);
[Link](splinterCooldownArray[i], 20, 0);
[Link](splinterCooldownArray[i],
false);
[Link](splinterArray[i], 4000, 'UnderChar',
'Line|Bar','',0,20,any,-1,"0x000000FE");
[Link](splinterArray[i],
effectSerialTwo);
[Link](splinterArray[i], 20, 0);
[Link](splinterArray[i], false);
[Link]('0x3728', 'sys');
[Link](20);
}
else if ([Link]('graphic=0x3779', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()) && [Link]('id=0x0657',
'sys', any, any, [Link]()-howFarBackInJournal, [Link]())) {
var sleepEffect = [Link]('0x3779', 'sys', any,
any, [Link]()-howFarBackInJournal, [Link]());
var sleepEffectText = [Link]();
var sleepEffectSerial = /src_serial=.{10}/.exec(sleepEffectText);
var sleepEffectReplace = sleepEffectSerial[0].replace(/^.
{11}/,"");
var sleepEffectSerialTwo = /.{10}/.exec(sleepEffectReplace);
sleepArray[i] = sleepEffectSerialTwo + "sleep";
[Link](sleepArray[i], 13000, 'UnderChar', 'Line|
Bar','',0,40,any,-1,"0x00FFFFFE");
[Link](sleepArray[i],
sleepEffectSerialTwo);
[Link](sleepArray[i], 20, 0);
[Link](sleepArray[i], false);
[Link](sleepEffectSerialTwo, 'sys');
[Link](20);
}
else if ([Link]('graphic=0x376A', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()) && ([Link]('id=0x0237',
'sys', any, any, [Link]()-howFarBackInJournal, [Link]()) ||
[Link]('id=0x0204', 'sys', any, any, [Link]()-howFarBackInJournal,
[Link]()) || [Link]('id=0x023C', 'sys', any, any, [Link]()-
howFarBackInJournal, [Link]()) || [Link]('id=0x0537', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()))) {
var paraEffect = [Link]('0x376A', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]());
var paraEffectText = [Link]();
var paraEffectSerial = /src_serial=.{10}/.exec(paraEffectText);
var paraEffectReplace = paraEffectSerial[0].replace(/^.{11}/,"");
var paraEffectSerialTwo = /.{10}/.exec(paraEffectReplace);
paraArray[i] = paraEffectSerialTwo + "para";
[Link](paraArray[i], 13000, 'UnderChar', 'Line|
Bar','',0,40,any,-1,"0x000080FE");
[Link](paraArray[i],
paraEffectSerialTwo);
[Link](paraArray[i], 20, 0);
[Link](paraArray[i], false);
[Link]('0x376A', 'sys');
[Link](20);
}
else if ([Link]('graphic=0x37BE', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()) && [Link]('id=0x03B9',
'sys', any, any, [Link]()-howFarBackInJournal, [Link]())) {
var disarmEffect = [Link]('0x37BE', 'sys', any,
any, [Link]()-howFarBackInJournal, [Link]());
var disarmEffectText = [Link]();
var disarmEffectSerial = /src_serial=.
{10}/.exec(disarmEffectText);
var disarmEffectReplace = disarmEffectSerial[0].replace(/^.
{11}/,"");
var disarmEffectSerialTwo = /.{10}/.exec(disarmEffectReplace);
disarmArray[i] = disarmEffectSerialTwo + "disarm";
disarmCooldownArray[i] = disarmEffectSerialTwo +
"disarmCooldown";
[Link](disarmCooldownArray[i], 20000, 'UnderChar',
'Line|Bar','',0,35,any,-1,"0x00FF00FE");
[Link](disarmCooldownArray[i],
disarmEffectSerialTwo);
[Link](disarmCooldownArray[i], 20, 0);
[Link](disarmCooldownArray[i],
false);
[Link](disarmArray[i], 5000, 'UnderChar', 'Line|
Bar','',0,35,any,-1,"0x000000FE");
[Link](disarmArray[i],
disarmEffectSerialTwo);
[Link](disarmArray[i], 20, 0);
[Link](disarmArray[i], false);
[Link]('0x37BE', 'sys');
[Link](20);
}
else if ([Link]('graphic=0x3709', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()) && [Link]('graphic=0x3776',
'sys', any, any, [Link]()-howFarBackInJournal, [Link]()) &&
[Link]('id=0x00F6', 'sys', any, any, [Link]()-howFarBackInJournal,
[Link]()) && [Link]('id=0x01F7', 'sys', any, any, [Link]()-
howFarBackInJournal, [Link]()) && [Link]('id=0x003', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]())) {
var appleEffect = [Link]('0x3709', 'sys', any,
any, [Link]()-howFarBackInJournal, [Link]());
var appleEffectText = [Link]();
var appleEffectSerial = /src_serial=.{10}/.exec(appleEffectText);
var appleEffectReplace = appleEffectSerial[0].replace(/^.
{11}/,"");
var appleEffectSerialTwo = /.{10}/.exec(appleEffectReplace);
appleArray[i] =appleEffectSerialTwo + "Apple";
[Link](appleArray[i], 30000, 'UnderChar', 'Line|
Bar','',0,25,any,-1,"0x008080FE");
[Link](appleArray[i],
appleEffectSerialTwo);
[Link](appleArray[i], 20, 0);
[Link](appleArray[i], false);
[Link]('0x3709', 'sys');
[Link](20);
}
else if ([Link]('graphic=0x376A', 'sys', any, any,
[Link]()-howFarBackInJournal, [Link]()) && [Link]('id=0x051B',
'sys', any, any, [Link]()-howFarBackInJournal, [Link]())) {
var evasionEffect = [Link]('0x376A', 'sys', any,
any, [Link]()-howFarBackInJournal, [Link]());
var evasionEffectText = [Link]();
var evasionEffectSerial = /src_serial=.
{10}/.exec(evasionEffectText);
var evasionEffectReplace = evasionEffectSerial[0].replace(/^.
{11}/,"");
var evasionEffectSerialTwo = /.{10}/.exec(evasionEffectReplace);
evasionArray[i] = evasionEffectSerialTwo + "evasion";
evasionCooldownArray[i] = evasionEffectSerialTwo +
"evasionCooldown";
[Link](evasionArray[i], 26000, 'UnderChar', 'Line|
Bar','',0,30,any,-1,"0xFF00FFFE");
[Link](evasionArray[i],
evasionEffectSerialTwo);
[Link](evasionArray[i], 20, 0);
[Link](evasionArray[i], false);
[Link](evasionCooldownArray[i], 5000,
'UnderChar', 'Line|Bar','',0,30,any,-1,"0x000000FE");
[Link](evasionCooldownArray[i],
evasionEffectSerialTwo);
[Link](evasionCooldownArray[i], 20, 0);
[Link](evasionCooldownArray[i],
false);
[Link]('0x376A', 'sys');
[Link](20);
}
else if (targetsToTrack[i].YellowHits()) {
mortalArray[i] = targetsToTrack[i].Serial() + "Mortal";
[Link](mortalArray[i], 8000, 'UnderChar',
'Line|Bar','',0,15,any,-1,"0xFFFF00FE");
[Link](mortalArray[i],
targetsToTrack[i].Serial());
[Link](mortalArray[i], 20, 0);
[Link](mortalArray[i], false);
[Link](20);
}
}
[Link](20);
}
}
function magicreflect(){
[Link]();
var toggle = true;
while(![Link]('Magic Reflection')){
[Link](1000);
[Link](self, '0x09C2', 'CAST MAGIC REFLECT');
}
while(true){
[Link](200);
var reflectpool = [Link]('Magic Reflection');
var reflectpoolmax1 = /\d+\D+ reflection pool/;
//[Link]([Link](reflectpoolmax1));
var reflectpoolmax = [Link](reflectpoolmax1);
if([Link]('Magic Reflection') && reflectpoolmax < '1% reflection
pool' && toggle === true){
[Link](self, '0x09C2', 'RUN');
[Link](self, '0x09C2', 'RUN');
[Link](self, '0x09C2', 'RUN');
[Link]('magic reflect', 30000, 'UnderChar', 'Line|Bar',
'0%', 360, -90, 0x09C2, 1, '0xFFFFFFFF');
toggle = false;
} else if([Link]('Magic Reflection') && reflectpoolmax < '1%
reflection pool' && ![Link]('magic reflect') && toggle === false)
{
[Link]([Link](), '0x09C2', 'Recast Reflect');
[Link](5000);
} else if([Link]('Magic Reflection') && reflectpoolmax > '1%
reflection pool' && toggle === false){
toggle = true;
}
}
}
function leashedTeleport() {
while(true) {
[Link](100);
if ([Link]('Rel Por', 'my', self)) {
[Link]('tele2', -1, self, '0x0000', 11, 11, 'land');
[Link]('tele', -1, self, '0x03E8', 24, 24, 'land'); //
RED BLACK 0x081B || GRAY ZONE 0x03E8 || 0x04B0 Purple black || 0x0480 glacial ||
[Link]('Rel Por', 'my', self);
}
if (![Link]() && ![Link]()) {
[Link]('tele2');
[Link]('tele');
}
}
}
function PotsHelper(){
var standardItemDelay = 1450; //increase this if problems
var seed = [Link]('0x1727');
var rightHandWeapon = [Link]('RightHand');
var leftHandWeapon = [Link]('LeftHand');
[Link]('healCooldown', 10000);
[Link]('applecooldown', 31000);
[Link]('orangePetalCooldown',300000);
[Link]('purplePetalCooldown',300000);
[Link]('pieCooldown', 300000);
[Link]('seedcooldown', 600000);
[Link]('manaDraughtCooldown',600000);
[Link]('barrabpotioncooldown',1200000);
while(true){
[Link](100);
var box = [Link]('0x09A9', any, backpack);
var apple = [Link]('0x2FD8', '0x0488',backpack,true);
var pie = [Link]('0x1041', '0x09D3|0x0B8F|0x0507', backpack,
true); // MR, HPR, and HCI pie
if([Link]('0x7611')){
if(![Link]('RightHand') && !
[Link]('LeftHand') && rightHandWeapon != null && ![Link]() && !
[Link]('action')){
if(![Link]('Disarm') && ![Link]()){
[Link]([Link]());
[Link]('action', 1450, 'AboveChar',
'line|bar', 'Wep', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
}
} else if(![Link]('RightHand') && !
[Link]('LeftHand') && leftHandWeapon != null && ![Link]() && !
[Link]('action')){
if(![Link]('Disarm') && ![Link]()){
[Link]([Link]());
[Link]('action', 1450, 'AboveChar',
'line|bar', 'Wep', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
}
} else if([Link]('%') < 70 && [Link]('healCooldown') >=
10000 && [Link]('0x0F0C') && ![Link]() && !
[Link]('action')){
[Link]('0x0F0C');
[Link]('healCooldown',0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'heal', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link]() < 40 && [Link]('seedcooldown') >=
600000 && [Link] && ![Link]() && !
[Link]('action')){
[Link]('0x1727');
[Link]('seedcooldown',0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Seed', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('Strength') && [Link]('0x0F09',
'0x0000') && ![Link]('Invisibility') && ![Link]('Hiding') && !
[Link]() && ![Link]('action') && [Link]() >
[Link]()){
[Link]('0x0F09','0x0000');
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Strength', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link]() < 60 &&
[Link]('barrabpotioncooldown') >= 1200000 && [Link]('0x0F06', '0x04F8')
&& ![Link]('action')){
[Link]('0x0F06', '0x04F8');
[Link]('barrabpotioncooldown', 0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Barrab', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link] && ![Link]('action') &&
([Link]('Evil Omen') || [Link]('Paralyzed') ||
[Link]('Paralyze') || [Link]('crippling nerve strike','sys',any,
any, [Link]() - 1500, [Link]()))){
[Link]('crippling nerve strike','sys');
[Link](500);
[Link](box);
[Link](200);
[Link]([Link](box));
[Link]([Link](box));
[Link]('action', 1450, 'AboveChar', 'line|
bar', 'Box', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(([Link]('Corpse Skin') ||
[Link]('Curse')) &&
[Link]('graphic=0x3709','sys','0',any,[Link]()-500) &&
[Link]('id=0x0208','sys','0',any,[Link]()-500) &&
[Link]('applecooldown') >= 31250 && [Link]('0x2FD8', '0x0488') && !
[Link]('action')){
var journMess =
[Link]('graphic=0x3709','sys','0',any,[Link]()-500);
var text = [Link]();
if([Link](text,[Link]())){
[Link](apple[0], self);
[Link](100);
var journalMessage = [Link]('A tasty
bite','sys|my','0',any,[Link]()-standardItemDelay, [Link]());
if(journalMessage !== null){
[Link]('applecooldown', 0);
[Link]('A tasty bite','sys|my');
}
[Link]('graphic=0x3709','sys');
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Apple FS', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
}
[Link]('graphic=0x3709','sys');
} else if ([Link]('0x0F07','0x0000') && [Link]() &&
![Link]() && ![Link]('Invisibility') && !
[Link]('Hiding') && ![Link]() && !
[Link]('action')){
[Link]('0x0F07');
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Cure', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if (![Link]('Strength') && [Link]('0x0F09',
'0x0000') && ![Link]('Invisibility') && ![Link]('Hiding') && !
[Link]() && ![Link]('action')){
[Link]('0x0F09','0x0000');
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Strength', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('Agility') &&
[Link]('0x0F08','0x0000') && ![Link]('Invisibility') && !
[Link]('Hiding') && ![Link]() && !
[Link]('action')){
[Link]('0x0F08');
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Agility', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('orange petals') &&
[Link]('0x1021', '0x002B') && ![Link]('Invisibility') && !
[Link]('Hiding') && [Link]('orangePetalCooldown') >= 300000 && !
[Link]() && ![Link]('action')){
[Link]('0x1021', '0x002B');
[Link]('orangePetalCooldown',0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Orange Petal', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
[Link](1000);
} else if(![Link]('rose of trinsic petals') &&
[Link]('0x1021', '0x000E') && ![Link]('Invisibility') && !
[Link]('Hiding') && [Link]('purplePetalCooldown') >= 300000 && !
[Link]() && ![Link]('action')){
[Link]('0x1021', '0x000E');
[Link]('purplePetalCooldown',0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Purple Petal', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]() && [Link]('Bushido') >=
400 && ![Link]('Evasion') && ![Link]('Confidence') && !
[Link]('Counter Attack') && ![Link]('Invisibility') && !
[Link]('Hiding')){
[Link]('Counter Attack');
[Link](5);
} else if([Link]() < 30 &&
[Link]('manaDraughtCooldown') >= 600000 && [Link]('0x0FFB','0x0128') && !
[Link]() && ![Link]('action')){
[Link]('0x0FFB', '0x0128');
[Link]('manaDraughtCooldown', 0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Mana Draught', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('magic fish buff') && [Link] && !
[Link]('Invisibility') && ![Link]('Hiding') &&
[Link]('pieCooldown') >= 300000 && ![Link]() && !
[Link]('action')){
[Link]('0x1041', '0x09D3|0x0B8F|0x0507', backpack,
true);
[Link]('pieCooldown',0);
[Link]('action', standardItemDelay,
'AboveChar', 'line|bar', 'Pie', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
}
}
}
}

function teleDoubleDip() { //this casts teleport if no target, if have target it


teleports up one floor
if ([Link]()) {
[Link](any, Player.X(),Player.Y(),Player.Z()+20);
}
else {
[Link]('Teleport');
}
}
function teleScrollDoubleDip() { //this casts teleport if no target, if have
target it teleports up one floor
if ([Link]()) {
[Link](any, Player.X(),Player.Y(),Player.Z()+20);
}
else {
[Link]('0x1F42');
}
}
function poisonDoubleDip() {
var enemyMounts = [Link](any, any, ground, 'nothuman|live|near|
ignorefriends',9,'orange',true,'AnimalForms');
if ([Link]() && [Link]) {
[Link](enemyMounts[0].Serial());
}
else {
[Link]('poison');
}
}
function cureDoubleDip() {
var Mounts = [Link](any, any, ground, 'nothuman|live|
near',9,'green',true,'AnimalForms');
if ([Link]() && [Link]) {
[Link](Mounts[0].Serial());
}
else {
[Link]('cure');
}
}
function MysticBombardTrigger(){
[Link]('686');
if([Link](10000, true)){
var gump0 = [Link]('last');
if((gump0 !== null) && (![Link]()) && ([Link]() ===
'0x00002336')){
[Link]([Link](110));
}
}
}
function pennysPvPLooterBonanza() {
//Version 1.0.0
var standardItemDelay = 1500;
var dropContainer;
var corpses = [Link]('0x2006|0x0ECE|0x0ECC|0x0ECA|0x0ED2|0x0ED0|
0x0ECF|0x0ECB|0x0ED1', any, ground, " ", 1);
var bola = [Link]('0x26AC', any, ground, " ", 1);
var statpot = [Link]('0x0F09', '0x09C4', ground, " ", 1);
var pouch = [Link]('0x0E79', '0x0000', ground, " ", 1);
var moongate = [Link]('0x0F6C|0x0DDB', '0x0000', ground, " ", 1);
var emptyBottles = [Link]('0x0F0E',any, backpack, ' ',
'finddistance', ' ', true);
var stackCountNova = [Link]('0x0F09','0x000D',backpack, ' ',
'finddistance', ' ', true);
var stackCountStat = [Link]('0x0F09','0x09C4',backpack, ' ',
'finddistance', ' ', true);
var stackCountApple = [Link]('0x2FD8','0x0488',backpack, ' ',
'finddistance', ' ', true);
var stackCountConflag = [Link]('0x0F06','0x0489',backpack, ' ',
'finddistance', ' ', true);
var stackCountRefresh = [Link]('0x0F0B','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountCure = [Link]('0x0F07','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountHeal = [Link]('0x0F0C','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountDex = [Link]('0x0F08','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountStr = [Link]('0x0F09','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountBarrab = [Link]('0x0F06','0x04F8',backpack, ' ',
'finddistance', ' ', true);
var stackCountUrali = [Link]('0x0F06','0x044A',backpack, ' ',
'finddistance', ' ', true);
var stackCountFear = [Link]('0x0F0D','0x0005',backpack, ' ',
'finddistance', ' ', true);
var stackCountPurpPetal = [Link]('0x1021','0x000E',backpack, ' ',
'finddistance', ' ', true);
var stackCountOrangePetal = [Link]('0x1021','0x002B',backpack, ' ',
'finddistance', ' ', true);
var stackCountTeleScroll = [Link]('0x1F42','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountWallScroll = [Link]('0x1F44','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountCurseScroll = [Link]('0x1F47','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountDeadly = [Link]('0x0F0A','0x0000',backpack, ' ',
'finddistance', ' ', true);
var stackCountMRPie = [Link]('0x1041','0x0B8F',backpack, ' ',
'finddistance', ' ', true);
var stackCountHPRPie = [Link]('0x1041','0x09D3',backpack, ' ',
'finddistance', ' ', true);
var stackCountShatter = [Link]('0x0F0D','0x003C',backpack, ' ',
'finddistance', ' ', true);
var stackCountBola = [Link]('0x26AC','0x0000',backpack, ' ',
'finddistance', ' ', true);
for (i=0;i<[Link];i++) {
var tempObject = [Link](corpses[i]);
if ([Link]([Link](),[Link]())) {
var myCorpse = tempObject;
break;
}
else {
var myCorpse = null;
}
}
if (myCorpse != null) {
[Link]([Link]());
[Link](self, 45, '--Recovered Corpse--');
}
else if ([Link]) {
[Link](self, 45, 'Using and Taking Moongate');
[Link](moongate[0].Serial());
[Link](200);
var gump2 = [Link](any, '0x00000258');
if ((gump2 !== null) && (![Link]()) && ([Link]() ===
'0x00000258')) {
[Link]('generic', 100, 100, any, '0x00000258');
[Link](gump2.X() + 10, gump2.Y() + 110, 'left');
//malas
[Link](gump2.X() + 200, gump2.Y() + 60, 'left');
//umbra
[Link](gump2.X() + 10, gump2.Y() + 210, 'left'); //
OKAY button
}
var gump3 = [Link](any,'0x0000232D');
if ((gump3 !== null) && (![Link]()) && ([Link]() ===
'0x0000232D')) {
[Link]([Link](1));
[Link](100);
}
}
else if (corpses != '') {
for (i = [Link] - 1; i >= 0; i--) {
if ([Link](corpses[i])) {
var corpses1 = [Link](corpses[i]);
if (corpses1 != null) {
[Link](self, 45, 'Beginning to loot ' +
[Link]());
var items = [Link]('0x0F06', '0x04F8',
[Link]()); //barrab
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link](([Link]() - [Link]()) / 2), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x04F8|0x1727', any,
[Link]()); //seed
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link]([Link]() - [Link]()), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x0F09', '0x09C4',
[Link]()); //stat loss
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link](([Link]() - [Link]()) / 2), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x0F09', '0x000D',
[Link]()); //supernova
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link](([Link]() - [Link]()) / 2), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x0E7E|0x09A9', any,
[Link]()); //trapped box
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
1, backpack);
[Link](100);
var itemsInBackPack =
[Link]('0x0E7E|0x09A9', any, backpack, ' ', 'finddistance', ' ', true);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x0FFB', '0x0128',
[Link]()); //draught
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link]([Link]() - [Link]()), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x1847', any,
[Link]()); //balm of wisdom
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link]([Link]() - [Link]()), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x0F06', '0x044A',
[Link]()); //urali
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link](([Link]() - [Link]()) / 2), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x26AC', any,
[Link]()); //bolas
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 3) {
[Link](items[y].Serial(),
[Link](([Link]() - [Link]()) / 4), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
var items = [Link]('0x2FD8', '0x0488',
[Link]()); //apples
if (items != '') {
for (y = 0; y < [Link]; y++) {
while (items[y].Container() ===
[Link]() && [Link]() < [Link]() - 1) {
[Link](items[y].Serial(),
[Link]([Link]() - [Link]()), backpack);
[Link](100);
if ([Link]('You can not
pick that up.', 'sys')) {
[Link]('You can
not pick that up.', 'sys');
break;
}
if ([Link]('That container
cannot hold more weight.', 'sys')) {
[Link]('That
container cannot hold more weight.', 'sys');
break;
}
}
}
}
}
}
[Link](self, 45, '--Finished Looting ' +
[Link]() + '--');
}
}
else if ([Link]) {
[Link](self, 45, 'Looting Pouch');
if (pouch != '') {
for (y = 0; y < [Link]; y++) {
while (pouch[y].Container() == '0xFFFFFFFF' &&
[Link]() < [Link]() - 1 && pouch[y].Distance() <= 1) {
[Link](pouch[y].Serial(), 0, backpack);
[Link](100);
if ([Link]('You can not pick that up.',
'sys')) {
[Link]('You can not pick that up.',
'sys');
break;
}
if ([Link]('That container cannot hold more
weight.', 'sys')) {
[Link]('That container cannot hold
more weight.', 'sys');
break;
}
}
}
}
[Link](self, 45, '--Pouch Looted--');
}
else if ([Link]) {
[Link](self, 45, 'Ooh, piece of candy.');
if (bola != '') {
for (y = 0; y < [Link]; y++) {
while (bola[y].Container() == '0xFFFFFFFF' &&
[Link]() < [Link]() - 3 && bola[y].Distance() <= 1) {
[Link](bola[y].Serial(),
[Link](([Link]() - [Link]()) / 4), backpack);
[Link](100);
if ([Link]('You can not pick that up.',
'sys')) {
[Link]('You can not pick that up.',
'sys');
break;
}
if ([Link]('That container cannot hold more
weight.', 'sys')) {
[Link]('That container cannot hold
more weight.', 'sys');
break;
}
}
}
}
[Link](self, 45, '--Bola Looted--');
}
else if ([Link]) {
[Link](self, 45, 'Looting Stat Pot');
if (statpot != '') {
for (y = 0; y < [Link]; y++) {
while (statpot[y].Container() == '0xFFFFFFFF' &&
[Link]() < [Link]() - 1 && statpot[y].Distance() <= 1) {
[Link](statpot[y].Serial(),
[Link](([Link]() - [Link]()) / 2), backpack);
[Link](100);
if ([Link]('You can not pick that up.',
'sys')) {
[Link]('You can not pick that up.',
'sys');
break;
}
if ([Link]('That container cannot hold more
weight.', 'sys')) {
[Link]('That container cannot hold
more weight.', 'sys');
break;
}
}
}
}
[Link](self, 45, '--Stat Pot Looted--');
}
else if ([Link]) {
[Link](self, 45, 'Getting Rid of Bottles');
for (i=0;i<[Link];i++) {
while (emptyBottles[i].Container() != '0xFFFFFFFF') {
[Link](emptyBottles[i].Serial(), 0);
[Link](100);
}
}
[Link](self, 45, '--Bottles Gone--');
}
else if ([Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1 ||
[Link] > 1) {
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountNova[i].Serial(),0,stackCountNova[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountStat[i].Serial(),0,stackCountStat[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountApple[i].Serial(),0,stackCountApple[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountConflag[i].Serial(),0,stackCountConflag[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountRefresh[i].Serial(),0,stackCountRefresh[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {
[Link](stackCountCure[i].Serial(),0,stackCountCure[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountHeal[i].Serial(),0,stackCountHeal[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountDex[i].Serial(),0,stackCountDex[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountStr[i].Serial(),0,stackCountStr[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountBarrab[i].Serial(),0,stackCountBarrab[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountUrali[i].Serial(),0,stackCountUrali[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountFear[i].Serial(),0,stackCountFear[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountPurpPetal[i].Serial(),0,stackCountPurpPetal[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {
[Link](stackCountOrangePetal[i].Serial(),0,stackCountOrangePetal[0].Serial(
));
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountTeleScroll[i].Serial(),0,stackCountTeleScroll[0].Serial())
;
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountWallScroll[i].Serial(),0,stackCountWallScroll[0].Serial())
;
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountCurseScroll[i].Serial(),0,stackCountCurseScroll[0].Serial(
));
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountDeadly[i].Serial(),0,stackCountDeadly[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountMRPie[i].Serial(),0,stackCountMRPie[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountHPRPie[i].Serial(),0,stackCountHPRPie[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountShatter[i].Serial(),0,stackCountShatter[0].Serial());
[Link](standardItemDelay);
}
}
if ([Link] > 1) {
for (i=1;i<[Link];i++) {

[Link](stackCountBola[i].Serial(),0,stackCountBola[0].Serial());
[Link](standardItemDelay);
}
}
[Link](self, 45, '--Finished Stacking Stuff--');
}
else {
[Link](self, 45, '--No action to take--');
}
}
function DurabilityCHECKER(){
mindur = 100; //Durability to alert you at.

layers = [
0, 'RightHand', 'LeftHand', 'Shoes', 'Pants', 'Shirt', 'Helmet', 'Gloves',
'Ring',
'Talisman', 'Necklace', 'Hair', 'Waist', 'InnerTorso', 'Bracelet', 'Face',
'Beard', 'MidTorso',
'Earrings', 'Arms', 'Cloak', 'Backpack', 'Robe', 'Eggs', 'Legs']
[Link]("Minimum Durability set at: " + mindur)
for(var i =1; i< [Link]; i++){
if([Link](i)){
var theobj = [Link](i);
var properties = [Link]();
if (![Link]([Link](), 'Durability')){
//[Link]('-')
[Link](10);
}else{
var matches = /Durability (\d+)\s\/\s(\
d+)/.exec(properties);
if([Link] > 2 && Number(matches[1]) < mindur)
{
[Link](layers[[Link]()] + ": "
+matches[1] + " / " +matches[2])
}
}
}
}
}

function UseGate(){
[Link]();
[Link]([Link](1));
if (![Link]("0x0F6C|0x4BCB|0x0DDB", "-1", 2)){
[Link](self, 1153, "Gate is too far away!");
[Link]();
}
}
function tamerDismount(){
[Link]('self');
[Link](100);
[Link]('All Kill');
}
//--#Pet Healer all in one
function petHealerProPlus(){ //This is the main pet healer script which plays the 2
scripts below
if ([Link]('petSpellHealCure') ||
[Link]('petBandieRez')){
[Link]('petSpellHealCure');
[Link]('petBandieRez');
}else{
[Link]('Select ^ Pet 1 or Press Escape')
[Link]('myPetObj') // Pet Serial #
[Link]('myPetObj')
var myPetOG = [Link]('myPetObj')
if (myPetOG != null){
var myPetSerial = [Link]()
[Link]('petSpellHealCure', true, myPetSerial);
[Link]('petBandieRez', true, myPetSerial);
}
}
}
function petSpellHealCure(myPetSerial){ // Works in tandem with above function!!!
var myPet = [Link](myPetSerial)
while (![Link]()){
if (myPet != null){
if ([Link]('Mount') != [Link]()){
[Link]([Link]())
if ([Link]([Link]()) < 12){
if ([Link]('%') < 81 && ![Link]() && !
[Link]()){
[Link]('29', [Link]()) // gHeal
[Link](2500) // Casting Cooldown
}
if ([Link]()){
[Link]('11', [Link]()) // Cure
[Link](1500) // Casting Cooldown
}
}
}
}
[Link](250)
}
}
function petBandieRez(myPetSerial){ // Works in tandem with above 2 functions!!!
var myPet = [Link](myPetSerial)
while (![Link]()){
if (myPet != null){
[Link]([Link]())
if (([Link]() || [Link]("%") < 90 || [Link]()) &&
[Link]([Link]()) < 3)
if (![Link]('veterinary')) // vet skill
[Link]([Link]()) // Bandie
[Link](250)
}
}
}
//--#Poison Darts
function Dart(){
var itemID = '0x27AA';
var list = [Link](itemID);
for (var i = 0; i < [Link]; i++){
var item = list[i];
var itemProps = [Link](item).Properties();
if (![Link](itemProps, 'Uses Remaining: 0')){
[Link](item);
[Link](1000);
[Link]('lasttarget');
break;}
}
}
function useShuriTargetLast(){
var itemID = '0x2790';
var list = [Link](itemID);
for (var i = 0; i < [Link]; i++){
var item = list[i];
var itemProps = [Link](item).Properties();
if (![Link](itemProps, 'Uses Remaining: 0')){
[Link](item);
[Link](1000);
[Link]('lasttarget');
break;}
}
}
function darttester(){ //Works in tandem with the above function!
var dist = [Link](lasttarget);

[Link](lasttarget);
[Link](dist < 6 ? Dart() : useShuriTargetLast());
}
//--#Equip weapons
function DemonSlayer(){
[Link]('AOE demon'); //change this name to the name in your Agents >
Dress
[Link]('ST demon'); //For all
the [Link]('TYPE NAME')
}
function ArachnidSlayer(){
[Link]('AOE spider');
[Link]('ST spider');
}
function ReptileSlayer(){
[Link]('AOE reptile');
[Link]('ST reptile');
}
function UndeadSlayer(){
[Link]('AOE undead');
[Link]('ST undead');
}
function RepondSlayer(){
[Link]('AOE repond');
[Link]('ST repond');
}
function waterboss(){
[Link]('AOE water');
[Link]('ST water');
}
function FeySlayer(){
[Link]('AOE fey');
[Link]('ST fey');
}
function ElementSlayer(){
[Link]('AOE element');
[Link]('ST element');
}
//--#Tmaps Fishing Stat Gump
// You should be at least in same map for run to the treasure location, sometimes
it will not get the route and you will need to move a bit near.
// Example: if the treasure is near trinsic territory, don't try run it at yew...
get moongate to trinsic and run it.
function RunToTmap(){

[Link]('Tracker', 1); // Incase this option is not set


[Link]('tmap');

var tmap = [Link]('tmap');

if(!tmap){
[Link]("Treasure map not found!");
return -1;
}

[Link]([Link]());
[Link](1000);

var pos = [Link]();


var x = pos.X();
var y = pos.Y();

// Print coords and show quest arrow, seems a bit buggy and sometimes is not
the real location, anyway we will run to the right position.
[Link]("Map Coords: " + x + "," + y);
[Link](true, pos.x, pos.y);

// Run to the treasure location


[Link](x, y, 0, 1, 255, 1);
[Link](1000);

// Dig the treasure


[Link]('tmap');
[Link]('tmap', 305);

if([Link](3000)) {
[Link]('any', x, y, 0);
}
}
function fishing(){
while(true){
[Link]('0x0DC0', '0xFFFF');
if([Link](1000)){
[Link]('water', 4, 4, 4);
[Link]('7500');
}
[Link]('0x0DC0', '0xFFFF');
if([Link](1000)){
[Link]('water', 4, -4, 4);
[Link]('7500');
}
[Link]('0x0DC0', '0xFFFF');
if([Link](1000)){
[Link]('water', -4, -4, 4);
[Link]('7500');
}
[Link]('0x0DC0', '0xFFFF');
if([Link](1000)){
[Link]('water', -4, 4, 4);
[Link]('7500');
}
if([Link]("biting here", 'my|sys' ,0, any, 0, 0)){
[Link]("fishes all gone");
[Link]();
[Link]('forward'); //[Link]('forward');
[Link]('7500');
[Link]('stop'); //[Link]();
//break;
}

}
}
function SetPropsGump(){
[Link](0);
[Link](500);
var list = [
{ name: "Hit Point Regeneration"}, { name: "Stamina Regeneration"},
{ name: "Mana Regeneration"},
{ name: "Hit Point Increase"}, { name: "Stamina Increase"},
{ name: "Mana Increase"},
{ name: "Strength Bonus"}, { name: "Dexterity Bonus"}, { name:
"Intelligence Bonus"},
{ name: "Enhance Potions"}, { name: "Lower Mana Cost"}, { name:
"Lower Reagent Cost"},
{ name: "Spell Damage Increase"}, { name: "Hit Lower Defense"},
{ name: "Hit Chance Increase"}, { name: "Defense Chance
Increase"}, { name: "Swing Speed Increase"},
{ name: "Damage Eater"}, { name: "Kinetic Eater"}, { name:
"Fire Eater"}, { name: "Cold Eater"},
{ name: "Poison Eater"}, { name: "Energy Eater"}, { name:
"Physical Resist"}, { name: "Fire Resist"},
{ name: "Cold Resist"}, { name: "Poison Resist"}, { name:
"Energy Resist"}
];

var updateDelay = 1000;


var gump = [Link](1);
[Link]();
var heightStep = 20;
var width = 210;
var height = 30 + (heightStep * [Link]);
var textX = 20;
var textY = 15;

[Link](100);
[Link](200);
[Link](false);
[Link](0, 0, "0x9C40", width, height);

for(var l = 0; l < [Link]; l++){


var item = list[l];

[Link](textX, textY, "0x0042", "", 0, l + 1);


textY += heightStep;
}

[Link]();
gump = [Link](1);

while(![Link]()){
var textY = 15;

for(var l = 0; l < [Link]; l++){


var item = list[l];
var count = 0;

for(var i = 1; i <= 24; i++){


var obj = [Link](i);

if(!obj){
continue;
}

var re = new RegExp([Link] + " (\\d+)");


var property = [Link]([Link]());

if(property){
count += parseInt(property[1], 10);
}
}

if(count){
[Link](textX, textY, "0x0042", [Link] + " " +
(count >= [Link] ? [Link] : count), 0, l + 1);
}else{
[Link](textX, textY, "0x0024", [Link], 0, l + 1);
}

textY += heightStep;
}

[Link]();
[Link](updateDelay);
}
}
function AutoRezLoot(){
while(true){
if([Link]()){
[Link](0);
[Link](100);
[Link](1);
[Link](10000);
}
if([Link](1000)){
var gump0 = [Link]('last');
if((gump0 !== null) && (![Link]()) && ([Link]() ===
'0x000008AF')){
[Link]([Link](2));
[Link](100);
}
}
if(![Link]()){
[Link]('0x2006', '0xFFFF', 'ground');//.Properties().match(/A
Corpse Of/);
[Link](100);
}
if(![Link]() && ![Link]() && ![Link]()){
[Link]('Hiding');
[Link](10500);
}
}
}
function bandaidStock(){
while(true){
[Link](1500);
[Link]('organizer', 'bandaids', 'start');
[Link](1500);
}
}
//--#Auto Fisher Drop Off
/*
Requirements: GM Magery and eval and 2/6 casting Sorry I don't support
archery to taming yet.

1. have a runic atlas with your rune home as your default. Make sure the
name of the book is 'Fishing'
2. Get a Tokuno Ship. Put the rune somewhere in your house. Add to cxFisher
configuration
3. Put a trash can and 3 boxes in your house.
- box for fish
- box for sos, white pearls, and the little scales.
- box for big fish
4. Add the serials, x, y, and z coordinates to the configuration as shown
below.
5. sail should be true
6. collectBigFish: If set to false you will throw large fish in the trash in
your house.
7. Add your characters serial to the fisherSerial line in quotes.

{ //Fisherman
fisherSerial: 'yourserial',
sail: true,
collectBigFish: true,
fishBox: {
serial: 'boxserial',
x: 0,
y: 0,
z: 0
},
bigFishBox: {
serial: 'boxserial',
x: 0,
y: 0,
z: 0
},
shipRune: {
serial: 'runeserial',
x: 0,
y: 0,
z: 0
},
trashCan: {
serial: 'trashcanserial',
x: 0,
y: 0,
z: 0
},
treasureChest: {
serial: 'sosChestSerial',
x: 0,
y: 0,
z: 0
}
},
*/

function moveUnitTest(){
//moveShip(0, -6);
moveShip(6, 0);
}

function getSosGump(){
[Link]([Link](), '0x0674', 'Select the sos');
[Link]('sosObject');
[Link]();
var sos = [Link]('sosObject');

if ( sos != null ){
[Link]([Link]());
[Link]('3000');
}

var gump = getGumpByID('0x000F3E6B');

if ( gump != null ){
const text = [Link](0);
var coords = [Link](text);
if ( coords != null ){
[Link](coords.X(), coords.Y(),
"Trammel");
[Link]();
[Link](text);
[Link]('X: ' + coords.X() + ' Y: ' + coords.Y());
}
}

function fishUpSos(){
[Link]('Tracker', 1);
[Link]([Link](), '0x0674', 'Select the sos');
[Link]('sosObject');
[Link]();
var sos = [Link]('sosObject');

if ( sos != null ){
[Link]([Link]());
[Link]('3000');
}
var gump = getGumpByID('0x000F3E6B');

if ( gump != null ){
var text = [Link](0);
var coords = [Link](text);
if ( coords != null ){
[Link]('0x0DBF');
[Link]('any', coords.X(), coords.Y(), 0);
}
}

function leoSosNotes(){
if (
[Link]("last") &&
[Link]("last").ID() == "0x000F3E6B" &&
[Link]("generic", any, "0x000F3E6B")
) {
[Link]("last").Close();
var text = [Link]("last").Text(0);
var coordObject = [Link](text);
var coordX = coordObject && coordObject.X();
var coordY = coordObject && coordObject.Y();
};
//
[Link](coordX, coordY, "Trammel");
[Link](self, "1196" , "Match: "+coordX+", "+coordY+" : "+region);
}

function getGumpByID(gumpId){
var gump;
var returnGump = null;

for (var i=0;i<[Link]();i++){


gump = [Link](i);
if ( gump != null ) {
if ([Link]() === gumpId && ![Link]()){
returnGump = [Link](i);
}
}
}

return returnGump;
}

const whitePearlGraphic = '0x3196';

const cxFishers = [
{ //Ragnar Lothbrok
fisherSerial: '0x02C49AD2',
sail: true,
collectBigFish: true,
fishBox: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
bigFishBox: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
shipRune: {
serial: '0x42C4822D',
x: 869,
y: 1278,
z: 32
},
trashCan: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
treasureChest: {
serial: '0x4031A1ED',
x: 868,
y: 1280,
z: 32
}
},
{ //Ahab
fisherSerial: '0x03845010',
sail: true,
collectBigFish: true,
fishBox: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
bigFishBox: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
shipRune: {
serial: '0x42C4822D',
x: 869,
y: 1278,
z: 32
},
trashCan: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
treasureChest: {
serial: '0x4031A1ED',
x: 868,
y: 1280,
z: 32
}
},
{ //Calypso
fisherSerial: '0x0212D197',
sail: true,
collectBigFish: false,
fishBox: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
bigFishBox: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
shipRune: {
serial: '0x4035C0F7',
x: 868,
y: 1279,
z: 32
},
trashCan: {
serial: '0x42CAA8C3',
x: 869,
y: 1279,
z: 32
},
treasureChest: {
serial: '0x4031A1ED',
x: 868,
y: 1280,
z: 32
}
}

function findTillerMan(){
var returnValue = null;
const tillerMan = [Link]('any', 'any', 'ground', 'mobile|human|
near', 10, 'yellow')[0];

if ( tillerMan != null ){
returnValue = [Link]();
}

return returnValue;

function goFish() {
var zone = {};

checkProtection();

//Determine zone allow for 12 tiles forward and 12 back to stay in deep water
zone = resetZone();

//Fish the current locaiton


fishZone(zone);

while ( ![Link]() ) {
[Link]();
moveShip(0, -12);

zone = resetZone();

fishZone(zone);

moveShip(0, 24);

zone = resetZone();

fishZone(zone);

moveShip(0, -12);

zone = resetZone();

fishZone(zone);
}
}

function resetZone() {

const tillemanLocal = [Link](findTillerMan());

[Link]('500');

zone = {
x: tillemanLocal.X(),
y: tillemanLocal.Y() + 2,
z: tillemanLocal.Z()
};

return zone;

function fishZone(zone) {

var localZone = zone;

//Find the tillerman


tillerman = [Link]([Link](findTillerMan()));

//Fish to the west.


[Link](zone.x - 3, zone.y, zone.z);
[Link]('1000');

//Reset the zone


localZone = resetZone();

//Message
[Link]('Fishing to the left');
//Fish
fishSpot(localZone, -5);

//Fish to the east.


[Link](zone.x + 3, zone.y, zone.z);
[Link]('1000');

//Reset the zone


localZone = resetZone();

//Message
[Link]('Fishing to the right');

//fish
fishSpot(localZone, 5);
}

function fishSpot(zone, diff) {

const fishingPole = findFishingPole();


[Link]();
const delay = '10000';
const fail = 'You fish a while, but fail to catch anything.';
const fishToFarAway = 'You need to be closer to the water to fish!';
const cannotSeeLocation = 'You cannot see that location';
const success = 'You pull out an item';
const nofish = "The fish don't seem to be biting here.";
const danger = "doesn't look like a fish!";
const chuckWeight = [Link]() - 150; //account for lage fucking
fish.
var currentx;
var currenty;
var currentz;

while ( ![Link]() && [Link](nofish) == null && [Link]()


< chuckWeight
&& [Link](fishToFarAway) == null &&
[Link](cannotSeeLocation) == null ) {
//Clear journal
[Link]();

[Link](fishingPole);
[Link]('1000');
[Link]('any', zone.x + diff, zone.y, zone.z);
[Link](delay);

if ([Link](danger) != null) {
[Link]('Found danger');
killSeaSerphent();
zone = resetZone();
}

if ( [Link]('%') < 90 ){
killSpawn();
}

if ( [Link]() >= chuckWeight ) {


currentx = Player.X();
currenty = Player.Y();
currentz = Player.Z();
dropLoot();
[Link](currentx, currenty, currentz);
}
}

if ( [Link]() >= chuckWeight ) {


currentx = Player.X();
currenty = Player.Y();
currentz = Player.Z();
dropLoot();
[Link](currentx, currenty, currentz);
}

function throwAwayShoes(trash) {
//Including small fish in this
//0x0DCA are fishing nets
//0x14EB are treasure maps
const shoes = '0x170D|0x1711|0x170C|0x170F|0x0DD6|0x1712|0x170B|0x1710|
0x170E';

chuck = [Link](shoes);

[Link](trash);
[Link]('1100');

[Link](function(crap){
// [Link](crap);
// [Link]('1000');
// [Link](trash);
[Link](crap, 0, trash);
[Link]('1100');
});

//Throw away big fish if you are not collecting them.


if ( !shouldCollectBigFish() ){
throwAwayBigFish(trash);
}

function killSeaSerphent() {
//0x0096 - Sea Serphent
const monster = '0x0096';

var target = [Link](monster, 'any', 'any', 'any', 12);

var obj = [Link](target);

while ( [Link]() > 0 ) {


[Link]('Energy Bolt', [Link]());
[Link]('3000');
}

//Add a delay
[Link]('1500');
[Link]();

//Loot the damn thing.


lootSeaSerphent();

function killSpawn() {
const monster = 'any';

var target = [Link](monster, 'any', 'ground', 'mobile|nonhuman', 8,


'gray|criminal');

var obj = [Link](target);

if ( obj != null ){
while ( [Link]() > 0 ) {
[Link]('Energy Bolt', [Link]());
[Link]('3000');
healSelf();
cureSelf();
}
}

//Add a delay
[Link]('1500');

function throwAwayFish(fishBox) {
//Including small fish in this
const fish = '0x09CF|0x4303|0x09CE|0x4302|0x4307|0x4303|0x44C3|0x44C6|0x09CD|
0x4302|0x09CC|0x44C4|0x4306|0x44C3|0x44C5|0x4305';

chuck = [Link](fish);

[Link]([Link]);
[Link]('1100');

[Link](function(crap){
[Link](crap, 0, [Link]);
[Link]('1100');
});
}

function throwAwayBigFish(fishBox) {
//Including small fish in this
const searchString = 'A Big Fish|Caught By';
const fish = '0x09CF|0x4303|0x09CE|0x4302|0x4307|0x4303|0x44C3|0x44C6|0x09CD|
0x4302|0x09CC|0x44C4|0x4306|0x44C3|0x44C5|0x4305';
var obj = {};

chuck = [Link](fish);

[Link](fishBox);
[Link]('1100');

[Link](function(crap){
obj = [Link](crap);
if ( obj != null ){
if ( [Link]([Link](), searchString) ){
[Link]([Link](), 0, fishBox);
[Link]('1100');
}
}
});
}

function stashSosAndReagents(treasureBox) {
//0xA30C represents MIB's
//0x3196 White Pearks
const treasureSearch = '0x3196|0xA30C|0x14EB|0x0DCA|0x573A';
var obj = {};

treasure = [Link](treasureSearch);

[Link]([Link]);
[Link]('1100');

[Link](function(t){
[Link](t, 0, [Link]);
[Link]('1100');
});
}

function lootSeaSerphent() {

const corpse = '0x2006';


const loot = '0x14EB|0xA30C|0x0DCA';
var corpses = [Link](corpse, 'any', 'ground', any, 12);
var obj = [Link](corpses);
var obj2Loot = {};

if ( obj != null ) {

var xdiff = Player.X() - obj.X();


var ydiff = Player.Y() - obj.Y();

//Move the ship to the corpse.


moveShip(xdiff, ydiff);

//Extra wait for accuracy


[Link]('1500');

//Open the corpse


[Link]([Link]());

//Delay
[Link]('1100');

//loot the stuff


var corpsecontainer = [Link](lastcontainer);

//Find what to loot


var loot2get = [Link](loot, any, corpsecontainer);
[Link]('1500');

//Loot it!
if ( [Link] > 0 ) {
[Link](function(stuff){
obj2Loot = [Link](stuff);
[Link]([Link]());
[Link]('3000');
});
}

//Close container
[Link]('container', corpsecontainer);

//ignore the Container


[Link](corpsecontainer);
[Link]([Link]());
}

//Love the ship backpack


moveShip((xdiff * -1), (ydiff * - 1));
};

function moveShip(xdiff, ydiff) {


const debug = false;

if ( debug) {
[Link]();
[Link]('Player.X: ' + Player.X() + ' Player.Y:' +
Player.Y());
}

if ( isSailer() ){
var xValue = Player.X();
var yValue = Player.Y();

//Move north or south


if ( xdiff > 0 ) {
// while ( Player.X() != xValue - xdiff ){
// if ( debug) {
// [Link]('Player.X: ' + Player.X());
// }
// [Link]('left one');
// [Link]('3000');
// }
for (var i=0;i<xdiff;i++) {
[Link]('left one');
[Link]('3000');
}
}
else if ( xdiff < 0 ) {
for (var i=0;i<[Link](xdiff);i++) {
[Link]('right one');
[Link]('3000');
}
// while ( Player.X() != xValue + xdiff ){
// [Link]('right one');
// [Link]('3000');
// }
}

//move east or west


if ( ydiff > 0 ) {
for (var i=0;i<ydiff;i++) {
[Link]('forward one');
[Link]('3000');
}
// while ( Player.Y() != yValue - ydiff ){
// [Link]('forward one');
// [Link]('3000');
// }
}
else if ( ydiff < 0 ) {
for (var i=0;i<[Link](ydiff);i++) {
[Link]('backward one');
[Link]('3000');
}
// while ( Player.Y() != yValue + ydiff ){
// [Link]('backward one');
// [Link]('3000');
// }
}
}
}

//This will need to be configured for individual users.


function dropLoot() {
const stepDelay = '175';

//Serial for the rune to your house.


const runeHome = findRuneHome();

//Serial for the rune to your ship (MAKE A COPY!)


const runeShip = findShipRune();

//Recall home
[Link]('Recall', runeHome);

//Wait
[Link]('4000');
[Link]();

//Walk to trash can.


const trashCan = findTrashCan();
cxWalkToZCheck(trashCan.x, trashCan.y, trashCan.z);

//Throw away trash


throwAwayShoes([Link]);

//Deal with large fish.


if ( shouldCollectBigFish() ){
//drop the big fish in this box
const bigFishBox = findBigFishBox();

//Walk to Big Fish Box


cxWalkToZCheck(bigFishBox.x, bigFishBox.y, bigFishBox.z);

//Throw away Big Fish


throwAwayBigFish([Link]);
}
const fishBox = findFishBox();

//Walk to Fish Box


cxWalkToZCheck(fishBox.x, fishBox.y, fishBox.z);

//Throw away Fish


throwAwayFish(fishBox);

const treasureBox = findTreasureBox();

//Walk to treasure Box


cxWalkToZCheck(treasureBox.x, treasureBox.y, treasureBox.z);

stashSosAndReagents(treasureBox);

cxWalkToZCheck(runeShip.x, runeShip.y, runeShip.z);

//Recall back to the boat


[Link]('Recall', [Link]);

//Wait
[Link]('5000');

//Refresh the tillerman


const tillemanLocal = [Link](findTillerMan());

//Make sure the boat always refreshes.


if ( tillemanLocal != null ){
[Link]([Link]());
[Link]('1100');
}

};

function findFishingPole() {
var fishingPole = [Link]('0x0DBF');
var obj = {};

if ( [Link] > 0 ) {
return fishingPole;
}
else {
obj = [Link]('2');
return [Link]();
}
}

function Fisher() {

//Gump Header
const cxGumpText = 'Auto Fisher';

// Cutom gump serial


var gumpSerial = 'fisherGump';

// Create custom gump


var gump = [Link](gumpSerial);

//Prevent closing with a right click.


//[Link](true);

var height = 250;


var width = 325;

//add the background


[Link](0, 0, '0x9C40', width, height);

//add header text


[Link](100, 10, '45', cxGumpText);

var controlWidth = {button: 240, text: 25};

//Add the buttons


[Link]([Link], 50, '45', 'Start Auto Fisher');
[Link](1, [Link], 50, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 90, '45', 'Stop Auto Fisher');


[Link](2, [Link], 90, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 130, '45', 'Add SOS to Map');


[Link](3, [Link], 130, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 170, '45', 'Fish up SOS');


[Link](4, [Link], 170, '0x992', '0x992', '0x993',
'0x0000');

[Link]('FisherCallBack');

//displays the gump


[Link]();
}

function FisherCallBack() {
var code = [Link]()

switch(code) {
case 1:
goFish();
break;
case 2:
stopScript();
break;
case 3:
getSosGump();
break;
case 4:
fishUpSos();
break;
default:
[Link]('Gump default action taken');
}

function stopScript(){
[Link]('all');
}

function findRuneHome(){
var runicAtlas;

var atlasSearch = [Link]('0x9C16');

for ( var i=0;i<[Link];i++ ){


if ( atlasSearch[i] != null ){
if ( [Link](atlasSearch[i].Properties(), 'Fishing') ){
runicAtlas = atlasSearch[i].Serial();
}
}
}

return runicAtlas;
}

function findShipRune(){
var rune;

[Link](function(f){
if ( [Link]() === [Link] ){
rune = [Link];
}
});

return rune;
}

function findTrashCan(){
var trashCan;

[Link](function(f){
if ( [Link]() === [Link] ){
trashCan = [Link];
}
});

return trashCan;
}

function findFishBox(){
var fishBox;

[Link](function(f){
if ( [Link]() === [Link] ){
fishBox = [Link];
}
});

return fishBox;
}

function findBigFishBox(){
var bigFishBox;

[Link](function(f){
if ( [Link]() === [Link] ){
bigFishBox = [Link];
}
});

return bigFishBox;
}

function findTreasureBox(){
var treasureChest;

[Link](function(f){
if ( [Link]() === [Link] ){
treasureChest = [Link];
}
});

return treasureChest;
}

function cxWalkToZCheck(x, y, z){


const zcheck = 9;
[Link](x, y, z, 1, zcheck);
[Link]('200');
var zCheckValue = [Link](z - Player.Z()) > zcheck;

if ( [Link](x, y) > 1 || zCheckValue ){


while ( [Link](x, y) > 1 || zCheckValue ){
[Link](x, y, z, 1, zcheck);
[Link]('200');
}
}
}

function isSailer(){
var willSail = false;

[Link](function(f){
if ( [Link]() === [Link] ){
willSail = [Link];
}
});

return willSail;
}

function shouldCollectBigFish(){
var returnValue = false;

[Link](function(f){
if ( [Link]() === [Link] ){
returnValue = [Link];
}
});

return returnValue;
}

function healSelf() {
if ( [Link]('%') < 90 ){
[Link]('Greater Heal', [Link]());
[Link]('3000');
}
}

function cureSelf() {
if ( [Link]() ){
[Link]('Arch Cure', [Link]());
[Link]('3000');
}
}

function checkProtection(){
if ( ![Link]('0x7562') ){
[Link]('Protection');
[Link]('3000');
}
}
//--#Alchemy Crafter
function StartAlchemy() {

//Gump Header
const cxGumpText = 'Master Alchemist';

// Cutom gump serial


var gumpSerial = 'fisherGump';

// Create custom gump


var gump = [Link](gumpSerial);

//Prevent closing with a right click.


//[Link](true);

var height = 385;


var width = 325;

//add the background


[Link](0, 0, '0x62b', width, height);

//add header text


[Link](120, 10, '0', cxGumpText);

var controlWidth = {button: 240, text: 45};

//Add the buttons


[Link]([Link], 50, '0', 'Greater Heal Potion');
[Link](1, [Link], 50, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 90, '0', 'Greater Cure Potion');


[Link](2, [Link], 90, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 130, '0', 'Greater Strength Potion');


[Link](3, [Link], 130, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 170, '0', 'Greater Agility Potion');


[Link](4, [Link], 170, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 210, '0', 'Greater Refresh Potion');


[Link](5, [Link], 210, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 250, '0', 'Greater Conflagration Potion');


[Link](6, [Link], 250, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 290, '0', 'Greater Explosion Potion');


[Link](7, [Link], 290, '0x992', '0x992', '0x993',
'0x0000');

[Link]([Link], 330, '0', 'End Potion Making');


[Link](8, [Link], 330, '0x992', '0x992', '0x993',
'0x0000');

[Link]('AlchemyCallBack');

//displays the gump


[Link]();
}

function AlchemyCallBack() {
var code = [Link]()

switch(code) {
case 1:
HealPotion();
break;
case 2:
CurePotion();
break;
case 3:
StrengthPotion();
break;
case 4:
AgilityPotion();
break;
case 5:
RefreshPotion();
break;
case 6:
ConflagrationPotion();
break;
case 7:
ExplosionPotion();
break;
case 8:
EndPotion();
break;
default:
[Link]('No action taken');
}

}
function HealPotion() {
var Ginseng = '0x0F85';
var GreaterHealPotion = '0x0F0C';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Greater Heal
[Link](200);
if ([Link](Ginseng) < 20) {
[Link](Ginseng, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreaterHealPotion) >= emptyBottlesAmount) {
[Link](GreaterHealPotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9001));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1042));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](42));
[Link](100);
}
}
}
}
}
function CurePotion(){
var Garlic = '0x0F84';
var GreaterCurePotion = '0x0F07';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Greater Cure
[Link](200);
if ([Link](Garlic) < 20) {
[Link](Garlic, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreaterCurePotion) >= emptyBottlesAmount) {
[Link](GreaterCurePotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9001));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1072));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](72));
[Link](100);
}
}
}
}
}
function StrengthPotion(){
var MandrakeRoot = '0x0F86';
var GreaterStrengthPotion = '0x0F09';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Str
[Link](200);
if ([Link](MandrakeRoot) < 20) {
[Link](MandrakeRoot, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreaterStrengthPotion) >= emptyBottlesAmount) {
[Link](GreaterStrengthPotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9002));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1051));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](51));
[Link](100);
}
}
}
}
}
function AgilityPotion(){
var BloodMoss = '0x0F7B';
var GreaterAgilityPotion = '0x0F08';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Agi
[Link](200);
if ([Link](BloodMoss) < 20) {
[Link](BloodMoss, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreaterAgilityPotion) >= emptyBottlesAmount) {
[Link](GreaterAgilityPotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9002));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1021));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](21));
[Link](100);
}
}
}
}
}
function RefreshPotion(){
var BlackPearl = '0x0F7A';
var GreatRefreshPotion = '0x0F0B';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Refresh
[Link](200);
if ([Link](BlackPearl) < 20) {
[Link](BlackPearl, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreatRefreshPotion) >= emptyBottlesAmount) {
[Link](GreatRefreshPotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9001));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1011));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](11));
[Link](100);
}
}
}
}
}
function ConflagrationPotion(){
var GraveDust = '0x0F8F';
var GreaterConflagrationPotion = '0x0F06';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Conflagration
[Link](200);
if ([Link](GraveDust) < 20) {
[Link](GraveDust, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreaterConflagrationPotion) >= emptyBottlesAmount) {
[Link](GreaterConflagrationPotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9004));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1102));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](102));
[Link](100);
}
}
}
}
}
function ExplosionPotion(){
var SulfurousAsh = '0x0F8C';
var GreaterExplosionPotion = '0x0F0D';
var reagentColor = '0x0000';
var emptyBottlesType = '0x0F0E'; //empty bottles
var craftingToolType = '0x0E9B'; // mortar and pestle
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
[Link](self, '0x09C2' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) { //Explosion
[Link](200);
if ([Link](SulfurousAsh) < 20) {
[Link](SulfurousAsh, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
} else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
} else if ([Link](GreaterExplosionPotion) >= emptyBottlesAmount) {
[Link](GreaterExplosionPotion,any , backpack, 0,
'resourceContainer');
[Link](2000);
} else {
[Link](craftingToolType);
if ([Link](3000)){
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](9004));
[Link](100);
}
}
if ([Link](3000)){
var gump1 = [Link]('last');
if ((gump1 !== null) && (![Link]()) && ([Link]()
=== '0x000001CC')){
[Link]([Link](1082));
[Link](100);
}
}
if ([Link](3000)){
var gump2 = [Link]('last');
if ((gump2 !== null) && (![Link]()) && ([Link]()
=== '0x000002AD')){
[Link]([Link](82));
[Link](100);
}
}
}
}
}

function MageFarmVoidPool() {
var repetitionInterval = 200; // lower this if not getting enough hits. If
your pc crashes or the script is causing you lag, raise it.
var farmSpotX = 5593;
var farmSpotY = 2013;
var maxWaveToFarm = 100; // change this for when to start hiding
var timeToFarm = 0;
[Link]('spellToCastDelay',0);
while(true) {
[Link](2000);
while(![Link]()) {
[Link](repetitionInterval);
if (![Link]('protection')) {
[Link]('protection');
[Link](2000);
}
else if (Player.X() > 5372 && Player.X() < 5627 && Player.Y() >
1940 && Player.Y() < 2051) { //in void pool
if ([Link]('The battle for the Void Pool will
begin in','sys')) {
var message2 = [Link]('The battle for the
Void Pool will begin in','sys');
var cooldownNumberTemp = /\d+/.exec([Link]());
var cooldownNumber = parseInt(cooldownNumberTemp);
[Link]('The battle for the Void Pool will
begin in','sys');
if (cooldownNumber >= 1 && cooldownNumber <= 3) {
var timeToFarm = 1;
}
else {
var timeToFarm = 0;
}
}
if ([Link]("of Cora's forces are entering the
dungeon.",'sys')) {
var message = [Link]("of Cora's forces are
entering the dungeon.",'sys');
var waveNumberTemp = /\d+/.exec([Link]());
var waveNumber = parseInt(waveNumberTemp);
[Link]("of Cora's forces are entering the
dungeon.",'sys');
if (waveNumber <= maxWaveToFarm && waveNumber >= 1) {
var timeToFarm = 1;
}
else {
var timeToFarm = 0;
}
}
if (timeToFarm == 0) {
if (Player.X() != farmSpotX && Player.Y() !=
farmSpotY) {
[Link](farmSpotX,farmSpotY,0,0,255);
}
else {
[Link](self,45,'Waiting until
conditions are more favorable.');
var Timer = [Link]();
if (Timer <= [Link]() && !
[Link]('Invisibility') && ![Link]('Hiding')) {
[Link]('Hiding');
Timer = [Link]() + 15000;
[Link](200);
}
if (Timer > [Link]() && !
[Link]('Hiding') && ![Link]('Invisibility')) {
[Link]('Invisibility', self);
[Link](1000);
}
[Link](2000);
}
}
if (timeToFarm == 1) {
[Link](self);
var monsterToKill = [Link](any, any,
ground, 'human|fast',10,'red');
if (Player.X() != farmSpotX && Player.Y() !=
farmSpotY) {
[Link](farmSpotX,farmSpotY,0,0,255);
}
else if ([Link]() < [Link]() * .8) {
[Link]();
[Link]('Greater Heal', self)
[Link](200);
}
else if (![Link]() &&
[Link]('spellToCastDelay') >= 2500 && [Link]() > [Link]() * .9) {
[Link]();
[Link]('Chain Lightning');
[Link]('spellToCastDelay',0);
}
else if ([Link] && [Link]())
{
if
([Link](monsterToKill[0].Serial())) {
[Link]();

[Link](monsterToKill[0].Serial(), '1152', true);

[Link](monsterToKill[0].Serial());
}
if ([Link]('You cannot perform
negative acts on your target.','sys')) {
[Link](monsterToKill[0].Serial());
[Link]('You cannot perform
negative acts on your target.','sys')
}
}
}
}
}
while([Link]()) {
[Link](repetitionInterval);
}
}
}
//--#Shadow Mega Script
/*
Deaths All In One - Shadow */
function Combat(){
/* 'Change these values below to use each skill'
*/
const chiv = 400; // for using chivalry spells
const bush = 1000; // for using bushido spells
const healing = 400; // for healing & rezing with bandages
const mage = 1000; // for healing with magery spells & casting protection
const mystic = 1000; // for healing with mystic spells & casting protection
const necro = 600; // for corpse skin only at 600 100% cast chance
const ss = 1000; // for summoning wisp familiar & casting protection

const priority = 'Neira|Piper|Rikktor|Semidar|Mephitis|Silvani|Serado|


Ilhenir|Meraktus|Twaulo|Primeval|Abyssal|Turtle|Dark Father|Melisande|Travesty|
Toothed|Shadowlord|Harrower';
const eooNotSet = 'damage to the creature you next attack';
const msgMastery = 'You deliver';
const msgFeint = 'You baffle your target with a feint!';
const lootCorpse = 'You quickly gather all of your belongings.';
[Link]();
[Link](backpack, 'useitemdelay');
[Link]('masteryCooldown', 5200);
[Link]('feint', 5200);
[Link]('Honor', 1000);
[Link]('SpecialUsed', 3050);
[Link]('bandageRez', 2000);
[Link]('deadshow', 15000);
[Link]('Discord', 8000);
[Link]('Peace', 8000);
[Link]('Corpse', 30000);
[Link]('LootBody', 60000 * 20);
Dress();
[Link]('PvmHelper', true);
AIOGump();
while(true){
[Link](250);
if([Link]()){
[Link]('LootBody', 0);
[Link](lootCorpse);
if([Link]('deadshow') > 15000){
[Link](0);
[Link]('oO');
[Link]('deadshow', 0);
}
if([Link]()){
var resgump = [Link]('last');
if(resgump !== null && ![Link]() && [Link]()
=== '0x000008AF'){
[Link]([Link](2));
}
}
}
while(![Link]() && ![Link]() && !
[Link]('Paralyze') && ![Link]('Webbing') && ![Link]() &&
![Link]()){
[Link](250);
var manacost = [Link](30-([Link]()/100*30)); //specials
30mana except whirlwind 15 and onslaught 20
var moonGates = [Link]('0x0DDB|0x0F6C', any, ground, '
', 2); // Red and Blue MoonGate
var weaponRH = [Link]('RightHand');
var weaponLH = [Link]('LeftHand');
var monstersNear = [Link]('!0x00A4|!0x033D|!0x002F',
any, ground, 'mobile|ignoreself|ignorefriends|inlos', 1, 'gray|criminal|orange|
red'); // Ignores Colossus, Vortex, and Reaper
var monstersNear10 = [Link]('!0x00A4|!0x033D|!0x002F',
any, ground, 'mobile|ignoreself|ignorefriends|inlos', 10, 'gray|criminal|orange|
red');
var monstersCount = [Link];
var monstersCount10 = [Link];
var targetSerial = [Link]();
var target = [Link](targetSerial);
// LootCorpse
while([Link]('LootBody') < 60000 * 20 && ![Link]()){
[Link](250);
if([Link](lootCorpse)){
[Link]('LootBody', 60000 * 20);
[Link](lootCorpse);
} else if([Link]('LootBody') < 60000 * 20){
[Link]('Equipment');
LootCorpse();
var firstAidBelt = [Link]('0xA1F6')[0];
if(firstAidBelt != null){
[Link]([Link](),
'useitemdelay');
}
}
}
// Attack
Attack();
// Specials | Mastery Timer | Feint Timer
if([Link]('SpecialUsed') < 3050){
manacost = manacost * 2;
}
if([Link](msgMastery)){
[Link]('masteryCooldown', 0);
[Link](msgMastery);
}
if([Link](msgFeint)){
[Link]('feint', 0);
[Link](msgFeint);
}
// BardBuffs
if([Link]('%') > 10 && [Link]('Musicianship') >=
900 && ([Link]('Peacemaking') >= 900 || [Link]('Provocation')
>= 900)){
BardBuffs();
}
// Discord | Peace
if([Link]('Peacemaking', 'base') >= 900 &&
[Link]('Peace')>= 8000 && [Link]('%') < 75 && monstersCount10){
Peace();
[Link]('Peace', 0);
} else if([Link]('Discordance', 'base') >= 900 &&
[Link]('Discord') >= 8000){
Discord();
[Link]('Discord', 0);
}
// Mount
if(![Link]('Mount') && ![Link]() && !
[Link]('Dismount')){
Mount();
}
// Vamp Form
if([Link]('Necromancy') >= 990 && !
[Link]('Vampiric Embrace') && !monstersCount10 && [Link]('%') > 5 &&
([Link]('Swordsmanship') >= 900 || [Link]('Mace Fighting') >=
900 || [Link]('Fencing') >= 900 || [Link]('Archery') >= 900 ||
[Link]('Throwing') >= 900)){
VampForm();
}
// Bandage | MageHealer | MysticHealer
if([Link]('Healing', 'base') >= healing && !
[Link]('healing skill')){
Bandage();
}else if([Link]('Mysticism', 'base') >= mystic &&
[Link]('%') > 20 && ![Link] && monstersCount10){
MysticHealer();
} else if([Link]('Magery', 'base') >= mage &&
[Link]('Mysticism', 'base') < mystic && [Link]('%') > 20 && !
[Link] && monstersCount10){
MageHealer();
} else if([Link]){
[Link]();
}
// RezBandage
if([Link]('Healing', 'base') >= healing && !
[Link]('healing skill') && [Link]('bandageRez') > 2000){
BandageRez();
[Link]('bandageRez', 0);
}
// Masteries | Fient
if(![Link]('0x9BC2') &&
[Link]('masteryCooldown') && [Link]('%') > 5){
[Link]('masteryCooldown');
} else if(target !== null && [Link]('0x9BC2')){
if(![Link]([Link](), priority) &&
[Link]('masteryCooldown')){
[Link]('masteryCooldown');
} else if([Link]([Link](), priority)
&& ![Link]('masteryCooldown')){
if(weaponRH != null || weaponLH != null){
[Link]('masteryCooldown', 5200);
}
} else if([Link]() > 20){
if([Link]('masteryCooldown') >= 5200 && !
[Link]('Onslaught') && [Link]([Link](), priority) &&
[Link]('Swordsmanship') >= 900){
[Link]('onslaught');
} else if([Link]('masteryCooldown') >= 5200 && !
[Link]('Pierce') && [Link]([Link](), priority) &&
[Link]('Fencing') >= 900){
[Link]('Pierce');
} else if([Link]('masteryCooldown') >= 5200 && !
[Link]('Stagger') && [Link]([Link](), priority) &&
[Link]('Mace Fighting') >= 900){
[Link]('Stagger');
} else if(![Link]('0x9BC0') &&
[Link]('Throwing') >= 900){
[Link]('Elemental Fury');
}
}
}
if(target !== null){
if(![Link]([Link](), priority) &&
[Link]('feint')){
[Link]('feint');
} else if([Link]([Link](), priority)
&& ![Link]('feint')){
if(useAbility('Feint') && (weaponRH != null ||
weaponLH != null)){
[Link]('feint', 5200);
}
} else if([Link]() > manacost){
if([Link]('feint') >= 5200 &&
useAbility('Feint') && ![Link]('Primary') && !
[Link]('Onslaught') && ![Link]('Pierce') && !
[Link]('Stagger') && [Link]([Link](), priority) &&
([Link]('Swordsmanship') >= 900 || [Link]('Fencing') >= 900 ||
[Link]('Made Fighting') >= 900)){
useAbility('Feint');
}
}
}
// Spells to use based on skill and monsters in range
if(monstersCount10 && [Link]() > 35){
if([Link]('Bushido', 'base') >= bush){ // < Skill
required to use Bushido spells
if([Link]('%') < 60 &&
[Link]('Confidence') < 10000 && ![Link]('Evasion') && !
[Link]('Counter Attack')){
[Link]('Confidence');
} else if([Link]('evade') > 0 &&
[Link]('Confidence') < 10000 && ![Link]('Evasion') && !
[Link]('Counter Attack')){
[Link]('Evasion');
[Link]('evade', -27000);
} else if([Link]('Confidence') <
10000 && ![Link]('Evasion') && ![Link]('Counter Attack')){
[Link]('Counter Attack');
}
} // add alert for low tithing
if([Link]('Chivalry', 'base') >= chiv &&
[Link]() > 100){ // < Skill required to use Chivalry spells
if([Link]('Consecrate Weapon') <
500){
if(([Link]('LeftHand') != null && !
[Link]('LeftHand').Properties().match(/Fire Damage 100%|Cold Damage 100%|
Poison Damage 100%|Energy Damage 100%/)) || ([Link]('RightHand') != null
&& ![Link]('RightHand').Properties().match(/Fire Damage 100%|Cold Damage
100%|Poison Damage 100%|Energy Damage 100%/))){
[Link]('Consecrate Weapon');
}
}
var eooDescription = [Link]('Enemy of
One');
if(target !== null){
if(![Link]('Enemy of One') &&
[Link]([Link](), priority)){
[Link]('Enemy of One');
} else if([Link]('Enemy of One') && !
[Link](eooDescription, priority) && ![Link](eooDescription,
eooNotSet)){
[Link]('Enemy of One');
} else if([Link]('Enemy of One') && !
[Link]([Link](), priority)){
[Link]('Enemy of One');
}
}
}
if([Link]('Spirit Speak', 'base') >= ss &&
[Link]('Necromancy', 'base') >= necro){
if(target !== null && [Link]() < 10
&&[Link]('Corpse') > 30000){
if([Link]([Link](),
priority)){
[Link]('Corpse Skin',
[Link]());
[Link]('Corpse', 0);
}
}
}
}
if([Link]() > 10){
if(![Link]('Protection') &&
[Link]('Magery', 'base') >= mage){
[Link]('Protection');
[Link](1500);
}
if([Link]('Spirit Speak', 'base') >= ss &&
[Link]('Necromancy', 'base') >= 500 && !monstersCount10){
if([Link]() < 2 &&
[Link]('Mount') !== null){
[Link]('Summon Familiar');
if([Link](5000, true)){
var gump0 = [Link]('last');
if((gump0 !== null) && (!
[Link]()) && ([Link]() === '0x00000292')){

[Link]([Link](2));
}
}
} else if([Link]() == 0 &&
[Link]('Mount') == null){
[Link]('Summon Familiar');
if([Link](5000, true)){
var gump0 = [Link]('last');
if((gump0 !== null) && (!
[Link]()) && ([Link]() === '0x00000292')){

[Link]([Link](2));
}
}
}
}
}
// Melee specials to use based on monster count & weapon equipped
if([Link]('Archery', 'base') < 1000 &&
[Link]('Throwing', 'base') < 1000){
if((weaponRH != null) || (weaponLH != null)){
if(monstersCount && [Link]() > manacost &&
[Link]('masteryCooldown') < 5200 && [Link]('feint') < 5200 &&
[Link]('Tactics') >= 600 && ([Link]('Swordsmanship') >= 900 ||
[Link]('Fencing') >= 900 || [Link]('Mace Fighting') >= 900)){
switch(monstersCount){
case 1: // 1 Target
if(useAbility('Armor Ignore|Double
Strike') && ![Link]('Primary') && ![Link]('Secondary') &&
![Link]('Momentum Strike') && ![Link]('Onslaught') && !
[Link]('Pierce') && ![Link]('Stagger')){
useAbility('Armor Ignore|Double Strike');
[Link]('SpecialUsed', 0);
}
break;
case 2: // 2 Targets
if([Link]('Bushido',
'base') >= 1000 && ![Link]('Primary') && !
[Link]('Secondary') && ![Link]('Momentum Strike') && !
[Link]('Onslaught') && ![Link]('Pierce') && !
[Link]('Stagger')){
[Link]('Momentum Strike');
} else if([Link]('Bushido', 'base') <
1000 && ![Link]('Primary') && ![Link]('Secondary') && !
[Link]('Momentum Strike') && ![Link]('Onslaught') && !
[Link]('Pierce') && ![Link]('Stagger')){
useAbility('Whirlwind Attack|
Armor Ignore|Double Strike');
[Link]('SpecialUsed',
0);
}
break;
default: // 3 or more Targets
if(useAbility('Whirlwind Attack|
Frenzied Whirlwind') && ![Link]('Primary') && !
[Link]('Secondary') && ![Link]('Momentum Strike') && !
[Link]('Onslaught') && ![Link]('Pierce') && !
[Link]('Stagger')){
useAbility('Whirlwind Attack|
Frenzied Whirlwind');
[Link]('SpecialUsed',
0);
} else
if([Link]('Bushido', 'base') >= 1000 && ![Link]('Primary')
&& ![Link]('Secondary') && ![Link]('Momentum Strike') && !
[Link]('Onslaught') && ![Link]('Pierce') && !
[Link]('Stagger')){
[Link]('Momentum Strike');
} else if([Link]('Bushido', 'base') <
1000 && ![Link]('Primary') && ![Link]('Secondary') && !
[Link]('Momentum Strike') && ![Link]('Onslaught') && !
[Link]('Pierce') && ![Link]('Stagger')){
useAbility('Armor Ignore|
Double Strike');
[Link]('SpecialUsed',
0);
}
}
}
}
} else { // Ranged specials to use based on monster count &
weapon equipped
if((weaponRH != null) || (weaponLH != null)){
if(monstersCount10 && [Link]() > manacost && !
[Link]('Primary') && ![Link]('Secondary') &&
[Link]('Tactics') >= 600 && ([Link]('Archery') >= 900 ||
[Link]('Throwing') >= 900)){
if(useAbility('Armor Ignore|Lightning Arrow|
Mystic Arc')){
useAbility('Armor Ignore|Lightning Arrow|
Mystic Arc');
} else if(useAbility('Armor Pierce') && !
[Link]('Mount')){
useAbility('Armor Pierce');
} else if(useAbility('Double Shot') &&
[Link]('Mount')){
useAbility('Double Shot');
}
}
}
}
}
}
}
function Attack(){
var mob;
mob = PriorityTarget();
if(mob != null){
if([Link]() == [Link]() && [Link]('Honor') >= 1000 &&
[Link]() < 8 && [Link]('honorLeader', false) &&
[Link]('Bushido') >= 500){
[Link]('Honor');
[Link]([Link]());
[Link]('Honor', 0);
}
if([Link]('Musicianship') < 900){
[Link]([Link]());
}
[Link]([Link]());
[Link]([Link](), 0x0AAC, true);
[Link]([Link]());
[Link]('Prio Target = ' + [Link]());
} else {
mob = [Link]('!0x00A4|!0x033D|!0x002F', any, ground, 'mobile|
ignoreself|ignorefriends|inlos', 20, 'gray|criminal|orange|red');
if([Link]){
for(k = [Link] - 1; k >= 0; k--){
if([Link](mob[k].Properties(), 'The Priest Of
Mondain|(summoned)|(tame)|(bonded)')){
[Link](k, 1);
}
}
}
[Link](function(m1, m2){
return [Link]() - [Link]()
});
if([Link]){
if(mob[0].Hits() == mob[0].MaxHits() && [Link]('Honor') >=
1000 && mob[0].Distance() < 8 && [Link]('Bushido') >= 500){
[Link]('Honor');
[Link](mob[0].Serial());
[Link]('Honor', 0);
}
if([Link]('Musicianship') < 900){
[Link](mob[0].Serial());
}
[Link](mob[0].Serial());
[Link](mob[0].Serial(), 17, true);
[Link](mob[0].Serial());
[Link]('Target = ' + mob[0].Name());
}
}
}
function PriorityTarget(){
var priorityTargets = [Link](any, any, ground, 'mobile|ignoreself|
ignorefriends|inlos', 20, 'gray|criminal|orange|red');
var returnValue = null;
const prio = 'Manifestation|Neira|Piper|Rikktor|Semidar|Mephitis|Silvani|
Serado|Ilhenir|Meraktus|Twaulo|Primeval|Abyssal|Turtle|Dark Father|Melisande|
Travesty|Toothed|Shadowlord';
for(i = [Link] - 1; i >= 0; i--){
if(priorityTargets[i] != null){
if(![Link](priorityTargets[i].Properties(), prio)){
[Link](i, 1);
}
}
}
for(var p = 0; p < [Link]; p++){
if(priorityTargets[p] != null){
if([Link](priorityTargets[p].Properties(), prio)){
[Link](function(p1, p2){
return [Link]() - [Link]()
});
returnValue = priorityTargets[p];
break;
}
}
}
return returnValue;
}
function useAbility(name){
const abilities = [Link]();
const primary = [Link]('Primary');
const secondary = [Link]('Secondary');
const regex = new RegExp(name, 'i');

if(abilities[0].match(regex) && !primary && !secondary){


[Link]('Primary', true);
[Link](100);
} else if(abilities[1].match(regex) && !secondary && !primary){
[Link]('Secondary', true);
[Link](100);
}
}
function BardBuffs(){
var masteryBookSerial = [Link]('0x225A');
var instrument = [Link]('0x0EB2|0x0E9D|0x0E9C|0x0EB3|0x0EB1|0x0E9E|
0x2807|0x2805'); // Lute, Drum, Lap Hard, Standing Hard, Tambourine, Tambourine
(tassel), Bamboo Flute, Snake Charmer Flute
var masteryBook = [Link](masteryBookSerial);
const bardMsg = 'feeling of resilience|feeling of invincibility|feel
inspired|feel invigorated|song has been interrupted';
const noInstrumentMsg = 'shall you play';
if([Link](noInstrumentMsg, 'sys')){
[Link](instrument);
[Link](noInstrumentMsg);
} else if([Link]([Link](), 'Peacemaking')){
if(![Link]('Resilience')){
[Link]('Resilience');
[Link](bardMsg, [Link](), [Link]()+5500);
} else if(![Link]('Perseverance')){
[Link]('Perseverance');
[Link](bardMsg, [Link](), [Link]()+5500);
}
} else if([Link]([Link](), 'Provocation')){
if(![Link]('Invigorate')){
[Link]('Invigorate');
[Link](bardMsg, [Link](), [Link]()+5500);
} else if(![Link]('Inspire')){
[Link]('Inspire');
[Link](bardMsg, [Link](), [Link]()+5500);
}
}
}
function Discord(){
const priority = 'Neira|Piper|Rikktor|Semidar|Mephitis|Silvani|Oaks|Serado|
Ilhenir|Meraktus|Twaulo|Primeval|Abyssal|Turtle|Dark Father|Melisande|Travesty|
Toothed|Shadowlord|Harrower';
var targetSerial = [Link]();
var target = [Link](targetSerial);
var instrument = [Link]('0x0EB2|0x0E9D|0x0E9C|0x0EB3|0x0EB1|0x0E9E|
0x2807|0x2805');
const discoSuccessMsg = 'jarring music|already in';
const noInstrumentMsg = 'shall you play';
if([Link](noInstrumentMsg, 'sys')){
[Link](instrument);
[Link](noInstrumentMsg);
} else if(target != null && [Link]() < 15){
if([Link]([Link](), priority)){
[Link]('Discordance', [Link]());
if([Link](discoSuccessMsg, 'sys', target)){
[Link]([Link](), 0x09C2, [Link]()+'
Discorded');
[Link](discoSuccessMsg);
}
}
}
}
function Peace(){
var instrument = [Link]('0x0EB2|0x0E9D|0x0E9C|0x0EB3|0x0EB1|0x0E9E|
0x2807|0x2805');
const noInstrumentMsg = 'shall you play';
if([Link](noInstrumentMsg, 'sys')){
[Link](instrument);
[Link](noInstrumentMsg);
}
[Link]('Peacemaking', self);
[Link](self, 0x09C2, 'Area Peace!');
}
function Mount(){ // find way to tell if mount is mountable??
var mount = [Link]('!0x00A5', any, ground, 'canchangename|live|
nothuman', 1);
var mounts = [Link]('!0x00A5', any, ground, 'canchangename|live|
nothuman', 20);
var ethy = [Link](any, any, backpack);
var monstersNear8Mount = [Link]('!0x00A4|!0x033D|!0x002F', any,
ground, 'mobile|ignoreself|ignorefriends|inlos', 8, 'gray|criminal|orange|red');
if(![Link]('wraith form')){
if([Link]() != 0x029A && [Link]() != 0x029B && !
[Link]('MyPet')){
if(![Link]('Mount') && [Link]() > 0 &&
[Link]('AFM') >= -1 && [Link]){
[Link]('All Follow Me');
[Link]('AFM', -10000);
}
if([Link]() > 0 && [Link]){
for(var mt = 0; mt < [Link]; mt++){
if(!mount[mt].Poisoned()){
[Link]('attempting to mount
'+mount[mt].Name());
[Link](mount[mt].Serial());
}
}
} else if(monstersNear8Mount = null || !
[Link]){
if([Link]){
for(var e = 0; e < [Link]; e++){
if([Link](ethy[e].Properties(),
'ethereal|statuette')){
[Link]('attempting to mount
'+ethy[e].Name());
[Link](ethy[e].Serial());
}
}
}
}
} else if(![Link]() && ([Link]() == 0x029A ||
[Link]() == 0x029B) && (monstersNear8Mount = null || !
[Link])){
[Link]('ToggleGargoyleFlying').Play();
}
}
}
function VampForm(){
var ArcaneItems = [Link]('0x26B0|0x26AF|0x26AE|0x26AD', '!0x0000')
[0];
var Arcane = [Link](ArcaneItems);
var gloves = [Link]('Gloves');
if(Arcane != null){
[Link]('Equipment');
[Link](self, 0x09C2, 'Vamp Form Incoming, 16 seconds.');
[Link](16000);
if([Link]([Link](), 'Arcane Charges:')){
[Link]('ArcaneItems', [ArcaneItems]);
[Link]('ArcaneItems');
[Link]('moveitemdelay');
if([Link]('Gloves') != null){
if([Link](), 'The Holy Warrior' && !
[Link]([Link](), 'gloves')){
[Link]('Gloves');
}
}
if([Link]()){
[Link]('ToggleGargoyleFlying').Play();
}
while(![Link]('Vampiric Embrace')){
if([Link]('Cloak') != null){
var arcaneCloak =
[Link]('Cloak').Properties().match(/Arcane Charges: \d+/);
if(arcaneCloak == 'Arcane Charges: 0'){
break;
}
}
if([Link]('Robe') != null){
var arcaneRobe =
[Link]('Robe').Properties().match(/Arcane Charges: \d+/);
if(arcaneRobe == 'Arcane Charges: 0'){
break;
}
}
if([Link]('Gloves') != null){
var arcaneGloves =
[Link]('Gloves').Properties().match(/Arcane Charges: \d+/);
if(arcaneGloves == 'Arcane Charges: 0'){
break;
}
}
if([Link]('Shoes') != null){
var arcaneShoes =
[Link]('Shoes').Properties().match(/Arcane Charges: \d+/);
if(arcaneShoes == 'Arcane Charges: 0'){
break;
}
}
[Link]('Vampiric Embrace');
[Link](4000);
}
}
}
[Link]('Equipment');
}
function Bandage(){
var friends = [Link]('!0x00A5', any, ground, 'live|inlos', 2,
'green');
var friendList = [Link]();
for(f = 0; f < [Link]; f++){
var friendObject = [Link](friendList[f]);
if(friendObject != null){
if([Link]() <= 2 && ![Link]()){
[Link](friendObject);
}
}
}
[Link](function(f1, f2){
return [Link]('%') - [Link]('%')
});
if([Link]){
var lowestHpFriend = friends[0];
[Link]([Link]());
if(![Link]([Link](), '(tame)|(bonded)')){
if(![Link]() && ([Link]('%') < 85 ||
[Link]())){
[Link]('Bandaging '+[Link]());
[Link]([Link]());
}
}
}
}
function MageHealer(){
var friends = [Link]('!0x00A5', any, ground, 'live|inlos', 10,
'green');
var friendList = [Link]();
for(f = 0; f < [Link]; f++){
var friendObject = [Link](friendList[f]);
if(friendObject != null){
if([Link]() <= 10 && ![Link]()){
[Link](friendObject);
}
}
}
[Link](function(f1, f2){
return [Link]('%') - [Link]('%')
});
if([Link]){
var lowestHpFriend = friends[0];
[Link]([Link]());
if(![Link]([Link](), '(tame)|(bonded)')){
if(![Link]() && ![Link]()){
[Link]('Greater Heal');
}else if([Link]() && ![Link]() &&
[Link]('%') < 90 && ![Link]()){
[Link]('Greater Heal on '+[Link]());
[Link]([Link]());
} else if(![Link]() && [Link]()){
[Link]('Arch Cure on '+[Link]());
[Link]('Arch Cure', [Link]());
}
}
}
}
function MysticHealer(){
var friends = [Link]('!0x00A5', any, ground, 'live|inlos', 10,
'green');
var friendList = [Link]();
for(f = 0; f < [Link]; f++){
var friendObject = [Link](friendList[f]);
if(friendObject != null){
if([Link]() <= 10 && ![Link]()){
[Link](friendObject);
}
}
}
[Link](function(f1, f2){
return [Link]('%') - [Link]('%')
});
if([Link]){
var lowestHpFriend = friends[0];
[Link]([Link]());
if(![Link]([Link](), '(tame)|(bonded)')){
if(![Link]()){
[Link]('Cleansing Winds');
} else if([Link]() && ![Link]() &&
([Link]('%') < 60 || [Link]())){
[Link]('Cleansing Winds on '+[Link]());
[Link]([Link]());
}
}
}
}
function BandageRez(){
var monstersNear4Rez = [Link](any, any, ground, 'mobile|ignoreself|
ignorefriends|inlos', 2, 'gray|criminal|orange|red');
if([Link]){
for(k = [Link] - 1; k >= 0; k--){
if([Link](monstersNear4Rez[k].Properties(),'The Priest Of
Mondain|(summoned)|(tame)|(bonded)')){
[Link](k, 1);
}
}
}
var deadFriends = [Link]('0x0192|0x0193|0x025F|0x0260|0x02B6|
0x02B7', any, ground, 'ignoreself|mobile', 20, 'green');
var deadFriendList = [Link]();
for(df = 0; df < [Link]; df++){
var deadFriendObject = [Link](deadFriendList[df]);
if(deadFriendObject != null){
if([Link]() <= 20 && [Link]()){
[Link](deadFriendObject);
}
}
}
if([Link]){
var deadFriend = [Link](deadFriends[0].Serial());
if(deadFriend != null){
var rezFriends = [Link](any, any, ground, 'ignoreself|
dead|inlos', 1, 'green');
var rezFriendList = [Link]();
for(rf = 0; rf < [Link]; rf++){
var rezFriendObject = [Link](rezFriendList[rf]);
if(rezFriendObject != null){
if([Link]() < 2 &&
[Link]()){
[Link](rezFriendObject);
}
}
}
if([Link] && ![Link]){
var zeroHpFriend = rezFriends[0];
[Link]([Link]());
if(![Link]([Link](), '(tame)|
(bonded)')){
if([Link]()){
[Link]('Ressurecting '+
[Link]());
[Link]([Link]());
}
}
}
}
}
}
function LootCorpse(){
var corpses = [Link]('0x2006', any, ground, ' ', 1);
for(i = 0; i < [Link]; i++){
var tempObject = [Link](corpses[i]);
if([Link]([Link](), [Link]())){
var myCorpse = tempObject;
break;
} else {
var myCorpse = null;
}
}
if(myCorpse != null){
[Link]([Link]());
[Link](self, 0x09C2, '--Recovered Corpse--');
}
}
function Dress(){
var tempDressArray = [];
for(var d = 1; d < 24; d++){
var item = [Link](d);
if(item){
[Link]([Link]());
}
}
[Link]('Equipment', tempDressArray);
}
function SetHonorLeader(){
if([Link]('honorLeader', false)){
[Link](self, 0x09C2, [Link]() + ' is no longer honor
leader');
[Link]('honorLeader');
} else {
[Link](self, 0x09C2, [Link]() + ' is honor leader');
[Link]('honorLeader', true);
}
}
function RunToMobs(){
[Link](self, 0x09C2, [Link]()+' is chasing monsters');
while(true){
[Link](50);
var targetSerial = [Link]();
var target = [Link](targetSerial);
if(target !== null){
if([Link]('', target.X(), target.Y(), target.Z()) && !
[Link]()){
[Link](target.X(), target.Y(), target.Z());
}
}
if(![Link]('Combat')){
break;
}
}
}
function RunToSpecificMobs(){
[Link](self, 0x09C2, [Link]()+' is chasing monsters');
const priority = 'Crane';
while(true){
[Link](50);
var targetSerial = [Link]();
var target = [Link](targetSerial);
if(target !== null){
if([Link]([Link](), priority)){
if([Link]('', target.X(), target.Y(), target.Z()) &&
![Link]()){
[Link](target.X(), target.Y(), target.Z());
}
}
}
if(![Link]('Combat')){
break;
}
}
}
function FollowFriends(){
[Link](self, 0x09C2, [Link]()+' is following friends');
while(true){
[Link](50);
var greens = [Link](any, any, ground, 'live', 20, 'green');
var friendsList = [Link]();
for (g=0;g<[Link];g++) {
var friendsObject = [Link](friendsList[g]);
if (friendsObject != null) {
if ([Link]() <= 20) {
[Link](friendsObject);
}
}
}
function compare(a, b){
if([Link]() < [Link]()){
return -1;
}
if([Link]() > [Link]()){
return 1;
}
return 0;
}
[Link](compare); // Make a check if in trammel or fell?
if([Link](greens[0].X(), greens[0].Y(), any, 0, 255, 1, 1)){
[Link](greens[0].X(), greens[0].Y(), any, 0, 255, 1, 1);
}
}
}
function FollowSelectedTarget(){
[Link]('SelectedTarget');
[Link]('SelectedTarget');
[Link]('SelectedTarget');
var followtarget = [Link]('SelectedTarget');
[Link](self, 0x09C2, [Link]()+' is following
'+[Link]());
while(true){
[Link](50);
if([Link]() < 25 && [Link]('Archery', 'base')
< 1000 && [Link]('Throwing', 'base') < 1000 && [Link]('Magery',
'base') < 1000 && [Link]('Mysticism', 'base') < 1000 &&
[Link]('Musicianship', 'base') < 1000){
if([Link](followtarget.X(), followtarget.Y(), any, 0, 255,
1, 1)){
[Link](followtarget.X(), followtarget.Y(), any, 0,
255, 1, 1);
}
} else if([Link]() < 25){
if([Link](followtarget.X(), followtarget.Y(), any, 2, 255,
1, 1)){
[Link](followtarget.X(), followtarget.Y(), any, 2,
255, 1, 1);
}
}
}
}
function AIOGump(){

//Gump Header
const cxGumpText = 'AIO';
// Cutom gump serial
var gumpSerial = 'AIOGump';

// Create custom gump


var gump = [Link](gumpSerial);

//closes last gump


[Link]();

//Prevent closing with a right click.


//[Link](true);

var height = 250;


var width = 250;

//add the background


[Link](0, 0, '0x62b', width, height);

//add header text


[Link](120, 10, '0', cxGumpText);

var controlWidth = {button: 165, text: 25};

//Add the buttons


[Link]([Link], 50, '0', 'Honor Leader On/Off');
[Link](1, [Link], 50, '0x00F9', '0x00F8', '0x00F7',
'0x0000'); // GREEN OK BUTTON

[Link]([Link], 90, '0', 'Run To Mobs');


[Link](2, [Link], 90, '0x00F9', '0x00F8', '0x00F7',
'0x0000'); // GREEN OK BUTTON

[Link]([Link], 130, '0', 'Follow Friends A-Z');


[Link](3, [Link], 130, '0x00F9', '0x00F8', '0x00F7',
'0x0000'); // GREEN OK BUTTON

[Link]([Link], 170, '0', 'Select Follow Target');


[Link](4, [Link], 170, '0x00F9', '0x00F8', '0x00F7',
'0x0000'); // GREEN OK BUTTON

[Link]([Link], 210, '0', 'Stop Follow & Chase');


[Link](5, [Link], 210, '0x00F3', '0X00F2', '0X00F1',
'0x0000'); // RED CANCEL BUTTON

[Link]('AIOCallBack');

//displays the gump


[Link]();
}
function AIOCallBack(){
var code = [Link]();

switch(code){
case 1:
SetHonorLeader();
break;
case 2:
[Link]('RunToMobs', true);
break;
case 3:
[Link]('FollowFriends', true);
break;
case 4:
[Link]('FollowSelectedTarget', true);
break;
case 5:
[Link](self, 0x09C2, [Link]() + ' is no longer following
or chasing!');
var TerminateFunction = 'RunToMobs|FollowFriends|FollowSelectedTarget';
if([Link]('RunToMobs') ||
[Link]('FollowFriends') ||
[Link]('FollowSelectedTarget')){
[Link]();
[Link](TerminateFunction);
}
}
}
function PvmHelper(){
[Link]('orangePetalCooldown',300000);
[Link]('purplePetalCooldown',300000);
[Link]('healPotCooldown', 10000);
[Link]('appleCooldown', 30000);
var rightHandWeapon = [Link]('RightHand');
var leftHandWeapon = [Link]('LeftHand');
while(true){
[Link](250);
var usenow = [Link]('!0x00A4|!0x033D|!0x002F', any, ground,
'mobile|ignoreself|ignorefriends|near', 10, 'gray|criminal|orange|red');
var box = [Link]('0x09A9', any, backpack);
if([Link] && ![Link]('Invisibility') && !
[Link]('Hiding') && ![Link]('action')){
if(![Link]('Disarm') && ![Link]() && !
[Link]('RightHand') && ![Link]('LeftHand') && rightHandWeapon !
= null){
[Link]('work');
[Link]([Link]());
[Link]('action', 1450, 'AboveChar', 'line|
bar', 'Wep', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('Disarm') && ![Link]() && !
[Link]('RightHand') && ![Link]('LeftHand') && leftHandWeapon !=
null){
[Link]('work');
[Link]([Link]());
[Link]('action', 1450, 'AboveChar', 'line|
bar', 'Wep', 0, 0, 0x09C2, 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link]('0x2FD8', '0x0488') &&
[Link]('appleCooldown') >= 30000 && ([Link]('Blood Oath') ||
[Link]('Curse') || [Link]('Corpse Skin'))){
[Link]('0x2FD8', '0x0488');
[Link](100);
var journalMessage = [Link]('A tasty bite','sys|
my','0',any,[Link]()-1450, [Link]());
[Link]('The journal message is ' + journalMessage);
if (journalMessage !== null) {
[Link]('appleCooldown', 0);
[Link]('A tasty bite','sys|my');
}
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Apple', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link]('%') < 55 && ![Link]() && !
[Link]() && [Link]('healPotCooldown') >= 10000 &&
[Link]('0x0F0C','0x0000')){
[Link]('0x0F0C');
[Link]('healPotCooldown', 0);
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Heal', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link] && ![Link]('action') &&
([Link]('Evil Omen') || [Link]('Paralyzed') ||
[Link]('paralyze') || [Link]('crippling nerve strike','sys',any,
any, [Link]() - 1500, [Link]()))){
[Link]('crippling nerve strike','sys');
[Link]('work');
[Link](500);
[Link](box);
[Link](200);
[Link]([Link](box));
[Link]([Link](box));
[Link]('action', 1450, 'AboveChar', 'line|
bar', 'Box', 0, 0, any, -1, '0xFFB0B0FE');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link]() && ![Link]() &&
[Link]('0x0F07','0x0000')){
[Link]('0x0F07');
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Cure', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if([Link]('%') < 80 && [Link]('0x0F0B','0x0000')){
[Link]('0x0F0B');
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Refresh', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('Strength') && [Link]('0x0F09',
'0x0000')){
[Link]('0x0F09','0x0000');
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Strength', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('Agility') &&
[Link]('0x0F08','0x0000')){
[Link]('0x0F08');
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Agility', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('orange petals') && [Link]('0x1021',
'0x002B') && [Link]('orangePetalCooldown') >= 300000){
[Link]('0x1021', '0x002B');
[Link]('orangePetalCooldown',0);
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Orange Petal', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
} else if(![Link]('rose of trinsic petals') &&
[Link]('0x1021', '0x000E') && [Link]('purplePetalCooldown') >= 300000){
[Link]('0x1021', '0x000E');
[Link]('purplePetalCooldown',0);
[Link]('action', 1450, 'AboveChar', 'line|bar',
'Purple Petal', 0, 0, '0x09C2', 1, '0xFFFFFFFF');
[Link]('action', 20, 0);
[Link]('action', false);
}
}
if(![Link]('Combat')){
break;
}
}
}
//--#nothing important
function manualRailWriter() {
if (![Link]()) {
[Link]();
}
[Link]('{ x: '+Player.X()+', y: '+Player.Y()+', z: '+Player.Z()
+' },');
}

function manualRailWriter2() {
if (![Link]()) {
[Link]();
}
[Link]('['+Player.X()+', '+Player.Y()+'],');
}
//--#Loot
function LooterScript() {
var IgnoreCorpseList = []
while (true) {
[Link](100);
var corpses = [Link]('0x2006', any, ground, " ", 1);
if (corpses != '') {
if (![Link]('AllNames') || [Link]('AllNames') > 2000) {
[Link]('AllNames').Play(false, 1000)
[Link]('AllNames')
}
for (i = [Link]-1; i >= 0; i--) {
if ([Link](corpses[i])) {
var corpses1 = [Link](corpses[i]);
var corpsejournalcheck = [Link]('corpse', 'item',
[Link](), '0x03B2') //error here, maybe corpses[i].Serial() fixes?
if (corpsejournalcheck &&
[Link]([Link]()) == -1) {
var corpsecont = [Link](any, any,
[Link]())
for (z = 0; z < [Link]; z++) {
var LootValue = lootprops(corpsecont[z])
if ([Link] == 1) {
var lootObj = [Link](corpsecont[z])
[Link](corpsecont[z])
[Link](300)
[Link](backpack)
[Link](900)
}
var items = [Link](any, any, corpsecont[z])
if (items != '') {
for (y = 0; y < [Link]; y++) {
var LootValue = lootprops(items[y].Serial())
if ([Link] == 1) {
[Link](items[y].Serial())
[Link](300)
[Link](backpack)
[Link](900)
}
}
}
}
[Link]([Link]());
if ([Link] > 50) {
[Link]();
}
}
}
}
}
}
}
function LooterScriptPassThrough(corpseSerial) {
var corpses1 = [Link](corpseSerial);
if (corpses1 != null) {
var corpsejournalcheck = [Link]('corpse', 'item',
[Link](), '0x03B2');
if (corpsejournalcheck) {
var corpsecont = [Link](any, any, [Link]())
for (z = 0; z < [Link]; z++) {
var LootValue = lootprops(corpsecont[z])
if ([Link] == 1) {
var lootObj = [Link](corpsecont[z])
[Link](corpsecont[z])
[Link](300)
[Link](backpack)
[Link](900)
}
var items = [Link](any, any, corpsecont[z])
if (items != '') {
for (y = 0; y < [Link]; y++) {
var LootValue = lootprops(items[y].Serial())
if ([Link] == 1) {
[Link](items[y].Serial())
[Link](300)
[Link](backpack)
[Link](900)
}
}
}
}
}
}
}
function weaponModsAndSpareWeight(_serial) {
var imbueLibrary = [['Hit Fireball',2,70,2,5.6,1,0],
['Hit Lightning',2,70,2,5.6,1,0],
['Faster Casting',1,1,1,140,0,0],
['Mage Weapon',-29,-20,1,10,1,1],
['Spell Channeling',0,0,1,100,0,0],
['Balanced',0,0,1,100,0,0],
['Damage Increase',1,70,1,2,1,1],
['Defense Chance Increase',1,20,1,7.35,1,1],
['Hit Chance Increase',1,20,1,8.67,1,1],
['Swing Speed Increase',5,40,5,18.34,1,1],
['Use Best Weapon Skill',0,0,1,150,0,0],
['Hit Cold Area',2,70,2,2,1,1],
['Hit Energy Area',2,70,2,2,1,1],
['Hit Fire Area',2,70,2,2,1,1],
['Hit Physical Area',2,70,2,2,1,1],
['Hit Poison Area',2,70,2,2,1,1],
['Hit Dispel',2,70,2,2,1,1],
['Hit Harm',2,70,2,4.4,1,0],
['Hit Life Leech',2,100,2,4.4,1,1],
['Hit Lower Attack',2,70,2,4.4,1,1],
['Hit Lower Defense',2,70,2,5.2,1,0],
['Hit Magic Arrow',2,70,2,4.8,1,0],
['Hit Mana Leech',2,100,2,4.4,1,1],
['Hit Stamina Leech',2,100,2,4,1,1],
['Luck',1,150,1,150,1,1],
['Cold Resist',1,20,1,6.7,1,1],
['Energy Resist',1,20,1,6.7,1,1],
['Fire Resist',1,20,1,6.7,1,1],
['Physical Resist',1,20,1,6.7,1,1],
['Poison Resist',1,20,1,6.7,1,1],
['Hit Point Regeneration',1,9,1,50,0,0],
['Mana Regeneration',1,9,1,50,0,0],
['Stamina Regeneration',1,9,1,33.34,0,0],
['Strength Bonus',1,10,1,13.75,0,0],
['Intelligence Bonus',1,10,1,13.75,0,0],
['Dexterity Bonus',1,10,1,13.75,0,0],
['Enhance Potions',1,5,1,4,0,0],
['Reactive Paralyze',0,0,1,140,0,0],
['Hit Fatigue',10,70,10,25,0,0],
['Splintering',5,30,5,37.5,0,0],
['Battle Lust',0,0,1,100,0,0],
['Hit Mana Drain',2,70,2,5,0,0],
['Lower Requirements',10,100,10,10,0,0],
['Durability Bonus',10,150,10,10,0,0],
['Arachnid Slayer',0,0,1,130,0,0],
['Demon Slayer',0,0,1,130,0,0],
['Elemental Slayer',0,0,1,130,0,0],
['Fey Slayer',0,0,1,130,0,0],
['Repond Slayer',0,0,1,130,0,0],
['Reptile Slayer',0,0,1,130,0,0],
['Undead Slayer',0,0,1,130,0,0],
['Air Elemental Slayer',0,0,1,110,0,0],
['Blood Elemental Slayer',0,0,1,110,0,0],
['Earth Elemental Slayer',0,0,1,110,0,0],
['Fire Elemental Slayer',0,0,1,110,0,0],
['Poison Elemental Slayer',0,0,1,110,0,0],
['Snow Elemental Slayer',0,0,1,110,0,0],
['Water Elemental Slayer',0,0,1,110,0,0],
['Dragon Slayer',0,0,1,110,0,0],
['Gargoyle Slayer',0,0,1,110,0,0],
['Lizardman Slayer',0,0,1,110,0,0],
['Ogre Slayer',0,0,1,110,0,0],
['Ophidian Slayer',0,0,1,110,0,0],
['Orc Slayer',0,0,1,110,0,0],
['Scorpion Slayer',0,0,1,110,0,0],
['Snake Slayer',0,0,1,110,0,0],
['Spider Slayer',0,0,1,110,0,0],
['Terathan Slayer',0,0,1,110,0,0],
['Troll Slayer',0,0,1,110,0,0],
['Blood Drinker',0,0,1,140,0,0],
['Lower Mana Cost',1,5,1,13.75,0,0],
['Mana Increase',1,5,1,13.75,0,0],
['Stamina Increase',1,5,1,13.75,0,0],
['Hit Point Increase',1,7,1,22,0,0]];

var item = [Link](_serial);


var modcounter = 0;
var weightTally = 0;
[Link] = 0;
[Link] = 0;
if (item != null) {
for (i=0;i<[Link];i++) {
if ([Link]([Link](), imbueLibrary[i][0])) {
modcounter = modcounter + 1;
}
}
[Link] = modcounter;
for (j = 0; j < [Link]; j++) {
if ([Link]([Link](), imbueLibrary[j][0])) {
if (imbueLibrary[j][1] > 0) {
if (imbueLibrary[j][6] === 1) {
weightTally = weightTally +
[Link](imbueLibrary[j][1] * (imbueLibrary[j][4] / imbueLibrary[j][3]));
}
else {
var dynamicPart = imbueLibrary[j][0];
var shieldpropsvaluemod = new RegExp(dynamicPart +
'\\s\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
weightTally = weightTally + [Link](shieldpropsINT
* (imbueLibrary[j][4] / imbueLibrary[j][3]));
}
}
else if (imbueLibrary[j][1] < 0) { //specifically for -mage
weapon
if (imbueLibrary[j][6] === 1) {
weightTally = weightTally + 10;
}
else {
var dynamicPart = imbueLibrary[j][0];
var shieldpropsvaluemod = new RegExp(dynamicPart +
'\\s\\.\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
weightTally = weightTally + ((((shieldpropsINT * -1)
+29) / .1) + 10);
}
}
else {
weightTally = weightTally + imbueLibrary[j][4];
}
}
}
if ([Link]([Link](), 'One-handed Weapon')) {
weightTally = 450 - weightTally;
}
else {
weightTally = 550 - weightTally;
}
[Link] = weightTally;
return this
}
return this
}
function armorValueCalculator(_serial) {
var weightedList = [['Mana Regeneration',1,4,1,0.366666666666667,0,0],
['Hit Point Regeneration',1,4,1,0.366666666666667,0,0],
['Stamina Regeneration',1,4,1,0,0,0],
['Lower Mana Cost',2,10,1,0.1375,0,0],
['Lower Reagent Cost',5,25,1,0.055,0,0],
['Strength Bonus',1,5,1,0.25,0,0],
['Intelligence Bonus',1,5,1,0.25,0,0],
['Dexterity Bonus',1,5,1,0.25,0,0],
['Mana Increase',1,10,1,0.08,0,0],
['Hit Point Increase',1,7,1,0.22,0,0],
['Stamina Increase',1,10,1,0.15,0,0],
['Casting Focus',1,3,1,0,0,0],
['Poison Eater',3,15,1,0.06,0,0],
['Damage Eater',3,15,1,0.0733333333333333,0,0],
['Kinetic Eater',3,15,1,0.0666666666666667,0,0],
['Fire Eater',3,15,1,0.0666666666666667,0,0],
['Cold Eater',3,15,1,0,0,0],
['Energy Eater',3,15,1,0.06,0,0],
['Hit Chance Increase',1,5,1,0.2,0,0],
['Defense Chance Increase',1,5,1,0.2,0,0],
['Reflect Physical Damage',5,20,1,0,0,0],
['Enhance Potions',1,5,1,0,0,0],
['Physical Resist',1,23,1,0.00217391304347826,0,0],
['Fire Resist',1,23,1,0.00217391304347826,0,0],
['Cold Resist',1,23,1,0.00217391304347826,0,0],
['Poison Resist',1,23,1,0.00217391304347826,0,0],
['Energy Resist',1,23,1,0.00217391304347826,0,0]];
var item = [Link](_serial);
var valueTally = 0;
var skillTotal = 0;
[Link] = 0;
if (item != null) {
for (i=0;i<[Link];i++) {
if ([Link]([Link](),weightedList[i][0])) {
var dynamicPart = weightedList[i][0];
var shieldpropsvaluemod = new RegExp('\\n' + dynamicPart +
'\\s\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
if (weightedList[i][0] === 'Hit Point Increase') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Mana Regeneration') {
if (shieldpropsINT < 2) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 2) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Hit Point Regeneration') {
if (shieldpropsINT < 2) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 2) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Lower Mana Cost') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Lower Reagent Cost') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Mana Increase') {
if (shieldpropsINT < 2) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 2) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Stamina Increase') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Energy Eater') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Damage Eater') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Kinetic Eater') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Fire Eater') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Poison Eater') {
if (shieldpropsINT < 6) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 6) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Hit Chance Increase') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Defense Chance Increase')
{
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Physical Resist') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Fire Resist') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Cold Resist') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Poison Resist') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else if (weightedList[i][0] === 'Energy Resist') {
if (shieldpropsINT < 5) {
valueTally = valueTally + 0;
}
else if (shieldpropsINT >= 5) {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
else {
valueTally = valueTally + (shieldpropsINT *
weightedList[i][4]);
}
}
}
[Link] = valueTally;
return this
}
return this
}
function jewelryComplimentarySkills(_serial) {
var compSkills =
[['Magery','Stealth','Throwing','Archery','Chivalry','','','','','','','','',''],
['Evaluate
Intelligence','Stealth','Throwing','Archery','Chivalry','','','','','','','','','']
,
['Mysticism','Stealth','Throwing','Chivalry','','','','','','','','','',''],
['Focus','Stealth','Throwing','Chivalry','','','','','','','','','',''],
['Necromancy','Stealth','','','','','','','','','','','',''],
['Spirit Speak','Stealth','Chivalry','Animal Lore','Animal
Taming','','','','','','','','',''],
['Resisting Spells','','','','','','','','','','','','',''],
['Stealth','Magery','Evaluate
Intelligence','Mysticism','Focus','Necromancy','Spirit
Speak','Wrestling','Tactics','Anatomy','Healing','Chivalry','Musicianship','Discord
ance'],
['Ninjitsu','Tactics','Anatomy','Healing','Chivalry','','','','','','','','',''],
['Animal Taming','Spirit Speak','Healing','','','','','','','','','','',''],
['Animal Lore','Spirit Speak','Healing','','','','','','','','','','',''],
['Swordsmanship','Mace Fighting','Throwing','','','','','','','','','','',''],
['Mace Fighting','Swordsmanship','Archery','','','','','','','','','','',''],
['Throwing','Magery','Evaluate
Intelligence','Focus','Swordsmanship','Archery','','','','','','','',''],
['Archery','Magery','Evaluate Intelligence','Mace
Fighting','Throwing','','','','','','','','',''],
['Wrestling','Stealth','Tactics','Bushido','Anatomy','Healing','Chivalry','','','',
'','','',''],
['Tactics','Stealth','Ninjitsu','Wrestling','','','','','','','','','',''],
['Bushido','Wrestling','','','','','','','','','','','',''],
['Parrying','','','','','','','','','','','','',''],
['Anatomy','Stealth','Ninjitsu','Wrestling','','','','','','','','','',''],
['Healing','Stealth','Ninjitsu','Animal Taming','Animal
Lore','Wrestling','Musicianship','Discordance','','','','','',''],
['Chivalry','Magery','Evaluate Intelligence','Mysticism','Focus','Spirit
Speak','Stealth','Ninjitsu','Wrestling','','','','',''],
['Musicianship','Stealth','Healing','','','','','','','','','','',''],
['Discordance','Stealth','Healing','','','','','','','','','','','']];
var item = [Link](_serial);
var tempSkills = [];
var tempSkills2 = [];
var summ = 0;
var lowestSumm = 999999;
var counter = 0;
[Link] = 0;
if (item != null) {
for (i=0;i<[Link];i++) {
var dynamicPart = compSkills[i][0];
if ([Link]([Link](), dynamicPart)) {
var jewelrypropsvaluemod = new RegExp(dynamicPart + '\\s\\
+\\d+');
var jewelrypropsvalue =
[Link]([Link]());
var jewelrypropsvalue2 = /\d+/.exec(jewelrypropsvalue);
var jewelrypropsINT = parseInt(jewelrypropsvalue2);
[Link]([dynamicPart, jewelrypropsINT]);
}
}
}
tempSkills2 = [Link]([Link](tempSkills));
if ([Link] > 1) {
for (i=0;i<[Link];i++) {
for (j=0;j<[Link];j++) {
if (tempSkills2[i][0] === compSkills[j][0]) {
summ = tempSkills2[i][1];
tempSkills2[i][1] = 0;
for (l=0;l<[Link];l++) {
for (k=0;k<compSkills[j].length;k++) {
if (tempSkills2[l][0] === compSkills[j]
[k]) {
//[Link]('Analyzing ' +
tempSkills2[i][0] + ' setting value of ' + tempSkills2[l][0] + ' to zero');
counter = counter + 1;
tempSkills2[l][1] = 0;
}
}
}
for (m=0;m<[Link];m++) {
//[Link]('Adding ' + summ + ' from ' +
tempSkills[i][0] + ' to ' + tempSkills[m][1] + ' from ' + tempSkills[m][0]);
if (counter <= 2 ) {
summ = summ + tempSkills2[m][1];
}
else {
summ = 99999;
}
}
//[Link]('Summ is ' + summ);
if (summ < lowestSumm) {
lowestSumm = summ;
}
//[Link]('Lowest Summ is ' + lowestSumm);
}
counter = 0;
summ = 0;
tempSkills2 = [Link]([Link](tempSkills));
}
}
}
else if ([Link] === 1) {
for (m=0;m<[Link];m++) {
var summ = summ + tempSkills2[m][1];
}
lowestSumm = summ;
}
else {
lowestSumm = 0;
}
[Link] = lowestSumm;
return this
}
function lootprops(_serial) {
var item = [Link](_serial)
var jewelryprops = [['Faster Casting', 1, 1], ['Faster Cast Recovery', 2, 4],
['Enhance Potions', 15, 35], ['Swing Speed Increase', 5, 10], ['Damage Increase',
15, 35], ['Hit Chance Increase', 5, 20], ['Defense Chance Increase', 5, 20],
['Mana Regeneration', 2, 4]];
//var armorprops = [['Lower Mana Cost', 6, 10], ['Lower Reagent Cost', 10, 25],
['Mana Regeneration', 2, 4], ['Hit Point Regeneration', 2, 4], ['Hit Point
Increase', 3, 7], ['Stamina Increase', 6, 10], ['Mana Increase', 4, 10],
// ['Strength Bonus', 3, 5],
['Intelligence Bonus', 3, 5], ['Dexterity Bonus', 3, 5], ['Hit Chance Increase', 5,
5], ['Defense Chance Increase', 1, 5], ['Luck', 150, 150], ['Damage Eater', 3, 15],
['Fire Eater', 12, 15],
// ['Energy Eater', 12, 15], ['Kinetic
Eater', 12, 15], ['Poison Eater', 12, 15]]
var weaponprops = [['Splintering Weapon', 20, 30], ['Hit Lower Defense', 40,
70], ['Hit Lightning', 40, 70], ['Hit Fireball', 40, 70], ['Hit Harm', 40, 70],
['Spell Channeling', 0, 0], ['Reactive Paralyze', 0, 0]]
var shieldprops = [['Soul Charge', 20, 30], ['Defense Chance Increase', 15,
20],['Mana Regeneration', 2, 5], ['Intelligence Bonus', 3, 5], ['Strength Bonus',
3, 5], ['Dexterity Bonus', 3, 5], ['Hit Point Increase',3,7] ,['Swing Speed
Increase',5,10],
['Lower Mana Cost',4,8]]
var modcounter = 0
[Link] = 0
if (item == null) {
[Link] = 0;
return this
}
if ([Link]([Link](), 'Cursed')) { // error here saying item
not an object
[Link] = 0
return this
}
if ([Link]([Link](), 'Skill Required')) {
var weaponModsSpareWeight = weaponModsAndSpareWeight(_serial);
//weapon eval script
[Link]('entering weapon loot')
if ([Link]([Link](), 'Splintering Weapon 30') &&
([Link]([Link](), 'Butcher Knife') ||
[Link]([Link](), 'Bokuto') ||
[Link]([Link](), 'Wakizashi') ||
[Link]([Link](), 'Bone Harvester') ||
([Link]([Link](), 'Cleaver') &&
[Link]([Link](), 'skill required: swordsmanship')) ||
[Link]([Link](), 'Longsword') ||
[Link]([Link](), 'Broadsword') ||
[Link]([Link](), 'Pickaxe') ||
[Link]([Link](), 'Diamond Mace') ||
[Link]([Link](), 'Hammer Pick') ||
[Link]() == '0x0F5C' || //two different facing maces, i couldn't
use the name because it would interfere with "Mace Fighting"
[Link]() == '0x0F5D' ||
[Link]([Link](), 'War Axe') ||
[Link]([Link](), 'Kryss') ||
[Link]([Link](), 'Lajatang') ||
[Link]([Link](), 'War Fork') ||
[Link]([Link](), 'Disc Mace') ||
[Link]([Link](), 'Scepter') ||
[Link]([Link](), 'War Mace') ||
[Link]([Link](), 'Ornate Axe') ||
[Link]([Link](), 'Halberd') ||
[Link]([Link](), 'No-dachi') ||
[Link]([Link](), 'Two Handed Axe') ||
[Link]([Link](), 'Battle Axe') ||
[Link]([Link](), 'Hatchet') ||
[Link]([Link](), 'Gnarled Staff'))) {
for (j = 0; j < [Link]; j++) {
if ([Link]([Link](), weaponprops[j][0])) {
if (weaponprops[j][1] === 0) {
modcounter = modcounter + 1;
}
else {
var dynamicPart = weaponprops[j][0];
var shieldpropsvaluemod = new RegExp(dynamicPart +
'\\s\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
if (shieldpropsINT >= weaponprops[j][1] &&
shieldpropsINT <= weaponprops[j][2]) {
modcounter = modcounter + 1;
}
}
}
}
[Link] = modcounter
if (modcounter > 1) {
[Link] = 1
}
else if (modcounter > 0 && [Link] < 5 &&
[Link] >= 100) {
[Link] = 1;
}
}
else if ([Link]([Link](), 'Splintering Weapon 25') &&
([Link]([Link](), 'Butcher Knife') ||
[Link]([Link](), 'Bokuto') ||
[Link]([Link](), 'Wakizashi') ||
[Link]([Link](), 'Bone Harvester') ||
([Link]([Link](), 'Cleaver') &&
[Link]([Link](), 'skill required: swordsmanship')) ||
[Link]([Link](), 'Longsword') ||
[Link]([Link](), 'Broadsword') ||
[Link]([Link](), 'Pickaxe') ||
[Link]([Link](), 'Diamond Mace') ||
[Link]([Link](), 'Hammer Pick') ||
[Link]() == '0x0F5C' || //two different facing maces, i couldn't
use the name because it would interfere with "Mace Fighting"
[Link]() == '0x0F5D' ||
[Link]([Link](), 'War Axe') ||
[Link]([Link](), 'Kryss') ||
[Link]([Link](), 'Lajatang') ||
[Link]([Link](), 'War Fork') ||
[Link]([Link](), 'Disc Mace') ||
[Link]([Link](), 'Scepter') ||
[Link]([Link](), 'War Mace') ||
[Link]([Link](), 'Ornate Axe') ||
[Link]([Link](), 'Halberd') ||
[Link]([Link](), 'No-dachi') ||
[Link]([Link](), 'Two Handed Axe') ||
[Link]([Link](), 'Battle Axe') ||
[Link]([Link](), 'Hatchet') ||
[Link]([Link](), 'Gnarled Staff'))) {
for (j = 0; j < [Link]; j++) {
if ([Link]([Link](), weaponprops[j][0])) {
if (weaponprops[j][1] === 0) {
modcounter = modcounter + 1;
}
else {
var dynamicPart = weaponprops[j][0];
var shieldpropsvaluemod = new RegExp(dynamicPart +
'\\s\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
if (shieldpropsINT >= weaponprops[j][1] &&
shieldpropsINT <= weaponprops[j][2]) {
modcounter = modcounter + 1;
}
}
}
}
[Link] = modcounter
if (modcounter > 2) {
[Link] = 1;
}
else if (modcounter > 1 && [Link] < 5 &&
[Link] >= 100) {
[Link] = 1;
}
else if (modcounter > 0 && [Link] < 4 &&
[Link] >= 200) {
[Link] = 1;
}
}
else if ([Link]([Link](), 'Splintering Weapon 20') &&
([Link]([Link](), 'Butcher Knife') ||
[Link]([Link](), 'Bokuto') ||
[Link]([Link](), 'Wakizashi') ||
[Link]([Link](), 'Bone Harvester') ||
([Link]([Link](), 'Cleaver') &&
[Link]([Link](), 'skill required: swordsmanship')) ||
[Link]([Link](), 'Longsword') ||
[Link]([Link](), 'Broadsword') ||
[Link]([Link](), 'Pickaxe') ||
[Link]([Link](), 'Diamond Mace') ||
[Link]([Link](), 'Hammer Pick') ||
[Link]() == '0x0F5C' || //two different facing maces, i couldn't
use the name because it would interfere with "Mace Fighting"
[Link]() == '0x0F5D' ||
[Link]([Link](), 'War Axe') ||
[Link]([Link](), 'Kryss') ||
[Link]([Link](), 'Lajatang') ||
[Link]([Link](), 'War Fork') ||
[Link]([Link](), 'Disc Mace') ||
[Link]([Link](), 'Scepter') ||
[Link]([Link](), 'War Mace') ||
[Link]([Link](), 'Ornate Axe') ||
[Link]([Link](), 'Halberd') ||
[Link]([Link](), 'No-dachi') ||
[Link]([Link](), 'Two Handed Axe') ||
[Link]([Link](), 'Battle Axe') ||
[Link]([Link](), 'Hatchet') ||
[Link]([Link](), 'Gnarled Staff'))) {
for (j = 0; j < [Link]; j++) {
if ([Link]([Link](), weaponprops[j][0])) {
if (weaponprops[j][1] === 0) {
modcounter = modcounter + 1;
}
else {
var dynamicPart = weaponprops[j][0];
var shieldpropsvaluemod = new RegExp(dynamicPart +
'\\s\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
if (shieldpropsINT >= weaponprops[j][1] &&
shieldpropsINT <= weaponprops[j][2]) {
modcounter = modcounter + 1;
}
}
}
}
[Link] = modcounter
if (modcounter > 2) {
[Link] = 1;
}
else if (modcounter > 1 && [Link] < 5 &&
[Link] >= 100) {
[Link] = 1;
}
else if (modcounter > 0 && [Link] < 4 &&
[Link] >= 200) {
[Link] = 1;
}
}
return this
}
else if ([Link]([Link](), 'Strength Requirement') && !
[Link]([Link](), 'Skill Required') &&
[Link]([Link](),'Wooden Shield') &&
[Link]([Link](),'Faster Casting 1') &&
[Link]([Link](),'Soul Charge') &&
[Link]([Link](),'Reactive Paralyze')) {
//wooden shield eval script
[Link]('entering wooden shield loot')
for (j = 0; j < [Link]; j++) {
if ([Link]([Link](), shieldprops[j][0])) {
var dynamicPart = shieldprops[j][0];
var shieldpropsvaluemod = new RegExp(dynamicPart + '\\s\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
if (shieldpropsINT >= shieldprops[j][1] && shieldpropsINT <=
shieldprops[j][2]) {
modcounter = modcounter + 1
}
}
}
[Link] = modcounter
if (modcounter > 2) {
[Link] = 1
}
return this
}
else if ([Link]([Link](), 'Strength Requirement') && !
[Link]([Link](), 'Skill Required')) {
//armor eval Script
[Link]('entering armor loot');
if (([Link]([Link](), 'Lower Reagent Cost') ||
[Link]([Link](), 'Lower Mana Cost')) && !
[Link]([Link](), 'Antique')) {
valueOfItem = armorValueCalculator(_serial);
if ([Link]([Link](), 'Studded') ||
[Link]([Link](), 'Bone') || [Link]([Link](),
'Hide') || [Link]([Link](), 'Gargish Stone')) {
lootThreshold = [Link];
if (lootThreshold > 6) {
[Link] = 1
}
return this
}
else {
lootThreshold = [Link];
if (lootThreshold > 7.2) {
[Link] = 1
}
return this
}
}
}
else if (([Link]([Link](), 'Ring') ||
[Link]([Link](), 'Bracelet')) && [Link]([Link](),
'Artifact')) {
//jewel eval Script
[Link]('entering jewel loot')
for (j = 0; j < [Link]; j++) {
var dynamicPart = jewelryprops[j][0];
/*if (dynamicPart === 'Magery' || dynamicPart === 'Evaluate
Intelligence' || dynamicPart === 'Focus' || dynamicPart === 'Mysticism' ||
dynamicPart === 'Necromancy' || dynamicPart === 'Spirit Speak' ||
dynamicPart === 'Swordsmanship' || dynamicPart === 'Tactics' ||
dynamicPart === 'Mace Fighting' || dynamicPart === 'Fencing' || dynamicPart ===
'Anatomy' || dynamicPart === 'Healing' || dynamicPart === 'Chivalry' ||
dynamicPart === 'Musicianship' || dynamicPart === 'Discordance'
|| dynamicPart === 'Resisting Spells' || dynamicPart === 'Ninjitsu' || dynamicPart
=== 'Bushido' || dynamicPart === 'Hiding' ||
dynamicPart === 'Stealth' || dynamicPart === 'Wrestling' ||
dynamicPart === 'Archery' || dynamicPart === 'Throwing' || dynamicPart ===
'Parrying' || dynamicPart === 'Animal Taming' ||
dynamicPart === 'Animal Lore' || dynamicPart === 'Veterinary' ||
dynamicPart === 'Provocation') {
var shieldpropsvaluemod = new RegExp(dynamicPart + '\\s\\+\\d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
var skillTotal = skillTotal + shieldpropsINT;
if (shieldpropsINT >= jewelryprops[j][1] && shieldpropsINT <=
jewelryprops[j][2]) {
modcounter = modcounter + 1
}
}*/
//else {
var shieldpropsvaluemod = new RegExp('\\n' + dynamicPart + '\\s\\
d+');
var shieldpropsvalue =
[Link]([Link]());
var shieldpropsvalue2 = /\d+/.exec(shieldpropsvalue);
var shieldpropsINT = parseInt(shieldpropsvalue2);
if (dynamicPart === 'Enhance Potions' && shieldpropsINT === 35) {
//for ep 35
modcounter = modcounter + 1;
}
if (shieldpropsINT >= jewelryprops[j][1] && shieldpropsINT <=
jewelryprops[j][2]) {
modcounter = modcounter + 1;
}
//}
}
var skillTotal = jewelryComplimentarySkills([Link]());
//[Link]('Skill total is ' + [Link] + ' and mod count is
' + modcounter);
[Link] = modcounter
if ([Link] >= 60 && modcounter >= 0) {
[Link] = 1
}
else if ([Link] >= 45 && modcounter >= 3) {
[Link] = 1
}
else if ([Link] >= 30 && modcounter >= 6) {
[Link] = 1
}
else if ([Link] >= 15 && modcounter >= 7) {
[Link] = 1
}
else if ([Link] >= 0 && modcounter >= 8) {
[Link] = 1
}
return this
}
return this
}
function lootValueTester() {
[Link](self,1159,'Target armor to get loot value');
[Link]('myTarget');
var armorPiece = [Link]('myTarget');
var armorValue = armorValueCalculator([Link]())
[Link]('The value of this piece of armor is ' + [Link]);
}
//--#nightmare farmer
/
*----------------------------------------------------------------------------------
---------------------------
Lank's Nightmare Farmer
Version: 1.0
Description: This script will kill nightmares using a ridable pet and will play a
bell sound and notify you via discord
when a rare color spawns. The script will then mount
your pet, to prevent the nightmare from attacking
and dying to your pet. It is then your unscripted
responsibility to tame the beast!
Location: Works best in the covetous mountains between covetous levels 1 and 2.
Instructions:
1) Update your Mount Serial below.
2) Update scanRange to your desired range. (12 has worked great for me)
3) Add your Discord Webhook URL for your Discord Notifications.
4) Download the boxing_bell wav file included with this script and save in
your Orion Launcher folder.
5) Update the file path of the wav file below (wavFilePath line 19)
6) Run the "main" function to get the script working.
-----------------------------------------------------------------------------------
--------------------------*/

var mountID = '0x03560F1C'; // deaths fire beetle


var scanRange = 12;
var webhookURL = "WEBHOOK"; // Replace with your webhook URL
var wavFilePath = 'C:\\Orion Launcher\\sounds\\boxing_bell';

//DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU'RE DOING!!!
var keepColors = {
shogunGrey: { name: 'Shogun Grey', code: '0x0ACC' },
bloodwoodRed: { name: 'Bloodwood Red', code: '0x04AA' },
summer: { name: 'Summer', code: '0x0AD0' },
demonicForces: { name: 'Demonic Forces', code: '0x0AC1' },
enchantedOrigin: { name: 'Enchanted Origin', code: '0x0493' }
};
var charName = [Link]();
var shard = [Link]();
var killCount = 0;

function discoMessage(theMessage) {
var combinedName = "**" + charName + "** [" + "**" + shard + "**]";
var paramText = "username=" + combinedName + "&content= " + theMessage;
[Link](200);
[Link](webhookURL, paramText);
}

function getColorName(colorCode) {
for (var key in keepColors) {
if (keepColors[key].code === colorCode) {
return keepColors[key].name;
}
}
return null;
}

function isKeepColor(colorCode) {
for (var key in keepColors) {
if (keepColors[key].code === colorCode) {
return true;
}
}
return false;
}

function scanTarget() {
var targets = [Link]('any', 'any', 'ground', 'mobile', scanRange,
'gray|red|orange');
if ([Link]) {
var target = targets[0];
return target;
} else {
[Link]('No targets found');
}
}

function killTarget(target) {
if (!target) return;

var maxRetries = 3;
var retryCount = 0;

[Link](500);

while (retryCount < maxRetries) {


[Link]("all kill");
[Link](1000);
[Link]([Link]());

var startTime = [Link]();


var isEngaged = false;

while ([Link]() - startTime < 5000) {


if ([Link]()) {
isEngaged = true;
break;
}

if ([Link]() > 2 && [Link]() < [Link]()) {


isEngaged = true;
break;
}

[Link](500);
}

if (isEngaged) {
break;
} else {
if (![Link]()) {
break;
}
[Link]('self', '0x0481', ' ', 'Retrying attack, attempt ' +
(retryCount + 1));
retryCount++;
}
}

if (![Link]()) {
while (target && [Link]() && ![Link]()) {
[Link](500);
}

killCount++;
[Link]('self', '0x0481', ' ', 'Target Defeated. Total Kills: ' +
killCount);
} else {
[Link]('self', '0x0481', ' ', 'Target already dead or defeated
during engagement.');
}

[Link]("all follow me");


[Link]("all guard me");
}

function mount() {
var mount = [Link](mountID);
var mountDistance = [Link]();
if (mountDistance > 1) {
[Link]('All Follow Me');
while (mountDistance > 1) {
[Link](200);
mountDistance = [Link]();
}
}
[Link](mountID);
}

function nightmareFarmMain() {
while (![Link]()) {
var target = scanTarget();
if (target != null) {
[Link](300);
var color = [Link]();
// Kill target if its color is NOT in keepColors
if (!isKeepColor(color)) {
killTarget(target);
} else {
var colorName = getColorName(color);
var message = '**' + charName + '** found a cool nightmare on **' +
shard + '**: :racehorse: **' + colorName + '** :racehorse:';
[Link]('self', '0x0481', ' ', message);
[Link](wavFilePath);
discoMessage(message); // Send flashy notification for keep color
mount();
[Link]('nightmareFarmMain')
}
}
[Link](100);
}
}
//--#DPS meter
function showStatistics() {
var dps = 0;
var highestdps = 0;
var damage_taken = 0;
var highest_damage_taken = 0;

var lastMessage = null;


var pastMessage = null;
var damage_text = [];

var last_message_time = [Link]();


var dps_timer = 0;

var statistics_info = {
'startGold': 0,
'runTime': 0,
'prev_gold': 0,
'prev_runTimer': 0,
'runTimer': 0,
'total_damage': 0,
'highestdps': 0,
'total_damage_taken': 0,
'highest_damage_taken': 0,
'id': get_new_id(),
'continue': true,
'update': false
}
[Link]('statistics_info: ' + statistics_info['id'], statistics_info);

while (statistics_info['continue'] && [Link]().length < 30) {


dps = 0;
damage_taken = 0;

lastMessage = [Link]();
pastMessage = lastMessage;
dps_timer = [Link]();
while (pastMessage != null && [Link]() > last_message_time)
{
if ([Link]([Link](), 'damageecho') && !
[Link]([Link](), [Link]())) {
//Damage parsing.
damage_text = [Link]().match(/^damageecho:\s\w*=\
w*\s\w*=(\d*)/i);
//Adding damage.

if (damage_text != null) {
dps += parseInt(damage_text[1]);
}
}
else if ([Link]([Link](), 'damageecho') &&
[Link]([Link](), [Link]())) {
damage_text = [Link]().match(/^damageecho:\s\w*=\
w*\s\w*=(\d*)/i);

if (damage_text != null) {
damage_taken += parseInt(damage_text[1]);
}
}

//Check for dps update.


if (dps > highestdps) {
highestdps = dps;
}
if (damage_taken > highest_damage_taken) {
highest_damage_taken = damage_taken;
}

pastMessage = [Link]();
}

if (lastMessage != null) {
last_message_time = [Link]();
}

if ([Link]('statistics_info: ' + statistics_info['id'])


['update']) {
statistics_info = [Link]('statistics_info: ' +
statistics_info['id']);
statistics_info['update'] = false;

highestdps = statistics_info['highestdps'];
highest_damage_taken = statistics_info['highest_damage_taken'];
}

if (statistics_info['continue'] && (statistics_info['runTimer'] > 0


|| ![Link]('custom', 100+parseInt(statistics_info['id'])))) {
statisticsGump(dps, highestdps, damage_taken,
highest_damage_taken, statistics_info, ![Link]('custom',
100+parseInt(statistics_info['id'])));
}

[Link]('statistics_info: ' + statistics_info['id'],


statistics_info);

if (statistics_info['continue'] && [Link]([Link]()-dps_timer,


0, 1000))
[Link](1000-([Link]()-dps_timer));
}

[Link]('custom', 100 + parseInt(statistics_info['id']));


[Link]('statistics_info: ' + statistics_info['id']);
}

function get_new_id() {
var found_unused_id = false;
var id = 0;
while (!found_unused_id) {
if (![Link]('custom', 100+id))
found_unused_id = true;
else
id += 1
}
[Link]('statistics_info: ' + String(id));

return String(id);
}

function statisticsGump(dps, highestdps, damage_taken, highest_damage_taken,


statistics_info, init) {
var gump = [Link](100 + parseInt(statistics_info['id']));
if (init)
[Link]();

var x = 220;
var y = -100;

var text_color = 53;

//Set background.
//[Link](1, x, y, 130, 150, '0x1400', 1, 0);
y += 10;

//Display.
[Link](x+10, y, text_color, 'Timer #' + statistics_info['id'], 0, 0);
[Link](x+85, y, text_color, 'Amt', 0, 1);
[Link](x+120, y, text_color, 'Total', 0, 2);
[Link](x+195, y, text_color, '/sec', 0, 3);
[Link](x+245, y, text_color, '/hour', 0, 4);
y += 20;

[Link](x+10, y, text_color, 'Dmg Done:', 0, 5);


[Link](x+85, y, text_color, dps, 0, 6);
[Link](x+120, y, text_color, damageString(dps, 'total_damage',
statistics_info), 0, 7);
[Link](x+195, y, text_color, round(rateString(1000,
statistics_info['total_damage'], null, statistics_info), 2), 0, 8);
[Link](x+245, y, text_color, rateString(60*60*1000,
statistics_info['total_damage'], null, statistics_info), 0, 9);
y += 20;

[Link](x+10, y, text_color, 'Dmg Taken:', 0, 10);


[Link](x+85, y, text_color, damage_taken, 0, 11);
[Link](x+120, y, text_color, damageString(damage_taken,
'total_damage_taken', statistics_info), 0, 12);
[Link](x+195, y, text_color, round(rateString(1000,
statistics_info['total_damage_taken'], null, statistics_info), 2), 0, 13);
[Link](x+245, y, text_color, rateString(60*60*1000,
statistics_info['total_damage_taken'], null, statistics_info), 0, 14);
y += 20;

[Link](x+10, y, text_color, 'Gold:', 0, 15);


[Link](x+120, y, text_color, goldString(false, null, statistics_info),
0, 16);
[Link](x+245, y, text_color, rateString(60*60*1000, null, null,
statistics_info), 0, 17);
y += 20;

[Link](x+10, y, text_color, 'Gold/Dmg:', 0, 18);

var total_damage = statistics_info['total_damage'];


if (total_damage == 0)
total_damage = 1;

[Link](x+120, y, text_color,
round(getGoldAmount(statistics_info)/total_damage, 2), 0, 19);
y += 20;

[Link](x+10, y, text_color, 'Time: ' + timerString(null,


statistics_info) + '.', 0, 20);
y += 20;

if (init) {
[Link](22, x+10, y, '0x00F9', '0x00F7', '0x00F8', 0, 1, 1);
[Link](23, x+80, y, '0x00F9', '0x00F7', '0x00F8', 53, 1, 1);
[Link](24, x+150, y, '0x00F9', '0x00F7', '0x00F8', 1652, 1, 1);
[Link]('statisticTimerController ' + statistics_info['id']);
}
y += 20;

[Link](x+10, y, text_color, 'Max: DPS - ' + highestdps + ', Taken - ' +


highest_damage_taken, 0, 25);

[Link]();

statistics_info['highestdps'] = highestdps;
statistics_info['highest_damage_taken'] = highest_damage_taken;
}

function statisticTimerController(id) {
var statistics_info = [Link]('statistics_info: ' + id, {});

if ([Link]() == 22) {
start(statistics_info);
}
else if ([Link]() == 23) {
toggle_pause(statistics_info);
}
else if ([0, 24].indexOf([Link]()) > -1) {
stop(statistics_info);
}

statistics_info['update'] = true;
[Link]('statistics_info: ' + id, statistics_info);
}

function damageString(dps, name, statistics_info) {


statistics_info[name] += dps;

return goldString(false, statistics_info[name], statistics_info);


}

function round(amount, decimals) {


var correction = [Link](10, decimals);
return amount == 'Infinity' || String(amount) == 'NaN' ? 0 :
[Link](amount*correction)/correction;
}

function getGoldAmount(statistics_info) {
var gold_value = 0;

if (getRunTime(statistics_info) > 0 && statistics_info['prev_gold'] +


[Link]() - statistics_info['startGold'] > 0) {
gold_value = statistics_info['prev_gold'] + [Link]() -
statistics_info['startGold'];
}

if (statistics_info['runTimer'] == 0 && getRunTime(statistics_info) > 0 &&


[Link]() > statistics_info['startGold']) {
statistics_info['prev_gold'] += [Link]() -
statistics_info['startGold'];
}

if (statistics_info['runTimer'] == 0 && getRunTime(statistics_info) > 0) {


statistics_info['startGold'] = [Link]();
}

return gold_value;
}

function getRunTime(statistics_info) {
if (statistics_info['runTimer'] > 0)
statistics_info['runTime'] = ([Link]()-statistics_info['runTimer'])
+ statistics_info['prev_runTimer'];

return statistics_info['runTime'];
}

function goldString(shorten, gold, statistics_info) {


var gold_value = 0;
if (gold != null) {
gold_value = gold;
}
else {
gold_value = getGoldAmount(statistics_info);
}

var gold_string = '';


var num_array = [];
var k_string = '';
while (parseInt(gold_value / 1000) > 0) {
if (shorten) {
k_string += 'k';
}
else {
num_array.push(numberString(gold_value % 1000, 3));
num_array.push(',');
}

gold_value = parseInt(gold_value / 1000);


}

gold_string = String(gold_value);
if (shorten) {
gold_string += k_string;
}
var num_array_length = num_array.length
for (var num_index = 0; num_index < num_array_length; num_index++) {
gold_string += String(num_array.pop());
}

return gold_string;
}
function timerString(timer, statistics_info) {
var timer_value = 0;
if (timer != null) {
timer_value = timer;
}
else {
timer_value = getRunTime(statistics_info);
}

time_string = '';
var hours = 0;
if (timer_value >= 60*60*1000) {
hours = parseInt(timer_value / (60*60*1000));
}
time_string += numberString(hours, 2) + ':';

var mins = 0;
if (timer_value >= 60*1000) {
mins = parseInt(timer_value / (60*1000)) % 60;
}
time_string += numberString(mins, 2) + ':';

var secs = 0;
if (timer_value >= 1000) {
secs = parseInt(timer_value / 1000) % 60;
}
time_string += numberString(secs, 2);

return time_string;
}

function numberString(number, digits) {


var num_string = '';
for (var i = [Link](10, digits); i > [Link](10, String(number).length); i
/= 10) {
num_string += '0';
}

if (String(number).length > digits) {


num_string = [Link](10, digits) - 1;
}
else {
num_string += String(number);
}

return num_string;
}

function rateString(conversion, gold, timer, statistics_info) {


var time_value = 0;
if (timer != null) {
time_value = timer;
}
else {
time_value = getRunTime(statistics_info) / conversion;
}

var gold_value = 0;
if (gold != null) {
gold_value = gold;
}
else {
gold_value = getGoldAmount(statistics_info);
}

var rate = 0;
if (time_value > 0) {
rate = gold_value / time_value;
}

return goldString(true, rate, statistics_info);


}

function start(statistics_info) {
var passed_id = true
if (statistics_info == null) {
statistics_info = [Link]('statistics_info: 0', {});
passed_id = false;
}

statistics_info['startGold'] = [Link]();
statistics_info['runTime'] = 0;
statistics_info['prev_gold'] = 0;
statistics_info['prev_runTimer'] = 0;
statistics_info['runTimer'] = [Link]();
statistics_info['total_damage'] = 0;
statistics_info['total_damage_taken'] = 0;
statistics_info['highestdps'] = 0;
statistics_info['highest_damage_taken'] = 0;

if (!passed_id) {
[Link]('statistics_info: 0', statistics_info);
}

[Link](1271, 'Timer started.');


}

function toggle_pause(statistics_info) {
var passed_id = true
if (statistics_info == null) {
statistics_info = [Link]('statistics_info: 0', {});
passed_id = false;
}

if (getRunTime(statistics_info) > 0 && statistics_info['runTimer'] > 0) {


var prev_gold = getGoldAmount(statistics_info);
statistics_info['startGold'] = [Link]();
statistics_info['prev_gold'] = prev_gold;

statistics_info['prev_runTimer'] = getRunTime(statistics_info);
statistics_info['runTimer'] = 0;

[Link]('0x04F7', 'Timer paused.');


}
else if (getRunTime(statistics_info) > 0) {
statistics_info['runTimer'] = [Link]();
[Link](1271, 'Timer unpaused.');
}

if (!passed_id) {
[Link]('statistics_info: 0', statistics_info);
}
}

function stop(statistics_info) {
var passed_id = true
if (statistics_info == null) {
statistics_info = [Link]('statistics_info: 0', {});
passed_id = false;
}

statistics_info['runTimer'] = 0;
statistics_info['prev_gold'] = 0;
statistics_info['prev_runTimer'] = 0;
statistics_info['runTime'] = 0;
statistics_info['startGold'] = 0;
statistics_info['total_damage'] = 0;
statistics_info['total_damage_taken'] = 0;
statistics_info['highestdps'] = 0;
statistics_info['highest_damage_taken'] = 0;
if (statistics_info['id'] != 0)
statistics_info['continue'] = false;

if (!passed_id) {
[Link]('statistics_info: 0', statistics_info);
}

[Link](1271, 'Timer stopped.');


}
function voidOrbsFarm() {
[Link]('customGUI', true);
}
function customGUI() {
const CUSTOM_GUI_GUMP = [Link](2704);
var serialNumber = 10; // USED 1, 2, 3, 4
[Link]('startedGlobal', true);
var startValue = [Link]('startedGlobal');
[Link]('loopCheckBoxGlobal', false);
var loopCheckBoxValue = [Link]('loopCheckBoxGlobal');
[Link]('farmLocationGlobal', 'nothing');
var dropDownValue = [Link]('farmLocationGlobal'); // dont need this
but im keeping it

CUSTOM_GUI_GUMP.SetNoClose(true);
CUSTOM_GUI_GUMP.Clear();
CUSTOM_GUI_GUMP.SetCallback('customGUIcontrols');
// Page 1
CUSTOM_GUI_GUMP.AddGumpPic(0, 0, '0x4CC', '0', 3); // 3 // Open Scroll: 0x4CC
Close Scroll: 0x4BB Blue Button: 0x4BA
// Header
CUSTOM_GUI_GUMP.AddText(153, 5, '0x0057', '<strong><big>Auto
Bot</big></strong>');
// Buttons
CUSTOM_GUI_GUMP.AddResizepic(25, 30, '0x24EA', 80, 30, serialNumber++, 1); //
10
CUSTOM_GUI_GUMP.AddText(startValue ? 32 : 39, 35, startValue ? '69' : '33',
startValue ? '<strong><big>START</big></strong>' :
'<strong><big>STOP</big></strong>', 0, 1); // 1
CUSTOM_GUI_GUMP.AddResizepic(315, 30, '0x24EA', 60, 30, 0, 1);
CUSTOM_GUI_GUMP.AddHitBox(serialNumber++, 315, 30, 60, 30, 1); // 11
CUSTOM_GUI_GUMP.AddText(321, 35, '69', '<BIG><BOLD>MIN</BOLD></BIG>');
// Checkboxes
CUSTOM_GUI_GUMP.AddCheckbox(serialNumber++, 25, 109, '0x00D2', '0x00D2',
'0x00D3', loopCheckBoxValue ? 1 : 0, '0', 'Loop', loopCheckBoxValue ? '69' : '33');
// 12
// Dropdown
CUSTOM_GUI_GUMP.AddText(30, 132, ' ', '<u>Farm Selection</u>');
CUSTOM_GUI_GUMP.AddComboBox(2, 25, 150, '0x0BB8', 0, '0x0BB8', 100, -3); // 2
CUSTOM_GUI_GUMP.AddComboBoxText('No Farm', '0', 1);
CUSTOM_GUI_GUMP.AddComboBoxText('Void Creatures');
CUSTOM_GUI_GUMP.AddComboBoxText('Farm 3');
CUSTOM_GUI_GUMP.AddComboBoxText('Farm 4');
CUSTOM_GUI_GUMP.AddComboBoxText('Farm 5');
CUSTOM_GUI_GUMP.Update();
}

function customGUIcontrols() {
const CUSTOM_GUI_GUMP = [Link](2704);
var returnResponseCode = [Link]();
var comboBoxResponseCode = [Link](2);
var startValue = [Link]('startedGlobal');
var loopCheckBoxValue = [Link]('loopCheckBoxGlobal');
var dropDownValue = [Link]('farmLocationGlobal');
var serialNumber = 10;

if (returnResponseCode === 10) {


if (startValue === true) {
customGUIinputCheck();
customGUIexecution();

if ([Link]('loopGlobal') === true) {


[Link]('startedGlobal', false);
startValue = [Link]('startedGlobal');
CUSTOM_GUI_GUMP.AddText(startValue ? 32 : 39, 35,
startValue ? '69' : '33', startValue ? '<strong><big>START</big></strong>' :
'<strong><big>STOP</big></strong>', 0, 1); // 1
}

loopCheckBoxValue = [Link]('loopCheckBoxGlobal');
CUSTOM_GUI_GUMP.AddCheckbox(12, 25, 109, '0x00D2', '0x00D2',
'0x00D3', loopCheckBoxValue ? 1 : 0, '0', 'Loop', loopCheckBoxValue ? '69' : '33');
// 12
CUSTOM_GUI_GUMP.Update();

} else if (startValue === false) {


customGUIinputCheck();
[Link]('startedGlobal', true);
startValue = [Link]('startedGlobal');
loopCheckBoxValue = [Link]('loopCheckBoxGlobal');
[Link]('loopGlobal', false);
[Link]();
CUSTOM_GUI_GUMP.AddText(startValue ? 32 : 39, 35, startValue ?
'69' : '33', startValue ? '<strong><big>START</big></strong>' :
'<strong><big>STOP</big></strong>', 0, 1); // 1
CUSTOM_GUI_GUMP.AddCheckbox(12, 25, 109, '0x00D2', '0x00D2',
'0x00D3', loopCheckBoxValue ? 1 : 0, '0', 'Loop', loopCheckBoxValue ? '69' : '33');
// 12
CUSTOM_GUI_GUMP.Update();

} else if (returnResponseCode === 11) {


customGUIinputCheck();
CUSTOM_GUI_GUMP.Clear();
CUSTOM_GUI_GUMP.AddGumpPic(0, 0, '0x4BB', '0', 3); // 3
CUSTOM_GUI_GUMP.AddHitBox(4, 0, 0, 50, 200, 1); // 4
CUSTOM_GUI_GUMP.Update();

} else if (returnResponseCode === 4) {


startValue = [Link]('startedGlobal');
loopCheckBoxValue = [Link]('loopCheckBoxGlobal');
dropDownValue = [Link]('farmLocationGlobal');
CUSTOM_GUI_GUMP.Clear();
CUSTOM_GUI_GUMP.AddGumpPic(0, 0, '0x4CC', '0', 3); // 3
// Header
CUSTOM_GUI_GUMP.AddText(153, 5, '0x0057', '<strong><big>Auto
Bot</big></strong>');
// Buttons
CUSTOM_GUI_GUMP.AddResizepic(25, 30, '0x24EA', 80, 30, serialNumber++,
1); // 10
CUSTOM_GUI_GUMP.AddText(startValue ? 32 : 39, 35, startValue ? '69' :
'33', startValue ? '<strong><big>START</big></strong>' :
'<strong><big>STOP</big></strong>', 0, 1); // 1
CUSTOM_GUI_GUMP.AddResizepic(315, 30, '0x24EA', 60, 30, 0, 1);
CUSTOM_GUI_GUMP.AddHitBox(serialNumber++, 315, 30, 60, 30, 1); // 11
CUSTOM_GUI_GUMP.AddText(321, 35, '69', '<BIG><BOLD>MIN</BOLD></BIG>');
// Checkboxes
CUSTOM_GUI_GUMP.AddCheckbox(serialNumber++, 25, 109, '0x00D2',
'0x00D2', '0x00D3', loopCheckBoxValue ? 1 : 0, '0', 'Loop', loopCheckBoxValue ?
'69' : '33'); // 12
// Dropdown
CUSTOM_GUI_GUMP.AddText(30, 132, ' ', '<u>Farm Selection</u>');
CUSTOM_GUI_GUMP.AddComboBox(2, 25, 150, '0x0BB8', 0, '0x0BB8', 100, -
3); // 2
CUSTOM_GUI_GUMP.AddComboBoxText('No Farm', '0', dropDownValue ===
'nothing' ? 1 : 0);
CUSTOM_GUI_GUMP.AddComboBoxText('Void Creatures', '0', dropDownValue
=== 'voidCreatures' ? 1 : 0);
CUSTOM_GUI_GUMP.AddComboBoxText('Farm 3', '0', dropDownValue ===
'farmLocationName1' ? 1 : 0);
CUSTOM_GUI_GUMP.AddComboBoxText('Farm 4', '0', dropDownValue ===
'farmLocationName2' ? 1 : 0);
CUSTOM_GUI_GUMP.AddComboBoxText('Farm 5', '0', dropDownValue ===
'farmLocationName3' ? 1 : 0);
CUSTOM_GUI_GUMP.Update();
}

if (comboBoxResponseCode === 0) { // 1 is 0
[Link]('farmLocationGlobal', 'nothing');

} else if (comboBoxResponseCode === 1) {


[Link]('farmLocationGlobal', 'voidCreatures');

} else if (comboBoxResponseCode === 2) {


[Link]('farmLocationGlobal', 'farmLocationName1');

} else if (comboBoxResponseCode === 3) {


[Link]('farmLocationGlobal', 'farmLocationName2');

} else if (comboBoxResponseCode === 4) {


[Link]('farmLocationGlobal', 'farmLocationName3');

}
}

function customGUIinputCheck() {
if ([Link]() === null) { return; }

if ([Link]().indexOf(12) !== -1) { // unchecked === -1


[Link]('loopGlobal', true);
[Link]('loopCheckBoxGlobal', true);
} else {
[Link]('loopGlobal', false);
[Link]('loopCheckBoxGlobal', false);
}
}

function customGUIexecution() {
var loopValue = [Link]('loopGlobal');

if (loopValue) {
[Link]('autoPlay', true); // Exec pause resume ok terminate BAD
}
[Link]('stuff');
}

function autoPlay() {
var loopValue = [Link]('loopGlobal');
var farmValue = [Link]('farmLocationGlobal');
[Link]('playerInZone', false);
[Link]('loadZoneVoidCreaturesSouthToWestOfRoyalCity', false);
[Link]('loadZoneVoidCreaturesNorthToEastOfRoyalCity', false);
[Link]('repair', false);
[Link]('go home', false);
[Link]('second circuit of Void Creatures', false);
[Link]('scan ground', false);
[Link]();
[Link]();
[Link]('checkDurability', 1000 * 60 * 5);
//[Link]('checkDurability', true);
//[Link]('walkTo', true); THESE WORK BUT NEED TO CHANGE A LOT TO HAVE IT
ALL WORK SEPERATELY T_T

while (loopValue) {
loopValue = [Link]('loopGlobal');

if (loopValue === false) { return; }

if (farmValue === 'voidCreatures') {


[Link]('farming', true);
runPathArr();

} else {
[Link]('farming', false);
attack();
walkTo();
lootCorpse();
if ([Link]('checkDurability') > 1000 * 60 * 5) {
const items = checkDurability();

if ([Link]) {
[Link]('self', 'any', 'Need To Repair!');
const repairBench = [Link]('0xA278|0xA277|
0xA27F|0xA27E', any, ground, ' ', 2);

if ([Link]) {
useRepairBench();
}

} else {
[Link]('checkDurability');
}
}
}

[Link](100);
}
}

function attack(){
var mob;
mob = priorityTarget();

if (mob !== null) {


if ([Link]() === [Link]() && [Link]('Honor') >= 1000
&& [Link]() < 8 && [Link]('honorLeader', false) &&
[Link]('Bushido') >= 500) {
[Link]('Honor');
[Link]([Link]());
[Link]('Honor', 0);
}

if ([Link]('Musicianship') < 900) {


[Link]([Link]());
}

[Link]([Link](), true);
[Link]([Link](), 0x0AAF, true);
//[Link]([Link]());
//[Link]('Prio Target = ' + [Link]());

return mob;

} else {
mob = [Link](any, any, ground, 'mobile|ignoreself|
ignorefriends', 24, 'gray|criminal|orange|red');
const ignoreProperty = 'The Priest Of Mondain|(summoned)|(tame)|
(bonded)';
const voidCreatureName = 'Korpre|Betballem|Anlorzen|Anzuanord|Anlorlem|
Relanord|Ballem';

if ([Link]) {
for (var i = 0; i < [Link]; i++) {
[Link](function(m1, m2){ return [Link]() -
[Link]() });
const walkPathArray = [Link](mob[i].X(),
mob[i].Y(), mob[i].Z(), 1, 255, 1, 1);
//[Link]([Link]);

if ([Link] && [Link]('farming') === true &&


[Link](mob[i].Properties(), voidCreatureName)) {
if (mob[i].Distance() > 1 && mob !== undefined &&
([Link] === 0 || [Link] >= 25)) {
//[Link]('can not reach. Removing from
Array ' + mob[i].Name());
[Link](mob[i].Serial());

return;
}

if (mob[i].Hits() == mob[i].MaxHits() &&


[Link]('Honor') >= 1000 && mob[i].Distance() < 8 &&
[Link]('Bushido') >= 500) {
[Link]('Honor');
[Link](mob[i].Serial());
[Link]('Honor', 0);
}

if ([Link]('Musicianship') < 900) {


[Link](mob[i].Serial());
}

if ([Link]() > 26) {


[Link]('primary', true);
}

[Link](mob[i].Serial(),
true);
[Link](mob[i].Serial(), 0x0AAF,
true);
//[Link](mob[m].Serial());
//[Link]('Target = ' + mob[i].Name());

return mob = mob[i];

} else if ([Link] && [Link]('farming') === false


&& ![Link](mob[i].Properties(), ignoreProperty)) {
if (mob[i].Distance() > 1 && mob !== undefined &&
([Link] === 0 || [Link] >= 25)) {
[Link]('can not reach. Removing from Array
' + mob[i].Name());
[Link](mob[i].Serial());

return;
}

if (mob[i].Hits() == mob[i].MaxHits() &&


[Link]('Honor') >= 1000 && mob[i].Distance() < 8 &&
[Link]('Bushido') >= 500) {
[Link]('Honor');
[Link](mob[i].Serial());
[Link]('Honor', 0);
}

if ([Link]('Musicianship') < 900) {


[Link](mob[i].Serial());
[Link]('att normal');
}

[Link](mob[i].Serial(),
true);
[Link](mob[i].Serial(), 0x0AAF,
true);
//[Link](mob[m].Serial());
//[Link]('Target = ' + mob[i].Name());

return mob = mob[i];


}
}
}
}
}

function priorityTarget(){
const priorityTargets = [Link](any, any, ground, 'mobile|
ignoreself|ignorefriends|inlos', 24, 'gray|criminal|orange|red');
const prio = 'Neira|Piper|Rikktor|Semidar|Mephitis|Silvani|Serado|Ilhenir|
Meraktus|Twaulo|Primeval|Abyssal|Turtle|Dark Father|Melisande|Travesty|Toothed|
Shadowlord';
var returnValue = null;

for (i = [Link] - 1; i >= 0; i--) {


if (priorityTargets[i] != null) {
if (![Link](priorityTargets[i].Properties(), prio)) {
[Link](i, 1);
}
}
}

for (var p = 0; p < [Link]; p++) {


if (priorityTargets[p] != null) {
if ([Link](priorityTargets[p].Properties(), prio)) {
[Link](function(p1, p2){ return [Link]()
- [Link]() });
returnValue = priorityTargets[p];
//[Link]('namedMob: ' + [Link]());
break;
}
}
}

return returnValue;
}

function walkTo(mob) {
mob = attack();

if (mob !== null && mob !== undefined) { // remove or not IsWalking? test it
out
if ([Link]() && [Link]() > 1) {
[Link](mob.X(), mob.Y(), mob.Z(), 1, 255, 1, 1);
}
/* // add a run away part for when low HP or if you are a archer /
thrower / caster
if (knight) {

if ([Link]() && [Link]() > 1) {


[Link](mob.X(), mob.Y(), mob.Z(), 1, 255, 1, 1);
}

} else if (archer) {

if ([Link]() && [Link]() > 1) {


[Link](mob.X(), mob.Y(), mob.Z(), 1, 255, 1, 1);

} else if (thrower) {

} else if (non_combatant) {
Follow command
}
*/
}
}

function runPathArr(mob) {
mob = attack();

if ([Link]('checkDurability') > 1000 * 60 * 5) {


const items = checkDurability();

if ([Link]) {
[Link]('repair', true);
[Link]('repair true: ' + [Link]('repair'));

} else {
[Link]('repair', false);
[Link]('checkDurability');
[Link]('repair false: ' + [Link]('repair'));
}
}

if (Player.X() > 450 && Player.X() < 800 && Player.Y() > 3125 && Player.Y() <
3850) {
[Link]('playerInZone', true);

if ([Link]('loadZoneVoidCreaturesSouthToWestOfRoyalCity') ===
false) {
zone = [ [695, 3760], [660, 3732], [615, 3705], [640, 3666],
[668, 3620], [658, 3588],
[638, 3569], [602, 3570], [593, 3526], [572,
3512], [535, 3483], [506, 3440],
[474, 3408], [478, 3380], [526, 3354], [510,
3308], [510, 3271], [479, 3224],
[424, 3184]
];
[Link]('loadZoneVoidCreaturesSouthToWestOfRoyalCity',
true);
}
} else if (Player.X() > 600 && Player.X() < 1275 && Player.Y() > 2800 &&
Player.Y() < 3650) {
[Link]('playerInZone', true);

if ([Link]('loadZoneVoidCreaturesNorthToEastOfRoyalCity') ===
false) {
zone = [ [713, 2916], [723, 2956], [754, 2989], [771, 2962],[781,
2931], [817, 2895],
[845, 2893], [879, 2886], [898, 2865], [893,
2902], [901, 2936], [925, 2956],
[941, 2986], [981, 2994], [986, 2973], [1019,
3009], [1060, 3039], [1101, 3027],
[1132, 3016], [1125, 3036], [1087, 3068],
[1040, 3077], [1023, 3107], [1000, 3150],
[1007, 3189], [1044, 3198], [1081, 3191],
[1068, 3231], [1059, 3172], [1064, 3134],
[1083, 3158], [1099, 3160], [1127, 3159],
[1128, 3203], [1136, 3247], [1158, 3280],
[1203, 3304], [1197, 3336], [1185, 3374],
[1144, 3394], [1112, 3444], [1137, 3460],
[1184, 3466], [1186, 3436], [1190, 3467],
[1164, 3513], [1190, 3536], [1184, 3582],
[1184, 3615], [1124, 3677]
];
[Link]('loadZoneVoidCreaturesNorthToEastOfRoyalCity',
true);
}

} else {
[Link]('playerInZone', false);
zone = null;
[Link]('loadZoneVoidCreaturesSouthToWestOfRoyalCity', false);
[Link]('loadZoneVoidCreaturesNorthToEastOfRoyalCity', false);

if (Player.X() === 424 && Player.Y() === 3184 &&


[Link]('farming') === true) {
[Link]('on location');
[Link]('go home', true);
[Link]('second circuit of Void Creatures', true);
}
}

if (zone !== null && [Link]('playerInZone') === true &&


[Link]() < 500 && [Link]('repair') === false) {
const x = zone[0][0];
const y = zone[0][1];

if (mob !== undefined && mob !== null) {

if ([Link]() && [Link]() > 1) {


lootCorpse();
walkTo();
}

} else {
lootCorpse();
[Link](zone[0]);
[Link](x, y, Player.Z(), 0);
if (Player.X() === zone[0][0] && Player.Y() === zone [0][1]) {
[Link]('X: '+ Player.X() +' Y: '+ Player.Y());
[Link](zone[0]);
[Link](zone);
}
}

} else if ([Link]('repair') === true && [Link]() < 500) {


[Link]('REPAIR');
useAtlas();
[Link]('farming', false);
[Link](920, 551, 83, 1, 255, 1, 1)
useRepairBench();

} else if ([Link]() >= 500) {


if ((Player.X() < 2100 || Player.X() > 2130) && (Player.Y() < 140 ||
Player.Y() > 175)) {
[Link]('using atlas to get home and DROPOFF');
useAtlas();

} else {
[Link]('DROPOFF');
[Link]('farming', false);
[Link](2108, 157, 20, 1, 255, 1, 1);
dropOffLoot();
}

} else {
if ((Player.X() < 2100 || Player.X() > 2130) && (Player.Y() < 140 ||
Player.Y() > 175)) {
[Link]('using atlas to get HOME');
useAtlas();

} else {
[Link]('HOME');
[Link](2117, 155, 16, 1, 255, 1, 1);
[Link]('scan ground', true);
useAtlas();
}
}
}

function dropOffLoot() {
const materialBox = '0x43565A60'
const items = [Link]('bandaids');

[Link](function (mats) {
[Link](mats, 0, materialBox);
[Link]('moveitemdelay');
});

[Link]('farming', true);
}
function lootCorpse() {
const corpse = [Link]('0x2006', any, ground, '', 2);

[Link]();
[Link](300);
if (![Link]) { return null; }

for (var i = 0; i <= [Link]; i++) {


if ([Link] && corpse[i] !== undefined && corpse[i] !== null) {
var lootInCorpse = [Link]('bandaids',
corpse[i].Serial());

while (lootInCorpse) {
//[Link]('Autoloot in progress');
[Link](300);
lootInCorpse = [Link]('bandaids',
corpse[i].Serial());

if (!lootInCorpse) {
[Link]();

break;
}
}
}
}
}

function getGump() {
const count = [Link]();
const ID = '0x000001F2|0x00002415'; //1. Atlas, 2. Repair Bench

if (!count) { return null; }

for (var i = count - 1; i >= 0; i--) {


const gump = [Link](i);
//[Link]([Link](gump));

if (gump && [Link]('generic', [Link](), [Link]()) &&


[Link]([Link](), ID)) {
//[Link]('Serial = ' + [Link]() +' '+ 'ID = ' +
[Link]());

return gump;
}
}

return null;
}

function useAtlas() {
if ([Link]('scan ground') === false) {
const atlas = [Link]('0x9C16', any, backpack);

} else if ([Link]('scan ground') === true) {


const atlas = [Link]('0x9C16', any, ground);
}

const farmStartSouth = 'FarmStartSouth';


const farmStartNorth = 'FarmStartNorth';
var runeInAtlas = null;

if (!atlas) { return null; }


for (var i = [Link] - 1; i >= 0; i--) {
[Link](atlas[i].Serial());
[Link]('useitemdelay');

const atlasGump = getGump();

if (!atlasGump) { return null; }

for (var r = 1; r <= 16; r++) {


var atlasText = [Link](r);
var atlasButtons = [Link]();
var exactButton = atlasButtons[r];
var exactButton2 = /\d{5}/.exec(exactButton);
var exactButton3 = parseInt(exactButton2);
//[Link]('Rune: ' + atlasText + ', Serial: ' +
atlas[i].Serial() + ', Button: ' + exactButton3);

if ([Link]('repair') === false && [Link]('farming')


=== true && [Link]('second circuit of Void Creatures') === true &&
[Link]('scan ground') === true) {
if ([Link](atlasText, farmStartNorth)) {
//[Link]('Rune: ' + atlasText + ', Serial: ' +
atlas[i].Serial() + ', Button: ' + exactButton3);
runeInAtlas = exactButton3;
[Link]('second circuit of Void Creatures',
false);

break;
}

} else if ([Link](atlasText, farmStartSouth) &&


[Link]() < 500 && [Link]('repair') === false &&
[Link]('farming') === true && [Link]('second circuit of Void
Creatures') === false) {
runeInAtlas = exactButton3;

break;

} else if ([Link](atlasText, '42 nw 666st') &&


[Link]() >= 500) {
runeInAtlas = exactButton3;
[Link]('recall to drop off');

break;

} else if ([Link](atlasText, "Rares N' Crap") &&


[Link]('repair') === true) {
runeInAtlas = exactButton3;
[Link]('recall to repair');

break;

} else if ([Link](atlasText, '42 nw 666st') &&


[Link]('repair') === false) {
runeInAtlas = exactButton3;
[Link]('recall home');

break;
}
}

if (runeInAtlas !== null) {


//[Link]('Selecting: ' + atlasText + ', Button: ' +
runeInAtlas);
[Link]('scan ground', false);
[Link]();
[Link]([Link](5000)); // This like event,
wait for NEW incoming gump and press 5000
[Link]([Link](runeInAtlas));
[Link](4000);

break;
}
}
if (runeInAtlas === null && [Link]('scan ground') === true) {
//[Link]('no rune on ground');
[Link]('scan ground', false);

} else if (runeInAtlas === null) {


//[Link]('no rune found');
[Link]('scan ground', true);
}

const fizzleRecall0 = 'concentration is disturbed';


const fizzleRecall1 = 'time to recharge';
const fizzleRecall2 = 'while frozen';

if ([Link]() < 10 || [Link]() || [Link]('Paralyze'))


{
[Link]('recall failed');
useAtlas();

} else if ([Link](fizzleRecall0)) {
[Link]('recall failed 0');
useAtlas();

} else if ([Link](fizzleRecall1)) {
[Link]('recall failed 1');
useAtlas();

} else if ([Link](fizzleRecall2)) {
[Link]('recall failed 2');
useAtlas();
}

[Link](fizzleRecall0);
[Link](fizzleRecall1);
[Link](fizzleRecall2);
}

function checkDurability() {
const MIN_DURABILITY = 75;
var itemsToRepair = [];

[Link](100);
[Link]('doing stuff');
for (var itemLayer = 1; itemLayer < 25; itemLayer++) {
var item = [Link](itemLayer);

if (item && [Link]([Link](), 'Durability')) {


var matches = /Durability (\d+)\s\/\s(\
d+)/.exec([Link]());

if([Link] > 2 && Number(matches[1]) < MIN_DURABILITY){


[Link]('[' + [Link]() +'] ' + [Link]() + ': ' +
matches[1] + ' / ' + matches[2]);
[Link]([Link]());
break;
}
}
}

return itemsToRepair;
}

function useRepairBench() {
const items = checkDurability();
//[Link]('item/s: ' + items);
const repairBench = [Link]('0xA278|0xA277|0xA27F|0xA27E', any,
ground, ' ', 2)[0];

if (!repairBench) { return null; }

[Link]();
[Link]([Link]());
[Link]('useitemdelay');

var repairBenchGump = getGump();

if (!repairBenchGump && ![Link]()) { return null; }

[Link](function (item) {
//[Link]('item: ' + item);
[Link]();
[Link]([Link]());
[Link]('useitemdelay');
repairBenchGump = getGump();

[Link]([Link](2002)); //BS
[Link]([Link](2003)); //CARP
[Link]([Link](2006)); //TAILOR
[Link]([Link](2010)); //MASON
[Link]([Link](2011)); //GLASS
[Link]([Link](2009)); //FLETCH
[Link]([Link](2001)); //TINK

[Link](); //TINK
[Link](item);

[Link](); //BS
[Link](item);

[Link](); //CARP
[Link](item);

[Link](); //TAILOR
[Link](item);

[Link](); //MASON
[Link](item);

[Link](); //GLASS
[Link](item);

[Link](); //FLETCH
[Link](item);

});

if ([Link]) {
//[Link]('items that failed to repair: ' + [Link]);
useRepairBench();

} else {
//[Link]('Done.');
[Link]('repair', false);
[Link]('farming', true);
}
}
function detectMsg() {
const DETECT_MSG = 'keen senses';
while (true) {
[Link](100);
if ( [Link](DETECT_MSG, 'sys', '0', any, [Link]() - 500) )
{
[Link](self, '0x09C2', 'CHEST NEARBY!!!');
[Link](DETECT_MSG);
}
}
}
//--# SKILL TRAINING
function trainSpellweaving() {
const castSpellDelay = 100;
const skillValueGoal = [Link]('Spellweaving', 'cap');
const target = [Link]();
const useSkillDelay = 10600;
var skillValue = [Link]('Spellweaving', 'real');
var meditating = false;
var mageryBook = [Link]('0x2D50', any, backpack);

while (true) {
while (skillValue < skillValueGoal && meditating == false) {
[Link]('Bow');
if (skillValue < 200)
var spell = 'Arcane Circle';
else if (skillValue < 330)
var spell = 'Thunderstorm';
else if (skillValue < 550)
var spell = 'Reaper Form';
else if (skillValue < 740)
var spell = 'Essence of Wind';
else if (skillValue < 900)
var spell = 'Wildfire';
else
var spell = 'Mana Shield'; //can change this to Mana Shield if you
have spellweaving mastery

if ([Link]() < 30) {


var meditating = true;
}
if ([Link]() < [Link]() * .5) {
[Link]('Greater Heal', self);
[Link](3000);
}

[Link](spell, target);
[Link](castSpellDelay);

skillValue = [Link]('Spellweaving', 'real');

}
while (meditating == true) {
if (![Link]('Meditation')) {
[Link]('Meditation');
[Link](useSkillDelay)
}
if ([Link]() >= [Link]()) {
var meditating = false;
}
}
}
}

function trainHighBush() {
while (![Link]()) {
var enemies = [Link](any, any, ground, 'ignoreself|live|inlos', 12,
'gray|criminal|red');
for (i = 0; i < [Link]; i++) {
var enemies = [Link](any, any, ground, 'ignoreself|live|inlos',
12, 'gray|criminal|red');
[Link](enemies[i]);
if (![Link]('Momentum Strike')) {
[Link]('Momentum Strike');
[Link](200);
} else if (![Link]('Agility') && [Link]('0x0F08') && !
[Link]()) {
[Link]("0x0F08");
[Link](200);
} else if (![Link]('Strength') && [Link]('0x0F09',
'0x0000') && ![Link]()) {
[Link]('0x0F09', '0x0000');
[Link](200);
}
[Link](20);
}
}
}

function craftStuff() {
var reagentType = '0x0F8C'; //sulfur ash
var reagentType2 = '0x0F8D'; //spider silk
var reagentType3 = '0x0F85'; //ginseng
var reagentColor = '0x0000'; // build FS @ 94+ ressurection 0x0F7B blood moss,
0x0F84 garlic, 0x0F85 ginseng
var emptyBottlesType = '0x0EF3'; //empty bottles 0x0F0E or scrolls 0x0EF3
var potionType = '0x1F5F'; //FS
var craftingToolType = '0x0FBF'; // pen
var reagentAmount = 500; // amount of reagent to withdraw
var emptyBottlesAmount = 100; //amount of empty bottles to withdraw
///////////////////////////////////////////////////////////////////////////////////
[Link](self,'0x054E' , 'Target the resource container.');
[Link]('resourceContainer');
[Link]('resourceContainer');
[Link](1500);
while(true) {
[Link](20);
if ([Link](reagentType) < 20) {
[Link](reagentType, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
}
else if ([Link](reagentType2) < 20) {
[Link](reagentType2, reagentColor , 'resourceContainer',
reagentAmount, backpack);
[Link](2000);
}
else if ([Link](emptyBottlesType) < 20) {
[Link](emptyBottlesType, any , 'resourceContainer',
emptyBottlesAmount, backpack);
[Link](2000);
}
else if ([Link](potionType) >= emptyBottlesAmount) {
[Link](potionType,any , backpack, 0, 'resourceContainer');
[Link](2000);
}
else {
[Link](craftingToolType);
if ([Link](3000)) {
var gump0 = [Link]('last');
if ((gump0 !== null) && (![Link]()) && ([Link]() ===
'0x000001CC')) {
[Link]([Link](1999));
[Link](100);
}
}
}
}
}
//--# END OF THIS FILE

You might also like