• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Spell ban?

Status
Not open for further replies.

Foereaper

Founder
Not entirely sure if this works on Eluna, however it did back on Arc:

Code:
local BannedSpells = {SPELL_ID_1, SPELL_ID_2};

function CheckBannedSpells(event, player, spell, check)
	for i, v in ipairs(BannedSpells) do
		if(spell:GetId() == v) then
			spell:cancel()
			return false;
		end
	end
end

RegisterPlayerEvent(5, CheckBannedSpells)

Untested, so got NO idea if it works or not, but go ahead and try :) Just edit the spell ID's in the top table with the spells you want to ban.
 
Last edited:

Ghostcrawler336

Epic Member
That table doesn't exist for MaNGOS TBC, I don't think it exists at all by that name. That's just renamed by TrinityCore.

I believe the table is spell_learn_spell

Oh I didn't know he was using ManGOS TBC, but the table exist for 3.3.5 trinitycore -
NbuZvP5.png
 

mibu

Enthusiast
All test it in a min...and yes...Mangos do-sent have ban spell sadlly only if..u recompile core with a patch.(and if u do u might encounter issues)
I need this to fix a npc Boss ..i see there Player event :( can u change it to npc event?
 

Foereaper

Founder
You shouldn't disable a spell with one script that is cast by a different script lol, that's extremely hacky and I doubt it'll even work :p There's not an OnCast event for creature either iirc. If you want to remove a spell from a creature, it should be removed in the creature's original script
 

mibu

Enthusiast
I so hate it...hole kiljaeden guy is meesed up his casting sinister strike..pff..M noob with this and i dont wanna ruin the .cpp if u can take a look and tell me wut to remove..here it is ..

Lol i removed if from .cpp ...executed the new scriptdev2_script.sql and he still pawns me with the same spell :|...m gonna recompile the core
 
Status
Not open for further replies.
Top