Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little problem with sql request #1

Open
badmoon opened this issue Aug 13, 2013 · 6 comments
Open

Little problem with sql request #1

badmoon opened this issue Aug 13, 2013 · 6 comments

Comments

@badmoon
Copy link

badmoon commented Aug 13, 2013

IF a creature have 2 or more ID of script but is not consecutive it will take only the first consecutive one ( Highest one).

EXEMPLE

One id is 31000035

and the other one is 32000014

so the EAI have 2 ID but it will parse only one in SAI cause its not consecutive.

INSERT INTO creature_ai_scripts(id, creature_id, event_type, event_inverse_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action1_type, action1_param1, action1_param2, action1_param3, action2_type, action2_param1, action2_param2, action2_param3, action3_type, action3_param1, action3_param2, action3_param3, comment) VALUES 
(31000035, 16643, 1, 0, 100, 1, 30000, 30000, 470000, 470000, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Silvermoon city'),
(32000014, 16643, 1, 0, 100, 1, 30000, 30000, 470000, 470000, 1, -100014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Random OOC Say');

1 RESULT in sai only suposed to be 2

-- Razia SAI
SET @ENTRY := 16643;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
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,1,0,100,0,30000,30000,470000,470000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Razia - Out Of Combat - Say Line 0");
@Vincent-Michael
Copy link

what is wrong? emote is possible with creature_text

@Warpten
Copy link

Warpten commented Aug 13, 2013

AFAIK the parser doesn't rely on eai's event id but I can't check atm.

Pour autant que je me souvienne le parser ne considère pas la première colonne des EAI mais je peux me tromper pour X raisons

@JasperAppec
Copy link

I'm not sure if I understand the issue, could someone elaborate?

@badmoon
Copy link
Author

badmoon commented Aug 13, 2013

Example if a creature as 3 ID

1 - 3 - 5 (IT will not parse the 3 cause they are not consecutive - IT will choose 1 one the 3 only)

1 -2 -3 ( WIll parse the 3 and it will be ok)

@Warpten
Copy link

Warpten commented Aug 20, 2013

It's not ignoring it because it's not consecutive, all the script does is order eai events by id. Then they're pushed onto a stack. Anyway why aren't you using the fact that EAI allows 3 actions per event?

@JasperAppec
Copy link

I still don't get it by the way. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants