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

06/15/2018 20:30 DerMoench14#16
Lol ofc it doesn't work. You need to call the Function with the Player-ID (Agent-ID), not the Player-Struct :D
07/21/2018 16:44 ayyy_lmao#17
yo for this script im writing I need to check if the retards spawned but getagentarray sometimes isn't finding them even though they are in compass so I've tried gettingnpcnearestcoords/getagentnearcoords then I tried seeing the furthest distance of an agent in getagentarray and walk to it but it seems to only like signposts. Any one have clue on what range of agents should be in agentarray? Here was test thing
Code:
Func AutisticTest()
	  $Yo = GetAgentPtr(-2)
	local $aXcoordinate =  MemoryRead($Yo + 160, 'float')
	local $aYcoordinate =  MemoryRead($Yo + 164, 'float')
	local $lastAgentDistance = 0
	local $Furthestagent = 0
	Local $OnIndex = 0
	$nice = GetAgentArray()
		For $i = 1 To $nice[0]
			$OnIndex += 1
			$lAgentCoords = GetAgentXY($nice[$i])
			$currentAgentDistance = ComputeDistance($aXcoordinate, $aYcoordinate, $lAgentCoords[0], $lAgentCoords[1])
			Out($OnIndex & " " &$currentAgentDistance)
		If $currentAgentDistance > $lastAgentDistance and $currentAgentDistance > $Furthestagent Then
			$Furthestagent= $nice[$i]
		EndIf
		Next

$OutAgentPlayernumber = 	dllstructgetdata($Furthestagent, 'Playernumber')
Out($OutAgentPlayernumber & " " & $Furthestagent)
gotonpc($Furthestagent)
EndFunc
and here is the code for looking for spawn
Code:
Func LookForUglyAssRetards()

Local $AllAgentsArray = GetAgentArray()

	For $i = 1 To $AllAgentsArray[0]
		If DllStructGetData($AllAgentsArray[$i], 'PlayerNumber') == $1ModelId Then
			$DidTheySpawn = True
				return true
		EndIf
		If DllStructGetData($AllAgentsArray[$i], 'PlayerNumber') == $2ModelId  Then
			$DidTheySpawn = True
				return true
		EndIf

	Next
	$DidTheySpawn = False
	Return False
EndFunc
also im trying to use the event system to update some vars but Its not seeing "you pick up" "you droped" like those type of messages I looked at how tb handles the chat because I know they block some of the messages and it looks like TB goes through every packet of chat which is probably not possible with api im using anyone have idea?
07/28/2018 23:23 Underavelvetmoon#18
Quote:
Originally Posted by ayyy_lmao View Post
-snip-
I've always checked for agents using name, never fails for me.

Code:
         Local $NameToSearch = ""

	 TargetNearestAlly()
	 $lAgent = GetNearestNPCToCoords(xxxxxxxx)
	 $lName = GetAgentName($lAgent)

	 If $lName = $NameToSearch Then
		$bCanContinue = True
	 Else
		$bCanContinue = False
	 EndIf
If thats not what your looking for since you mentioned Coords, you could try GetAgentByName. That seems to cycle through Agents similar to how your trying to, and I use it for most Merchant functions, however it does not always work iirc.

If it is a unique agent maybe something like:

Code:
For $i = 1 To GetMaxAgents()
    $lAgent = GetAgentByID($i)
    $lName = GetAgentName($lAgent)
    If $lName = $NameToSearch Then ContinueLoop
Next

;~ Or

For $i = 1 To GetMaxAgents()
    If GetAgentExists(GetAgentByName($NameToSearch)) Then ContinueLoop
Next
Not too sure if that is of any help.
07/29/2018 09:49 rusco95#19
can anyone help me, there's alrdy a function to put the status offline/online?
07/31/2018 18:29 rusco95#20
Quote:
Originally Posted by smiley232 View Post
yes there is. if you use [Only registered and activated users can see links. Click Here To Register...] [Only registered and activated users can see links. Click Here To Register...] you can do:
Code:
;~ Description: Change online status. 0 = Offline, 1 = Online, 2 = Do not disturb, 3 = Away
SetPlayerStatus($iStatus)
ty alot! i didnt saw it!
08/01/2018 07:58 phat34#21
I was just about to copy you those functions... Let me know if that worked?

Code:
 #Region Online Status
 ;<-- change player status
 ;~ Description: Change online status. 0 = Offline, 1 = Online, 2 = Do not disturb, 3 = Away
 Func SetPlayerStatus($iStatus)
	If (($iStatus >= 0 And $iStatus <= 3) And (GetPlayerStatus() <> $iStatus)) Then
		DllStructSetData($mChangeStatus, 2, $iStatus)

		Enqueue($mChangeStatusPtr, 8)
		Return True
	Else
		Return False
	EndIf
EndFunc   ;==>SetPlayerStatus

Func GetPlayerStatus()
   	Return MemoryRead($mCurrentStatus)
 EndFunc   ;==>GetPlayerStatus
 ;<-- change player status
#EndRegion Online Status
08/01/2018 17:48 rusco95#22
Quote:
Originally Posted by phat34 View Post
I was just about to copy you those functions... Let me know if that worked?

Code:
 #Region Online Status
 ;<-- change player status
 ;~ Description: Change online status. 0 = Offline, 1 = Online, 2 = Do not disturb, 3 = Away
 Func SetPlayerStatus($iStatus)
	If (($iStatus >= 0 And $iStatus <= 3) And (GetPlayerStatus() <> $iStatus)) Then
		DllStructSetData($mChangeStatus, 2, $iStatus)

		Enqueue($mChangeStatusPtr, 8)
		Return True
	Else
		Return False
	EndIf
EndFunc   ;==>SetPlayerStatus

Func GetPlayerStatus()
   	Return MemoryRead($mCurrentStatus)
 EndFunc   ;==>GetPlayerStatus
 ;<-- change player status
#EndRegion Online Status
i got client crash while the bot is changing status
08/03/2018 17:45 rusco95#23
i dont know what im doing wrong.. didnt happen anything
08/03/2018 20:11 DerMoench14#24
Quote:
Originally Posted by rusco95 View Post
i dont know what im doing wrong.. didnt happen anything
Try this:

Code:
$mCurrentStatus = MemoryRead(GetScannedAddress('ScanChangeStatusFunction', 106))

SetValue('ChangeStatusFunction', '0x' & Hex(GetScannedAddress("ScanChangeStatusFunction", 74), 8))

_('ScanChangeStatusFunction:')
AddPattern('8D56088D4E3050')
08/03/2018 20:19 rusco95#25
Quote:
Originally Posted by DerMoench14 View Post
Try this:

Code:
$mCurrentStatus = MemoryRead(GetScannedAddress('ScanChangeStatusFunction', 106))

SetValue('ChangeStatusFunction', '0x' & Hex(GetScannedAddress("ScanChangeStatusFunction", 74), 8))

_('ScanChangeStatusFunction:')
AddPattern('8D56088D4E3050')
nothing again i think i will remove this func on my bots
ty all anyway:):mofo:
08/04/2018 08:39 phat34#26
You would probably have to to give him your asm for that function as well DerMonench14 as he is probably using the gwa2 that most people have migrated to,,,


...or maybe not... since the asm is so short...
08/07/2018 13:36 rusco95#27
yo guys, there's a way to open door in pre without been near the "lever"?
08/07/2018 18:53 ayyy_lmao#28
if you are kaos yeah if you are a meer mortal no
08/07/2018 23:10 phat34#29
Hmmm... perhaps try to dialog it.... let me know if that works...
08/09/2018 10:45 LordKillfox#30
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