The headers are accurate, are you trying to ONLY Salvage? or is there more functions to this? Post the entire script so we can take a look at it.
Simple, I press a button and call a function with:
Code:
$aitem = GetItemBySlot(1, 1)
StartSalvage($aitem)
it seems the StartSalvage goes trough but then the client crashes.
It seems I am missing something / not understanding how it (should) work, for now I just want to salvage items to get materials without any further logic.
Simple, I press a button and call a function with:
Code:
$aitem = GetItemBySlot(1, 1)
StartSalvage($aitem)
it seems the StartSalvage goes trough but then the client crashes.
It seems I am missing something / not understanding how it (should) work, for now I just want to salvage items to get materials without any further logic.
Try the following:
Code:
$aItem = GetItemBySlot(1, 1)
Local $lItemID = DllStructGetData($aItem, 'ID')
$itemStruct = GetItemByItemID($lItemID)
Local $lItemName = GetItemName($itemStruct)
If FindSalvageKit() <> 0 Then
StartSalvage($aItem)
EndIf
What it does is this checks for the availability of a salvage kit using FindSalvageKit().
If a salvage kit is found (indicated by FindSalvageKit() returning a non-zero value), it proceeds to call StartSalvage($aItem)
$aItem = GetItemBySlot(1, 1)
Local $lItemID = DllStructGetData($aItem, 'ID')
$itemStruct = GetItemByItemID($lItemID)
Local $lItemName = GetItemName($itemStruct)
If FindSalvageKit() <> 0 Then
StartSalvage($aItem)
EndIf
What it does is this checks for the availability of a salvage kit using FindSalvageKit().
If a salvage kit is found (indicated by FindSalvageKit() returning a non-zero value), it proceeds to call StartSalvage($aItem)
I tried that, still crashes. Is it maybe because I'm doing in the pre?
I had to change "Case 2992 to Case 2993", because in gwtoolbox it shows me as ID 2993.
Code:
;~ Description: Returns item ID of salvage kit in inventory.
Func FindSalvageKit()
Local $lItem
Local $lKit = 0
Local $lUses = 101
For $i = 1 To 16
For $j = 1 To DllStructGetData(GetBag($i), 'Slots')
$lItem = GetItemBySlot($i, $j)
Switch DllStructGetData($lItem, 'ModelID')
Case 2993
If DllStructGetData($lItem, 'Value') / 2 < $lUses Then
$lKit = DllStructGetData($lItem, 'ID')
$lUses = DllStructGetData($lItem, 'Value') / 2
EndIf
ContinueLoop
EndSwitch
Next
Next
Return $lKit
EndFunc ;==>FindSalvageKit
Code:
*--> Crash <--*
Exception: c0000005
Memory at address ffffffff could not be written
App: Gw.exe
BaseAddr: 00520000
ProgramId: 1
Build: 37325
When: 1/23/2024 21:39:54
Flags: 0
There needs to be a sleep between each salvage, you aren't trying to salvage multiple items rapidly are you? If you do this even normally without a script it will crash your game. So if you have a loop to search for an item and salvage, there needs to be a sleep called in that loop.
There needs to be a sleep between each salvage, you aren't trying to salvage multiple items rapidly are you? If you do this even normally without a script it will crash your game. So if you have a loop to search for an item and salvage, there needs to be a sleep called in that loop.
I replicated his issue and it's coming from elsewhere.
not using the sleep between salvage isn't what's causing that crash, although you are 100% right, it will cause another crash if he doesn't add it.
The issue so far I've traced it back to the Command SalvageFunction and SalvageGlobal.
I replicated his issue and it's coming from elsewhere.
not using the sleep between salvage isn't what's causing that crash, although you are 100% right, it will cause another crash if he doesn't add it.
The issue so far I've traced it back to the Command SalvageFunction and SalvageGlobal.
im trying like heck to figure out how to code this and im kinda **** at doing it anyway. (by kinda **** i mean the only thing i have coded myself so far is making my character run around day 2 of trying)
Essentially I'm using a dervish feather farm bot and i cant stand leaving behind unid'd blues (crazy i know) going through the code i have seen some of how looting works. this is what im seeing
lots of Global Const $model_id_blah blah blah
I believe this section is saying what can be picked up so i added
; === Armor ===
Global Const $model_id_sensali_Garb = 1156
Global Const $model_id_Sensali_crestguard = 1159
#EndRegion Constants
Further down im seeing can pick up and this is in it
Local $lRarity = GetRarity($lItem)
If ($lRarity == 2624) And ($PickUpGolds == True) Then Return True ; 2624 = golden Items
Return False
How do i make it get rarity on the sensali armors and pick up blues and purples as well?
beginner in private server programming 11/14/2014 - CO2 Private Server - 3 Replies Hello, I'm daniel and I'm a c# and vb.net programmer (well everything I write in a language i can manage and write it in the other language). I am not a professional since I am a self taught orgrammmer.
I've downloaded Redux source by pro4never and successfully ran the server. Well it was pretty easy to figure out how to add new npc and these basic stuff but for example when I go to the function or the procedure of writing the NPC I don't understand most of the code written inside them. In...
Beginner sucht Beginner 04/04/2014 - Starcraft 2 - 7 Replies Moinmoin,
Suche einen "Beginner", d.H erstmal gegen K.I üben, wenn man das nachher dann abgehakt hat, vllt mal gegen echte Spieler.
Zu mir: 17 Jahre alt, Headset vorhanden, im Moment viel Zeit.
Zu euch: Mindestens über 18 und Stimmlich bitte weit über 18...
Headset solltet ihr ein Funktionstüchtiges haben, zum quatschen und absprechen.
Könnt mich ja mal in Steam adden, oder eine PM an mich, dann gebe ich euch Battle.net ID und Code
Steam ID: DLIKP, habe ein Engelsbild