[Completed][WIP] Quest 12644 "Still At It"

[CODE]-- “Tipsy” McManus SAI for Quest 12644 “Still At It” ** “Not Complete” **
SET @ENTRY := 28566;
UPDATE creature_template SET AIName= ‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=9 AND entryorguid IN (2798600,2798601,2798602,2798603,2798604,2798605,2798606,2798607,2798608);
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
(@ENTRY,0,0,0,62,0,100,0,9713,0,0,0,80,2798600,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - On gossip option select - Run script’),
(@ENTRY,0,1,0,1,1,100,0,5000,5000,5000,5000,87,2798601,2798605,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - wait 5 sec - Run random script (phase 1)’),
(@ENTRY,0,2,0,1,2,100,0,10000,10000,10000,10000,80,2798607,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - After 10 seconds - Run script fail distillation (phase 2)’),
– Phase 3 (not complete)
(@ENTRY,0,3,4,38,4,100,0,0,0,0,0,34,1,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 0 - Set data 0 = 1’),
(@ENTRY,0,4,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,5,9,38,4,100,0,0,1,0,0,34,2,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 1 - Set data 0 = 2’),
(@ENTRY,0,6,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,7,8,38,4,100,0,0,2,0,0,34,3,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 2 - Set data 0 = 3’),
(@ENTRY,0,8,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,9,10,38,4,100,0,0,3,0,0,34,4,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 3 - Set data 0 = 4’),
(@ENTRY,0,10,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,11,12,38,4,100,0,0,4,0,0,34,5,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 4 - Set data 0 = 5’),
(@ENTRY,0,12,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,13,14,38,4,100,0,0,5,0,0,34,6,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 5 - Set data 0 = 6’),
(@ENTRY,0,14,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,15,16,38,4,100,0,0,6,0,0,34,7,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 6 - Set data 0 = 7’),
(@ENTRY,0,16,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
(@ENTRY,0,17,18,38,4,100,0,0,7,0,0,34,8,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 7 - Set data 0 = 8’),
(@ENTRY,0,18,0,61,4,100,0,0,0,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Call Script task successful’),
– need to know exact number of task
(@ENTRY,0,19,0,38,4,100,0,0,8,0,0,34,2798608,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 0 8 - Call Script Quest successful’),
(@ENTRY,0,20,21,38,0,100,0,1,1,0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 1 1 - Set data 1 0’),
(@ENTRY,0,21,0,61,0,100,0,0,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 1 1 - Set phase 3’),

– Start Script
(2798600,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,‘Tipsy McManus - Close Gossip’),
(2798600,9,1,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Turn of Gossip & Questgiver flags’),
(2798600,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 0’),
(2798600,9,3,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 1’),
– Wants Orange
(2798601,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 1’),
(2798601,9,1,0,0,0,100,0,0,0,0,0,12,28535,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,‘Tipsy McManus - Summon “Wants Orange”’),
(2798601,9,2,0,0,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 2’),
– Wants Papaya
(2798602,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 2’),
(2798602,9,1,0,0,0,100,0,0,0,0,0,12,28536,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,‘Tipsy McManus - Summon “Wants Papaya”’),
(2798602,9,2,0,0,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 2’),
– Wants Bananas
(2798603,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 3’),
(2798603,9,1,0,0,0,100,0,0,0,0,0,12,28537,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,‘Tipsy McManus - Summon “Wants Bananas”’),
(2798603,9,2,0,0,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 2’),
– Steaming Valve
(2798604,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 4’),
(2798604,9,1,0,0,0,100,0,0,0,0,0,12,28539,1,10000,0,0,0,8,0,0,0,5548.6,5768.53,-76.2673,-2.1293,‘Tipsy McManus - Summon “Steaming Valve”’),
(2798604,9,2,0,0,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 2’),
– Wants Fire
(2798605,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 5’),
(2798605,9,1,0,0,0,100,0,0,0,0,0,12,28540,1,10000,0,0,0,8,0,0,0,5552.64,5767.81,-78.0219,-3.00195,‘Tipsy McManus - Summon “Wants Fire”’),
(2798605,9,2,0,0,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 2’),
– Task Successful
(2798606,9,0,0,0,0,100,0,0,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 6’),
(2798606,9,1,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 1’),
– End Failure
(2798607,9,0,0,0,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 7’),
(2798607,9,1,0,0,0,100,0,8000,8000,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Turn on Gossip & Questgiver flags’),
(2798607,9,2,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 0’),
– End Success (not complete)
(2798608,9,0,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 0’),
(2798608,9,1,0,0,0,100,0,0,0,0,0,34,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Set data 0 = 0’),
(2798608,9,2,0,0,0,100,0,0,0,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 8’),
(2798608,9,3,0,0,0,100,0,0,0,0,0,50,190643,30000,0,0,0,0,8,0,0,0,5547.13525,5767.09961,-78.025856,2.25147343,‘Tipsy McManus - Summon Thunderbrew’‘s Jungle Punch’),
– more to be added
(2798608,9,4,0,0,0,100,0,4000,4000,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Turn on Gossip & Questgiver flags’),
(2798608,9,5,0,0,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 0’);

– NPC talk text for “Tipsy” McManus
DELETE FROM creature_text WHERE entry=28566;
INSERT INTO creature_text (entry,groupid,id,text,type,language,probability,emote,duration,sound,comment) VALUES
(28566,0,0, ‘Beginning the distillation in 5 seconds.’,0,0,100,0,0,0, ‘“Tipsy” McManus’),
(28566,1,0, ‘Add another orange, quickly!’,0,0,100,25,0,0, ‘“Tipsy” McManus’),
(28566,2,0, ‘Put a papaya in the still!’,0,0,100,25,0,0, ‘“Tipsy” McManus’),
(28566,3,0, ‘Add bananas!’,0,0,100,25,0,0, ‘“Tipsy” McManus’),
(28566,4,0, ‘Pressure’‘s too high! Open the pressure valve!’,0,0,100,5,0,0, ‘“Tipsy” McManus’),
(28566,5,0, ‘The still needs heat! Light the brazier!’,0,0,100,5,0,0, ‘“Tipsy” McManus’),
(28566,6,0, ‘Good job! Keep your eyes open, now.’,0,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,6,1, ‘That’‘ll do. Never know what it’‘ll need next…’,0,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,6,2, ‘Nicely handled! Stay on your toes!’,0,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,6,3, ‘Well done! Be ready for anything!’,0,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,7,0, ‘It’‘s no good! I’‘m shutting it down…’,0,0,100,0,0,0, ‘“Tipsy” McManus’),
(28566,8,0, ‘We’‘ve done it! Come get the cask.’,0,0,100,0,0,0, ‘“Tipsy” McManus’);
– Add Gossip option
DELETE FROM gossip_menu_option WHERE menu_id=9713 AND id=0;
INSERT INTO gossip_menu_option (menu_id,id,option_icon,option_text,option_id,npc_option_npcflag) VALUES
(9713,0,0, ‘I’‘m ready to start the distillation, uh, Tipsy.’,1,1);
– Add gossip_menu_option condition for 9713
DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup=9713 AND SourceEntry=0;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1) VALUES
(15,9713,0,9,12644); – Quest “Still At It” Has to be active and not complete

– Update creature_template for all 5 targets
UPDATE creature_template SET minlevel=70,maxlevel=70,exp=2,unit_class=2,unit_flags=unit_flags|33554432,flags_extra=flags_extra|128,InhabitType=4,family=23,type=3 WHERE entry IN (28535,28536,28537,28539,28540);

– SAI for Wants Orange “Not Complete”
SET @ENTRY := 28535;
UPDATE creature_template SET AIName= ‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,8,0,100,0,51931,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Spellhit Toss Orange Set Tipsy to Phase 3’);

– SAI for Wants Papaya “Not Complete”
SET @ENTRY := 28536;
UPDATE creature_template SET AIName= ‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,8,0,100,0,51933,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Spellhit Toss Papaya Set Tipsy to Phase 3’);

– SAI for Wants Bananas “Not Complete”
SET @ENTRY := 28537;
UPDATE creature_template SET AIName= ‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,8,0,100,0,51932,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Spellhit Toss Bananas Set Tipsy to Phase 3’);

– SAI for Steam Valve “Not Complete”
SET @ENTRY := 28539;
UPDATE creature_template SET AIName= ‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,11,0,100,0,51932,0,0,0,11,51920,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘On Spawn cast aura on self’);

– Add Spell Targets
DELETE FROM conditions WHERE SourceTypeOrReferenceId=13 AND SourceEntry IN (51931,51932,51933);
INSERT INTO conditions (SourceTypeOrReferenceId,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) VALUES
(13,51931,18,1,28535), – Toss Orange requires target Wants Orange
(13,51931,18,1,28536), – Toss Orange requires target Wants Papaya
(13,51931,18,1,28537), – Toss Orange requires target Wants Bananas
(13,51933,18,1,28535), – Toss Papaya requires target Wants Orange
(13,51933,18,1,28536), – Toss Papaya requires target Wants Papaya
(13,51933,18,1,28537), – Toss Papaya requires target Wants Bananas
(13,51932,18,1,28535), – Toss Bananas requires target Wants Orange
(13,51932,18,1,28536), – Toss Bananas requires target Wants Papaya
(13,51932,18,1,28537); – Toss Bananas requires target Wants Bananas
– Spell 51943 Distillation Complete[/sql]
[/CODE]

As far as I remember from your google topic it wasn’t finished yet.

No it’s not. I will work on it this week.

What’s missing in this script?

May I help you in some way?

Once it’s over I would like to copy it to try to fix “A Suitable Disguise” in order to learn something about SAI too.

I will continue working on this after next week because I am moving. In the mean time you can gather up as much info in that quest as possible. and make an post about it.

Updated a little.

Is script good enough to test it?

What is it missing?

Test it and you’ll find out.

I meant if is there a posibility of breaking something else by importing this test.

Anyone has a full fix to this quest ? (UP!)

I have had trouble getting it to work properly. may require cpp.

This works (based on malcrom’s script). Probably not 100% blizzlike (eg. spell 51943 is not used)

[CODE]-- “Tipsy” McManus SAI for Quest 12644 “Still At It” ** “Not Complete” **
SET @ENTRY := 28566;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=9 AND entryorguid IN (2798600,2798601,2798602,2798603,2798604,2798605,2798606,2798607,2798608);
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
(@ENTRY,0,0,0,62,0,100,0,9713,0,0,0,80,2798600,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - On gossip option select - Run script’),
– phase 1 - tasks
(@ENTRY,0,1,0,1,1,100,0,5000,5000,11000,11000,88,2798601,2798605,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - wait 5 sec - Run random script (phase 1)’),
(@ENTRY,0,2,0,38,1,100,0,1,1,0,0,80,2798606,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - data 1 1 - Call Script task successful (phase 1)’),
(@ENTRY,0,3,0,1,1,100,1,103900,103900,0,0,80,2798608,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - Call Script Quest successful (phase 1) after some time (104s=9tasks)’),

(@ENTRY,0,4,0,1,2,100,1,0,0,0,0,80,2798607,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - Run script fail distillation (phase 2)’),

(@ENTRY,0,5,0,1,4,100,1,8000,8000,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Turn on Gossip & Questgiver flags’),
(@ENTRY,0,6,0,1,4,100,1,8010,8010,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Reset script’),

– Start Script
(2798600,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,‘Tipsy McManus - Close Gossip’),
(2798600,9,1,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Turn of Gossip & Questgiver flags’),
(2798600,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 0’),
(2798600,9,3,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 1’),
– Wants Orange
(2798601,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 1’),
(2798601,9,1,0,0,0,100,0,0,0,0,0,12,28535,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,‘Tipsy McManus - Summon “Wants Orange”’),
(2798601,9,2,0,0,0,100,0,10000,10000,10000,10000,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - set phase 2 (means unsuccessfull) after 10s’),
– Wants Papaya
(2798602,9,0,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 2’),
(2798602,9,1,0,0,0,100,0,0,0,0,0,12,28536,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,‘Tipsy McManus - Summon “Wants Papaya”’),
(2798602,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - set phase 2 (means unsuccessfull) after 10s’),
– Wants Bananas
(2798603,9,0,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 3’),
(2798603,9,1,0,0,0,100,0,0,0,0,0,12,28537,1,10000,0,0,0,8,0,0,0,5549.62354,5769.51367,-73.42824,2.75762,‘Tipsy McManus - Summon “Wants Bananas”’),
(2798603,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - set phase 2 (means unsuccessfull) after 10s’),
– Steaming Valve
(2798604,9,0,0,0,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 4’),
(2798604,9,1,0,0,0,100,0,0,0,0,0,12,28539,1,10000,0,0,0,8,0,0,0,5548.6,5768.53,-76.2673,-2.1293,‘Tipsy McManus - Summon “Steaming Valve”’),
(2798604,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - set phase 2 (means unsuccessfull) after 10s’),
– Wants Fire
(2798605,9,0,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 5’),
(2798605,9,1,0,0,0,100,0,0,0,0,0,12,28540,1,10000,0,0,0,8,0,0,0,5552.64,5767.81,-78.0219,-3.00195,‘Tipsy McManus - Summon “Wants Fire”’),
(2798605,9,2,0,0,0,100,0,10000,10000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘Tipsy McManus - set phase 2 (means unsuccessfull) after 10s’),
– Task Successful
(2798606,9,0,0,0,0,100,0,0,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 6’),
– End Failure
(2798607,9,0,0,0,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 7’),
(2798607,9,1,0,0,0,100,0,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 4’),

– End Success (not complete)
(2798608,9,0,0,0,0,100,0,0,0,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Say Text 8’),
(2798608,9,1,0,0,0,100,0,0,0,0,0,50,190643,30000,0,0,0,0,8,0,0,0,5547.13525,5767.09961,-78.025856,2.25147343,‘Tipsy McManus - Summon Thunderbrew’‘s Jungle Punch’),
(2798608,9,2,0,0,0,100,0,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tipsy McManus - Goto phase 4’);

– NPC talk text for “Tipsy” McManus
DELETE FROM creature_text WHERE entry=28566;
INSERT INTO creature_text (entry,groupid,id,text,type,language,probability,emote,duration,sound,comment) VALUES
(28566,0,0, ‘Beginning the distillation in 5 seconds.’,12,0,100,0,0,0, ‘“Tipsy” McManus’),
(28566,1,0, ‘Add another orange, quickly!’,12,0,100,25,0,0, ‘“Tipsy” McManus’),
(28566,2,0, ‘Put a papaya in the still!’,12,0,100,25,0,0, ‘“Tipsy” McManus’),
(28566,3,0, ‘Add bananas!’,12,0,100,25,0,0, ‘“Tipsy” McManus’),
(28566,4,0, ‘Pressure’‘s too high! Open the pressure valve!’,12,0,100,5,0,0, ‘“Tipsy” McManus’),
(28566,5,0, ‘The still needs heat! Light the brazier!’,12,0,100,5,0,0, ‘“Tipsy” McManus’),
(28566,6,0, ‘Good job! Keep your eyes open, now.’,12,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,6,1, ‘That’‘ll do. Never know what it’‘ll need next…’,12,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,6,2, ‘Nicely handled! Stay on your toes!’,12,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,6,3, ‘Well done! Be ready for anything!’,12,0,100,4,0,0, ‘“Tipsy” McManus’),
(28566,7,0, ‘It’‘s no good! I’‘m shutting it down…’,12,0,100,0,0,0, ‘“Tipsy” McManus’),
(28566,8,0, ‘We’‘ve done it! Come get the cask.’,12,0,100,0,0,0, ‘“Tipsy” McManus’);
– Add Gossip option
DELETE FROM gossip_menu_option WHERE menu_id=9713 AND id=0;
INSERT INTO gossip_menu_option (menu_id,id,option_icon,option_text,option_id,npc_option_npcflag) VALUES
(9713,0,0, ‘I’‘m ready to start the distillation, uh, Tipsy.’,1,1);
– Add gossip_menu_option condition for 9713
DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup=9713 AND SourceEntry=0;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ConditionTypeOrReference,ConditionValue1) VALUES
(15,9713,0,9,12644); – Quest “Still At It” Has to be active and not complete

– Update creature_template for all 5 targets
UPDATE creature_template SET minlevel=70,maxlevel=70,exp=2,unit_class=2,unit_flags=unit_flags|33554432,flags_extra=flags_extra|128,InhabitType=4,family=23,type=3 WHERE entry IN (28535,28536,28537,28539,28540);

– SAI for Wants Orange “Not Complete”
SET @ENTRY := 28535;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,8,0,100,1,51931,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Spellhit Toss Orange Set Tipsy data 1 1 - not repeatable’);

– SAI for Wants Papaya “Not Complete”
SET @ENTRY := 28536;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,8,0,100,1,51933,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Spellhit Toss Papaya Set Tipsy data 1 1 - not repeatable’);

– SAI for Wants Bananas “Not Complete”
SET @ENTRY := 28537;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,8,0,100,1,51932,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Spellhit Toss Bananas Set Tipsy data 1 1 - not repeatable’);

– SAI for Steam Valve “Not Complete”
SET @ENTRY := 28539;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,11,51920,0,0,0,0,0,1,0,0,0,0,0,0,0, ‘On Spawn cast aura on self’),
(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Death Set Tipsy data 1 1’);

– SAI for GO Pressure Valve “Not Complete”
SET @ENTRY := 190635;
UPDATE gameobject_template SET AIName=‘SmartGameObjectAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=1 AND entryorguid=@ENTRY;
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
(@ENTRY,1,0,0,64,0,100,0,500,500,0,0, 51,0,0,0,0,0,0,19,28539,0,0,0,0,0,0, ‘On GossipHello kill Steam Valve’);

– SAI for Wants Fire “Not Complete”
SET @ENTRY := 28540;
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@ENTRY;
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
(@ENTRY,0,0,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,28566,0,0,0,0,0,0, ‘On Death Set Tipsy data 1 1’);

– SAI for GO Brazier “Not Complete”
SET @ENTRY := 190636;
UPDATE gameobject_template SET AIName=‘SmartGameObjectAI’ WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE source_type=1 AND entryorguid=@ENTRY;
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
(@ENTRY,1,0,0,64,0,100,0,500,500,0,0, 51,0,0,0,0,0,0,19,28540,0,0,0,0,0,0, ‘On GossipHello kill Wants Fire’);

– Add Spell Targets
DELETE FROM conditions WHERE SourceTypeOrReferenceId=13 AND SourceEntry IN (51931,51932,51933);
INSERT INTO conditions (SourceTypeOrReferenceId,SourceEntry,ConditionTypeOrReference,ConditionValue1,ConditionValue2) VALUES
(13,51931,18,1,28535), – Toss Orange requires target Wants Orange
(13,51931,18,1,28536), – Toss Orange requires target Wants Papaya
(13,51931,18,1,28537), – Toss Orange requires target Wants Bananas
(13,51933,18,1,28535), – Toss Papaya requires target Wants Orange
(13,51933,18,1,28536), – Toss Papaya requires target Wants Papaya
(13,51933,18,1,28537), – Toss Papaya requires target Wants Bananas
(13,51932,18,1,28535), – Toss Bananas requires target Wants Orange
(13,51932,18,1,28536), – Toss Bananas requires target Wants Papaya
(13,51932,18,1,28537); – Toss Bananas requires target Wants Bananas
– Spell 51943 Distillation Complete[/sql][/CODE]

spell 51943 not used

This one should be the achievement spell, am I right?

What achievement? :-o

I guess it’s a kind of credit spell.

BTW, thank you for this work /emoticons/default_smile.png.

Yeah sorry, I meant credit.

https://github.com/d…lazar_basin.cpp

great job by zwerg

look at this - it works

sorry but i didn’t found the update commit - go to line #1410

-npc_tipsy_mcmanus

-go_brew_event

just the texts have to translate to english

I don’t really see why this is not pushed, it works exactly as it should and according to the video and wowhead comments. Updated commenting and style a bit:

https://github.com/TrinityCore/TrinityCore/issues/2963

https://github.com/TrinityCore/TrinityCore/commit/e5c0be0a29e13f9ee519c353a56ef8c785f063c5