Salvage Problems

05/13/2018 19:07 hironimo#1
Hi,

first of all thx to all in this Board helping to keep all the Bots working!!!

I have rewritten some Bots to do things i want but in this case have problems and i dont know why...

I tried to use the actual working Vaettire Bot not to sell the stuff he should Salvage the stuff cause i need materials.

This function I use to salvage the stuff but gw always crashes.... i tried more sleep time but gw always crashes with the "Send to Anet" thing..

I hope some1 can help me..... :)

Code:
Func SalvageThis($aItem)
   Local $lModelID = DllStructGetData($aitem, "ModelID")
	  If $lModelID = 22751 Then Return False
	  If $lModelID = 21798 Then Return False
   Return True
EndFunc

Func Salvage()
   Local $counter
   For $n = 1 to 4
          $counter = 1
	  While True
		 If $n = 1 And $counter > 20 then ExitLoop
		 If $n = 2 And $counter > 5 then ExitLoop
		 If $n = 3 And $counter > 10 then ExitLoop
		 If $n = 4 And $counter > 10 then ExitLoop
		 If FindSalvageKit() > 0 Then
			Local $aItem = GetItemsBySlot($n, $counter)
			If SalvageThis($aItem) Then
			   StartSalvage($aitem)
			   Sleep(Random(1000, 1500))
			   SalvageMaterials()
			   Sleep(Random(1000, 1500))
			EndIf
		 Else
			Return 0
		 EndIf
		 $counter += 1
	  WEnd
   Next
EndFunc
Thx :)
05/13/2018 22:13 afmart#2
id have to look deeper into it but i would say it SalvageMaterials() that is crashing it

i would also write the functions like this

Code:
Func Salvage()
   For $Bag = 1 to 4
          For $Slot = 1 To DllStructGetData($Bag, "slots")
          	 If FindSalvageKit() > 0 Then
			Local $aItem = GetItemsBySlot($Bag, $Slot)
			If SalvageThis($aItem) Then
			   StartSalvage($aitem)
			   Sleep(Random(1000, 1500))
			EndIf
		 Else
			Return 0
		 EndIf
	  Next
   Next
EndFunc
05/13/2018 22:16 DerMoench14#3
When you try to salvage Items in an explorable Area make sure:
1. Only use the cheap Salvage-Kits, not the exp onces.
2. Modify FindSalvageKit() and StartSalvage() so these Functions only search for Salvage-Kits you got in your Inventory (NOT Xunlai-Storage).
3. Identify the Items first.
4. When the Item has the Rarity white or blue you ONLY need to cast StartSalvage().
5. When the Item has the Rarity purple or gold cast StartSalvage(), Sleep() and SalvageMaterials().
6. Make sure you have Space in Inventory (at least 1) before salvage.
05/14/2018 08:03 hironimo#4
THX a lot DerMoench14 !!!

--> 2. Modify FindSalvageKit() and StartSalvage() so these Functions only search for Salvage-Kits you got in your Inventory (NOT Xunlai-Storage). <--

i fixed that and now everything works like i want :)

thx thx thx :)
05/15/2018 18:46 Tamina22300#5
Hey, can you post your salvage bot if he's fixed please :) ? Mine got some bugs that i don't understand to solve... :(
05/17/2018 14:46 hironimo#6
Hi,
sry it is not a salvage Bot like the known ones. I have changed some stuff in the actual Vaettier Bot to salvage some items i want, thats it.
03/30/2019 04:51 phat34#7
I know this is 10 months old but lmao at leeches...