Created
October 20, 2013 21:06
-
-
Save warmist/7075345 to your computer and use it in GitHub Desktop.
A eventful test script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ev=require("plugins.eventful") | |
local freq={[1]=10,[2]=5,[3]=500,[4]=1000,[5]=500,[6]=100,[7]=1,[8]=1000} | |
for k,v in pairs(freq) do | |
ev.enableEvent(k,v) | |
end | |
ev.onBuildingCreatedDestroyed.one=function(id) print("building cr/d:",id) end | |
ev.onConstructionCreatedDestroyed.one=function(id) print("construct cr/d:",id) end | |
ev.onJobInitiated.one=function(job) print("job init:",job) end | |
ev.onJobCompleted.one=function(job) print("job complete :",job) end | |
ev.onUnitDeath.one=function(id) print("death:",id) end | |
ev.onItemCreated.one=function(id) print("item cr:",id) end | |
ev.onSyndrome.one=function(id1,id2) print("syndrome",id1,id2) end | |
ev.onInvasion.one=function(id) print("building cr/d:",id) end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment