Advertisement
sorvani

Wait4Rez.inc

Apr 11th, 2012
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. | Wait4rez.inc v2.21
  2. | tweaked for EQEmulator use
  3. | Anything passed as a parameter will cause Wait4Rez to not consent netbots.
  4.  
  5. Sub Wait4Rez(NoConsent)
  6. | set this to the delay time you wish to use between looting items to handle the loot delay on PEQTGC
  7. /declare BagDelayTime int local 15
  8. /declare BagDelay bool local 0
  9.  
  10. /if (!${Defined[NoConsent]}) {
  11. | consent all toons in NetBots
  12. /call consentNB
  13. }
  14. /echo Awaiting rez: auto-accepting, and looting my corpse
  15. | uncomment to memorize a spell set.
  16. | /if (${Me.MaxMana} && !${Me.Gem[1].Name.Length} && !${Me.Gem[2].Name.Length}) {
  17. | /ssm somespellsetname
  18. | /delay 5s
  19. | }
  20. :rezmeffs
  21. /doevents
  22. | wait for the confirmation window.
  23. /delay 1s ${Window[ConfirmationDialogBox].Open}
  24. | loop if it is not open
  25. /if (!${Window[ConfirmationDialogBox].Open}) /goto :rezmeffs
  26. | click yes on the confirmation window
  27. /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup
  28. /delay 2s
  29. /if (${Window[RespawnWnd].Open}) /nomodkey /notify RespawnWnd RW_OptionsList listselect 2
  30. /delay 1s
  31. /nomodkey /notify RespawnWnd RW_SelectButton leftmouseup
  32. /delay 2s
  33. :zoneffs
  34. | corpse is a keyword and does not work right on EQEmu so drop the e to match on name
  35. /delay 5m ${Spawn[${Me}'s corps].ID}
  36. /delay 5s ${Spawn[${Me}'s corps].Distance}<100
  37. /if (${Spawn[${Me}'s corps].ID}) /target id ${Spawn[${Me}'s corps].ID}
  38. /delay 5s
  39. /delay 5s ${Target.ID}==${Spawn[${Me}'s corps].ID}
  40. /if (!${Target.CleanName.Find[${Me}'s Corpse]}) /goto :zoneffs
  41. :corpsepull
  42. /echo corpsepull
  43. /if (${Target.Distance}>100 || !${Spawn[${Me}'s corps].ID}) /return
  44. /if (${Target.Distance}>20) /corpse
  45. /delay 5s ${Target.Distance}<20
  46. /loot
  47. /delay 5s ${Me.State.Equal[BIND]}
  48. /if (${Me.State.NotEqual[BIND]}) /goto :corpsepull
  49. /declare loottotal int local
  50. :LootLag
  51. | /echo lootlag
  52. /varset loottotal ${Corpse.Items}
  53. /delay 1s ${loottotal}!=${Corpse.Items}
  54. /if (${loottotal}!=${Corpse.Items}) /goto :LootLag
  55. /declare i int local
  56. /for i 1 to ${loottotal}
  57. :lootagain
  58. | /echo lootagain
  59. /if (${Corpse.Item[${i}].SizeCapacity} > 0) /varset BagDelay 1
  60. /itemnotify loot${i} rightmouseup
  61. /delay 10s !${Corpse.Item[${i}].ID} && !${Cursor.ID}
  62. /if (${BagDelay}) /delay ${BagDelayTime}
  63. /varset BagDelay 0
  64. /if (${Corpse.Item[${i}].ID}) /goto :lootagain
  65. /next i
  66. /nomodkey /notify LootWnd DoneButton leftmouseup
  67. /return
  68.  
  69. sub consentNB
  70. /declare x int local
  71. /delay 1
  72. /for x 1 to ${NetBots.Counts}
  73. /consent ${NetBots.Client.Arg[${x}]}
  74. /delay 1s
  75. /next x
  76. /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement