The JEDi bot ini problem

Discussion in 'Chat & Discuss' started by the_one_and_only_fis, Oct 24, 2002.

  1. the_one_and_only_fis

    the_one_and_only_fis Member!

    Joined:
    Sep 28, 2002
    Messages:
    80
    Likes received:
    0
    Trophy points:
    0
    well now i fixed the init so dont answear on my last thread.. but now i have 1 more problem... when my pinda bot has just killed pindleskin i got the msg "Your Connection has been interupped".. i think this is a ini problem right?? well heres the ini of the script im using

    // Javascript 1.5
    // Diablo II Hackit 0.57 Scripter
    //====================================================================
    // Pindleskin bot script designed for a frost/orb-nova sorceress
    // Author: Smoke
    // Edited by Psyman

    //*********************************************************
    // Configuration: Change what you don't want!
    //*********************************************************

    // Array of immunities to skip, they are listed further below
    skiptheseimmunites = new Array("Lightning Enhanced");

    // Show immunities
    var immunitesshow = true;
    //*********************************************************
    // NO NEED TO GO BEYOND THIS POINT!!!
    //*********************************************************


    immunites = new Array();
    immunites[5]= "Extra Strong";
    immunites[6]="Extra Fast";
    immunites[7]="Cursed";
    immunites[8]="Magic Resistant";
    immunites[9]="Fire Enhanced";
    immunites[16]="Champion";
    immunites[17]="Lightning Enhanced";
    immunites[18]="Cold Enhanced";
    //immunites[22]="Cold Immune"; //This isn't right :( Can also be Poison it seems...
    immunites[23]="Magic Immune";
    immunites[24]="Thief";
    immunites[25]="Mana Burn";
    immunites[26]="Teleportation";
    immunites[27]="Spectral Hit";
    immunites[28]="Stone Skin";
    immunites[29]="Multishot";
    immunites[30]="Aura Enchanted";
    immunites[36]="Ghostly";
    immunites[37]="Fanatic";
    immunites[38]="Possessed";
    immunites[39]="Berserker";

    var StoneSkin = false;

    pindleID = new Array(2);
    var Pindledied = false;
    var exitnow = false;
    pindlex = new Array(2);
    pindley = new Array(2);


    //*********************************************************
    // Main Function: Start the Pindleskin run!
    //*********************************************************
    function JSMain()
    {
    Print("ÿc4Pindleskin bot script by Smoke");
    Print("ÿc4Orb/Nova Enhancements by Psy");
    Print("ÿc4Immune Enhancements by Cigamit");

    // Check to make sure that this is a sorceress
    if(Player.Class != 1)
    {
    Print("You must be a sorceress to use this script!");
    return;
    }
    Command("pickit disable");
    Print("The Pindleskin run is starting!");
    if(PindleRun())
    {

    Disconnect();
    return;
    }

    Print("The Pindleskin run failed!");
    Sleep(5000);
    Disconnect();

    }

    //*********************************************************
    // Event Handler Functions
    //*********************************************************
    function HealthEventFunc(health)
    {
    // If we drop below 300 HP, leave game immediately!
    // do not pass go... do not collect 200 dollars!
    if(health < 300)
    {
    Sleep(200);
    Disconnect();
    return;
    }
    }

    //*********************************************************
    // Helper functions for Moving around and talking with NPCs
    //*********************************************************

    function GetCharClass()
    {
    var cclass = Player.Class;
    if (cclass == 0) return "Amazon";
    if (cclass == 1) return "Sorceress";
    if (cclass == 2) return "Necromancer";
    if (cclass == 3) return "Paladin";
    if (cclass == 4) return "Barbarian";
    if (cclass == 5) return "Druid";
    if (cclass == 6) return "Assassin";
    }

    function Move(x, y)
    {
    notThere = true;

    origloc = Player.Location;
    while(notThere)
    {
    Player.Run(x, y);
    Sleep(100);
    while(Player.IsRunning || Player.IsWalking) Sleep(100);

    loc = Player.Location;

    // Now lets see if we reached our destination
    if(Math.abs(loc.x - x) < 4 && Math.abs(loc.y - y) < 4) return;

    if(!(loc.x == origloc.x && loc.y == origloc.y))
    {
    // We received a new player location...
    origloc = loc;

    if(Math.abs(loc.x - x) < 2) x++;
    if(Math.abs(loc.y - y) < 2) y++;
    }
    }
    }

    var TeleportSucceeded = false;

    function TeleMove(x, y)
    {
    // If this is not a sorc... then walk as normal...
    if(Player.Class != 1)
    {
    Move(x, y);
    return;
    }

    Player.SetRightSkill("Teleport", 1);
    Sleep(400);

    TeleportSucceeded = false;
    SetEventHandler("onRecvPacket", "RecvPacketParser");

    while(!TeleportSucceeded)
    {
    Player.UseRightSkill(x, y);
    Sleep(200);
    }

    }

    function RecvPacketParser()
    {
    // When a teleport succeeds... it is followed by a '15' packet to indicate
    // a position update.
    if(arguments[0] == 21)
    {
    // Set our flag...
    TeleportSucceeded = true;
    // Reset the event handler
    SetEventHandler("onRecvPacket", "");
    }
    }



    function TalkToMalah()
    {
    Print("Talking to Malah");

    EntityList = Entity.GetEntities("Malah");
    for(i = 0; i < EntityList.length; i++)
    {
    malah = EntityList;
    if(malah.Class == Entity.Monster)
    {
    malah.Approach();
    Sleep(100);
    while(Player.IsRunning || Player.IsWalking)
    {
    Sleep(100);
    }

    malah.Interact();
    Sleep(2000);
    malah.Cancel();
    }
    }
    }

    function TalkToLarzuk()
    {
    Print("Talking to Larzuk");

    EntityList = Entity.GetEntities("Larzuk");
    for(i = 0; i < EntityList.length; i++)
    {
    larzuk = EntityList;

    if(larzuk.Class == Entity.Monster)
    {
    larzuk.Approach();
    Sleep(100);
    while(Player.IsRunning || Player.IsWalking)
    {
    Sleep(100);
    }

    larzuk.Interact();
    Sleep(2000);

    larzuk.Cancel();
    Sleep(600);
    }
    }
    }

    function TalkToQualKehk()
    {
    Print("Talking to Qual-Kehk");

    EntityList = Entity.GetEntities("Qual-Kehk");
    for(i = 0; i < EntityList.length; i++)
    {
    qualkehk = EntityList;

    if(qualkehk.Class == Entity.Monster)
    {
    qualkehk.Approach();
    Sleep(100);
    while(Player.IsRunning || Player.IsWalking)
    {
    Sleep(100);
    }

    qualkehk.Interact();
    Sleep(1000);

    Print("Resurrecting Merc");
    qualkehk.ResurrectMerc();
    Sleep(1000);

    qualkehk.Cancel();
    Sleep(400);
    }
    }
    }


    function GoThroughPortal()
    {
    Print("Going through Portal");

    EntityList = Entity.GetEntities("Permanent town portal");
    for(i = 0; i < EntityList.length; i++)
    {
    // Here, we will keep trying to go through the portal until we succeed
    // The way we can tell that we succeeded is because the portal entity is removed
    // and replaced by a new portal entity to return back to town

    portal = EntityList;

    while(portal.Class == Entity.Object && portal.Valid)
    {
    portal.Approach();
    Sleep(100);
    while(Player.IsRunning || Player.IsWalking)
    {
    Sleep(100);
    }
    portal.Interact();
    Sleep(1000);
    }
    }
    }

    function IsPortal()
    {
    EntityList = Entity.GetEntities("Permanent town portal");
    for(i = 0; i < EntityList.length; i++)
    {
    portal = EntityList;

    if(portal.Class == Entity.Object && portal.Valid)
    {
    return true;
    }
    }
    return false;
    }

    //*********************************************************
    // Core Pindleskin Run Script
    //*********************************************************
    function PindleRun()
    {
    Print("Walking to Malah");

    Move(5085, 5028);
    Move(5075, 5028);

    TalkToMalah();
    Move(5085, 5028);

    if(Math.random() > 0.75)
    {
    Print("Walking to Larzuk");
    Move(5075, 5028);
    Move(5085, 5028);
    Move(5102, 5024);
    Move(5105, 5042);
    Move(5113, 5041);
    Move(5129, 5042);

    // HACK!!!
    // Repair module auto repairs... must add functionality
    TalkToLarzuk();

    Print("Walking to Portal");
    Move(5135, 5052);
    Move(5135, 5080);
    Move(5135, 5118);
    Move(5120, 5122);
    } else {
    Print("Walking to Portal");
    Move(5074, 5030);
    Move(5074, 5047);
    Move(5078, 5059);
    Move(5078, 5079);

    if(Merc.IsDead)
    {
    Print("ÿc3Merc is dead, resurrecting...");
    TalkToQualKehk();

    Move(5078, 5079);
    }
    Move(5083, 5089);
    Move(5086, 5114);
    Move(5101, 5121);
    Move(5120, 5122);
    }


    Print("Setting up Health Event");
    SetEventHandler("onHealth", "HealthEventFunc");

    if(!IsPortal())
    {
    Command("say $$8Pindleskin Portal Nonexistant!");
    return false;
    }

    GoThroughPortal();

    Print("Casting defensive spells");
    Player.SetRightSkill("Energy Shield", 10);
    Sleep(300);
    Player.SetRightSkill("Thunder Storm", 30);
    Sleep(300);
    Player.UseRightSkill(10059, 13290);
    Sleep(300);

    Print("Teleporting to pindleskin");

    TeleMove(10059, 13290);
    Sleep(200);
    TeleMove(10059, 13275);
    Sleep(200);
    TeleMove(10057, 13245);
    Sleep(200);

    TeleMove(10057, 13238);

    var notset = true;

    Print("Frozen Orb");
    Player.SetRightSkill("Frozen Orb", 24);
    Sleep(200);
    Player.UseRightSkill(10057, 13223);
    Sleep(700);

    if (exitnow){
    Print("ÿc1BAD Immunities Detected - Leaving Game");
    Sleep(700);
    return true;
    } else {
    Print("Static Field");

    Player.SetRightSkill("Static Field", 25);
    Sleep(200);
    for(i = 0; i < 10; i++)
    {
    Player.UseRightSkill(10057, 13238);
    Sleep(200);
    }

    Print("Frozen Orb");


    Player.SetRightSkill("Frozen Orb", 24);
    Sleep(200);
    for(i = 0; i < 8; i++)
    {
    Player.UseRightSkill(10057, 13223);
    Sleep(1300);
    }

    Print("Nova");

    Player.SetRightSkill("Nova", 34);
    Sleep(700);
    for(j = 0; j < 6; j++)
    {
    Player.UseRightSkill(10052, 13223);
    Sleep(400);
    }
    }

    Command("pickit enable");
    TeleMove(10058, 13225);
    Print("Leaving Game");
    Sleep(3500);

    return true;
    }

    function RecvPacketEvent() {
    if (arguments[0] == 86){
    if (arguments[19] == 241 && arguments[20] == 255){
    pindleID[0] = arguments[1];
    pindleID[1] = arguments[2];
    pindlex[0] = arguments[7];
    pindlex[1] = arguments[8];
    pindley[0] = arguments[9];
    pindley[1] = arguments[10];
    if (immunitesshow)
    Print("ÿc4Pindle is immune to:");
    for (i = 37; arguments > 0; i++) {
    if (immunites[arguments] != undefined) {
    if (immunitesshow)
    Print("ÿc4 + " + immunites[arguments]);
    if (immunites[arguments] == "Stone Skin")
    StoneSkin = true;
    for (j = 0; j < skiptheseimmunites.length; j++){
    if (immunites[arguments] == skiptheseimmunites[j])
    exitnow = true;
    }
    }
    }
    }
    }
    if (arguments[0] == 105 && arguments[5] == 8 && pindleexit){
    if (arguments[1] == pindleID[0] && arguments[2] == pindleID[1]){
    Print("Pindle died!!");
    Pindledied = true;
    }
    }
    return;
    }
     
  2. -=| ][ñVî§ïß£ë® |=-

    -=| ][ñVî§ïß£ë® |=- Member!

    Joined:
    Oct 6, 2002
    Messages:
    24
    Likes received:
    0
    Trophy points:
    0
    why it says that is b/c that the fastest way to exist
    and there is notting worg with it saying that

    "Connection has been interupped" :p
     
  3. gormna

    gormna Member!

    Joined:
    Oct 4, 2002
    Messages:
    438
    Likes received:
    0
    Trophy points:
    0
    From:
    New Jersey
    yes.. its no problem.
     
  4. the_one_and_only_fis

    the_one_and_only_fis Member!

    Joined:
    Sep 28, 2002
    Messages:
    80
    Likes received:
    0
    Trophy points:
    0
    yeah i founded out that now.. thx guys