Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 06:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



OK to ask for exploit/Scripting help here...

Discussion on OK to ask for exploit/Scripting help here... within the GW Bots forum part of the Guild Wars category.

Reply
 
Old 08/09/2018, 19:31   #31
 
elite*gold: 0
Join Date: May 2011
Posts: 83
Received Thanks: 72
Quote:
Originally Posted by LordKillfox View Post
Hey guys!

I need your help / advice on a function of mine...

Code:
; ~ Description: Returns number of foes which meet certain conditions, given by the parameter
; ~ $HPPercentage = from 0(=0%) to 1(=100%), set the HP in % to return all valid enemies with less than your set %
; ~ $aKilledFoes = start this function if a certain amount of foes are killed (only works in HM)
; ~ $aRange = returns all valid enemies within this range

Func GetRemainingFoes($HPPercentage = 1, $aKilledFoes = 0, $aRange = $RANGE_NEARBY)
	If GetFoesKilled() > $aKilledFoes Then
		Local $lAgentArray = GetAgentArray(0xDB)
		Local $lMe = GetAgentById(-2)
		Local $lFoeCount = 0
		For $i = 1 To $lAgentArray[0]
			;If $lAgentArray[$i] = 0 Then ContinueLoop ; no Agent
			If Not GetIsEnemy($lAgentArray[$i]) Then ContinueLoop ; not an enemy
			If Not GetIsAlive($lAgentArray[$i]) Then ContinueLoop ; not alive
			$Distance = GetDistance($lAgentArray[$i], -2)
			If $Distance > $aRange Then ContinueLoop ; not in range
			If GetTarget($lAgentArray[$i]) <> $lMe Then ContinueLoop ; not targeting me
			$HP = DllStructGetData($lAgentArray[$i], 'HP')
			If $HP > $HPPercentage Then ContinueLoop ; ignore the enemy if it has more than the set HP %
			$lFoeCount += 1
		Next
		Return $lFoeCount
	EndIf
EndFunc   ;==>CheckRemainingFoes
Is this viable to check the remaining amount of foes in a kill loop?

Since my problem is that most functions don't work in loops (i think because they are called too much in a loop so they simply return 0).

I tried to use this function in a killing loop:
Code:
Func GetEnemiesWithinRange($aRange = $RANGE_AREA)
	Local $lAgentArray = GetAgentArray(0xDB)
	Local $lSubArray[$lAgentArray[0] + 1]
	$lSubArray[0] = 0
	Local $lMeXY = GetAgentXY(-2)
	For $i = 1 To $lAgentArray[0]
		If GetIsEnemy($lAgentArray[$i]) = 0 Or GetIsDead($lAgentArray[$i]) Then ContinueLoop
		Local $lTargetXY = GetAgentXY($lAgentArray[$i])
		If ComputeDistance($lMeXY[0], $lMeXY[1], $lTargetXY[0], $lTargetXY[1]) > $aRange Then ContinueLoop
		$lSubArray[0] += 1
		$lSubArray[$lSubArray[0]] = $lAgentArray[$i]
	Next
	ReDim $lSubArray[$lSubArray[0] + 1]
	Return $lSubArray
EndFunc   ;==>GetEnemiesWithinRange
To be honest it kind of seems like an over complicated way to go about it. Typically I just compare the distance between myself and the nearest enemy to enable the Fight loop and that works almost flawlessly since you can specify compass range to fight from which means you arent off running about the place.

Now I am not sure because I have never used the AgentArray like that, but I think GetMaxAgents into ComputeDistance would provide a better result. So maybe run the Kill loop to find an enemy within distance, get to the enemy, then run a check on all agents within 1450 range (I think thats compass? Maybe its 1250) and add it to the EnemiesToBeKilled or whatever you want to call it.

I have this function from a Kilroy bot that I use quite often now - all credits to whoever wrote it since I did not! It seems you could probably rework it for what you need by adding in the Counts/Range.

Code:
Func GetNearestPriority($lPriority)
   Local $lNearestAgent = 0, $lNearestDistance = 100000000
   Local $lDistance, $lAgentToCompare
   Local $aAgent = GetAgentByID(-2)

   For $i = 1 To GetMaxAgents()
	  $lAgentToCompare = GetAgentByID($i)
	  If DllStructGetData($lAgentToCompare, 'HP') < 0.005 Or DllStructGetData($lAgentToCompare, 'Allegiance') <> 0x3 Or DllStructGetData($lAgentToCompare, 'Type') <> 0xDB Or GetAgentName($lAgentToCompare) <> $lPriority Then ContinueLoop

	  $lDistance = (DllStructGetData($aAgent, 'X') - DllStructGetData($lAgentToCompare, 'X')) ^ 2 + (DllStructGetData($aAgent, 'Y') - DllStructGetData($lAgentToCompare, 'Y')) ^ 2
	  If $lDistance < $lNearestDistance Then
		 $lNearestAgent = $lAgentToCompare
		 $lNearestDistance = $lDistance
	  EndIf
   Next
   Return $lNearestAgent
EndFunc   ;==>GetNearestPriority
Underavelvetmoon is offline  
Old 08/19/2018, 05:23   #32
 
elite*gold: 0
Join Date: Aug 2018
Posts: 2
Received Thanks: 0
Perhaps I'm out my depth but I'll ask anyway.. How do I get my gw to run these bots? Or is this the wrong place to ask?
CrucifierDemon is offline  
Old 08/19/2018, 07:59   #33
 
elite*gold: 0
Join Date: Sep 2014
Posts: 339
Received Thanks: 115
1) Google AutoIt and download the latest version
2) Optional (Recommended) Download the scite editor and use this as default from the same link you found above..
3) you can right click the bot files and select edit with scite once the other steps are done and familiar-rise yourself with the scripts especially the #include lines usually at the top
(these lines will clue you in on what other files you should have in the bot directory)
4) download the latest gwa2.au3 and gwa2_headers.au3 files (use search the guild wars section or find link) --- some bot listers include this with there bots and you may be able to use this with bots that don't include these needed files by just copying them to the bot directory that needs them

5) select tools and run to execute the bot script -- have fun - read as much as you can in the forum so you learn the ins and outs of the autoit scripting language

6) the only dumb questions are the ones not asked
phat34 is offline  
Thanks
2 Users
Old 08/28/2018, 19:23   #34
 
elite*gold: 0
Join Date: Aug 2014
Posts: 6
Received Thanks: 1
Someone gave me this script for ToC shard farming it injects and runs the gui is nice clean and has a option for patheon bonus aswell as multi options for selling to merch and what type of items to pickup BUT it doesnt actualy make it to the farm casts sf dwarven and dark escape then waits a few seconds runs halfway to toc stops to cast shroud gets stuck and dies IF you manage to make it past that it stops at the start of toc and dies.. i have pretty much 0 exp at fixing/wrighting bots but figured it would be a nice add to the collection here if someone can fix it. PS i thought about taking the combat/run part of the most updated original script for toc and copy/paste it but im not sure how that would play out. i added the script with the gwa2 file i was givin for it all is open source
Attached Files
File Type: rar Toc.rar (39.3 KB, 13 views)
turtlelover1 is offline  
Thanks
1 User
Old 08/31/2018, 11:51   #35
 
elite*gold: 0
Join Date: Aug 2018
Posts: 8
Received Thanks: 8
Hey guys, i'm completly new to coding and would like to add use / check for cons to bot lux / kurz while the event is live

Is there a way to do so ?

thanks in advance
greetings
TrustMeI'mAnEngineer is offline  
Old 09/19/2018, 22:24   #36
 
elite*gold: 0
Join Date: Jul 2014
Posts: 41
Received Thanks: 3
How can i get skill ids and how do i check if a adrenalin skill is charged for use?
OuttaControlX is offline  
Old 12/14/2018, 17:29   #37
 
elite*gold: 0
Join Date: Feb 2014
Posts: 180
Received Thanks: 335
Does anyone have the Buff_Effect_ID's for Pcons? I am trying to pop more Pcons during a run but I do not want to use a timer. I would like to try to simply use the below like when using Skill_Effect_ID's:

Code:
Global $Pcon_Cupcake = ????

If GetChecked($UseCupcake) and GetEffectTimeRemaining($Pcon_Cupcake) > = 0 Then
UseCupcake()
EndIf
Any help is appreciated...Savsuds? Velvetmoon? Ralle? Tekka? TeamGR? TeamAwesome?
RiflemanX is offline  
Old 12/15/2018, 00:43   #38
 
elite*gold: 0
Join Date: Apr 2018
Posts: 25
Received Thanks: 10
I think 1945 is the value you need there.

1945 - Cupcakes
2649 - Pumpkin Pie
3174 - War Supplies
2604 - Candy Corn
2605 - Apple
1934 - Golden Egg

Those are the cons i have in my bags atm and could verify, hope this help.
OneStrangeGuy is offline  
Thanks
1 User
Old 12/17/2018, 00:13   #39
 
elite*gold: 0
Join Date: Feb 2014
Posts: 180
Received Thanks: 335
Quote:
Originally Posted by OneStrangeGuy View Post
I think 1945 is the value you need there.

1945 - Cupcakes
2649 - Pumpkin Pie
3174 - War Supplies
2604 - Candy Corn
2605 - Apple
1934 - Golden Egg

Those are the cons i have in my bags atm and could verify, hope this help.
Ok, Excellent, that worked, thanks!
RiflemanX is offline  
Old 12/17/2018, 23:20   #40
 
elite*gold: 0
Join Date: Mar 2008
Posts: 54
Received Thanks: 3
Heya,

is it possible to start tengu farm without doing WoC Quests? Via Dialogs or smth? Just like Keirans Bow for War Supply?
lasse1993 is offline  
Old 12/19/2018, 08:24   #41
 
elite*gold: 0
Join Date: Feb 2014
Posts: 180
Received Thanks: 335
Quote:
Originally Posted by lasse1993 View Post
Heya,

is it possible to start tengu farm without doing WoC Quests? Via Dialogs or smth? Just like Keirans Bow for War Supply?
No, its not possible. Sorry. You will have to do the quest-line up to that point.
RiflemanX is offline  
Old 01/02/2019, 05:01   #42
 
elite*gold: 0
Join Date: Mar 2008
Posts: 54
Received Thanks: 3
And how to get the BuffID of several buffs? (e.g. "I am the Strongest")

Can someone please share me the GWAPI Constants.au3 file so i can check for those BuffID's ?

Anyone got an idea how i can check if target was already hit by a lead/offhand/double attack so i can let it continue the chain propperly?

Wasn't there a function to open the chest from far in outposts? Just like Toolbox does with '/chest' ?
lasse1993 is offline  
Old 01/02/2019, 08:20   #43
 
elite*gold: 0
Join Date: Feb 2014
Posts: 180
Received Thanks: 335
Quote:
Originally Posted by lasse1993 View Post
Anyone got an idea how i can check if target was already hit by a lead/offhand/double attack ?
And how to get the BuffID of several buffs? (e.g. "I am the Strongest")
Buff ID: I AM THE STRONGEST!=2355

To find a skill ID (buff ID) take a look at the constants.au3 in gwapi.
RiflemanX is offline  
Thanks
1 User
Old 01/04/2019, 08:08   #44
 
elite*gold: 0
Join Date: Sep 2014
Posts: 339
Received Thanks: 115
Cool

Here is the file your asking forů.
Attached Files
File Type: zip constants.zip (30.9 KB, 17 views)
phat34 is offline  
Thanks
1 User
Old 02/13/2019, 21:32   #45
 
elite*gold: 0
Join Date: Aug 2017
Posts: 115
Received Thanks: 171
Hello guys,

I'm running into some problems with these functions. When I use the HasEffect(1043) (SkillID from the skill "Rush" which I found while using "Rush" and watching in the Effects/Buffs). The function HasEffect seems to ALWAYS return False (tested with various Effects & Buffs), it always returns False. I'm not able to manage to find why it is going so wrong. I'm hopping that someone can help me.

Code:
;~ Description: Returns time remaining before an effect expires, in milliseconds.
Func GetEffectTimeRemaining($aEffect)
	If Not IsDllStruct($aEffect) Then $aEffect = GetEffect($aEffect)
	If IsArray($aEffect) Then Return 0
	Return DllStructGetData($aEffect, 'Duration') * 1000 - (GetSkillTimer() - DllStructGetData($aEffect, 'TimeStamp'))
EndFunc   ;==>GetEffectTimeRemaining
Code:
;Pass skill ID, returns True if you're under the effect
Func HasEffect($Effect)
	If IsDllStruct($Effect) = 0 Then $Effect = GetSkillByID($Effect)
	If DllStructGetData(GetEffect($Effect), 'SkillID') < 1 Then ; If you're not under effect
		Return False
	Else
		Return True
	EndIf
EndFunc   ;==>HasEffect
Code:
;~ Description: Returns effect struct or array of effects.
Func GetEffect($aSkillID = 0, $aHeroNumber = 0)
	Local $lEffectCount, $lEffectStructAddress
	Local $lReturnArray[1] = [0]

	Local $lOffset[4]
	$lOffset[0] = 0
	$lOffset[1] = 0x18
	$lOffset[2] = 0x2C
	$lOffset[3] = 0x510
	Local $lCount = MemoryReadPtr($mBasePointer, $lOffset)
	ReDim $lOffset[5]
	$lOffset[3] = 0x508
	Local $lBuffer
	For $i = 0 To $lCount[1] - 1
		$lOffset[4] = 0x24 * $i
		$lBuffer = MemoryReadPtr($mBasePointer, $lOffset)
		If $lBuffer[1] == GetHeroID($aHeroNumber) Then
			$lOffset[4] = 0x1C + 0x24 * $i
			$lEffectCount = MemoryReadPtr($mBasePointer, $lOffset)
			ReDim $lOffset[6]
			$lOffset[4] = 0x14 + 0x24 * $i
			$lOffset[5] = 0
			$lEffectStructAddress = MemoryReadPtr($mBasePointer, $lOffset)

			If $aSkillID = 0 Then
				ReDim $lReturnArray[$lEffectCount[1] + 1]
				$lReturnArray[0] = $lEffectCount[1]

				For $i = 0 To $lEffectCount[1] - 1
					$lReturnArray[$i + 1] = DllStructCreate('long SkillId;long EffectType;long EffectId;long AgentId;float Duration;long TimeStamp')
					$lEffectStructAddress[1] = $lEffectStructAddress[0] + 24 * $i
					DllCall($mKernelHandle, 'int', 'ReadProcessMemory', 'int', $mGWProcHandle, 'int', $lEffectStructAddress[1], 'ptr', DllStructGetPtr($lReturnArray[$i + 1]), 'int', 24, 'int', '')
				Next

				ExitLoop
			Else
				Local $lReturn = DllStructCreate('long SkillId;long EffectType;long EffectId;long AgentId;float Duration;long TimeStamp')

				For $i = 0 To $lEffectCount[1] - 1
					DllCall($mKernelHandle, 'int', 'ReadProcessMemory', 'int', $mGWProcHandle, 'int', $lEffectStructAddress[0] + 24 * $i, 'ptr', DllStructGetPtr($lReturn), 'int', 24, 'int', '')
					If DllStructGetData($lReturn, 'SkillID') = $aSkillID Then Return $lReturn
				Next
			EndIf
		EndIf
	Next
	Return $lReturnArray
EndFunc   ;==>GetEffect
I'm Searching for a solution to make the bot check if i'm under a specific effect (like Dash or Shadow Form,....). Can someone help me pls ?
maril15 is offline  
Reply

« UW Heroway!!! | - »

Similar Threads Similar Threads
Hello guys, i got hacked and gm didnt help me :( so i ask for help here
12/22/2009 - Kal Online - 25 Replies
Hello guys, i got hacked 7 days ago, i sent a c/s to gms connected my id card, they told me twrite back after 7 days... GM Reply Hello. This is Kalonline. We checked over your report and blocked hackers.
HELP! I need help scripting
02/06/2007 - Conquer Online 2 - 1 Replies
OK, I want to know how u ppl do it&#33; I what program do u use to make them? cause i wanna help but i dun know how... somone plz reply&#33;
L2Walker, scripting questions/help
12/13/2006 - Lineage 2 - 0 Replies
Hey, just asking a few questions hope you don&#39;t mind ^_^ I&#39;m looking to make a script so when I cast magic on something, the walker bot will cast, say Wind Strike, on the same thing, at the same time. I&#39;ve looked through the options in walker and have it setup now, but it doesn&#39;t cast at the same time, but when I&#39;ve finished casting. If this isn&#39;t possible, last time I checked Walker scripts could not pickup what was said in chat, is this still the case? Thanks. ^_^ Note: If you...
I need help scripting
09/05/2006 - General Coding - 0 Replies
Ok I am tired of leeching I am ready to try my hand at scripting but I dont know where to start and I was wondering if someone could help me get started or tell me a website that can help me learn so I can make my own hacks and contribute to the epvp community that we all love :D



All times are GMT +1. The time now is 06:42.


Powered by vBulletin®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2021 elitepvpers All Rights Reserved.