Results 1 to 3 of 3

Thread: Store Items of Interest

  1. #1
    Retired savsuds's Avatar
    Join Date
    Apr 2013
    Location
    'Murica
    Posts
    1,246

    Store Items of Interest

    I was going around and looking at stuff and noticed that I needed to organize my functions I commonly use to handle botted drops. So, I did some updating and put them here to share. Bots will not have to open the Chest to perform the functions.

    EDIT: I verified the store UNIDs works like a charm. Reminder to newer people, just copying this into a public bot won't be the last step to add the functionality. You also need to insert somewhere in the script a reason for the bot to use the functions.

    Code:
    #Region Storing Shit
    #CS
    Feel free to comment out the parts you don't need or want to collect. 
    I have not confirmed every ModelID I have included in each because I don't have each and every event item, but I did get the list from others.
    #CE
    Func StoreItems()
    	StackableDrops(1, 20)
    	StackableDrops(2, 5)
    	StackableDrops(3, 10)
    	StackableDrops(4, 10)
    	Alcohol(1, 20)
    	Alcohol(2, 5)
    	Alcohol(3, 10)
    	Alcohol(4, 10)
    	Party(1, 20)
    	Party(2, 5)
    	Party(3, 10)
    	Party(4, 10)
    	Sweets(1, 20)
    	Sweets(2, 5)
    	Sweets(3, 10)
    	Sweets(4, 10)
    	Scrolls(1, 20)
    	Scrolls(2, 5)
    	Scrolls(3, 10)
    	Scrolls(4, 10)
    	Tomes(1, 20)
    	Tomes(2, 5)
    	Tomes(3, 10)
    	Tomes(4, 10)
    	DPRemoval(1, 20)
    	DPRemoval(2, 5)
    	DPRemoval(3, 10)
    	DPRemoval(4, 10)
    	SpecialDrops(1, 20)
    	SpecialDrops(2, 5)
    	SpecialDrops(3, 10)
    	SpecialDrops(4, 10)
    EndFunc ;~ Includes event items broken down by type
    Func StoreMaterials()
    	Materials(1, 20)
    	Materials(2, 5)
    	Materials(3, 10)
    	Materials(4, 10)
    EndFunc ;~ Common and Rare Materials
    Func StoreUNIDGolds()
    	UNIDGolds(1, 20)
    	UNIDGolds(2, 5)
    	UNIDGolds(3, 10)
    	UNIDGolds(4, 10)
    EndFunc ;~ UNID Golds
    Func StackableDrops($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 460 Or $M = 474 Or $M = 476 Or $M = 486 Or $M = 522 Or $M = 525 Or $M = 811 Or $M = 819 Or $M = 822 Or $M = 835 Or $M = 1610 Or $M = 2994 Or $M = 19185 Or $M = 22751 Or $M = 24629 Or $M = 24630 Or $M = 24631 Or $M = 24632 Or $M = 27033 Or $M = 27035 Or $M = 27044 Or $M = 27046 Or $M = 27047 Or $M = 27052 Or $M = 35123) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc ;~ like Suarian Bones, lockpicks, Glacial Stones, etc
    Func Tomes($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 21796 Or $M = 21797 Or $M = 21798 Or $M = 21799 Or $M = 21800 Or $M = 21801 Or $M = 21802 Or $M = 21803 Or $M = 21804 Or $M = 21805) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc ;~ non-Elite tomes only
    Func Alcohol($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 910 Or $M = 2513 Or $M = 5585 Or $M = 6049 Or $M = 6366 Or $M = 6367 Or $M = 6375 Or $M = 15477 Or $M = 19171 Or $M = 22190 Or $M = 24593 Or $M = 28435 Or $M = 30855 Or $M = 31145 Or $M = 31146 Or $M = 35124 Or $M = 36682) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func Party($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 6376 Or $M = 6368 Or $M = 6369 Or $M = 21809 Or $M = 21810 Or $M = 21813 Or $M = 29436 Or $M = 29543 Or $M = 36683 Or $M = 4730 Or $M = 15837 Or $M = 21490 Or $M = 22192 Or $M = 30626 Or $M = 30630 Or $M = 30638 Or $M = 30642 Or $M = 30646 Or $M = 30648 Or $M = 31020 Or $M = 31141 Or $M = 31142 Or $M = 31144 Or $M = 31172) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func Sweets($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 15528 Or $M = 15479 Or $M = 19170 Or $M = 21492 Or $M = 21812 Or $M = 22269 Or $M = 22644 Or $M = 22752 Or $M = 28431 Or $M = 28432 Or $M = 28436 Or $M = 31150 Or $M = 35125 Or $M = 36681) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func Scrolls($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 3256 Or $M = 3746 Or $M = 5594 Or $M = 5595 Or $M = 5611 Or $M = 5853 Or $M = 5975 Or $M = 5976 Or $M = 21233 Or $M = 22279 Or $M = 22280) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func DPRemoval($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 6370 Or $M = 21488 Or $M = 21489 Or $M = 22191 Or $M = 35127 Or $M = 26784 Or $M = 28433) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func SpecialDrops($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 18345 Or $M = 21491 Or $M = 28434 Or $M = 35121) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func Materials($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 921 Or $M = 922 Or $M = 923 Or $M = 925 Or $M = 926 Or $M = 927 Or $M = 928 Or $M = 929 Or $M = 930 Or $M = 931 Or $M = 932 Or $M = 933 Or $M = 934 Or $M = 935 Or $M = 936 Or $M = 937 Or $M = 938 Or $M = 939 Or $M = 940 Or $M = 941 Or $M = 942 Or $M = 943 Or $M = 944 Or $M = 945 Or $M = 946 Or $M = 948 Or $M = 949 Or $M = 950 Or $M = 951 Or $M = 952 Or $M = 953 Or $M = 954 Or $M = 955 Or $M = 956 Or $M = 6532 Or $M = 6533) And $Q = 250 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc
    Func UNIDGolds($BAGINDEX, $NUMOFSLOTS)
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$R = GetRarity($AITEM)
    		If $R = 2624 Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc ;~ UNID golds
    Func FINDEMPTYSLOT($BAGINDEX)
    	Local $LITEMINFO, $ASLOT
    	For $ASLOT = 1 To DllStructGetData(GETBAG($BAGINDEX), "Slots")
    		Sleep(40)
    		$LITEMINFO = GETITEMBYSLOT($BAGINDEX, $ASLOT)
    		If DllStructGetData($LITEMINFO, "ID") = 0 Then
    			SetExtended($ASLOT)
    			ExitLoop
    		EndIf
    	Next
    	Return 0
    EndFunc
    #EndRegion Storing Shit
    Last edited by savsuds; 11-23-2013 at 10:45 PM.

  2. #2
    Retired savsuds's Avatar
    Join Date
    Apr 2013
    Location
    'Murica
    Posts
    1,246
    This could be added to store mods you salvage out of weapons.
    Code:
    Func Mods($BAGINDEX, $NUMOFSLOTS)
    	Local $AITEM
    	Local $M
    	Local $Q
    	Local $bag
    	Local $SLOT
    	Local $FULL
    	Local $NSLOT
    	For $I = 1 To $NUMOFSLOTS
    		$AITEM = GETITEMBYSLOT($BAGINDEX, $I)
    		If DllStructGetData($AITEM, "ID") = 0 Then ContinueLoop
    		$M = DllStructGetData($AITEM, "ModelID")
    		$Q = DllStructGetData($AITEM, "quantity")
    		If ($M = 896 Or $M = 908 Or $M = 15554 Or $M = 15551 Or $M = 15552 Or $M = 894 Or $M = 906 Or $M = 897 Or $M = 909 Or $M = 893 Or $M = 905 Or $M = 6323 Or $M = 6331 Or $M = 895 Or $M = 907 Or $M = 15543 Or $M = 15553 Or $M = 15544 Or $M = 15555 Or $M = 15540 Or $M = 15541 Or $M = 15542 Or $M = 17059 Or $M = 19122 Or $M = 19123) Then
    			Do
    				For $BAG = 8 To 12
    					$SLOT = FINDEMPTYSLOT($BAG)
    					$SLOT = @extended
    					If $SLOT <> 0 Then
    						$FULL = False
    						$NSLOT = $SLOT
    						ExitLoop 2
    					Else
    						$FULL = True
    					EndIf
    					Sleep(400)
    				Next
    			Until $FULL = True
    			If $FULL = False Then
    				MOVEITEM($AITEM, $BAG, $NSLOT)
    				Sleep(GetPing()+500)
    			EndIf
    		EndIf
    	Next
    EndFunc

  3. #3
    Super Moderator ACB's Avatar
    Join Date
    Aug 2009
    Posts
    583
    2 things
    arrays
    and stop naming things in capslock ^^

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •