All pastes #810468 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-09 23:36 UTC
rendered paste body
public class LostTrainer extends Methods
{
    int pray;
    String active = ("Waiting");
    int combatlvl;
    String itempick = (" ");
    int gbank = 0;
    String sfmode;
    int gs = 0;
    int gb = 0;
    int setbones = 0;
    int cg = 0;
    int sw = 0;
    int setmode = 0;
    int pause = 0;
    String count;
    int picker = 1;
    String ver = ("0.2");
    int fmode;
    int done1 = 0;
    int coin = 1;
    int mace = 1;
    int ring = 1;
    int dia = 1;
    int ruby = 1;
    int sap = 1;
    int eme = 1;
    int hal = 1;
    int dea = 1;
    int law = 1;
    int cos = 1;
    int cha = 1;
    int dra = 1;
    String bank = ("@ran@Bank");
    String drop = ("@cya@Drop");
    String coino = ("@ran@Bank");
    String maceo = ("@ran@Bank");
    String ringo = ("@ran@Bank");
    String diao = ("@ran@Bank");
    String rubyo = ("@ran@Bank");
    String sapo = ("@ran@Bank");
    String emeo = ("@ran@Bank");
    String halo = ("@ran@Bank");
    String deao = ("@ran@Bank");
    String lawo = ("@ran@Bank");
    String coso = ("@ran@Bank");
    String chao = ("@ran@Bank");
    String drao = ("@ran@Bank");
    String[] mode = {"Controlled","Strength","Attack","Defence"};
    int[] spicklist = {75,81,93,112,397,399,400,401,402,403,404,406,407,522,524,593,594,597,795,1278,297,298,299,300};
    int[] inventlist = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    int[] picklist = {10,96,286,157,158,159,160,526,38,42,46,41,1276,1277,527};
    int[] droplist = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    int fm;
    int fn;
    int bones;
    int carry;
    String[] fooduse = {"Cakes","Shark","Lobsters","Sword Fish","Bass","Trout","Salmon","Tuna","Turtle","Manaray","Pike","Cod","Anchove","Mackeral","Herring","Sardine","Shrimp","@cya@Enter Own Id"};
    int[] foodhp = {4,20,12,14,13,7,9,10,20,21,8,7,3,6,5,4,3,0,0};
    int[] foodid = {330,546,373,370,555,359,357,367,1193,1191,364,551,352,553,362,355,350,0,0};
    int foodout = 0;
    int closegates;
    String[] yesno = {"Yes","No"};
    int world;
        public LostTrainer(mudclient mc){super(mc);}
   
        public void MainBody(String Args[])
            {
            StartScanForMods();
                     Display("Lost City Trainer By : tedjohntj");
            while(Running())
                {
                    AutoLogin(true);
                    while(done1 == 0)
                        {
                            String[] items = {"Coins --- " + coino,"Mithril Maces --- " + maceo,"Ruby Rings --- " + ringo,"Diamonds --- " + diao,"Ruby's --- " + rubyo,"Saphires --- " + sapo,"Emeralds --- " + emeo,"Half Keys --- " + halo,"Death Runes --- " + deao,"Law Rune --- " + lawo,"Cosmic Runes --- " + coso,"Chaos Runes --- " + chao,"Half Dragon Square --- " + drao,"@whi@Done"};
                            int option = GetOption("Bank Or Drop",items);
                            if(option == 0)
                                {
                                    coin = (coin + 1);
                                    if(coin > 2)
                                        {
                                            coin = 1;
                                        }
                                    if(coin == 1)
                                        {
                                            picklist[option] = 10;
                                            droplist[option] = 0;
                                            coino = bank;
                                        }
                                    if(coin == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 10;
                                            coino = drop;
                                        }
                                }
                            if(option == 1)
                                {
                                    mace = (mace + 1);
                                    if(mace > 2)
                                        {
                                            
                                            mace = 1;
                                        }
                                    if(mace == 1)
                                        {
                                            picklist[option] = 96;
                                            droplist[option] = 0;
                                            maceo = bank;
                                        }
                                    if(mace == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 96;
                                            maceo = drop;
                                        }
                                }
                            if(option == 2)
                                {
                                    ring = (ring + 1);
                                    if(ring > 2)
                                        {
                                            
                                            ring = 1;
                                        }
                                    if(ring == 1)
                                        {
                                            picklist[option] = 286;
                                            droplist[option] = 0;
                                            ringo = bank;
                                        }
                                    if(ring == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 286;
                                            ringo = drop;
                                        }
                                }    
                            if(option == 3)
                                {
                                    dia = (dia + 1);
                                    if(dia > 2)
                                        {
                                            
                                            dia = 1;
                                        }
                                    if(dia == 1)
                                        {
                                            picklist[option] = 157;
                                            droplist[option] = 0;
                                            diao = bank;
                                        }
                                    if(dia == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 157;
                                            diao = drop;
                                        }
                                }
                            if(option == 4)
                                {
                                    ruby = (ruby + 1);
                                    if(ruby > 2)
                                        {
                                            
                                            ruby = 1;
                                        }
                                    if(ruby == 1)
                                        {
                                            picklist[option] = 158;
                                            droplist[option] = 0;
                                            rubyo = bank;
                                        }
                                    if(ruby == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 158;
                                            rubyo = drop;
                                        }
                                }
                            if(option == 5)
                                {
                                    sap = (sap + 1);
                                    if(sap > 2)
                                        {
                                            
                                            sap = 1;
                                        }
                                    if(sap == 1)
                                        {
                                            picklist[option] = 159;
                                            droplist[option] = 0;
                                            sapo = bank;
                                        }
                                    if(sap == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 159;
                                            sapo = drop;
                                        }
                                }
                            if(option == 6)
                                {
                                    eme = (eme + 1);
                                    if(eme > 2)
                                        {
                                            
                                            eme = 1;
                                        }
                                    if(eme == 1)
                                        {
                                            picklist[option] = 160;
                                            droplist[option] = 0;
                                            emeo = bank;
                                        }
                                    if(eme == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 160;
                                            emeo = drop;
                                        }
                                }
                            if(option == 7)
                                {
                                    hal = (hal + 1);
                                    if(hal > 2)
                                        {
                                            
                                            hal = 1;
                                        }
                                    if(hal == 1)
                                        {
                                            picklist[14] = 527;
                                            picklist[option] = 526;
                                            droplist[option] = 0;
                                            droplist[14] = 0;
                                            halo = bank;
                                        }
                                    if(hal == 2)
                                        {
                                            picklist[14] = 0;
                                            picklist[option] = 0;
                                            droplist[option] = 526;
                                            droplist[14] = 527;
                                            halo = drop;
                                        }
                                }
                            if(option == 8)
                                {
                                    dea = (dea + 1);
                                    if(dea > 2)
                                        {
                                            
                                            dea = 1;
                                        }
                                    if(dea == 1)
                                        {
                                            picklist[option] = 38;
                                            droplist[option] = 0;
                                            deao = bank;
                                        }
                                    if(dea == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 38;
                                            deao = drop;
                                        }
                                }
                            if(option == 9)
                                {
                                    law = (law + 1);
                                    if(law > 2)
                                        {
                                            
                                            law = 1;
                                        }
                                    if(law == 1)
                                        {
                                            picklist[option] = 42;
                                            droplist[option] = 0;
                                            lawo = bank;
                                        }
                                    if(law == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 42;
                                            lawo = drop;
                                        }
                                }
                            if(option == 10)
                                {
                                    cos = (cos + 1);
                                    if(cos > 2)
                                        {
                                            
                                            cos = 1;
                                        }
                                    if(cos == 1)
                                        {
                                            picklist[option] = 46;
                                            droplist[option] = 0;
                                            coso = bank;
                                        }
                                    if(cos == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 46;
                                            coso = drop;
                                        }
                                }
                            if(option == 11)
                                {
                                    cha = (cha + 1);
                                    if(cha > 2)
                                        {
                                            
                                            cha = 1;
                                        }
                                    if(cha == 1)
                                        {
                                            picklist[option] = 41;
                                            droplist[option] = 0;
                                            chao = bank;
                                        }
                                    if(cha == 2)
                                        {
                                            picklist[option] = 0;
                                            droplist[option] = 41;
                                            chao = drop;
                                        }
                                }
                            if(option == 12)
                                {
                                    dra = (dra + 1);
                                    if(dra > 2)
                                        {
                                            dra = 1;
                                        }
                                    if(dra == 1)
                                        {
                                            picklist[option] = 1276;
                                            picklist[13] = 1277;
                                            drao = bank;
                                            droplist[option] = 0;
                                            droplist[13] = 0;
                                        }
                                    if(dra == 2)
                                        {
                                            picklist[option] = 0;
                                            picklist[13] = 0;
                                            droplist[option] = 1276;
                                            droplist[13] = 1277;
                                            drao = drop;
                                        }
                                }
                            if(option == 13)
                                {
                                    done1 = 1;
                                }
                        }
                    
                    fm = GetOption("Pick Food To Use",fooduse);
                    if(fm == 17)
                        {
                            String of = GetInput("Enter Food ID");
                            String he = GetInput("How Many HP Does It Heal?");
                            foodid[fm] = StrToInt(of);
                            foodhp[fm] = StrToInt(he);
                        }
                    fn = GetOption("Secondary Food To Use",fooduse);
                    if(fn == 17)
                        {
                            String ofa = GetInput("Enter Food ID");
                            String hea = GetInput("How Many HP Does It Heal?");
                            foodid[(fn + 1)] = StrToInt(ofa);
                            foodhp[(fn + 1)] = StrToInt(hea);
                        }
                    count = GetInput("How Much Food To Carry?");
                    carry = StrToInt(count);
                    picker = GetOption("Use Picker Only?",yesno);
                    bones = GetOption("Bury Bones?",yesno);
                    closegates = GetOption("Should I Close Bank Gates On Enter And Exit?",yesno);
                    world = GetWorld();
                    fmode = GetOption("Select Fight Mode",mode);
                    LockMode(fmode);
                    Display("Lost City Trainer Ver. "+ ver +" By : tedjohntj");
                    checkinv();
                    while(Running() && done1 == 1)
                        {
                            pray = GetMaxLvl(5); 
                            combatlvl = GetCombatLvl();
                            active = ("Waiting");
                            itempick = (" ");
                            if(gb == 1)
                                {
                                    gb = 0;
                                    gobank();
                                    
                                }
                            if(gs == 1)
                                {
                                    sleep();
                                    gs = 0;
                                }
                            if(cg == 1)
                                {
                                    closegates = GetOption("Should I Close Bank Gates On Enter And Exit?",yesno);
                                }
                            if(setbones == 1)
                                {
                                    bones = GetOption("Bury Bones?",yesno);
                                    setbones = 0;
                                }
                            if(setmode == 1)
                                {
                                    fmode = GetOption("Select Fight Mode",mode);
                                    LockMode(fmode);
                                    setmode = 0;
                                }
                            if(fmode == 0)
                                {
                                    sfmode = ("Controlled");
                                }
                            if(fmode == 1)
                                {
                                    sfmode = ("Strength");
                                }
                            if(fmode == 2)
                                {
                                    sfmode = ("Attack");
                                }
                            if(fmode == 3)
                                {
                                    sfmode = ("Defence");
                                }
                            if(sw == 1)
                                {
                                    String[] sworld = {"86","88","90"};
                                    int setworld = GetOption("Switch To World?",sworld);
                                    if(setworld == 0)
                                        {
                                            active = ("Changing To World 86");
                                            world = 86;
                                        }
                                    if(setworld == 1)
                                        {
                                            active = ("Changing To World 88");
                                            world = 88;
                                        }
                                    if(setworld == 2)
                                        {
                                            active = ("Changing To World 90");
                                            world = 90;
                                        }
                                    sw = 0;
                                }
                            active = ("Waiting");                            
                            checkhp();
                            SleepIfAt(90);
                            if(GetWorld() != world)
                                {
                                    ChangeWorld(world);
                                    while(LoggedIn())
                                        {
                                            while(InCombat())
                                                {
                                                    if(HitsPercent() < 50)
                                                        {
                                                            WalkToWait(172,3542);
                                                            WalkToWait(168,3530);
                                                        }
                                                    Wait(100);
                                                }
                                            LogOut();
                                            Wait(100);
                                        }
                                }
                            if(CountInv(droplist) != 0 && !InCombat())
                                {
                                    active = ("Dropping Item"); 
                                    dropper();
                                    Wait(100);
                                }
                            if(CountInv() == 30 && !InCombat())
                                {
                                    gobank();
                                }
                            if(CountInv(foodid[fm]) == 0)
                                {
                                    gobank();
                                }
                            if(HitsPercent() < 30 && pause == 0)
                                {
                                    shutdown();
                                }
                            active = ("Waiting");
                            int[] spick = GetItemById(spicklist);
                            if(spick[1] != -1 && pause == 0)
                                {
                                    active = ("Picking Special Item");
                                    if(spick[0] == 75){itempick = ("Rune Long Sword");}
                                    if(spick[0] == 81){itempick = ("Rune 2-Hander");}
                                    if(spick[0] == 93){itempick = ("Rune Battle Axe");}
                                    if(spick[0] == 112){itempick = ("Rune Large Helmet");}
                                    if(spick[0] == 397){itempick = ("Rune Short Sword");}
                                    if(spick[0] == 399){itempick = ("Rune Medium Helmet");}
                                    if(spick[0] == 400){itempick = ("Rune Chain");}
                                    if(spick[0] == 401){itempick = ("Rune Plate Male");}
                                    if(spick[0] == 402){itempick = ("Rune Legs");}
                                    if(spick[0] == 403){itempick = ("Rune Square Shield");}
                                    if(spick[0] == 404){itempick = ("Rune Kite Shield");}
                                    if(spick[0] == 406){itempick = ("Rune Skirt");}
                                    if(spick[0] == 407){itempick = ("Rune Plate Female");}
                                    if(spick[0] == 522){itempick = ("Dragon Ammy");}
                                    if(spick[0] == 524){itempick = ("Dragon Ammy");}
                                    if(spick[0] == 597){itempick = ("Dragon Ammy");}
                                    if(spick[0] == 593){itempick = ("Dragon Sword");}
                                    if(spick[0] == 594){itempick = ("Dragon Battle Axe");}
                                    if(spick[0] == 795){itempick = ("Dragon Medium Helmet");}
                                    if(spick[0] == 1278){itempick = ("Dragon Square Shield");}
                                    if(spick[0] == 297){itempick = ("Magic Ammy");}
                                    if(spick[0] == 298){itempick = ("Emerald Ammy");}
                                    if(spick[0] == 299){itempick = ("Ruby Ammy");}
                                    if(spick[0] == 300){itempick = ("Diamond Ammy");}
                                    if(spick[0] == -1){itempick = (" ");}
                                    while(GetX() != spick[1] && GetY() != spick[2])
                                        {
                                            WalkTo(spick[1],spick[2]);
                                            Wait(200);
                                        }
                                    PickupItem(spick[1],spick[2],spick[0]);
                                    Wait(200);
                                }
                            active = ("Waiting");
                            itempick = (" ");
                            if(bones == 0 && pause == 0)
                                {
                                    int[] bone = GetItemById(20);
                                    if(bone[1] == GetX() && bone[2] == GetY())
                                        {
                                            active = ("Picking");
                                            itempick = ("Bones");
                                            PickupItem(bone[1],bone[2],bone[0]);
                                            Wait(100);
                                        }
                                    itempick = (" ");
                                }
                            active = ("Waiting");
                            if(bones == 0 && CountInv(20) != 0 && pause == 0)
                                {
                                    active = ("Burying Bones");
                                    UseItem(GetItemPos(20));
                                    Wait(100);
                                }
                            active = ("Waiting");
                            int[] pick = GetItemById(picklist);
                            if(pick[1] != -1 && !InCombat() && HitsPercent() > 60 && spick[1] == -1 && pause == 0)
                                {
                                    active = ("Picking");
                                    if(pick[0] == 10){itempick = ("Coins");}
                                    if(pick[0] == 96){itempick = ("Mith Mace");}
                                    if(pick[0] == 286){itempick = ("Ruby Ring");}
                                    if(pick[0] == 157){itempick = ("Uncut Diamond");}
                                    if(pick[0] == 158){itempick = ("Uncut Ruby");}
                                    if(pick[0] == 159){itempick = ("Uncut Emerald");}
                                    if(pick[0] == 160){itempick = ("Uncut Saphire");}
                                    if(pick[0] == 526 || pick[0] == 527){itempick = ("Half Key");}
                                    if(pick[0] == 38){itempick = ("Death Rune");}
                                    if(pick[0] == 42){itempick = ("Law Rune");}
                                    if(pick[0] == 46){itempick = ("Cosmic Rune");}
                                    if(pick[0] == 41){itempick = ("Chaos Rune");}
                                    if(pick[0] == 1276 || pick[0] == 1277){itempick = ("Half Dragon Shield");}
                                    while(GetX() != pick[1] && GetY() != pick[2])
                                        {
                                            WalkTo(pick[1],pick[2]);
                                            Wait(175);
                                        }
                                    PickupItem(pick[1],pick[2],pick[0]);
                                    Wait(150);
                                }
                            active = ("Waiting");
                            itempick = (" ");
                            if(gbank == 1)
                                {
                                    gbank = 0;
                                    gobank();
                                }
                            if(pick[1] == -1 && GetFatigue() < 90 && HitsPercent() > 50 && picker == 1 && pause == 0)
                                {
                                    int[] npc = GetNpcById(298);
                                    if(npc[1] != -1)
                                        {
                                            active = ("Attacking");
                                            AttackNpc(npc[0]);    
                                            Wait(300);
                                        }
                                }
                            while(InCombat())
                                {
                                    active = ("Fighting");
                                    Wait(100);
                                    while(HitsPercent() < 50 && InCombat())
                                        {
                                            WalkToWait(GetX(),GetY());
                                            Wait(200);
                                        }
                                }
                        }
                }
            done1 = 0;                    
        }
    
public void checkhp()
{
    active = ("Checking HP");
    
    while((GetMaxLvl(3) - GetCurLvl(3)) >= (foodhp[fm]) && foodout != 1 && !InCombat())
        {
            if(fm == 0)
                {
                    active = ("Eating Cake");
                    while(CountInv(335) != 0)
                        {
                            UseItem(GetItemPos(335));
                            Wait(800);
                        }
                    while(CountInv(333) != 0 && CountInv(335) == 0)
                        {
                            UseItem(GetItemPos(333));
                            Wait(800);
                        }
                    while(CountInv(330) != 0 && CountInv(333) == 0 && CountInv(335) == 0)
                        {
                            UseItem(GetItemPos(330));
                            Wait(800);
                        }
                    if(CountInv(330) == 0 && CountInv(333) == 0 && CountInv(335) == 0)
                        {
                            foodout = 1;
                        }
                                        
                }
            if(fm != 0)
                {
                    active = ("Eating" + fooduse[fm]);
                    if(CountInv(foodid[fm]) != 0)
                        {
                            UseItem(GetItemPos(foodid[fm]));
                            Wait(800);
                        }
                    if(CountInv(foodid[fm]) == 0)
                        {
                            gbank = 1;
                        }
                }
        }
    active = ("Waiting");
    
}
public void gobank()
{
    active = ("Walking To Bank");
    gbank = 0;
    gb = 0;
    Display("Going To Bank");
    WalkToWait(172,3542);
    WalkToWait(168,3530);
    while(GetX() != 171 && GetY() != 3527)
        {
            WalkToWait(171,3527);
            Wait(200);
        }
    int[] gate = GetObjectById(57);
    if(gate[0] != -1)
        {
            active = ("Opening Gates");
            AtObject(gate[1],gate[2]);
            Wait(900);
        }
    while(GetX() != 172 && GetY() != 3528)
        {
            WalkToWait(172,3528);
            Wait(200);
        }
    if(closegates == 0)
        {
            int[] gate2 = GetObjectById(58);
            if(gate2[0] != -1)
                {
                    active = ("Closing Gates");
                    AtObject2(gate2[1],gate2[2]);
                    Wait(900);
                }
        }
    bank();
}
public void frombank()
{
    active = ("Walking Back From Bank");
    while(GetX() != 172 && GetY() != 3528)
        {
            WalkToWait(172,3528);
            Wait(200);
        }
    int gate1[] = GetObjectById(57);
            if(gate1[0] != -1)
                {
                    active = ("Opening Gates");
                    AtObject(gate1[1],gate1[2]);
                    Wait(900);
                }
    while(GetX() != 171 && GetY() != 3527)
        {
            WalkToWait(171,3527);
            Wait(200);
        }
    if(closegates == 0)
        {
            int[] gate3 = GetObjectById(58);
            if(gate3[0] != -1)
                {
                    active = ("Closing Gates");
                    AtObject2(gate3[1],gate3[2]);
                    Wait(900);
                }
        }
    WalkToWait(172,3542);
    
}
public void dropper()
{
    active = ("Dropping Item");
    int dt = 0;
    while(dt < 15 && !InCombat())
        {
            while(CountInv(droplist[dt]) != 0 && droplist[dt] != 0)
                {
                    DropItem(GetItemPos(droplist[dt]));
                    Wait(300);
                }
            dt = (dt + 1);
        }
}                                

public void sleep()
{
    active = ("Sleeping");
    while(!Sleeping() && Running() && !InCombat()) 
                    {
                            if(CountInv(1263) == 0)
                                {
                                        Display("Script stopped, no sleeping bag");
                                        End();
                                }
                            UseItem(GetItemPos(1263)); 
                            Wait(3000); 
                        } 
                   while(Sleeping() && Running()) 
        {
                         Wait(100);
        } 
}


public void bank()
{
    active = ("Banking");
    while(!QuestMenu())
        {
            int[] banker = GetNpcById(224);
            if(banker[0] != -1)
                {
                    TalkToNpc(banker[0]);
                    Wait(2000);
                }
            Wait(400);
        }
    Answer(0);
    Wait(1000);
    while(!InBank())
        {
            Wait(500);
        }
    int bt = 0;
    while(bt < 15 && InBank())
        {
            while(CountInv(picklist[bt]) != 0)
                {
                    while(CountInv(picklist[bt]) > 2500)
                        {
                            Deposit(picklist[bt],2500);
                            Wait(300);
                        }
                    while(CountInv(picklist[bt]) > 500)
                        {
                            Deposit(picklist[bt],500);
                            Wait(300);
                        }
                    while(CountInv(picklist[bt]) > 100)
                        {
                            Deposit(picklist[bt],100);
                            Wait(300);
                        }
                    while(CountInv(picklist[bt]) > 25)
                        {
                            Deposit(picklist[bt],25);
                            Wait(300);
                        }
                    while(CountInv(picklist[bt]) > 5)
                        {
                            Deposit(picklist[bt],5);
                            Wait(300);
                        }
                    while(CountInv(picklist[bt]) > 0)
                        {
                            Deposit(picklist[bt],1);
                            Wait(300);
                        }
                }
            bt = (bt + 1);
        }
    int ko = 0;
    while(ko < 24)
        {
            if(CountInv(spicklist[ko]) > inventlist[ko])
                {
                    int ju = (CountInv(spicklist[ko]) - inventlist[ko]);
                    int ji = 0;
                    while(ji != ju)
                        {
                            Deposit(spicklist[ko],1);
                            Wait(300);
                            ji = (ji + 1);
                        }
                }
            ko = (ko + 1);
        }
                
    while(CountInv(foodid[fm]) < carry && CountInBank(foodid[fm]) > 0)
        {
            Withdraw(foodid[fm],1);
            Wait(300);
        }
    Wait(500);
    if(CountInv(foodid[fm]) > carry)
        {
            int dep = (CountInv(foodid[fm]) - carry);
            Deposit(foodid[fm],dep);
            Wait(500);
        }
    if(CountInv(foodid[fm]) == 0 && foodout == 0)
        {
            Display("Food Out! Switching To Secondary Food");
            fm = fn;
            if(foodout == 1 && CountInv(foodid[fm]) == 0 && CountInBank(foodid[fm]) == 0)
                {
                    shutdown();
                }
            foodout = 1;
            bank();
        }
    Wait(500);
    CloseBank();
    Wait(300);
    
    frombank();
}
public void shutdown()
{
    AutoLogin(false);
    if(InCombat())
        {
            while(HitsPercent() > 50)
                {
                    Wait(100);
                }
            WalkToWait(172,3542);
            WalkToWait(168,3530);
        }
    while(LoggedIn())
        {
            LogOut();
            Wait(300);
        }
}
public void OnInput(String input)
{
            if(input.equals("menu"))
        {
            done1 = 0;
            Wait(100);
        }
     if(input.equals("bank"))
        {
            gb = 1;
        }    
     if(input.equals("fmode"))
        {
            setmode = 1;    
        }    
      if(input.equals("world"))
        {
            sw = 1;    
        }
    if(input.equals("bones"))
        {
            setbones = 1;    
        }      
    if(input.equals("gates"))
        {
            cg = 1;
        }      
    if(input.equals("pause"))
        {
            pause = 1;
        }  
    if(input.equals("cont"))
        {
            pause = 0;
        }  
    if(input.equals("sleep"))
        {
            gs = 1;
        }  
}
public Stats ToShow()
{
            String[] Message = {"Combatlvl - " + combatlvl,"Prayer Lvl : @yel@" + pray,"Mode - " + sfmode,"Version - " + ver,"LostTrainer","Activity : @cya@" + active,"Picking : @cya@" + itempick};
          int[] XCoords = {10,10,10,10,10,10,10};
            int[] YCoords = {138,126,114,102,90,210,222};
    return new Stats(Message, XCoords, YCoords);
}
public void checkinv()
{
    active = ("Checking Inventory");
    Display("Checking Inventory");
    int ok = 0;
    while(ok < 24)
        {
            inventlist[ok] = CountInv(spicklist[ok]);
            ok = (ok + 1);
        }
}
public void OnChatMessage(String s, String message)
    {
            if((s.substring(0, 4).equalsIgnoreCase("mod ") || s.equalsIgnoreCase("andrew") || s.equalsIgnoreCase("paul")))
                {
                        Display("A mod was detected!");
                        Wait(Rand(1000, 2000));
                        LogOut();
                        Die();
                }
    }

public void OnPrivateMessage(String s, String message)
    {
            if((s.substring(0, 4).equalsIgnoreCase("mod ") || s.equalsIgnoreCase("andrew") || s.equalsIgnoreCase("paul")))
                {
                        Display("A mod was detected!");
                        Wait(Rand(1000, 2000));
                        LogOut();
                        Die();
                }
    }

}