The-Cataclysm-Preservation-Project / TrinityCore

Archived repository for WoW 4.3.4.15595. The project will be reworked for Cataclysm Classic as an official new branch of TrinityCore at https://github.com/TrinityCore/TrinityCore
GNU General Public License v2.0
237 stars 97 forks source link

DB/QUEST: Decontamination - Gnome Starting Zone + FIX #357

Open evilvampire16 opened 2 years ago

evilvampire16 commented 2 years ago

Description:

Interacting with Sanitron 500 (Entry: 46185) for Decontamination Quest (Entry: 27635) should move you through some animations and processes and complete the quest, but nothing happens after interacting and you just get stuck.

Current behaviour:

nothing happens after interacting with Sanitron 500

Expected behaviour:

should move you through some animations and processes and complete the quest, but nothing happens after interacting and you just get stuck. Decontamination Quest Video

Steps to reproduce the problem:

  1. create a gnome
  2. reach to the quest or add it
  3. click on Sanitron 500

TC rev. hash/commit:

TrinityCore rev. 6645a97434db+ 2022-05-01 19:07:26 +0200 (master branch) (Win64, RelWithDebInfo, Static) (worldserver-daemon)

TDB version: 434.22011 Operating system: Windows

evilvampire16 commented 2 years ago

https://gist.github.com/evilvampire16/4dcee5309c1a31b1f9f56ac4a0dedc83

possible improvements:

Ovahlord commented 2 years ago

that script is outdated. teleporting to a spawn location is hacky and you should instead despawn the creature. we have dynamic spawning, meaning that each respawn is an entirely new creature.

evilvampire16 commented 2 years ago

that script is outdated. teleporting to a spawn location is hacky and you should instead despawn the creature. we have dynamic spawning, meaning that each respawn is an entirely new creature.

Thanks for your comment @Ovahlord , could you have a look on this one please: https://gist.github.com/evilvampire16/a0d0ac4bdbadc344d05b2d277346df2c

Ovahlord commented 2 years ago

please stop posting random scripts copied from somewhere else. that script is full of hacks and a heavily outdated codestyle as well. try writing your own code please and follow modern standard which you can look into by looking up basic any existing cataclysm script in this repository.

welder1976 commented 2 years ago
UPDATE creature_template SET AIName = "SmartAI" WHERE entry = 46185;
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
(46185,0,0,1,11,0,100,0,0,0,0,0, 81,16777216,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - On Respawn - Set npc flag"),
(46185,0,1,2,25,0,100,0,0,0,0,0, 66,0,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - On Reset - Set Home Position"),
(46185,0,2,3,25,0,100,0,0,0,0,0, 22,1,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - On Reset - Set Phase 1"),
(46185,0,3,0,27,1,100,0,0,0,0,0, 80,4618500,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - Start Decontamination Script"),
(4618500,9,0,1,0,1,100,0,0,0,0,0, 22,2,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - Script - Set Phase 2"),
(4618500,9,1,2,0,2,100,0,0,0,0,0, 1,0,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - Script - Say 0"),
(4618500,9,2,3,0,2,100,0,2000,2000,0,0, 69,0,0,0,0,0,0, 8,0,0,0,-5173.94,725.62,291.387,0, "Sanitron 500 - Script - Move To Waypoint 1"),
(4618500,9,3,4,0,2,100,0,3000,3000,0,0, 86,0,0,19,0,0,0, 0,0,0,0,0,0,0,0, "Sanitron 500 - Script - Animation 1 [delay]"),
(4618500,9,4,5,0,2,100,0,0,0,0,0, 11,86075,0,0,0,0,0, 7,0,0,0,0,0,0,0, "Sanitron 500 - Script - Cast Decontaminate Stage 1'"),
(4618500,9,5,6,0,2,100,0,1000,1000,0,0, 69,0,0,0,0,0,0, 8,0,0,0,-5174.56,716.36,289.387,0, "Sanitron 500 - Script - Move To Waypoint 2"),
(4618500,9,6,7,0,2,100,0,3000,3000,0,0, 86,0,0,19,0,0,0, 0,0,0,0,0,0,0,0, "Sanitron 500 - Script - Animation 2 [delay]"),
(4618500,9,7,8,0,2,100,0,0,0,0,0, 11,86084,0,0,0,0,0, 7,0,0,0,0,0,0,0, "Sanitron 500 - Script - Cast Decontaminate Stage 2'"),
(4618500,9,8,9,0,2,100,0,2000,2000,0,0, 69,0,0,0,0,0,0, 8,0,0,0,-5175.21,707.18,291.887,0, "Sanitron 500 - Script - Move To Waypoint 3"),
(4618500,9,9,10,0,2,100,0,3000,3000,0,0, 86,0,0,19,0,0,0, 0,0,0,0,0,0,0,0, "Sanitron 500 - Script - Animation 3 [delay]"),
(4618500,9,10,11,0,2,100,0,1500,1500,0,0, 1,1,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - Script - Say 1"),
(4618500,9,11,12,0,2,100,0,0,0,0,0, 11,86086,0,0,0,0,0, 7,0,0,0,0,0,0,0, "Sanitron 500 - Script - Cast Decontaminate Stage 3'"),
(4618500,9,12,13,0,2,100,0,1000,1000,0,0, 69,0,0,0,0,0,0, 8,0,0,0,-5175.98,700.18,291.387,0, "Sanitron 500 - Script - Move To Waypoint 4"),
(4618500,9,13,14,0,2,100,0,2000,2000,0,0, 1,2,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - Script - Say 2"),
(4618500,9,14,15,0,2,100,0,0,0,0,0, 28,80653,0,0,0,0,0, 29,0,0,0,0,0,0,0, "Sanitron 500 - Script - Remove Irradiated Aura"),
(4618500,9,15,16,0,2,100,0,0,0,0,0, 37,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,"Sanitron 500 - Script - Die"),
(4618500,9,16,17,0,2,100,0,0,0,0,0, 41,2000,0,0,0,0,0, 1,0,0,0,0,0,0,0,"Sanitron 500 - Script - Despawn After 2 Secounds"),
(4618500,9,17,0,0,2,100,0,0,0,0,0, 22,1,0,0,0,0,0, 1,0,0,0,0,0,0,0, "Sanitron 500 - Script - Set Phase 1");

+- work