Difference between CastSpellByID() and CastSpellByName(GetSpellInfo()) menu

User Tag List

Results 1 to 2 of 2
  1. #1
    MrHeroe's Avatar Member
    Reputation
    3
    Join Date
    May 2013
    Posts
    67
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Difference between CastSpellByID() and CastSpellByName(GetSpellInfo())

    Hey,

    while trying to find that nasty code thats taint my profile im experimenting with different calls.

    The strange thing is - when i use CastSpellByName(GetSpellInfo(xx),xx) everything works. I can use a table entry as target for example. CastSpellByName(GetSpellInfo(xx),members[x].Unit) (Thx Nova Team )

    now, when i changed my ability execution to CastSpellByID(xxx,xxx) only a few spells works. That is strange. There are no errors the spells just wont be executed under its conditions. The spells that works are (MOST TIMES!) global strings like "player". But String like "target" or "mouseover" didnt.

    CastSpellByID(xxx,"player") -> works
    CastSpellByID(xxx,"focus") -> didnt work
    CastSpellByID(xxx,members[x].Unit) -> didnt work

    As i said no errors (even tested with PQR_Debug and ZeroBrane Syntax check)!

    Can you help me? Those unlogic nightmares makes me crazy!!!!!!!!!!!!!!!!!
    Last edited by MrHeroe; 10-06-2013 at 05:54 AM.

    Difference between CastSpellByID() and CastSpellByName(GetSpellInfo())
  2. #2
    crystal_tech's Avatar Elite User
    Reputation
    468
    Join Date
    Feb 2008
    Posts
    1,033
    Thanks G/R
    1/6
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pqr uses/used castspellbyid in the spellid box when you create the ability. with mop they started to share ids(morphed ids) and thats where byid breaks on pqr, if you use the root spellid it would work but for some profiles it locked up till you move your toon around. I just created my own cast function that makes it easy to input unitid and spellid that all i need to do is add before a return true.

    just a note:
    don't put a return true in the cast function as you'll run into casting 2 times.

    Code:
    _shorthand = nil
    function _shorthand()
    	_Chat = PQR_WriteToChat
    	_UB = UnitBuffID
    	_UDB = UnitDebuffID
    	_Mod = Nova_Mod
    	_SA = PQR_SpellAvailable
    	_PS = IsPlayerSpell
    	_SIR = IsSpellInRange
    	_GI	= GetSpellInfo
    	_UE = UnitExists
    	_CSN = CastSpellByName
    end
    
    _shorthand()
    	
    	_checkSpell = nil
    	function _checkSpell(sid, tar)
    		if _UE(tar) then
    			if _PS(sid) and _SA(sid) then
    				if tar ~= nil then
    					if _SIR(_GI(78), tar) == 1 then return true else return false end 
                                           --atm its set to warriors heroic strike, just change the number to a common melee/ranged spell (ie: arcane shot for hunters)
    				elseif tar == nil then
    					return true
    				end
    			else
    				return false
    			end
    		end
    	end
    	
    	_Cast = nil
    	function _Cast(sid, tar)
    		_CSN(_GI(sid), tar)
    	end

    Please if someone helped you donate rep to them.

Similar Threads

  1. Replies: 0
    Last Post: 04-15-2014, 10:57 PM
  2. Replies: 4
    Last Post: 09-24-2012, 10:22 AM
  3. How does Blizz tell difference between Powerleveling and hackers?
    By Marodox in forum World of Warcraft General
    Replies: 5
    Last Post: 04-22-2012, 07:24 PM
  4. [Noob] What are the major differences between Mangos and Arcemu ?
    By Belmorte in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 04-03-2009, 01:19 AM
  5. [Discussion/Questions] Difference Between ArcEmu and Ascent?
    By Mango Jerry in forum World of Warcraft Emulator Servers
    Replies: 24
    Last Post: 02-15-2009, 11:31 PM
All times are GMT -5. The time now is 12:46 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search