thx@Dabladest for the update information
Version 0.8 was very buggy and not usable by a lot of people. 0.9 is greatly improved
This version should work for at least 90% of the people. The goal of 1.0 is 95+%.
Features:
Notes:
+ Key 1 needs to be your attack key. Configure the fighting section and rest sections to fit your needs.
+ You need at least 1 way point in the list or F8 will not work.
+ Your mouse cursor is set to 0,0 at the beginning of each fight.
Usage:
1. Download a Firewall and an Antivirus scanner
1a. Scan your pc for trojans/viri, watch the firewall*
2. Download Forceshock here:
[Only registered and activated users can see links. Click Here To Register...]
2a. Scan Forceshock exe with the Antivirus scanner*
3. Double click the Forceshock exe and restart your pc.
3a. Scan your pc for trojans/viri*
3b. Look at your firewall*
3c. This is needed so Forceshock can register *.fss files with itself.
4. Copy the code from this post into a *.fss file called Blizzbot0.9.fss
5. Start WoW in window mode.
6. Log a close combat class in.
7. Double click the Blizzbot0.9.fss file.
8. Walk to an open area.
9. Mark some waypoints using F7.
10. After the last waypoint press F8.
11. Scan your pc for trojans/viri, watch your firewall*
12. Post all bugs you find here.
* If you find any viri/trojan blame Forceshock for it even if you found them be for you installed it(lol).
Version 0.8 was very buggy and not usable by a lot of people. 0.9 is greatly improved
This version should work for at least 90% of the people. The goal of 1.0 is 95+%.
Features:
[Only registered and activated users can see links. Click Here To Register...]Quote:
+ Find mobs directly in the memory (extremely improved).
+ Walking speed improved by 40%.
+ Spinning speed improved by 200%.
+ Looting is now up to 250% faster and should work all the time with accuracy of 50 or less.
+ Does not attack players any more.
+ Hunt mobs with a specific level or level range.
+ Way point system.
+ Blacklists npcs you can't attack after the first try.
+ Works with every melee class.
+ Walk to a npc, kill him and loot him.
+ Fight several npcs at once if your char can take the beating.
+ Calculates the offsets until the right ones are found.
+ Fixed all known bugs.
Notes:
+ Key 1 needs to be your attack key. Configure the fighting section and rest sections to fit your needs.
+ You need at least 1 way point in the list or F8 will not work.
+ Your mouse cursor is set to 0,0 at the beginning of each fight.
Usage:
1. Download a Firewall and an Antivirus scanner
1a. Scan your pc for trojans/viri, watch the firewall*
2. Download Forceshock here:
[Only registered and activated users can see links. Click Here To Register...]
2a. Scan Forceshock exe with the Antivirus scanner*
3. Double click the Forceshock exe and restart your pc.
3a. Scan your pc for trojans/viri*
3b. Look at your firewall*
3c. This is needed so Forceshock can register *.fss files with itself.
4. Copy the code from this post into a *.fss file called Blizzbot0.9.fss
5. Start WoW in window mode.
6. Log a close combat class in.
7. Double click the Blizzbot0.9.fss file.
8. Walk to an open area.
9. Mark some waypoints using F7.
10. After the last waypoint press F8.
11. Scan your pc for trojans/viri, watch your firewall*
12. Post all bugs you find here.
* If you find any viri/trojan blame Forceshock for it even if you found them be for you installed it(lol).
Code:
----------------------------------------------------------------------------------
-- BlizzBot 0.9 - Blizzhackers open source community bot < close combat edition >
----------------------------------------------------------------------------------
-- + World of Warcraft 1.2.1 4150 US
-- + Forceshock Version 0.900+
--; CREDITS
-----------------------------------------------------
--; Bot by n1ce
--; All hacks and math by Outlaw
-----------------------------------------------------
--; Extra fame goes too
-------------------------------------------------------------------------
--; catvir and brainiac2k for reversing WoW since the beginning :)
-------------------------------------------------------------------------
---------------------------------------------------------------------------------
--; Calculations to defeat DMA
---------------------------------------------------------------------------------
function calc_offsets(hWnd)
ptr_unit_struct = ReadDword(hWnd,"12E188")
ptr_hitpoints = HexAdd( IntToHex( ptr_unit_struct ),"C74")
ptr_mana = HexAdd( IntToHex( ptr_unit_struct ),"11F4")
ptr_maxmana = HexAdd( IntToHex( ptr_unit_struct ),"120C")
ptr_maxhp = HexAdd( IntToHex( ptr_unit_struct ),"1FAC")
ptr_hover_target_id = HexSub( IntToHex( ptr_unit_struct ),"11D8")
ptr_current_xp = HexAdd( IntToHex( ptr_unit_struct ),"16D0")
ptr_max_xp = HexAdd( IntToHex( ptr_unit_struct ),"16D4")
ptr_rage = HexAdd( ptr_mana,"4")
ptr_energy = HexAdd( ptr_rage,"8")
ptr_facing = HexAdd( IntToHex( ptr_unit_struct ),"93C")
ptr_internal_z = HexSub( ptr_facing,"4")
ptr_internal_y = HexSub( ptr_internal_z,"4")
ptr_internal_x = HexSub( ptr_internal_y,"4")
end
---------------------------------------------------------------------------------
--; Player structure
---------------------------------------------------------------------------------
function GetPlayerData(hWnd)
player = {
ptr = ptr_unit_struct,
hp = ReadDword(hWnd,ptr_hitpoints),
mana = ReadDword(hWnd,ptr_mana),
maxmana = ReadDword(hWnd,ptr_maxmana),
maxhp = ReadDword(hWnd,ptr_maxhp),
energy = ReadDword(hWnd,ptr_energy),
rage = ReadDword(hWnd,ptr_rage),
targetID = ReadDword(hWnd,"992AB8"),
hoverID = ReadDword(hWnd,ptr_hover_target_id),
playerID = ReadDword(hWnd,"989388"),
xp = ReadDword(hWnd,ptr_current_xp),
maxxp = ReadDword(hWnd,ptr_max_xp),
x = ReadFloat(hWnd, ptr_internal_x),
y = ReadFloat(hWnd,ptr_internal_y),
z = ReadFloat(hWnd,ptr_internal_z),
facing = ReadFloat(hWnd,ptr_facing)
}
return player
end
---------------------------------------------------------------------------------
--; Helper functions
---------------------------------------------------------------------------------
function SetTraceID(hWnd,npc_id) WriteDword(hWnd,"B21D34",npc_id)end
function GetTraceID(hWnd) return ReadDword(hWnd,"B21D34") end
function GetNpcPtr(hWnd) return ReadDword(hWnd,"B21D38") end
function GetNpcID(hWnd) return ReadDword(hWnd,"B21D28") end
---------------------------------------------------------------------------------
--; Npc structure
---------------------------------------------------------------------------------
function GetNpcData(hWnd,npc_id)
SetTraceID(hWnd,npc_id)
Sleep(1)
npc = {
ptr = ReadDword(hWnd,"B21D38"),
id = ReadDword(hWnd,"B21D28"),
hp = ReadDword(hWnd,"B21D24"),
level = ReadDword(hWnd,"B21D2C"),
faction = ReadDword(hWnd,"B21D30"),
x = ReadFloat(hWnd,"B21D14"),
y = ReadFloat(hWnd,"B21D18"),
z = ReadFloat(hWnd,"B21D1C"),
facing = ReadFloat(hWnd,"B21D20"),
range = 0
}
return npc
end
---------------------------------------------------------------------------------
--; Hook
---------------------------------------------------------------------------------
function Hook(hWnd)
[TSEARCH:hWnd,WriteOpCodes]
Poke 7D377F 90 90 90 90 90 90 90 90 51 50 81
Poke 7D378A C1 C0 04 00 00 8B 01 81 E9 C0 04
Poke 7D3795 00 00 39 05 88 93 98 00 74 78 83
Poke 7D37A0 3D 34 1D B2 00 01 74 10 39 05 34
Poke 7D37AB 1D B2 00 74 08 39 05 B8 2A 99 00
Poke 7D37B6 75 5F 89 0D 38 1D B2 00 83 C1 10
Poke 7D37C1 8B 01 A3 14 1D B2 00 83 C1 04 8B
Poke 7D37CC 01 A3 18 1D B2 00 83 C1 04 8B 01
Poke 7D37D7 A3 1C 1D B2 00 83 C1 04 8B 01 A3
Poke 7D37E2 20 1D B2 00 81 C1 38 03 00 00 8B
Poke 7D37ED 01 A3 24 1D B2 00 81 C1 6C 01 00
Poke 7D37F8 00 8B 01 A3 28 1D B2 00 81 C1 88
Poke 7D3803 00 00 00 8B 01 A3 2C 1D B2 00 83
Poke 7D380E C1 04 8B 01 A3 30 1D B2 00 58 59
Poke 7D3819 83 EC 40 8B 41 38 E9 F4 10 CB FF
Poke B21D14 00 00 00 00 00 00 00 00 00 00 00
Poke B21D1F 00 00 00 00 00 00 00 00 00 00 00
Poke B21D2A 00 00 00 00 00 00 00 00 00 00 00
Poke B21D35 00 00 00 00 00 00 00
[/TSEARCH]
WriteOpCodes(hWnd,"484913","E9,6F,EE,34,00,90")
end
function IsUnderAttack(hWnd)
player = GetPlayerData(hWnd)
if player.targetID > 0 then
if sitting == 1 then
sitting = 0
SendKeys(hWnd,"x")
end
PrintConsoleLine("Under attack, trying to fight the enemy off.")
id = fight(hWnd,player.targetID)
if id ~= 0 then loot(id) end
rest()
return 1
end
return 0
end
function sense_npc(hWnd,range,min_l,max_l)
save = {}
c = 0
PrintConsole("Searching for a suitable npc...")
Sleep(500)
t = GetTimeStamp()
while 1 do
SetTraceID(hWnd,1)
Sleep(1)
player = GetPlayerData(hWnd)
npc = GetNpcData(hWnd,GetNpcID(hWnd))
n = blacklist_count
while n >= 1 do
if Blacklist[n] == npc.id then
n = -1
end
n = n - 1
end
if npc.level >= min_l and npc.level <= max_l and npc.id ~= nil and npc.id ~= 0 and npc.hp >= 1 and npc.hp <= 100 and n ~= -2 then
npc.range = math.sqrt( (player.x - npc.x)^2 + (player.y - npc.y)^2 + (player.z - npc.z)^2)
if npc.range <= range then
if c == 0 then
save = npc
c = 1
else
if npc.range < save.range then
save = npc
end
end
end
end
IsUnderAttack(hWnd)
if SinceTimeStamp(t) > 2000 then
return save
end
end
return nil
end
function FaceXY(hWnd,x,y)
while 1 do
player = GetPlayerData(hWnd)
RealX = player.x - x
RealY = player.y - y
if RealX < 0 then RealX = RealX * -1 end
if RealY < 0 then RealY = RealY * -1 end
if x > player.x and y > player.y then
g = math.deg ( math.atan( RealY / RealX ) )
end
if x > player.x and y < player.y then
g = ( ( math.deg ( math.atan( RealY / RealX ) ) * - 1 ) + 90 ) + 270
end
if x < player.x and y < player.y then
g = math.deg ( math.atan( RealY / RealX ) ) + 180
end
if x < player.x and y > player.y then
g = ( ( math.deg ( math.atan( RealY / ( RealX ) ) ) * - 1 ) + 90 ) + 90
end
if g == nil then
return 0
end
target = 6.22 / 360 * g
if ( player.facing - 0.05 ) < target and ( player.facing + 0.05 ) > target then
return 1
else
L = target - player.facing
if L < 0 then L = L * -1 end
if target > player.facing then
R = target - player.facing
else
R = ( 6.22 - player.facing ) + target
end
if R > L then
PressKey("RIGHT",20)
else
PressKey("LEFT",20)
end
end
end
end
function Move(hWnd,x,y)
if sitting == 1 then
sitting = 0
SendKeys(hWnd,"x")
end
PrintConsoleLine("Moving too: X: "..FloatToStr(x).." Y: "..FloatToStr(y))
t = GetTimeStamp()
while 1 do
FaceXY(hWnd,x,y)
player = GetPlayerData(hWnd)
if ( player.x - 10 ) < x and ( player.x + 10 ) > x then
if ( player.y - 5 ) < y and ( player.y + 5 ) > y then
return 1
else
PressKey("UP",500)
end
else
PressKey("UP",500)
end
if IsUnderAttack(hWnd) == 1 then return 0 end
if SinceTimeStamp(t) > 25000 then
PrintConsoleLine("Can not reach location.")
return 0
end
end
end
function MoveToNpc(hWnd,id,unstopable)
if sitting == 1 then
sitting = 0
SendKeys(hWnd,"x")
end
t = GetTimeStamp()
while 1 do
npc = GetNpcData(hWnd,id)
player = GetPlayerData(hWnd)
FaceNpc(hWnd,npc.id)
if ( player.x - 4 ) < npc.x and ( player.x + 4 ) > npc.x then
if ( player.y - 2 ) < npc.y and ( player.y + 2 ) > npc.y then
return 1
else
PressKey("UP",500)
end
else
PressKey("UP",500)
end
if unstoppable == 0 then
if IsUnderAttack(hWnd) == 1 then return 0 end
end
if SinceTimeStamp(t) > 1000 then
return 0
end
end
return 0
end
function FaceNpc(hWnd,id)
while 1 do
player = GetPlayerData(hWnd)
npc = GetNpcData(hWnd,id)
RealX = player.x - npc.x
RealY = player.y - npc.y
if RealX < 0 then RealX = RealX * -1 end
if RealY < 0 then RealY = RealY * -1 end
if npc.x > player.x and npc.y > player.y then
g = math.deg ( math.atan( RealY / RealX ) )
end
if npc.x > player.x and npc.y < player.y then
g = ( ( math.deg ( math.atan( RealY / RealX ) ) * - 1 ) + 90 ) + 270
end
if npc.x < player.x and npc.y < player.y then
g = math.deg ( math.atan( RealY / RealX ) ) + 180
end
if npc.x < player.x and npc.y > player.y then
g = ( ( math.deg ( math.atan( RealY / ( RealX ) ) ) * - 1 ) + 90 ) + 90
end
if g == nil then
return 0
end
target = 6.22 / 360 * g
if ( player.facing - 0.05 ) < target and ( player.facing + 0.05 ) > target then
return 1
else
L = target - player.facing
if L < 0 then L = L * -1 end
if target > player.facing then
R = target - player.facing
else
R = ( 6.22 - player.facing ) + target
end
if R > L then
PressKey("RIGHT",20)
else
PressKey("LEFT",20)
end
end
end
end
---------------------------------------------------------------------------------
--; The control window
---------------------------------------------------------------------------------
function window_open()
gui = OpenGui("Blizzbot 0.9 < close combat edition >",300,280)
--; Loot settings
AddFrame(gui,"Loot settings",0,0,300,60)
lb_loot = AddLabel(gui,"Enter the area where you wish to scan for loot",7,15,225,15)
AddLabel(gui,"1x,1y:",7,33,30,15)
eb_x1 = AddEditBox(gui,"200",37,32,30,20)
eb_y1 = AddEditBox(gui,"244",67,32,30,20)
AddLabel(gui,"2x,2y:",105,33,30,15)
eb_x2 = AddEditBox(gui,"650",137,32,30,20)
eb_y2 = AddEditBox(gui,"431",167,32,30,20)
AddLabel(gui,"accuracy: ",205,33,49,15)
eb_acu = AddEditBox(gui,"50",254,32,30,20)
--; Area hunting settings
AddFrame(gui,"Area hunting settings",0,62,300,187)
lb_area = AddLabel(gui,"Press F7 to store your current location.",7,78,250,15)
list_x = AddList(gui,7,94,143,100)
list_y = AddList(gui,150,94,143,100)
lb_radius = AddLabel(gui,"Hunting radius :",7,204,80,15)
eb_radius = AddEditBox(gui,"32",84,201,30,20)
lb_radius = AddLabel(gui,"Search for mob (times) :",120,204,120,15)
eb_sense_times = AddEditBox(gui,"5",235,201,30,20)
lb_level = AddLabel(gui,"Level range :",7,228,120,15)
eb_level_min = AddEditBox(gui,"1",84,225,30,20)
lb_leavel2 = AddLabel(gui," - ",125,228,20,15)
eb_level_max = AddEditBox(gui,"60",147,225,30,20)
save = AddButton(gui,"Save settings",2,253,75,25)
load = AddButton(gui,"Load settings",77,253,75,25)
lb_info = AddLabel(gui," Press F8 to start the bot.",152,258,150,15)
SetItemColor(lb_info,RGB(0,255,0),0)
ExitOnGuiClose(gui)
end
---------------------------------------------------------------------------------
--; WoW functions
---------------------------------------------------------------------------------
function ClearTarget()
SendKeys(hWnd,"{ENTER}")
SendKeys(hWnd,"/script ClearTarget();")
SendKeys(hWnd,"{ENTER}")
end
---------------------------------------------------------------------------------
--; The loot function. Brute force now :P
---------------------------------------------------------------------------------
function loot()
lx1 = StrToInt(GetEditBoxText(eb_x1))
ly1 = StrToInt(GetEditBoxText(eb_y1))
lx2 = StrToInt(GetEditBoxText(eb_x2))
ly2 = StrToInt(GetEditBoxText(eb_y2))
player = GetPlayerData(hWnd)
ohp = player.hp
savey = ly1
HoldKey("SHIFT")
while lx1 < lx2 do
while ly1 < ly2 do
ly1 = ly1 + ( StrToInt(GetEditBoxText(eb_acu)) / 10 )
SetCursorPos(lx1,ly1)
Sleep(1)
RightClick(lx1,ly1,1)
player = GetPlayerData(hWnd)
if player.hp < ohp then
ClearTarget()
Sleep(1000)
if IsUnderAttack(hWnd) == 1 then return 0 end
end
end
lx1 = lx1 + StrToInt(GetEditBoxText(eb_acu))
ly1 = savey
end
player = GetPlayerData(hWnd)
if player.targetID ~= 0 then
ClearTarget()
end
ReleaseKey("SHIFT")
return 0
end
---------------------------------------------------------------------------------
--; The resting is handled here.
--; Edit to fit your needs
---------------------------------------------------------------------------------
function rest()
player = GetPlayerData(hWnd)
sitting = 0
oldhp = player.hp
if player.hp ~= player.maxhp then PrintConsoleLine("Resting to recover "..IntToStr(player.maxhp - player.hp).." hits points.") end
while player.hp ~= player.maxhp do
player = GetPlayerData(hWnd)
if player.hp < oldhp then
SendKeys(hWnd,"x")
sitting = 0
end
if sitting == 0 then
SendKeys(hWnd,"x")
sitting = 1
end
if player.hp == player.maxhp then break end
if IsUnderAttack(hWnd) == 1 then return 0 end
Sleep(1)
end
if sitting == 1 then
sitting = 0
SendKeys(hWnd,"x")
PrintConsoleLine("Resting done.")
else
PrintConsoleLine("Don't need to rest.")
end
return
end
---------------------------------------------------------------------------------
--; The actual fight happens here
--; Edit to fit your needs
---------------------------------------------------------------------------------
function fight(hWnd,id)
SetCursorPos(0,0)
MoveToNpc(hWnd,id,1)
FaceNpc(hWnd,id)
SendKeys(hWnd,"1")
Sleep(250)
player = GetPlayerData(hWnd)
if player.targetID == 0 then
Blacklist[blacklist_count] = npc.id
PrintConsoleLine("Blacklisted NPC: "..Blacklist[blacklist_count])
blacklist_count = blacklist_count + 1
return 0
end
tick = 0
count = 0
player = GetPlayerData(hWnd)
npc = GetNpcData(hWnd,player.targetID)
oldhp = player.hp
oldnpchp = npc.hp
oldnpcid = player.targetID
PrintConsoleLine("--------INITIATING FIGHT--------")
while 1 do
player = GetPlayerData(hWnd)
if player.targetID == 0 then break end
npc = GetNpcData(hWnd,player.targetID)
if npc.hp == 0 or npc.hp > 100 then break end
Sleep(Randomize(120,570))
MoveToNpc(hWnd,npc.id,1)
FaceNpc(hWnd,npc.id)
if player.rage >= 150 and SinceTimeStamp(tick) > 1500 then
SendKeys(hWnd,"2")
tick = GetTimeStamp()
end
if oldhp ~= player.hp or oldnpchp ~= npc.hp and oldnpcid == npc.id then
PrintConsoleLine("PLAYER HP: "..IntToStr(player.hp).." TARGET HP: "..IntToStr(npc.hp))
end
if npc.hp == 100 then
if count > 100 and player.hp == player.maxhp then
PrintConsoleLine("Can not damage this target. I try to get a new one!")
ClearTarget()
return 0
end
end
oldhp = player.hp
oldnpchp = npc.hp
count = count + 1
end
PrintConsoleLine("-----------FIGHT OVER-----------")
mobs_killed = mobs_killed + 1
SetWindowTitle(hWnd,"Blizzbot 0.9 < close combat edition > | NPCS KILLED:["..IntToStr(mobs_killed).."]")
return oldnpcid
end
---------------------------------------------------------------------------------
--; MAIN LOOP
---------------------------------------------------------------------------------
if GetVersion() > 0.900 then
OpenConsole()
SetConsoleTitle("Blizzbot 0.9 < close combat edition >")
Blacklist = {}
Blacklist[1] = "0"
blacklist_count = 1
earned_exp = 0
exp_last = 0
mobs_killed = 0
runbot = 0
wait_for_wow = 1
PrintConsoleLine("-------------------------------------")
PrintConsole("Waiting for World of Warcraft....")
i = 1
while wait_for_wow == 1 do
hWnd = FindWindowByExe("WoW.exe")
if hWnd > 0 then
wait_for_wow = 0
end
i = i + 1
if i > 100 then MessageBox("Blizzbot 0.9 FATAL ERROR!","World of Warcraft not found!") Exit() end
Sleep(10)
end
PrintConsoleLine(" ok")
PrintConsole("Calculating WoW offsets..........")
i = 1
while 1 do
calc_offsets(hWnd)
player = GetPlayerData(hWnd)
if player.hp > 30 and player.hp < 10000 and player.facing > -1 and player.facing < 7 then
break
else
ClearConsole()
PrintConsoleLine("-------------------------------------")
PrintConsoleLine("Waiting for World of Warcraft.... ok")
PrintConsole("Calculating WoW offsets..... try["..IntToStr(i).."]")
i = i + 1
if i > 25 then MessageBox("Blizzbot 0.9 FATAL ERROR!","Make sure you execute Blizzbot after you logged your toon in!") Exit() end
end
Sleep(100)
end
PrintConsoleLine(" ok")
PrintConsole("Installing hook..................")
Hook(hWnd)
PrintConsoleLine(" ok")
PrintConsoleLine("Opening control panel ..")
window_open()
PrintConsoleLine("Waiting for user input ..")
PrintConsoleLine("-------------------------------------")
while 1 do
if IsButtonPressed(save) == 1 then
EraseRegistryDir("HKEY_CURRENT_USER","Software\\Blizzbot")
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","1x",GetEditBoxText(eb_x1))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","1y",GetEditBoxText(eb_y1))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","2x",GetEditBoxText(eb_x2))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","2y",GetEditBoxText(eb_y2))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","accuracy",GetEditBoxText(eb_acu))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","radius",GetEditBoxText(eb_radius))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","search",GetEditBoxText(eb_sense_times))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","min_level",GetEditBoxText(eb_level_min))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","max_level",GetEditBoxText(eb_level_max))
co = GetListItemCount(list_y) - 1
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","wpcount",IntToStr(co))
while co ~= -1 do
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","wpx"..IntToStr(co),GetListItemText(list_x, co))
WriteRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","wpy"..IntToStr(co),GetListItemText(list_y, co))
co = co - 1
end
PrintConsoleLine("Settings saved!")
end
if IsButtonPressed(load) == 1 then
ClearList(list_x)
ClearList(list_y)
SetEditBoxText(eb_x1,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","1x"))
SetEditBoxText(eb_y1,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","1y"))
SetEditBoxText(eb_x2,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","2x"))
SetEditBoxText(eb_y2,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","2y"))
SetEditBoxText(eb_acu,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","accuracy"))
SetEditBoxText(eb_radius,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","radius"))
SetEditBoxText(eb_sense_times,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","search"))
SetEditBoxText(eb_level_min,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","min_level"))
SetEditBoxText(eb_level_max,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","max_level"))
co = StrToInt(ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","wpcount"))
a = 0
while a ~= co + 1 do
AddListItem(list_x,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","wpx"..IntToStr(a)))
AddListItem(list_y,ReadRegistryKey("HKEY_CURRENT_USER","Software\\Blizzbot","wpy"..IntToStr(a)))
a = a + 1
end
PrintConsoleLine("Settings loaded!")
end
if IsKeyPressed("F7") == 1 and runbot == 0 then
player = GetPlayerData(hWnd)
AddListItem(list_x,FloatToStr(player.x))
AddListItem(list_y,FloatToStr(player.y))
PrintConsoleLine("Added coordinates X: "..FloatToStr(player.x).." Y: "..FloatToStr(player.y).." to the waypoint list.")
end
if IsKeyPressed("F8") == 1 then
if GetListItemCount(list_y) > 0 then
x1 = StrToFloat(GetEditBoxText(eb_ax1))
y1 = StrToFloat(GetEditBoxText(eb_ay1))
x2 = StrToFloat(GetEditBoxText(eb_ax2))
y2 = StrToFloat(GetEditBoxText(eb_ay2))
runbot = 1
SetWindowTitle(hWnd,"Blizzbot 0.9 < close combat edition > | NPCS KILLED:["..IntToStr(mobs_killed).."]")
PrintConsoleLine("BlizzBot < close combat edition > has started his journey!")
else
PrintConsoleLine("Can't start, no way point(s) in list!")
end
end
if runbot == 1 then
player = GetPlayerData(hWnd)
FocusWindow(hWnd)
min_level = StrToInt(GetEditBoxText(eb_level_min))
max_level = StrToInt(GetEditBoxText(eb_level_max))
wp_count = GetListItemCount(list_y) - 1
rad = StrToInt(GetEditBoxText(eb_radius))
while wp_count ~= -1 do
walk_x = StrToFloat(GetListItemText(list_x, wp_count))
walk_y = StrToFloat(GetListItemText(list_y ,wp_count))
wp_count = wp_count - 1
if Move(hWnd,walk_x,walk_y) ~= 0 then
times = StrToInt(GetEditBoxText(eb_sense_times))
while times ~= 0 do
npc = sense_npc(hWnd,rad,min_level,max_level)
if npc.id ~= nil then
if npc.hp >= 1 and npc.hp <= 100 then
PrintConsoleLine(" found!")
PrintConsoleLine("Moving to NPC: "..IntToStr(npc.id).." X: "..FloatToStr(npc.x).." Y:"..FloatToStr(npc.y))
i = 0
while i < 25 do
there = MoveToNpc(hWnd,npc.id,0)
i = i + 1
end
if there ~= 0 then
id = fight(hWnd,npc.id)
if id ~= 0 then loot(id) end
Move(hWnd,walk_x,walk_y)
rest()
times = StrToInt(GetEditBoxText(eb_sense_times))
end
else
PrintConsoleLine("This is no npc! skipping!")
end
else
PrintConsoleLine(" no valid npc found!")
end
times = times - 1
end -- while sense
end --end if movecheck
end -- while walk
end -- end if runbot
Sleep(100)
end
Sleep(1)
else
MessageBox("Error","Your Forceshock version is\r\n to low for this script")
Exit()
end
---------------------------------------------------------------------------------
--; EOF
---------------------------------------------------------------------------------