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

09/28/2019 22:25 sw4gdaddy#151
Yo, so im trying to detect mods in an item but it wont work im using this code:
Does it still work and im just doing it wrong and if it no longer works how would I go about fixing it?
09/29/2019 05:15 list comprehension#152
Quote:
Originally Posted by CoderAndy View Post
@[Only registered and activated users can see links. Click Here To Register...]

when you say an agent ? you mean someone in your party ? a second client that you already running from your computer or it is someone that is afk but in a different computer ?
the skip cinematic function just sends the packet to skip like pressing the button skip when you watch a cinematic video.
Agent as in the internal game structure for a local player on the local machine. I figured just like allegiance for an agent that lets you detect friendly vs enemy players there might be a state to check if a player is in a cinematic.

I am not seeing a struct to detect this already in gwapi and I figure I will just have to manually detect a cinematic in some form. In gw2 engine at least a cinematic actually set a flag on the agent so I will do some memory searches for it in gw1 to see if such a flag already exists or find another pattern to check for cinematic.

The goal is to detect a cinematic on a single bot account to skip a cinematic shaving off roughly 30 seconds a run. Right now I am just doing a sleep but I will dig further. The skipcinematic() works for it but its not always 100% predictable when a cinematic is happening and that packet causes a crash if you aren't actually in a cinematic.

One thought I had was to finish implementing Server to client packet hook to detect events and a few other useful things that would bring for my bots.
09/29/2019 13:00 sw4gdaddy#153
yo, thanks for the help but this doesnt seem to adress the issue, i dont think the way i had the check for the mod implemented is the problem, because if i change the check to something i know how to check e.g. rarity the bot properly stores the item only when i try to check for the highly salvageable mod it doesnt work. i still tried to change the code in the way you suggest but it doesnt work

this is the current check function but it again doesnt work(other criteria do work so im quite sure that the issue is the mod check).
do mod codes work for anyone here or do they need to be figured out again and if so how would i got about doing that?
09/29/2019 14:48 xiounaiw#154
Hey !

is this possible to talk to a NPC while having access to another one ?
example : i talk to NPC (A) but i have NPC (B) options available.

Thanks
09/29/2019 20:25 sw4gdaddy#155
thanks alot for the help andy it finally works although i do think you have a typo in the code you posted here but if i use the original check with this code "1F0208243E0432251D000826" (D instead of the last 5) it works
10/02/2019 19:31 Lander92#156
Hey,

I'm having a problem using my bots
When the SkipCinematic function is activated, I have a GW crash.
I suspect the GW_Hearders is not up to date and that would cause the crash.

Do you know of a function that can detect cinematics or how I could know the method to update my GW_Hearders.
10/02/2019 21:42 LamaChoco#157
Is there a way to check if an item is stackable ? Wasnt able to find
10/03/2019 00:44 mhaendler#158
Quote:
Originally Posted by LamaChoco View Post
Is there a way to check if an item is stackable ? Wasnt able to find
PHP Code:
Func isStackable($item)
    
Local $t DllStructGetData($item'Type')
    If 
$t Or $t 11 Or $t 18 Or $t 30 Or $t 31 Then Return True Usable Material Key Trophy(Feathered CrestGlacial Stoneetc) | Scroll
        
;add check for modelids with pcons?!
    Return 
False
EndFunc 
10/03/2019 00:57 LamaChoco#159
Quote:
Originally Posted by mhaendler View Post
PHP Code:
Func isStackable($item)
    
Local $t DllStructGetData($item'Type')
    If 
$t Or $t 11 Or $t 18 Or $t 30 Or $t 31 Then Return True Usable Material Key Trophy(Feathered CrestGlacial Stoneetc) | Scroll
        
;add check for modelids with pcons?!
    Return 
False
EndFunc 
Thanks, was hoping there was a property in DllStructGetData
Is there any way to know every property accessible via DllStructGetData() btw ?
10/03/2019 06:34 list comprehension#160
Quote:
Originally Posted by Lander92 View Post
Hey,

I'm having a problem using my bots
When the SkipCinematic function is activated, I have a GW crash.
I suspect the GW_Hearders is not up to date and that would cause the crash.

Do you know of a function that can detect cinematics or how I could know the method to update my GW_Hearders.
Quote:
Originally Posted by CoderAndy View Post
@[Only registered and activated users can see links. Click Here To Register...]

Code:
Func detectcinematic($aptr = getagentptr(-2))
   $ltypemap = memoryread($aptr + 344, "long")
   If BitAND($ltypemap, 4194304) OR $ltypemap = 0 Then
	  $cinematic = False
	  Return False
   Else
	  $cinematic = True
	  skipcinematic()
	  Return True
   EndIf
EndFunc

Func secureskipcinematic($adeadlock = 60000)
   Local $ldeadlock = TimerInit()
   While NOT detectcinematic()
	  Sleep(1000)
	  If TimerDiff($ldeadlock) > $adeadlock Then Return False
   WEnd
   skipcinematic()
   Do
	  Sleep(1000)
   Until NOT detectcinematic()
   Return True
EndFunc
Code:
;~ Description: Skip a cinematic.
Func SkipCinematic()
	Return SendPacket(0x4, 0x69)
EndFunc   ;==>SkipCinematic
10/04/2019 10:42 phenamenon#161
sell function broken, any help please ?

PHP Code:
    Func _sell()
        
Local $lbag$litem$lmod
        out
("Selling")
        For 
$j 1 To 4
            $lbag 
getbagptr($j)
            For 
$i 1 To memoryread($lbag 32"long")
                
$litem getitemptrbyslot($lbag$i)
                If 
$litem == 0 Then ContinueLoop
                
If memoryread($litem 24"ptr") <> 0 Then ContinueLoop
                
If memoryread($litem 36"short") <= 0 Then ContinueLoop
                
If memoryread($litem 76"byte") <> 0 Then ContinueLoop
                
Switch getrarity($litem)
                    Case 
2621
                    
Case 262326242626
                        
If NOT getisided($litemThen ContinueLoop
                    
Case Else
                        
ContinueLoop
                
EndSwitch
                Switch 
memoryread($litem 32"byte")
                    Case 
5
                        Local $lmodelid 
memoryread($litem 44"long")
                        If 
$lmodelid $modeid_breambelrecurve OR $lmodelid $modeid_breambellong OR $lmodelid $modeid_breambelshort OR $lmodelid $modeid_breambelflat OR $lmodelid $modeid_breambelhorn Then ContinueLoop
                    
Case 24
                        Local $lmod 
getdualmodshield($litem)
                        If 
$lmod <> False Then
                            Local $lmodelid 
memoryread($litem 44"long")
                            
Local $larr[] = [$lmodelidgetitemreq($litem), $lmod]
                            
sendsafepacket(prepare("drop"$larr))
                        EndIf
                        If 
getrarity($litem) = $rarity_gold AND memoryread($litem 20"long") = 5 Then ContinueLoop
                    
Case 10
                        
Switch memoryread($litem 34"short")
                            Case 
1012
                                ContinueLoop
                            
Case Else
                        EndSwitch
                    Case 
18
                        ContinueLoop
                    
Case 11
                        
If memoryread($litem 44"long") = 934 Then ContinueLoop
                    
Case 29
                        ContinueLoop
                    
Case 30
                        ContinueLoop
                    
Case Else
                EndSwitch
                
sellitem($litem)
                
Sleep(getping() + 500)
            
Next
        Next
    EndFunc 
10/04/2019 23:33 LamaChoco#162
Quote:
Originally Posted by phenamenon View Post
sell function broken, any help please ?

PHP Code:
    Func _sell()
        
Local $lbag$litem$lmod
        out
("Selling")
        For 
$j 1 To 4
            $lbag 
getbagptr($j)
            For 
$i 1 To memoryread($lbag 32"long")
                
$litem getitemptrbyslot($lbag$i)
                If 
$litem == 0 Then ContinueLoop
                
If memoryread($litem 24"ptr") <> 0 Then ContinueLoop
                
If memoryread($litem 36"short") <= 0 Then ContinueLoop
                
If memoryread($litem 76"byte") <> 0 Then ContinueLoop
                
Switch getrarity($litem)
                    Case 
2621
                    
Case 262326242626
                        
If NOT getisided($litemThen ContinueLoop
                    
Case Else
                        
ContinueLoop
                
EndSwitch
                Switch 
memoryread($litem 32"byte")
                    Case 
5
                        Local $lmodelid 
memoryread($litem 44"long")
                        If 
$lmodelid $modeid_breambelrecurve OR $lmodelid $modeid_breambellong OR $lmodelid $modeid_breambelshort OR $lmodelid $modeid_breambelflat OR $lmodelid $modeid_breambelhorn Then ContinueLoop
                    
Case 24
                        Local $lmod 
getdualmodshield($litem)
                        If 
$lmod <> False Then
                            Local $lmodelid 
memoryread($litem 44"long")
                            
Local $larr[] = [$lmodelidgetitemreq($litem), $lmod]
                            
sendsafepacket(prepare("drop"$larr))
                        EndIf
                        If 
getrarity($litem) = $rarity_gold AND memoryread($litem 20"long") = 5 Then ContinueLoop
                    
Case 10
                        
Switch memoryread($litem 34"short")
                            Case 
1012
                                ContinueLoop
                            
Case Else
                        EndSwitch
                    Case 
18
                        ContinueLoop
                    
Case 11
                        
If memoryread($litem 44"long") = 934 Then ContinueLoop
                    
Case 29
                        ContinueLoop
                    
Case 30
                        ContinueLoop
                    
Case Else
                EndSwitch
                
sellitem($litem)
                
Sleep(getping() + 500)
            
Next
        Next
    EndFunc 
What bot does this function come from ? Does it have another purpose other than selling all items in your bags ? If not then it is very overengined
10/05/2019 00:35 phenamenon#163
Quote:
Originally Posted by LamaChoco View Post
What bot does this function come from ? Does it have another purpose other than selling all items in your bags ? If not then it is very overengined
Dragonmoss, the plus in this bot it saves perfect and -1 from perfect shields to your storage.
10/08/2019 23:02 TrainSkill#164
Hi, first message on the forum! I'm looking for a way to trade copper Z coins with silver Z coins at the NPC in baltha temple. I tried the BuyItem function from GWA2 but i guess it works only with the merchant. Anyone has an idea about my problem ? :D :D
10/09/2019 13:18 n0futur3#165
Quote:
Originally Posted by TrainSkill View Post
Hi, first message on the forum! I'm looking for a way to trade copper Z coins with silver Z coins at the NPC in baltha temple. I tried the BuyItem function from GWA2 but i guess it works only with the merchant. Anyone has an idea about my problem ? :D :D
Log the packages send to the server when trading, then recreate these packages with the SendPackage method