[Wip] Quest : Help!

Moving the core script which is very un-blizzlike to SAI seems a bit troublesome for me at the moment, so I’m asking for some help on this one.

[CODE]-- [Q] HELP!
– Corki SAI
– Corki’s Prison SAI
SET @ENTRY_CORKI := 18369;
SET @ENTRY_PRISON := 182349;
SET @QUEST := 9923;
UPDATE creature_template SET AIName=‘SmartAI’,ScriptName=‘’ WHERE entry=@ENTRY_CORKI;
UPDATE gameobject_template SET AIName =‘SmartGameObjectAI’,ScriptName=‘’ WHERE entry=@ENTRY_PRISON;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY_CORKI AND source_type=0;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY_PRISON AND source_type=1;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY_CORKI*100 AND source_type=9;
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_CORKI,0,0,0,1,0,100,0,0,0,55000,65000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,“Corki - Out of Combat - Say Line 0 (random)”),
(@ENTRY_CORKI,0,1,0,45,0,100,0,1,1,0,0,1,1,0,0,0,0,0,21,15,0,0,0,0,0,0,“Corki - On Data Set - Say Line 1”),
– (@ENTRY_CORKI,0,1,0,25,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,22795,182349,0,0,0,0,0,“Corki - On Respawn - Reset Corki’s Prison”),
(@ENTRY_PRISON,1,0,1,70,0,100,0,2,0,0,0,33,@ENTRY_CORKI,0,0,0,0,0,7,0,0,0,0,0,0,0,“Corki’s Prison - On Open - Quest Credit for HELP!”),
(@ENTRY_PRISON,1,1,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@ENTRY_CORKI,0,0,0,0,0,0,“Corki’s Prison - On Open - Set Data Corki”);

– Text for Corki
DELETE FROM script_texts WHERE npc_entry=@ENTRY_CORKI;
DELETE FROM creature_text WHERE entry=@ENTRY_CORKI;
INSERT INTO creature_text (entry,groupid,id,TEXT,type,language,probability,emote,duration,sound,comment) VALUES
(@ENTRY_CORKI,0,0,“Hey fatso, how do you go to the bathroom with all that fat!?”,12,0,100,0,0,0,“Corki”),
(@ENTRY_CORKI,0,1,“I want my daddy!”,12,0,100,0,0,0,“Corki”),
(@ENTRY_CORKI,1,0,“Thanks, $r! I’m sure my dad will reward you greatly! Bye!”,12,0,100,0,0,0,“Corki”);

– Corki gossip update
UPDATE creature_template SET gossip_menu_id=@ENTRY_CORKI WHERE entry=@ENTRY_CORKI;
(@ENTRY_CORKI, 9357);
– Corki spawn swapping
UPDATE creature SET id=18369 WHERE guid=65849;
UPDATE creature SET id=18445 WHERE guid=65786;
– Corki quest relations
DELETE FROM creature_involvedrelation WHERE quest=9954;
INSERT INTO creature_involvedrelation VALUES
DELETE FROM creature_questrelation WHERE quest IN (9923,9955);
INSERT INTO creature_questrelation VALUES

Moving the core script to SAI, I did the following: NPC Corki 18445 was swapped with NPC Corki 18369 (They had wrong spawns), subsequently quests were swapped aswell. I added gossip and started scripting him in SAI. Using the cage works, you get credit, but it stops here, the script stops working, probably because of the implementation. What should happen? You use the cage, you get credit, Corki says a line, and he despawns with the cage resetting when he respawns. Thanks Aokromes for the creature_text sniffs. Also thanks Discovered for the input. Any other input would help me out here /emoticons/default_smile.png

Make a timed actionlist? (action_type 80 + source_type 9)