Jump to content
TrinityCore
Mekonuts

Make an SmartAI force a player to cast certain Spell

Recommended Posts

Hello and thanks for the reading first,

i would love to know if there's a way to make a certain SmartScript force a player to cast certain Spell. I know there's a possibility of put and remove auras and sometimes the same Spell can be used as Aura to force the debuff of the same spell but i would like to know if there's a possibility to do this without need to do an scriptname.

I used this as guide along this years: https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130108/smart+scripts
I searched a bit for the TrinityCore issue tracker about this and didn't found anything useful about the question itself.

Thanks for reading!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By oRKENtaL
      Hello,
      I'm trying to get the hang of SmartAI but it's proving to be difficult. Starting with someone easy, I picked a random npc (Jaina, entry id 35320) and doing
      event is on recieve_emote (id 17, which is kiss)
      the action is DIE (37)
      And target self.


      UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 35320;
      DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 35320); INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (35320, 0, 0, 0, 22, 0, 100, 0, 17, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - Received Emote 17 - Kill Self');
      But the problem is that it doesn't work. I've resspawned her, restarted the server but she still doesn't die.
      Any help would be most appreciated.

      Thanks!
    • By AussieGuy
      Hi All,
      I have just written my first SAI script, copying from another and it was a partial success.
      I do not know how to create text for an NPC to say, and how/where to link it. I think it is connected with a data script, but no details.
      I do not know how to stop an NPC from attacking.
      Are there any resources available to assist?
      I have looked at the SAI Editor for Keira2, it is very good, but linking up a working SAI with an Idiots Guide to how to show text, stop attacking, run away to a certain point, etc would be very helpful.
      An extremely complex SAI like insertwww.wowhead.com/quest=29678/shu-the-spirit-of-water seems daunting to write.
      If the information is available via sniffs, then that would be fantastic, I have installed the sniff tool but live is so volatile atm that it is out of date, and even were it to be rewritten most likely live will be patched at least once per week for the near future, so it might not be worth the effort.
      TLDR: I can't work out how to write SAI scripts, please help
      Thanks,
      Glenn
       
×