Init.js error msg

Joined
Sep 28, 2002
Messages
80
Reaction score
0
Website
Visit site
Ive tried to use the JED pindlebot with this script

// 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.UseRightSkill(10059, 13290);
Sleep(300);
Player.SetRightSkill("Shiver Armor", 10);
Sleep(300);
Player.UseRightSkill(10059, 13290);
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;
}


but when i created a game i got the msg that my _init.js is not configured for my character... ive don the padawan sh*t...

my _init.js look like this

// Javascript 1.5
// JED - Javascript Enabled Diablo
// Author: Smoke
//
//==================================================
//
// This script is called whenever a game is joined
//
//==================================================

function JSMain()
{
// Auto run a pindleskin bot script on start
Print ("ÿc9Javascript Enabled Diablo v1.09");
Print ("ÿc9Author: smoke ÿc4(smoke@diabloworld.com)");
Print ("ÿc9Website: http://www.diabloworld.com");

switch (Player.Name)
{


case "Mf_Flickanxxx":
Sleep(4000);
Print ("ÿc3Starting the Pindleskin Run for " + Player.Name + "!");
Command("scripter start pindabot/frostorbsorc.js");
break;


default:
Print ("ÿc8The _Init.js script has not yet been configured to");
Print ("ÿc8support the character " + Player.Name + "!");
}
}
 
Joined
Sep 28, 2002
Messages
80
Reaction score
0
Website
Visit site
well well.. i got deamon script.. configured it.. looks like this

aha.. its to long but ill take it in two parts
// Javascript 1.5
// Diablo II Hackit 0.57 Scripter
//====================================================================
// Pindleskin bot script designed for a lightning sorceress
// Author: Smoke

//*********************************************************
// User Variables - you need to change this stuff!!!
//*********************************************************

//*********************************************************
// POTION USE
//*********************************************************

//If you have more life than this, it won't go to malah
var life=750;

// If you have less life than this, disconnect
var chicken=150;

//If you have more mana than this, it won't go to malah
var manaa=500;

// If you have less mana than this, disconnect
var mn=0;

// Flag for using mana chicken
var mana_chicken = false;

//*********************************************************
// IMMUNITY STUFF
//*********************************************************

// Immunity flag - if true, you want to check for immunities
// If false, you don't want to check.
var useImmunities = false;

// Array of immunities to skip, they are listed further below
// The order goes immunity name, then either 0 or 1
// 0 if you want to exit anytime you see this immunity
// 1 if you want to exit anytime you see more than one of these immunities
//
// Example: skiptheseimmunites = new Array("Mana Burn", 0, "Extra Strong", 1, "Cursed", 1);
//
// This would exit if it saw pindle with mana burn, or if pindle had BOTH the
// extra strong and cursed enhancements.

skiptheseimmunites = new Array("Lightning Enhanced", 0, "Fire Enhanced", 1, "Cold Enhanced", 1);

// Show immunities
var immunitesshow = true;


//*******************************************************
// ATTACK CONFIGURATION
//*******************************************************

// Faster Cast Rate Variable - Enter in the total amount of faster cast you have
var FASTER_CAST = 30;

// IAS you have on your equipment/weapon. Used for chain lightning/lightning sorcs. If you don't use these spells,
// this variable will be ignored.
var IAS = 0;

// Base weapon speed. Used for lightning/chain lightning sorcs only. Enter in the corresponding choice:
// Some commonly used weapons are listed to make the selection easier. If you use a weapon with a larger base speed than
// 10, get a new weapon.
// 0: Base 10 weapon - Occulus, Tal Rashas Orb, Jared's Stone/Swirling Crystal/Dimensional Shard
// 1: Base 0 weapon - Smoked Sphere/Clasped Orb/Cloudy Sphere/Sparkling Ball/Demon Heart/Vortex Orb
// 2: Base -10 weapon - Eagle Orb/Sacred Globe/Glowing Orb/Crystalline Globe/Heavenly Stone/Eldritch Orb
// 3: Base -20 weapon - Wizardspike
// 4: Base -30 weapon - Cutlass/Silence Phase Blades/Lightsabre
// 5: Base -40 weapon - Repeating Crossbow
// 6: Base -60 weapon - Chu-ko-nu
var WEAPON_SPEED = 0;

// LAG_DELAY is a set amount added to the casting time of all your attacks. Probably shouldn't go below 100. Raise this
// variable if you see your attacks being skipped (like casting only one nova when you expect two)
var LAG_DELAY = 100;

// Attack sequence
// attack_sequence is the attack sequence you want to kill Pindle.
// repeat_from is a variable used to determine which part of the sequence you want to repeat
// For example, if it was set to 2, it would repeat the sequence of attacks listed after the second attack.
//
// Example: If I wanted to attack with a FO, static 3 times, then FO, nova twice, FO, nova twice, etc...I would do this:
// var attack_sequence = new Array("Frozen Orb", 1, "Static Field", 3, "Frozen Orb", 1, "Nova", 2);
// var repeat_from = 2;
//
// Note: You may need to set attacks of which you are doing more than one of (like static and nova in the example above) to
// one higher than the number you want to do. For example, if I wanted 2 novas, you may need to set it like this:
// Array("Nova", 3);

var attack_sequence = new Array("Frozen Orb", 1, "Static", 4, "frozen orb", 4 "Nova", 4,);
var repeat_from = 2;

//*********************************************************
// MISC STUFF
//*********************************************************

// Set to true if you want to teleport to pindle's location upon death
var pindle_loc = false;

// This is to set if you want a merc or not true means it will attempt to res your merc when it dies
// false means it will NEVER try to res your merc
var merc = false;

// Here you can set if you want pickit to turn be turned on and off each run
var onoff = true;

// This is the sleep time for teleport
var tp = 400;

// Change this to true if you want to attack the zombies in the courtyard
var zomb = false;

// Sleep time for going down portal to pindle.
// Change if you are having trouble with the portal.
var port = 200;

// You can set how long it waits to pick up items here
var pick = 3000;

// This is the sleep time for running. I found that this does not matter.
// Only change this if you have problems with running to the portal.
var run = 5;

// Sleep for approaching Malah
// Change this if your character is not healing properly.
var mal = 1000;

// Sleep time for Larzuk
var larz = 500;

// Repair rate.
var larz_repair = 0.99;


//*********************************************************
//Precastable defensive spells
//*********************************************************

//Shiver Armor precast
var sa=true;

//Chilling Armor precast
var carm=false;

//Frozen Armor precast
var far=false;

//Thunderstorm precast
var ts=false;

//Energy Shield precast
var es=false;

//precast delay (change this if you are using more than 2 precasts)
var del=200;


//*********************************************************
// Global Variables - Don't need to go past this
//*********************************************************

//pindle detection from stoned2000
var TeleportSucceeded = false;
var idpindle = 0;
var pindledead = false;

// Exit Counter for Immunities
var exit_counter = 0;

// Pindle's information
var Pindle;

// Calculate the casting delay for non-timered spells.
// These variables should not be changed.

var CAST_DELAY;
var TIMED_SPELL_SLEEP = 100;

if(FASTER_CAST > 199) CAST_DELAY = 280;
else if(FASTER_CAST > 104) CAST_DELAY = 320;
else if(FASTER_CAST > 62) CAST_DELAY = 360;
else if(FASTER_CAST > 36) CAST_DELAY = 400;
else if(FASTER_CAST > 19) CAST_DELAY = 440;
else if(FASTER_CAST > 8) CAST_DELAY = 480;
else CAST_DELAY = 520;

// Flag is set if Pindle information is not retrieved correctly
var error = false;

var EIAS;
var LIGHTNING_DELAY;

EIAS = ((120 * IAS) / (120 + IAS)) + ((WEAPON_SPEED - 1) * 10);
if(EIAS > 103) LIGHTNING_DELAY = 440;
else if(EIAS > 89) LIGHTNING_DELAY = 480;
else if(EIAS > 76) LIGHTNING_DELAY = 520;
else if(EIAS > 68) LIGHTNING_DELAY = 560;
else if(EIAS > 56) LIGHTNING_DELAY = 600;
else if(EIAS > 48) LIGHTNING_DELAY = 640;
else if(EIAS > 45) LIGHTNING_DELAY = 680;
else if(EIAS > 37) LIGHTNING_DELAY = 720;
else if(EIAS > 29) LIGHTNING_DELAY = 760;
else if(EIAS > 27) LIGHTNING_DELAY = 800;
else if(EIAS > 23) LIGHTNING_DELAY = 840;
else if(EIAS > 20) LIGHTNING_DELAY = 880;
else if(EIAS > 17) LIGHTNING_DELAY = 920;
else if(EIAS > 14) LIGHTNING_DELAY = 960;
else if(EIAS > 11) LIGHTNING_DELAY = 1000;
else if(EIAS > 9) LIGHTNING_DELAY = 1040;
else if(EIAS > 4) LIGHTNING_DELAY = 1080;
else LIGHTNING_DELAY = 1120;


//*********************************************************
// Coordinates - you probably shouldn't be changing these!
//*********************************************************

var larzuk_path = new Array(7);
larzuk_path[0] = new coord(5102, 5024);
larzuk_path[1] = new coord(5105, 5042);
larzuk_path[2] = new coord(5113, 5041);
larzuk_path[3] = new coord(5129, 5042);
larzuk_path[4] = new coord(5135, 5052);
larzuk_path[5] = new coord(5135, 5080);
larzuk_path[6] = new coord(5135, 5118);

var malah_path = new Array(3);
malah_path[0] = new coord(5088, 5028);
malah_path[1] = new coord(5076, 5030);
malah_path[2] = new coord(5084, 5035);

var qual_path = new Array(6);
qual_path[0] = new coord(5071, 5030);
qual_path[1] = new coord(5075, 5050);
qual_path[2] = new coord(5078, 5080);
qual_path[3] = new coord(5081, 5079);
qual_path[4] = new coord(5080, 5086);
qual_path[5] = new coord(5095, 5117);

var quick_path = new Array(5);
quick_path[0] = new coord(5098, 5023);
quick_path[1] = new coord(5106, 5048);
quick_path[2] = new coord(5119, 5079);
quick_path[3] = new coord(5129, 5107);
quick_path[4] = new coord(5123, 5115);

var orig_point = new Array(1);
orig_point[0] = new coord(5098, 5022);

var pindle_path = new Array(3);
pindle_path[0] = new coord(10064, 13277);
pindle_path[1] = new coord(10059, 13250);
pindle_path[2] = new coord(10057, 13228);

var zombie_path = new Array(6);
zombie_path[0] = new coord(10058, 13236);
zombie_path[1] = new coord(10057, 13255);
zombie_path[2] = new coord(10059, 13275);
zombie_path[3] = new coord(10075, 13265);
zombie_path[4] = new coord(10058, 13265);
zombie_path[5] = new coord(10045, 13265);

function coord(point_x, point_y)
{
this.x = point_x;
this.y = point_y;
}


//*********************************************************
// 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";

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()
{
// Set Event Handlers
SetEventHandler("onItemEvent", "ItemEventFunc");

// Check to make sure that this is a sorceress
if(Player.Class != 1){
Print("You must be a sorceress to use this script!");
return;
}

Sleep(1000)
PickupBody();
CheckBody();

Command("pickit disable");

Print("ÿc4Script Edited by sh-demon with code from mikbre");
Print("ÿc3Original sciprt by bootyjuice");
Print("ÿc2Pindle detection enhancements from Cigamit");
Print("ÿc1Please read the script before contacting me or mikbre");

Print("The Pindleskin run is starting!");
if(PindleRun()){
Disconnect();
return;
}

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

//*********************************************************
// Detect and pick up the player's corpse
//*********************************************************
function PickupBody()
{
EntityList = Entity.GetEntities("JEDCustom");
for(i = 0; i < EntityList.length; i++){
body = EntityList;

if(body.IsACorpse && body.ParentID == Player.ID){
Print("Picking up corpse...");
 
Joined
Sep 28, 2002
Messages
80
Reaction score
0
Website
Visit site
body.Interact();
Sleep(200);
}
}
}


function CheckBody() {
EntityList = Entity.GetEntities("JEDCustom");
for(i = 0; i < EntityList.length; i++) {
body = EntityList;
if(body.IsACorpse && body.ParentID == Player.ID) {
Print("Didn't pick up body, disconnecting...");
Disconnect();
return true;
}
}
}

////////////////////////////////////////////////////////////////////////////////
// Event Handler Functions
////////////////////////////////////////////////////////////////////////////////

function HealthEventFunc(health)
{
if(health < chicken){
Disconnect();
return;
}
}

function ManaEventFunc(mana)
{
if(mana < mn){
Disconnect();
return;
}
}

////////////////////////////////////////////////////////////////////////////////
// onRecvPacket
////////////////////////////////////////////////////////////////////////////////
function RecvPacketParser()
{
// Detect what immunities Pindleskin has. If he's too much for us then quit.
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(useImmunities){
for(j = 0; j < skiptheseimmunites.length; j += 2){
if(immunites[arguments] == skiptheseimmunites[j]){
if(skiptheseimmunites[j + 1] == 0) exitnow = true;
else{
exit_counter++;
if(exit_counter > 1) exitnow = true;
}
}
}
}
}
}
}
}

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

if(arguments[0] == 86 && arguments[19] > 0){
Print("Found Pindleskin") ;
idpindle = arguments[1];
}

if(arguments[0] == 105 && arguments[5] == 8 && arguments[1] == idpindle) pindledead = true;
}
//pindle detection from stoned2000

//*********************************************************
// 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(coord)
{
x = coord.x;
y = coord.y;
notThere = true;

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

loc = Player.Location;

if(Math.abs(loc.x - x) < 4 && Math.abs(loc.y - y) < 4) return;

if(!(loc.x == origloc.x && loc.y == origloc.y)){
origloc = loc;

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

function TalkToMalah()
{
Command("overhead Talking to Malah");

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

malah.Interact() ;
Sleep(mal);

malah.Cancel() ;
}
}
}

function CheckMalah()
{
for(var i = 1; i <= 3; i++){
if(LifeManaCheck()){
mal = 1000;
TalkToMalah();
return true;
}
else break;
}
return false;
}

function LifeManaCheck()
{
if((life > Player.Health) || (manaa > Player.Mana)) return true;
else return false;
}

function TalkToLarzuk()
{
Command("overhead Talking to Larzuk");

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

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

larzuk.Interact();
Sleep(larz);

larzuk.Trade();
Sleep(larz);

larzuk.RepairAll();
Sleep(larz) ;

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

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();
}
}
}

function GoThroughPortal()
{
Command("overhead Going through Portal");

EntityList = Entity.GetEntities("Permanent town portal");
for(iportal = 0; iportal < EntityList.length; iportal++){
// 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[iportal];

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

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

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


function TeleMove(coord)
{
if(Player.Class != 1){
Move(coord);
return;
}

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

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

var r = 0;
while(!TeleportSucceeded){
if(r > 7){
Disconnect();
return;
}

Player.UseRightSkill(coord.x, coord.y);
Sleep(tp);
r++;
}
}

function GetPindleInfo()
{
EntityList = Entity.GetEntities();
for(i = 0; i < EntityList.length; i++){
monster = EntityList;
if(monster.Class == 1 && monster.MonsterType == 1) Pindle = monster;
}
if(Pindle) error = false;
else error = true;
}

//*********************************************************
// Movement Functions - Malah, Larzuk, and Quick Paths, along
// with other movement functions.
//*********************************************************

function MalahPath()
{
Move(malah_path[0]);
EntityList = Entity.GetEntities("Malah");
for(imalah = 0; imalah < EntityList.length; imalah++){
malah = EntityList[imalah];
if(malah.Location.y < 5026) Move(malah_path[1]);
TalkToMalah();
Move(malah_path[1]);
if(CheckMalah()) Move(malah_path[1]);
Move(qual_path[0]);
Move(malah_path[2]);
break;
}
}

function LarzukPath()
{
Print("Walking to Larzuk");
Move(larzuk_path[0]);
Move(larzuk_path[1]);
Move(larzuk_path[2]);
Move(larzuk_path[3]);

TalkToLarzuk();

Move(larzuk_path[4]);
Move(larzuk_path[5]);
Move(larzuk_path[6]);
}

function QualPath()
{
Move(qual_path[0]);
Move(qual_path[1]);
Move(qual_path[2]);

if(Merc.IsDead && merc){
TalkToQualKehk();
Move(qual_path[3]);
}

Move(qual_path[4]);
Move(qual_path[5]);
}

function QuickPath()
{
Move(quick_path[0]);
Move(quick_path[1]);
Move(quick_path[2]);
Move(quick_path[3]);
Move(quick_path[4]);
}

function TeleportToPindle()
{
SetEventHandler("onRecvPacket", "RecvPacketParser");
TeleMove(pindle_path[0]);
TeleMove(pindle_path[1]);
TeleMove(pindle_path[2]);
}

function TownMove()
{
if(LifeManaCheck()){
MalahPath();
if(Merc.IsDead && merc) QualPath();
else{
Move(malah_path[0]);
Move(orig_point[0]);
if(Math.random() > larz_repair) LarzukPath();
else QuickPath();
}
}
else if(Math.random() > larz_repair) LarzukPath();
else if(Merc.IsDead && merc){
Move(malah_path[0]);
Move(malah_path[1]);
QualPath();
}
else QuickPath();
}

function PositionCheck(coord, distance)
{
loc = Player.Location;
if(Math.abs(loc.x - coord.x) > distance || Math.abs(loc.y - coord.y) > distance) TeleMove(coord);
}

//*********************************************************
// Precast Function
//*********************************************************

function Precast()
{
if(es){
Player.SetRightSkill("Energy Shield", 1);
Sleep(del);
Player.UseRightSkill(10064, 13277);
Sleep(del);
}
if(sa){
Player.SetRightSkill("Shiver Armor", 1);
Sleep(del);
Player.UseRightSkill(10064, 13277);
Sleep(del);
}
if(carm){
Player.SetRightSkill("Chilling Armor", 1);
Sleep(del);
Player.UseRightSkill(10064, 13277);
Sleep(del);
}
if(far){
Player.SetRightSkill("Frozen Armor", 1);
Sleep(del);
Player.UseRightSkill(10064, 13277);
Sleep(del);
}
if(ts){
Player.SetRightSkill("Thunder Storm", 1);
Sleep(del);
Player.UseRightSkill(10064, 13277);
Sleep(del);
}
}

//*********************************************************
// Attack Functions
//*********************************************************

function PindleAttack()
{
var i = 0;
var init = repeat_from * 2;
while(!pindledead){
for(j = 0; j < attack_sequence.length && i < 1; j += 2){
Attack(attack_sequence[j], attack_sequence[j + 1]);
if(pindledead) break;
}
i++;
PositionCheck(pindle_path[2], 3);
for(q = init; q < attack_sequence.length; q += 2){
Attack(attack_sequence[q], attack_sequence[q + 1]);
if(pindledead) break;
}
}
}

function Attack(spell, number_of_attacks)
{
var timer_delay;
switch(spell){
case "Meteor":
timer_delay = 1200 + LAG_DELAY;
timed_spell = true;
break;
case "Frozen Orb":
timer_delay = 1000 + LAG_DELAY;
timed_spell = true;
break;
case "Fire Wall":
timer_delay = 1400 + LAG_DELAY;
timed_spell = true;
break;
case "Hydra":
timer_delay = 2000 + LAG_DELAY;
timed_spell = true;
break;
case "Blizzard":
timer_delay = 1800 + LAG_DELAY;
timed_spell = true;
break;
case "Chain Lightning":
timer_delay = LIGHTNING_DELAY + LAG_DELAY;
timed_spell = false;
break;
case "Lightning":
timer_delay = LIGHTNING_DELAY + LAG_DELAY;
timed_spell = false;
break;
default:
timer_delay = CAST_DELAY + LAG_DELAY;
timed_spell = false;
break;
}

Player.SetRightSkill(spell, 1);
for(i = 0; i < number_of_attacks; i++){
if(timed_spell) Sleep(TIMED_SPELL_SLEEP);
else Sleep(timer_delay);
if(!error) Player.UseRightSkill(Pindle.Location.x, Pindle.Location.y);
else Player.UseRightSkill(10058, 13223);
if(timed_spell) TIMED_SPELL_SLEEP = timer_delay;
else TIMED_SPELL_SLEEP -= timer_delay;
if(TIMED_SPELL_SLEEP < 100) TIMED_SPELL_SLEEP = 100;
if(error) GetPindleInfo();
PositionCheck(pindle_path[2], 3);
if(pindledead) break;
}
}

function ZombieAttack()
{
Sleep(5000);
TeleMove(zombie_path[0]);
ZombieAttackPattern(zombie_path[1], 10057, 13245);
ZombieAttackPattern(zombie_path[2], 10059, 13275);
ZombieAttackPattern(zombie_path[3], 10070, 13275);
TeleMove(zombie_path[4]);
ZombieAttackPattern(zombie_path[5], 10070, 13275);
}

function ZombieAttackPattern(coord, x, y)
{
TeleMove(coord);
Command("overhead Nova");
Player.SetRightSkill("Nova", 34);
Sleep(200);
Player.UseRightSkill(x, y);
Sleep(400);
Player.UseRightSkill(x, y);
Sleep(400);
Player.UseRightSkill(x, y);
Sleep(400);
}

//*********************************************************
// Core Pindleskin Run Script
//*********************************************************
function PindleRun()
{
Sleep(1000);
TownMove();
SetEventHandler("onHealth", "HealthEventFunc");
if(mana_chicken) SetEventHandler("onMana", "ManaEventFunc");
if(!IsPortal()){
Command("say $$8Pindleskin Portal Nonexistant!");
return false;
}

GoThroughPortal();
Precast();
TeleportToPindle();

if(exitnow){
Print("ÿc1BAD Immunities Detected - Leaving Game");
Sleep(500);
return true;
}

GetPindleInfo();
PindleAttack();

if(pindle_loc) TeleMove(Pindle.Location);
else PositionCheck(pindle_path[2], 3);

if(onoff) Command("pickit enable");
if(zomb) ZombieAttack();

SetEventHandler("onRecvPacket", "");
if(pindledead){
if(Print("Pindleskin has been destroyed"));
}

Sleep(pick);

return true;
}


and heres my ini

// Javascript 1.5
// JED - Javascript Enabled Diablo
// Author: Smoke
//
//==================================================
//
// This script is called whenever a game is joined
//
//==================================================

function JSMain()
{
// Auto run a pindleskin bot script on start
Print ("ÿc9Javascript Enabled Diablo v1.09");
Print ("ÿc9Author: smoke ÿc4(smoke@diabloworld.com)");
Print ("ÿc9Website: http://www.diabloworld.com");

switch (Player.Name)
{


case "Mf_Flickanxxx":
Sleep(4000);
Print ("ÿc3Starting the Pindleskin Run for " + Player.Name + "!");
Command("scripter start pindabot/fodetectspeed.js");
break;


default:
Print ("ÿc8The _Init.js script has not yet been configured to");
Print ("ÿc8support the character " + Player.Name + "!");
}
}


and i still got the same damn msg!!
 
Joined
Sep 28, 2002
Messages
80
Reaction score
0
Website
Visit site
yes ive used padawan... im in act5.. ive reinstalled it thousonds of times... and yes the spelling on the name is correct... and yes the _init says that the script shud be in the /pindabot map were the script is BUT IT STILL WONT WORK
 

gormna

Member!
Joined
Oct 4, 2002
Messages
438
Reaction score
0
Location
New Jersey
Website
Visit site
and don't forget the comma and stuff in the attack sequence that might screw up ur attack and u'll die. or just not kill him.
 
Joined
Sep 28, 2002
Messages
80
Reaction score
0
Website
Visit site
i didnt get that part.. whats wrong with my attack sequense... im from sweden and talk swedish so im not so good at english so i understand everything you guys says
 

gormna

Member!
Joined
Oct 4, 2002
Messages
438
Reaction score
0
Location
New Jersey
Website
Visit site
var attack_sequence = new Array("Frozen Orb", 1, "Static", 4, "frozen orb", 4 "Nova", 4,);
this is what you have at the moment..

var attack_sequence = new Array("Frozen Orb", 1, "Static", 4, "Frozen orb", 4, "Nova", 4,);


this is what it should look like,, u were missing a comma, which could mess up your attack.
 

mwwolf13

Member
Joined
Oct 15, 2002
Messages
13
Reaction score
0
Location
phila pa usa
Website
Visit site
Purefrozenorb script works for me. my thunderstorm alone nearly kills pindleskin. once in pindle's room it takes 5 seconds to kill him. :)
 

NewPosts

New threads

Top