taultunleashed logoNew L2 BOT: Hope this gets me the free membership plz : Lineage 2 General Discussions
newtopic  postreply
 [ 2 posts ] 
blue large dot

New L2 BOT: Hope this gets me the free membership plz : Lineage 2 General Discussions

Posted: May 22nd, 2004, 5:46 pm
 
Tault_Tault Community

Total Posts: 10213
Joined: August 29th, 2004, 2:46 pm
Tault_Tault Community's Reps: 16
User avatar
Active User > 50 Posts
premium
This is a fully customizable L2 farming bot. Loads SS and everything. May take a while to figure out. You need to download ACTools to use it.




// This line is necessary to select the proper window
SetActiveWindow Asheron's Call

//Level2 0.4
//alpha beta gaga release

SETActiveWindow Lineage II
delay 8 sec

//code borrowed from tivia is the hp/mp check for your char, thanks mang

//RESOLUTION: 1024x768
//PUT ALL FILES IN YOUR ACTOOL\MACROS FOLDER.

//[OLD] Personal Notes:
//1: If you haven't attacked the mob yet, and you're being aggro'd,
// you'll have a monster attacking you and their name will have red
// balls in the target title. You could wait and check that before you
// attack the passive mob. (assuming you only target passive mobs)
//2: Could use the near target hotkey to see how many mobs are attacking
// you at once. Cycle through and keep a count by checking discrepancies
// in their health bars. --run away using the arrow keys?
//3: Load potential targets from a text file?
//4: Find out precisely the amount of HP by scanning down the hp meter till
// you get to the depleted red color (or blue)
//5: Start using soulshots if monster health is lower than yours but you're starting to hurt
//6: Could determine how fast you are killing him by storing damage/hit over x amount
// of exchanges...see if you need to use soulshots

//NEW
//Add monsters to the Targets.txt in the Objects Folder

Constructs
Targets = File //targets file construct
TargetsList = List //list to store the targets in
End

Constants
//EDITABLE FLAGS 1 = ON ; 0 = OFF
//If $PlaySafe is set to 1, you will rest when you're at or around HalfHP
PlaySafe = 1

//EDIT THESE FLAGS
//1 if you want to use them, 0 if you don't (or dont have them)
//TOOLBAR FLAGS//
WeaponSkill = 1
Spoil = 0
Heal = 0
Potion = 0
UseSpiritSoulShot = 1 //default key is F9



Count = 1 //used to traverse the targetList index
Total = 1 //used to find the ListCount
TempTarget = NoValue //holds the value for target before placing into list

ExecWeaponSkill = {F2}
ExecAttack = {F1}
ExecPickup = {F3}
ExecTarget = {F8}
ExecSpoil = {NULL}
ExecSweep = {NULL}
ExecHeal = {NULL}
ExecPotion = {NULL}
ExecSoulSpiritShot = {F5}

///LOCATIONS//
MobHP = 435, 19
MobHPFull = 562, 19

SafeHP = 100, 25 //if red at or above this mark, you're fine
HalfHP = 73, 25 //half hp if lower than this mark
LowHP = 44, 25 //low hp if at or lower than this mark
DeadHP = 14, 25 //you're dead :(

//numbers in between
//object maps would work better for this detection methinks...
SafeHalfHP = 87, 25 //between safe and half hp


SafeMP = 100, 38 //replace hp with mp for the rest of these to understand
HalfMP = 73, 38
LowMP = 44, 38
NoMP = 14, 38
ObjVar = 5

//COLORS//
DeadRed = 102
AliveRed = 207

//HEALTH FLAGS//
Health = "NoValue"

//COMBAT FLAGS//
Attacking = 0 //test if you're currently engaged in combat
StopSpoil = 1 //should we spoil this guy or not
Spoiled = 0 //see if target is already spoiled
Moving = 0 //once you start moving, this is set to true

//MISC
Diff = 0 // didn't feel like typing out difference
Difference = 0 //used to find the variance of red
StartDelay = 10 //macro start delay
MovingTimer = 0 //a timer for...moving?
SitTimer = 0 //a timer for...sitting?
Returned = 0

End //of constants

Call ReadTargets //bottom of macro


////MAIN LOOP
While 1=1
Processmessages
Call FindTarget
End
///END MAIN LOOP


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure FindTarget

Keys {BACK} //make sure it deletes any channel crap crap (+, #, etc)
keys /stand {RETURN}

Set STOPSPOIL = 0 //reset stop spoil if it somehow didn't get reset already

//Check our HP and see if we need to rest
Call HealthCheck

While $Attacking = 0
Timestamp Debug: Start of FindTarget
Call SitDown
Keys {BACK} //make sure it deletes any channel crap crap (+, #, etc)
Set TempTarget = TargetsList[$Count] //quick hack to get it working with brackets

Keys /target [$TempTarget] {RETURN}//target a monster from the list

Delay 200
//target anything close first
Call Aggro
//Call the CheckMonsterHP procedure to see if we have a target
Call CheckMonsterHP

If $Count >= $Total
Set COUNT = 1 //reset count if we've targeted all the monsters
Else
Inc $Count //go to the next monster
End

Timestamp Debug: End of FindTarget...
End //End $Attacking While

//Call Kill because we're attacking now
Call MoveToTarget

End
/////////////////////////////////////////////////
/////////////////////////////////////////////////

Procedure MoveToTarget

//we've set off to kill a monster
Set MOVING = 1
While $Moving = 1
Keydown $ExecAttack
delay 1 sec

Inc $MovingTimer

//CFB will tell us if we've struck it yet, and will set moving to 0 if we have
Call CheckFirstBlow
//if we've been moving for 10 seconds or more, drop the target,
//and then unstick + find a new target
if $MovingTimer >= 10 AND $Moving = 1
TimeStamp Debug: Time's up, unsticking...
//Reset moving flags and timer, and then unstick us + find a new target
Set MOVING = 0
Set MOVINGTIMER = 0
Set ATTACKING = 0
call RandomMove
call FindTarget
end
//if time's up but we've finally hit it, start attacking
if $MovingTimer >= 10 AND $Moving = 0
Call Kill
end
End
Call Kill //we've got a target so call kill
End


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure Kill

(*
If $Spoil = 1 and $Spoiled = 0 and $StopSpoil = 0
Keydown $ExecSpoil 500
Set SPOILED = 1 //monster has been spoiled
End
*)

While $Attacking = 1
Keydown $ExecAttack 150
Call UseSS
delay 1500
Keydown $ExecWeaponSkill 250
delay 100
Call UseSS
KeyDown $ExecAttack 150
delay 5 sec
Call CheckMonsterHP
Timestamp END OF ATTACKING
End
//Hooray! Monster is dead, now for the spoils

delay 100
Call Aggro //check yourself before you loot
delay 100

If $Attacking = 0
Call Loot
Else
Call Kill
End

Call HealthCheck // see if you're good to go again

End
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure Loot
Keydown $ExecPickup 10
delay 20
Keydown $ExecPickup 10
delay 20
Keydown $ExecPickup 10
delay 20
Keydown $ExecPickup 10
delay 20
Keydown $ExecPickup 10
delay 20
Keydown $ExecPickup 100

If $Spoiled = 1
Keydown $ExecSweep //sweep the monster
Set SPOILED = 0 //reset spoiled flag
Set STOPSPOIL = 0 //reset stopspoil flag
End
End
/////////////////////////////////////////////////
/////////////////////////////////////////////////



/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure RandomMove
TimeStamp RANDOMMOVE()
keys {ESC}
compute $returned = Random(X) * 5
Keydown {RIGHT} $returned sec
compute $returned = Random(X) * 5
keydown {DOWN} $returned sec
END
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure SitDown
Call Aggro
Timestamp Health is $Health
//if our HP isn't at a safe level and we're not attacking, then rest
If $Health <> "safe" and $Attacking = 0
//see how long we need to sit

//if health is at Danger, then we sit for 1 minute
if $Health = "danger"
keydown {F9} {RETURN}
//while the timer is still ticking and we're not being aggro'd, rest
while $SitTimer < 60
Call Aggro
if $Attacking = 1
Call Kill
break
end
delay 1 sec
Inc $SitTimer
end //END DANGER WHILE
else
if $Health = "critical"
KeyDown {F9} {RETURN}
//while timer is still ticking and we're not being aggro'd, rest
while $SitTimer < 180
Call Aggro
if $Attacking = 1
Call Kill
break
end
delay 1 sec
Inc $SitTimer
end//END CRITICAL WHILE
End//END CRITICAL IF
Else
if $Health = "safe"
Timestamp Debug: Health is safe, no need to sit.
end
Else
Timestamp Debug: Unknown Health status
End//END PARENT IF
keys /stand {RETURN}
Call HealthCheck //see if we're good to go
End
End
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure HealthCheck

//returns your health status FIRST, then does work depending on health

//first we load RGB values for SafeHP
LoadRGB $SafeHP

//then we see if we can set $Health to safe by testing if we have an alive red color
compute $Difference = Abs ( $AliveRed - {RGBRED} )

//if difference between the two is minimal (less than 40)...then we set $Health to 'safe'
if $Difference < 40
TimeStamp Health is at a safe level
Set $HEALTH = "safe"
//if we didn't have an alivered at a safe [hp] level, then we load at the $halfhp mark
else
LoadRGB $HalfHP

//do math on the color
compute $Difference = Abs ( $AliveRed - {RGBRED} )

//if we get a positive, then health is at least half hp
if $Difference < 40
//now we move to the right a few pixles and see just how safe we are...
LoadRGB $SafeHalfHP

compute $Difference = Abs ( $AliveRed - {RGBRED} )
//if we get a positive here, then that means we're pretty much ok, and we can keep going
if $Difference < 40
Set $Health = "safe"
else
//if not, then we're at half hp (or close enough)
Set $Health = "danger"
end
end
end

if $Health <> "safe"
if $Attacking = 0
//if we're not attacking, we call the sitdown procedure
Call SitDown
else
//else we are attacking and we either need to use a potion or run away
if $Heal = 1
keys {ESC}
delay 10
Keydown $ExecHeal
delay 10
Keydown $ExecTarget
Else
if $Potion = 1
Keydown $ExecPotion
end
end
end
end
End

/////////////////////////////////////////////////
/////////////////////////////////////////////////

/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure CheckMonsterHP
//Load the current RGB values at $MobHP
LoadRGB $MobHP

//find the difference between desired red and actual red
Compute $Difference = ABS ( $AliveRed - {RGBRed} )

//if the difference is acceptable, it's still alive
if $Difference < 40
Set Attacking = 1
Timestamp Debug: We're still fighting...
//else it's dead
else
Set Attacking = 0
Timestamp Debug: MOB has been vanquished.
end
End
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure CheckFirstBlow
//check to see if we've attacked the monster yet
LoadRGB $MobHPFull

Compute $Difference = ABS ( $AliveRed - {RGBRed} )

if $Difference < 40
TimeStamp Debug: Still moving to target... $MovingTimer
else
Set MOVING = 0
Set MOVINGTIMER = 0
end

End
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure Aggro every 5 sec
Timestamp ()
Keydown $ExecTarget 100
Call CheckMonsterHP

//if we got aggrod, dont waste time by spoiling
If $Attacking = 1 and $Spoil = 1
Set STOPSPOIL = 1
End
//hit escape and call nearest target?
End
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
/////////////////////////////////////////////////
Procedure ReadTargets
//READ TARGETS INTO THE LIST
FileOpen Targets, Targets.txt
FileReset Targets

While 1=1
FileRead Targets, TempTarget
If $TempTarget <> " " //make sure we have a value
ListAdd TargetsList, $TempTarget //add the read item into the list
End
If {EOF} = True
Break
End
End

FileClose Targets //close targets file
ListCount TargetsList, Total
//END READING TARGETS
End
/////////////////////////////////////////////////
/////////////////////////////////////////////////


/////////////////////////////////////////////////
//SOUL SHOT USAGE
//Make sure your Soulshot or Spirit shot is
//on the F9 hot key
/////////////////////////////////////////////////
Procedure UseSS

If $UseSpiritSoulShot = 1
Keydown $ExecSoulSpiritShot 2
End

End
/////////////////////////////////////////////////
/////////////////////////////////////


Reply with quote
Posted: May 22nd, 2004, 7:03 pm
 
Tault_Tault Community

Total Posts: 10213
Joined: August 29th, 2004, 2:46 pm
Tault_Tault Community's Reps: 16
User avatar
Active User > 50 Posts
premium
post this in submissions or u cant get access


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 31 guests

cron
Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of Lineage 2 General Discussions RSS Feed 
Sitemap of Lineage 2 General Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?