[WIP] Wrangle some aether Rays - Quest

[CODE]SET @RAY := 22181;
SET @SPELL := 40856;
SET @WRAY := 23343;
SET @FORCECAST := 40917;
SET @AURA := 40926;

– Templates
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry IN (@RAY,@WRAY);

– Text
DELETE FROM creature_text WHERE entry=@RAY;
INSERT INTO creature_text (entry,groupid,id,text,type,language,probability,emote,duration,sound,comment) VALUES
(@RAY,1,0,‘The Aether Ray appears ready to be wrangled.’,16,0,100,1,0,0,‘Aether Ray - From 30% health to 0% and once - Text emote’);

DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid IN (@RAY,@WRAY);
DELETE FROM smart_scripts WHERE source_type=9 AND entryorguid=@RAY*100;

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
(@RAY,0,0,0,2,0,100,0x01,0,30,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Aether Ray - At 30% Health - Emote’),
(@RAY,0,1,0,8,0,100,0x01,@SPELL,0,0,0,80,@RAY*100,1,1,0,0,0,1,0,0,0,0,0,0,0,‘Aether Ray - On spell “Wrangling Rope” 40856 hit - Start script’),

(@RAY100,9,0,1,0,0,100,0,5000,5000,0,0,11,@FORCECAST,2,0,0,0,0,7,0,0,0,0,0,0,0,‘Aether Ray - Cast “Wrangle Aether Rays: Character Force Cast” 40917,then link to despawn’),
100,9,1,61,0,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Aether Ray - Despawn after 500 ms’),

(@WRAY,0,0,1,54,0,100,0x01,0,0,0,0,11,@AURA,0x03,0,0,0,0,7,0,0,0,0,0,0,0,‘Wrangled Aether Ray - Cast “Wrangle Aether Rays: Wrangling Rope Channel” 40926 on summoner’),
(@WRAY,0,1,2,61,0,100,0x01,0,0,0,0,33,@WRAY,0,0,0,0,0,7,0,0,0,0,0,0,0,‘Wrangled Aether Ray - Give kill credit to summoner’),
(@WRAY,0,2,3,61,0,100,0x01,0,0,0,0,41,120000,0,0,0,0,0,7,0,0,0,0,0,0,0,‘Wrangled Aether Ray - Despawn after 2 minutes’);-- ,
– (@WRAY,0,3,0,61,0,0,100,0x01,0,0,0,0,33,@WRAY,0,0,0,0,0,23,0,0,0,0,0,0,0,‘Wrangled Aether Ray - Follow summoner’); – Not yet done, don’t understand it.

– Conditions
DELETE FROM conditions WHERE SourceTypeOrReferenceId=17 AND SourceEntry=@SPELL;
DELETE FROM conditions WHERE SourceTypeOrReferenceId=18 AND SourceEntry=32698;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(17,0,@SPELL,0,20,30,0,0,0,‘’,‘Spell 40856 Wrangling Rope only target creature under 30% health’),
(18,0,32698,0,24,1,@RAY,0,0,‘’,‘Item 32698 Wrangling Rope only target 22181 Aether Ray’);[/sql]

Todo: understand SMART_ACTION_FOLLOW.


Use spell names instead of IDs in comments. /emoticons/default_wink.png

Looks fine

No need to listen to him. Just add comments next to setting the spells at beginnings for faster checking and reading (not to mention it’s much nicer to see a spell name somewhere) and that’s it /emoticons/default_tongue.png

Also, if your fixes are complete, post them in the issue tracker, ty for your work

Ty for your answers.

Edited, fixed some typos. Still WIP.

Tested under 5d236ef , the ray does not cast the ‘Wrangle Aether Rays: Wrangling Rope Channel’ on the player. Any ideas ? is it working on a higher rev ? I can’t update my core, not that I do not want. I know there have been changes by QAston about forcecast, but hell, I can’t update :s

Further more, I don’t know how I can force the rays to follow the players when they have this spell. Maybe any “pet-like” spell, but I can’t find it.

Only video I found is

(begins to be interesting at 2:00)

I need someone to test this on tip rev, please.

(First post updated)

It doesn’t make much sense to have the same numbers (spell ids) that are in the other fields in the comment too. It would be much useful to see the spell names in the comments

Discovered is just trying to be a good apprentice (of me) /emoticons/default_smile.png

The third delete sql query should be source_type 0 (I edited the first topic)

Thank you, Nay.

Core side issue imo, forcecasting does not set the summoner to the player.

IE. all that does not work at all:

(@WRAY,0,0,1,54,0,100,0x01,0,0,0,0,11,@AURA,0x03,0,0,0,0,23,0,0,0,0,0,0,0,'Wrangled Aether Ray - Cast "Wrangle Aether Rays: Wrangling Rope Channel" 40926 on summoner'), (@WRAY,0,1,2,61,0,100,0x01,0,0,0,0,33,@WRAY,0,0,0,0,0,23,0,0,0,0,0,0,0,'Wrangled Aether Ray - Give kill credit to summoner'), (@WRAY,0,2,3,61,0,100,0x01,0,0,0,0,41,120000,0,0,0,0,0,23,0,0,0,0,0,0,0,'Wrangled Aether Ray - Despawn after 2 minutes');-- ,



SmartScript::ProcessAction: Entry 23343 SourceType 0, Event 2, Link Event 3 not found or invalid, skipped.

SmartScript::ProcessAction: Entry 2218100 SourceType 9, Event 1, Link Event 61 not found or invalid, skipped.

Will work on it soon ™.

You do not need to set angle and dist for ACTION_FOLLOW btw…

Hello, did you ever get this to work?

Yes I did, and will push it soon.