Menu ▾ ▴

Home

kizura

eaiLilly

eaiLilly is a mini language written in groovy.
You specify your EventAI needs in a human readable way and the program compiles
it to SQL so you can share/upload your scripts.

eaiLilly in action:

eaiLilly in action

Installation

You need eclipse 3.5 or later
You need the groovy plugin from codehaus.org

Get the complete eaiLilly code using Git.
Import the project

Navigate to folder "lillyScripts" and open a file with eclipse.
You now see the source-code of some eaiLilly.
This source code will compile to SQL, if you run the script

Compilation

Right click on the souce-code in the package explorer (left side).
Choose "Run as..." Select "Groovy Script"
This will compile your script to SQL - see console output

Example:

/*
 Quest: 11899 -- Seelen der vom Fluch befreiten
 Spieler muss "Grossmutters Seelenfänger" (Item: 35401, Spell: 46485)
 auf Leichen der "Mechagnom von Kurbelzisch" (ID: 25814) anwenden.
*/

myConditions = new conditions()
myConditions.ScriptComment = "Item \"The Greatmother's Soulcatcher\" (35401) can only be used on the corpses of \"Fizzcrank Mechagnome\" (25814)"
myConditions.SourceTypeOrReferenceId = conditions.CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET // 18
myConditions.SourceGroup = 0
myConditions.SourceEntry = 35401 // Item ID
myConditions.ConditionTypeOrReference = conditions.CONDITION_ITEM_TARGET // 24
myConditions.ElseGroup = 0 
myConditions.ConditionValue1 = 2 // ConditionValue1: ItemRequiredTargetType (CREATURE[1], DEAD[2])  
myConditions.ConditionValue2 = 25814 // ConditionValue2: creature entry
myConditions.ConditionValue3 = 0
myConditions.ErrorTextId = 0
myConditions.Comment = 'Quest: Souls of the Decursed -- The Greatmother s Soulcatcher'
myConditions.toSQLExtend()

mySpellScript = new spell_scripts(46485)
mySpellScript.ScriptComment = "If the spell '46485' affects a dead \"Fizzcrank Mechagnome\" add \"Gnome Soul\" to the player's quest progess" 
mySpellScript.effIndex = 0
mySpellScript.delay = 0
mySpellScript.command = spell_scripts.CMD_KILL_CREDIT
mySpellScript.datalong =  26096 // NPC: "Gnomische Seele"
mySpellScript.datalong2 = 1 // datalong2: If value > 0 gives kill credit to the whole group player belongs to, otherwise, gives personal kill credit. 
mySpellScript.dataint = 0 
mySpellScript.x = 0
mySpellScript.y = 0
mySpellScript.z = 0
mySpellScript.o = 0
mySpellScript.toSQLExtend()

Run as... Groovy script:

-- Item "The Greatmother's Soulcatcher" (35401) can only be used on the corpses of "Fizzcrank Mechagnome" (25814)
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=35401;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ElseGroup`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`Comment`)
VALUES 
(18,0,35401,24,0,2,25814,0,0, 'Quest: Souls of the Decursed -- The Greatmother s Soulcatcher');
-- If the spell '46485' affects a dead "Fizzcrank Mechagnome" add "Gnome Soul" to the player's quest progess
DELETE FROM `spell_scripts` WHERE `id`=46485;
INSERT INTO `spell_scripts`(`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`)
VALUES 
(46485,0,0,8,26096,1,0,0,0,0,0);