Skip to content

Commit

Permalink
Fix. Bug with buffs (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: MrLavender <[email protected]>
  • Loading branch information
pangolp and MrLavender authored Mar 27, 2024
1 parent 0888f37 commit a004f5a
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 174 deletions.
221 changes: 124 additions & 97 deletions conf/npc_buffer.conf.dist
Original file line number Diff line number Diff line change
@@ -1,88 +1,111 @@
[worldserver]
###################################################################################################
# BUFFER NPC
###################################################################################################

# -------------------------------------------------------------------------------------
# Enable the module
# Enable : 1
# Disable: 0
# -------------------------------------------------------------------------------------

#
# Buff.Enable
# Description: Enable or disable the module.
# Default: 1 (Enable)
# Value:
# 1 (Enable)
# 0 (Disable)
#

Buff.Enable = 1

# -------------------------------------------------------------------------------------
# Announce the module when the player logs in?
# Enable : 1
# Disable: 0
# -------------------------------------------------------------------------------------
#
# Buff.Announce
# Description: Announce the module when the player logs in?
# Default: 1 (Enable)
# Value:
# 1 (Enable)
# 0 (Disable)
#

Buff.Announce = 1

# -------------------------------------------------------------------------------------
# Cure Resurrection Sickness?
# Enable : 1
# Disable: 0
# -------------------------------------------------------------------------------------
#
# Buff.CureRes
# Description: Remove Resurrection Sickness? ID: 15007
# Default: 1 (Enable)
# Value:
# 1 (Enable)
# 0 (Disable)
#

Buff.CureRes = 1

# -------------------------------------------------------------------------------------
# Limit buffs by level
# Enable : 1
# Disabled: 0
# -------------------------------------------------------------------------------------
#
# Buff.ByLevel
# Description: Limit buffs by level
# Default: 1 (Enable)
# Value:
# 1 (Enable)
# 0 (Disable)
#

Buff.ByLevel = 1

# -------------------------------------------------------------------------------------
# Buff Defaults (Leave blank to disable a buff)
# This function is not active if Buff.ByLevel = 1
#
# 1. Prayer of Fortitude (48162)
# 2. Greater Blessing of Kings (43223)
# 3. Mark of the Wild (48469)
# 4. Prayer of Spirit (48074)
# 5. Prayer of Shadow Protection (48170)
# 6. Arcane Intellect (36880)
#
# Fun Stuff
# 48612 (Dalron the Controller)
# -------------------------------------------------------------------------------------
Buff.Spells = "48162;43223;48469;48074;48170;36880;"

# -------------------------------------------------------------------------------------
# How often does the NPC emote in milliseconds?
# Randomly caclulated within range 60000 (1 min, minumum) to 3000000 (5 minutes, max)
# Default: 60000 (1 minutes, minimum)
# Disable: 0
# -------------------------------------------------------------------------------------
#
# Buff.Spells
# Description: Buff Defaults (Leave blank to disable a buff)
# This function is not active if Buff.ByLevel = 1
#
# 1. Prayer of Fortitude (48162)
# 2. Greater Blessing of Kings (43223)
# 3. Mark of the Wild (48469)
# 4. Prayer of Spirit (48074)
# 5. Prayer of Shadow Protection (48170)
# 6. Arcane Intellect (42995)
#
# Fun Stuff
# 48612 (Dalron the Controller)
#

Buff.Spells = "48162;43223;48469;48074;48170;42995;"

#
# Buff.MessageTimer
# Description: How often does the NPC emote in milliseconds?
# Randomly caclulated within range 60000 (1 min, minumum) to 3000000 (5 minutes, max)
# Default: 60000 (1 minutes, minimum)
# Disable: 0
#

Buff.MessageTimer = 60000

# -------------------------------------------------------------------------------------
# How many pharases does the NPC have?
# Default: 3
# Disable: 0
# -------------------------------------------------------------------------------------
#
# Buff.NumPhrases
# Description: How many pharases does the NPC have?
# Default: 4
# Disable: 0
#

Buff.NumPhrases = 4

# -------------------------------------------------------------------------------------
# NPC Phrases - Add your own!
# Spoken randomly to the world
# -------------------------------------------------------------------------------------
#
# NPC Phrases - Add your own!
# Spoken randomly to the world
#

BF.P1 = "Come get buffed, taste my stuff, the elven females can't get enuff!"
BF.P2 = "She never shook the stars from the swirling cosmos, but she loved good tauren and rode good kodos."
BF.P3 = "Mr. Grubbs is the toughest grub around. No doubt about it."
BF.P4 = "Those trolls sure now how to dance! I hear they like to party in the mountains of Darkshore."

# -------------------------------------------------------------------------------------
# How many whispers does the NPC have?
# Default: 3
# Disable: 0
# -------------------------------------------------------------------------------------
#
# Buff.NumWhispers
# Description: How many whispers does the NPC have?
# Default: 10
# Disable: 0
#

Buff.NumWhispers = 10

# -------------------------------------------------------------------------------------
# NPC Whisper Phrases - Add your own!
# Whispered to the player after interaction
# Use '%s%' to include the player's name
# -------------------------------------------------------------------------------------
#
# NPC Whisper Phrases - Add your own!
# Whispered to the player after interaction
# Use '%s%' to include the player's name
#

BF.W1 = "Koiter's spirit stands watch looking out over the Barrens. Have you visted the shrine yet %s?"
BF.W2 = "The king's bones are still there. Everlasting in the dust. The weapons are there too.. if you know where to look %s."
BF.W3 = "Oh %s, how I miss those days in the wastes.. watching the sun set over Nagrand."
Expand All @@ -94,38 +117,42 @@ BF.W8 = "Indeed.. %s. The dwarves keep many secrets about that which lies beyond
BF.W9 = "A little bit of this.. a dab of that.. ahh.. there we go %s."
BF.W10 = "No %s, I never did hear if they found the children that disappeared from Nagrand and Zangarmarsh."

# -------------------------------------------------------------------------------------
# The spell cast to get the player's attention
# Default: 44940
# Disable: 0
# -------------------------------------------------------------------------------------
#
# Buff.EmoteSpell
# Description: The spell cast to get the player's attention
# Default: 44940
# Disable: 0
#

Buff.EmoteSpell = 0

# -------------------------------------------------------------------------------------
# The gesture the NPC performs when speaking emote text
# Default: 3 (Wave)
# Disable: 0
# -------------------------------------------------------------------------------------
# 0 - NONE
# 1 - TALK
# 2 - BOW
# 3 - WAVE
# 4 - CHEER
# 5 - EXCLAMATION
# 6 - QUESTION
# 7 - EAT
# 11 - LAUGH
# 14 - RUDE
# 15 - ROAR
# 16 - KNEEL
# 17 - KISS
# 18 - CRY
# 19 - CHICKEN
# 20 - BEG
# 21 - APPLAUD
# 22 - SHOUT
# 23 - FLEX
# 24 - SHY
# 25 - POINT
# -------------------------------------------------------------------------------------
#
# Buff.EmoteCommand
# Description: The gesture the NPC performs when speaking emote text
# Default: 3 (Wave)
# Disable: 0
#
# 0 - NONE
# 1 - TALK
# 2 - BOW
# 3 - WAVE
# 4 - CHEER
# 5 - EXCLAMATION
# 6 - QUESTION
# 7 - EAT
# 11 - LAUGH
# 14 - RUDE
# 15 - ROAR
# 16 - KNEEL
# 17 - KISS
# 18 - CRY
# 19 - CHICKEN
# 20 - BEG
# 21 - APPLAUD
# 22 - SHOUT
# 23 - FLEX
# 24 - SHY
# 25 - POINT
#

Buff.EmoteCommand = 3
40 changes: 0 additions & 40 deletions data/sql/db-world/npc_buffer.sql

This file was deleted.

37 changes: 37 additions & 0 deletions data/sql/db-world/npc_buffer_00.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
-- --------------------------------------------------------------------------------------
-- BUFFER - 601016
-- --------------------------------------------------------------------------------------
SET
@Entry := 601016,
@Model := 14612, -- Tauren Warmaster
@Name := "Buffmaster Hasselhoof",
@Title := "",
@Icon := "Speak",
@GossipMenu := 0,
@MinLevel := 80,
@MaxLevel := 80,
@Faction := 35,
@NPCFlag := 80,
@Scale := 1.0,
@Rank := 0,
@Type := 7,
@TypeFlags := 0,
@FlagsExtra := 2,
@AIName := "SmartAI",
@Script := "buff_npc";

-- NPC
DELETE FROM `creature_template` WHERE `entry`=@Entry;
INSERT INTO `creature_template` (`entry`, `modelid1`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `unit_class`, `unit_flags`, `type`, `type_flags`, `RegenHealth`, `flags_extra`, `AiName`, `ScriptName`) VALUES
(@Entry, @Model, @Name, @Title, @Icon, @GossipMenu, @MinLevel, @MaxLevel, @Faction, @NPCFlag, 1, 1.14286, @Scale, @Rank, 1, 2, @Type, @TypeFlags, 1, @FlagsExtra, @AIName, @Script);

-- NPC EQUIPPED
-- War Axe(14824), Torch
DELETE FROM `creature_equip_template` WHERE `CreatureID`=@Entry AND `ID`=1;
INSERT INTO `creature_equip_template` VALUES
(@Entry, 1, 1906, 0, 0, 18019);

-- creatture_template_movement
DELETE FROM `creature_template_movement` WHERE `CreatureId`=@Entry;
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
(@Entry, 1, 1, 0, 0, 0, 0, NULL);
1 change: 1 addition & 0 deletions data/sql/db-world/npc_buffer_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE `creature_template` SET `npcflag`=`npcflag`|1 WHERE `entry`=601016;
Loading

0 comments on commit a004f5a

Please sign in to comment.