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

08/17/2019 19:40 FriendlyFarmer#121
Quote:
Originally Posted by phat34 View Post
Ok well... it has been almost since I started this thread that I myself has asked for help... but, I have ran into a strange problem that no one seems to know about. For some reason, my client crashes when running a bot, when I try to flag my heroes??????? Is anyone else having this problem... Or is it just me?

Let me know if anyone has a solution, or has any idea what might be causing this?
Do you mean when you manually flag heroes, instead of having the bot do it? Ive had the same problem for a long time now, even from way before they added keybinds for hero 4-7.
08/18/2019 04:14 phat34#122
yes. the bot functions work fine... it is just when you try to manually flag heroes through the regular game interface that the client crashed. I have a different api that I am comparing now to see if I can spot the problem. but my gwa2 versions are flawed with this problem.
08/19/2019 08:45 mhaendler#123
Quote:
Originally Posted by CoderAndy View Post
hey guys is there a way to find out how much adrenaline you have like the GetEnergy(-2) ? i'm trying to use an adrenaline skill only when i have the req adrenaline for the skill but can't make it work it still try's to use it without adrenaline, any example on how to do it will be helpful thx.
Checkout the Kilroy Bot on how to work with / check adrenaline.

Additional you can check the function:

"GetSkillbar()" in your GWA2 File

Greetings
mhaendler
08/20/2019 18:30 FriendlyFarmer#124
Code:
Func HasAdrenalineFor($skillNumber)
	local $skillbar = getSkillbar()
	local $skill = getSkillById(dllStructGetData($skillbar, "id" & $skillNumber))
	local $adrenalineCost = dllStructGetData($skill, "adrenaline")

	if $adrenalineCost <= dllStructGetData($skillbar, "adrenalineA" & $skillNumber) then return True
EndFunc
This should work, enjoy
08/21/2019 04:30 phat34#125
In addition Andy, you can simply use the out(dllStructGetData($skillbar, "adrenalineA" & $skillNumber)) to print out the constant monitoring of you skill adrenaline to monitor how it charges number wise...
08/25/2019 23:16 Bibopp#126
Changelog V1.1 :
- GUI Update : Runs , Loots
- Change of course and better survivability.
still work to improve efficiency..

Changelog V1.2 :
- Detects if there is EOE < 5s otherwise paradox
- TP if blocked
- Selected the Dabi margo as a priority
- Tp on dabi to Big kill
- If not enough enemies back town
- Stable run 5 hour

A few more fails but it’s better ( Margo Tuk)
The change of weapon does not work (problem to repair)
I left the debug and some useful functions for those who still want the upgrade
Player: OgcTcZ/8ZiHRn5AKukmE35uU4AA , Hero: OwIU0wHDFrGyTkOMepEAAA6A[/QUOTE]
08/30/2019 06:54 list comprehension#127
I noticed in some old posts that when picking up loot you can filter by a variety of things with modelid being the most common from the item struct. I saw in a post a general type for weapon rather than specific id.
Example:
Quote:
#Region Swords
Global Const $TYPE_Sword = 27
Global Const $ITEM_ID_DragonSword = 402
Global Const $ITEM_ID_LongSword = 412
Global Const $ITEM_ID_Spatha = 419
Global Const $ITEM_ID_CelestialSword = 790
Global Const $ITEM_ID_WickedSword = 792
Global Const $ITEM_ID_GoldenPhoenixBlade = 795
Global Const $ITEM_ID_SunquaBlade = 797
Global Const $ITEM_ID_ZodiacSword = 1043
Global Const $ITEM_ID_Gladius = 1194
Global Const $ITEM_ID_JadeSword = 1322
Global Const $ITEM_ID_DesolationSword = 1554
Global Const $ITEM_ID_DragonSword2 = 1612
Global Const $ITEM_ID_LesserHighlanderBlade = 2107
Global Const $ITEM_ID_GreaterHighlanderBlade = 2108
Global Const $ITEM_ID_MammothBlade = 2127
Global Const $ITEM_ID_SteelBroadsword = 2128
Global Const $ITEM_ID_PlatinumBroadsword = 2129
Global Const $ITEM_ID_Flamberge = 2250
Global Const $ITEM_ID_RunicBlade = 2306
Global Const $ITEM_ID_HighlanderBlade = 2307
#EndRegion Swords
At the very top there is Global Const $TYPE_Sword = 27. What would be the preferred way to filter all swords using this information from the dllstructgetdata method? This would be used in a pickuploot filter.

Thank you in advanced.
08/30/2019 14:03 oneshout#128
Quote:
Originally Posted by CoderAndy View Post
Code:
Func CanPickUp($aItem)
	Local $t = DllStructGetData($aItem, 'Type')
	If $t = 27 Then
	     Return False
	Else
	     Return True
	EndIf
EndFunc
It will be better to do a CustomCanpickUp function , no ? (just to be understandable and to not disable the original function in GWA2)... just a question...
08/30/2019 15:15 oneshout#129
Quote:
Originally Posted by CoderAndy View Post
i just wrote what he asked man as an example, i don't rly care what it will be better for him or what not, better to experiment too so he can learn more,

sorry no offence right now but lately the bots that ppl upload and read them not using them, i just reading them out of curiosity is just hack jobs, copy/paste and the amount of bloating the script with unnecessary funcs is just insane, don't know maybe i'm just a perfectionist but srsly most of the coding just sucks.
don't worry, no problem ;) my mind is open and it's difficult to offense me...i'm learning too so i was wondering what is better or not...It's just that, i don't like to altered the original GWA2.
08/30/2019 17:49 list comprehension#130
Quote:
Originally Posted by CoderAndy View Post
i just wrote what he asked man as an example, i don't rly care what it will be better for him or what not, better to experiment too so he can learn more,

sorry no offence right now but lately the bots that ppl upload and read them not using them, i just reading them out of curiosity is just hack jobs, copy/paste and the amount of bloating the script with unnecessary funcs is just insane, don't know maybe i'm just a perfectionist but srsly most of the coding just sucks.
That was a perfect example. I fully know what you mean about the public code out there. I played around with a few of them and so many doubled up function calls. Literal NOP functions that previously did something but are empty and now only exist to keep a function call that can be removed.

Same thing with the endless nested ifs where a loop with a array or even a hash table would make for far more readable code to iterate through models for example.

I am glad people are releasing stuff but it is highly C&P. I think I can recognize you from GR long time ago btw.
08/31/2019 19:05 phat34#131
Lets make up a whole bunch of new names and re-disguise ourselves just a bit more...jaja lmao
09/04/2019 17:27 havochavoc2#132
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.
09/04/2019 19:37 list comprehension#133
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.
I haven't messed with this directly but a few thoughts on how to go about it or get on the right track. One idea would be to check if you must prepend "Pet - " on to the string of the name. It could also require "Pet # - " + Name.

If you are looping through all of the agents in the array you can at least test a few basic things to narrow your search. If you test for allegiance is 4 that means the agent is a pet, spirit, or minion. Then you could test if this agent is on the same team as your own player.

Code:
DllStructGetData($aAgentArray[$i], "Allegiance") == 4; pets/spirits/minions
DllStructGetData($aAgentArray[$i], "Team") == DllStructGetData(-2, "Team"); match team of yourself to agent array
From here if you can't match by name as I am not home to test it with the permutations previously presented then you could do it dirty by things like HP,level, model among other potential unique identifying marks for an agent.

Then you would set target to this agentid found. If none of these work maybe someone who has messed with pets more could chime in or it is possible that the api you are using doesn't fully support pets on this level.
09/07/2019 05:02 GW Devil#134
can someone make this work. I've tried & failed miserably
09/07/2019 10:14 jokai93#135
some news ?