Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Pickmail_origfunc;
- function PickMail_mailfunc()
- if (PickMail_origfunc ~= nil) then
- PickMail_origfunc();
- end;
- if (not InboxFrame.openMailID or OpenMailFrame.cod or not IsShiftKeyDown()) then
- return;
- end;
- local bodyText, texture, isTakeable = GetInboxText(InboxFrame.openMailID);
- if (OpenMailFrame.money) then
- TakeInboxMoney(InboxFrame.openMailID);
- end
- if (OpenMailFrame.itemName) then
- TakeInboxItem(InboxFrame.openMailID);
- end
- local packageIcon, stationeryIcon, sender, subject, money, CODAmount, daysLeft, itemID, wasRead, wasReturned, textCreated = GetInboxHeaderInfo(InboxFrame.openMailID);
- if ( money == 0 and not itemID and (bodyText == nil or bodyText == ""
- or (string.find(string.lower(bodyText), "item [0-9]+ out of [0-9]+") ~= nil))) then
- OpenMail_Delete();
- OpenMailFrame:Hide();
- end
- end
- -- OnFoo Functions
- function PickMail_OnLoad()
- if (Sea ~= nil and Sea.util ~= nil and Sea.util.hook ~= nil) then
- Sea.util.hook("OpenMail_Update", "PickMail_mailfunc", "after");
- else
- PickMail_origfunc = OpenMail_Update;
- OpenMail_Update = PickMail_mailfunc;
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement