Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. function main()
  2. {
  3. ; If isxEQ2 isn't loaded, then no reason to run this script.
  4. if (!${ISXEQ2(exists)})
  5. return
  6.  
  7. ;Initialize/Attach the event Atoms that we defined previously
  8. Event[EQ2_ExamineItemWindowAppeared]:AttachAtom[EQ2_ExamineItemWindowAppeared]
  9.  
  10. echo watching for examine windows now....
  11. do
  12. {
  13. waitframe
  14. }
  15. while ${ISXEQ2(exists)}
  16.  
  17. }
  18.  
  19. atom(script) EQ2_ExamineItemWindowAppeared(string ItemName, string WindowID)
  20. {
  21. variable int StringsCount
  22. variable bool GroupTradeable
  23.  
  24. StringsCount:Set[1]
  25. GroupTradeable:Set[FALSE]
  26.  
  27. do
  28. {
  29. if ${ExamineItemWindow[${WindowID}].TextVector[${StringsCount}].Label.Length} > 0 && ${ExamineItemWindow[${WindowID}].TextVector[${StringsCount}].Label.Find["This item may be traded with anyone present when it was looted"]}
  30. {
  31. GroupTradeable:Set[TRUE]
  32. break
  33. }
  34. }
  35. while ${StringsCount:Inc} <= ${ExamineItemWindow[${WindowID}].TextVector}
  36.  
  37. if ${GroupTradeable}
  38. {
  39. echo ${ItemName} has group tradeable flag!
  40. }
  41. else
  42. {
  43. echo ${ItemName} does NOT have group tradeable flag!
  44. }
  45. }
  46.  
  47. atom atexit()
  48. {
  49. ;We're done with the script, so let's detach all of the event atoms
  50. Event[EQ2_ExamineItemWindowAppeared]:DetachAtom[EQ2_ExamineItemWindowAppeared]
  51. echo no longer watching for examine windows...
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement