Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- {
- ; If isxEQ2 isn't loaded, then no reason to run this script.
- if (!${ISXEQ2(exists)})
- return
- ;Initialize/Attach the event Atoms that we defined previously
- Event[EQ2_ExamineItemWindowAppeared]:AttachAtom[EQ2_ExamineItemWindowAppeared]
- echo watching for examine windows now....
- do
- {
- waitframe
- }
- while ${ISXEQ2(exists)}
- }
- atom(script) EQ2_ExamineItemWindowAppeared(string ItemName, string WindowID)
- {
- variable int StringsCount
- variable bool GroupTradeable
- StringsCount:Set[1]
- GroupTradeable:Set[FALSE]
- do
- {
- 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"]}
- {
- GroupTradeable:Set[TRUE]
- break
- }
- }
- while ${StringsCount:Inc} <= ${ExamineItemWindow[${WindowID}].TextVector}
- if ${GroupTradeable}
- {
- echo ${ItemName} has group tradeable flag!
- }
- else
- {
- echo ${ItemName} does NOT have group tradeable flag!
- }
- }
- atom atexit()
- {
- ;We're done with the script, so let's detach all of the event atoms
- Event[EQ2_ExamineItemWindowAppeared]:DetachAtom[EQ2_ExamineItemWindowAppeared]
- echo no longer watching for examine windows...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement