Buff/Heal NPC

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Buff/Heal NPC

      A simple buff/heal-NPC

      Source Code

      1. -- ä \195\164 Jäger = J\195\164ger
      2. -- Ä \195\132 Ärger = \195\132rger
      3. -- ö \195\182 schön = sch\195\182n
      4. -- Ö \195\150 Ödipus = \195\150dipus
      5. -- ü \195\188 Rüstung = R\195\188stung
      6. -- Ü \195\156 Übung = \195\156bung
      7. -- ß \195\159 Straße = Stra\195\159e
      8. function On_GossipMenu(unit, event, player)
      9. unit:GossipCreateMenu(100003, player, 0)
      10. unit:GossipMenuAddItem(5,"Heiliges Licht", 1, 0)
      11. unit:GossipMenuAddItem(5,"Welle der Heilung", 2, 0)
      12. unit:GossipMenuAddItem(5,"Erneuerung", 3, 0)
      13. unit:GossipMenuAddItem(5,"Liedblumenserenade", 4, 0)
      14. unit:GossipMenuAddItem(5,"Segen der K\195\182nige", 5, 0)
      15. unit:GossipSendMenu(player)
      16. end
      17. function On_GossipSelect(unit, event, player, id, intid, code)
      18. -- Heiliges Licht
      19. if (intid == 1) then
      20. unit:FullCastSpellOnTarget(27136, player)
      21. player:GossipComplete()
      22. end
      23. -- Welle der Heilung
      24. if (intid == 2) then
      25. unit:FullCastSpellOnTarget(25396, player)
      26. player:GossipComplete()
      27. end
      28. -- Erneuerung
      29. if (intid == 3) then
      30. unit:FullCastSpellOnTarget(25222, player)
      31. player:GossipComplete()
      32. end
      33. -- Liedblumenserenade
      34. if (intid == 4) then
      35. unit:FullCastSpellOnTarget(15366, player)
      36. player:GossipComplete()
      37. end
      38. -- Segen der Könige
      39. if (intid == 5) then
      40. unit:FullCastSpellOnTarget(20217, player)
      41. player:GossipComplete()
      42. end
      43. end
      44. RegisterUnitGossipEvent(100003, 1, "On_GossipMenu")
      45. RegisterUnitGossipEvent(100003, 2, "On_GossipSelect")
      Display All


      NPC-SQL

      SQL-Query

      1. INSERT INTO creature_names
      2. (`entry`, `name`, `subname`, `info_str`, `flags1`, `type`, `family`, `rank`, `killcredit1`, `killcredit2`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `leader`, `questitem1`, `questitem2`, `questitem3`, `questitem4`, `questitem5`, `questitem6`, `waypointid`)
      3. VALUES
      4. (100003, 'BuffNPC', '', '', 0, 0, 0, 0, 0, 0, 169, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0);
      5. INSERT INTO creature_proto
      6. (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `spell_flags`, `modImmunities`, `isTrainingDummy`, `guardtype`, `summonguard`, `spelldataid`, `vehicleid`, `rooted`)
      7. VALUES
      8. (100003, 85, 85, 35, 12000, 12000, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, '', 0, 0, 0, 2.5, 8, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);