trinitycore / eventai-to-smartai Goto Github PK
View Code? Open in Web Editor NEWThis project forked from armano2/eventai-to-smartai
Conversion of EventAI (EAI) to SmartAI (SAI) for TrinityCore.
This project forked from armano2/eventai-to-smartai
Conversion of EventAI (EAI) to SmartAI (SAI) for TrinityCore.
About this software: This PHP script is intended to convert any EventAI script to TrinityCore's SmartAI. It's aim is not to be efficient, fast, and so on, but solely to be working. It cannot, by any mean, damage your database, as it performs only SELECT queries and will output UPDATE, INSERT, DELETE and TRUNCATE queries to *.sql files. HOW-TO-USE Head into the directory where you installed that script. Go to the 'Build' directory and copy the `config.ini` file from that directory to the PHP directory. Open the file with your favorite file editor and change your database settings accordingly to what is needed for the script to run on your database. Save the file, and close your editor. Add a directory called `dbcs` in the directory `dep` and parse a Spell.dbc file there. The Spell.dbc file must be English (at least that what it looks like), else spell names are not printed correctly (at all). Linuxers: Make sure you have PHP installed, and that you have the PDO library as well. If you don't know how to install it, get a tour on PHP's online documentation. Windowsers: That's pretty much the same, except you'll have to add the directory where your PHP.exe relies to your PATH environment variable. Ask Google for more informations, there are plenty of places where you can learn what this is. Once you're about to issue the 'php runme.php' command, your cmd must be in the directory where the runme.php file is, else you'll get a fatal error. From now, things are pretty straigtforward. Head to the directory where you downloaded the source, and issue the `php runme.php` command. The script will start and work on its own. Go get a cofee, and when you're back you'll notice two *.sql files in the directoy. These are the files you have to apply to your world database to be able to effectively wipe EventAI from your database, and thus from the core! Thanks to: Warpten, Discover-, Horn As for the older project (where we were converting them by hand), thanks to the following people: Warpten, Discover-, Horn, Kandera, Valvorb, ZxBiohazardZx Thanks for reading The EAI2SAI PHP Developer (Aka ME, narcissism at its peak)
IF a creature have 2 or more ID of script but is not consecutive it will take only the first consecutive one ( Highest one).
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");
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.