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.
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
Func highsalvage($aItem)
Local $ModStruct = GetModStruct($aItem)
Local $MeasureForMeasure = StringInStr($ModStruct, "32000826", 0, 1)
If $MeasureForMeasure > 0 Then
Return True
Else
Return False
EndIf
Endfunc
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?
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
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.
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
@
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
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 2623, 2624, 2626
If NOT getisided($litem) Then 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[] = [$lmodelid, getitemreq($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 10, 12
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
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 2623, 2624, 2626
If NOT getisided($litem) Then 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[] = [$lmodelid, getitemreq($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 10, 12
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
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 ?
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 ?
Log the packages send to the server when trading, then recreate these packages with the SendPackage method
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