By quest of the Exorcism of Colonel Jules need to cast this Spell with this Item on this NPC.(My version of the implementation, on the official server, it is certainly different).
In fact, what I described above hacks, as on the official server after taking the quest to talk to this NPC, and then to begin the process of exorcism. But how to do it (the process of exorcim) I can not imagine, in this described his version of the mission’s purpose. Here is a script written for npc Colonel Jules, but something about the script does not work. Show me how to write it please.
Script for Npc:
[CODE]enum eColonelJules
{
QUEST_EXORCISM_OF_COLONEL_JULES = 10935,
SPELL_PRAYER_BEADS = 39371,
COLONEL_JULES_CREDIT = 22432
};
class npc_colonel_jules : public CreatureScript
{
public:
npc_colonel_jules() : CreatureScript("npc_colonel_jules") { }
struct npc_colonel_julesAI : public ScriptedAI
{
npc_colonel_julesAI(Creature *pCreature) : ScriptedAI(pCreature) {}
void SpellHit(Player* pPlayer, const SpellEntry *spell)
{
if (spell->Id == SPELL_PRAYER_BEADS && pPlayer->GetQuestStatus(QUEST_EXORCISM_OF_COLONEL_JULES) == QUEST_STATUS_INCOMPLETE)
{
CAST_PLR(pPlayer)->KilledMonsterCredit(COLONEL_JULES_CREDIT,0);
}
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_colonel_julesAI(creature);
}
}; [/CODE]
You could try to set the second parameter of KilledMonsterCredit(COLONEL_JULES_CREDIT,0); to the GUID of the creature. Also, there’s no need to cast Player* to Player*.
Also, I think you can use SmartAI for such a simple thing. Would be easier for all of us.
yeah can be done via smartAI:
on spellhit, give killcredit (or something like that)
(moving to SAI for that reason)
can be done with SAI, although it’s not a simple quest like you said Bio.
might be easier with C++
unholy
February 3, 2011, 7:01pm
6
what about the spell casting being done? http://www.trinitycore.org/f/public/style_emoticons/default/rolleyes.gif
what about the body floating? http://www.trinitycore.org/f/public/style_emoticons/default/rolleyes.gif
what about the target floating around? http://www.trinitycore.org/f/public/style_emoticons/default/rolleyes.gif
what about the text dialogues? http://www.trinitycore.org/f/public/style_emoticons/default/rolleyes.gif
if you say cpp would be easier, then how comes none of this is in your script? your cpp is no more then a kill credit which is not blizz like at all! http://www.trinitycore.org/f/public/style_emoticons/default/mellow.gif
and as said above, all of that can be done using SAI, you just have to be creative. http://www.trinitycore.org/f/public/style_emoticons/default/biggrin.gif
but you did admit to it being no more then a hack. so research and testing is what is needed to make this work in SAI. http://www.trinitycore.org/f/public/style_emoticons/default/tongue.gif
Nay
February 4, 2011, 8:54am
7
Spells being cast:
http://img80.imageshack.us/img80/9128/99923107.png
NPCs involved:
22505 - The Exorcism Bubbling Slimer Bunny (DND)
22508 - The Exorcism Lightning Cloud Bunny
22432 - Colonel Jules
22431 - Anchorite Barada
If anyone has more info, reply here
what about the spell casting being done? TrinityCore
what about the body floating? TrinityCore
what about the target floating around? TrinityCore
what about the text dialogues? TrinityCore
if you say cpp would be easier, then how comes none of this is in your script? your cpp is no more then a kill credit which is not blizz like at all! TrinityCore
and as said above, all of that can be done using SAI, you just have to be creative. TrinityCore
but you did admit to it being no more then a hack. so research and testing is what is needed to make this work in SAI. TrinityCore
well first of all I didn’t post the first post… /emoticons/default_smile.png
secondly I said it might be easier with cpp then SAI, I didn’t say it’s not possible…
I tried writing the script in cpp but it didn’t end well for anyone so I stopped…