Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 01:07

  • 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 09/08/2019, 21:24   #136
 
Coaxx123's Avatar
 
elite*gold: 0
Join Date: Mar 2019
Posts: 133
Received Thanks: 42
So I need to wait for an enemy group to be out of range so that I can run past them, I'm trying to write as much as I can myself, and want to know if this is a) Right? and b) The best way to do it?

Code:
Func ClearWay()
	
	Local $nAgent = 44
	Local $nTarget = TargetNearestEnemy()
	$aDistance = GetDistance($nAgent, $nTarget)
	
	Do
	  Sleep(100)
	Until $aDistance >= 3200

;~Managed to find the distance between
;~target on bot dev and 3200 seems not to little and not to much
	
EndFunc
Coaxx123 is offline  
Old 09/08/2019, 22:38   #137
 
elite*gold: 0
Join Date: Jul 2011
Posts: 145
Received Thanks: 78
Quote:
Originally Posted by Coaxx123 View Post
So I need to wait for an enemy group to be out of range so that I can run past them, I'm trying to write as much as I can myself, and want to know if this is a) Right? and b) The best way to do it?

Code:
Func ClearWay()
	
	Local $nAgent = 44
	Local $nTarget = TargetNearestEnemy()
	$aDistance = GetDistance($nAgent, $nTarget)
	
	Do
	  Sleep(100)
	Until $aDistance >= 3200

;~Managed to find the distance between
;~target on bot dev and 3200 seems not to little and not to much
	
EndFunc
A few thoughts on this:

To get GWA2' GetDistance() working, both parameters have to be agents (except for when you use -1 and -2, this gets resolved to agents by the function. -2 is your character's agent, -1 it's current target).
Another problem is, that your distance will be only calculated once because you call it only once, and not update every iteration.

My solution would be this(not tested!):

Code:
Func ClearWay()
	
	
	Do
	  Sleep(500)
	Until GetDistance(-2, GetNearestEnemyToAgent(-2)) >= 3200

;~Managed to find the distance between
;~target on bot dev and 3200 seems not to little and not to much
	
EndFunc
Every iteration it updtes the distance and the nearest enemy. And Sleep(500) is enough
n0futur3 is offline  
Thanks
1 User
Old 09/09/2019, 05:56   #138
 
Coaxx123's Avatar
 
elite*gold: 0
Join Date: Mar 2019
Posts: 133
Received Thanks: 42
Right gotcha, was a bit confused by the -2 bits etc, so is that true for a lot of the functions in gwa2 that require an agent and target?

Thanks a lot for your help and explanation

Is there a way to run a function on its own for testing purposes?
Coaxx123 is offline  
Old 09/09/2019, 13:13   #139
 
elite*gold: 0
Join Date: Jul 2011
Posts: 145
Received Thanks: 78
Quote:
Originally Posted by Coaxx123 View Post
Right gotcha, was a bit confused by the -2 bits etc, so is that true for a lot of the functions in gwa2 that require an agent and target?

Thanks a lot for your help and explanation

Is there a way to run a function on its own for testing purposes?
Yes, using -1 and -2 for your target/yourself instead of finding the agents manually usually works, but to be sure have a look at the gwa2 source.

Just make a new au3 file, initialize with your charname, and then call the function.
n0futur3 is offline  
Old 09/09/2019, 18:41   #140
 
elite*gold: 0
Join Date: Jan 2013
Posts: 10
Received Thanks: 5
Does anyone have any idea on how to detect if the currentTarget ( enemy ) was hit by a lead attack / off-hand attack or dual attack ?

I'm trying to make fight engines for current Meta builds - Assassin (Wota )is next.
Yoddies is offline  
Old 09/09/2019, 21:20   #141
 
elite*gold: 0
Join Date: Jan 2019
Posts: 53
Received Thanks: 23
Quote:
Originally Posted by Yoddies View Post
Does anyone have any idea on how to detect if the currentTarget ( enemy ) was hit by a lead attack / off-hand attack or dual attack ?

I'm trying to make fight engines for current Meta builds - Assassin (Wota )is next.
This is what I use
Code:
func canUseCombo($skill, $target)
	if not isDllStruct($target) then $target = getAgentByID($target)
	if not isDllStruct($skill) then $skill = getSkillById($skill)
	switch dllStructGetData($skill, "comboReq")
		case 1
			return dllStructGetData($target, "laststrike") = 3
		case 2
			return dllStructGetData($target, "laststrike") = 1
		case 4
			return dllStructGetData($target, "laststrike") = 2
	endSwitch
	return true
endFunc
FriendlyFarmer is offline  
Thanks
1 User
Old 09/12/2019, 22:30   #142
 
elite*gold: 0
Join Date: Aug 2017
Posts: 118
Received Thanks: 180
Quote:
Originally Posted by havochavoc2 View Post
Does someone know how to target your pet? The only way I can come up with is just scanning the agents for the ModelID, can't seem to get GetAgentName to work with pets.
This is what i'm using for OmniFarmer_Presearing (unreleased version for now).

Code:
Func RangerPet_present() ;Check if a ranger s pet is present in the party Return True if yes, or False if not
;Pet will be targeted if found
	Local $Primary = GetAgentPrimaryProfession(-2)
    Local $Secondary = GetAgentSecondaryProfession(-2)
	
;	Local $Target
	Local $lAgent
	Local $i
	
	If (($Primary == 2) OR ($Secondary == 2)) Then ;If is a ranger R/... or .../R
		For $i = 1 To GetMaxAgents()
			$lAgent = GetAgentByID($i)
			If isRangerPet($lAgent) Then
				Return True	
			EndIf
		Next
	EndIf
	
	Return False
EndFunc

Func isRangerPet($lAgent) ;Check if Agent is a pet based on the Agent struct Returns True or False
	Local $Allegiance = DllStructGetData($lAgent, 'Allegiance')
    Local $lAgentMID = DllStructGetData($lAgent, 'PlayerNumber')
    Local $AgentTeam = DllStructGetData($lAgent, "Team")
    
    If (($Allegiance == 4) AND ($AgentTeam == DllStructGetData(-2, "Team"))) Then
        Switch $lAgentMID
            Case 1339 ;Strider (Moa Bird)
                Return True
            Case 1342 ;Wolf
                Return True
            Case 1344 ;Warthog (Pig)
                Return True
            Case 1348 ;Black Bear
                Return True
            Case 1364 ;Melandru s Stalker
                Return True
            Case Else
                Return False
        EndSwitch
    EndIf
EndFunc
maril15 is offline  
Thanks
1 User
Old 09/19/2019, 21:49   #143
 
elite*gold: 0
Join Date: Jan 2013
Posts: 10
Received Thanks: 5
Hey Guys - Another fun question: Does anyone have a function to check if a character has a given skill unlocked ?

Backstory: I'm looking at creating a script to automate Legendary skill hunter

And to further this.. Is a list of elite skill ID's available anywhere ?

Thanks!
Yoddies is offline  
Old 09/19/2019, 23:58   #144
 
elite*gold: 0
Join Date: Aug 2017
Posts: 118
Received Thanks: 180
Quote:
Originally Posted by Yoddies View Post
Hey Guys - Another fun question: Does anyone have a function to check if a character has a given skill unlocked ?

Backstory: I'm looking at creating a script to automate Legendary skill hunter

And to further this.. Is a list of elite skill ID's available anywhere ?

Thanks!
You can find a list of ALL skills IDs in my PreFarmer Bot but you're going to have to dig in the API to find them.
maril15 is offline  
Thanks
1 User
Old 09/20/2019, 12:46   #145
 
elite*gold: 0
Join Date: Sep 2017
Posts: 11
Received Thanks: 5
Quote:
Originally Posted by maril15 View Post
This is what i'm using for OmniFarmer_Presearing (unreleased version for now).

Code:
Func RangerPet_present() ;Check if a ranger s pet is present in the party Return True if yes, or False if not
;Pet will be targeted if found
	Local $Primary = GetAgentPrimaryProfession(-2)
    Local $Secondary = GetAgentSecondaryProfession(-2)
	
;	Local $Target
	Local $lAgent
	Local $i
	
	If (($Primary == 2) OR ($Secondary == 2)) Then ;If is a ranger R/... or .../R
		For $i = 1 To GetMaxAgents()
			$lAgent = GetAgentByID($i)
			If isRangerPet($lAgent) Then
				Return True	
			EndIf
		Next
	EndIf
	
	Return False
EndFunc

Func isRangerPet($lAgent) ;Check if Agent is a pet based on the Agent struct Returns True or False
	Local $Allegiance = DllStructGetData($lAgent, 'Allegiance')
    Local $lAgentMID = DllStructGetData($lAgent, 'PlayerNumber')
    Local $AgentTeam = DllStructGetData($lAgent, "Team")
    
    If (($Allegiance == 4) AND ($AgentTeam == DllStructGetData(-2, "Team"))) Then
        Switch $lAgentMID
            Case 1339 ;Strider (Moa Bird)
                Return True
            Case 1342 ;Wolf
                Return True
            Case 1344 ;Warthog (Pig)
                Return True
            Case 1348 ;Black Bear
                Return True
            Case 1364 ;Melandru s Stalker
                Return True
            Case Else
                Return False
        EndSwitch
    EndIf
EndFunc
I found that a simple GetAgentByName() works prety well.
havochavoc2 is offline  
Thanks
1 User
Old 09/20/2019, 14:58   #146
 
elite*gold: 0
Join Date: Aug 2017
Posts: 118
Received Thanks: 180
Quote:
Originally Posted by havochavoc2 View Post
I found that a simple GetAgentByName() works prety well.
What function are you using? Because getAgentByname while search for a specific name like "Pet-Maril15" but not for "Pet-Doods" because they don't have the same name?
Or do you split the string or something?
maril15 is offline  
Old 09/21/2019, 17:47   #147
 
phat34's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 354
Received Thanks: 120
Cool sup bro....

Quote:
Originally Posted by Yoddies View Post
Hey Guys - Another fun question: Does anyone have a function to check if a character has a given skill unlocked ?

Backstory: I'm looking at creating a script to automate Legendary skill hunter

And to further this.. Is a list of elite skill ID's available anywhere ?

Thanks!
A functional way to test is possible but:

This can be complex because equipping a skill requires you to be in a guildhall, town or outpost and actually using the skill would require you to be in an instance... So a functional way of testing if one has a skill that has been equipped and proceeding to an instance to test by casting and then using func IsRecharged() right after or some other way of testing if the skill has been cast such as haseffect() to determine if the skill is even equipped.

I will look through my code to see if there is a function or way to determine if a skill is unlocked... but even if there is you would then be looking way for a way to attain the said skill from a skill trainer or priest in GTOB, would you not?
phat34 is offline  
Old 09/22/2019, 00:47   #148
 
elite*gold: 0
Join Date: Jan 2013
Posts: 10
Received Thanks: 5
Quote:
Originally Posted by phat34 View Post
This can be complex because equipping a skill requires you to be in a guildhall, town or outpost and actually using the skill would require you to be in an instance... So a functional way of testing if one has a skill that has been equipped and proceeding to an instance to test by casting and then using func IsRecharged() right after or some other way of testing if the skill has been cast such as haseffect() to determine if the skill is even equipped.

I will look through my code to see if there is a function or way to determine if a skill is unlocked... but even if there is you would then be looking way for a way to attain the said skill from a skill trainer or priest in GTOB, would you not?
Sorry - i used the wrong wording, with "unlocked" i meant if the character already has captured the elite skill ( as in, from boss or with Tome, not unlocked with factions)

I imagine the flow of things to be something like:
1. switchSecondary profession
2. in a town Check if skill (using skill_id from Maril ) is present or not
3. if not, travel to boss location and capture ( if outpost is unlocked )
[optional] - Go buy signet of capture at skilltrader

All skills / bosses / closest outpost to boss / path to boss would be in different lists and called accordingly.

The 2 hard parts are:
1. Checking if skill is already capped or not
2. Navigating the "skill capture" window after the boss dies

The last annoyance is Prophecies where bosses spawn randomly.. but that'll be a worry for later.
Yoddies is offline  
Old 09/22/2019, 12:24   #149
 
phat34's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 354
Received Thanks: 120
ok... good plan! I will examine the 2 hard parts since I already have a boss tracker/hunt down script.
phat34 is offline  
Old 09/27/2019, 05:25   #150
 
elite*gold: 0
Join Date: Jul 2019
Posts: 103
Received Thanks: 83
It might be something obvious that I missed but is there a way to check if a agent is in a cinematic? I see there is a SkipCinematic() function.
list comprehension is offline  
Reply


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! I what program do u use to make them? cause i wanna help but i dun know how... somone plz reply!
L2Walker, scripting questions/help
12/13/2006 - Lineage 2 - 0 Replies
Hey, just asking a few questions hope you don't mind ^_^ I'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've looked through the options in walker and have it setup now, but it doesn't cast at the same time, but when I've finished casting. If this isn'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 +2. The time now is 01:07.


Powered by vBulletin®
Copyright ©2000 - 2024, 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.

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