WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   macro for Sha / Galleon lock (https://www.wowinterface.com/forums/showthread.php?t=45223)

Voxxel 11-24-12 02:48 PM

macro for Sha / Galleon lock
 
Hello,

I'm curious how can I check if my character is saved for Sha of Anger or Galleon on a given week.
It comes to an issue when you play 7-8 characters everyday and just cannot follow which character is already locked and which one is not.

I can't find any in-built UI option to check this and this isn't included in /raidinfo list but I heard around the internet there is a macro that can tell you in a way if your current character is saved (or already looted) or not.

Could you share it please?

(I know there is a version for AILO that can track Sha but I really don't want to use one more completely addon just for this minor issue.)

Dridzt 11-24-12 03:18 PM

Code:

/run for k,v in pairs{GetQuestsCompleted()} do if k=32099 then print("Sha done")break end print("Sha not done")end
might work for Sha.
drycoded.

Clamsoda 11-24-12 03:18 PM

Code:

/run local z,t,s={[32099]='Sha of Anger this week.'},GetQuestsCompleted();for c,v in pairs(z) do if t[c] then s='' else s=' not' end print('You have'..s,'done',v) end
Copied from WoWHead, apparently works.

@Dridzt: Jerk <.<

Voxxel 11-24-12 04:08 PM

Thanks a lot, guys!

Haleth 11-24-12 04:57 PM

I've seen that Wowhead script before and I find it mind-boggling that someone would create a table just for storing one number and one string, both of which are only used once. It's not even less characters. Here's what I would do, seems to work:

Code:

/run print("You have"..(GetQuestsCompleted()[32099] and "" or " not").." done Sha of Anger this week.")
Dridzt; Your code will iterate over every key in the table until it gets to 32099, and then it doesn't actually check whether or not the value for that key is true. You can simply use the number as the key directly and then check its value.

Dridzt 11-24-12 05:17 PM

I did warn it's drycoded :o (as in if there was an obvious oversight I expected someone to correct it)
To clarify I typed it from memory and assumed the non-completed quests are nil not false, so no check was necessary.

Clamsoda 11-24-12 05:39 PM

Additionally, Galleon's Loot quest ID is "32098".

Code:

/run print("You have"..(GetQuestsCompleted()[32098] and "" or " not").." done Galleon this week.")
That will perform the same task for Galleon, using Haleth's code of course.

Haleth 11-24-12 06:36 PM

Quote:

Originally Posted by Dridzt (Post 269368)
I did warn it's drycoded :o (as in if there was an obvious oversight I expected someone to correct it)
To clarify I typed it from memory and assumed the non-completed quests are nil not false, so no check was necessary.

You still don't have to iterate over a key-value table though, you can just use the key directly. That's what hash keys are there for after all :)

Ketho 11-24-12 08:33 PM

Shouldn't IsQuestFlaggedCompleted nowadays be faster? (for single quests)

I just remember this post about it

Phanx 11-24-12 11:18 PM

It should be, yes. Adjusting Haleth's macro:

Code:

/run print("You have" .. (IsQuestFlaggedCompleted(32099) and "" or " not") .. " done Sha of Anger this week.")

Rilgamon 11-25-12 02:01 AM

There are way too few macroslots to waste them ;)

http://www.wowinterface.com/download...Worldboss.html

Vlad 11-25-12 05:29 AM

It's good that Ketho mentioned the IsQuestFlaggedCompleted because I was face-palming when I saw iteration of tables and such just to look up a specific questID. :P

Talyrius 11-25-12 10:56 PM

Galleon doesn't conform to the same once-a-week lockout restriction that the Sha of Anger has. I have killed Galleon twice within the typical weekly lockout timeframe on several occasions and have been eligible for loot each time.

Nihlo 03-11-13 02:06 PM

Hi Guys, I'd like to create a macro which checks all 4 World Bosses. Something like:

Code:

/run print("Galleon: "..(GetQuestsCompleted()[32098] and "Yes" or "No"))
/run print("Sha: "..(GetQuestsCompleted()[32099] and "Yes" or "No"))
/run print("Nalak: "..(GetQuestsCompleted()[32518] and "Yes" or "No"))
/run print("Oondasta: "..(GetQuestsCompleted()[32519] and "Yes" or "No"))

It works but I run out of Characters although that's the shortest version of quest-checking I found. Is there a way to check multiple quests with different output ?

I made a max-short ugly version:
Code:

/run print("G:"..(GetQuestsCompleted()[32098] and "Y" or "N"))
/run print("S:"..(GetQuestsCompleted()[32099] and "Y" or "N"))
/run print("O:"..(GetQuestsCompleted()[32519] and "Y" or "N"))
/run print("N:"..(GetQuestsCompleted()[32519] and "Y" or "N"))


Phanx 03-11-13 04:02 PM

Use a table:

Code:

/run for k, v in pairs({ Galleon = 32098, Sha = 32099, Nalak = 32518, Oondasta = 32519}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
There's even room for COLORS!

Also, use IsQuestFlaggedCompleted(qID) instead of GetQuestsCompleted()[qID] to check single quests.

Nihlo 03-11-13 05:02 PM

Yeah you're a genius...and you've got the right feeling for styling^^ But it doesn't take the colours in the "".
The output is sth like "Nalak: |cffff0000No|r".

But thanks anyway helped me a lot.

semlar 03-11-13 05:07 PM

Try replacing | with \124

Haleth 03-11-13 05:13 PM

I'm not sure, but I thought that all (or at least some) world bosses had their weekly limit removed since patch 5.2.

Nihlo 03-11-13 05:21 PM

Quote:

Originally Posted by semlar (Post 274495)
Try replacing | with \124

yeah...didn't even know this way

Quote:

Originally Posted by Haleth (Post 274497)
I'm not sure, but I thought that all (or at least some) world bosses had their weekly limit removed since patch 5.2.

You can kill them every 20min but you can only get loot once a week.


For those macro-noobies like me, here's the perfect code:
Code:

/run for k, v in pairs({ Galleon = 32098, Sha = 32099, Nalak = 32518, Oondasta = 32519}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end

Haleth 03-11-13 06:06 PM

Well, the Oondasta one is strange then, because I did kill/loot him this week (160 man raid, was awesome) yet the quest doesn't indicate that.

Voxxel 03-15-13 05:09 AM

Yea, seems we don't need to track Oondasta quest at all since it seems the boss works as the Pre-nerfed Galleon where you were able to loot anytime you find him (because it could happen only once or twice a week)

p3lim 03-15-13 09:24 AM

If we're really minimalizing something this small

Lua Code:
  1. for name, id in pairs{
  2.     Oondasta = 32519,
  3.     Galleon = 32098,
  4.     Nalak = 32518,
  5.     Sha = 32099
  6. } do
  7.     print(name, IsQuestFlaggedCompleted(id))
  8. end
Lua Code:
  1. /run for k,v in pairs{Oondasta=32519,Galleon=32098,Nalak=32518,Sha=32099} do print(k,IsQuestFlaggedCompleted(v)) end

Returns true or nil based on completion status, good enough for many.

Voxxel 03-16-13 11:09 AM

Ok, I was wrong, you cannot loot Oondasta more than once a week (despite its loong respawn). Moreover, you're not allowed to use your mogu coins more than once a week.

According to this, the completition quest should be marked as completed but it doens't work actually. Maybe a wrong quest?

Phanx 03-16-13 11:57 AM

Wowhead only lists 4 weekly Short-Supply Reward quests which correspond to the 4 weekly world bosses. I'd guess the quest itself is just buggy.

Rilgamon 04-25-13 03:47 PM

Quote:

Originally Posted by Phanx (Post 274717)
Wowhead only lists 4 weekly Short-Supply Reward quests which correspond to the 4 weekly world bosses. I'd guess the quest itself is just buggy.

Yes, Delaene reportet that killing Nalak marks both quests in my addon and I was able to check it tonight. So its blizz's fault.

Rilgamon 05-02-13 10:39 AM

http://us.battle.net/wow/en/forum/topic/8728854089#3

Quote:

We are aware of the request and looking to add a way for characters to track which world boss had already been defeated in a given week.
Why not just fix the weekly quests in question?

Phanx 05-02-13 07:40 PM

In addition to fixing the quest, they should just add these as raid locks so they show up on /raidinfo and the calendar. Doesn't seem like it would be too difficult.

Voxxel 05-30-13 09:19 AM

hello again,

I'm using an extended veriosn of that beautiful color-coded macro made by Phanx, however I can't realize how can I set up the order of the list. Here is my extended code:

Code:

/run for k, v in pairs({ Galleon = 32098, Chest = 32609, Rares = 32610, Room_key = 32626, Nalak = 32518, Oondasta = 32519, Sha = 32099}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r")) end
I tried to move them forth and back but the list order does not follow. It would be fine if it could print them in the following order:

1. Galleon
2. Sha
3. Chest
4. Rares
5. Room_key
6. Nalak
7. Oondasta

Seerah 05-30-13 10:41 AM

You can't. This is because it is set up as a dictionary style table with string keys rather than numerical indexes.

Dridzt 05-30-13 11:41 AM

You can try this.
Code:

/run for k,v in ipairs({{32098,"Galleon"},{32099,"Sha"},{32609,"Chest"},{32610,"Rares"},{32626,"Key"},{32518,"Nalak"},{32519,"Oondasta"}}) do print(format("%d.%s:%s",k,v[2],IsQuestFlaggedCompleted(v[1]) and "\124cff00ff00Yes" or "\124cffff0000No"))end

Voxxel 05-30-13 12:14 PM

Quote:

Originally Posted by Dridzt (Post 278994)
You can try this.
Code:

/run for k,v in ipairs({{32098,"Galleon"},{32099,"Sha"},{32609,"Chest"},{32610,"Rares"},{32626,"Key"},{32518,"Nalak"},{32519,"Oondasta"}}) do print(format("%d.%s:%s",k,v[2],IsQuestFlaggedCompleted(v[1]) and "\124cff00ff00Yes" or "\124cffff0000No"))end

Wow! You're my man, Dridzt! Thanks!

ravagernl 05-30-13 01:25 PM

Yay! 8 new tables each time that macro runs :D

Phanx 05-30-13 03:55 PM

Here is a cleaner version of that that only creates one table instead of eight:
Code:

/run local t={"Galleon",32098,"Sha",32099,"Chest",32609,"Rares",32610,"RoomKey",32626,"Nalak",32518,"Oondasta",32519}for i=1,#t-1,2 do print(t[i],IsQuestFlaggedCompleted(t[i+1])and "\124cff00ff00Yes" or "\124cffff0000No")end

Rilgamon 06-01-13 05:44 AM

Someone asked me to include those quests (key,chest,roll) into zz_Worldboss. So I tried to find an event that would indicate when one of those hidden quests is marked.

I tried "QUEST_AUTOCOMPLETE" and "QUEST_LOG_UPDATE" both dont fire. I hate the idea to have it running in an onupdate.

I tested with the chest which is easy enough to find on my empty realm. The key-quest was marked right the moment I looted it from the chest and the chest itself took a few seconds before it was marked. But cant find the right event for this :(

Phanx 06-01-13 09:25 PM

Assuming you are displaying this information in a Broker plugin's tooltip, why do you need an event? Just query IsQuestFlaggedCompleted(id) when the user requests the tooltip. If you really think querying again on each tooltip request is too expensive, you can cache the state for the rest of the session after the first time.

Rilgamon 06-02-13 02:03 AM

In my broker I display the information of all chars. So it would be helpfull when the info is stored the moment it's known to make sure the addon has the right data when the player switches to another char. For now I've added an 5 seconds ooc-onupdate additionally to registering PLAYER_LOGOUT.

Lua Code:
  1. local function update()
  2.     for questId, questData in pairs(db['quests']) do
  3.         if(questData['minlevel'] <= db['char_db'][player]['level']) then
  4.             db['char_db'][player][questId] = IsQuestFlaggedCompleted(questId) and true or nil
  5.         end
  6.     end
  7. end
  8. local function onupdate(self,dt)
  9.     self['elapsed'] = (self['elapsed'] or 0) - dt
  10.     if(self['elapsed'] < 0) then
  11.         self['elapsed'] = 5
  12.         update()
  13.     end
  14. end
  15. local function event(self,evnt,...)
  16.     print(evnt)
  17.     print(...)
  18.     if(evnt == "PLAYER_REGEN_DISABLED") then
  19.         self:SetScript("OnUpdate", nil)
  20.     elseif(evnt == "PLAYER_REGEN_ENABLED") then
  21.         self:SetScript("OnUpdate", onupdate)
  22.     else
  23.         update()
  24.     end
  25. end

Tonyleila 06-05-13 10:17 AM

I love this macro its not containing the rar mobs @ Isel of thunder but If you were there to get the key guess u have killed a rar mob. Also one questflag that missing in your macros is the new 5.3 Weekly in the Barrens:
Code:

/run for k, v in pairs({ Galleon=32098, Sha=32099, Nalak=32518, Oon=32519, Champ=32641, Key=32626, Barrens=32862}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes" or "\124cffff0000No")) end

oscarucb 06-17-13 05:02 PM

SavedInstances shows the world boss kills, weekly quests, raid lockouts and other useful information for ALL of your toons.
Better than any macro because you don't have to relog to see your alts..

Rilgamon 11-02-14 10:15 AM

To keep this macro alive

37460 - Drov the Ruiner
37462 - Tarlna the Ageless
37464 - Rukhmar

Tonyleila 11-04-14 05:57 PM

Quote:

Originally Posted by Rilgamon (Post 299446)
To keep this macro alive

37460 - Drov the Ruiner
37462 - Tarlna the Ageless
37464 - Rukhmar

Thanks the new macro is now this, it still includes all bosses that drop mounts:
Code:

/run for k, v in pairs({ Galleon=32098,Sha=32099,Nalak=32518,Oondasta=32519,Drov=37460,Tarlna=37462,Rukhmar=37464}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cff00ff00Yes" or "\124cffff0000No")) end

Tonyleila 12-22-14 11:26 PM

Ok so anyone has an idea how to add the Bonusrolls to this Macro or make a separated macro for it? In MoP we only had to check one quest flag but now there are 12 from this vendors: http://www.wowhead.com/npc=88570#ends
plus the vendor in your Dwarven Bunker / War Mill will give you one of the 3 possible.

Choonstertwo 12-23-14 12:11 AM

Code:

/run for n,i in pairs{Honor1=36057,Honor2=37458,Honor3=37459,Gold1=36054,Gold2=37454,Gold3=37455,GR1=36056,GR2=37456,GR3=37457,Apexis1=36055,Apexis2=37452,Apexis3=37453}do if IsQuestFlaggedCompleted(i)then print(n,"- Completed")end end
This macro will print out all Seal quests you've completed this week.


All times are GMT -6. The time now is 03:24 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI