Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. If GUICtrlRead($MoarDustCheckbox) = 1 Then
  2. $lModStruct = GetModStruct($lItem)
  3. If IsMeasureForMeasure($lModStruct) And $lModelID <> $ITEM_ID_CONCH Then ;if it's not a shield with MFM, get MFM off
  4. GetMFM($bagIndex, $i)
  5. ElseIf IsMeasureForMeasure($lModStruct) And $lModelID == $ITEM_ID_CONCH Then ;if it's shield with MFM, store
  6. StoreItem($lItem)
  7. ContinueLoop
  8. EndIf
  9.  
  10.  
  11. ;Description; Salvages off the MfM inscription.
  12. Func GetMFM($aBag, $aSlot)
  13. Local $lItem
  14. Local $MFM = "02"
  15.  
  16. $lItem = GetItemBySlot($aBag, $aSlot)
  17. If DllStructGetData($lItem, 'ID') == 0 Then Return
  18.  
  19. If FindBigSalvageKit() = 0 Then BuyBigSalvageKit()
  20.  
  21. ;salvage out mfm
  22. sleep(random(600, 900))
  23. StartSalvage($lItem)
  24. sleep(random(600, 900))
  25. SalvageMod($MFM)
  26.  
  27. Sleep(800)
  28. EndFunc ;==>GetMFM
  29.  
  30.  
  31. ;Description; Checks the modStruct to see if an item has a MfM mod on it.
  32. Func IsMeasureForMeasure($ModStruct)
  33. Local $Value = 0
  34. Local $MFM = "1F02"
  35. Local $ModStr = StringInStr($ModStruct, $MFM, 0, 1)
  36.  
  37. If $ModStr > 0 Then Return True
  38. Return False
  39. EndFunc ;==>IsMeasureForMeasure
  40.  
  41. ;Description: Goes through storage to see if actual inscriptions are there.
  42. Func FindMeasureForMeasure()
  43. Local $bag, $numSlots, $lItem, $lModelID
  44.  
  45. For $bagIndex = 8 to 11
  46. $bag = GetBag($bagIndex)
  47. $numSlots = DllStructGetData($bag, "slots")
  48. For $i = 1 to $numSlots
  49. $lItem = GetItemBySlot($bag, $i)
  50. $lModelID = DllStructGetData($lItem, "ModelID")
  51. ;If modelID matches, return true
  52. If $lModelID == $ITEM_ID_MFM_ID Then Return True
  53. Next
  54. Next
  55. Return False
  56. EndFunc ;==>FindMeasureForMeasure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement