This should work the same way, prints out spells you know that you can use (not passive) so you can later do /run PickupSpell(id) and place it on your actionbar if you like. You can change the spell range at the end, 102129 is the current max spellID, not checked the PTR so it's higher there, mostly with mob abilities tough.
And yes, game freezes after the ~1000th spell and you have to let the game work it's magic, can take up to 30 seconds or more if you run a slower system.Code:/run local function T(a,b)local l for i=a,b do l=GetSpellLink(i)PickupSpell(i)if CursorHasSpell()and(not IsPassiveSpell(i))and IsSpellKnown(i)then print(i,"=",l)end ClearCursor()end end; T(1, 102129) -- checks spellIDs 1 to 102129
*Edit*
If you like to also see spells you can use but not known, this will print "(known)" to known abilities but still print the unknown once.
Code:/run local function T(a,b)local l for i=a,b do l=GetSpellLink(i)PickupSpell(i)if CursorHasSpell()and(not IsPassiveSpell(i))then print(i,"=",l,IsSpellKnown(i)and"(known)"or"")end ClearCursor()end end; T(1, 102129) -- checks spellIDs 1 to 102129
Last edited by Burado; 10-14-2011 at 07:05 AM.
seems like blizz put a little patch to some of the grabbable skills hem
Improved version:
Use /testspells start end (for example: /testspells 1 10000).Code:local perframe = 50 local coroutine = coroutine local GetSpellInfo, PickupSpell, CursorHasSpell, IsPassiveSpell, PlaceAction, ClearCursor, GetActionInfo, IsUsableAction, IsSpellKnown, GetNumCompanions, GetCompanionInfo, print, GetSpellLink, CastSpellByName, ExpandTradeSkillSubClass = GetSpellInfo, PickupSpell, CursorHasSpell, IsPassiveSpell, PlaceAction, ClearCursor, GetActionInfo, IsUsableAction, IsSpellKnown, GetNumCompanions, GetCompanionInfo, print, GetSpellLink, CastSpellByName, ExpandTradeSkillSubClass local function allTheSpells(startID, endID) local unprintedSpells = {} for x=1, GetNumCompanions("CRITTER"),1 do local creatureID, creatureName, spellID= GetCompanionInfo("CRITTER", x) unprintedSpells[spellID] = true end for x=1, GetNumCompanions("MOUNT"),1 do local creatureID, creatureName, spellID= GetCompanionInfo("MOUNT", x) unprintedSpells[spellID] = true end for _, prof in pairs({GetProfessions()}) do local name,_,_,_,_,_,internalID = GetProfessionInfo(prof) if not ((internalID == 393) or (internalID == 182) or (internalID == 186) or (internalID == 356)) then CastSpellByName(name) print("Cast:",name) ExpandTradeSkillSubClass(0) for skNum=1, GetNumTradeSkills() do local link = GetTradeSkillRecipeLink(skNum) if link then local linkID = tonumber(link:match("|Henchant:(%d+)|h")) if linkID then unprintedSpells[linkID] = true end end end CloseTradeSkill() end end coroutine.yield() --local lastEnd for i=startID, endID do if i%perframe == 0 then --print("Scanned from",lastEnd and (lastEnd+1) or startID,"to",i) --lastEnd = i coroutine.yield() end local name, rank, icon, powerCost, isFunnel, powerType, castingTime, minRange, maxRange = GetSpellInfo(i) PickupSpell(i); if CursorHasSpell() then if not(IsPassiveSpell(i)) then PlaceAction(1,1); ClearCursor(); local sType, sGlobalID, subType = GetActionInfo(1,1); if (IsUsableAction(1,1) and sGlobalID == i) then if not(IsSpellKnown(i)) then if not unprintedSpells[i] then print("["..i.."] - "..(GetSpellLink(i) or "! [" .. name .."]")); end end end end end end end local f = CreateFrame("Frame") f:Hide() f:SetScript("OnUpdate",function(s) local status, error = coroutine.resume(s.co) if not status then if error ~= "cannot resume dead coroutine" then print("Coroutine failed!",error) else print("Scan completed successfully!") end s:Hide() end end) SlashCmdList["TESTSPELLS"] = function(input) if f:IsShown() then print("Already scanning!") end local sNum, eNum = input:match("(%d+)%s+(%d+)") sNum, eNum = (tonumber(sNum)), (tonumber(eNum)) print("Scanning from",sNum,"to",eNum) local co = coroutine.create(allTheSpells) coroutine.resume(co,sNum,eNum) f.co = co f:Show() end SLASH_TESTSPELLS1 = "/testspells" SlashCmdList["PICKUP"] = function(input) local id = tonumber(input) if id then PickupSpell(id) end end SLASH_PICKUP1 = "/pickup"
Won't freeze the client (will still likely lag you quite a bit though).
You can also use /pickup id (f.ex. /pickup 7267) to pick up a spell.
EDIT #3: Updated code above and optimized a bit more. Is now more efficient and should lag less. You can try increasing the speed by raising the perframe variable in line 1. Will now also properly ignore trade skill recipes known by the player. New addon download if you don't want to replace the file yourself.
Last edited by StolenLegacy; 10-14-2011 at 03:17 PM.
Proud Member of the Federal Bureau of Moo
I was playing around with this with the new PTR build #14849 to see if any of the new 217 spells did anything. Did anyone else get any new spells available, or was that what CreativeXtent was talking about?
We Break Game.
I'm sorry if I'm confused by this but is this useful at all? Do any of these actually do anything?
whats the spell ID for "Granting a Level".
---------- Post added at 01:48 AM ---------- Previous post was at 01:12 AM ----------
can any one do this for the spell nerfbat? Nerfbat - Spell - World of Warcraft
Last edited by Totemwolf; 11-09-2011 at 01:21 AM.
/run GrantLevel("target") -- Grant a level to the target
/run PickupSpell(93082) -- Nerfbat
I just tried...
/script PickupItem(32458 ) -- Ashes of Al'ar
/script PickupItem(49284) -- Swift Spectral Tiger
... And you can put them on your actionbars, but no learn them. Would be awesome if someone could figure out a script to learn stuff.. I've tried /script LearnItem(????) and that doesn't seem to work.
anyone have a wotlk version? for private server
thanks for sharing this my man!
Is it available ?
i'll send a private message