Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Kobiesan on April 04, 2016, 01:46:27 am

Title: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 04, 2016, 01:46:27 am
I'm trying to make a spell that deals 33 damage to target enemy and also heals nearby allies for 46. Sounds simple right? Well for some reason it's not.

I created a spell that has a 2yd range and when used does a a damaging effect (2) of value 33 to the target. This part works fine.

I then added a healing effect (10) of value 46 with an implicit target value of 20 and radius of 13 so as to heal nearby allies.

However, for some reason this doesn't do the intended effect AT ALL. What happens is the spell does the damage but CANNOT reduce the target below 1 HP for some reason (i tried taking the healing effect off and it was able to kill the target). ALSO, after using the spell on a target and then using a different spell on them, it will HEAL the enemy???

I tried using holy nova as a reference but as it turns out Holy Nova uses two separate spells (15237 and 23455) to accomplish the effect of an AoE damage and AoE heal and I can't figure out how the two spells relate to each other since neither trigger the other.

This is seriously perplexing and I feel like there is absolutely no reason my spell shouldn't work.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: bizzlesnaff on April 04, 2016, 03:55:44 am
Honestly I've no idea how to script spells, but I think nobody can help u without the script you worked out..
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Amaroth on April 04, 2016, 08:53:38 am
world.spell_linked_spell.db
Wht about this table (and in general spell_*.db tables in world DB)? It might be helpful. I would recommend using Holy Nova as an example, and make 2 separated spells, where one triggers another one.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 05, 2016, 12:36:28 am
Quote from: "Amaroth"
world.spell_linked_spell.db
Wht about this table (and in general spell_*.db tables in world DB)? It might be helpful. I would recommend using Holy Nova as an example, and make 2 separated spells, where one triggers another one.

I don't have Spell_linked_spell db. I looked through the other spell tables in my database relating to holy nova's ID and the only thing I found was a coefficient override on the ID's used for Holy Nova's heal and damage spells.

I tried making the spell trigger a second spell (Spell effect 64) that heals nearby allies but that didn't fix it. The spell still has the same effect (can't kill the enemy and heals them when they are hit with another spell). However, the healing spell works fine on it's own when used.

(http://i.imgur.com/OSIvOxE.png)


Quote from: "bizzlesnaff"
Honestly I've no idea how to script spells, but I think nobody can help u without the script you worked out..

This spell isn't scripted it's just made in the dbc.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 05, 2016, 01:25:13 am
I've noticed that if I give my spells the same name as a spell that already exists it will sometimes transfer the properties of that spell to my new spell. Had a simple spell named ravage that did 111 damage and there was another spell named Ravage that required you be behind the target. That property somehow transferred over to my spell named Ravage and required you to be behind someone to use it. But that still hasn't fixed the spell I am talking about in this post. No other spell shares its name.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 12, 2016, 03:21:07 am
Bump
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Amaroth on April 12, 2016, 12:01:14 pm
Honestly idk. It seems to me that you have either horribly outdated version of core, or something different than TC. In such case its pretty hard ti actually help you with system I simply don't have and know.

Tell me you don't use some repack from year 200x  -.-.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 12, 2016, 03:15:56 pm
Quote from: "Amaroth"
Honestly idk. It seems to me that you have either horribly outdated version of core, or something different than TC. In such case its pretty hard ti actually help you with system I simply don't have and know.

Tell me you don't use some repack from year 200x  -.-.

I use a compile of arcemu.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Steff on April 13, 2016, 05:24:28 am
Arcemu is dead since years.

http://arcemu.org/ (http://arcemu.org/" onclick="window.open(this.href);return false;)

Use Trinity Core.

https://www.trinitycore.org/ (https://www.trinitycore.org/" onclick="window.open(this.href);return false;)
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 13, 2016, 03:27:49 pm
Quote from: "Steff"
Arcemu is dead since years.

http://arcemu.org/ (http://arcemu.org/" onclick="window.open(this.href);return false;)

Use Trinity Core.

https://www.trinitycore.org/ (https://www.trinitycore.org/" onclick="window.open(this.href);return false;)

I've been told that it's up to personal preference which to use. People tell me ArcEmu is better at custom content and that's what I'm going for.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Moridhin on April 13, 2016, 06:16:10 pm
Its better to use trinity it is more up to date, more stable, and major advantage of Arcemu was lua scripting that you can now use in trinity also(Eluna). So yea better use trinity.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Steff on April 13, 2016, 08:53:39 pm
Also if you want to implement custom content you will not find many people still into Arcemu. So you will not find easy help for problems.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 14, 2016, 12:52:58 am
I might just switch to trinity then.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 15, 2016, 05:01:02 am
I made the switch to trinity and now my spells that worked on ArcEmu show up like this on my trinity server.
(http://i.imgur.com/98Nj7OI.png)

I can't click on the name (the description doesn't show up) and they don't show up in my spellbook. I didn't have this problem on ArcEmu.

(http://i.imgur.com/3kVlVQP.png)
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Amaroth on April 15, 2016, 09:15:21 am
I've tryed to find some reasons for something like this but all of them are very unlikely since you have created a new spell and it worked before. The best would be if I could see your spell.dbc, although problem might not be there and may be somewhere in databases or in another DBCs. Spells might be disabled, may be assigned to skills you are not proficient with (or you are, but in such case they are filtered from General tab), spells might also be hidden... All kinds of things. But like I said, because they worked for you before, none of these above makes sense at all. Are you really sure that you have all data everywhere, up to date, deleted Cache and whatever else, that there's nowhere just some minor error?
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 15, 2016, 03:28:35 pm
Quote from: "Amaroth"
I've tryed to find some reasons for something like this but all of them are very unlikely since you have created a new spell and it worked before. The best would be if I could see your spell.dbc, although problem might not be there and may be somewhere in databases or in another DBCs. Spells might be disabled, may be assigned to skills you are not proficient with (or you are, but in such case they are filtered from General tab), spells might also be hidden... All kinds of things. But like I said, because they worked for you before, none of these above makes sense at all. Are you really sure that you have all data everywhere, up to date, deleted Cache and whatever else, that there's nowhere just some minor error?

I copied the dbc from my ArcEmu dbc into my trinity dbc. Idk if that makes a difference.

I'll try deleting cache but I never needed to do that before.
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 16, 2016, 01:16:10 am
I fixed the problem (I was using the wrong MPQ file).

I have this script now on Trinity's Eluna engine but it doesn't seem to work. I'm not familiar with Eluna and the methods and hooks are different so I'm not sure if this is right. I couldn't find any methods in Eluna similar to HasAuraWithMechanic so I'm not sure what else to use.

Code: [Select]
function Tenderizer(event, player, spell, skipCheck)
local Caster = Spell:GetCaster()
    if (spell:GetEntry() == 80914) then
if (Spell:GetTarget():HasAuraWithMechanic(12)) then
Caster:DealDamage(Spell:GetTarget(), 300, 0, 0, 80914)
else
Caster:DealDamage(Spell:GetTarget(), 150, 0, 0, 80914)
end
end
end

RegisterPlayerEvent(5, Tenderizer)
Title: Re: [WotLk] Something seriously wrong with my spell
Post by: Kobiesan on April 16, 2016, 08:08:34 pm
Bump