repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/droid/component/medic_module_6.lua
2
3430
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_droid_component_medic_module_6 = object_draft_schematic_droid_component_shared_medic_module_6:new { templateType = DRAFTSCHEMATIC, customObjectName = "Level 6 Droid Medical Module", craftingToolTab = 32, -- (See DraftSchemticImplementation.h) complexity = 25, size = 2, xpType = "crafting_droid_general", xp = 90, assemblySkill = "droid_assembly", experimentingSkill = "droid_experimentation", customizationSkill = "droid_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n"}, ingredientTitleNames = {"module_frame", "data_storage_matrix", "med_assist_module", "medical_database"}, ingredientSlotType = {0, 0, 1, 1}, resourceTypes = {"aluminum_duralumin", "metal", "object/tangible/component/item/shared_electronics_gp_module.iff", "object/tangible/component/item/shared_electronics_memory_module.iff"}, resourceQuantities = {25, 20, 1, 3}, contribution = {100, 100, 100, 100}, targetTemplate = "object/tangible/component/droid/medic_module_6.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_droid_component_medic_module_6, "object/draft_schematic/droid/component/medic_module_6.iff")
agpl-3.0
mswf/MeepMeep
lua/base/assets/assetmanager.lua
1
3758
ShaderTypes = { VERTEX = "VERTEX", GEOMETRY = "GEOMETRY", FRAGMENT = "FRAGMENT", TESS_CONTROL = "TESS_CONTROL", TESS_EVALUATION = "TESS_EVALUATION", } AssetManager = class(AssetManager, function(self) self._importedShaders = {} self._importedTextures = {} self._importedModels = {} self.broadcaster = Broadcaster() end) function AssetManager:importShader(path, shaderType) if (not self._importedShaders[path]) then if (Engine.importShader(path, shaderType)) then self._importedShaders[path] = { shaderType = shaderType -- #TODO:0 debug information also? } else Log.warning("[AssetLoader] shader import failed: " .. tostring(path)) end else Log.warning("[AssetLoader] tried to re-import shader at path: " .. tostring(path)) end end function AssetManager:importTexture(path) if (not self._importedTextures[path]) then if (Engine.importTexture(path)) then self._importedTextures[path] = { -- #TODO:10 debug information also? } else Log.warning("[AssetLoader] texture import failed: " .. tostring(path)) end else Log.warning("[AssetLoader] tried to re-import shader at path: " .. tostring(path)) end end function AssetManager:importModel(path, scale) if (not self._importedModels[path]) then if (Engine.importModel(path)) then self._importedModels[path] = { scale = scale -- #TODO:20 debug information also? } else Log.warning("[AssetLoader] model import failed: " .. tostring(path)) end else Log.warning("[AssetLoader] tried to re-import shader at path: " .. tostring(path)) end end function AssetManager:onFileChanged(fullPath) local path = fullPath local type = nil do local stringLength = string.len(path) dotPosition = string.find(path, "%.") type = string.sub(path, dotPosition+1) path = string.sub(path, 1, dotPosition-1) -- Windows path fixing step path = string.gsub(path, "\\", "/") -- Mac returns the full filepath, this step strips away the first part -- You're now left with only the reletive path local projectStart, projectEnd = string.find(path, "MeepMeep/") if (not projectStart) then projectStart, projectEnd = string.find(path, "HonkHonk/") end if (projectStart) then path = string.sub(path, projectEnd + 1) end end local isSucces = false if (type == "lua") then if (package.loaded[path]) then Log.warning("Reloaded lua file: " .. tostring(path)) package.loaded[path] = nil require(path) class:__hotReloadClasses() isSucces = true else -- Log.warning("Package: ".. tostring(path) .. " was not loaded") isSucces = false end elseif (type == "glsl") then self:reloadShader(path, type) elseif (type == "obj") then self:reloadModel(path, type) elseif (type == "png" or type == "jpg" or type == "jpeg") then self:reloadTexture(path, type) else isSucces = false end self.broadcaster:broadcast(path, {path = path, type = type, reloaded = isSucces}) return isSucces end function AssetManager:reloadShader(path, type) if (Engine.isShaderLoaded(path .. "." .. type)) then Log.warning("Reloaded shader: " .. tostring(path) .. ", extension: " .. tostring(type)) Engine.reloadShader(path .. "." .. type) end end function AssetManager:reloadTexture(path, type) if (Engine.isTextureLoaded(path .. "." .. type)) then Log.warning("Reloaded texture: " .. tostring(path) .. ", extension: " .. tostring(type)) Engine.reloadTexture(path .. "." .. type) end end function AssetManager:reloadModel(path, type) if (Engine.isModelLoaded(path .. "." .. type)) then Log.warning("Reloaded model: " .. tostring(path) .. ", extension: " .. tostring(type)) -- Engine.reloadModel(path .. "." .. type) Log.error("Engine.reloadModel not implemented yet!") end end
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/space/chassis/texture_kit_s06.lua
2
3230
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_space_chassis_texture_kit_s06 = object_draft_schematic_space_chassis_shared_texture_kit_s06:new { templateType = DRAFTSCHEMATIC, customObjectName = "Starship Texture Kit, Style 6", craftingToolTab = 131072, -- (See DraftSchemticImplementation.h) complexity = 15, size = 1, xpType = "shipwright", xp = 44, assemblySkill = "general_assembly", experimentingSkill = "general_experimentation", customizationSkill = "medicine_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n"}, ingredientTitleNames = {"casing", "paint"}, ingredientSlotType = {0, 0}, resourceTypes = {"steel", "petrochem_inert"}, resourceQuantities = {50, 125}, contribution = {100, 100}, targetTemplate = "object/tangible/ship/crafted/chassis/texture_kit_s06.iff", additionalTemplates = { "object/tangible/ship/crafted/chassis/shared_texture_kit_s06.iff", } } ObjectTemplates:addTemplate(object_draft_schematic_space_chassis_texture_kit_s06, "object/draft_schematic/space/chassis/texture_kit_s06.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/poi/tatooine_dunestalkers_large1.lua
2
2274
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_building_poi_tatooine_dunestalkers_large1 = object_building_poi_shared_tatooine_dunestalkers_large1:new { gameObjectType = 531, } ObjectTemplates:addTemplate(object_building_poi_tatooine_dunestalkers_large1, "object/building/poi/tatooine_dunestalkers_large1.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Apollyon/mobs/Water_Elemental.lua
35
2314
----------------------------------- -- Area: Apollyon SW -- NPC: elemental ----------------------------------- package.loaded["scripts/zones/Apollyon/TextIDs"] = nil; ----------------------------------- require("scripts/globals/limbus"); require("scripts/zones/Apollyon/TextIDs"); ----------------------------------- function onMobSpawn(mob) end; function onMobEngaged(mob,target) end; function onMobDeath(mob, player, isKiller) end; function onMobDespawn(mob) local mobID = mob:getID(); -- print(mobID); local mobX = mob:getXPos(); local mobY = mob:getYPos(); local mobZ = mob:getZPos(); local elementalday = GetServerVariable("[SW_Apollyon]ElementalTrigger") - 1; local correctelement=false; switch (elementalday): caseof { [0] = function (x) if (mobID==16932913 or mobID==16932921 or mobID==16932929) then correctelement=true; end end , [1] = function (x) if (mobID==16932912 or mobID==16932920 or mobID==16932928 ) then correctelement=true; end end , [2] = function (x) if (mobID==16932916 or mobID==16932924 or mobID==16932932 ) then correctelement=true; end end , [3] = function (x) if (mobID==16932910 or mobID==16932918 or mobID==16932926 ) then correctelement=true; end end , [4] = function (x) if (mobID==16932914 or mobID==16932922 or mobID==16932930 ) then correctelement=true; end end , [5] = function (x) if (mobID==16932917 or mobID==16932925 or mobID==16932933 ) then correctelement=true; end end , [6] = function (x) if (mobID==16932931 or mobID==16932915 or mobID==16932923 ) then correctelement=true; end end , [7] = function (x) if (mobID==16932911 or mobID==16932919 or mobID==16932927 ) then correctelement=true; end end , }; if (correctelement==true and IselementalDayAreDead() == true) then GetNPCByID(16932864+313):setPos(mobX,mobY,mobZ); GetNPCByID(16932864+313):setStatus(STATUS_NORMAL); end end;
gpl-3.0
njligames/NJLIGameEngine
src/njli/platform/cmake.in/ldoc.in/PhysicsShapeBvhTriangleMesh.lua
4
3734
---- -- @file PhysicsShapeBvhTriangleMesh ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:calculateSerializeBufferSize() end ---- Brief description. -- <#Description#> -- @param btSerializer <#btSerializer description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:serialize(btSerializer) end ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getClassName() end ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getType() end ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getNumVertices() end ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getNumEdges() end ---- Brief description. -- <#Description#> -- @param i <#i description#> -- @param pa <#pa description#> -- @param pb <#pb description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getEdge(i, pa, pb) end ---- Brief description. -- <#Description#> -- @param i <#i description#> -- @param vtx <#vtx description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getVertex(i, vtx) end ---- Brief description. -- <#Description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getNumPlanes() end ---- Brief description. -- <#Description#> -- @param planeNormal <#planeNormal description#> -- @param planeSupport <#planeSupport description#> -- @param i <#i description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:getPlane(planeNormal, planeSupport, i) end ---- Brief description. -- <#Description#> -- @param pt <#pt description#> -- @param tolerance <#tolerance description#> -- @return <#return value description#> function PhysicsShapeBvhTriangleMesh:isInside(pt, tolerance) end ---- Brief description. -- <#Description#> -- @param size <#size description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.createArray(size) end ---- Brief description. -- <#Description#> -- @param array <#array description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.destroyArray(array) end ---- Brief description. -- <#Description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.create() end ---- Brief description. -- <#Description#> -- @param builder <#builder description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.create(builder) end ---- Brief description. -- <#Description#> -- @param object <#object description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.clone(object) end ---- Brief description. -- <#Description#> -- @param object <#object description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.copy(object) end ---- Brief description. -- <#Description#> -- @param object <#object description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.destroy(object) end ---- Brief description. -- <#Description#> -- @param object <#object description#> -- @param L <#L description#> -- @param stack_index <#stack_index description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.load(object, L, stack_index) end ---- Brief description. -- <#Description#> -- @return <#return value description#> function NJLI.PhysicsShapeBvhTriangleMesh.type() end
mit
MHPG/MegaBreakerTG
plugins/GP_Manager.lua
6
10684
--moderation.json do local function create_group(msg) if not is_admin(msg) then return "You Are Not Global Admin" end local group_creator = msg.from.print_name create_group_chat (group_creator, group_name, ok_cb, false) return 'Group '..string.gsub(group_name, '_', ' ')..' Created, Check Your Messages' end local function set_description(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local data_cat = 'description' data[tostring(msg.to.id)][data_cat] = deskripsi save_data(_config.moderation.data, data) return 'This Message Seted For About:\n'..deskripsi end local function get_description(msg, data) local data_cat = 'description' if not data[tostring(msg.to.id)][data_cat] then return 'Group Have Not About' end local about = data[tostring(msg.to.id)][data_cat] return about end local function set_rules(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local data_cat = 'rules' data[tostring(msg.to.id)][data_cat] = rules save_data(_config.moderation.data, data) return 'This Message Seted For Rules:\n'..rules end local function get_rules(msg, data) local data_cat = 'rules' if not data[tostring(msg.to.id)][data_cat] then return 'Group Have Not Rules' end local rules = data[tostring(msg.to.id)][data_cat] return rules end local function lock_group_name(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local group_name_set = data[tostring(msg.to.id)]['settings']['set_name'] local group_name_lock = data[tostring(msg.to.id)]['settings']['lock_name'] if group_name_lock == 'yes' then return 'Group Name is Already Locked' else data[tostring(msg.to.id)]['settings']['lock_name'] = 'yes' save_data(_config.moderation.data, data) data[tostring(msg.to.id)]['settings']['set_name'] = string.gsub(msg.to.print_name, '_', ' ') save_data(_config.moderation.data, data) return 'Group Name Locked' end end local function unlock_group_name(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local group_name_set = data[tostring(msg.to.id)]['settings']['set_name'] local group_name_lock = data[tostring(msg.to.id)]['settings']['lock_name'] if group_name_lock == 'no' then return 'Group Name is Not Locked' else data[tostring(msg.to.id)]['settings']['lock_name'] = 'no' save_data(_config.moderation.data, data) return 'Group Name Unlocked' end end local function lock_group_member(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local group_member_lock = data[tostring(msg.to.id)]['settings']['lock_member'] if group_member_lock == 'yes' then return 'Group Members Are Already Locked' else data[tostring(msg.to.id)]['settings']['lock_member'] = 'yes' save_data(_config.moderation.data, data) end return 'Group Members Locked' end local function unlock_group_member(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local group_member_lock = data[tostring(msg.to.id)]['settings']['lock_member'] if group_member_lock == 'no' then return 'Group Members Are Not Locked' else data[tostring(msg.to.id)]['settings']['lock_member'] = 'no' save_data(_config.moderation.data, data) return 'Group Members Unlocked' end end local function lock_group_photo(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local group_photo_lock = data[tostring(msg.to.id)]['settings']['lock_photo'] if group_photo_lock == 'yes' then return 'Group Photo is Already Locked' else data[tostring(msg.to.id)]['settings']['set_photo'] = 'waiting' save_data(_config.moderation.data, data) end return 'Send Group Photo Now' end local function unlock_group_photo(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local group_photo_lock = data[tostring(msg.to.id)]['settings']['lock_photo'] if group_photo_lock == 'no' then return 'Group Photo is Not Locked' else data[tostring(msg.to.id)]['settings']['lock_photo'] = 'no' save_data(_config.moderation.data, data) return 'Group Photo Unlocked' end end local function set_group_photo(msg, success, result) local data = load_data(_config.moderation.data) local receiver = get_receiver(msg) if success then local file = 'data/photos/chat_photo_'..msg.to.id..'.jpg' print('File downloaded to:', result) os.rename(result, file) print('File moved to:', file) chat_set_photo (receiver, file, ok_cb, false) data[tostring(msg.to.id)]['settings']['set_photo'] = file save_data(_config.moderation.data, data) data[tostring(msg.to.id)]['settings']['lock_photo'] = 'yes' save_data(_config.moderation.data, data) send_large_msg(receiver, 'Group Photo Lock and Seted', ok_cb, false) else print('Error downloading: '..msg.id) send_large_msg(receiver, 'Failed Please try Again', ok_cb, false) end end local function show_group_settings(msg, data) if not is_momod(msg) then return "You Are Not Moderator" end local settings = data[tostring(msg.to.id)]['settings'] local text = "Group Settings:\n\nLock Group Name : "..settings.lock_name.."\nLock Group Photo : "..settings.lock_photo.."\nLock Group Member : "..settings.lock_member return text end function run(msg, matches) if matches[1] == 'makegroup' and matches[2] then group_name = matches[2] return create_group(msg) end if not is_chat_msg(msg) then return "This is Not Group" end local data = load_data(_config.moderation.data) local receiver = get_receiver(msg) if msg.media and is_chat_msg(msg) and is_momod(msg) then if msg.media.type == 'photo' and data[tostring(msg.to.id)] then if data[tostring(msg.to.id)]['settings']['set_photo'] == 'waiting' then load_photo(msg.id, set_group_photo, msg) end end end if data[tostring(msg.to.id)] then local settings = data[tostring(msg.to.id)]['settings'] if matches[1] == 'setabout' and matches[2] then deskripsi = matches[2] return set_description(msg, data) end if matches[1] == 'about' then return get_description(msg, data) end if matches[1] == 'setrules' then rules = matches[2] return set_rules(msg, data) end if matches[1] == 'rules' then return get_rules(msg, data) end if matches[1] == '' and matches[2] == 'lock' then if matches[3] == 'name' then return lock_group_name(msg, data) end if matches[3] == 'member' then return lock_group_member(msg, data) end if matches[3] == 'photo' then return lock_group_photo(msg, data) end end if matches[1] == '' and matches[2] == 'unlock' then if matches[3] == 'name' then return unlock_group_name(msg, data) end if matches[3] == 'member' then return unlock_group_member(msg, data) end if matches[3] == 'photo' then return unlock_group_photo(msg, data) end end if matches[1] == '' and matches[2] == 'settings' then return show_group_settings(msg, data) end if matches[1] == 'chat_rename' then if not msg.service then return "Are You Trying to Troll Me?" end local group_name_set = settings.set_name local group_name_lock = settings.lock_name local to_rename = 'chat#id'..msg.to.id if group_name_lock == 'yes' then if group_name_set ~= tostring(msg.to.print_name) then rename_chat(to_rename, group_name_set, ok_cb, false) end elseif group_name_lock == 'no' then return nil end end if matches[1] == 'setname' and is_momod(msg) then local new_name = string.gsub(matches[2], '_', ' ') data[tostring(msg.to.id)]['settings']['set_name'] = new_name save_data(_config.moderation.data, data) local group_name_set = data[tostring(msg.to.id)]['settings']['set_name'] local to_rename = 'chat#id'..msg.to.id rename_chat(to_rename, group_name_set, ok_cb, false) end if matches[1] == 'setphoto' and is_momod(msg) then data[tostring(msg.to.id)]['settings']['set_photo'] = 'waiting' save_data(_config.moderation.data, data) return 'Send Group Photo Now' end if matches[1] == 'chat_add_user' then if not msg.service then return "Are You Trying to Troll Me?" end local group_member_lock = settings.lock_member local user = 'user#id'..msg.action.user.id local chat = 'chat#id'..msg.to.id if group_member_lock == 'yes' then chat_del_user(chat, user, ok_cb, true) elseif group_member_lock == 'no' then return nil end end if matches[1] == 'chat_delete_photo' then if not msg.service then return "Are You Trying to Troll Me?" end local group_photo_lock = settings.lock_photo if group_photo_lock == 'yes' then chat_set_photo (receiver, settings.set_photo, ok_cb, false) elseif group_photo_lock == 'no' then return nil end end if matches[1] == 'chat_change_photo' and msg.from.id ~= 0 then if not msg.service then return "Are You Trying to Troll Me?" end local group_photo_lock = settings.lock_photo if group_photo_lock == 'yes' then chat_set_photo (receiver, settings.set_photo, ok_cb, false) elseif group_photo_lock == 'no' then return nil end end end end return { description = "Group Manager", usage = { "!makegroup <Name> : Create New Group", "!setabout <Message> : Set About For Group", "!setrules <Message> : Set Rules For Group", "!setname <Name> : Set Name For Group", "!setphoto : Set Photo For Group", "!lock name : Lock Group Name", "!lock photo : Lock Group Photo", "!lock member : Lock Group Member", "!unlock name : Unlock Group Name", "!unlock photo : Unlock Group Photo", "!unlock member : Unlock Group Member", "!settings : View Group Settings" "!about : View Group About", "!rules : View Group Rules", }, patterns = { "^!(makegroup) (.*)$", "^!(setabout) (.*)$", "^!(setrules) (.*)$", "^!(setname) (.*)$", "^!(setphoto)$", "^!() (lock) (.*)$", "^!() (unlock) (.*)$", "^!() (settings)$", "^!(about)$", "^!(rules)$", "^!!tgservice (.+)$", "%[(photo)%]", }, run = run, } end
gpl-2.0
KingRaptor/Zero-K
units/gunshipaa.lua
1
4896
unitDef = { unitname = [[gunshipaa]], name = [[Trident]], description = [[Anti-Air Gunship]], acceleration = 0.18, airStrafe = 0, bankingAllowed = false, brakeRate = 0.4, buildCostMetal = 270, builder = false, buildPic = [[gunshipaa.png]], canAttack = true, canFly = true, canGuard = true, canMove = true, canPatrol = true, canSubmerge = false, category = [[GUNSHIP]], collisionVolumeOffsets = [[0 0 0]], collisionVolumeScales = [[36 36 36]], collisionVolumeType = [[ellipsoid]], collide = true, corpse = [[DEAD]], cruiseAlt = 110, customParams = { --description_fr = [[ADAV Pilleur]], description_de = [[Flugabwehr Hubschrauber]], helptext = [[The Trident is a slow gunship that cuts down enemy aircraft with missiles. It is much slower than other gunships, so it is much easier to kill the Trident with ground units than with planes.]], --helptext_fr = [[des missiles pr?cis et une vitesse de vol appr?ciable, le Rapier saura vous d?fendre contre d'autres pilleurs ou mener des assauts rapides.]], --helptext_de = [[Der Rapier ist ein leichter Raiderhubschrauber. Seine Raketen sind akkurat und treffen auch Lufteinheiten. Des Weiteren erweist er sich gegen kleine Ziele und als Gegenwehr gegen andere Raider als sehr nützlich.]], modelradius = [[18]], midposoffset = [[0 15 0]], selection_velocity_heading = 1, }, explodeAs = [[GUNSHIPEX]], floater = true, footprintX = 3, footprintZ = 3, hoverAttack = true, iconType = [[gunshipaa]], idleAutoHeal = 5, idleTime = 1800, maxDamage = 900, maxVelocity = 3.8, minCloakDistance = 75, noAutoFire = false, noChaseCategory = [[TERRAFORM LAND SINK TURRET SHIP SWIM FLOAT SUB HOVER]], objectName = [[trifighter.s3o]], script = [[gunshipaa.lua]], selfDestructAs = [[GUNSHIPEX]], sfxtypes = { explosiongenerators = { [[custom:rapiermuzzle]], }, }, sightDistance = 660, turnRate = 0, workerTime = 0, weapons = { { def = [[AA_MISSILE]], --badTargetCategory = [[GUNSHIP]], onlyTargetCategory = [[GUNSHIP FIXEDWING]], }, }, weaponDefs = { AA_MISSILE = { name = [[Homing Missiles]], areaOfEffect = 48, avoidFeature = false, canattackground = false, cegTag = [[missiletrailblue]], collideFriendly = false, craterBoost = 1, craterMult = 2, cylinderTargeting = 1, customParams = { isaa = [[1]], script_reload = [[10]], script_burst = [[3]], light_camera_height = 2500, light_radius = 200, light_color = [[0.5 0.6 0.6]], }, damage = { default = 20.01, planes = 200.1, subs = 3.5, }, explosionGenerator = [[custom:FLASH2]], fireStarter = 70, fixedlauncher = true, flightTime = 3, impulseBoost = 0, impulseFactor = 0.4, interceptedByShieldType = 2, model = [[wep_m_fury.s3o]], noSelfDamage = true, range = 750, reloadtime = 1.2, smokeTrail = true, soundHit = [[weapon/missile/rocket_hit]], soundStart = [[weapon/missile/missile_fire7]], startVelocity = 650, texture2 = [[AAsmoketrail]], texture3 = [[null]], tolerance = 32767, tracks = true, turnRate = 90000, turret = false, weaponAcceleration = 550, weaponTimer = 0.2, weaponType = [[StarburstLauncher]], weaponVelocity = 700, }, }, featureDefs = { DEAD = { blocking = true, featureDead = [[HEAP]], footprintX = 2, footprintZ = 2, object = [[trifighter_dead.s3o]], }, HEAP = { blocking = false, footprintX = 2, footprintZ = 2, object = [[debris3x3c.s3o]], }, }, } return lowerkeys({ gunshipaa = unitDef })
gpl-2.0
Whitechaser/darkstar
scripts/globals/items/slice_of_dhalmel_meat.lua
2
1105
----------------------------------------- -- ID: 4359 -- Item: slice_of_dhalmel_meat -- Food Effect: 5Min, Galka only ----------------------------------------- -- Strength 3 -- Intelligence -5 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- function onItemCheck(target) local result = 0; if (target:getRace() ~= 8) then result = 247; end if (target:getMod(MOD_EAT_RAW_MEAT) == 1) then result = 0; end if (target:hasStatusEffect(dsp.effects.FOOD) == true or target:hasStatusEffect(dsp.effects.FIELD_SUPPORT_FOOD) == true) then result = 246; end return result; end; function onItemUse(target) target:addStatusEffect(dsp.effects.FOOD,0,0,300,4359); end; ----------------------------------------- -- onEffectGain Action ----------------------------------------- function onEffectGain(target,effect) target:addMod(MOD_STR, 3); target:addMod(MOD_INT, -5); end; function onEffectLose(target, effect) target:delMod(MOD_STR, 3); target:delMod(MOD_INT, -5); end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/structure/general/rock_beach_dark_md.lua
3
2260
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_structure_general_rock_beach_dark_md = object_static_structure_general_shared_rock_beach_dark_md:new { } ObjectTemplates:addTemplate(object_static_structure_general_rock_beach_dark_md, "object/static/structure/general/rock_beach_dark_md.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/screenplays/tasks/rori/booto_lubble.lua
1
2171
booto_lubble_missions = { { missionType = "confiscate", primarySpawns = { { npcTemplate = "luhin_jinnor", planetName = "rori", npcName = "Warrant Officer Luhin Jinnor" } }, secondarySpawns = { { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" }, { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" }, { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" } }, itemSpawns = { { itemTemplate = "object/tangible/mission/quest_item/booto_lubble_q1_needed.iff", itemName = "" } }, rewards = { { rewardType = "credits", amount = 50 } } }, { missionType = "confiscate", primarySpawns = { { npcTemplate = "rohd_gostervek", planetName = "rori", npcName = "Captain Rohd Gostervek" } }, secondarySpawns = { { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" }, { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" }, { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" }, { npcTemplate = "stormtrooper", planetName = "rori", npcName = "" } }, itemSpawns = { { itemTemplate = "object/tangible/mission/quest_item/booto_lubble_q2_needed.iff", itemName = "" } }, rewards = { { rewardType = "credits", amount = 50 }, { rewardType = "faction", faction = "rebel", amount = 10 } } }, } npcMapBootoLubble = { { spawnData = { planetName = "rori", npcTemplate = "booto_lubble", x = 4.0, z = 0.7, y = 0.5, direction = 170, cellID = 4505791, position = STAND }, worldPosition = { x = 3701, y = -6488 }, npcNumber = 1, stfFile = "@static_npc/rori/rori_rebeloutpost_booto_lubble", missions = booto_lubble_missions }, } BootoLubble = ThemeParkLogic:new { numberOfActs = 1, npcMap = npcMapBootoLubble, permissionMap = {}, className = "BootoLubble", screenPlayState = "booto_lubble_quest", distance = 800, faction = FACTIONREBEL } registerScreenPlay("BootoLubble", true) booto_lubble_mission_giver_conv_handler = mission_giver_conv_handler:new { themePark = BootoLubble } booto_lubble_mission_target_conv_handler = mission_target_conv_handler:new { themePark = BootoLubble }
agpl-3.0
Whitechaser/darkstar
scripts/zones/Horlais_Peak/npcs/Hot_springs.lua
5
1639
----------------------------------- -- Area: Northern San d'Oria -- NPC: Hot Springs -- @zone 139 -- !pos 444 -37 -18 ----------------------------------- package.loaded["scripts/zones/Horlais_Peak/TextIDs"] = nil; ----------------------------------- require("scripts/globals/titles"); require("scripts/globals/keyitems"); require("scripts/globals/settings"); require("scripts/zones/Horlais_Peak/TextIDs"); ----------------------------------- function onTrade(player,npc,trade) if (player:getQuestStatus(OUTLANDS,SECRET_OF_THE_DAMP_SCROLL) == QUEST_ACCEPTED and trade:hasItemQty(1210,1) and trade:getItemCount() == 1) then player:startEvent(2,1210); end end; function onTrigger(player,npc) if (player:getQuestStatus(SANDORIA,THE_GENERAL_S_SECRET) == 1) and (player:hasKeyItem(CURILLAS_BOTTLE_EMPTY) == true) then player:addKeyItem(CURILLAS_BOTTLE_FULL) player:messageSpecial(KEYITEM_OBTAINED,CURILLAS_BOTTLE_FULL); player:delKeyItem(CURILLAS_BOTTLE_EMPTY); else player:messageSpecial(NOTHING_OUT_OF_ORDINARY); end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if (csid == 2) then player:tradeComplete(); player:addItem(4949); -- Scroll of Jubaku: Ichi player:messageSpecial(ITEM_OBTAINED, 4949); player:addFame(NORG,75); player:addTitle(CRACKER_OF_THE_SECRET_CODE); player:completeQuest(OUTLANDS,SECRET_OF_THE_DAMP_SCROLL); end end;
gpl-3.0
AndyClausen/PNRP_HazG
postnukerp/entities/entities/tool_nuclear/cl_init.lua
1
13836
include('shared.lua') function ENT:Draw() self.Entity:DrawModel() end function NucGenMenu( ) local health = math.Round(net:ReadDouble()) local powerLevel = math.Round(net:ReadDouble()) local fuel = math.Round(net:ReadDouble()) local fuelLeft = math.Round(net:ReadDouble()) local availFuel = math.Round(net:ReadDouble()) local isOn = tobool(net:ReadBit()) local isMeltdown = tobool(net:ReadBit()) local toMeltdown = math.Round(net:ReadDouble()) local isNoReturn = tobool(net:ReadBit()) local toCrit = math.Round(net:ReadDouble()) local genEnt = net:ReadEntity() local ply = LocalPlayer() local w = 575 local h = 250 local title = "Generator Menu" local gen_frame = vgui.Create("DFrame") gen_frame:SetSize( w, h ) gen_frame:SetTitle( title ) gen_frame:SetVisible( true ) gen_frame:SetDraggable( true ) gen_frame:ShowCloseButton( true ) gen_frame:Center() gen_frame:MakePopup() gen_frame.Paint = function() surface.SetDrawColor( 50, 50, 50, 0 ) end local screenBG = vgui.Create("DImage", gen_frame) screenBG:SetImage( "VGUI/gfx/pnrp_screen_6b.png" ) screenBG:SetKeepAspect() screenBG:SizeToContents() screenBG:SetSize(gen_frame:GetWide(), gen_frame:GetTall()) local genIcon = vgui.Create("SpawnIcon", gen_frame) genIcon:SetModel(genEnt:GetModel()) genIcon:SetPos(30,30) local genMainLabel = vgui.Create("DLabel", gen_frame) genMainLabel:SetColor( Color( 255, 255, 255, 255 ) ) genMainLabel:SetPos(100,40) genMainLabel:SetText( "Nuclear Generator" ) genMainLabel:SetFont("Trebuchet24") genMainLabel:SizeToContents() local LDevide = vgui.Create("DShape") LDevide:SetParent( gen_frame ) LDevide:SetType("Rect") LDevide:SetSize( 130, 2 ) LDevide:SetPos(100,65) local powertxt = "off" local PowerlLabel = vgui.Create("DLabel", gen_frame) PowerlLabel:SetColor( Color( 0, 255, 0, 255 ) ) PowerlLabel:SetPos(40,90) PowerlLabel:SetText( "Power: " ) PowerlLabel:SizeToContents() local pwrIndicator = vgui.Create("DShape") pwrIndicator:SetParent( gen_frame ) pwrIndicator:SetType("Rect") pwrIndicator:SetSize( 100, 15 ) if isOn then powertxt = "Online" pwrIndicator:SetColor( Color( 0, 255, 0, 255 ) ) else powertxt = "Offline" pwrIndicator:SetColor( Color( 255, 0, 0, 255 ) ) end pwrIndicator:SetPos(80,90) local isOnLabel = vgui.Create("DLabel", gen_frame) isOnLabel:SetColor( Color( 255, 255, 255, 255 ) ) isOnLabel:SetPos(110,90) isOnLabel:SetText( powertxt ) isOnLabel:SizeToContents() local genhasFuelLabel = vgui.Create("DLabel", gen_frame) genhasFuelLabel:SetColor( Color( 0, 255, 0, 255 ) ) genhasFuelLabel:SetPos(40,108) genhasFuelLabel:SetText( "Fuel Level: "..fuel ) genhasFuelLabel:SizeToContents() local loadFuelLabel = vgui.Create("DLabel", gen_frame) loadFuelLabel:SetColor( Color( 0, 255, 0, 255 ) ) loadFuelLabel:SetPos(40,130) loadFuelLabel:SetText( "Load More Fuel: " ) loadFuelLabel:SizeToContents() local fuelNumberWang = vgui.Create( "DNumberWang", gen_frame ) fuelNumberWang:SetPos(140, 127 ) fuelNumberWang:SetMin( 0 ) fuelNumberWang:SetMax( availFuel ) fuelNumberWang:SetDecimals( 0 ) fuelNumberWang:SetValue( 0 ) local LoadButton = vgui.Create( "DButton" ) LoadButton:SetParent( gen_frame ) LoadButton:SetText( "Load" ) LoadButton:SetPos( 210, 130 ) LoadButton:SetSize( 100, 15 ) LoadButton.DoClick = function () local lFuel = fuelNumberWang:GetValue() if lFuel < 0 then lFuel = 0 end if lFuel > availFuel then lFuel = availFuel end net.Start("loadnucgen_stream") net.WriteDouble(lFuel) net.WriteEntity(ply) net.WriteEntity(genEnt) net.SendToServer() gen_frame:Close() end local unloadFuelLabel = vgui.Create("DLabel", gen_frame) unloadFuelLabel:SetColor( Color( 0, 255, 0, 255 ) ) unloadFuelLabel:SetPos(40,160) unloadFuelLabel:SetText( "Unload Some Fuel: " ) unloadFuelLabel:SizeToContents() local fuel2NumberWang = vgui.Create( "DNumberWang", gen_frame ) fuel2NumberWang:SetPos(140, 157 ) fuel2NumberWang:SetMin( 0 ) fuel2NumberWang:SetMax( fuel ) fuel2NumberWang:SetDecimals( 0 ) fuel2NumberWang:SetValue( 0 ) local UnloadButton = vgui.Create( "DButton" ) UnloadButton:SetParent( gen_frame ) UnloadButton:SetText( "Unload" ) UnloadButton:SetPos( 210, 160 ) UnloadButton:SetSize( 100, 15 ) UnloadButton.DoClick = function () local unFuel = fuel2NumberWang:GetValue() fuel = tonumber(fuel) if unFuel > 0 then if unFuel > fuel then unFuel = fuel end net.Start("unloadnucgen_stream") net.WriteDouble(unFuel) net.WriteEntity(ply) net.WriteEntity(genEnt) net.SendToServer() end gen_frame:Close() end --//Status Screen local lMenuList = vgui.Create( "DPanelList", gen_frame ) lMenuList:SetPos( 375,35 ) lMenuList:SetSize( 150, 175 ) lMenuList:SetSpacing( 5 ) lMenuList:SetPadding(3) lMenuList:EnableHorizontal( false ) lMenuList:EnableVerticalScrollbar( true ) local NameLabel = vgui.Create("DLabel") NameLabel:SetColor( Color( 255, 255, 255, 255 ) ) NameLabel:SetText( " Generator Status" ) NameLabel:SizeToContents() lMenuList:AddItem( NameLabel ) local LDevide = vgui.Create("DShape") LDevide:SetParent( stockStatusList ) LDevide:SetType("Rect") LDevide:SetSize( 100, 2 ) lMenuList:AddItem( LDevide ) local HealthLabel = vgui.Create("DLabel", gen_frame) HealthLabel:SetColor( Color( 0, 255, 0, 255 ) ) HealthLabel:SetText( "Health: "..tostring(health) ) HealthLabel:SizeToContents() lMenuList:AddItem( HealthLabel ) local StatusLabel = vgui.Create("DLabel", gen_frame) StatusLabel:SetColor( Color( 0, 255, 0, 255 ) ) StatusLabel:SetText( "Net Power: "..tostring(powerLevel) ) StatusLabel:SizeToContents() lMenuList:AddItem( StatusLabel ) local fuelTime = fuel fuelLeft = round(fuelLeft / 60, 2) + fuelTime local FuelLabel = vgui.Create("DLabel", gen_frame) FuelLabel:SetColor( Color( 0, 255, 0, 255 ) ) FuelLabel:SetText( fuelLeft.." minute(s) of fuel" ) FuelLabel:SizeToContents() lMenuList:AddItem( FuelLabel ) --//Menu Menu local btnHPos = 150 local btnWPos = gen_frame:GetWide()-220 local btnHeight = 40 local lblColor = Color( 245, 218, 210, 180 ) local PowerBtn = vgui.Create("DImageButton", gen_frame) PowerBtn:SetPos( btnWPos,btnHPos ) PowerBtn:SetSize(30,30) --//If Unit is in meltdown if isMeltdown then PowerlLabel:SetVisible( false ) pwrIndicator:SetVisible( false ) isOnLabel:SetVisible( false ) genhasFuelLabel:SetVisible( false ) loadFuelLabel:SetVisible( false ) fuelNumberWang:SetVisible( false ) LoadButton:SetVisible( false ) unloadFuelLabel:SetVisible( false ) fuel2NumberWang:SetVisible( false ) UnloadButton:SetVisible( false ) local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 0, 0, 255 ) ) MeltDownLabel:SetPos(100,75) MeltDownLabel:SetText( "[[EMERGENCY]]" ) MeltDownLabel:SetFont("Trebuchet24") MeltDownLabel:SizeToContents() local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 0, 0, 255 ) ) MeltDownLabel:SetPos(110,100) MeltDownLabel:SetText( "Meltdown in progress" ) MeltDownLabel:SetFont("Trebuchet18") MeltDownLabel:SizeToContents() local EmergencyButtonRdEdges = vgui.Create( "DPanel", gen_frame ) EmergencyButtonRdEdges:SetPos( 85, 120 ) EmergencyButtonRdEdges:SetSize( 170, 40 ) EmergencyButtonRdEdges.Paint = function() -- Paint function draw.RoundedBox( 6, 0, 0, EmergencyButtonRdEdges:GetWide(), EmergencyButtonRdEdges:GetTall(), Color( 50, 50, 50, 255 ) ) end local EmergencyButton = vgui.Create( "DImageButton" ) EmergencyButton:SetParent( gen_frame ) -- EmergencyButton:SetColor( Color( 255, 0, 0, 255 ) ) EmergencyButton:SetPos( 90, 125 ) EmergencyButton:SetSize( 160, 30 ) EmergencyButton:SetMaterial( "phoenix_storms/stripes" ) EmergencyButton.DoClick = function () net.Start("emernucgen_stream") net.WriteEntity(ply) net.WriteEntity(genEnt) net.SendToServer() gen_frame:Close() end local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 255, 255, 255 ) ) MeltDownLabel:SetPos(110,130) MeltDownLabel:SetText( "Emergency Shutdown!" ) MeltDownLabel:SetFont("Trebuchet18") MeltDownLabel:SizeToContents() local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 0, 0, 255 ) ) MeltDownLabel:SetPos(100,170) MeltDownLabel:SetText( "Unit goes CRITICAL in "..toMeltdown ) MeltDownLabel:SetFont("Trebuchet18") MeltDownLabel:SizeToContents() end if isNoReturn then PowerlLabel:SetVisible( false ) pwrIndicator:SetVisible( false ) isOnLabel:SetVisible( false ) genhasFuelLabel:SetVisible( false ) loadFuelLabel:SetVisible( false ) fuelNumberWang:SetVisible( false ) LoadButton:SetVisible( false ) unloadFuelLabel:SetVisible( false ) fuel2NumberWang:SetVisible( false ) UnloadButton:SetVisible( false ) local TheEndBGRdEdges = vgui.Create( "DPanel", gen_frame ) TheEndBGRdEdges:SetPos( 50, 80 ) TheEndBGRdEdges:SetSize( 250, 130 ) TheEndBGRdEdges.Paint = function() -- Paint function draw.RoundedBox( 6, 0, 0, TheEndBGRdEdges:GetWide(), TheEndBGRdEdges:GetTall(), Color( 50, 50, 50, 255 ) ) end local TheEndBG = vgui.Create( "DImageButton" ) TheEndBG:SetParent( TheEndBGRdEdges ) TheEndBG:SetColor( Color( 255, 0, 0, 255 ) ) TheEndBG:SetPos( 5, 5 ) TheEndBG:SetSize( TheEndBGRdEdges:GetWide()-10, TheEndBGRdEdges:GetTall()-10 ) TheEndBG:SetMaterial( "phoenix_storms/stripes" ) TheEndBG.DoClick = function () ply:ChatPrint("There is nothing more you can do. RUN FOR IT!") end local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 150, 20, 255 ) ) MeltDownLabel:SetPos(100,85) MeltDownLabel:SetText( "<[-[ DANGER ]-]>" ) MeltDownLabel:SetFont("Trebuchet24") MeltDownLabel:SizeToContents() local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 150, 20, 255 ) ) MeltDownLabel:SetPos(70,110) MeltDownLabel:SetText( "UNIT IS GOING CRITICLE" ) MeltDownLabel:SetFont("Trebuchet24") MeltDownLabel:SizeToContents() local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 150, 20, 255 ) ) MeltDownLabel:SetPos(65,140) MeltDownLabel:SetText( "EMERGENCY SHUTDOWN NOT POSSIBLE" ) MeltDownLabel:SetFont("Trebuchet18") MeltDownLabel:SizeToContents() local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 150, 20, 255 ) ) MeltDownLabel:SetPos(120,155) MeltDownLabel:SetText( "EVACUATE THE AREA" ) MeltDownLabel:SetFont("Trebuchet18") MeltDownLabel:SizeToContents() local MeltDownLabel = vgui.Create("DLabel", gen_frame) MeltDownLabel:SetColor( Color( 255, 150, 20, 255 ) ) MeltDownLabel:SetPos(135,180) MeltDownLabel:SetText( "CRITICAL IN "..toCrit ) MeltDownLabel:SetFont("Trebuchet18") MeltDownLabel:SizeToContents() end if isMeltdown or health <= 0 or isNoReturn then PowerBtn:SetImage( "VGUI/gfx/pnrp_button_down.png" ) else PowerBtn:SetImage( "VGUI/gfx/pnrp_button.png" ) PowerBtn.DoClick = function() net.Start("togglenucgen_stream") net.WriteEntity(ply) net.WriteEntity(genEnt) net.SendToServer() gen_frame:Close() end PowerBtn.Paint = function() if PowerBtn:IsDown() then PowerBtn:SetImage( "VGUI/gfx/pnrp_button_down.png" ) else PowerBtn:SetImage( "VGUI/gfx/pnrp_button.png" ) end end end local PowerBtnLbl = vgui.Create("DLabel", gen_frame) PowerBtnLbl:SetPos( btnWPos+40,btnHPos+2 ) PowerBtnLbl:SetColor( lblColor ) PowerBtnLbl:SetText( "Toggle Power" ) PowerBtnLbl:SetFont("Trebuchet24") PowerBtnLbl:SizeToContents() btnHPos = btnHPos + btnHeight local RepairBtn = vgui.Create("DImageButton", gen_frame) RepairBtn:SetPos( btnWPos,btnHPos ) RepairBtn:SetSize(30,30) if health < 200 and not isNoReturn and not isMeltdown then RepairBtn:SetImage( "VGUI/gfx/pnrp_button.png" ) RepairBtn.DoClick = function() net.Start("repnucgen_stream") net.WriteEntity(ply) net.WriteEntity(genEnt) net.SendToServer() gen_frame:Close() end RepairBtn.Paint = function() if RepairBtn:IsDown() then RepairBtn:SetImage( "VGUI/gfx/pnrp_button_down.png" ) else RepairBtn:SetImage( "VGUI/gfx/pnrp_button.png" ) end end else RepairBtn:SetImage( "VGUI/gfx/pnrp_button_down.png" ) end local RepairBtnLbl = vgui.Create("DLabel", gen_frame) RepairBtnLbl:SetPos( btnWPos+40,btnHPos+2 ) RepairBtnLbl:SetColor( lblColor ) RepairBtnLbl:SetText( "Repair Unit" ) RepairBtnLbl:SetFont("Trebuchet24") RepairBtnLbl:SizeToContents() end net.Receive("nucgen_menu", NucGenMenu)
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/creature/npc/droid/crafted/mse_6_droid_advanced.lua
2
2290
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_creature_npc_droid_crafted_mse_6_droid_advanced = object_creature_npc_droid_crafted_shared_mse_6_droid_advanced:new { species = 214 } ObjectTemplates:addTemplate(object_creature_npc_droid_crafted_mse_6_droid_advanced, "object/creature/npc/droid/crafted/mse_6_droid_advanced.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/narglatch_female.lua
3
2180
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_narglatch_female = object_mobile_shared_narglatch_female:new { } ObjectTemplates:addTemplate(object_mobile_narglatch_female, "object/mobile/narglatch_female.iff")
agpl-3.0
ollie27/openwrt_luci
protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua
47
3692
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local map, section, net = ... local device, username, password local ipv6, defaultroute, metric, peerdns, dns, keepalive_failure, keepalive_interval, demand, mtu device = section:taboption("general", Value, "device", translate("Modem device")) device.rmempty = false local device_suggestions = nixio.fs.glob("/dev/tty*S*") or nixio.fs.glob("/dev/tts/*") if device_suggestions then local node for node in device_suggestions do device:value(node) end end username = section:taboption("general", Value, "username", translate("PAP/CHAP username")) password = section:taboption("general", Value, "password", translate("PAP/CHAP password")) password.password = true if luci.model.network:has_ipv6() then ipv6 = section:taboption("advanced", ListValue, "ipv6") ipv6:value("auto", translate("Automatic")) ipv6:value("0", translate("Disabled")) ipv6:value("1", translate("Manual")) ipv6.default = "auto" end defaultroute = section:taboption("advanced", Flag, "defaultroute", translate("Use default gateway"), translate("If unchecked, no default route is configured")) defaultroute.default = defaultroute.enabled metric = section:taboption("advanced", Value, "metric", translate("Use gateway metric")) metric.placeholder = "0" metric.datatype = "uinteger" metric:depends("defaultroute", defaultroute.enabled) peerdns = section:taboption("advanced", Flag, "peerdns", translate("Use DNS servers advertised by peer"), translate("If unchecked, the advertised DNS server addresses are ignored")) peerdns.default = peerdns.enabled dns = section:taboption("advanced", DynamicList, "dns", translate("Use custom DNS servers")) dns:depends("peerdns", "") dns.datatype = "ipaddr" dns.cast = "string" keepalive_failure = section:taboption("advanced", Value, "_keepalive_failure", translate("LCP echo failure threshold"), translate("Presume peer to be dead after given amount of LCP echo failures, use 0 to ignore failures")) function keepalive_failure.cfgvalue(self, section) local v = m:get(section, "keepalive") if v and #v > 0 then return tonumber(v:match("^(%d+)[ ,]+%d+") or v) end end keepalive_failure.placeholder = "0" keepalive_failure.datatype = "uinteger" keepalive_interval = section:taboption("advanced", Value, "_keepalive_interval", translate("LCP echo interval"), translate("Send LCP echo requests at the given interval in seconds, only effective in conjunction with failure threshold")) function keepalive_interval.cfgvalue(self, section) local v = m:get(section, "keepalive") if v and #v > 0 then return tonumber(v:match("^%d+[ ,]+(%d+)")) end end function keepalive_interval.write(self, section, value) local f = tonumber(keepalive_failure:formvalue(section)) or 0 local i = tonumber(value) or 5 if i < 1 then i = 1 end if f > 0 then m:set(section, "keepalive", "%d %d" %{ f, i }) else m:del(section, "keepalive") end end keepalive_interval.remove = keepalive_interval.write keepalive_failure.write = keepalive_interval.write keepalive_failure.remove = keepalive_interval.write keepalive_interval.placeholder = "5" keepalive_interval.datatype = "min(1)" demand = section:taboption("advanced", Value, "demand", translate("Inactivity timeout"), translate("Close inactive connection after the given amount of seconds, use 0 to persist connection")) demand.placeholder = "0" demand.datatype = "uinteger" mtu = section:taboption("advanced", Value, "mtu", translate("Override MTU")) mtu.placeholder = "1500" mtu.datatype = "max(9200)"
apache-2.0
Whitechaser/darkstar
scripts/zones/Vunkerl_Inlet_[S]/Zone.lua
5
1515
----------------------------------- -- -- Zone: Vunkerl_Inlet_[S] (83) -- ----------------------------------- package.loaded["scripts/zones/Vunkerl_Inlet_[S]/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Vunkerl_Inlet_[S]/TextIDs"); require("scripts/zones/Vunkerl_Inlet_[S]/MobIDs"); require("scripts/globals/weather"); require("scripts/globals/status"); function onInitialize(zone) end; function onZoneIn(player,prevZone) local cs = -1; if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-393.238,-50.034,741.199,2); end return cs; end; function onZoneWeatherChange(weather) local npc = GetNPCByID(VUNKERL_INDESCRIPT_MARKINGS); -- Indescript Markings if (npc ~= nil) then if (weather == WEATHER_FOG or weather == WEATHER_THUNDER) then npc:setStatus(STATUS_DISAPPEAR); elseif (VanadielHour() >= 16 or VanadielHour() <= 6) then npc:setStatus(STATUS_NORMAL); end end end; function onGameHour(zone) local npc = GetNPCByID(VUNKERL_INDESCRIPT_MARKINGS); -- Indescript Markings if (npc ~= nil) then if (VanadielHour() == 16) then npc:setStatus(STATUS_DISAPPEAR); end if (VanadielHour() == 6) then npc:setStatus(STATUS_NORMAL); end end end; function onRegionEnter(player,region) end; function onEventUpdate(player,csid,option) end; function onEventFinish(player,csid,option) end;
gpl-3.0
DanielSchiavini/cortez-client
DataCortez/lua files/_sources/stateicon/stateiconinfo.lua
1
62904
COLOR_TITLE_BUFF = { 155, 202, 155 } COLOR_TITLE_DEBUFF = { 250, 100, 100 } COLOR_TITLE_TOGGLE = { 190, 190, 250 } COLOR_SYSTEM = { 255, 255, 0 } COLOR_TIME = { 255, 176, 98 } StateIconList = {} StateIconList[EFST_IDs.EFST_OVERTHRUSTMAX] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Maximum Over Thrust", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases weapon damage."}, {"Increases the possibility of breaking the weapon."} } } StateIconList[EFST_IDs.EFST_SUFFRAGIUM] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Suffragium", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces cast time."} } } StateIconList[EFST_IDs.EFST_OVERTHRUST] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Over Thrust", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases weapon damage."}, {"Increases the possibility of breaking the weapon."} } } StateIconList[EFST_IDs.EFST_AUTOBERSERK] = { descript = { {"Auto Berserk", COLOR_TITLE_BUFF}, {"Rage when close to death"} } } StateIconList[EFST_IDs.EFST_BEYOND_OF_WARCRY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Warcry of Beyond", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases physical attack power"}, {"Decreases magic attack power"} } } StateIconList[EFST_IDs.EFST_SWORDREJECT] = { descript = { {"Sword Reject", COLOR_TITLE_BUFF}, {"Reflects damage back to attacking monsters"}, {"(for all monster attacks)"}, {"Damage received is reduced by 1/2"}, {"You receive the other 1/2 of damage"} } } StateIconList[EFST_IDs.EFST_MANU_DEF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"¸¶´©Å©ÀÇ ÀÇÁö", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"¸¶´©Å© ÇʵåÁö¿ª ¸ó½ºÅÍ¿¡°Ô ¹Þ´Â"}, {"¹°¸®, ¸¶¹ý µ¥¹ÌÁö °¨¼Ò"} } } StateIconList[EFST_IDs.EFST_CONCENTRATION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Attention Concentration", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases DEX, AGI"}, {"Reveals nearby hidden enemies"} } } StateIconList[EFST_IDs.EFST_GRIFFON] = { descript = { {"Riding Griffon", COLOR_TITLE_TOGGLE} } } StateIconList[EFST_IDs.EFST_GS_MADNESSCANCEL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Madness Canceller (Last Stand)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ATK"}, {"Increases Attack Speed"}, {"Immobilized"} } } StateIconList[EFST_IDs.EFST_GS_ACCURACY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Increasing Accuracy (Increase Accuracy)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Accuracy"}, {"Increases DEX"}, {"Increases AGI"} } } StateIconList[EFST_IDs.EFST_FOOD_STR] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases STR"} } } StateIconList[EFST_IDs.EFST_HALLUCINATIONWALK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Hallucination Walk", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Improves Evasion Rate"}, {"Chance to evade Magical Damage."} } } StateIconList[EFST_IDs.EFST_STORMKICK_ON] = { descript = { {"Whirlwind Kick (Tornado Kick)", COLOR_TITLE_BUFF}, {"When attacking an enemy"}, {"there is a chance to prepare a Whirlwind Kick"} } } StateIconList[EFST_IDs.EFST_KAUPE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Kaupe", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Chance to evade an enemy attack."} } } StateIconList[EFST_IDs.EFST_SHIELDSPELL_DEF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shield Spell (DEF)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Invokes a magical spell based on DEF"} } } StateIconList[EFST_IDs.EFST_WARMER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Warmer", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Removes Frozen/Freezing status"}, {"Immunity to Frozen/Freezing status"}, {"Recovers HP every 3 seconds"} } } StateIconList[EFST_IDs.EFST_PROTECT_MDEF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Magic Armor Potions", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases resistance to magical attacks"} } } StateIconList[EFST_IDs.EFST_STAR_COMFORT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Comfort of the Stars", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ASPD"} } } StateIconList[EFST_IDs.EFST_FOOD_CRITICALSUCCESSVALUE] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Improves CRIT"} } } StateIconList[EFST_IDs.EFST_PROPERTYTELEKINESIS] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Enchants Weapon with Ghost Property"} } } StateIconList[EFST_IDs.EFST_GLOOMYDAY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Gloomy Day", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases the damage of specific skills"}, {"Reduces FLEE, ASPD"} } } StateIconList[EFST_IDs.EFST_SIRCLEOFNATURE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Circle of Nature's Sound", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Consumes SP and recovers HP"} } } StateIconList[EFST_IDs.EFST_DEADLYINFECT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Deadly Infect", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When attacking"}, {"or being attacked"}, {"your status effects are applies to them"} } } StateIconList[EFST_IDs.EFST_SYMPHONY_LOVE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Symphony of Love", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases MDEF"} } } StateIconList[EFST_IDs.EFST_BANDING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Banding", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Banding status"} } } StateIconList[EFST_IDs.EFST_NJ_BUNSINJYUTSU] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Illusionary Shadow", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Avoids a certain number of physical attacks"}, {"Magical attacks cannot be avoided"} } } StateIconList[EFST_IDs.EFST_WUGRIDER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Warg Rider", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Bows are Disabled"}, {"Warg Skills are only allowed"} } } StateIconList[EFST_IDs.EFST_ATKER_BLOOD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"SP Consumption Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Skills using SP have their consumption increased"} } } StateIconList[EFST_IDs.EFST_BODYPAINT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Body Painting", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reveals hidden enemies"}, {"Chance to inflict Blind to enemies"}, {"Reduces Enemy ASPD"} } } StateIconList[EFST_IDs.EFST_NJ_UTSUSEMI] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Cicada Skin Shedding", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Avoids a certain number of physical attacks"}, {"When avoiding, move in the opposite direction of the attacker"} } } StateIconList[EFST_IDs.EFST_POISONINGWEAPON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Poisoning Weapon", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Applies the poison coated on your weapon to the target"} } } StateIconList[EFST_IDs.EFST_CASH_DEATHPENALTY] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"No EXP loss upon death"} } } StateIconList[EFST_IDs.EFST_GS_ADJUSTMENT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Adjustment", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces HIT"}, {"Increases FLEE"}, {"Reduces damage of incoming ranged physical attacks"} } } StateIconList[EFST_IDs.EFST_AUTOSPELL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Auto Spell", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When physically attacking"}, {"the selected skill will automatically cast without casting time."}, {"SP consumed is 2/3 the regular amount"}, {"Skill will not cast without sufficient SP"} } } StateIconList[EFST_IDs.EFST_DEC_AGI] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Decrease Agility", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces Movement Speed"}, {"Reduces ASPD"} } } StateIconList[EFST_IDs.EFST_NOEQUIPWEAPON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Weapon Off Status", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Weapons cannot be worn"} } } StateIconList[EFST_IDs.EFST_SHIELDSPELL_MDEF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shield Spell (MDEF)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Invokes a magical spell based on MDEF"} } } StateIconList[EFST_IDs.EFST_AUTOGUARD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Auto Guard", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Has a chance to block physical attacks"} } } StateIconList[EFST_IDs.EFST_TAROTCARD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Tarot Card of Fate", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Applies one of 14 cards and their effects"} } } StateIconList[EFST_IDs.EFST_FEARBREEZE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Fear Breeze", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When attacking with a bow"}, {"there is a chance to cause additional attacks"} } } StateIconList[EFST_IDs.EFST_GN_CARTBOOST] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Cart Boost", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Movement Speed"} } } StateIconList[EFST_IDs.EFST_SHIELDSPELL_REF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shield Spell (Refine)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Invokes a magical effect based on refine"} } } StateIconList[EFST_IDs.EFST_FOOD_INT_CASH] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases INT"} } } StateIconList[EFST_IDs.EFST_NOEQUIPSHIELD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shield Off Status", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Shields cannot be worn"} } } StateIconList[EFST_IDs.EFST_MELTDOWN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Meltdown", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When attacking a player"}, {"there is a chance to destroy his/her weapon/armor"}, {"When attacking a monster"}, {"the monster's attack and defense are reduced"} } } StateIconList[EFST_IDs.EFST_QUAGMIRE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Quagmire", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces Movement Speed"}, {"Reduces AGI/DEX"} } } StateIconList[EFST_IDs.EFST_KAIZEL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Kaizel", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Cast time not affected by DEX"}, {"Upon death, you will revive with Kyrie Eleison for 2 seconds"} } } StateIconList[EFST_IDs.EFST_CR_SHRINK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shrink", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When Autoguarding attacks"}, {"there is a chance to push the attack back"} } } StateIconList[EFST_IDs.EFST_FOOD_VIT] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases VIT"} } } StateIconList[EFST_IDs.EFST_PARRYING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Parrying", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Blocks physical attacks by chance"} } } StateIconList[EFST_IDs.EFST_PROTECTWEAPON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Chemical Protection (Weapon)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Prevents weapon from being stripped/broken"} } } StateIconList[EFST_IDs.EFST_FOOD_AGI] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases AGI"} } } StateIconList[EFST_IDs.EFST_INC_AGI] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Increase agility", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Movement Speed"}, {"Increases Attack Speed"} } } StateIconList[EFST_IDs.EFST_SHOUT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Loud Exclamation (Crazy Uproar)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases STR"} } } StateIconList[EFST_IDs.EFST_CASH_RECEIVEITEM] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"When killing monsters"}, {"the drop chance is doubled"} } } StateIconList[EFST_IDs.EFST_SPL_DEF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"·ç½Ã¿Ã¶óÀÇ ²Ü´", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"½ºÇöûµðµå ÇʵåÁö¿ª ¸ó½ºÅÍ¿¡°Ô ¹Þ´Â"}, {"Reduces DEF, MDEF"} } } StateIconList[EFST_IDs.EFST_ILLUSION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Illusion", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Screen distortion"}, {"Shows more damage"}, {"Randomly interrupts casting"} } } StateIconList[EFST_IDs.EFST_HOVERING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Hovering", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Traps and some ground skills do not have any effect"} } } StateIconList[EFST_IDs.EFST_BENEDICTIO] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Enchants Armor with Holy Property"} } } StateIconList[EFST_IDs.EFST_WEAPONBLOCKING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Weapon Blocking", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When hit by close range physical attacks"}, {"there is a chance to nullify the damage"} } } StateIconList[EFST_IDs.EFST_ANGELUS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Angelus", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases VIT DEF"} } } StateIconList[EFST_IDs.EFST_MARSHOFABYSS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Marsh of Abyss", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Slows Movement"}, {"Reduces DEF, Flee"} } } StateIconList[EFST_IDs.EFST_STEALTHFIELD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Stealth Field", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Cloaks everyone in a radius around caster"}, {"Consumes SP while active"}, {"Reduces Movement Speed"} } } StateIconList[EFST_IDs.EFST_ADRENALINE2] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Full Adrenaline Rush", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Weapon ASPD except Bows"} } } StateIconList[EFST_IDs.EFST_MANU_MATK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"¸¶´©Å©ÀÇ ½Å³ä", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"¸¶´©Å© ÇʵåÁö¿ª ¸ó½ºÅÍ¿¡°Ô"}, {"¸¶¹ý°ø°Ý µ¥¹ÌÁö »ó½Â"} } } StateIconList[EFST_IDs.EFST_NOEQUIPARMOR] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Armor Off Status", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Armor cannot be worn"} } } StateIconList[EFST_IDs.EFST_RENOVATIO] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Renovatio", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Recovers HP every 5 seconds"}, {"When used on Undead monsters"}, {"it deals high damage according to skill level"} } } StateIconList[EFST_IDs.EFST_HIDING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Hiding", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Avoids enemy attacks by hiding in the ground"}, {"Can be discovered with detection skills"} } } StateIconList[EFST_IDs.EFST_WEIGHTOVER50] = { descript = { {"Overweight 50%", COLOR_TITLE_DEBUFF}, {"HP/SP will not be restored"} } } StateIconList[EFST_IDs.EFST_STRUP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Spurt", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases STR"}, {"if the user is unequipped"}, {"and the skill level is high enough"} } } StateIconList[EFST_IDs.EFST_NOEQUIPHELM] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Headgear Off Status", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Headgear cannot be worn"} } } StateIconList[EFST_IDs.EFST_ATTHASTE_POTION3] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"Berserk Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ASPD"} } } StateIconList[EFST_IDs.EFST_ENDURE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Endure", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enables attacking and movement"}, {"while receiving damage"} } } StateIconList[EFST_IDs.EFST_TURNKICK_ON] = { descript = { {"Ready Turn Kick", COLOR_TITLE_BUFF}, {"When attacking,"}, {"there's a chance to prepare a Turn Kick"} } } StateIconList[EFST_IDs.EFST_ENCHANTPOISON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enchant Poison", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enchants Weapon with Poison Property"} } } StateIconList[EFST_IDs.EFST_SPL_ATK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"ÇɱÍŧ¶óÀÇ ¿­¸ÅÀýÀÓ", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"½ºÇöûµðµå ÇʵåÁö¿ª ¸ó½ºÅÍ¿¡°Ô"}, {"¹°¸®°ø°Ý µ¥¹ÌÁö »ó½Â"} } } StateIconList[EFST_IDs.EFST_BLESSING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Blessing", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases DEX, INT and STR"}, {"Recovers from a few status effects"} } } StateIconList[EFST_IDs.EFST_ONEHANDQUICKEN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"One-hand Quicken", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Using One-handed Weapon"}, {"Increases ASPD"} } } StateIconList[EFST_IDs.EFST_SPEARQUICKEN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Spear Quicken", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"â »ç¿ë ½Ã"}, {"Increases ASPD"}, {"Increases CRIT"}, {"Increases Flee"} } } StateIconList[EFST_IDs.EFST_BROKENWEAPON] = { descript = { {"Weapon is damaged.", COLOR_TITLE_DEBUFF} } } StateIconList[EFST_IDs.EFST_ASSUMPTIO] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Assumptio", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces damage taken"} } } StateIconList[EFST_IDs.EFST_MAXIMIZE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Maximize Power", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases damage to the maximum"}, {"Drains SP over time"} } } StateIconList[EFST_IDs.EFST_PROTECTSHIELD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Chemical Protection (Shield)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Prevents shield from being stripped/broken"} } } StateIconList[EFST_IDs.EFST_MAGNIFICAT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Magnificat", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases natural SP Recovery Speed"} } } StateIconList[EFST_IDs.EFST_ATTHASTE_POTION1] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Concentration Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ASPD"} } } StateIconList[EFST_IDs.EFST_POISONREACT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Poison React", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Counters a Poison attack with a one-time attack"}, {"When hit by a physical non-poison attack,"}, {"there is a chance to cast Envenom on target"} } } StateIconList[EFST_IDs.EFST_MOVHASTE_HORSE] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases Movement Speed"} } } StateIconList[EFST_IDs.EFST_CRESCENTELBOW] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Crescent Elbow", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Attempts to counter opponent's attack"}, {"Knocks back opponent and deals damage"}, {"You still take some of the damage"}, {"Does not affect boss monsters", COLOR_SYSTEM} } } StateIconList[EFST_IDs.EFST_SONG_OF_MANA] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Song of Mana", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Recovers SP every 5 seconds"} } } StateIconList[EFST_IDs.EFST_KAAHI] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Kaahi", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Whenever you are hit by non-skills"}, {"SP is consumed and HP is recovered"} } } StateIconList[EFST_IDs.EFST_ECHOSONG] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Echo Song", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases DEF"} } } StateIconList[EFST_IDs.EFST_PRESERVE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Preserve", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Allows you to keep copied skill"} } } StateIconList[EFST_IDs.EFST_WEAPONPERFECT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Weapon Perfection", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Applies 100% damage to"}, {"small, medium and large monsters"} } } StateIconList[EFST_IDs.EFST_PROVOKE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Provoke", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces VIT DEF"}, {"Increases ATK"} } } StateIconList[EFST_IDs.EFST_MOVHASTE_POTION] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases Movement Speed"} } } StateIconList[EFST_IDs.EFST_EDP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enchant Deadly Poison", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Applies a deadly poison to weapon"}, {"Damage increase does not apply to boss monsters",COLOR_SYSTEM} } } StateIconList[EFST_IDs.EFST_JOINTBEAT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Joint Beat", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Applies various status effects"}, {"due to joint damage."} } } StateIconList[EFST_IDs.EFST_PROVIDENCE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Providence", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increased resistance"}, {"to undead and demon monsters"} } } StateIconList[EFST_IDs.EFST_FIGHTINGSPIRIT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rune Stone: Fighting Spirit", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ATK"}, {"Increases ASPD of caster"} } } StateIconList[EFST_IDs.EFST_FOOD_VIT_CASH] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases VIT"} } } StateIconList[EFST_IDs.EFST_SATURDAY_NIGHT_FEVER] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"Wild", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Decreases HP/SP per 3 seconds"}, {"Damage increased, Defense and Evasion dropped"}, {"Skills and items cannot be used."} } } StateIconList[EFST_IDs.EFST_TRUESIGHT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"True Sight", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases all stats"}, {"Increases ATK, HIT, CRIT"} } } StateIconList[EFST_IDs.EFST_CASH_PLUSONLYJOBEXP] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases Job EXP acquired."} } } StateIconList[EFST_IDs.EFST_ARMOR_PROPERTY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Armor Property", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Changes your Elemental Property"} } } StateIconList[EFST_IDs.EFST_TENSIONRELAX] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Tension Relax", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases natural HP recovery"} } } StateIconList[EFST_IDs.EFST_DEATHHURT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Death Hurt (Contaminated Wound Poison)", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"ȸº¹ ½ºÅ³À» ¹ÞÀ» ¶§ È¿°ú ÀúÇÏ"} } } StateIconList[EFST_IDs.EFST_IMPOSITIO] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Impositio Manus", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Weapon damage"} } } StateIconList[EFST_IDs.EFST_LEECHESEND] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Leech End", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Drains HP every second"} } } StateIconList[EFST_IDs.EFST_REPRODUCE] = { descript = { {"Reproduce", COLOR_TITLE_BUFF}, {"Activates when targetted by a skill"}, {"Only one skill can be learnt"} } } StateIconList[EFST_IDs.EFST_ACCELERATION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Acceleration", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases movement speed of the Magic Gear"} } } StateIconList[EFST_IDs.EFST_NJ_NEN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Soul", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases INT, STR"} } } StateIconList[EFST_IDs.EFST_FORCEOFVANGUARD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Force of Vanguard", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Max HP, Defense increased"}, {"When physicalled attacked there is a chance to earn a rage counter"}, {"SP consumed while active"} } } StateIconList[EFST_IDs.EFST_RG_CCONFINE_M] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Close Confine", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Both Players cannot Move"}, {"Increases FLEE"}, {"Does not affect boss monsters", COLOR_SYSTEM} } } StateIconList[EFST_IDs.EFST_TRICKDEAD] = { descript = { {"Trick Dead (Play Dead)", COLOR_TITLE_TOGGLE}, {"Pretend Dead Status"} } } StateIconList[EFST_IDs.EFST_PROPERTYWATER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Frost Weapon (Endow Tsunami)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enchants Weapon with Water Property"} } } StateIconList[EFST_IDs.EFST_ADORAMUS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Adoramus", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Blinds and reduces Movement Speed"} } } StateIconList[EFST_IDs.EFST_GENTLETOUCH_ENERGYGAIN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Gentle Touch - Energy Gain", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When attacked or when attacking, there is a chance to"}, {"earn a Spirit Sphere"} } } StateIconList[EFST_IDs.EFST_NEUTRALBARRIER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Neutral Barrier", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"DEF/MDEF up"}, {"Neutralizes ranged attacks"} } } StateIconList[EFST_IDs.EFST_EARTHSCROLL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Happy Break (Enjoyable Rest)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When sitting with another Taekwon"}, {"A certain amount of SP is regained"}, {"Chance for Earth Spike scrolls to not be destroyed when used"} } } StateIconList[EFST_IDs.EFST_FALCON] = { descript = { {"Falconry Mastery", COLOR_TITLE_TOGGLE}, {"Falcon Rental"} } } StateIconList[EFST_IDs.EFST_TWOHANDQUICKEN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Two Hand Quicken", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When using two handed weapons,"}, {"increases ASPD"} } } StateIconList[EFST_IDs.EFST_SUN_COMFORT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Comfort of the Sun", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Improves VIT DEF"} } } StateIconList[EFST_IDs.EFST_KYRIE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Kyrie Eleison", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"A defensive barrier that blocks a certain number of attacks"} } } StateIconList[EFST_IDs.EFST_PROTECTARMOR] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Chemical Protection (Armor)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Prevents body Armor from being stripped/broken"} } } StateIconList[EFST_IDs.EFST_GIANTGROWTH] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rune Stone: Giant Growth", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases STR"}, {"There is a chance to vastly increase damage"}, {"of close range physical attacks"}, {"Chance to destroy weapon with each hit"} } } StateIconList[EFST_IDs.EFST_STR_SCROLL] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases STR"} } } StateIconList[EFST_IDs.EFST_AB_SECRAMENT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Sacrament", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces fixed casting time"} } } StateIconList[EFST_IDs.EFST_PARALYSE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Paralyze", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces Attack Speed"}, {"Reduces FLEE"}, {"Reduces Movement Speed"} } } StateIconList[EFST_IDs.EFST_PROPERTYGROUND] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Seismic Weapon", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enchants Weapon with Earth Property"} } } StateIconList[EFST_IDs.EFST_DOUBLECASTING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Double Casting", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When casting a Bolt Skill"}, {"there is a chance to cast another automatically"} } } StateIconList[EFST_IDs.EFST_RG_CCONFINE_S] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Close Confine", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Both Players cannot Move"}, {"Increases FLEE"}, {"Does not affect Boss"} } } StateIconList[EFST_IDs.EFST_OVERHEAT] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"Over Heat", COLOR_TITLE_BUFF}, {"Heating caused by skill use"}, {"Drains HP every second"} } } StateIconList[EFST_IDs.EFST_SPL_MATK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Cornelia Anubis' Tears", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"½ºÇöûµðµå ÇʵåÁö¿ª ¸ó½ºÅÍ¿¡°Ô"}, {"Magical attack damage increased"} } } StateIconList[EFST_IDs.EFST_DEEP_SLEEP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Deep Sleep Status", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Damage Received by 1.5 times"}, {"Recovers HP/SP every 2 seconds"} } } StateIconList[EFST_IDs.EFST_RECOGNIZEDSPELL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Recognized Spell", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Magic Skills deals Max Damage"}, {"All skills consumes more SP"} } } StateIconList[EFST_IDs.EFST_TARGET_ASPD] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Max SP increased, SP consumption reduced"} } } StateIconList[EFST_IDs.EFST_FOOD_BASICAVOIDANCE] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Improves FLEE"} } } StateIconList[EFST_IDs.EFST_DEFENDER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Defender (Defending Aura)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduce Damage from Ranged Physical Attack"}, {"Reduces Movement Speed and Attack Speed"} } } StateIconList[EFST_IDs.EFST_WEAPONPROPERTY] = { haveTimeLimit = 0, descript = { {"Granted a weapon property"} } } StateIconList[EFST_IDs.EFST_S_LIFEPOTION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Small Life Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Recoverys HP every 5 seconds"}, {"No effect if Berserk State is active"} } } StateIconList[EFST_IDs.EFST_FOOD_LUK] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases LUK"} } } StateIconList[EFST_IDs.EFST_BLOODING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Bleeding", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"HP, SP recovery disabled"}, {"HP lost every 10 seconds"} } } StateIconList[EFST_IDs.EFST_REFRESH] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rune Stone: Refresh", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Removes all debuffs when cast"}, {"Grants immunity to debuffs"}, {"Recovers a certain amount of HP"} } } StateIconList[EFST_IDs.EFST_FOOD_LUK_CASH] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases LUK"} } } StateIconList[EFST_IDs.EFST_BROKENARMOR] = { descript = { {"Armor is damaged", COLOR_TITLE_DEBUFF} } } StateIconList[EFST_IDs.EFST_DODGE_ON] = { descript = { {"Dodge", COLOR_TITLE_BUFF}, {"Allows Flying Kick to be used as a counter"}, {"When receiving enemy magic attack"}, {"there is a chance of completely avoiding it"}, {"If Spurt is also active"}, {"chance of avoiding physical attacks as well"} } } StateIconList[EFST_IDs.EFST_TARGET_BLOOD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Resistance Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases resistance to"}, {"Stun, Frozen, Stone, Sleep, Silence"}, {"Blind, Curse, Poison, Bleeding, Confusion"} } } StateIconList[EFST_IDs.EFST_MELODYOFSINK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Melody of Sink", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Magical Damage"}, {"Decreases Physical Damage"} } } StateIconList[EFST_IDs.EFST_CRUCIS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Signum Crucis", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces Undead and Demon monsters DEF"} } } StateIconList[EFST_IDs.EFST_SLOWCAST] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Slow Cast", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Increases Casting Time"} } } StateIconList[EFST_IDs.EFST_PROPERTYWIND] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Lightning Loader", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enchants Weapon with Wind Property"} } } StateIconList[EFST_IDs.EFST_ENCHANTBLADE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enchant Blade", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Adds magic damage to physical attacks"} } } StateIconList[EFST_IDs.EFST_ADRENALINE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Adrenaline Rush", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Attack Speed of"}, {"Axes and Mace weapons"} } } StateIconList[EFST_IDs.EFST_MAGICMUSHROOM] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Magic Mushroom (Laughing Poison Mushroom)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Uses Smile Emoticon"}, {"Casts random spells every 4 seconds"}, {"Drains HP every 4 seconds"} } } StateIconList[EFST_IDs.EFST_CASH_PLUSEXP] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases acquired EXP"} } } StateIconList[EFST_IDs.EFST_ATTHASTE_POTION2] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Awakening Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ASPD"} } } StateIconList[EFST_IDs.EFST_TOXIN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Toxin", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Interferes with skills every 10 seconds"}, {"Phen card is ignored"}, {"Every 10 seconds, SP is consumed"} } } StateIconList[EFST_IDs.EFST_RAISINGDRAGON] = { descript = { {"Rising Dragon", COLOR_TITLE_BUFF}, {"Maximum Spheres Increased"}, {"Increases Maximum HP/SP"}, {"Increases Attack Speed"}, {"Maintains Fury State"}, {"Slowly Drains HP per seconds"} } } StateIconList[EFST_IDs.EFST_HARMONIZE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Harmonize", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases all Stats"} } } StateIconList[EFST_IDs.EFST_CHASEWALK2] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases STR"} } } StateIconList[EFST_IDs.EFST_FOOD_STR_CASH] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases STR"} } } StateIconList[EFST_IDs.EFST_CLOAKINGEXCEED] = { descript = { {"Cloaking Exceed", COLOR_TITLE_BUFF}, {"Hides from Insects and Demon types too."}, {"Remains hidden until a certain number of hits received."}, {"Increases Movement Speed"} } } StateIconList[EFST_IDs.EFST_ASSUMPTIO2] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Assumptio", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Defense"} } } StateIconList[EFST_IDs.EFST_THORNS_TRAP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Thorn Trap", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Periodically applies damage"} } } StateIconList[EFST_IDs.EFST_SLOWPOISON] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Slow Poison", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Temporarily stops Poison Damage"} } } StateIconList[EFST_IDs.EFST_CLOAKING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Cloaking", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Invisible"} } } StateIconList[EFST_IDs.EFST_PARTYFLEE] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases Flee Rate"} } } StateIconList[EFST_IDs.EFST_CRITICALPERCENT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Varnish", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Critical"} } } StateIconList[EFST_IDs.EFST_INSPIRATION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Inspiration", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Hit rate, Stats, Damage, Max HP increased"}, {"All buffs and status effects removed"}, {"Drains HP, SP over time"}, {"Cannot receive status effects"}, {"Lose a percentage of your EXP"} } } StateIconList[EFST_IDs.EFST_UNLIMITED_HUMMING_VOICE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Unlimited Humming Voice", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Affected target's skills"}, {"increase their SP consumption"} } } StateIconList[EFST_IDs.EFST_FOOD_DEX] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases DEX"} } } StateIconList[EFST_IDs.EFST_ANALYZE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Analyze", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces Physical and Magical Defense"} } } StateIconList[EFST_IDs.EFST_GENTLETOUCH_REVITALIZE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Gentle Touch - Revitalize", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases VIT, Max HP"}, {"Increases DEF"}, {"Increases natural HP Recovery"}, {"Movement speed increased"} } } StateIconList[EFST_IDs.EFST_COUNTER_ON] = { descript = { {"Prepare Counter Kick", COLOR_TITLE_BUFF}, {"Hit an enemy"}, {"to be ready for a counter kick"} } } StateIconList[EFST_IDs.EFST_GLORIA] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Gloria", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases LUK"} } } StateIconList[EFST_IDs.EFST_RUSH_WINDMILL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rush Windmill Attack", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Damage"} } } StateIconList[EFST_IDs.EFST_PYREXIA] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Pyrexia", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Dark and Hallucinating state"} } } StateIconList[EFST_IDs.EFST_DANCE_WITH_WUG] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Dance With Warg", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ASPD"}, {"Reduces Fixed casting time"} } } StateIconList[EFST_IDs.EFST_SWING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Swing Dance", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Movement Speed"}, {"Increases ASPD"} } } StateIconList[EFST_IDs.EFST_MOON_COMFORT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Comfort of the Moon", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Improves FLEE"} } } StateIconList[EFST_IDs.EFST_MOONLIT_SERENADE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Moonlit Serenade", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases damage of magic skills"} } } StateIconList[EFST_IDs.EFST_GENTLETOUCH_CHANGE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Gentle Touch - Change", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces DEF and MDEF"}, {"Increases Damage and ASPD"} } } StateIconList[EFST_IDs.EFST_STRIPACCESSARY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Accessory Off Status", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Cannot Equip Accessories"} } } StateIconList[EFST_IDs.EFST_PROPERTYUNDEAD] = { haveTimeLimit = 1, descript = { {"Enchants Armor with Undead Property"} } } StateIconList[EFST_IDs.EFST_INVISIBILITY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Invisibility", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Conceals yourself from view"}, {"All attacks become Ghost Lvl 1 property"}, {"Drains SP"}, {"Skills and items cannot be used"} } } StateIconList[EFST_IDs.EFST_ABUNDANCE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rune Stone: Abundance", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Recovers SP every 10 seconds"} } } StateIconList[EFST_IDs.EFST_FOOD_BASICHIT] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Improves HIT"} } } StateIconList[EFST_IDs.EFST_FOOD_AGI_CASH] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases AGI"} } } StateIconList[EFST_IDs.EFST_SHADOWFORM] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shadow Form", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"For a certain number of hits"}, {"have a target take the damage instead"} } } StateIconList[EFST_IDs.EFST_AUTOSHADOWSPELL] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Auto Shadow Spell", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Automatically casts"}, {"an available magic spell"} } } StateIconList[EFST_IDs.EFST_SHAPESHIFT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Shape Shift", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Changes your Mado Gear elemental property"} } } StateIconList[EFST_IDs.EFST_MANU_ATK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"¸¶´©Å©ÀÇ È£±â", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"¸¶´©Å© ÇʵåÁö¿ª ¸ó½ºÅÍ¿¡°Ô"}, {"¹°¸®°ø°Ý µ¥¹ÌÁö »ó½Â"} } } StateIconList[EFST_IDs.EFST_MARIONETTE_MASTER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Marionette Control (caster)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Passes the stats"}, {"to a Player"} } } StateIconList[EFST_IDs.EFST_MARIONETTE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Marionette Control (target)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Target Player"}, {"who receives the stats"} } } StateIconList[EFST_IDs.EFST_WZ_SIGHTBLASTER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Sight Blaster", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Attacks an enemy with a single attack"}, {"that ventures too close"} } } StateIconList[EFST_IDs.EFST_LEXAETERNA] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Lex Aeterna", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Doubles damage of the next attack"} } } StateIconList[EFST_IDs.EFST_INFRAREDSCAN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Infrared Scan", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Discovers targets in hiding"}, {"Chance to Reduce FLEE of nearby enemy"} } } StateIconList[EFST_IDs.EFST_INT_SCROLL] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases INT"} } } StateIconList[EFST_IDs.EFST_ASPERSIO] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Aspersio", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enchants Weapon with Holy Property"} } } StateIconList[EFST_IDs.EFST_MOVHASTE_INFINITY] = { descript = { {"Increases Movement Speed"} } } StateIconList[EFST_IDs.EFST_LERADS_DEW] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Lerad's Dew", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Max HP"} } } StateIconList[EFST_IDs.EFST_FOOD_INT] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases INT"} } } StateIconList[EFST_IDs.EFST_VENOMBLEED] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Venom Bleed", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces Max HP"} } } StateIconList[EFST_IDs.EFST_GS_GATLINGFEVER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Gatling Fever", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Damage and ASPD"}, {"Reduces Movement Speed"} } } StateIconList[EFST_IDs.EFST_VITALITYACTIVATION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rune Stone: Vitality Activation", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"To the caster,"}, {"Increases Healing skills and Item effects"}, {"Stops SP regeneration"}, {"Reduces SP recovery item effects"} } } StateIconList[EFST_IDs.EFST_STONEHARDSKIN] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rune Stone: Stone Hard Skin", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Resists damage equal to the HP consumed when casting"}, {"Players that attack you with weapons"}, {"will break them by chance."}, {"On monsters, they will have reduced ATK for 10 seconds"} } } StateIconList[EFST_IDs.EFST_WEIGHTOVER90] = { descript = { {"Overweight 90%", COLOR_TITLE_DEBUFF}, {"HP/SP will not be restored"}, {"Attacks/Skills are disabled"} } } StateIconList[EFST_IDs.EFST_PROTECTHELM] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Chemical Protection Helm (Biochemical Helm)", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Protects Helm from any kinds of status"} --Or use "Indestructible and Unstrippable" } } StateIconList[EFST_IDs.EFST_PLUSAVOIDVALUE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"ȯ¿µÀÇ ¼úÀÜ", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"¿ÏÀü ȸÇÇ Áõ°¡"} } } StateIconList[EFST_IDs.EFST_OBLIVIONCURSE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Oblivion Curse", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Oblivion status"} } } StateIconList[EFST_IDs.EFST_HEALPLUS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Enhanced Healing Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When healing via recovery items"}, {"the healing effect is increased"} } } StateIconList[EFST_IDs.EFST_PROTECT_DEF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Defense Protection", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases physical DEF"} } } StateIconList[EFST_IDs.EFST_CRITICALWOUND] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Critical Wounds", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces effects of healing skills"} } } StateIconList[EFST_IDs.EFST_PRESTIGE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Prestige", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Chance to evade Magical Attacks"}, {"Defense Up"} } } StateIconList[EFST_IDs.EFST_FOOD_DEX_CASH] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases DEX"} } } StateIconList[EFST_IDs.EFST_CARTBOOST] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Cart Boost", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Movement Speed"} } } StateIconList[EFST_IDs.EFST_L_LIFEPOTION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Medium Life Potion", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Recovers HP every 4 seconds"}, {"No effect if Berserk State is active"} } } StateIconList[EFST_IDs.EFST_WINDWALK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Wind Walk", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Movement Speed/Evasion"} } } StateIconList[EFST_IDs.EFST_PROPERTYFIRE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Flame Launcher", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Enchants Weapon with Fire Property"} } } StateIconList[EFST_IDs.EFST_STRIKING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Striking", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Weapon damage and chance of critical"} } } StateIconList[EFST_IDs.EFST_DOWNKICK_ON] = { descript = { {"Prepare Down Kick", COLOR_TITLE_BUFF}, {"Hit an enemy"}, {"for a chance to preform a kick"} } } StateIconList[EFST_IDs.EFST_PROPERTYDARK] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Enchants Armor with Shadow Property"} } } StateIconList[EFST_IDs.EFST_REFLECTSHIELD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Reflect Shield", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When attacked with physical short range attacks"}, {"reflect a portion of the damage"} } } StateIconList[EFST_IDs.EFST_RIDING] = { descript = { {"Peco Peco Rental", COLOR_TITLE_TOGGLE} --Rental Transportation } } StateIconList[EFST_IDs.EFST_LIGHTNINGWALK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Lightning Walk", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When targetted by a magic attack,"}, {"after a chance to avoid"}, {"move straight to the caster"} } } StateIconList[EFST_IDs.EFST_FROSTMISTY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Freezing Status", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Decreases Defense, ASPD and Movement speed"}, {"Increases Fixed Cast time."} } } StateIconList[EFST_IDs.EFST_COLD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Frozen", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Movement, Attack, Skill and Items are not available"}, {"Drains SP and HP continuously"}, {"Increases the damage taken caused by Maces, Axes and 2H Axes"}, {"Increases the damage taken caused by Wind Property spells"}, {"Reduces the damage taken caused by Daggers, Swords, 2H Swords and Arrows"} } } StateIconList[EFST_IDs.EFST_GROUNDMAGIC] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Ground skill effect"} } } StateIconList[EFST_IDs.EFST_HELLPOWER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Hell Power", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Can not be revived"}, {"Sacrifice is Disabled"}, {"Token of Siegfried disabled"} } } StateIconList[EFST_IDs.EFST_SAVAGE_STEAK] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Savage Roast", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases STR"} } } StateIconList[EFST_IDs.EFST_COCKTAIL_WARG_BLOOD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Wolf Blood Cocktail", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases INT"} } } StateIconList[EFST_IDs.EFST_MINOR_BBQ] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Minorous Beef Stew", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases VIT"} } } StateIconList[EFST_IDs.EFST_SIROMA_ICE_TEA] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Siroma Iced Tea", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases DEX"} } } StateIconList[EFST_IDs.EFST_DROCERA_HERB_STEAMED] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Drosera Herb Salad", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases AGI"} } } StateIconList[EFST_IDs.EFST_PUTTI_TAILS_NOODLES] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Petite Tail Noodle", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases LUK"} } } StateIconList[EFST_IDs.EFST_STOMACHACHE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Abdominal Pain", COLOR_TITLE_BUFF}, -- or Stomach Ache {"%s", COLOR_TIME}, {"Reduces All Stats"}, {"Reduces Movement Speed"}, {"10ÃÊ ´ç ÇÑ ¹ø¾¿ /¾É±â ¹ß»ý"}, {"Drains SP every 10 seconds"} } } StateIconList[EFST_IDs.EFST_PROTECTEXP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Mom and Dad I Love You", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"No EXP loss upon death"} } } StateIconList[EFST_IDs.EFST_ANGEL_PROTECT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Guardian Angel", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"No EXP loss upon death"} } } StateIconList[EFST_IDs.EFST_MORA_BUFF] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Mora Berry", COLOR_TITLE_BUFF}, --google translated {"%s", COLOR_TIME}, {"Increases Resistance to every monsters"}, {"in the fields near the town of Mora."} } } StateIconList[EFST_IDs.EFST_POPECOOKIE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Pope Cookie", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ATK and MATK"}, {"Increases Resistance to all property."} } } StateIconList[EFST_IDs.EFST_VITALIZE_POTION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Vitalize Potion", COLOR_TITLE_BUFF}, --Google says "Activation Potion" {"%s", COLOR_TIME}, {"Increases ATK and MATK"}, {"Èú°ú ¾ÆÀÌÅÛÀÇ È¸º¹È¿´É Áõ°¡"} } } StateIconList[EFST_IDs.EFST_G_LIFEPOTION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Rapid Life-giving Water", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Recovers HP every 3 seconds"}, {"No effect if Berserk State is active"} } } StateIconList[EFST_IDs.EFST_ODINS_POWER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Odin's Power", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ATK and MATK"}, {"Decreases DEF and MDEF"} } } StateIconList[EFST_IDs.EFST_MAGIC_CANDY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Magic Candy", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases MATK"}, {"Reduced fixed casting time."}, {"Casting cannot be interrupted."}, {"Drains SP every 10 seconds"} } } StateIconList[EFST_IDs.EFST_ENERGYCOAT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Energy Coat", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduces damage in proportion"}, {"to the amount of SP remaining"} } } StateIconList[EFST_IDs.EFST_PAIN_KILLER] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Pain Killer", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"No movement delay in receiving damage"}, {"Reduced damage taken"} } } StateIconList[EFST_IDs.EFST_LIGHT_OF_REGENE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Light Of Regeneration", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When the summoner died"}, {"Homunculus will sacrifice to revive the summoner"} } } StateIconList[EFST_IDs.EFST_OVERED_BOOST] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Overed Boost", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases ASPD and Evasion"}, {"to a fixed amount"} } } StateIconList[EFST_IDs.EFST_STYLE_CHANGE] = { haveTimeLimit = 0, descript = { {"Style Change", COLOR_TITLE_TOGGLE}, {"Homunculus in Fighter Style"} } } StateIconList[EFST_IDs.EFST_MAGMA_FLOW] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Magma Flow", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When receiving damage"}, {"there is a chance to eject magma around it"} } } StateIconList[EFST_IDs.EFST_GRANITIC_ARMOR] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Granitic Armor", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Reduced damage taken"}, {"Lose some HP when the status ends."} } } StateIconList[EFST_IDs.EFST_PYROCLASTIC] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Pyroclastic", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"µðÀÌÅÍ¿Í ÁÖÀÎÀÇ ¹«±â°¡"}, {"È­¼Ó¼ºÀ¸·Î º¯È­"}, {"Increased weapon damage"} } } StateIconList[EFST_IDs.EFST_VOLCANIC_ASH] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Volcanic Ash", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduced hit rate"}, {"Skill has a chance of failing"}, {"Increases fire damage taken"} } } StateIconList[EFST_IDs.EFST_ATKER_ASPD] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"´ëȯ´Ü", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Max HP"}, {"Increases HP recovery"} } } StateIconList[EFST_IDs.EFST_ATKER_MOVESPEED] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"ÅÂû´Ü", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Increases Max SP"}, {"Increases SP recovery"} } } StateIconList[EFST_IDs.EFST_OVERLAPEXPUP] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Maldango Canned Cat", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"When killing monsters in Maldango"}, {"Increases Base and Job EXP"}, {"Increases Item drop rate"} } } StateIconList[EFST_IDs.EFST_PLUSATTACKPOWER] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases ATK"} } } StateIconList[EFST_IDs.EFST_PLUSMAGICPOWER] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases MATK"} } } StateIconList[EFST_IDs.EFST_MACRO] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Using Macros", COLOR_SYSTEM}, {"%s", COLOR_TIME}, {"Macro is activated"} } } StateIconList[EFST_IDs.EFST_MACRO_POSTDELAY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Macros Disabled", COLOR_SYSTEM}, {"%s", COLOR_TIME}, {"Macro is deactivated."} } } StateIconList[EFST_IDs.EFST_MONSTER_TRANSFORM] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Monster Transformation", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Transformed into monster."} } } StateIconList[EFST_IDs.EFST_SIT] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Sit", COLOR_TITLE_TOGGLE}, } } StateIconList[EFST_IDs.EFST_ALL_RIDING] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Riding", COLOR_TITLE_TOGGLE}, } } StateIconList[EFST_IDs.EFST_SKF_MATK] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases MATK"}, } } StateIconList[EFST_IDs.EFST_SKF_ATK] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases ATK"}, } } StateIconList[EFST_IDs.EFST_SKF_ASPD] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases ASPD"}, } } StateIconList[EFST_IDs.EFST_SKF_CAST] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Reduces casting time"}, } } StateIconList[EFST_IDs.EFST_REWARD_PLUSONLYJOBEXP] = { haveTimeLimit = 1, posTimeLimitStr = 1, descript = { {"%s", COLOR_TIME}, {"Increases gained Job experience"}, } } StateIconList[EFST_IDs.EFST_ENERVATION] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Masquerade: Enervation", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces ATK"}, {"Removes Spirit Spheres"} } } StateIconList[EFST_IDs.EFST_GROOMY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Masquerade: Gloomy", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Decreases ASPD and HIT"}, {"Forced to release mounts and any related animals."}, {"Mounts and any related animals are disabled."}, } } StateIconList[EFST_IDs.EFST_IGNORANCE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Masquerade: Ignorance", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Lost a certain amount of SP"}, {"Skills and Magics are disabled"}, } } StateIconList[EFST_IDs.EFST_LAZINESS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Masquerade: Laziness", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces Movement Speed and FLEE"}, {"Increases casting time"}, {"Adds a certain amount of SP when using a skill"}, } } StateIconList[EFST_IDs.EFST_UNLUCKY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Masquerade: Unlucky", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces critical rate"}, {"Reduces perfect dodge"}, {"Using skills costs zeny"}, {"Damage over time causes a certain status ailments."}, } } StateIconList[EFST_IDs.EFST_WEAKNESS] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Masquerade: Weakness", COLOR_TITLE_DEBUFF}, {"%s", COLOR_TIME}, {"Reduces Max HP"}, {"Strips weapons and shield"}, --ÇÇÇØ ¼ø°£ ¹«±â, ¹æÆÐ Âø¿ë ÇØÁ¦ <-- help? {"Cannot equip weapons and shield"}, } } StateIconList[EFST_IDs.EFST_STEELBODY] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Steel Body", COLOR_TITLE_BUFF}, {"%s", COLOR_TIME}, {"Sets DEF and MDEF to a fixed amount."}, --DEF, MDEF ³ôÀº ¼öÄ¡·Î °íÁ¤ <-- help? {"Reduces Movement Speed and ASPD"}, {"Skills are disabled"}, } } StateIconList[EFST_IDs.EFST_LG_REFLECTDAMAGE] = { haveTimeLimit = 1, posTimeLimitStr = 2, descript = { {"Reflect Damage", COLOR_TITLE_TOGGLE}, {"%s", COLOR_TIME}, {"Applies damage received to all enemies in an area"}, {"(except for certain trap damage)"}, {"Consumes SP every second"} } }
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/component/armor/armor_layer_restraint.lua
3
2272
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_component_armor_armor_layer_restraint = object_tangible_component_armor_shared_armor_layer_restraint:new { } ObjectTemplates:addTemplate(object_tangible_component_armor_armor_layer_restraint, "object/tangible/component/armor/armor_layer_restraint.iff")
agpl-3.0
DailyShana/ygopro-scripts
c32750510.lua
3
2790
--アイス・ブリザード・マスター function c32750510.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c32750510.spcon) e1:SetOperation(c32750510.spop) c:RegisterEffect(e1) --add counter local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(32750510,0)) e2:SetCategory(CATEGORY_COUNTER) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c32750510.target) e2:SetOperation(c32750510.operation) c:RegisterEffect(e2) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(32750510,1)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCost(c32750510.descost) e3:SetTarget(c32750510.destg) e3:SetOperation(c32750510.desop) c:RegisterEffect(e3) end function c32750510.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(c:GetControler(),Card.IsAttribute,2,nil,ATTRIBUTE_WATER) end function c32750510.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsAttribute,2,2,nil,ATTRIBUTE_WATER) Duel.Release(g,REASON_COST) end function c32750510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsCanAddCounter(0x15,1) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x15,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x15,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) end function c32750510.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x15,1) then tc:AddCounter(0x15,1) end end function c32750510.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c32750510.desfilter(c) return c:GetCounter(0x15)~=0 and c:IsDestructable() end function c32750510.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c32750510.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) end
gpl-2.0
ollie27/openwrt_luci
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua
57
1951
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.processes", package.seeall) function rrdargs( graph, plugin, plugin_instance, dtype ) return { { title = "%H: Processes", vlabel = "Processes/s", data = { instances = { ps_state = { "sleeping", "running", "paging", "blocked", "stopped", "zombies" } }, options = { ps_state_sleeping = { color = "0000ff" }, ps_state_running = { color = "008000" }, ps_state_paging = { color = "ffff00" }, ps_state_blocked = { color = "ff5000" }, ps_state_stopped = { color = "555555" }, ps_state_zombies = { color = "ff0000" } } } }, { title = "%H: CPU time used by %pi", vlabel = "Jiffies", data = { sources = { ps_cputime = { "syst", "user" } }, options = { ps_cputime__user = { color = "0000ff", overlay = true }, ps_cputime__syst = { color = "ff0000", overlay = true } } } }, { title = "%H: Threads and processes belonging to %pi", vlabel = "Count", detail = true, data = { sources = { ps_count = { "threads", "processes" } }, options = { ps_count__threads = { color = "00ff00" }, ps_count__processes = { color = "0000bb" } } } }, { title = "%H: Page faults in %pi", vlabel = "Pagefaults", detail = true, data = { sources = { ps_pagefaults = { "minflt", "majflt" } }, options = { ps_pagefaults__minflt = { color = "ff0000" }, ps_pagefaults__majflt = { color = "ff5500" } } } }, { title = "%H: Virtual memory size of %pi", vlabel = "Bytes", detail = true, number_format = "%5.1lf%sB", data = { types = { "ps_rss" }, options = { ps_rss = { color = "0000ff" } } } } } end
apache-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/creature/droids_r2.lua
3
2188
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_creature_droids_r2 = object_static_creature_shared_droids_r2:new { } ObjectTemplates:addTemplate(object_static_creature_droids_r2, "object/static/creature/droids_r2.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Xarcabard/npcs/qm5.lua
5
1067
----------------------------------- -- Area: Xarcabard -- NPC: qm5 (???) -- Involved in Quests: Breaking Barriers -- !pos 179 -33 82 112 ----------------------------------- package.loaded["scripts/zones/Xarcabard/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Xarcabard/TextIDs"); require("scripts/globals/quests"); require("scripts/globals/missions"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) if (player:getCurrentMission(SANDORIA) == BREAKING_BARRIERS and player:getVar("MissionStatus") == 2) then player:addKeyItem(FIGURE_OF_GARUDA); player:messageSpecial(KEYITEM_OBTAINED,FIGURE_OF_GARUDA); player:setVar("MissionStatus",3); else player:messageSpecial(NOTHING_OUT_OF_ORDINARY); end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end;
gpl-3.0
DailyShana/ygopro-scripts
c2978414.lua
3
3621
--No.46 神影龍ドラッグルーオン function c2978414.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),8,2) c:EnableReviveLimit() --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(2978414,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCondition(c2978414.condition) e1:SetCost(c2978414.cost) e1:SetTarget(c2978414.sptg) e1:SetOperation(c2978414.spop) c:RegisterEffect(e1) --control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(2978414,1)) e2:SetCategory(CATEGORY_CONTROL) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCondition(c2978414.condition) e2:SetCost(c2978414.cost) e2:SetTarget(c2978414.cttg) e2:SetOperation(c2978414.ctop) c:RegisterEffect(e2) --effect limit local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(2978414,2)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e3:SetCondition(c2978414.condition) e3:SetCost(c2978414.cost) e3:SetOperation(c2978414.efop) c:RegisterEffect(e3) end c2978414.xyz_number=46 function c2978414.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 end function c2978414.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c2978414.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c2978414.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c2978414.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function c2978414.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c2978414.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function c2978414.ctfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged() end function c2978414.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2978414.ctfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c2978414.ctfilter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,c2978414.ctfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) end function c2978414.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp) then if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.Destroy(tc,REASON_EFFECT) end end end function c2978414.efop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTarget(c2978414.actfilter) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) end function c2978414.actfilter(e,c) return c:IsRace(RACE_DRAGON) end
gpl-2.0
Whitechaser/darkstar
scripts/zones/Yhoator_Jungle/npcs/Guddal_IM.lua
2
2983
----------------------------------- -- Area: Yhoator Jungle -- NPC: Guddal, I.M. -- Border Conquest Guards -- !pos -84.113 -0.449 224.902 124 ----------------------------------- package.loaded["scripts/zones/Yhoator_Jungle/TextIDs"] = nil; ----------------------------------- require("scripts/globals/conquest"); require("scripts/zones/Yhoator_Jungle/TextIDs"); local guardnation = NATION_BASTOK; -- SANDORIA, BASTOK, WINDURST, 4 = jeuno local guardtype = 4; -- 1: city, 2: foreign, 3: outpost, 4: border local region = ELSHIMOUPLANDS; local csid = 0x7ff8; function onTrade(player,npc,trade) tradeConquestGuard(player,npc,trade,guardnation,guardtype); end; function onTrigger(player,npc) if (player:hasKeyItem(getSupplyKey(region)) and player:getNation() == guardnation) then if (supplyRunFresh(player) == 1) then player:startEvent(csid,16,0,0,0,1,0,0,255); -- you have brought us supplies ! else player:showText(npc, CONQUEST - 1); -- "Hmm... These supplies you have brought us are too old to be of any use." player:delKeyItem(getSupplyKey(region)); player:messageSpecial(KEYITEM_OBTAINED + 1, getSupplyKey(region)); player:setVar("supplyQuest_region",0); end else local arg1 = getArg1(guardnation, player) - 1; if (arg1 >= 1792) then -- foreign, non-allied player:startEvent(csid,1808,0,0,0,0,player:getRank(),0,0); else -- citizen or allied player:startEvent(csid,arg1,0,0x3F0000,0,0,getArg6(player),0,0); end end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("OPTION: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("OPTION: %u",option); if (option == 1) then local duration = (player:getRank() + getNationRank(player:getNation()) + 3) * 3600; player:delStatusEffect(dsp.effects.SIGIL); player:delStatusEffect(dsp.effects.SANCTION); player:delStatusEffect(dsp.effects.SIGNET); player:addStatusEffect(dsp.effects.SIGNET,0,0,duration); -- Grant Signet elseif (option == 2) then player:delKeyItem(getSupplyKey(region)); player:addCP(supplyReward[region + 1]) player:messageSpecial(CONQUEST); -- "You've earned conquest points!" if (hasOutpost(player, region+5) == 0) then local supply_quests = 2^(region+5); player:addNationTeleport(guardnation,supply_quests); player:setVar("supplyQuest_region",0); end elseif (option == 4) then if (player:delGil(giltosetHP(guardnation,player))) then player:setHomePoint(); player:messageSpecial(CONQUEST + 94); -- "Your home point has been set." else player:messageSpecial(CONQUEST + 95); -- "You do not have enough gil to set your home point here." end end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/yavin4/kliknik_scout.lua
1
1053
kliknik_scout = Creature:new { objectName = "@mob/creature_names:kliknik_scout", socialGroup = "kliknik", faction = "", level = 27, chanceHit = 0.36, damageMin = 240, damageMax = 250, baseXp = 2730, baseHAM = 7200, baseHAMmax = 8800, armor = 0, resists = {135,120,15,130,15,15,15,-1,-1}, meatType = "meat_carnivore", meatAmount = 6, hideType = "hide_scaley", hideAmount = 4, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0.25, ferocity = 0, pvpBitmask = AGGRESSIVE + ATTACKABLE + ENEMY, creatureBitmask = PACK, optionsBitmask = 128, diet = CARNIVORE, templates = {"object/mobile/kliknik_hue.iff"}, controlDeviceTemplate = "object/intangible/pet/kliknik_hue.iff", scale = 1.05, lootGroups = { { groups = { {group = "kliknik_common", chance = 10000000} }, lootChance = 1540000 } }, weapons = {"creature_spit_small_yellow"}, conversationTemplate = "", attacks = { {"intimidationattack",""}, {"mildpoison",""} } } CreatureTemplates:addCreatureTemplate(kliknik_scout, "kliknik_scout")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/space/capacitor/heavy_battery_mk5.lua
2
3282
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_space_capacitor_heavy_battery_mk5 = object_draft_schematic_space_capacitor_shared_heavy_battery_mk5:new { templateType = DRAFTSCHEMATIC, customObjectName = "Heavy Battery - Mark V", craftingToolTab = 131072, -- (See DraftSchemticImplementation.h) complexity = 34, size = 1, xpType = "shipwright", xp = 625, assemblySkill = "advanced_assembly", experimentingSkill = "advanced_ship_experimentation", customizationSkill = "power_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n"}, ingredientTitleNames = {"battery_casing", "enhanced_battery_core"}, ingredientSlotType = {0, 0}, resourceTypes = {"steel", "copper_borocarbitic"}, resourceQuantities = {2000, 500}, contribution = {100, 100}, targetTemplate = "object/tangible/ship/crafted/capacitor/heavy_battery_mk5.iff", additionalTemplates = { "object/tangible/ship/crafted/capacitor/shared_heavy_battery_mk5.iff", } } ObjectTemplates:addTemplate(object_draft_schematic_space_capacitor_heavy_battery_mk5, "object/draft_schematic/space/capacitor/heavy_battery_mk5.iff")
agpl-3.0
oyooyo/nodemcu-firmware
lua_examples/luaOTA/_doTick.lua
4
2983
tmr.stop(0)--SAFETRIM -- function _doTick(self) -- Upvals local self = ... local wifi,net = wifi,net local sta = wifi.sta local config,log,startApp = self.config,self.log,self.startApp local tick_count = 0 local function socket_close(socket) --upval: self, startApp if rawget(self,"socket") then self.socket=nil -- remove circular reference in upval pcall(socket.close,socket) return startApp("Unexpected socket close") end end local function receiveFirstRec(socket, rec) -- upval: self, crypto, startApp, tmr local cmdlen = (rec:find('\n',1, true) or 0) - 1 local cmd,hash = rec:sub(1,cmdlen-6), rec:sub(cmdlen-5,cmdlen) if cmd:find('"r":"OK!"',1,true) or cmdlen < 16 or hash ~= crypto.toHex(crypto.hmac("MD5", cmd, self.secret):sub(-3)) then print "No provisioning changes required" self.socket = nil self.post(function() --upval: socket if socket then pcall(socket.close, socket) end end) return startApp("OK! No further updates needed") end -- Else a valid request has been received from the provision service free up -- some resources that are no longer needed and set backstop timer for general -- timeout. This also dereferences the previous doTick cb so it can now be GCed. collectgarbage() tmr.alarm(0, 30000, tmr.ALARM_SINGLE, self.startApp) return self:_provision(socket,rec) end local function socket_connect(socket) --upval: self, socket_connect print "Connected to provisioning service" self.socket = socket socket_connect = nil -- make this function available for GC socket:on("receive", receiveFirstRec) return self.socket_send(socket, self.config) end local conn return function() -- the proper doTick() timer callback tick_count = tick_count + 1 log("entering tick", tick_count, sta.getconfig(false), sta.getip()) if (tick_count < 20) then -- (wait up to 10 secs for Wifi connection) local status, ip = sta.status(),{sta.getip()} if (status == wifi.STA_GOTIP) then log("Connected:", unpack(ip)) if (config.nsserver) then net.dns.setdnsserver(config.nsserver, 0) end conn = net.createConnection(net.TCP, 0) conn:on("connection", socket_connect) conn:on("disconnection", socket_close) conn:connect(config.port, config.server) tick_count = 20 end elseif (tick_count == 20) then -- assume timeout and exec app CB return self.startApp("OK: Timeout on waiting for wifi station setup") elseif (tick_count == 26) then -- wait up to 2.5 secs for TCP response tmr.unregister(0) pcall(conn.close, conn) self.socket=nil return startApp("OK: Timeout on waiting for provision service response") end end -- end
mit
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/skill_buff/skill_buff_melee_defense.lua
2
2544
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_skill_buff_skill_buff_melee_defense = object_tangible_skill_buff_shared_skill_buff_melee_defense:new { templateType = SKILLBUFF, objectMenuComponent = {"cpp", "SkillBuffObjectMenuComponent"}, attributeListComponent = "SkillBuffObjectAttributeListComponent", duration = 300, useCount = 5, modifiers = { "melee_defense", 10 }, buffName = "melee_defense", buffCRC = 0xC78FA3B7 } ObjectTemplates:addTemplate(object_tangible_skill_buff_skill_buff_melee_defense, "object/tangible/skill_buff/skill_buff_melee_defense.iff")
agpl-3.0
DailyShana/ygopro-scripts
c6979239.lua
9
1240
--リーフ・フェアリー function c6979239.initial_effect(c) --damage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(6979239,0)) e1:SetCategory(CATEGORY_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCost(c6979239.cost) e1:SetTarget(c6979239.target) e1:SetOperation(c6979239.operation) c:RegisterEffect(e1) end function c6979239.filter(c,ec) return c:GetEquipTarget()==ec and c:IsAbleToGraveAsCost() end function c6979239.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c6979239.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c6979239.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function c6979239.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end function c6979239.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end
gpl-2.0
DailyShana/ygopro-scripts
c28604635.lua
3
1060
--ふるい落とし function c28604635.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCost(c28604635.cost) e1:SetTarget(c28604635.target) e1:SetOperation(c28604635.activate) c:RegisterEffect(e1) end function c28604635.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,500) end Duel.PayLPCost(tp,500) end function c28604635.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:GetLevel()==3 and c:IsDestructable() end function c28604635.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c28604635.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c28604635.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/crafted/weapon/missile/wpn_imagerec_missile_mk2.lua
3
3064
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_ship_crafted_weapon_missile_wpn_imagerec_missile_mk2 = object_tangible_ship_crafted_weapon_missile_shared_wpn_imagerec_missile_mk2:new { numberExperimentalProperties = {1, 1, 2, 2, 1, 1, 2, 2}, experimentalProperties = {"XX", "XX", "OQ", "PE", "OQ", "PE", "XX", "XX", "OQ", "PE", "OQ", "PE"}, experimentalWeights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "exp_damage_max", "exp_damage_min", "misc", "misc", "exp_ammo", "exp_fltrefirerate"}, experimentalSubGroupTitles = {"null", "null", "fltmaxdamage", "fltmindamage", "fltshieldeffectiveness", "fltarmoreffectiveness", "fltmaxammo", "fltrefirerate"}, experimentalMin = {0, 0, 3446, 1671, 350, 350, 4, 3570}, experimentalMax = {0, 0, 6399, 3104, 650, 650, 8, 6630}, experimentalPrecision = {0, 0, 0, 0, 0, 0, 0, 0}, experimentalCombineType = {0, 0, 1, 1, 1, 1, 1, 1}, } ObjectTemplates:addTemplate(object_tangible_ship_crafted_weapon_missile_wpn_imagerec_missile_mk2, "object/tangible/ship/crafted/weapon/missile/wpn_imagerec_missile_mk2.iff")
agpl-3.0
njligames/NJLIGameEngine
projects/ELIA/gameplay_scripts/yappybirds_game/scripts/YAPPYBIRDS/SCENES/MENU/STATES/About.lua
4
4780
local BaseClass = require "NJLI.STATEMACHINE.SceneEntityState" local About = {} About.__index = About --############################################################################# --DO NOT EDIT ABOVE --############################################################################# --############################################################################# --Begin Custom Code --Required local functions: -- __ctor() -- __dtor() -- __load() -- __unLoad() --############################################################################# local __ctor = function(self, init) --TODO: construct this Entity end local __dtor = function(self) --TODO: destruct this Entity end local __load = function(self) --TODO: load this Entity end local __unLoad = function(self) --TODO: unload this Entity end --############################################################################# function About:enter() BaseClass.enter(self) end function About:update(timeStep) BaseClass.update(self, timeStep) end function About:exit() BaseClass.exit(self) end function About:onMessage(message) BaseClass.onMessage(self, message) end function About:renderHUD() BaseClass.renderHUD(self) end function About:touchesDown(touches) BaseClass.touchesDown(self, touches) end function About:touchesUp(touches) BaseClass.touchesUp(self, touches) end function About:touchesMove(touches) BaseClass.touchesMove(self, touches) end function About:touchesCancelled(touches) BaseClass.touchesCancelled(self, touches) end function About:touchDown(touches) BaseClass.touchDown(self, touches) end function About:touchUp(touches) BaseClass.touchUp(self, touches) end function About:touchMove(touches) BaseClass.touchMove(self, touches) end function About:touchCancelled(touches) BaseClass.touchCancelled(self, touches) end function About:mouseDown(mouse) BaseClass.mouseDown(self, mouse) end function About:mouseUp(mouse) BaseClass.mouseUp(self, mouse) end function About:mouseMove(mouse) BaseClass.mouseMove(self, mouse) end function About:pause() BaseClass.pause(self) end function About:unPause() BaseClass.unPause(self) end function About:keyboardShow() BaseClass.keyboardShow(self) end function About:keyboardCancel() BaseClass.keyboardCancel(self) end function About:keyboardReturn(text) BaseClass.keyboardReturn(self, text) end function About:willResignActive() BaseClass.willResignActive(self) end function About:didBecomeActive() BaseClass.didBecomeActive(self) end function About:didEnterBackground() BaseClass.didEnterBackground(self) end function About:willEnterForeground() BaseClass.willEnterForeground(self) end function About:willTerminate() BaseClass.willTerminate(self) end function About:interrupt() BaseClass.interrupt(self) end function About:resumeInterrupt() BaseClass.resumeInterrupt(self) end function About:receivedMemoryWarning() BaseClass.receivedMemoryWarning(self) end --############################################################################# --End Custom Code --############################################################################# --############################################################################# --DO NOT EDIT BELOW --############################################################################# setmetatable(About, { __index = BaseClass, __call = function (cls, ...) local self = setmetatable({}, cls) --Create the base first BaseClass._create(self, ...) self:_create(...) return self end, }) function About:className() return "About" end function About:class() return self end function About:superClass() return BaseClass end function About:__gc() --Destroy derived class first About._destroy(self) --Destroy base class after derived class BaseClass._destroy(self) end function About:__tostring() local ret = self:className() .. " =\n{\n" for pos,val in pairs(self) do ret = ret .. "\t" .. "["..pos.."]" .. " => " .. type(val) .. " = " .. tostring(val) .. "\n" end ret = ret .. "\n\t" .. tostring_r(BaseClass) .. "\n}" return ret .. "\n\t" .. tostring_r(getmetatable(self)) .. "\n}" end function About:_destroy() assert(not self.__AboutCalledLoad, "Must unload before you destroy") __dtor(self) end function About:_create(init) self.__AboutCalledLoad = false __ctor(self, init) end function About:load() --load base first BaseClass.load(self) --load derived last... __load(self) self.__AboutCalledLoad = true end function About:unLoad() assert(self.__AboutCalledLoad, "Must load before unAbout") --unload derived first... __unLoad(self) self.__AboutCalledLoad = false --unload base last... BaseClass.unLoad(self) end return About
mit
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/loot/groups/npc/desert_swooper_common.lua
4
1105
desert_swooper_common = { description = "", minimumLevel = 0, maximumLevel = 0, lootItems = { {itemTemplate = "skill_buff_carbine_accuracy", weight = 714286}, {itemTemplate = "skill_buff_carbine_speed", weight = 714286}, {itemTemplate = "skill_buff_heavy_weapon_accuracy", weight = 714286}, {itemTemplate = "skill_buff_heavy_weapon_speed", weight = 714286}, {itemTemplate = "skill_buff_melee_accuracy", weight = 714286}, {itemTemplate = "skill_buff_melee_defense", weight = 714286}, {itemTemplate = "skill_buff_pistol_accuracy", weight = 714286}, {itemTemplate = "skill_buff_pistol_speed", weight = 714286}, {itemTemplate = "skill_buff_ranged_accuracy", weight = 714286}, {itemTemplate = "skill_buff_ranged_defense", weight = 714286}, {itemTemplate = "skill_buff_thrown_accuracy", weight = 714285}, {itemTemplate = "skill_buff_thrown_speed", weight = 714285}, {itemTemplate = "skill_buff_twohandmelee_accuracy", weight = 714285}, {itemTemplate = "skill_buff_twohandmelee_speed", weight = 714285} } } addLootGroupTemplate("desert_swooper_common", desert_swooper_common)
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/vehicle/component/veh_shield_generator_mk1.lua
3
2320
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_vehicle_component_veh_shield_generator_mk1 = object_draft_schematic_vehicle_component_shared_veh_shield_generator_mk1:new { } ObjectTemplates:addTemplate(object_draft_schematic_vehicle_component_veh_shield_generator_mk1, "object/draft_schematic/vehicle/component/veh_shield_generator_mk1.iff")
agpl-3.0
DailyShana/ygopro-scripts
c22796548.lua
3
1401
--デーモンの宣告 function c22796548.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --announce local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(22796548,0)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCost(c22796548.cost) e2:SetTarget(c22796548.target) e2:SetOperation(c22796548.operation) c:RegisterEffect(e2) end function c22796548.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,500) end Duel.PayLPCost(tp,500) end function c22796548.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,0) local ac=Duel.AnnounceCard(tp) e:SetLabel(ac) end function c22796548.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end Duel.ConfirmDecktop(tp,1) local g=Duel.GetDecktopGroup(tp,1) local tc=g:GetFirst() if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then Duel.DisableShuffleCheck() Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ShuffleHand(tp) else Duel.DisableShuffleCheck() Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL) end end
gpl-2.0
EddyK69/domoticz
dzVents/runtime/tests/testTime.lua
1
40819
_G._ = require 'lodash' package.path = package.path .. ";../?.lua" describe('Time', function() local utils, Time local utcT, localT local utcRaw, utcNow, utcPast local localRaw, localNow, localPast setup(function() _G.logLevel = 1 _G.TESTMODE = true _G.log = function() end _G.globalvariables = { ['currentTime'] = '2017-08-17 12:13:14.123' } Time = require('Time') end) teardown(function() Time = nil end) before_each(function() local ms = '.342' utcNow = os.date('!*t', os.time()) utcPast = os.date('!*t', os.time() - 300) utcRaw = tostring(utcPast.year) .. '-' .. tostring(utcPast.month) .. '-' .. tostring(utcPast.day) .. ' ' .. tostring(utcPast.hour) .. ':' .. tostring(utcPast.min) .. ':' .. tostring(utcPast.sec) .. ms utcT = Time(utcRaw, true) localNow = os.date('*t', os.time()) localPast = os.date('*t', os.time() - 300) localRaw = tostring(localPast.year) .. '-' .. tostring(localPast.month) .. '-' .. tostring(localPast.day) .. ' ' .. tostring(localPast.hour) .. ':' .. tostring(localPast.min) .. ':' .. tostring(localPast.sec) .. ms localT = Time(localRaw, false) end) after_each(function() utcT = nil localT = nil end) it('should instantiate', function() assert.not_is_nil(utcT) end) describe('UTC', function() it('should have today', function() assert.is_same(utcT.current, localNow) end) it('hould have minutesAgo', function() assert.is_same(5, utcT.minutesAgo) end) it('should have secondsAgo', function() assert.is_same(300, utcT.secondsAgo) end) it('should have hoursAgo', function() local p = os.date('!*t', os.time() - 10800) local raw = tostring(p.year) .. '-' .. tostring(p.month) .. '-' .. tostring(p.day) .. ' ' .. tostring(p.hour) .. ':' .. tostring(p.min) .. ':' .. tostring(p.sec) local t = Time(raw, true) assert.is_same(3, t.hoursAgo) end) it('should have milliseconds', function() assert.is_same(342, utcT.milliSeconds) end) it('should have secondsSinceMidnight', function() local t = Time('2017-01-01 11:45:12') assert.is_same(42312, t.secondsSinceMidnight) end) it('should have a raw time', function() assert.is_same(utcRaw, utcT.raw) end) it('#tag should have leading zeros in raw time', function() local t = Time('2017-01-01 01:02:03') assert.is_same('01:02:03', t.rawTime) assert.is_same('2017-01-01', t.rawDate) end) it('should have isToday', function() assert.is_true(utcT.isToday) end) it('should have time properties', function() -- time should be converted to local time assert.is_same(localPast.year, utcT.year) assert.is_same(localPast.moth, utcT.mont) assert.is_same(localPast.day, utcT.day) assert.is_same(localPast.hour, utcT.hour) assert.is_same(localPast.min, utcT.min) assert.is_same(localPast.min, utcT.minutes) assert.is_same(localPast.sec, utcT.sec) assert.is_same(localPast.sec, utcT.seconds) -- however utcTime holds the utc time assert.is_same(utcPast.year, utcT.utcTime.year) assert.is_same(utcPast.moth, utcT.utcTime.mont) assert.is_same(utcPast.day, utcT.utcTime.day) assert.is_same(utcPast.hour, utcT.utcTime.hour) assert.is_same(utcPast.min, utcT.utcTime.min) assert.is_same(utcPast.min, utcT.utcTime.minutes) assert.is_same(utcPast.sec, utcT.utcTime.sec) assert.is_same(utcPast.sec, utcT.utcTime.seconds) end) it('should have a utc system time', function() assert.is_same(os.date('!*t'), utcT.utcSystemTime) end) end) describe('non UTC', function() it('should have today', function() assert.is_same(localT.current, localNow) end) it('hould have minutesAgo', function() assert.is_same(5, localT.minutesAgo) end) it('should have secondsAgo', function() assert.is_same(300, localT.secondsAgo) end) it('should have hoursAgo', function() local p = os.date('*t', os.time() - 10800) local raw = tostring(p.year) .. '-' .. tostring(p.month) .. '-' .. tostring(p.day) .. ' ' .. tostring(p.hour) .. ':' .. tostring(p.min) .. ':' .. tostring(p.sec) local t = Time(raw, false) assert.is_same(3, t.hoursAgo) end) it('should have a raw time', function() assert.is_same(localRaw, localT.raw) end) it('should have isToday', function() assert.is_true(localT.isToday) end) it('should have milliseconds', function() assert.is_same(342, localT.milliSeconds) assert.is_same(342, localT.milliseconds) end) it('should have week number', function() local t = Time('2017-06-05 02:04:00') assert.is_same(23, t.week) t = Time('2017-01-01 02:04:00') assert.is_same(52, t.week) t = Time('2016-01-01 02:04:00') assert.is_same(53, t.week) end) it('should have daysAgo', function() local p = os.date('*t', os.time() - 190800) local raw = tostring(p.year) .. '-' .. tostring(p.month) .. '-' .. tostring(p.day) .. ' ' .. tostring(p.hour) .. ':' .. tostring(p.min) .. ':' .. tostring(p.sec) local t = Time(raw, false) assert.is_same(2, t.daysAgo) end) it('should have msAgo', function() assert.is_same((300000 - 342 + 123), localT.msAgo) assert.is_same((300000 - 342 + 123), localT.millisecondsAgo) end) it('should have 0 seconds ago when ms < 1000', function() local p = os.date('*t', os.time() - 1) -- 1 second from 'now' local raw = tostring(p.year) .. '-' .. tostring(p.month) .. '-' .. tostring(p.day) .. ' ' .. tostring(p.hour) .. ':' .. tostring(p.min) .. ':' .. tostring(p.sec) .. '.500' local t = Time(raw, false, 0) assert.is_same(0, t.secondsAgo) assert.is_same(500, t.msAgo) assert.is_same(500, t.millisecondsAgo) assert.is_same(0, t.minutesAgo) end) it('should return a time diff', function() local t1d = os.date('*t', os.time()) local t1raw = tostring(t1d.year) .. '-' .. tostring(t1d.month) .. '-' .. tostring(t1d.day) .. ' ' .. tostring(t1d.hour) .. ':' .. tostring(t1d.min) .. ':' .. tostring(t1d.sec) .. '.100' local t1 = Time(t1raw, false, 0) local t2d = os.date('*t', os.time() - 86400) local t2raw = tostring(t2d.year) .. '-' .. tostring(t2d.month) .. '-' .. tostring(t2d.day) .. ' ' .. tostring(t2d.hour) .. ':' .. tostring(t2d.min) .. ':' .. tostring(t2d.sec) .. '.0' local t2 = Time(t2raw, false, 0) local t3d = os.date('*t', os.time() - (86400 + 86400 + 60 + 25)) local t3raw = tostring(t3d.year) .. '-' .. tostring(t3d.month) .. '-' .. tostring(t3d.day) .. ' ' .. tostring(t3d.hour) .. ':' .. tostring(t3d.min) .. ':' .. tostring(t3d.sec) .. '.0' local t3 = Time(t3raw, false, 0) local t4d = os.date('*t', os.time() - (86400 + 86400 + 60 + 25)) local t4raw = tostring(t4d.year) .. '-' .. tostring(t4d.month) .. '-' .. tostring(t4d.day) .. ' ' .. tostring(t4d.hour) .. ':' .. tostring(t4d.min) .. ':' .. tostring(t4d.sec) .. '.500' local t4 = Time(t4raw, false) local tFutured = os.date('*t', os.time() + (86400)) local tFutureraw = tostring(tFutured.year) .. '-' .. tostring(tFutured.month) .. '-' .. tostring(tFutured.day) .. ' ' .. tostring(tFutured.hour) .. ':' .. tostring(tFutured.min) .. ':' .. tostring(tFutured.sec) .. '.200' local tFuture = Time(tFutureraw, false) assert.is_same({ ["secs"] = 0, ["seconds"] = 0, ["hours"] = 0, ["days"] = 0, ["mins"] = 0, ["minutes"] = 0, ["ms"] = 0, ["milliseconds"] = 0, ["compare"] = 0 }, t1.compare(t1)) assert.is_same({ ["secs"] = 86400, ["seconds"] = 86400, ["hours"] = 24, ["days"] = 1, ["mins"] = 1440, ["minutes"] = 1440, ["ms"] = 86400000 + 100, ["milliseconds"] = 86400000 + 100, ["compare"] = -1 }, t1.compare(t2)) assert.is_same({ ["secs"] = 172885, ["seconds"] = 172885, ["hours"] = 48, ["days"] = 2, ["mins"] = 2881, ["minutes"] = 2881, ["ms"] = 172885000 + 100, ["milliseconds"] = 172885000 + 100, ["compare"] = -1 }, t1.compare(t3)) assert.is_same({ ["secs"] = 172885, ["seconds"] = 172885, ["hours"] = 48, ["days"] = 2, ["mins"] = 2881, ["minutes"] = 2881, ["compare"] = -1, ["ms"] = 172885000 - 500 + 100, -- t4 is 500ms closer to t1 ["milliseconds"] = 172885000 - 500 + 100 -- t4 is 500ms closer to t1 }, t1.compare(t4)) assert.is_same({ ["secs"] = 86400, ["seconds"] = 86400, ["hours"] = 24, ["days"] = 1, ["mins"] = 1440, ["minutes"] = 1440, ["compare"] = 1, ["ms"] = 86400100, ["milliseconds"] = 86400100 }, t1.compare(tFuture)) end) it('should have time properties', function() assert.is_same(localPast.year, localT.year) assert.is_same(localPast.moth, localT.mont) assert.is_same(localPast.day, localT.day) assert.is_same(localPast.hour, localT.hour) assert.is_same(localPast.min, localT.min) assert.is_same(localPast.sec, localT.sec) assert.is_same(localPast.min, localT.minutes) assert.is_same(localPast.sec, localT.seconds) end) it('should return iso format', function() assert.is_same(os.date("!%Y-%m-%dT%TZ", os.time(localPast)), localT.getISO()) end) it('should initialise to today', function() local now = os.date('*t') local t = Time() assert.is_same(now.year, t.year) assert.is_same(now.day, t.day) assert.is_same(now.month, t.month) end) it('should have negatives minutesAgo when time is in the future', function() local localFuture = os.date('*t', os.time() + 546564) local futureRaw = tostring(localFuture.year) .. '-' .. tostring(localFuture.month) .. '-' .. tostring(localFuture.day) .. ' ' .. tostring(localFuture.hour) .. ':' .. tostring(localFuture.min) .. ':' .. tostring(localFuture.sec) local t = Time(futureRaw, false) assert.is_same(-9109, t.minutesAgo) assert.is_same(-546564, t.secondsAgo) assert.is_same(-151, t.hoursAgo) assert.is_same(-6, t.daysAgo) end) end) describe('rules', function() describe('rule processors', function() describe('at hh:mm-hh:mm', function() it('should return nil if there is no range set', function() local t = Time('2017-01-01 11:45:00') assert.is_nil(t.ruleMatchesTimeRange('blaba')) end) it('should return true when time is in range', function() local t = Time('2017-01-01 11:45:00') assert.is_true(t.ruleMatchesTimeRange('at 10:15-13:45')) end) it('should return false when time is not in range', function() local t = Time('2017-01-01 14:45:00') assert.is_false(t.ruleMatchesTimeRange('at 10:15-13:45')) end) it('should return false when range format has asterixes', function() local t = Time('2017-01-01 14:45:00') assert.is_false(t.ruleMatchesTimeRange('at 10:1*-13:45')) end) it('should return true if range spans multiple days', function() local t = Time('2017-01-01 08:00:00') assert.is_true(t.ruleMatchesTimeRange('at 10:00-09:00')) end) it('should return false when range spans multiple days and time is not in range', function() local t = Time('2017-01-01 9:15:00') assert.is_false(t.ruleMatchesTimeRange('at 10:00-09:00')) end) it('should detect the rule within a random string', function() local t = Time('2017-01-01 08:00:00') assert.is_true(t.ruleMatchesTimeRange('blab ablab ab at 10:00-09:00 blabjablabjabj')) end) end) describe('at hh:mm', function() it('should return nil if there is no valid rule', function() local t = Time('2017-01-01 11:45:00') assert.is_nil(t.ruleMatchesTime('blaba')) end) it('should return false if the time format is not correct but the rule is ok', function() local t = Time('2017-01-01 11:45:00') assert.is_false(t.ruleMatchesTime('at 1*:**')) end) it('should return true when time matches rule', function() local t = Time('2017-01-01 11:45:00') assert.is_true(t.ruleMatchesTime('at 11:45')) assert.is_true(t.ruleMatchesTime('at 11:45 something')) assert.is_true(t.ruleMatchesTime('blabla at 11:45 blablab')) end) it('should match hour wildcard', function() local t = Time('2017-01-01 11:45:00') assert.is_true(t.ruleMatchesTime('at *:45')) assert.is_false(t.ruleMatchesTime('at *:46')) end) it('should match minute wildcard', function() local t = Time('2017-01-01 11:45:00') assert.is_true(t.ruleMatchesTime('at 11:*')) assert.is_false(t.ruleMatchesTime('at 12:*')) end) it('should detect the rule withing a random string', function() local t = Time('2017-01-01 11:45:00') assert.is_true(t.ruleMatchesTime('some rondom at 11:45 stuff')) end) end) describe('every xx hours', function() it('should detect every hour', function() local t = Time('2017-01-01 01:00:00') assert.is_true(t.ruleMatchesHourSpecification('every hour')) t = Time('2017-01-01 01:05:00') assert.is_false(t.ruleMatchesHourSpecification('every hour')) t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleMatchesHourSpecification('every hour')) end) it('should detect every other hour', function() local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleMatchesHourSpecification('every other hour')) t = Time('2017-01-01 01:00:00') assert.is_false(t.ruleMatchesHourSpecification('every other hour')) t = Time('2017-01-01 02:00:00') assert.is_true(t.ruleMatchesHourSpecification('every other hour')) t = Time('2017-01-01 22:00:00') assert.is_true(t.ruleMatchesHourSpecification('every other hour')) t = Time('2017-01-01 23:00:00') assert.is_false(t.ruleMatchesHourSpecification('every other hour')) end) it('should detect every xx hours', function() local t = Time('2017-01-01 00:00:00') local utils = t._getUtilsInstance() utils.print = function() end local hours = _.range(1, 23, 1) for i, h in pairs(hours) do local rule = 'every ' .. tostring(h) .. ' hours' local res = t.ruleMatchesHourSpecification(rule) if ( (24 / h) ~= math.floor(24 / h)) then assert.is_false(res) else assert.is_true(res) end end end) it('should return nil if there no matching rule', function() local t = Time('2017-01-01 00:00:00') assert.is_nil(t.ruleMatchesHourSpecification('bablab')) end) it('should detect the rule within a random string', function() local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleMatchesHourSpecification('some random every other hour stuff')) end) end) describe('every xx minutes', function() it('should detect every minute', function() local t = Time('2017-01-01 01:00:00') assert.is_true(t.ruleMatchesMinuteSpecification('every minute')) t = Time('2017-01-01 01:00:01') assert.is_true(t.ruleMatchesMinuteSpecification('every minute')) t = Time('2017-01-01 00:00:02') assert.is_true(t.ruleMatchesMinuteSpecification('every minute')) end) it('should detect every other minute', function() local t = Time('2017-01-01 01:00:00') assert.is_true(t.ruleMatchesMinuteSpecification('every other minute')) t = Time('2017-01-01 01:01:00') assert.is_false(t.ruleMatchesMinuteSpecification('every other minute')) t = Time('2017-01-01 00:02:00') assert.is_true(t.ruleMatchesMinuteSpecification('every other minute')) t = Time('2017-01-01 00:03:00') assert.is_false(t.ruleMatchesMinuteSpecification('every other minute')) end) it('should detect every xx minutes', function() local t = Time('2017-01-01 00:00:00') local utils = t._getUtilsInstance() utils.print = function() end t = Time('2017-01-01 00:00:00') local minutes = _.range(1, 59, 1) for i, m in pairs(minutes) do local rule = 'every ' .. tostring(m) .. ' minutes' local res = t.ruleMatchesMinuteSpecification(rule) if ((60 / m) ~= math.floor(60 / m)) then assert.is_false(res) else assert.is_true(res) end end end) it('should return nil if there no matching rule', function() local t = Time('2017-01-01 00:00:00') assert.is_nil(t.ruleMatchesMinuteSpecification('bablab')) end) it('should detect the rule within a random string', function() local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleMatchesMinuteSpecification('some random every other minute stuff')) end) end) describe('at daytime', function() it('should return true if it is day time', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleIsAtDayTime('at daytime')) end) it('should return if it is not day time', function() _G.timeofday = { ['Daytime'] = false } local t = Time('2017-01-01 00:00:00') assert.is_false(t.ruleIsAtDayTime('at daytime')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-01-01 00:00:00') assert.is_nil(t.ruleIsAtDayTime('at blabalbba')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleIsAtDayTime('some random at daytime text')) end) end) describe('at nighttime', function() it('should return true if it is day time', function() _G.timeofday = { ['Nighttime'] = true } local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleIsAtNight('at nighttime')) end) it('should return if it is not day time', function() _G.timeofday = { ['Nighttime'] = false } local t = Time('2017-01-01 00:00:00') assert.is_false(t.ruleIsAtNight('at nighttime')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['Nighttime'] = true } local t = Time('2017-01-01 00:00:00') assert.is_nil(t.ruleIsAtNight('at blabalbba')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['Nighttime'] = true } local t = Time('2017-01-01 00:00:00') assert.is_true(t.ruleIsAtNight('some random at nighttime text')) end) end) describe('at sunset', function() it('should return true if it is at sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_true(t.ruleIsAtSunset('at sunset')) end) it('should return if it is not at sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 63 } local t = Time('2017-01-01 01:04:00') assert.is_false(t.ruleIsAtSunset('at sunset')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_nil(t.ruleIsAtSunset('at blabalbba')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_true(t.ruleIsAtSunset('some random at sunset text')) end) end) describe('xx minutes before sunset', function() it('should return true if it is xx minutes before sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:02:00') assert.is_true(t.ruleIsBeforeSunset('2 minutes before sunset')) end) it('should return if it is more than 2 minutes before sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:01:00') assert.is_false(t.ruleIsBeforeSunset('2 minutes before sunset')) end) it('should return if it is less than 2 minutes before sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:03:00') assert.is_false(t.ruleIsBeforeSunset('2 minutes before sunset')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_nil(t.ruleIsBeforeSunset('minutes before sunset')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:02:00') assert.is_true(t.ruleIsBeforeSunset('some random 2 minutes before sunset text')) end) end) describe('xx minutes after sunset', function() it('should return true if it is xx minutes after sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:06:00') assert.is_true(t.ruleIsAfterSunset('2 minutes after sunset')) end) it('should return if it is more less 2 minutes after sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:05:00') assert.is_false(t.ruleIsAfterSunset('2 minutes after sunset')) end) it('should return if it is more than 2 minutes after sunset', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:07:00') assert.is_false(t.ruleIsAfterSunset('2 minutes after sunset')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_nil(t.ruleIsAfterSunset('minutes after sunset')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-01-01 01:06:00') assert.is_true(t.ruleIsAfterSunset('some random 2 minutes after sunset text')) end) end) describe('at sunrise', function() it('should return true if it is at sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_true(t.ruleIsAtSunrise('at sunrise')) end) it('should return if it is not at sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 63 } local t = Time('2017-01-01 01:04:00') assert.is_false(t.ruleIsAtSunrise('at sunrise')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_nil(t.ruleIsAtSunrise('at blabalbba')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_true(t.ruleIsAtSunrise('some random at sunrise text')) end) end) describe('xx minutes before sunrise', function() it('should return true if it is xx minutes before sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:02:00') assert.is_true(t.ruleIsBeforeSunrise('2 minutes before sunrise')) end) it('should return if it is more than 2 minutes before sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:01:00') assert.is_false(t.ruleIsBeforeSunrise('2 minutes before sunrise')) end) it('should return if it is less than 2 minutes before sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:03:00') assert.is_false(t.ruleIsBeforeSunrise('2 minutes before sunrise')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_nil(t.ruleIsBeforeSunrise('minutes before sunrise')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:02:00') assert.is_true(t.ruleIsBeforeSunrise('some random 2 minutes before sunrise text')) end) end) describe('xx minutes after sunrise', function() it('should return true if it is xx minutes after sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:06:00') assert.is_true(t.ruleIsAfterSunrise('2 minutes after sunrise')) end) it('should return if it is more less 2 minutes after sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:05:00') assert.is_false(t.ruleIsAfterSunrise('2 minutes after sunrise')) end) it('should return if it is more than 2 minutes after sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:07:00') assert.is_false(t.ruleIsAfterSunrise('2 minutes after sunrise')) end) it('should return nil if the rule is not present', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:04:00') assert.is_nil(t.ruleIsAfterSunrise('minutes after sunrise')) end) it('should detect the rule within a random string', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-01-01 01:06:00') assert.is_true(t.ruleIsAfterSunrise('some random 2 minutes after sunrise text')) end) end) describe('between', function() it('should return nil if there is no range set', function() local t = Time('2017-01-01 11:45:00') assert.is_nil(t.ruleMatchesBetweenRange('blaba')) end) it('should detect the rule within a random string', function() local t = Time('2017-01-01 08:00:00') assert.is_true(t.ruleMatchesBetweenRange('blab ablab ab between 10:00 and 09:00 blabjablabjabj')) end) describe('time stamps', function() it('should work with time stamps', function() local t = Time('2017-01-01 11:45:00') assert.is_true(t.ruleMatchesBetweenRange('between 10:15 and 13:45')) end) it('should work with time stamps spanning two days', function() local t = Time('2017-01-01 23:01:00') assert.is_true(t.ruleMatchesBetweenRange('between 23:00 and 01:45')) end) it('should return false when range spans multiple days and time is not in range', function() local t = Time('2017-01-01 9:15:00') assert.is_false(t.ruleMatchesBetweenRange('between 10:00 and 09:00')) end) end) describe('sun stuff', function() it('between sunset and sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 360 , -- 06:00 ['SunsetInMinutes'] = 1080 } -- time between 18:00 and 06:00 local t = Time('2017-01-01 01:04:00') assert.is_true(t.ruleMatchesBetweenRange('between sunset and sunrise')) end) it('between sunrise and sunset', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 } -- time between 06:00 and 18:00 local t = Time('2017-01-01 11:04:00') assert.is_true(t.ruleMatchesBetweenRange('between sunrise and sunset')) end) it('between 10 minutes before sunrise and 10 minutes after sunset', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 -- 18:00 } local rule = 'between 10 minutes before sunrise and 10 minutes after sunset' -- time between 06:00 and 18:00 local t = Time('2017-01-01 05:55:00') assert.is_true(t.ruleMatchesBetweenRange(rule)) local t = Time('2017-01-01 18:06:00') assert.is_true(t.ruleMatchesBetweenRange(rule)) end) end) describe('combined', function() it('between 23:12 and sunrise', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 } local rule = 'between 23:12 and sunrise' local t = Time('2017-01-01 22:00:00') assert.is_false(t.ruleMatchesBetweenRange(rule)) local t = Time('2017-01-01 23:12:00') assert.is_true(t.ruleMatchesBetweenRange(rule)) end) it('between sunset and 22:33', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 } local rule = 'between sunset and 22:33' local t = Time('2017-01-01 17:00:00') assert.is_false(t.ruleMatchesBetweenRange(rule)) local t = Time('2017-01-01 18:10:00') assert.is_true(t.ruleMatchesBetweenRange(rule)) local t = Time('2017-01-01 22:34:00') assert.is_false(t.ruleMatchesBetweenRange(rule)) end) it('between 2 minutes after sunset and 22:33', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 } local rule = 'between 2 minutes after sunset and 22:33' local t = Time('2017-01-01 18:00:00') assert.is_false(t.ruleMatchesBetweenRange(rule)) local t = Time('2017-01-01 18:02:00') assert.is_true(t.ruleMatchesBetweenRange(rule)) local t = Time('2017-01-01 22:34:00') assert.is_false(t.ruleMatchesBetweenRange(rule)) end) end) end) describe('on <days>', function() it('should return true when it is on monday', function() local t = Time('2017-06-05 02:04:00') assert.is_true(t.ruleIsOnDay('on mon')) end) it('should return true when it is on tuesday', function() local t = Time('2017-06-06 02:04:00') assert.is_true(t.ruleIsOnDay('on tue')) end) it('should return true when it is on wednesday', function() local t = Time('2017-06-07 02:04:00') assert.is_true(t.ruleIsOnDay('on wed')) end) it('should return true when it is on thursday', function() local t = Time('2017-06-08 02:04:00') assert.is_true(t.ruleIsOnDay('on thu')) end) it('should return true when it is on friday', function() local t = Time('2017-06-09 02:04:00') assert.is_true(t.ruleIsOnDay('on fri')) end) it('should return true when it is on saturday', function() local t = Time('2017-06-10 02:04:00') assert.is_true(t.ruleIsOnDay('on sat')) end) it('should return true when it is on sunday', function() local t = Time('2017-06-11 02:04:00') assert.is_true(t.ruleIsOnDay('on sun')) end) it('should return true when it is on the days', function() local t = Time('2017-06-05 02:04:00') assert.is_true(t.ruleIsOnDay('on sun, mon,tue, fri')) end) it('should return false if it is not on the day', function() local t = Time('2017-06-05 02:04:00') assert.is_false(t.ruleIsOnDay('on tue')) end) it('should return nil if the rule is not there', function() local t = Time('2017-06-05 02:04:00') assert.is_nil(t.ruleIsOnDay('balbalbalb')) end) it('should detect the rule within random text', function() local t = Time('2017-06-05 02:04:00') assert.is_true(t.ruleIsOnDay('something balbalba on sun, mon ,tue, fri boebhebalb')) end) end) describe('in week', function() it('should return true when matches simple list of weeks', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_true(t.ruleIsInWeek('in week 23')) assert.is_true(t.ruleIsInWeek('in week 1,43,33,0,23')) end) it('should return nil if rule is not there', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_nil(t.ruleIsInWeek('iek 23')) end) it('should return true when matches odd weeks', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_true(t.ruleIsInWeek('every odd week')) assert.is_nil(t.ruleIsInWeek('every even week')) end) it('should return true when matches even weeks', function() local t = Time('2017-06-13 02:04:00') -- week 24 assert.is_nil(t.ruleIsInWeek('every odd week')) assert.is_true(t.ruleIsInWeek('every even week')) end) it('should return false if week is not in rule', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_false(t.ruleIsInWeek('in week 2,4,5')) end) it('should return nil when no weeks are provided', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_nil(t.ruleIsInWeek('in week')) end) it('should return true when week is in range', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_true(t.ruleIsInWeek('in week -23')) assert.is_true(t.ruleIsInWeek('in week 23-')) assert.is_true(t.ruleIsInWeek('in week 3,55,-23,6,53')) assert.is_true(t.ruleIsInWeek('in week 6,7,8,23-,22,66')) assert.is_true(t.ruleIsInWeek('in week 12-25')) assert.is_true(t.ruleIsInWeek('in week 12-25,55,6-11')) end) it('should return false when not in range', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_false(t.ruleIsInWeek('in week 25-')) assert.is_false(t.ruleIsInWeek('in week 25-66')) end) end) describe('on date', function() it('should return true when on date', function() local t = Time('2017-06-05 02:04:00') assert.is_true(t.ruleIsOnDate('on 5/6')) assert.is_true(t.ruleIsOnDate('on 1/01-2/2,31/12,5/6,1/1')) t = Time('2018-01-2 02:04:00') assert.is_true(t.ruleIsOnDate('on 2/1')) assert.is_true(t.ruleIsOnDate('on 02/1')) assert.is_true(t.ruleIsOnDate('on 2/01')) assert.is_true(t.ruleIsOnDate('on 02/01')) end) it('should return true when */mm', function() local t = Time('2017-06-05 02:04:00') assert.is_true(t.ruleIsOnDate('on */6')) assert.is_true(t.ruleIsOnDate('on 12/12, 4/5,*/6,*/8')) end) it('should return true when dd/*', function() local t = Time('2017-06-05 02:04:00') assert.is_true(t.ruleIsOnDate('on 5/*')) assert.is_true(t.ruleIsOnDate('on 12/12, 4/5,5/*,*/8')) end) it('should return true when in range', function() local t = Time('2017-06-20 02:04:00') assert.is_true(t.ruleIsOnDate('on 20/5-22/6')) t = Time('2017-05-20 02:04:00') assert.is_true(t.ruleIsOnDate('on 20/5-22/6')) t = Time('2017-05-21 02:04:00') assert.is_true(t.ruleIsOnDate('on 20/5-22/6')) t = Time('2017-06-20 02:04:00') assert.is_true(t.ruleIsOnDate('on 20/5-22/6')) t = Time('2017-06-22 02:04:00') assert.is_true(t.ruleIsOnDate('on 1/2, 20/5-22/6, 1/11-2/11')) t = Time('2017-06-22 02:04:00') assert.is_true(t.ruleIsOnDate('on 1/2, 22/6-23/6, 1/11-2/11')) t = Time('2017-06-22 02:04:00') assert.is_true(t.ruleIsOnDate('on 1/2, -23/6, 1/11-2/11')) t = Time('2017-06-22 02:04:00') assert.is_true(t.ruleIsOnDate('on 1/2, 20/6-, 1/11-2/11')) end) it('should return false when not in range', function() local t = Time('2017-06-20 02:04:00') assert.is_false(t.ruleIsOnDate('on 1/2, 20/5-22/5, 1/11-2/11')) end) it('should return nil if rule is not there', function() local t = Time('2017-06-05 02:04:00') -- week 23 assert.is_nil(t.ruleIsOnDate('iek 23')) end) end) end) describe('combis', function() it('should return false when not on the day', function() local t = Time('2017-06-05 02:04:00') -- on monday assert.is_false(t.matchesRule('every minute on tue')) end) it('at sunset on mon', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-06-05 01:04:00') -- on monday assert.is_true(t.matchesRule('at sunset on mon')) end) it('2 minutes before sunset on mon', function() _G.timeofday = { ['SunsetInMinutes'] = 64 } local t = Time('2017-06-05 01:02:00') -- on monday assert.is_true(t.matchesRule('2 minutes before sunset on mon')) end) it('at sunrise on mon', function() _G.timeofday = { ['SunriseInMinutes'] = 64 } local t = Time('2017-06-05 01:04:00') -- on monday assert.is_true(t.matchesRule('at sunrise on mon')) end) it('at nighttime on mon', function() _G.timeofday = {['Nighttime'] = true } local t = Time('2017-06-05 01:04:00') -- on monday assert.is_true(t.matchesRule('at nighttime on mon')) end) it('at nighttime on mon', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-06-05 01:04:00') -- on monday assert.is_true(t.matchesRule('at daytime on mon')) end) it('at daytime every 3 minutes on mon', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-06-05 01:03:00') -- on monday assert.is_true(t.matchesRule('at daytime every 3 minutes on mon')) assert.is_false(t.matchesRule('at daytime every 7 minutes on mon')) end) it('at daytime every other hour on mon', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-06-05 02:00:00') -- on monday assert.is_true(t.matchesRule('at daytime every other hour on mon')) end) it('at daytime at 15:* on mon', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-06-05 15:22:00') -- on monday assert.is_true(t.matchesRule('at daytime at 15:* on mon')) end) it('at daytime every 5 minutes at 15:00-16:00 on mon', function() _G.timeofday = { ['Daytime'] = true } local t = Time('2017-06-05 16:00:00') -- on monday assert.is_true(t.matchesRule('at daytime every 5 minutes at 15:00-16:00 on mon')) assert.is_true(t.matchesRule('at daytime every 5 minutes at 15:00-16:00 on mon')) assert.is_true(t.matchesRule('at daytime every 5 minutes at 15:00-16:00 on mon')) end) it('in week 47 on mon', function() local t = Time('2017-11-20 16:00:00') -- on monday assert.is_true(t.matchesRule('in week 47 on mon')) t = Time('2017-11-21 16:00:00') -- on monday assert.is_false(t.matchesRule('in week 47 on mon')) end) it('in week 40-50 on mon', function() local t = Time('2017-11-20 16:00:00') -- on monday, wk47 assert.is_true(t.matchesRule('in week 40-50 on mon')) assert.is_false(t.matchesRule('in week 1 on mon')) end) it('on date 20/11', function() local t = Time('2017-11-20 16:00:00') -- on monday, wk47 assert.is_true(t.matchesRule('on 20/11')) assert.is_true(t.matchesRule('on 20/10-20/12 on mon')) assert.is_false(t.matchesRule('on 20/11-22/11 on fri')) assert.is_true(t.matchesRule('on 20/* on mon')) end) it('every 10 minutes between 2 minutes after sunset and 22:33 on mon,fri', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 } local rule = 'every 10 minutes between 2 minutes after sunset and 22:33 on mon,fri' local t = Time('2017-06-05 18:10:00') -- on monday assert.is_true(t.matchesRule(rule)) local t = Time('2017-06-05 18:09:00') assert.is_false(t.matchesRule(rule)) -- not every 10 minutes local t = Time('2017-06-08 18:10:00') -- on thu assert.is_false(t.matchesRule(rule)) local t = Time('2017-06-09 18:10:00') -- on fri assert.is_true(t.matchesRule(rule)) local t = Time('2017-06-09 22:34:00') -- on fri assert.is_false(t.matchesRule(rule)) end) it('every 10 minutes between 2 minutes after sunset and 22:33 on 20/11-20/12 in week 49 on mon,fri', function() _G.timeofday = { ['SunriseInMinutes'] = 360, -- 06:00 ['SunsetInMinutes'] = 1080 } local rule = 'every 10 minutes between 2 minutes after sunset and 22:33 on 20/11-20/12 in week 49 on mon,fri' local t = Time('2017-11-21 18:10:00') -- on tue, week 47 assert.is_false(t.matchesRule(rule)) t = Time('2017-11-24 18:10:00') -- on fri, week 47 assert.is_false(t.matchesRule(rule)) t = Time('2017-12-08 18:10:00') -- on fri, week 49 assert.is_true(t.matchesRule(rule)) t = Time('2017-12-04 18:10:00') -- on mon, week 49 assert.is_true(t.matchesRule(rule)) end) it('at nighttime at 21:32-05:44 every 5 minutes', function() _G.timeofday = { ['Nighttime'] = true } local t = Time('2017-06-05 01:05:00') -- on monday assert.is_true(t.matchesRule('at nighttime at 21:32-05:44 every 5 minutes')) end) it('should return false if the rule is empty', function() local t = Time('2017-06-05 16:00:00') -- on monday assert.is_false(t.matchesRule('')) end) it('should return false if no processor matches', function() local t = Time('2017-06-05 16:00:00') -- on monday assert.is_false(t.matchesRule('boe bahb ladsfak')) end) end) end) end)
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/item/quest/force_sensitive/fs_craft_puzzle_decryption_chip.lua
3
2356
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_item_quest_force_sensitive_fs_craft_puzzle_decryption_chip = object_tangible_item_quest_force_sensitive_shared_fs_craft_puzzle_decryption_chip:new { } ObjectTemplates:addTemplate(object_tangible_item_quest_force_sensitive_fs_craft_puzzle_decryption_chip, "object/tangible/item/quest/force_sensitive/fs_craft_puzzle_decryption_chip.iff")
agpl-3.0
gilzoide/lallegro
teste/testaConfig.lua
1
1337
local al = require 'lallegro' al.Config = require 'lallegro.Config' al.init () local cfg = assert (al.Config.load ('configTest.cfg')) for sec in cfg:sections () do print (sec) for k, v in cfg:entries (sec) do print ('', k, v) end end cfg:remove_section ('secao') print ('------------') for sec, k, v in cfg:iterate () do print (sec, k, v) end print ('------------') local other = al.Config.new () other:set ('other', 'Adicao', '++') cfg:merge_into (other) for sec, k, v in cfg:iterate () do print (sec, k, v) end print ('------------') local t = cfg:to_table () for k, v in pairs (t) do if type (v) ~= 'table' then print (k, '=', v) else for kk, vv in pairs (v) do print (k, '.', kk, '=', vv) end end end print ('------------') local new_config = al.Config.from_table { primeiro = 'primeiramente', segundo = 'segundamente', secao = { key = 'value', key2 = 'value2', }, outra_secao = { olar = 'posso ajudar?' }, } for sec, k, v in new_config:iterate () do print (sec, k, v) end print ('------------ LuaConfig test ------------') local lcfg = require 'lallegro.LuaConfig' local t = lcfg.loadfile ('config.lua') for k, v in pairs (t) do if type (v) ~= 'table' then print (k, '=', v) else for kk, vv in pairs (v) do print (k, '.', kk, '=', vv) end end end al.uninstall_system ()
lgpl-3.0
DailyShana/ygopro-scripts
c75525309.lua
5
1292
--六武派二刀流 function c75525309.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1e0) e1:SetCondition(c75525309.condition) e1:SetTarget(c75525309.target) e1:SetOperation(c75525309.activate) c:RegisterEffect(e1) end function c75525309.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local ct=g:GetCount() local tg=g:GetFirst() return ct==1 and tg:IsFaceup() and tg:IsAttackPos() and tg:IsSetCard(0x3d) end function c75525309.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:GetControler()~=tp and chkc:IsOnField() and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) end function c75525309.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if sg:GetCount()>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end end
gpl-2.0
DailyShana/ygopro-scripts
c48716527.lua
3
1402
--帝王の溶撃 function c48716527.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(c48716527.actcon) c:RegisterEffect(e1) --disable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTarget(c48716527.distg) e2:SetCode(EFFECT_DISABLE) c:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCountLimit(1) e3:SetRange(LOCATION_SZONE) e3:SetCondition(c48716527.tgcon) e3:SetOperation(c48716527.tgop) c:RegisterEffect(e3) end function c48716527.cfilter(c) return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE end function c48716527.actcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(c48716527.cfilter,tp,LOCATION_MZONE,0,1,nil) end function c48716527.distg(e,c) return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)~=SUMMON_TYPE_ADVANCE end function c48716527.tgcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp and not Duel.IsExistingMatchingCard(c48716527.cfilter,tp,LOCATION_MZONE,0,1,nil) end function c48716527.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end
gpl-2.0
ollie27/openwrt_luci
applications/luci-app-asterisk/luasrc/model/cbi/asterisk-mod-chan.lua
68
1513
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. cbimap = Map("asterisk", "asterisk", "") module = cbimap:section(TypedSection, "module", "Modules", "") module.anonymous = true chan_agent = module:option(ListValue, "chan_agent", "Agent Proxy Channel", "") chan_agent:value("yes", "Load") chan_agent:value("no", "Do Not Load") chan_agent:value("auto", "Load as Required") chan_agent.rmempty = true chan_alsa = module:option(ListValue, "chan_alsa", "Channel driver for GTalk", "") chan_alsa:value("yes", "Load") chan_alsa:value("no", "Do Not Load") chan_alsa:value("auto", "Load as Required") chan_alsa.rmempty = true chan_gtalk = module:option(ListValue, "chan_gtalk", "Channel driver for GTalk", "") chan_gtalk:value("yes", "Load") chan_gtalk:value("no", "Do Not Load") chan_gtalk:value("auto", "Load as Required") chan_gtalk.rmempty = true chan_iax2 = module:option(Flag, "chan_iax2", "Option chan_iax2", "") chan_iax2.rmempty = true chan_local = module:option(ListValue, "chan_local", "Local Proxy Channel", "") chan_local:value("yes", "Load") chan_local:value("no", "Do Not Load") chan_local:value("auto", "Load as Required") chan_local.rmempty = true chan_sip = module:option(ListValue, "chan_sip", "Session Initiation Protocol (SIP)", "") chan_sip:value("yes", "Load") chan_sip:value("no", "Do Not Load") chan_sip:value("auto", "Load as Required") chan_sip.rmempty = true return cbimap
apache-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/components/armor/arm_corellian_modified_heavy_durasteel.lua
3
2364
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_ship_components_armor_arm_corellian_modified_heavy_durasteel = object_tangible_ship_components_armor_shared_arm_corellian_modified_heavy_durasteel:new { } ObjectTemplates:addTemplate(object_tangible_ship_components_armor_arm_corellian_modified_heavy_durasteel, "object/tangible/ship/components/armor/arm_corellian_modified_heavy_durasteel.iff")
agpl-3.0
hilarryxu/eelua
ezip/eelua/wininet.lua
1
10656
local ffi = require "ffi" local bit = require "bit" local string = require "string" local table = require "table" local ffi_new = ffi.new local ffi_str = ffi.string local ffi_cast = ffi.cast local bor = bit.bor local str_fmt = string.format local tinsert = table.insert local tconcat = table.concat local is_luajit = pcall(require, 'jit') local clib --- -- aux --- local aux = {} if is_luajit then function aux.is_null(ptr) return ptr == nil end else function aux.is_null(ptr) return ptr == ffi.C.NULL end end function aux.wrap_string(c_str, len) if not aux.is_null(c_str) then return ffi_str(c_str, len) end return nil end function aux.wrap_bool(c_bool) return c_bool ~= 0 end --- -- wininet --- local _M = {} local consts = {} local function init_mod(mod, opts) if clib ~= nil then return mod end clib = _M._load_clib(opts) _M._bind_clib() mod.C = clib return mod end function _M._load_clib(opts) if opts == nil then return ffi.C end return ffi.load(opts) end function _M._bind_clib() _M.consts = consts consts.OK = 0 consts.OPEN_TYPE_PRECONFIG = 0 consts.SERVICE_HTTP = 3 consts.FLAG_NO_UI = 0x00000200 consts.FLAG_SECURE = 0x00800000 consts.OPTION_HTTP_DECODING = 65 consts.HTTP_QUERY_CONTENT_LENGTH = 5 consts.HTTP_QUERY_FLAG_NUMBER = 0x20000000 consts.HTTP_QUERY_FLAG_REQUEST_HEADERS = 0x80000000 consts.HTTP_QUERY_FLAG_SYSTEMTIME = 0x40000000 if not is_luajit then consts.C_NULL = ffi.C.NULL end ffi.cdef [[ typedef void* HANDLE; typedef uint16_t WORD; typedef uint32_t DWORD; typedef int32_t LONG; typedef int BOOL; typedef HANDLE HINTERNET; typedef WORD INTERNET_PORT; typedef void (__stdcall *INTERNET_STATUS_CALLBACK)( HINTERNET hInternet, DWORD *dwContext, DWORD dwInternetStatus, void *lpvStatusInformation, DWORD dwStatusInformationLength ); ]] ffi.cdef [[ BOOL InternetCloseHandle(HINTERNET hInternet); HINTERNET InternetOpenA( const char *lpszAgent, DWORD dwAccessType, const char *lpszProxyName, const char *lpszProxyBypass, DWORD dwFlags ); HINTERNET InternetOpenUrlA(HINTERNET hInternet, const char *lpszUrl, const char *lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD *dwContext ); BOOL InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, void *lpBuffer, DWORD dwBufferLength ); DWORD InternetSetFilePointer(HINTERNET hFile, LONG lDistanceToMove, LONG *lpDistanceToMoveHigh, DWORD dwMoveMethod, DWORD *dwContext ); INTERNET_STATUS_CALLBACK InternetSetStatusCallback(HINTERNET hInternet, INTERNET_STATUS_CALLBACK lpfnInternetCallback ); HINTERNET InternetConnectA(HINTERNET hInternet, const char *lpszServerName, INTERNET_PORT nServerPort, const char *lpszUsername, const char *lpszPassword, DWORD dwService, DWORD dwFlags, DWORD *dwContext ); BOOL InternetQueryDataAvailable( HINTERNET hFile, DWORD *lpdwNumberOfBytesAvailable, DWORD dwFlags, DWORD *dwContext ); BOOL InternetQueryOptionA( HINTERNET hInternet, DWORD dwOption, void *lpBuffer, DWORD *lpdwBufferLength ); BOOL InternetReadFile( HINTERNET hFile, void *lpBuffer, DWORD dwNumberOfBytesToRead, DWORD *lpdwNumberOfBytesRead ); BOOL InternetWriteFile( HINTERNET hFile, void *lpBuffer, DWORD dwNumberOfBytesToWrite, DWORD *lpdwNumberOfBytesWritten ); BOOL InternetGetLastResponseInfoA( DWORD *lpdwError, char *lpszBuffer, DWORD *lpdwBufferLength ); BOOL HttpAddRequestHeadersA(HINTERNET hConnect, const char *lpszHeaders, DWORD dwHeadersLength, DWORD dwModifiers ); HINTERNET HttpOpenRequestA(HINTERNET hConnect, const char *lpszVerb, const char *lpszObjectName, const char *lpszVersion, const char *lpszReferer, char **lplpszAcceptTypes, DWORD dwFlags, DWORD *dwContext ); BOOL HttpQueryInfoA(HINTERNET hRequest, DWORD dwInfoLevel, void *lpvBuffer, DWORD *lpdwBufferLength, DWORD *lpdwIndex ); BOOL HttpSendRequestA(HINTERNET hRequest, const char *lpszHeaders, DWORD dwHeadersLength, void *lpOptional, DWORD dwOptionalLength ); ]] end ----------------------------------------------------------------------------- -- Parses a url and returns a table with all its parts according to RFC 2396 -- The following grammar describes the names given to the URL parts -- <url> ::= <scheme>://<authority>/<path>;<params>?<query>#<fragment> -- <authority> ::= <userinfo>@<host>:<port> -- <userinfo> ::= <user>[:<password>] -- <path> :: = {<segment>/}<segment> -- Input -- url: uniform resource locator of request -- default: table with default values for each field -- Returns -- table with the following fields, where RFC naming conventions have -- been preserved: -- scheme, authority, userinfo, user, password, host, port, -- path, params, query, fragment -- Obs: -- the leading '/' in {/<path>} is considered part of <path> ----------------------------------------------------------------------------- function _M.url_parse(url, default) -- initialize default parameters local parsed = {} for i, v in pairs(default or parsed) do parsed[i] = v end -- empty url is parsed to nil if not url or url == "" then return nil, "invalid url" end -- remove whitespace -- url = string.gsub(url, "%s", "") -- get scheme url = string.gsub(url, "^([%w][%w%+%-%.]*)%:", function(s) parsed.scheme = s; return "" end ) -- get authority url = string.gsub(url, "^//([^/]*)", function(n) parsed.authority = n return "" end) -- get fragment url = string.gsub(url, "#(.*)$", function(f) parsed.fragment = f return "" end) -- get query string url = string.gsub(url, "%?(.*)", function(q) parsed.query = q return "" end) -- get params url = string.gsub(url, "%;(.*)", function(p) parsed.params = p return "" end) -- path is whatever was left if url ~= "" then parsed.path = url end local authority = parsed.authority if not authority then return parsed end authority = string.gsub(authority,"^([^@]*)@", function(u) parsed.userinfo = u; return "" end ) authority = string.gsub(authority, ":([^:%]]*)$", function(p) parsed.port = p; return "" end ) if authority ~= "" then -- IPv6? parsed.host = string.match(authority, "^%[(.+)%]$") or authority end local userinfo = parsed.userinfo if not userinfo then return parsed end userinfo = string.gsub(userinfo, ":([^:]*)$", function(p) parsed.password = p; return "" end ) parsed.user = userinfo return parsed end function _M.escape(s) return (string.gsub(s, "([^A-Za-z0-9_])", function(c) return string.format("%%%02x", string.byte(c)) end)) end function _M.unescape(s) return (string.gsub(s, "%%(%x%x)", function(hex) return string.char(tonumber(hex, 16)) end)) end function _M.request(method, url, opts) opts = opts or {} local rc local C_NULL = consts.C_NULL local user_agent = opts.user_agent or "lua-WinInet/0.1" local uri = _M.url_parse(url) local session = clib.InternetOpenA(user_agent, consts.OPEN_TYPE_PRECONFIG, C_NULL, C_NULL, 0) local server_port = tonumber(uri.port or 80) if uri.scheme == "https" then server_port = tonumber(uri.port or 443) end local conn = clib.InternetConnectA( session, uri.host, server_port, C_NULL, C_NULL, consts.SERVICE_HTTP, 0, C_NULL ) -- HINTERNET HttpOpenRequestA(HINTERNET hConnect, -- const char *lpszVerb, const char *lpszObjectName, const char *lpszVersion, -- const char *lpszReferer, char **lplpszAcceptTypes, -- DWORD dwFlags, DWORD *dwContext -- ); local req_flags = consts.FLAG_NO_UI if uri.scheme == "https" then req_flags = bor(req_flags, consts.FLAG_SECURE) end if opts.req_flags then req_flags = bor(req_flags, opts.req_flags) end local req_url = uri.path if opts.params then if type(opts.params) == "string" then req_url = str_fmt("%s?%s", req_url, opts.params) else local t = {} for k, v in pairs(opts.params) do tinsert(t, str_fmt("%s=%s", k, _M.escape(v))) end req_url = str_fmt("%s?%s", req_url, tconcat(t, "&")) end end local req = clib.HttpOpenRequestA( conn, method:upper(), req_url, opts.http_version or C_NULL, opts.referer or C_NULL, C_NULL, req_flags, C_NULL ) -- local p_decoding = ffi_new("BOOL[1]", { 1 }) -- rc = clib.InternetSetOptionA(req, consts.OPTION_HTTP_DECODING, p_decoding, ffi.sizeof("BOOL")) local headers, headers_len = C_NULL, 0 if opts.headers then local t = {} for k, v in pairs(opts.headers) do tinsert(t, str_fmt("%s: %s", k, v)) end headers = tconcat(t, "\r\n") headers_len = #headers end local data, data_len = C_NULL, 0 if opts.data then data = opts.data data_len = #data end rc = clib.HttpSendRequestA(req, headers, headers_len, data, data_len) local cl_sz = 40 local buf = ffi.new("char[?]", cl_sz) local p_buf_len = ffi.new("DWORD[1]", { cl_sz }) clib.HttpQueryInfoA(req, consts.HTTP_QUERY_CONTENT_LENGTH, buf, p_buf_len, C_NULL ) local content_length = tonumber(aux.wrap_string(buf, p_buf_len[0])) or 4 * 1024 * 1024 local buf_sz = content_length + 2 local buf = ffi.new("char[?]", buf_sz) local p_nread = ffi.new("DWORD[1]") local total_read_size = 0 while true do p_nread[0] = 0 rc = clib.InternetReadFile(req, buf + total_read_size, buf_sz, p_nread) if rc == 0 then break end if p_nread[0] == 0 then break end total_read_size = total_read_size + p_nread[0] if total_read_size >= content_length then break end end local content = aux.wrap_string(buf, total_read_size) clib.InternetCloseHandle(req) clib.InternetCloseHandle(conn) clib.InternetCloseHandle(session) return { content = content, content_length = content_length } end return init_mod(_M, "wininet.dll")
mit
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/intangible/ship/navicomputer_6.lua
3
2208
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_intangible_ship_navicomputer_6 = object_intangible_ship_shared_navicomputer_6:new { } ObjectTemplates:addTemplate(object_intangible_ship_navicomputer_6, "object/intangible/ship/navicomputer_6.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/clothing/clothing_apron_field_01.lua
3
2280
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_clothing_clothing_apron_field_01 = object_draft_schematic_clothing_shared_clothing_apron_field_01:new { } ObjectTemplates:addTemplate(object_draft_schematic_clothing_clothing_apron_field_01, "object/draft_schematic/clothing/clothing_apron_field_01.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/endor/gifted_gondula_shaman.lua
2
1069
gifted_gondula_shaman = Creature:new { objectName = "@mob/creature_names:gifted_gondula_shaman", randomNameType = NAME_GENERIC_TAG, socialGroup = "gondula_tribe", faction = "gondula_tribe", level = 46, chanceHit = 0.46, damageMin = 365, damageMax = 440, baseXp = 4461, baseHAM = 9800, baseHAMmax = 12000, armor = 0, resists = {50,50,0,0,0,-1,-1,0,-1}, meatType = "", meatAmount = 0, hideType = "", hideAmount = 0, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0, ferocity = 0, pvpBitmask = ATTACKABLE, creatureBitmask = PACK + HEALER, optionsBitmask = 128, diet = HERBIVORE, templates = { "object/mobile/dressed_ewok_m_07.iff", "object/mobile/dressed_ewok_m_11.iff"}, lootGroups = { { groups = { {group = "ewok", chance = 9000000}, {group = "wearables_uncommon", chance = 1000000}, }, lootChance = 1920000 } }, weapons = {"ewok_weapons"}, conversationTemplate = "", attacks = merge(riflemanmaster,brawlermaster) } CreatureTemplates:addCreatureTemplate(gifted_gondula_shaman, "gifted_gondula_shaman")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Lufaise_Meadows/mobs/Padfoot.lua
4
1420
----------------------------------- -- Area: Lufaise Meadows -- MOB: Padfoot -- !pos -43.689 0.487 -328.028 24 -- !pos 260.445 -1.761 -27.862 24 -- !pos 412.447 -0.057 -200.161 24 -- !pos -378.950 -15.742 144.215 24 -- !pos -141.523 -15.529 91.709 24 ----------------------------------- require("scripts/zones/Lufaise_Meadows/MobIDs"); ----------------------------------- function onMobSpawn(mob) if (mob:getID() == PADFOOT[GetServerVariable("realPadfoot")]) then mob:setDropID(4478); if (math.random(1,2) == 1) then SetDropRate(4478,14782,1000); -- Astral Earring SetDropRate(4478,14676,0); else SetDropRate(4478,14782,0); SetDropRate(4478,14676,1000); -- Assailants Ring end end end; function onMobDeath(mob, player, isKiller) if (isKiller) then local mobId = mob:getID(); if (mobId == PADFOOT[GetServerVariable("realPadfoot")]) then local respawn = math.random(75600, 86400); -- 21-24 hours for _, v in pairs(PADFOOT) do if (v ~= mobId and GetMobByID(v):isSpawned()) then DespawnMob(v); end GetMobByID(v):setRespawnTime(respawn); end mob:setDropID(2734); SetServerVariable("realPadfoot",math.random(1,5)); end end end; function onMobDespawn(mob) end;
gpl-3.0
Whitechaser/darkstar
scripts/zones/Kazham/npcs/Roropp.lua
5
8598
----------------------------------- -- Area: Kazham -- NPC: Roropp -- Standard Info NPC ----------------------------------- package.loaded["scripts/zones/Kazham/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Kazham/TextIDs"); require("scripts/globals/pathfind"); local path = { 16.031977, -8.000000, -106.132980, 16.257568, -8.000000, -105.056381, 16.488544, -8.000000, -103.993233, 16.736769, -8.000000, -102.925789, 16.683693, -8.000000, -103.979767, 16.548674, -8.000000, -105.063362, 16.395681, -8.000000, -106.140511, 16.232897, -8.000000, -107.264717, 15.467215, -8.000000, -111.498398, 14.589552, -8.000000, -110.994324, 15.159187, -8.000000, -111.843941, 14.467873, -8.000000, -110.962730, 15.174071, -8.000000, -111.862633, 14.541949, -8.000000, -111.057007, 14.902087, -8.000000, -110.084839, 16.047390, -8.000000, -109.979256, 15.778022, -8.000000, -111.043304, 14.890110, -8.000000, -111.671753, 14.021555, -8.000000, -112.251015, 14.686207, -8.000000, -111.499725, 14.093862, -8.000000, -110.499420, 13.680259, -8.000000, -109.391823, 13.557489, -8.000000, -108.379669, 13.505498, -8.000000, -107.381012, 13.459559, -8.000000, -106.253922, 13.316416, -8.000000, -103.526192, 13.187886, -8.000000, -104.739197, 13.107801, -8.000000, -105.800117, 12.796517, -8.000000, -112.526253, 13.832601, -8.000000, -112.296143, 14.750398, -8.000000, -111.783379, 15.670343, -8.000000, -111.165863, 16.603874, -8.000000, -110.633209, 16.092684, -8.000000, -111.518547, 14.989306, -8.000000, -111.488846, 14.200422, -8.000000, -110.700859, 13.893030, -8.000000, -109.573753, 14.125311, -8.000000, -108.444000, 14.459513, -8.000000, -107.450630, 14.801712, -8.000000, -106.489639, 17.003086, -8.000000, -99.881256, 16.131863, -8.000000, -100.382454, 15.278582, -8.000000, -101.082420, 14.444073, -8.000000, -101.823395, 13.716499, -8.000000, -102.551468, 13.602413, -8.000000, -103.671387, 13.773719, -8.000000, -104.753410, 14.019071, -8.000000, -105.842079, 14.275101, -8.000000, -106.944748, 15.256051, -8.000000, -111.604820, 14.447664, -8.000000, -110.851128, 15.032362, -8.000000, -111.679832, 14.342421, -8.000000, -110.802597, 13.347830, -8.000000, -111.075569, 12.911378, -8.000000, -112.149437, 13.853123, -8.000000, -112.719269, 14.862821, -8.000000, -112.491272, 14.661202, -8.000000, -111.423317, 14.026034, -8.000000, -110.421486, 13.683197, -8.000000, -109.474442, 13.565609, -8.000000, -108.425598, 13.508922, -8.000000, -107.411247, 13.463074, -8.000000, -106.340248, 13.314778, -8.000000, -103.679779, 13.196125, -8.000000, -104.712784, 13.107168, -8.000000, -105.817261, 12.642462, -8.000000, -112.284569, 12.722448, -8.000000, -111.167519, 12.800394, -8.000000, -110.082321, 13.358773, -8.000000, -103.535522, 13.700077, -8.000000, -104.534401, 13.968060, -8.000000, -105.588699, 14.196942, -8.000000, -106.594994, 14.446990, -8.000000, -107.686691, 14.850841, -8.000000, -109.436707, 15.239276, -8.000000, -111.548279, 14.406080, -8.000000, -110.805321, 15.076430, -8.000000, -111.739746, 14.353576, -8.000000, -110.817177, 13.903994, -8.000000, -109.854828, 14.002557, -8.000000, -108.838097, 14.350549, -8.000000, -107.686317, 14.707720, -8.000000, -106.730751, 15.101375, -8.000000, -105.648056, 16.961918, -8.000000, -99.919090, 15.985752, -8.000000, -100.501892, 15.192271, -8.000000, -101.161407, 14.369474, -8.000000, -101.891479, 13.749530, -8.000000, -102.797821, 13.968772, -8.000000, -103.829323, 14.469959, -8.000000, -104.888268, 14.964800, -8.000000, -105.802879, 16.955986, -8.000000, -109.414169, 16.776617, -8.000000, -110.478836, 16.263479, -8.000000, -111.339577, 15.200941, -8.000000, -111.526329, 14.352178, -8.000000, -110.754326, 15.190737, -8.000000, -110.001801, 16.302240, -8.000000, -110.005722, 15.815475, -8.000000, -111.014900, 14.911292, -8.000000, -111.661888, 14.005045, -8.000000, -112.263855, 14.883535, -8.000000, -111.781982, 14.404255, -8.000000, -110.876640, 15.071056, -8.000000, -111.731522, 14.335340, -8.000000, -110.793587, 13.342915, -8.000000, -111.184967, 12.869198, -8.000000, -112.210732, 13.971279, -8.000000, -112.223083, 14.902745, -8.000000, -111.661880, 15.813969, -8.000000, -111.060051, 16.728361, -8.000000, -110.402679, 16.754343, -8.000000, -109.357780, 16.393435, -8.000000, -108.410202, 15.880263, -8.000000, -107.455299, 15.362660, -8.000000, -106.521095, 13.593607, -8.000000, -103.312202, 14.028812, -8.000000, -102.335686, 14.836555, -8.000000, -101.487602, 15.656289, -8.000000, -100.748199, 16.544455, -8.000000, -99.965248, 15.712431, -8.000000, -100.702980, 14.859239, -8.000000, -101.459091, 13.961225, -8.000000, -102.255051, 14.754376, -8.000000, -101.551842, 15.574628, -8.000000, -100.824944, 16.913191, -8.000000, -99.639374, 16.158613, -8.000000, -100.307716, 15.371163, -8.000000, -101.005310, 13.802610, -8.000000, -102.395645, 13.852294, -8.000000, -103.601982, 14.296268, -8.000000, -104.610878, 14.826925, -8.000000, -105.560638, 15.320851, -8.000000, -106.448463, 15.858366, -8.000000, -107.421883, 17.018456, -8.000000, -109.527451, 16.734596, -8.000000, -110.580498, 16.095715, -8.000000, -111.542282 }; function onSpawn(npc) npc:initNpcAi(); npc:setPos(pathfind.first(path)); onPath(npc); end; function onPath(npc) pathfind.patrol(npc, path); end; function onTrade(player,npc,trade) -- item IDs -- 483 Broken Mithran Fishing Rod -- 22 Workbench -- 1008 Ten of Coins -- 1157 Sands of Silence -- 1158 Wandering Bulb -- 904 Giant Fish Bones -- 4599 Blackened Toad -- 905 Wyvern Skull -- 1147 Ancient Salt -- 4600 Lucky Egg local OpoOpoAndIStatus = player:getQuestStatus(OUTLANDS, THE_OPO_OPO_AND_I); local progress = player:getVar("OPO_OPO_PROGRESS"); local failed = player:getVar("OPO_OPO_FAILED"); local goodtrade = trade:hasItemQty(1157,1); local badtrade = (trade:hasItemQty(483,1) or trade:hasItemQty(22,1) or trade:hasItemQty(1008,1) or trade:hasItemQty(1158,1) or trade:hasItemQty(904,1) or trade:hasItemQty(4599,1) or trade:hasItemQty(905,1) or trade:hasItemQty(1147,1) or trade:hasItemQty(4600,1)); if (OpoOpoAndIStatus == QUEST_ACCEPTED) then if progress == 3 or failed == 4 then if goodtrade then player:startEvent(222); elseif badtrade then player:startEvent(232); end end end end; function onTrigger(player,npc) local OpoOpoAndIStatus = player:getQuestStatus(OUTLANDS, THE_OPO_OPO_AND_I); local progress = player:getVar("OPO_OPO_PROGRESS"); local failed = player:getVar("OPO_OPO_FAILED"); local retry = player:getVar("OPO_OPO_RETRY"); if (OpoOpoAndIStatus == QUEST_ACCEPTED) then if retry >= 1 then -- has failed on future npc so disregard previous successful trade player:startEvent(200); npc:wait(); elseif (progress == 3 or failed == 4) then player:startEvent(210); -- asking for sands of silence elseif (progress >= 4 or failed >= 5) then player:startEvent(245); -- happy with sands of silence end else player:startEvent(200); npc:wait(); end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option,npc) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if (csid == 222) then -- correct trade, onto next opo if player:getVar("OPO_OPO_PROGRESS") == 3 then player:tradeComplete(); player:setVar("OPO_OPO_PROGRESS",4); player:setVar("OPO_OPO_FAILED",0); else player:setVar("OPO_OPO_FAILED",5); end elseif (csid == 232) then -- wrong trade, restart at first opo player:setVar("OPO_OPO_FAILED",1); player:setVar("OPO_OPO_RETRY",4); else npc:wait(0); end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/loot/groups/wearables/wearables_uncommon.lua
4
6164
wearables_uncommon = { description = "", minimumLevel = 0, maximumLevel = 0, lootItems = { {itemTemplate = "belt_s04", weight = 119047}, -- Workman's Belt {itemTemplate = "belt_s09", weight = 119047}, -- Utility Belt {itemTemplate = "belt_s15", weight = 119047}, -- Strap Belt {itemTemplate = "belt_s16", weight = 119047}, -- Leather Belt {itemTemplate = "belt_s18", weight = 119047}, -- Bristle Hide Belt {itemTemplate = "boots_s05", weight = 119047}, -- Sturdy Boots {itemTemplate = "boots_s14", weight = 119047}, -- Uniform Boots {itemTemplate = "boots_s15", weight = 119047}, -- Standard Boots {itemTemplate = "boots_s21", weight = 119047}, -- Paneled Boots {itemTemplate = "boots_s34", weight = 119047}, -- Snow Boots {itemTemplate = "bracelet_s05_l", weight = 119047}, -- Bangles {itemTemplate = "bracelet_s05_r", weight = 119047}, -- Bangles {itemTemplate = "bracelet_s06_l", weight = 119047}, -- Metal Bracelet {itemTemplate = "bracelet_s06_r", weight = 119047}, -- Metal Bracelet {itemTemplate = "dress_s09", weight = 119047}, -- Loose Dress {itemTemplate = "dress_s13", weight = 119047}, -- Smock {itemTemplate = "dress_s23", weight = 119047}, -- Councilman's Robe {itemTemplate = "dress_s29", weight = 119047}, -- Sleeveless Dress {itemTemplate = "gloves_s02", weight = 119047}, -- Leather Work Gloves {itemTemplate = "gloves_s03", weight = 119047}, -- Cold Weather Gloves {itemTemplate = "gloves_s06", weight = 119047}, -- Tipless Gloves {itemTemplate = "gloves_s07", weight = 119047}, -- Long Leather Gloves {itemTemplate = "hat_s04", weight = 119047}, -- Swoop Helm {itemTemplate = "ith_dress_s03", weight = 119047}, -- Ithorian Elder's Dress {itemTemplate = "ith_gloves_s02", weight = 119047}, -- Ithorian Leather Work Gloves {itemTemplate = "ith_hat_s01", weight = 119047}, -- Ithorian Newsboy {itemTemplate = "ith_jacket_s01", weight = 119047}, -- Ithorian Block Panel Jacket {itemTemplate = "ith_jacket_s02", weight = 119047}, -- Ithorian Cargo Jacket {itemTemplate = "ith_jacket_s03", weight = 119047}, -- Ithorian Frilled Jacket {itemTemplate = "ith_jacket_s08", weight = 119047}, -- Ithorian Tech Jacket {itemTemplate = "ith_necklace_s01", weight = 119047}, -- Ithorian Plated Necklace {itemTemplate = "ith_necklace_s03", weight = 119047}, -- Ithorian Crested Neckpiece {itemTemplate = "ith_necklace_s06", weight = 119047}, -- Ithorian Metal Necklace {itemTemplate = "ith_necklace_s07", weight = 119047}, -- Ithorian Emerald Pendant {itemTemplate = "ith_necklace_s08", weight = 119047}, -- Ithorian Large Pendant {itemTemplate = "ith_necklace_s11", weight = 119047}, -- Ithorian Striped Pendant {itemTemplate = "ith_pants_s02", weight = 119047}, -- Ithorian Three Striped Pants {itemTemplate = "ith_pants_s03", weight = 119047}, -- Ithorian Twin Striped Pants {itemTemplate = "ith_pants_s05", weight = 119047}, -- Ithorian Camos {itemTemplate = "ith_pants_s06", weight = 119047}, -- Ithorian Patrol Pants {itemTemplate = "ith_shirt_s02", weight = 119047}, -- Ithorian Frilly Shirt {itemTemplate = "ith_shirt_s04", weight = 119047}, -- Ithorian Half Sweater {itemTemplate = "ith_shirt_s08", weight = 119047}, -- Ithorian Two Tone Shirt {itemTemplate = "ith_shirt_s12", weight = 119047}, -- Ithorian Tight Fit Shirt {itemTemplate = "ith_skirt_s01", weight = 119047}, -- Ithorian Striped Skirt {itemTemplate = "jacket_s05", weight = 119057}, -- Padded Jacket {itemTemplate = "jacket_s08", weight = 119057}, -- Rugged Jacket {itemTemplate = "jacket_s13", weight = 119057}, -- Reinforced Jacket {itemTemplate = "jacket_s14", weight = 119057}, -- Wooly Jacket {itemTemplate = "jacket_s16", weight = 119057}, -- Cold Weather Jacket {itemTemplate = "necklace_s01", weight = 119049}, -- Plated Necklace {itemTemplate = "necklace_s03", weight = 119047}, -- Crested Neckpiece {itemTemplate = "necklace_s06", weight = 119047}, -- Metal Necklace {itemTemplate = "necklace_s07", weight = 119047}, -- Emerald Pendant {itemTemplate = "necklace_s08", weight = 119047}, -- Large Pendant {itemTemplate = "necklace_s11", weight = 119047}, -- Striped Pendant {itemTemplate = "pants_s01", weight = 119047}, -- Striped Pants {itemTemplate = "pants_s05", weight = 119047}, -- Thin Striped Pants {itemTemplate = "pants_s06", weight = 119047}, -- Ribbed Pants {itemTemplate = "pants_s14", weight = 119047}, -- Large Pocket Pants {itemTemplate = "shirt_s03", weight = 119047}, -- Plain Shirt {itemTemplate = "shirt_s05", weight = 119047}, -- Dress Shirt {itemTemplate = "shirt_s07", weight = 119047}, -- Casual Shirt {itemTemplate = "shirt_s08", weight = 119047}, -- Sidebuttoned Shirt {itemTemplate = "shirt_s09", weight = 119047}, -- Ribbed Shirt {itemTemplate = "shirt_s13", weight = 119047}, -- Formal Shirt {itemTemplate = "shirt_s28", weight = 119047}, -- Dress Blouse {itemTemplate = "shoes_s01", weight = 119047}, -- Dress Shoes {itemTemplate = "shoes_s03", weight = 119047}, -- Sneakers {itemTemplate = "shoes_s07", weight = 119047}, -- Sandals {itemTemplate = "shoes_s08", weight = 119047}, -- Women's Shoes {itemTemplate = "shoes_s09", weight = 119047}, -- Dress Slippers {itemTemplate = "skirt_s04", weight = 119047}, -- Pleated Skirt {itemTemplate = "skirt_s05", weight = 119047}, -- Modest Skirt {itemTemplate = "skirt_s06", weight = 119047}, -- Belted Skirt {itemTemplate = "skirt_s07", weight = 119047}, -- Fashionably Pleated Skirt {itemTemplate = "skirt_s14", weight = 119047}, -- Two-Tone Formal Skirt {itemTemplate = "vest_s06", weight = 119047}, -- Padded Pullover {itemTemplate = "vest_s09", weight = 119047}, -- Cargo Vest {itemTemplate = "wke_gloves_s01", weight = 119047}, -- Patterned Wookiee Gloves {itemTemplate = "wke_gloves_s04", weight = 119047}, -- Wookiee Strapped Gloves {itemTemplate = "wke_hat_s01", weight = 119047}, -- Wookiee Traveller's Helm {itemTemplate = "wke_skirt_s02", weight = 119047}, -- Sigiled Waist Wrap {itemTemplate = "wke_skirt_s03", weight = 119047}, -- Weighted Waist Wrap } } addLootGroupTemplate("wearables_uncommon", wearables_uncommon)
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_brawler_trainer_02.lua
2
2314
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_brawler_trainer_02 = object_mobile_shared_dressed_brawler_trainer_02:new { planetMapCategory = "trainer_brawler", objectMenuComponent = {"cpp", "TrainerMenuComponent"} } ObjectTemplates:addTemplate(object_mobile_dressed_brawler_trainer_02, "object/mobile/dressed_brawler_trainer_02.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/bio_engineer/dna_template/dna_template_kaadu.lua
3
2328
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_bio_engineer_dna_template_dna_template_kaadu = object_draft_schematic_bio_engineer_dna_template_shared_dna_template_kaadu:new { } ObjectTemplates:addTemplate(object_draft_schematic_bio_engineer_dna_template_dna_template_kaadu, "object/draft_schematic/bio_engineer/dna_template/dna_template_kaadu.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/lair/lantern_bird/serverobjects.lua
3
2183
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --Children folder includes -- Server Objects includeFile("tangible/lair/lantern_bird/lair_lantern_bird.lua") includeFile("tangible/lair/lantern_bird/lair_lantern_bird_forest.lua")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Chest.lua
5
3377
----------------------------------- -- Area: Castle Zvahl Baileys -- NPC: Treasure Chest -- @zone 161 ----------------------------------- package.loaded["scripts/zones/Castle_Zvahl_Baileys/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/keyitems"); require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Castle_Zvahl_Baileys/TextIDs"); local TreasureType = "Chest"; local TreasureLvL = 53; local TreasureMinLvL = 43; function onTrade(player,npc,trade) -- trade:hasItemQty(1038,1); -- Treasure Key -- trade:hasItemQty(1115,1); -- Skeleton Key -- trade:hasItemQty(1023,1); -- Living Key -- trade:hasItemQty(1022,1); -- Thief's Tools local questItemNeeded = 0; -- Player traded a key. if ((trade:hasItemQty(1038,1) or trade:hasItemQty(1115,1) or trade:hasItemQty(1023,1) or trade:hasItemQty(1022,1)) and trade:getItemCount() == 1) then local zone = player:getZoneID(); -- IMPORTANT ITEM: keyitem ----------- if (player:getQuestStatus(BASTOK,A_TEST_OF_TRUE_LOVE) == QUEST_ACCEPTED and player:hasKeyItem(UN_MOMENT) == false) then questItemNeeded = 1; end -------------------------------------- local pack = openChance(player,npc,trade,TreasureType,TreasureLvL,TreasureMinLvL,questItemNeeded); local success = 0; if (pack[2] ~= nil) then player:messageSpecial(pack[2]); success = pack[1]; else success = pack[1]; end if (success ~= -2) then player:tradeComplete(); if (math.random() <= success) then -- 0 or 1 -- Succeded to open the coffer player:messageSpecial(CHEST_UNLOCKED); if (questItemNeeded == 1) then player:setVar("ATestOfTrueLoveProgress",player:getVar("ATestOfTrueLoveProgress")+1); player:addKeyItem(UN_MOMENT); player:messageSpecial(KEYITEM_OBTAINED,UN_MOMENT); -- Un moment for A Test Of True Love quest else player:setVar("["..zone.."]".."Treasure_"..TreasureType,os.time() + math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME)); local loot = chestLoot(zone,npc); -- print("loot array: "); -- debug -- print("[1]", loot[1]); -- debug -- print("[2]", loot[2]); -- debug if (loot[1]=="gil") then player:addGil(loot[2]*GIL_RATE); player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); player:messageSpecial(ITEM_OBTAINED,loot[2]); end end UpdateTreasureSpawnPoint(npc:getID()); end end end end; function onTrigger(player,npc) player:messageSpecial(CHEST_LOCKED,1038); end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end;
gpl-3.0
DailyShana/ygopro-scripts
c66762372.lua
5
2862
--孤炎星-ロシシン function c66762372.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(66762372,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(c66762372.spcon) e1:SetTarget(c66762372.sptg) e1:SetOperation(c66762372.spop) c:RegisterEffect(e1) --set local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(66762372,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(c66762372.setcon) e2:SetTarget(c66762372.settg) e2:SetOperation(c66762372.setop) c:RegisterEffect(e2) --synlimit local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetValue(c66762372.synlimit) c:RegisterEffect(e3) end function c66762372.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function c66762372.spfilter(c,e,tp) return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=66762372 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c66762372.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c66762372.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c66762372.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c66762372.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function c66762372.cfilter(c,tp) return c:IsFaceup() and c:IsSetCard(0x79) and c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==tp end function c66762372.setcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c66762372.cfilter,1,nil,tp) end function c66762372.filter(c) return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() end function c66762372.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c66762372.filter,tp,LOCATION_DECK,0,1,nil) end end function c66762372.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectMatchingCard(tp,c66762372.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SSet(tp,g:GetFirst()) Duel.ConfirmCards(1-tp,g) end end function c66762372.synlimit(e,c) if not c then return false end return not c:IsAttribute(ATTRIBUTE_FIRE) end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/container/corpse/objects.lua
3
3829
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --which carries forward this exception. object_tangible_container_corpse_shared_player_corpse = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/container/corpse/shared_player_corpse.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/skeleton_human_corpse.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 1, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 2, containerVolumeLimit = 125, customizationVariableMapping = {}, detailedDescription = "@base_player:corpse_player_n", gameObjectType = 1, locationReservationRadius = 0, lookAtText = "@container_lookat:base_container", noBuildRadius = 0, objectName = "@base_player:corpse_player_n", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 3090831505, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/container/base/shared_base_container.iff", "object/tangible/container/base/shared_base_container_volume.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_container_corpse_shared_player_corpse, "object/tangible/container/corpse/shared_player_corpse.iff")
agpl-3.0
DailyShana/ygopro-scripts
c83778600.lua
3
1168
--ミス・リバイブ function c83778600.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c83778600.target) e1:SetOperation(c83778600.activate) c:RegisterEffect(e1) end function c83778600.filter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENCE,1-tp) end function c83778600.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c83778600.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 and Duel.IsExistingTarget(c83778600.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c83778600.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c83778600.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/creature/player/base/base_player.lua
3
2216
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_creature_player_base_base_player = object_creature_player_base_shared_base_player:new { } ObjectTemplates:addTemplate(object_creature_player_base_base_player, "object/creature/player/base/base_player.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/item/item_con_winebottle_05.lua
3
2224
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_item_item_con_winebottle_05 = object_static_item_shared_item_con_winebottle_05:new { } ObjectTemplates:addTemplate(object_static_item_item_con_winebottle_05, "object/static/item/item_con_winebottle_05.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_blood_razor_pirate_wee_m.lua
3
2244
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_blood_razor_pirate_wee_m = object_mobile_shared_dressed_blood_razor_pirate_wee_m:new { } ObjectTemplates:addTemplate(object_mobile_dressed_blood_razor_pirate_wee_m, "object/mobile/dressed_blood_razor_pirate_wee_m.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/mission/quest_item/singular_nak_q1_needed.lua
3
2288
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_mission_quest_item_singular_nak_q1_needed = object_tangible_mission_quest_item_shared_singular_nak_q1_needed:new { } ObjectTemplates:addTemplate(object_tangible_mission_quest_item_singular_nak_q1_needed, "object/tangible/mission/quest_item/singular_nak_q1_needed.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/commands/joinGame.lua
4
2117
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --which carries forward this exception. --true = 1, false = 0 JoinGameCommand = { name = "joingame", } AddCommand(JoinGameCommand)
agpl-3.0
delram/upseed
plugins/banhammer.lua
35
12823
local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat by link if action == 'chat_add_user_link' then local user_id = msg.from.id print('Checking invited user '..user_id) local banned = is_banned(user_id, msg.to.id) if banned or is_gbanned(user_id) then -- Check it with redis print('User is banned!') local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] is banned and kicked ! ")-- Save to logs kick_user(user_id, msg.to.id) end end -- Check if banned user joins chat if action == 'chat_add_user' then local user_id = msg.action.user.id print('Checking invited user '..user_id) local banned = is_banned(user_id, msg.to.id) if banned or is_gbanned(user_id) then -- Check it with redis print('User is banned!') local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] added a banned user >"..msg.action.user.id)-- Save to logs kick_user(user_id, msg.to.id) local banhash = 'addedbanuser:'..msg.to.id..':'..msg.from.id redis:incr(banhash) local banhash = 'addedbanuser:'..msg.to.id..':'..msg.from.id local banaddredis = redis:get(banhash) if banaddredis then if tonumber(banaddredis) == 4 and not is_owner(msg) then kick_user(msg.from.id, msg.to.id)-- Kick user who adds ban ppl more than 3 times end if tonumber(banaddredis) == 8 and not is_owner(msg) then ban_user(msg.from.id, msg.to.id)-- Kick user who adds ban ppl more than 7 times local banhash = 'addedbanuser:'..msg.to.id..':'..msg.from.id redis:set(banhash, 0)-- Reset the Counter end end end if data[tostring(msg.to.id)] then if data[tostring(msg.to.id)]['settings'] then if data[tostring(msg.to.id)]['settings']['lock_bots'] then bots_protection = data[tostring(msg.to.id)]['settings']['lock_bots'] end end local bots_protection = "Yes" local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)]['settings']['lock_bots'] then bots_protection = data[tostring(msg.to.id)]['settings']['lock_bots'] end if msg.action.user.username ~= nil then if string.sub(msg.action.user.username:lower(), -3) == 'bot' and not is_momod(msg) and bots_protection == "yes" then --- Will kick bots added by normal users local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] added a bot > @".. msg.action.user.username)-- Save to logs kick_user(msg.action.user.id, msg.to.id) end end end -- No further checks return msg end -- banned user is talking ! if msg.to.type == 'chat' then local data = load_data(_config.moderation.data) local group = msg.to.id local texttext = 'groups' --if not data[tostring(texttext)][tostring(msg.to.id)] and not is_realm(msg) then -- Check if this group is one of my groups or not --chat_del_user('chat#id'..msg.to.id,'user#id'..our_id,ok_cb,false) --return --end local user_id = msg.from.id local chat_id = msg.to.id local banned = is_banned(user_id, chat_id) if banned or is_gbanned(user_id) then -- Check it with redis print('Banned user talking!') local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] banned user is talking !")-- Save to logs kick_user(user_id, chat_id) msg.text = '' end end return msg end local function kick_ban_res(extra, success, result) --vardump(result) --vardump(extra) local member_id = result.id local user_id = member_id local member = result.username local chat_id = extra.chat_id local from_id = extra.from_id local get_cmd = extra.get_cmd local receiver = "chat#id"..chat_id if get_cmd == "kick" then if member_id == from_id then return send_large_msg(receiver, "You can't kick yourself") end if is_momod2(member_id, chat_id) and not is_admin2(sender) then return send_large_msg(receiver, "You can't kick mods/owner/admins") end return kick_user(member_id, chat_id) elseif get_cmd == 'ban' then if is_momod2(member_id, chat_id) and not is_admin2(sender) then return send_large_msg(receiver, "You can't ban mods/owner/admins") end send_large_msg(receiver, 'User @'..member..' ['..member_id..'] banned') return ban_user(member_id, chat_id) elseif get_cmd == 'unban' then send_large_msg(receiver, 'User @'..member..' ['..member_id..'] unbanned') local hash = 'banned:'..chat_id redis:srem(hash, member_id) return 'User '..user_id..' unbanned' elseif get_cmd == 'banall' then send_large_msg(receiver, 'User @'..member..' ['..member_id..'] globally banned') return banall_user(member_id, chat_id) elseif get_cmd == 'unbanall' then send_large_msg(receiver, 'User @'..member..' ['..member_id..'] un-globally banned') return unbanall_user(member_id, chat_id) end end local function run(msg, matches) if matches[1]:lower() == 'id' then if msg.to.type == "user" then return "Bot ID: "..msg.to.id.. "\n\nYour ID: "..msg.from.id end if type(msg.reply_id) ~= "nil" then local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] used /id ") id = get_message(msg.reply_id,get_message_callback_id, false) elseif matches[1]:lower() == 'id' then local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] used /id ") return "Group ID for " ..string.gsub(msg.to.print_name, "_", " ").. ":\n\n"..msg.to.id end end local receiver = get_receiver(msg) if matches[1]:lower() == 'kickme' then-- /kickme if msg.to.type == 'chat' then local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] left using kickme ")-- Save to logs chat_del_user("chat#id"..msg.to.id, "user#id"..msg.from.id, ok_cb, false) end end if not is_momod(msg) then -- Ignore normal users return nil end if matches[1]:lower() == "banlist" then -- Ban list ! local chat_id = msg.to.id if matches[2] and is_admin(msg) then chat_id = matches[2] end return ban_list(chat_id) end if matches[1]:lower() == 'ban' then-- /ban if type(msg.reply_id)~="nil" and is_momod(msg) then if is_admin(msg) then local msgr = get_message(msg.reply_id,ban_by_reply_admins, false) else msgr = get_message(msg.reply_id,ban_by_reply, false) end end local user_id = matches[2] local chat_id = msg.to.id if string.match(matches[2], '^%d+$') then if tonumber(matches[2]) == tonumber(our_id) then return end if not is_admin(msg) and is_momod2(tonumber(matches[2]), msg.to.id) then return "you can't ban mods/owner/admins" end if tonumber(matches[2]) == tonumber(msg.from.id) then return "You can't ban your self !" end local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] baned user ".. matches[2]) ban_user(user_id, chat_id) else local cbres_extra = { chat_id = msg.to.id, get_cmd = 'ban', from_id = msg.from.id } local username = matches[2] local username = string.gsub(matches[2], '@', '') res_user(username, kick_ban_res, cbres_extra) end end if matches[1]:lower() == 'unban' then -- /unban if type(msg.reply_id)~="nil" and is_momod(msg) then local msgr = get_message(msg.reply_id,unban_by_reply, false) end local user_id = matches[2] local chat_id = msg.to.id local targetuser = matches[2] if string.match(targetuser, '^%d+$') then local user_id = targetuser local hash = 'banned:'..chat_id redis:srem(hash, user_id) local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] unbaned user ".. matches[2]) return 'User '..user_id..' unbanned' else local cbres_extra = { chat_id = msg.to.id, get_cmd = 'unban', from_id = msg.from.id } local username = matches[2] local username = string.gsub(matches[2], '@', '') res_user(username, kick_ban_res, cbres_extra) end end if matches[1]:lower() == 'kick' then if type(msg.reply_id)~="nil" and is_momod(msg) then if is_admin(msg) then local msgr = get_message(msg.reply_id,Kick_by_reply_admins, false) else msgr = get_message(msg.reply_id,Kick_by_reply, false) end end if string.match(matches[2], '^%d+$') then if tonumber(matches[2]) == tonumber(our_id) then return end if not is_admin(msg) and is_momod2(matches[2], msg.to.id) then return "you can't kick mods/owner/admins" end if tonumber(matches[2]) == tonumber(msg.from.id) then return "You can't kick your self !" end local user_id = matches[2] local chat_id = msg.to.id name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] kicked user ".. matches[2]) kick_user(user_id, chat_id) else local cbres_extra = { chat_id = msg.to.id, get_cmd = 'kick', from_id = msg.from.id } local username = matches[2] local username = string.gsub(matches[2], '@', '') res_user(username, kick_ban_res, cbres_extra) end end if msg.to.type == 'chat' then local user_id = matches[2] local chat_id = msg.to.id if string.match(matches[2], '^%d+$') then if tonumber(matches[2]) == tonumber(our_id) then return end if not is_admin(msg) and is_momod2(matches[2], msg.to.id) then return "you can't kick mods/owner/admins" end if tonumber(matches[2]) == tonumber(msg.from.id) then return "You can't kick your self !" end local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] kicked user ".. matches[2]) kick_user(user_id, chat_id) else local member = string.gsub(matches[2], '@', '') local get_cmd = 'kick' local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] kicked user ".. matches[2]) chat_info(receiver, username_id, {get_cmd=get_cmd, receiver=receiver, chat_id=msg.to.id, member=member}) end else return 'This isn\'t a chat group' end end if not is_admin(msg) then return end if matches[1]:lower() == 'banall' then -- Global ban if type(msg.reply_id) ~="nil" and is_admin(msg) then return get_message(msg.reply_id,banall_by_reply, false) end local user_id = matches[2] local chat_id = msg.to.id local targetuser = matches[2] if string.match(targetuser, '^%d+$') then if tonumber(matches[2]) == tonumber(our_id) then return false end banall_user(targetuser) return 'User ['..user_id..' ] globally banned' else local cbres_extra = { chat_id = msg.to.id, get_cmd = 'banall', from_id = msg.from.id } local username = matches[2] local username = string.gsub(matches[2], '@', '') res_user(username, kick_ban_res, cbres_extra) end end if matches[1]:lower() == 'unbanall' then -- Global unban local user_id = matches[2] local chat_id = msg.to.id if string.match(matches[2], '^%d+$') then if tonumber(matches[2]) == tonumber(our_id) then return false end unbanall_user(user_id) return 'User ['..user_id..' ] removed from global ban list' else local cbres_extra = { chat_id = msg.to.id, get_cmd = 'unbanall', from_id = msg.from.id } local username = matches[2] local username = string.gsub(matches[2], '@', '') res_user(username, kick_ban_res, cbres_extra) end end if matches[1]:lower() == "gbanlist" then -- Global ban list return banall_list() end end return { patterns = { "^[!/]([Bb]anall) (.*)$", "^[!/]([Bb]anall)$", "^[!/]([Bb]anlist) (.*)$", "^[!/]([Bb]anlist)$", "^[!/]([Gg]banlist)$", "^[!/]([Bb]an) (.*)$", "^[!/]([Kk]ick)$", "^[!/]([Uu]nban) (.*)$", "^[!/]([Uu]nbanall) (.*)$", "^[!/]([Uu]nbanall)$", "^[!/]([Kk]ick) (.*)$", "^[!/]([Kk]ickme)$", "^[!/]([Bb]an)$", "^[!/]([Uu]nban)$", "^[!/]([Ii]d)$", "^!!tgservice (.+)$" }, run = run, pre_process = pre_process }
gpl-2.0
DailyShana/ygopro-scripts
c40894584.lua
3
1967
--ジゴバイト function c40894584.initial_effect(c) c:SetUniqueOnField(1,0,40894584) --spsummon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c40894584.spcon) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(40894584,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(c40894584.condition) e2:SetTarget(c40894584.target) e2:SetOperation(c40894584.operation) c:RegisterEffect(e2) end function c40894584.cfilter(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) end function c40894584.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c40894584.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function c40894584.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) end function c40894584.filter(c,e,tp) return c:GetAttack()==1500 and c:GetDefence()==200 and not c:IsCode(40894584) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c40894584.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c40894584.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function c40894584.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c40894584.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end
gpl-2.0
KingRaptor/Zero-K
effects/plasma.lua
25
5768
-- plasma_hit_32 -- plasma_hit_96 return { ["plasma_hit_32"] = { usedefaultexplosions = false, groundflash = { circlealpha = 0.25, circlegrowth = 4, flashalpha = 0.5, flashsize = 32, ttl = 8, color = { [1] = 1, [2] = 0.5, [3] = 0, }, }, mainhit = { air = true, class = [[heatcloud]], count = 1, ground = true, water = true, properties = { heat = 8, heatfalloff = 1, maxheat = 8, pos = [[0, 1, 0]], size = 1, sizegrowth = 2, speed = [[0, 1, 0]], texture = [[fireyexplo]], }, }, pikes = { air = true, class = [[explspike]], count = 16, ground = true, water = true, properties = { alpha = 1, alphadecay = 0.125, color = [[1,0.5,0]], dir = [[-4 r8, -4 r8, -4 r8]], length = 1, width = 8, }, }, sphere = { air = true, class = [[CSpherePartSpawner]], count = 1, ground = true, water = true, properties = { alpha = 0.125, alwaysvisible = false, color = [[1,1,1]], expansionspeed = 4, ttl = 8, }, }, }, ["plasma_hit_96"] = { usedefaultexplosions = false, groundflash = { circlealpha = 0.25, circlegrowth = 6, flashalpha = 0.5, flashsize = 96, ttl = 16, color = { [1] = 1, [2] = 0.5, [3] = 0, }, }, landdirt = { air = true, class = [[CSimpleParticleSystem]], count = 1, ground = true, properties = { airdrag = 0.95, colormap = [[0.04 0.03 0.02 0.05 0.4 0.3 0.2 0.5 0.04 0.03 0.02 0.05]], directional = false, emitrot = 85, emitrotspread = 5, emitvector = [[0, 1, 0]], gravity = [[0, -0.1, 0]], numparticles = 16, particlelife = 16, particlelifespread = 4, particlesize = 4, particlesizespread = 4, particlespeed = 4, particlespeedspread = 2, pos = [[0, 0, 0]], sizegrowth = 6, sizemod = 0.75, texture = [[dirt]], }, }, mainhit = { air = true, class = [[heatcloud]], count = 1, ground = true, water = true, properties = { heat = 16, heatfalloff = 1, maxheat = 16, pos = [[0, 1, 0]], size = 1, sizegrowth = 3, speed = [[0, 1, 0]], texture = [[fireyexplo]], }, }, mainhit2 = { air = true, class = [[heatcloud]], count = 1, ground = true, water = true, properties = { heat = 16, heatfalloff = 1, maxheat = 16, pos = [[0, 1, 0]], size = 1, sizegrowth = 3, speed = [[0, 1, 0]], texture = [[uglynovaexplo]], }, }, pikes = { air = true, class = [[explspike]], count = 16, ground = true, water = true, properties = { alpha = 1, alphadecay = 0.06, color = [[1,0.5,0]], dir = [[-6 r12, -6 r12, -6 r12]], length = 1, width = 24, }, }, sphere = { air = true, class = [[CSpherePartSpawner]], count = 1, ground = true, water = true, properties = { alpha = 0.125, alwaysvisible = false, color = [[1,1,1]], expansionspeed = 3, ttl = 16, }, }, watermist = { air = true, class = [[CSimpleParticleSystem]], count = 1, water = true, properties = { airdrag = 0.95, colormap = [[0.04 0.04 0.05 0.05 0.4 0.4 0.5 0.5 0.04 0.04 0.05 0.05]], directional = false, emitrot = 85, emitrotspread = 5, emitvector = [[0, 1, 0]], gravity = [[0, -0.1, 0]], numparticles = 16, particlelife = 16, particlelifespread = 4, particlesize = 4, particlesizespread = 4, particlespeed = 4, particlespeedspread = 2, pos = [[0, 0, 0]], sizegrowth = 6, sizemod = 0.75, texture = [[smokesmall]], }, }, }, }
gpl-2.0
KingRaptor/Zero-K
LuaRules/Configs/cai/strategies.lua
20
7579
--[[ example buildTasksMods buildTasksMods = function(buildConfig) buildConfig.robots.factoryByDefId[UnitDefNames['factorycloak'].id].importance = 0 buildConfig.robots.factoryByDefId[UnitDefNames['factoryshield'].id].importance = 1 buildConfig.robots.factoryByDefId[UnitDefNames['factoryveh'].id].importance = 0 buildConfig.robots.factoryByDefId[UnitDefNames['factoryspider'].id].importance = 0 end, --]] local function noFunc() end -- these buildTaskMods function by editing the config supplied as the arg local function BuildTasksMod_Blitz(buildConfig) local factory = buildConfig.robots.factoryByDefId factory[UnitDefNames['factorycloak'].id].importance = 1.1 factory[UnitDefNames['factoryshield'].id].importance = 0.9 factory[UnitDefNames['factoryveh'].id].importance = 1.2 factory[UnitDefNames['factoryhover'].id].importance = 1.2 factory[UnitDefNames['factoryspider'].id].importance = 0.8 factory[UnitDefNames['factoryjump'].id].importance = 0.8 for fac, data in pairs(factory) do if not data.airFactory then data[3].importanceMult = data[3].importanceMult*1.2 -- more raiders data[4].importanceMult = data[4].importanceMult*0.8 -- fewer arty data[5].importanceMult = data[5].importanceMult*1.15 -- more assaults data[6].importanceMult = data[6].importanceMult*0.9 -- fewer skirms data[7].importanceMult = data[7].importanceMult*0.9 -- fewer riots end for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 0.8 data.airDefenceQuota[i] = data.airDefenceQuota[i] * 0.9 end end local econ = buildConfig.robots.econByDefId for econBldg, data in pairs(econ) do for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 0.8 data.airDefenceQuota[i] = data.airDefenceQuota[i] * 0.9 end end end local function BuildTasksMod_Pusher(buildConfig) local factory = buildConfig.robots.factoryByDefId factory[UnitDefNames['factoryshield'].id].importance = 1.1 factory[UnitDefNames['factoryhover'].id].importance = 0.9 factory[UnitDefNames['factoryspider'].id].importance = 0.9 factory[UnitDefNames['factorytank'].id].importance = 1.1 for fac, data in pairs(factory) do if not data.airFactory then data[3].importanceMult = data[3].importanceMult*0.9 -- fewer raiders data[4].importanceMult = data[4].importanceMult*1.1 -- more arty data[6].importanceMult = data[6].importanceMult*1.2 -- more skirms data[7].importanceMult = data[7].importanceMult*1.1 -- more riots end for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 0.9 end end local econ = buildConfig.robots.econByDefId for econBldg, data in pairs(econ) do for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 0.9 end end end local function BuildTasksMod_Defensive(buildConfig) local factory = buildConfig.robots.factoryByDefId factory[UnitDefNames['factorycloak'].id].importance = 0.9 factory[UnitDefNames['factoryshield'].id].importance = 1.1 factory[UnitDefNames['factoryveh'].id].importance = 1.1 factory[UnitDefNames['factoryhover'].id].importance = 0.8 factory[UnitDefNames['factoryspider'].id].importance = 0.8 factory[UnitDefNames['factoryjump'].id].importance = 1.1 factory[UnitDefNames['factorytank'].id].importance = 1.1 for fac, data in pairs(factory) do if not data.airFactory then data[3].importanceMult = data[3].importanceMult*0.8 -- fewer raiders data[4].importanceMult = data[4].importanceMult*0.9 -- less arty data[5].importanceMult = data[5].importanceMult*0.9 -- fewer assaults data[6].importanceMult = data[6].importanceMult*1.1 -- more skirms data[7].importanceMult = data[7].importanceMult*1.2 -- more riots end for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 1.2 data.airDefenceQuota[i] = data.airDefenceQuota[i] * 1.2 end end local econ = buildConfig.robots.econByDefId for econBldg, data in pairs(econ) do for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 1.2 data.airDefenceQuota[i] = data.airDefenceQuota[i] * 1.2 end end end local function BuildTasksMod_Lolz(buildConfig) local factory = buildConfig.robots.factoryByDefId factory[UnitDefNames['factorycloak'].id].importance = 0 factory[UnitDefNames['factoryshield'].id].importance = 0 factory[UnitDefNames['factoryveh'].id].importance = 0 factory[UnitDefNames['factoryhover'].id].importance = 0 factory[UnitDefNames['factoryspider'].id].importance = 0 factory[UnitDefNames['factoryjump'].id].importance = 1 factory[UnitDefNames['factorytank'].id].importance = 0 factory[UnitDefNames['factoryjump'].id].minFacCount = 0 for fac, data in pairs(factory) do if not data.airFactory then --data[3].importanceMult = data[3].importanceMult*0.8 -- fewer raiders --data[4].importanceMult = data[4].importanceMult*0.9 -- less arty --data[5].importanceMult = data[5].importanceMult*0.9 -- fewer assaults data[6].importanceMult = data[6].importanceMult*5 -- more moderators!!! --data[7].importanceMult = data[7].importanceMult*1.2 -- more riots end for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] data.airDefenceQuota[i] = data.airDefenceQuota[i] end end local econ = buildConfig.robots.econByDefId for econBldg, data in pairs(econ) do for i=1,3 do data.defenceQuota[i] = data.defenceQuota[i] * 1.2 data.airDefenceQuota[i] = data.airDefenceQuota[i] * 1.2 end end end strategies = { [1] = { -- standard name = "Standard", chance = 0.2, commanders = { {ID = "dyntrainer_strike_base", chance = 1}, }, buildTasksMods = noFunc, conAndEconHandlerMods = {}, }, [2] = { -- blitz name = "Blitz", chance = 0.2, commanders = { {ID = "dyntrainer_strike_base", chance = 0.5}, {ID = "dyntrainer_recon_base", chance = 0.5}, }, buildTasksMods = BuildTasksMod_Blitz, conAndEconHandlerMods = {}, }, [3] = { -- pusher name = "Push", chance = 0.2, commanders = { {ID = "dyntrainer_strike_base", chance = 0.5}, {ID = "dyntrainer_assault_base", chance = 0.5}, }, buildTasksMods = BuildTasksMod_Pusher, conAndEconHandlerMods = {}, }, [4] = { -- defensive name = "Defensive", chance = 0.2, commanders = { {ID = "dyntrainer_strike_base", chance = 0.5}, {ID = "dyntrainer_assault_base", chance = 0.5}, }, buildTasksMods = BuildTasksMod_Defensive, conAndEconHandlerMods = {}, }, [5] = { -- econ -- FIXME: doesn't do anything right now name = "Econ", chance = 0.2, commanders = { {ID = "dyntrainer_strike_base", chance = 0.5}, {ID = "dyntrainer_support_base", chance = 0.5}, }, buildTasksMods = noFunc, conAndEconHandlerMods = {}, }, [6] = { -- lolz name = "lolz", chance = 0, commanders = { {ID = "dyntrainer_strike_base", chance = 1}, }, buildTasksMods = BuildTasksMod_Lolz, conAndEconHandlerMods = {}, }, } local function SelectComm(player, team, strat) local rand = math.random() local commName local total = 0 for i = 1, #strategies[strat].commanders do total = total + strategies[strat].commanders[i].chance if rand < total then commName = strategies[strat].commanders[i].ID Spring.SetTeamRulesParam(team, "start_unit", commName) Spring.Echo("CAI: team "..team.." has selected strategy: "..strategies[strat].name..", using commander "..commName) break end end end function SelectRandomStrat(player, team) local count = #strategies local rand = math.random() local stratIndex = 1 local total = 0 for i = 1, count do total = total + strategies[i].chance if rand <= total then SelectComm(player, team, i) stratIndex = i break end end return stratIndex end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/droid/component/item_storage_module_4.lua
2
3362
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_droid_component_item_storage_module_4 = object_draft_schematic_droid_component_shared_item_storage_module_4:new { templateType = DRAFTSCHEMATIC, customObjectName = "Level 4 Droid Item Storage Module", craftingToolTab = 32, -- (See DraftSchemticImplementation.h) complexity = 20, size = 2, xpType = "crafting_droid_general", xp = 85, assemblySkill = "droid_assembly", experimentingSkill = "droid_experimentation", customizationSkill = "droid_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n"}, ingredientTitleNames = {"module_frame", "thermal_shielding", "cargo_management_unit", "cargo_restraints"}, ingredientSlotType = {0, 0, 0, 0}, resourceTypes = {"steel", "ore_extrusive", "gas_inert", "metal_nonferrous"}, resourceQuantities = {15, 8, 8, 11}, contribution = {100, 100, 100, 100}, targetTemplate = "object/tangible/component/droid/item_storage_module_4.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_droid_component_item_storage_module_4, "object/draft_schematic/droid/component/item_storage_module_4.iff")
agpl-3.0
DailyShana/ygopro-scripts
c68601507.lua
5
1241
--武神器-ハバキリ function c68601507.initial_effect(c) --atkup local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(68601507,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c68601507.atkcon) e1:SetCost(c68601507.atkcost) e1:SetOperation(c68601507.atkop) c:RegisterEffect(e1) end function c68601507.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=Duel.GetAttackTarget() if not c then return false end if c:IsControler(1-tp) then c=Duel.GetAttacker() end e:SetLabelObject(c) return c and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsRelateToBattle() end function c68601507.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function c68601507.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetLabelObject() if c:IsFaceup() and c:IsRelateToBattle() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetValue(c:GetBaseAttack()*2) c:RegisterEffect(e1) end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_noble_human_male_01.lua
3
2224
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_noble_human_male_01 = object_mobile_shared_dressed_noble_human_male_01:new { } ObjectTemplates:addTemplate(object_mobile_dressed_noble_human_male_01, "object/mobile/dressed_noble_human_male_01.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Bastok_Mines/npcs/Crying_Wind_IM.lua
5
2504
----------------------------------- -- Area: Bastok Mines -- NPC: Crying Wind, I.M. -- X Grant Signet -- X Recharge Emperor Band, Empress Band, or Chariot Band -- X Accepts traded Crystals to fill up the Rank bar to open new Missions. -- X Sells items in exchange for Conquest Points -- X Start Supply Run Missions and offers a list of already-delivered supplies. -- Start an Expeditionary Force by giving an E.F. region insignia to you. ------------------------------------- package.loaded["scripts/zones/Bastok_Mines/TextIDs"] = nil; ------------------------------------- require("scripts/globals/conquest"); require("scripts/globals/common"); require("scripts/zones/Bastok_Mines/TextIDs"); local guardnation = NATION_BASTOK; -- SANDORIA, BASTOK, WINDURST, JEUNO local guardtype = 1; -- 1: city, 2: foreign, 3: outpost, 4: border local size = #BastInv; local inventory = BastInv; function onTrade(player,npc,trade) tradeConquestGuard(player,npc,trade,guardnation,guardtype); end; function onTrigger(player,npc) if (player:getNation() == guardnation and player:getVar("supplyQuest_started") > 0 and supplyRunFresh(player) == 0) then player:showText(npc,CONQUEST + 40); -- "We will dispose of those unusable supplies." local region = player:getVar("supplyQuest_region"); player:delKeyItem(getSupplyKey(region)); player:messageSpecial(KEYITEM_OBTAINED + 1,getSupplyKey(region)); player:setVar("supplyQuest_started",0); player:setVar("supplyQuest_region",0); player:setVar("supplyQuest_fresh",0); else local Menu1 = getArg1(guardnation,player); local Menu2 = getExForceAvailable(guardnation,player); local Menu3 = conquestRanking(); local Menu4 = getSupplyAvailable(guardnation,player); local Menu5 = player:getNationTeleport(guardnation); local Menu6 = getArg6(player); local Menu7 = player:getCP(); local Menu8 = getRewardExForce(guardnation,player); player:startEvent(32761,Menu1,Menu2,Menu3,Menu4,Menu5,Menu6,Menu7,Menu8); end end; function onEventUpdate(player,csid,option) -- printf("onUpdateCSID: %u",csid); -- printf("onUpdateOPTION: %u",option); updateConquestGuard(player,csid,option,size,inventory); end; function onEventFinish(player,csid,option) -- printf("onFinishCSID: %u",csid); -- printf("onFinishOPTION: %u",option); finishConquestGuard(player,csid,option,size,inventory,guardnation); end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/mission/quest_item/aujante_klee_q2_needed.lua
3
2288
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_mission_quest_item_aujante_klee_q2_needed = object_tangible_mission_quest_item_shared_aujante_klee_q2_needed:new { } ObjectTemplates:addTemplate(object_tangible_mission_quest_item_aujante_klee_q2_needed, "object/tangible/mission/quest_item/aujante_klee_q2_needed.iff")
agpl-3.0
grondo/flux-core
src/shell/lua.d/openmpi.lua
3
1281
------------------------------------------------------------- -- Copyright 2020 Lawrence Livermore National Security, LLC -- (c.f. AUTHORS, NOTICE.LLNS, COPYING) -- -- This file is part of the Flux resource manager framework. -- For details, see https://github.com/flux-framework. -- -- SPDX-License-Identifier: LGPL-3.0 ------------------------------------------------------------- if shell.options.mpi == "none" then return end shell.setenv ("OMPI_MCA_pmix", "flux") shell.setenv ("OMPI_MCA_schizo", "flux") -- OpenMPI needs a job-unique directory for vader shmem paths, otherwise -- multiple jobs per node may conflict (see flux-framework/flux-core#3649). -- Note: this plugin changes the path for files that openmpi usually shares -- using mmap (MAP_SHARED) from /dev/shm (tmpfs) to /tmp (maybe tmpfs). -- Performance may be affected if /tmp is provided by a disk-backed file system. plugin.register { name = "openmpi", handlers = { { topic = "shell.init", fn = function () local tmpdir = shell.getenv ("FLUX_JOB_TMPDIR") if tmpdir then shell.setenv ("OMPI_MCA_btl_vader_backing_directory", tmpdir) end end } } } -- vi:ts=4 sw=4 expandtab
lgpl-3.0
DailyShana/ygopro-scripts
c79306385.lua
3
1566
--宣告者の神託 function c79306385.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c79306385.target) e1:SetOperation(c79306385.activate) c:RegisterEffect(e1) end function c79306385.filter(c,e,tp,m) if not c:IsCode(48546368) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c) end function c79306385.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local mg=Duel.GetRitualMaterial(tp) return Duel.IsExistingMatchingCard(c79306385.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetChainLimit(c79306385.chlimit) end function c79306385.chlimit(e,ep,tp) return tp==ep end function c79306385.activate(e,tp,eg,ep,ev,re,r,rp) local mg=Duel.GetRitualMaterial(tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tg=Duel.SelectMatchingCard(tp,c79306385.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) local tc=tg:GetFirst() if tc then mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) tc:SetMaterial(mat) Duel.ReleaseRitualMaterial(mat) Duel.BreakEffect() Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) tc:CompleteProcedure() end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/wearables/belt/belt_s18.lua
3
4976
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_wearables_belt_belt_s18 = object_tangible_wearables_belt_shared_belt_s18:new { playerRaces = { "object/creature/player/bothan_male.iff", "object/creature/player/bothan_female.iff", "object/creature/player/human_male.iff", "object/creature/player/human_female.iff", "object/creature/player/ithorian_male.iff", "object/creature/player/ithorian_female.iff", "object/creature/player/moncal_male.iff", "object/creature/player/moncal_female.iff", "object/creature/player/rodian_male.iff", "object/creature/player/rodian_female.iff", "object/creature/player/sullustan_male.iff", "object/creature/player/sullustan_female.iff", "object/creature/player/trandoshan_male.iff", "object/creature/player/trandoshan_female.iff", "object/creature/player/twilek_male.iff", "object/creature/player/twilek_female.iff", "object/creature/player/wookiee_male.iff", "object/creature/player/wookiee_female.iff", "object/creature/player/zabrak_male.iff", "object/creature/player/zabrak_female.iff", "object/mobile/vendor/aqualish_female.iff", "object/mobile/vendor/aqualish_male.iff", "object/mobile/vendor/bith_female.iff", "object/mobile/vendor/bith_male.iff", "object/mobile/vendor/bothan_female.iff", "object/mobile/vendor/bothan_male.iff", "object/mobile/vendor/devaronian_male.iff", "object/mobile/vendor/gran_male.iff", "object/mobile/vendor/human_female.iff", "object/mobile/vendor/human_male.iff", "object/mobile/vendor/ishi_tib_male.iff", "object/mobile/vendor/ithorian_female.iff", "object/mobile/vendor/ithorian_male.iff", "object/mobile/vendor/moncal_female.iff", "object/mobile/vendor/moncal_male.iff", "object/mobile/vendor/nikto_male.iff", "object/mobile/vendor/quarren_male.iff", "object/mobile/vendor/rodian_female.iff", "object/mobile/vendor/rodian_male.iff", "object/mobile/vendor/sullustan_female.iff", "object/mobile/vendor/sullustan_male.iff", "object/mobile/vendor/trandoshan_female.iff", "object/mobile/vendor/trandoshan_male.iff", "object/mobile/vendor/twilek_female.iff", "object/mobile/vendor/twilek_male.iff", "object/mobile/vendor/weequay_male.iff", "object/mobile/vendor/wookiee_female.iff", "object/mobile/vendor/wookiee_male.iff", "object/mobile/vendor/zabrak_female.iff", "object/mobile/vendor/zabrak_male.iff" }, numberExperimentalProperties = {1, 1, 1, 1}, experimentalProperties = {"XX", "XX", "XX", "XX"}, experimentalWeights = {1, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "null", "null"}, experimentalSubGroupTitles = {"null", "null", "sockets", "hitpoints"}, experimentalMin = {0, 0, 0, 1000}, experimentalMax = {0, 0, 0, 1000}, experimentalPrecision = {0, 0, 0, 0}, experimentalCombineType = {0, 0, 4, 4}, } ObjectTemplates:addTemplate(object_tangible_wearables_belt_belt_s18, "object/tangible/wearables/belt/belt_s18.iff")
agpl-3.0
hiranotaka/vlc-arib
share/lua/playlist/anevia_streams.lua
112
3664
--[[ $Id$ Parse list of available streams on Anevia Toucan servers. The URI http://ipaddress:554/list_streams.idp describes a list of available streams on the server. Copyright © 2009 M2X BV Authors: Jean-Paul Saman <jpsaman@videolan.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. --]] -- Probe function. function probe() return vlc.access == "http" and string.match( vlc.path, "list_streams.idp" ) end -- Parse function. function parse() p = {} _,_,server = string.find( vlc.path, "(.*)/list_streams.idp" ) while true do line = vlc.readline() if not line then break end if string.match( line, "<streams[-]list> </stream[-]list>" ) then break elseif string.match( line, "<streams[-]list xmlns=\"(.*)\">" ) then while true do line = vlc.readline() if not line then break end if string.match( line, "<streamer name=\"(.*)\"> </streamer>" ) then break; elseif string.match( line, "<streamer name=\"(.*)\">" ) then _,_,streamer = string.find( line, "name=\"(.*)\"" ) while true do line = vlc.readline() if not line then break end -- ignore <host name=".." /> tags -- ignore <port number=".." /> tags if string.match( line, "<input name=\"(.*)\">" ) then _,_,path = string.find( line, "name=\"(.*)\"" ) while true do line = vlc.readline() if not line then break end if string.match( line, "<stream id=\"(.*)\" />" ) then _,_,media = string.find( line, "id=\"(.*)\"" ) video = "rtsp://" .. tostring(server) .. "/" .. tostring(path) .. "/" .. tostring(media) vlc.msg.dbg( "adding to playlist " .. tostring(video) ) table.insert( p, { path = video; name = media, url = video } ) end -- end of input tag found if string.match( line, "</input>" ) then break end end end end if not line then break end -- end of streamer tag found if string.match( line, "</streamer>" ) then break end end if not line then break end -- end of streams-list tag found if string.match( line, "</streams-list>" ) then break end end end end return p end
gpl-2.0
AndyClausen/PNRP_HazG
postnukerp/Gamemode/items/melee_code/weapon_other/weapon_turretprog.lua
1
1359
local ITEM = {} local WEAPON = {} ITEM.ID = "wep_turretprog" ITEM.Name = "L.O.S.T. Turret Programmer" ITEM.ClassSpawn = "Science" ITEM.Scrap = 40 ITEM.Small_Parts = 200 ITEM.Chemicals = 80 ITEM.Chance = 100 ITEM.Info = "An IFF programmer for turrets." ITEM.Type = "weapon" ITEM.Remove = true ITEM.Energy = 0 ITEM.Ent = "weapon_turretprog" ITEM.Model = "models/stalker/item/handhelds/mini_pda.mdl" ITEM.Icon ="models/stalker/item/handhelds/mini_pda.mdl" ITEM.Script = "" ITEM.Weight = 2 WEAPON.ID = ITEM.ID WEAPON.AmmoType = "none" function ITEM.ToolCheck( p ) -- This one returns required items. return {["intm_elecboard"]=4} end function ITEM.Use( ply ) local WepName = "weapon_turretprog" local gotWep = false for k, v in pairs(ply:GetWeapons()) do if v:GetClass() == WepName then gotWep = true end end if gotWep == false then ply:Give(WepName) -- ply:GetWeapon(WepName):SetClip1(0) return true else ply:ChatPrint("Weapon already equipped.") return false end end function ITEM.Create( ply, class, pos ) local ent = ents.Create("ent_weapon") --ent:SetNetworkedInt("Ammo", self.Energy) ent:SetNWString("WepClass", ITEM.Ent) ent:SetModel(ITEM.Model) ent:SetAngles(Angle(0,0,0)) ent:SetPos(pos) ent:Spawn() return ent end PNRP.AddItem(ITEM) PNRP.AddWeapon(WEAPON)
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_eisley_officer_quarren_male_01.lua
3
2268
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_eisley_officer_quarren_male_01 = object_mobile_shared_dressed_eisley_officer_quarren_male_01:new { } ObjectTemplates:addTemplate(object_mobile_dressed_eisley_officer_quarren_male_01, "object/mobile/dressed_eisley_officer_quarren_male_01.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/ship/corvette_interior.lua
3
2176
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_ship_corvette_interior = object_ship_shared_corvette_interior:new { } ObjectTemplates:addTemplate(object_ship_corvette_interior, "object/ship/corvette_interior.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/weapon/melee/sword/crafted_saber/sword_lightsaber_s1_training.lua
1
6269
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_weapon_melee_sword_crafted_saber_sword_lightsaber_s1_training = object_weapon_melee_sword_crafted_saber_shared_sword_lightsaber_s1_training:new { playerRaces = { "object/creature/player/bothan_male.iff", "object/creature/player/bothan_female.iff", "object/creature/player/human_male.iff", "object/creature/player/human_female.iff", "object/creature/player/ithorian_male.iff", "object/creature/player/ithorian_female.iff", "object/creature/player/moncal_male.iff", "object/creature/player/moncal_female.iff", "object/creature/player/rodian_male.iff", "object/creature/player/rodian_female.iff", "object/creature/player/sullustan_male.iff", "object/creature/player/sullustan_female.iff", "object/creature/player/trandoshan_male.iff", "object/creature/player/trandoshan_female.iff", "object/creature/player/twilek_male.iff", "object/creature/player/twilek_female.iff", "object/creature/player/wookiee_male.iff", "object/creature/player/wookiee_female.iff", "object/creature/player/zabrak_male.iff", "object/creature/player/zabrak_female.iff" }, -- RANGEDATTACK, MELEEATTACK, FORCEATTACK, TRAPATTACK, GRENADEATTACK, HEAVYACIDBEAMATTACK, -- HEAVYLIGHTNINGBEAMATTACK, HEAVYPARTICLEBEAMATTACK, HEAVYROCKETLAUNCHERATTACK, HEAVYLAUNCHERATTACK attackType = MELEEATTACK, -- ENERGY, KINETIC, ELECTRICITY, STUN, BLAST, HEAT, COLD, ACID, FORCE, LIGHTSABER damageType = LIGHTSABER, -- NONE, LIGHT, MEDIUM, HEAVY armorPiercing = MEDIUM, -- combat_rangedspecialize_bactarifle, combat_rangedspecialize_rifle, combat_rangedspecialize_pistol, combat_rangedspecialize_heavy, combat_rangedspecialize_carbine -- combat_meleespecialize_unarmed, combat_meleespecialize_twohand, combat_meleespecialize_polearm, combat_meleespecialize_onehand, combat_general, -- combat_meleespecialize_twohandlightsaber, combat_meleespecialize_polearmlightsaber, jedi_general xpType = "jedi_general", -- See http://www.ocdsoft.com/files/certifications.xls certificationsRequired = { "cert_onehandlightsaber_training" }, -- See http://www.ocdsoft.com/files/accuracy.xls creatureAccuracyModifiers = { "onehandlightsaber_accuracy" }, -- See http://www.ocdsoft.com/files/defense.xls defenderDefenseModifiers = { "melee_defense" }, -- Leave as "dodge" for now, may have additions later defenderSecondaryDefenseModifiers = { "saber_block" }, -- See http://www.ocdsoft.com/files/speed.xls speedModifiers = { "onehandlightsaber_speed" }, -- Leave blank for now damageModifiers = { }, defenderToughnessModifiers = { "lightsaber_toughness" }, -- The values below are the default values. To be used for blue frog objects primarily healthAttackCost = 20, actionAttackCost = 35, mindAttackCost = 40, forceCost = 15, pointBlankRange = 0, pointBlankAccuracy = 20, idealRange = 3, idealAccuracy = 15, maxRange = 5, maxRangeAccuracy = 5, minDamage = 50, maxDamage = 130, attackSpeed = 4.8, woundsRatio = 6, defenderToughnessModifiers = { "lightsaber_toughness" }, noTrade = 1, childObjects = { {templateFile = "object/tangible/inventory/lightsaber_inventory_training.iff", x = 0, z = 0, y = 0, ox = 0, oy = 0, oz = 0, ow = 0, cellid = -1, containmentType = 4} }, numberExperimentalProperties = {1, 1, 2, 2, 2, 2, 2, 1, 1, 1}, experimentalProperties = {"XX", "XX", "CD", "OQ", "CD", "OQ", "CD", "OQ", "SR", "UT", "CD", "OQ", "OQ", "OQ", "OQ"}, experimentalWeights = {1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "expDamage", "expDamage", "expDamage", "expDamage", "expEffeciency", "expEffeciency", "expEffeciency", "expEffeciency"}, experimentalSubGroupTitles = {"null", "null", "mindamage", "maxdamage", "attackspeed", "woundchance", "forcecost", "attackhealthcost", "attackactioncost", "attackmindcost"}, experimentalMin = {0, 0, 50, 130, 4.8, 2, 18, 20, 35, 40}, experimentalMax = {0, 0, 70, 170, 4.5, 10, 15, 15, 25, 25}, experimentalPrecision = {0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, experimentalCombineType = {0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, } ObjectTemplates:addTemplate(object_weapon_melee_sword_crafted_saber_sword_lightsaber_s1_training, "object/weapon/melee/sword/crafted_saber/sword_lightsaber_s1_training.iff")
agpl-3.0
DailyShana/ygopro-scripts
c22318971.lua
3
2057
--一角獣の使い魔 function c22318971.initial_effect(c) --remove local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(22318971,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCondition(c22318971.condition) e1:SetCost(c22318971.cost) e1:SetTarget(c22318971.target) e1:SetOperation(c22318971.operation) c:RegisterEffect(e1) end function c22318971.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE) end function c22318971.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function c22318971.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() end Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) end function c22318971.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) e1:SetCountLimit(1) e1:SetCondition(c22318971.retcon) e1:SetOperation(c22318971.retop) Duel.RegisterEffect(e1,tp) local ac=Duel.GetFirstTarget() if ac:IsRelateToEffect(e) and ac:IsFaceup() then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MUST_ATTACK) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) ac:RegisterEffect(e2) end end end function c22318971.retcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp end function c22318971.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetOwner()) end
gpl-2.0
DailyShana/ygopro-scripts
c82542267.lua
6
1069
--墓掘りグール function c82542267.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c82542267.target) e1:SetOperation(c82542267.activate) c:RegisterEffect(e1) end function c82542267.filter(c) return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) end function c82542267.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c82542267.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c82542267.filter,tp,0,LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,c82542267.filter,tp,0,LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) end function c82542267.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) end
gpl-2.0
DailyShana/ygopro-scripts
c20174189.lua
5
1330
--ナチュル・バンブーシュート function c20174189.initial_effect(c) --mat check local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MATERIAL_CHECK) e1:SetValue(c20174189.valcheck) c:RegisterEffect(e1) --summon success local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCondition(c20174189.regcon) e2:SetOperation(c20174189.regop) c:RegisterEffect(e2) e2:SetLabelObject(e1) end function c20174189.valcheck(e,c) local g=c:GetMaterial() local flag=0 if g:IsExists(Card.IsSetCard,1,nil,0x2a) then flag=1 end e:SetLabel(flag) end function c20174189.regcon(e,tp,eg,ep,ev,re,r,rp) return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and e:GetLabelObject():GetLabel()~=0 end function c20174189.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(c20174189.aclimit) e1:SetReset(RESET_EVENT+0x1fe0000) e:GetHandler():RegisterEffect(e1) end function c20174189.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/lair/worrt/lair_worrt.lua
2
2260
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_lair_worrt_lair_worrt = object_tangible_lair_worrt_shared_lair_worrt:new { objectMenuComponent = {"cpp", "LairMenuComponent"}, } ObjectTemplates:addTemplate(object_tangible_lair_worrt_lair_worrt, "object/tangible/lair/worrt/lair_worrt.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/clothing/clothing_hat_casual_02.lua
2
3395
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_clothing_clothing_hat_casual_02 = object_draft_schematic_clothing_shared_clothing_hat_casual_02:new { templateType = DRAFTSCHEMATIC, customObjectName = "Warm Hat", craftingToolTab = 8, -- (See DraftSchemticImplementation.h) complexity = 19, size = 3, xpType = "crafting_clothing_general", xp = 60, assemblySkill = "clothing_assembly", experimentingSkill = "clothing_experimentation", customizationSkill = "clothing_customization", customizationOptions = {2, 1}, customizationStringNames = {"/private/index_color_1", "/private/index_color_2"}, customizationDefaults = {133, 112}, ingredientTemplateNames = {"craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n"}, ingredientTitleNames = {"shell", "binding_and_weatherproofing", "liner"}, ingredientSlotType = {1, 0, 1}, resourceTypes = {"object/tangible/component/clothing/shared_synthetic_cloth.iff", "petrochem_inert", "object/tangible/component/clothing/shared_synthetic_cloth.iff"}, resourceQuantities = {1, 25, 2}, contribution = {100, 100, 100}, targetTemplate = "object/tangible/wearables/hat/hat_s02.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_clothing_clothing_hat_casual_02, "object/draft_schematic/clothing/clothing_hat_casual_02.iff")
agpl-3.0
sjznxd/lc-20130116
modules/niu/luasrc/model/cbi/niu/network/etherwan.lua
50
5482
--[[ LuCI - Lua Configuration Interface Copyright 2009 Steven Barth <steven@midlink.org> Copyright 2009 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id$ ]]-- local fs = require "nixio.fs" local has_ipv6 = fs.access("/proc/net/ipv6_route") local has_pptp = fs.access("/usr/sbin/pptp") local has_pppd = fs.access("/usr/sbin/pppd") local has_pppoe = fs.glob("/usr/lib/pppd/*/rp-pppoe.so")() local has_pppoa = fs.glob("/usr/lib/pppd/*/pppoatm.so")() m = Map("network", "Configure Ethernet Adapter for Internet Connection") s = m:section(NamedSection, "wan", "interface") s.addremove = false s:tab("general", translate("General Settings")) s:tab("expert", translate("Expert Settings")) p = s:taboption("general", ListValue, "proto", translate("Connection Protocol")) p.override_scheme = true p.default = "dhcp" p:value("dhcp", translate("Cable / Ethernet / DHCP")) if has_pppoe then p:value("pppoe", "DSL / PPPoE") end if has_pppoa then p:value("pppoa", "PPPoA") end if has_pptp then p:value("pptp", "PPTP") end p:value("static", translate("Static Ethernet")) ipaddr = s:taboption("general", Value, "ipaddr", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address")) ipaddr.rmempty = true ipaddr:depends("proto", "static") nm = s:taboption("general", Value, "netmask", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Netmask")) nm.rmempty = true nm:depends("proto", "static") nm:value("255.255.255.0") nm:value("255.255.0.0") nm:value("255.0.0.0") gw = s:taboption("general", Value, "gateway", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Gateway")) gw:depends("proto", "static") gw.rmempty = true bcast = s:taboption("expert", Value, "bcast", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Broadcast")) bcast:depends("proto", "static") if has_ipv6 then ip6addr = s:taboption("expert", Value, "ip6addr", translate("<abbr title=\"Internet Protocol Version 6\">IPv6</abbr>-Address"), translate("<abbr title=\"Classless Inter-Domain Routing\">CIDR</abbr>-Notation: address/prefix")) ip6addr:depends("proto", "static") ip6gw = s:taboption("expert", Value, "ip6gw", translate("<abbr title=\"Internet Protocol Version 6\">IPv6</abbr>-Gateway")) ip6gw:depends("proto", "static") end dns = s:taboption("expert", Value, "dns", translate("<abbr title=\"Domain Name System\">DNS</abbr>-Server")) dns:depends("peerdns", "") mtu = s:taboption("expert", Value, "mtu", "MTU") mtu.isinteger = true mac = s:taboption("expert", Value, "macaddr", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address")) srv = s:taboption("general", Value, "server", translate("<abbr title=\"Point-to-Point Tunneling Protocol\">PPTP</abbr>-Server")) srv:depends("proto", "pptp") srv.rmempty = true if has_pppd or has_pppoe or has_pppoa or has_pptp then user = s:taboption("general", Value, "username", translate("Username")) user.rmempty = true user:depends("proto", "pptp") user:depends("proto", "pppoe") user:depends("proto", "pppoa") pass = s:taboption("general", Value, "password", translate("Password")) pass.rmempty = true pass.password = true pass:depends("proto", "pptp") pass:depends("proto", "pppoe") pass:depends("proto", "pppoa") ka = s:taboption("expert", Value, "keepalive", translate("Keep-Alive"), translate("Number of failed connection tests to initiate automatic reconnect") ) ka.default = "5" ka:depends("proto", "pptp") ka:depends("proto", "pppoe") ka:depends("proto", "pppoa") demand = s:taboption("expert", Value, "demand", translate("Automatic Disconnect"), translate("Time (in seconds) after which an unused connection will be closed") ) demand:depends("proto", "pptp") demand:depends("proto", "pppoe") demand:depends("proto", "pppoa") end if has_pppoa then encaps = s:taboption("expert", ListValue, "encaps", translate("PPPoA Encapsulation")) encaps:depends("proto", "pppoa") encaps:value("", translate("-- Please choose --")) encaps:value("vc", "VC") encaps:value("llc", "LLC") vpi = s:taboption("expert", Value, "vpi", "VPI") vpi:depends("proto", "pppoa") vci = s:taboption("expert", Value, "vci", "VCI") vci:depends("proto", "pppoa") end if has_pptp or has_pppd or has_pppoe or has_pppoa or has_3g then --[[ defaultroute = s:taboption("expert", Flag, "defaultroute", translate("Replace default route"), translate("Let pppd replace the current default route to use the PPP interface after successful connect") ) defaultroute:depends("proto", "pppoa") defaultroute:depends("proto", "pppoe") defaultroute:depends("proto", "pptp") defaultroute.rmempty = false function defaultroute.cfgvalue(...) return ( AbstractValue.cfgvalue(...) or '1' ) end ]] peerdns = s:taboption("expert", Flag, "peerdns", translate("Use peer DNS"), translate("Configure the local DNS server to use the name servers adverticed by the PPP peer") ) peerdns:depends("proto", "pppoa") peerdns:depends("proto", "pppoe") peerdns:depends("proto", "pptp") peerdns.rmempty = false peerdns.default = "1" if has_ipv6 then ipv6 = s:taboption("expert", Flag, "ipv6", translate("Enable IPv6 on PPP link") ) ipv6:depends("proto", "pppoa") ipv6:depends("proto", "pppoe") ipv6:depends("proto", "pptp") end end return m
apache-2.0
raposalorx/Critology
Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
1
8861
--[[ --Multiline Editbox Widget, Originally by bam --]] local assert, error, ipairs, next, pairs, select, tonumber, tostring, type, unpack, pcall, xpcall = assert, error, ipairs, next, pairs, select, tonumber, tostring, type, unpack, pcall, xpcall local getmetatable, setmetatable, rawequal, rawget, rawset, getfenv, setfenv, loadstring, debugstack = getmetatable, setmetatable, rawequal, rawget, rawset, getfenv, setfenv, loadstring, debugstack local math, string, table = math, string, table local find, format, gmatch, gsub, tolower, match, toupper, join, split, trim = string.find, string.format, string.gmatch, string.gsub, string.lower, string.match, string.upper, string.join, string.split, string.trim local concat, insert, maxn, remove, sort = table.concat, table.insert, table.maxn, table.remove, table.sort local max, min, abs, ceil, floor = math.max, math.min, math.abs, math.ceil, math.floor local LibStub = assert(LibStub) local ChatFontNormal = ChatFontNormal local ClearCursor = ClearCursor local CreateFrame = CreateFrame local GetCursorInfo = GetCursorInfo local GetSpellName = GetSpellName local UIParent = UIParent local UISpecialFrames = UISpecialFrames -- No global variables after this! local _G = getfenv() local AceGUI = LibStub("AceGUI-3.0") local Version = 4 --------------------- -- Common Elements -- --------------------- local FrameBackdrop = { bgFile="Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 32, edgeSize = 32, insets = { left = 8, right = 8, top = 8, bottom = 8 } } local PaneBackdrop = { bgFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 3, right = 3, top = 5, bottom = 3 } } local ControlBackdrop = { bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 3, right = 3, top = 3, bottom = 3 } } -------------------------- -- Edit box -- -------------------------- --[[ Events : OnTextChanged OnEnterPressed ]] do local Type = "MultiLineEditBox" local MultiLineEditBox = {} local function EditBox_OnEnterPressed(this) local self = this.obj local value = this:GetText() local cancel = self:Fire("OnEnterPressed",value) if not cancel then self.button:Disable() end end local function Button_OnClick(this) local editbox = this.obj.editbox editbox:ClearFocus() EditBox_OnEnterPressed(editbox) end local function EditBox_OnReceiveDrag(this) local self = this.obj local type, id, info = GetCursorInfo() if type == "item" then self:SetText(info) self:Fire("OnEnterPressed",info) ClearCursor() elseif type == "spell" then local name, rank = GetSpellName(id, info) if rank and rank:match("%d") then name = name.."("..rank..")" end self:SetText(name) self:Fire("OnEnterPressed",name) ClearCursor() end self.button:Disable() end function MultiLineEditBox:Acquire() self:SetDisabled(false) self:ShowButton(true) end function MultiLineEditBox:Release() self.frame:ClearAllPoints() self.frame:Hide() self:SetDisabled(false) end function MultiLineEditBox:SetDisabled(disabled) self.disabled = disabled if disabled then self.editbox:EnableMouse(false) self.editbox:ClearFocus() self.editbox:SetTextColor(0.5, 0.5, 0.5) else self.editbox:EnableMouse(true) self.editbox:SetTextColor(1, 1, 1) end end function MultiLineEditBox:SetText(text) text = text or "" local editbox = self.editbox local oldText = editbox:GetText() local dummy = format(" %s", text) self.lasttext = dummy -- prevents OnTextChanged from firing editbox:SetText(dummy) editbox:HighlightText(0, 1) self.lasttext = oldText editbox:Insert("") end function MultiLineEditBox:SetLabel(text) if (text or "") == "" then self.backdrop:SetPoint("TOPLEFT",self.frame,"TOPLEFT",0,0) self.label:Hide() self.label:SetText("") else self.backdrop:SetPoint("TOPLEFT",self.frame,"TOPLEFT",0,-20) self.label:Show() self.label:SetText(text) end end function MultiLineEditBox:GetText() return self.editbox:GetText() end function MultiLineEditBox:ShowButton(show) if show then self.backdrop:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",0,22) self.button:Show() else self.backdrop:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",0,0) self.button:Hide() end end local function Constructor() local frame = CreateFrame("Frame", nil, UIParent) local backdrop = CreateFrame("Frame", nil, frame) local self = {} for k, v in pairs(MultiLineEditBox) do self[k] = v end self.type = Type self.frame = frame self.backdrop = backdrop frame.obj = self backdrop:SetBackdrop(ControlBackdrop) backdrop:SetBackdropColor(0, 0, 0) backdrop:SetBackdropBorderColor(0.4, 0.4, 0.4) backdrop:SetPoint("TOPLEFT",frame,"TOPLEFT",0, -20) backdrop:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,22) local scrollframe = CreateFrame("ScrollFrame", format("%s@%s@%s", Type, "ScrollFrame", tostring(self)), backdrop, "UIPanelScrollFrameTemplate") scrollframe:SetPoint("TOPLEFT", 5, -6) scrollframe:SetPoint("BOTTOMRIGHT", -28, 6) scrollframe.obj = self local scrollchild = CreateFrame("Frame", nil, scrollframe) scrollframe:SetScrollChild(scrollchild) scrollchild:SetHeight(2) scrollchild:SetWidth(2) local label = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight") label:SetPoint("TOPLEFT",frame,"TOPLEFT",14,0) label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",-14,0) label:SetJustifyH("LEFT") label:SetHeight(18) self.label = label local editbox = CreateFrame("EditBox", nil, scrollchild) self.editbox = editbox editbox.obj = self editbox:SetPoint("TOPLEFT") editbox:SetHeight(50) editbox:SetWidth(50) editbox:SetMultiLine(true) -- editbox:SetMaxLetters(7500) editbox:SetTextInsets(5, 5, 3, 3) editbox:EnableMouse(true) editbox:SetAutoFocus(false) editbox:SetFontObject(ChatFontNormal) local button = CreateFrame("Button",nil,scrollframe,"UIPanelButtonTemplate") button:SetWidth(80) button:SetHeight(20) button:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,2) button:SetText("Apply") button:SetScript("OnClick", Button_OnClick) button:Disable() button:Hide() self.button = button button.obj = self scrollframe:EnableMouse(true) scrollframe:SetScript("OnMouseUp", function() editbox:SetFocus() end) scrollframe:SetScript("OnEnter", function(this) this.obj:Fire("OnEnter") end) scrollframe:SetScript("OnLeave", function(this) this.obj:Fire("OnLeave") end) editbox:SetScript("OnEnter", function(this) this.obj:Fire("OnEnter") end) editbox:SetScript("OnLeave", function(this) this.obj:Fire("OnLeave") end) local function FixSize() scrollchild:SetHeight(scrollframe:GetHeight()) scrollchild:SetWidth(scrollframe:GetWidth()) editbox:SetWidth(scrollframe:GetWidth()) end scrollframe:SetScript("OnShow", FixSize) scrollframe:SetScript("OnSizeChanged", FixSize) editbox:SetScript("OnEscapePressed", editbox.ClearFocus) editbox:SetScript("OnTextChanged", function(_, ...) scrollframe:UpdateScrollChildRect() local value = editbox:GetText() if value ~= self.lasttext then self:Fire("OnTextChanged", value) self.lasttext = value self.button:Enable() end end) editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag) editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag) do local cursorOffset, cursorHeight local idleTime local function FixScroll(_, elapsed) if cursorOffset and cursorHeight then idleTime = 0 local height = scrollframe:GetHeight() local range = scrollframe:GetVerticalScrollRange() local scroll = scrollframe:GetVerticalScroll() local size = height + range cursorOffset = -cursorOffset while cursorOffset < scroll do scroll = scroll - (height / 2) if scroll < 0 then scroll = 0 end scrollframe:SetVerticalScroll(scroll) end while cursorOffset + cursorHeight > scroll + height and scroll < range do scroll = scroll + (height / 2) if scroll > range then scroll = range end scrollframe:SetVerticalScroll(scroll) end elseif not idleTime or idleTime > 2 then frame:SetScript("OnUpdate", nil) idleTime = nil else idleTime = idleTime + elapsed end cursorOffset = nil end editbox:SetScript("OnCursorChanged", function(_, x, y, w, h) cursorOffset, cursorHeight = y, h if not idleTime then frame:SetScript("OnUpdate", FixScroll) end end) end AceGUI:RegisterAsWidget(self) return self end AceGUI:RegisterWidgetType(Type, Constructor, Version) end
bsd-3-clause
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/torton_hue.lua
3
2156
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_torton_hue = object_mobile_shared_torton_hue:new { } ObjectTemplates:addTemplate(object_mobile_torton_hue, "object/mobile/torton_hue.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/thug/criminal.lua
1
1608
criminal = Creature:new { objectName = "@mob/creature_names:criminal", randomNameType = NAME_GENERIC_TAG, socialGroup = "thug", faction = "thug", level = 7, chanceHit = 0.26, damageMin = 55, damageMax = 65, baseXp = 187, baseHAM = 270, baseHAMmax = 330, armor = 0, resists = {0,0,0,0,0,0,0,-1,-1}, meatType = "", meatAmount = 0, hideType = "", hideAmount = 0, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0, ferocity = 0, pvpBitmask = ATTACKABLE, creatureBitmask = PACK, optionsBitmask = 136, diet = HERBIVORE, templates = {"object/mobile/dressed_criminal_thug_human_male_01.iff", "object/mobile/dressed_criminal_thug_bothan_female_01.iff", "object/mobile/dressed_goon_twk_male_01.iff", "object/mobile/dressed_robber_twk_female_01.iff", "object/mobile/dressed_goon_twk_female_01.iff", "object/mobile/dressed_robber_human_female_01.iff", "object/mobile/dressed_villain_trandoshan_male_01.iff", "object/mobile/dressed_criminal_thug_bothan_male_01.iff", "object/mobile/dressed_villain_trandoshan_female_01.iff" }, lootGroups = { { groups = { {group = "junk", chance = 4000000}, {group = "wearables_common", chance = 2000000}, {group = "pistols", chance = 1000000}, {group = "tailor_components", chance = 1500000}, {group = "loot_kit_parts", chance = 1500000} } } }, weapons = {"pirate_weapons_light"}, conversationTemplate = "generic_criminal_mission_giver_convotemplate", reactionStf = "@npc_reaction/slang", attacks = merge(marksmannovice,brawlernovice) } CreatureTemplates:addCreatureTemplate(criminal, "criminal")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Inner_Horutoto_Ruins/npcs/_5cp.lua
5
2222
----------------------------------- -- Area: Inner Horutoto Ruins -- NPC: _5cp (Magical Gizmo) #1 -- Involved In Mission: The Horutoto Ruins Experiment ----------------------------------- package.loaded["scripts/zones/Inner_Horutoto_Ruins/TextIDs"] = nil; ----------------------------------- require("scripts/globals/missions"); require("scripts/zones/Inner_Horutoto_Ruins/TextIDs"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) -- The Magical Gizmo Number, this number will be compared to the random -- value created by the mission The Horutoto Ruins Experiment, when you -- reach the Gizmo Door and have the cutscene local magical_gizmo_no = 1; -- of the 6 -- Check if we are on Windurst Mission 1-1 if (player:getCurrentMission(WINDURST) == THE_HORUTOTO_RUINS_EXPERIMENT and player:getVar("MissionStatus") == 2) then -- Check if we found the correct Magical Gizmo or not if (player:getVar("MissionStatus_rv") == magical_gizmo_no) then player:startEvent(48); else if (player:getVar("MissionStatus_op1") == 2) then -- We've already examined this player:messageSpecial(EXAMINED_RECEPTACLE); else -- Opened the wrong one player:startEvent(49); end end end return 1; end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); -- If we just finished the cutscene for Windurst Mission 1-1 -- The cutscene that we opened the correct Magical Gizmo if (csid == 48) then player:setVar("MissionStatus",3); player:setVar("MissionStatus_rv", 0); player:addKeyItem(CRACKED_MANA_ORBS); player:messageSpecial(KEYITEM_OBTAINED,CRACKED_MANA_ORBS); elseif (csid == 49) then -- Opened the wrong one player:setVar("MissionStatus_op1", 2); -- Give the message that thsi orb is not broken player:messageSpecial(NOT_BROKEN_ORB); end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/managers/jedi/village/tests/glowing_Test_disabled.lua
2
10618
local DirectorManagerMocks = require("screenplays.mocks.director_manager_mocks") local Glowing = require("managers.jedi.village.glowing") local OldManEncounterMocks = require("managers.jedi.village.mocks.old_man_encounter_mocks") local VillageJediManagerCommonMocks = require("managers.jedi.village.mocks.village_jedi_manager_common_mocks") local testGlowing = Glowing:new {} describe("Village Jedi Manager - Glowing", function() local pCreatureObject = { "creatureObjectPointer" } local pPlayerObject = { "playerObjectPointer" } local creatureObject local playerObject setup(function() DirectorManagerMocks.mocks.setup() VillageJediManagerCommonMocks.mocks.setup() OldManEncounterMocks.mocks.setup() end) teardown(function() DirectorManagerMocks.mocks.teardown() VillageJediManagerCommonMocks.mocks.teardown() OldManEncounterMocks.mocks.teardown() end) before_each(function() DirectorManagerMocks.mocks.before_each() VillageJediManagerCommonMocks.mocks.before_each() OldManEncounterMocks.mocks.before_each() creatureObject = {} creatureObject.getPlayerObject = spy.new(function() return pPlayerObject end) creatureObject.sendSystemMessage = spy.new(function() end) DirectorManagerMocks.creatureObjects[pCreatureObject] = creatureObject playerObject = {} playerObject.hasBadge = spy.new(function() return false end) DirectorManagerMocks.playerObjects[pPlayerObject] = playerObject end) describe("Interface functions", function() describe("checkForceStatusCommand", function() it("Should call getJediProgressionStatus and send the appropriate string id to the player", function() local realGetJediProgressionStatus = testGlowing.getJediProgressionStatus testGlowing.getJediProgressionStatus = spy.new(function() return 2 end) testGlowing:checkForceStatusCommand(pCreatureObject) assert.spy(testGlowing.getJediProgressionStatus).was.called_with(testGlowing, pCreatureObject) assert.spy(creatureObject.sendSystemMessage).was.called_with(creatureObject, "@jedi_spam:fs_progress_2") testGlowing.getJediProgressionStatus = realGetJediProgressionStatus end) end) describe("onPlayerLoggedIn", function() local realIsGlowing local realRegisterObservers setup(function() realIsGlowing = testGlowing.isGlowing realRegisterObservers = testGlowing.registerObservers end) teardown(function() testGlowing.isGlowing = realIsGlowing testGlowing.registerObservers = realRegisterObservers end) before_each(function() testGlowing.isGlowing = spy.new(function() return false end) testGlowing.registerObservers = spy.new(function() end) end) describe("When called with a player as argument", function() it("Should check if the player is glowing or not.", function() testGlowing:onPlayerLoggedIn(pCreatureObject) assert.spy(testGlowing.isGlowing).was.called_with(testGlowing, pCreatureObject) end) describe("and the player is glowing", function() it("Should not register observers on the player.", function() testGlowing.isGlowing = spy.new(function() return true end) testGlowing:onPlayerLoggedIn(pCreatureObject) assert.spy(testGlowing.registerObservers).was.not_called() end) end) describe("and the player is not glowing", function() it("Should register observers on the player.", function() testGlowing:onPlayerLoggedIn(pCreatureObject) assert.spy(testGlowing.registerObservers).was.called_with(testGlowing, pCreatureObject) end) end) end) end) end) describe("Private functions", function() describe("countBadgesInListToUpperLimit", function() local list = { 1, 2, 3, 4 } local currentListItem = 0 before_each(function() currentListItem = 0 end) it("Should check if the player has each badge number in the list", function() playerObject.hasBadge = spy.new(function(playerObject, badgeNumber) currentListItem = currentListItem + 1 return badgeNumber == list[currentListItem] end) assert.is.same(testGlowing:countBadgesInListToUpperLimit(pCreatureObject, list, 10), 4) assert.spy(playerObject.hasBadge).was.called(4) end) it("Should return the correct number of badges that the player has", function() playerObject.hasBadge = spy.new(function(playerObject, badgeNumber) return badgeNumber < 3 end) assert.is.same(testGlowing:countBadgesInListToUpperLimit(pCreatureObject, list, 10), 2) assert.spy(playerObject.hasBadge).was.called(4) end) it("Should abort the counting early if upper limit is reached", function() playerObject.hasBadge = spy.new(function(playerObject, badgeNumber) return badgeNumber < 4 end) assert.is.same(testGlowing:countBadgesInListToUpperLimit(pCreatureObject, list, 2), 2) assert.spy(playerObject.hasBadge).was.called(2) end) end) describe("countBadges", function() local realCountBadgesInListToUpperLimit setup(function() realCountBadgesInListToUpperLimit = testGlowing.countBadgesInListToUpperLimit end) teardown(function() testGlowing.countBadgesInListToUpperLimit = realCountBadgesInListToUpperLimit end) it("Should call the countBadgesInListToUpperLimit five times with correct arguments", function() local argumentList = { { PROFESSIONBADGES, 1, false }, { JEDIBADGES, 3, false }, { CONTENTBADGES, 5, false }, { DIFFICULTBADGES, 2, false }, { EASYBADGES, 5, false } } testGlowing.countBadgesInListToUpperLimit = spy.new(function(self, pCO, l, n) for i = 1, table.getn(argumentList), 1 do if argumentList[i][1] == l and argumentList[i][2] == n and pCO == pCreatureObject then argumentList[i][3] = true end end return 0 end) assert.is.same(testGlowing:countBadges(pCreatureObject), 0) assert.is.same(argumentList[1][3] and argumentList[2][3] and argumentList[3][3] and argumentList[4][3] and argumentList[5][3], true) assert.spy(testGlowing.countBadgesInListToUpperLimit).was.called(5) end) it("Should sum the return values from countBadgesInListToUpperLimit", function() local returnList = { 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 3, 6, 7 } local returnNo = 0 testGlowing.countBadgesInListToUpperLimit = spy.new(function() returnNo = returnNo + 1 return returnList[returnNo] end) assert.is.same(testGlowing:countBadges(pCreatureObject), 5) assert.is.same(testGlowing:countBadges(pCreatureObject), 10) assert.is.same(testGlowing:countBadges(pCreatureObject), 15) assert.is.same(testGlowing:countBadges(pCreatureObject), 23) end) end) describe("getJediProgressionStatus", function() it("Should return linear values between 0 and 5 depending on the number of counted badges", function() local returnValue = -1 local realCountBadges = testGlowing.countBadges testGlowing.countBadges = spy.new(function() returnValue = returnValue + 1 return returnValue end) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 0) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 0) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 0) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 0) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 1) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 1) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 1) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 2) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 2) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 2) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 3) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 3) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 3) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 4) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 4) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 4) assert.is.same(testGlowing:getJediProgressionStatus(pCreatureObject), 5) assert.spy(testGlowing.countBadges).was.called(17) testGlowing.countBadges = realCountBadges end) end) describe("registerObservers", function() describe("When called with a player object", function() it("Should register an observer for the BADGEAWARDED event on the player.", function() testGlowing:registerObservers(pCreatureObject) assert.spy(createObserver).was.called_with(BADGEAWARDED, "Glowing", "badgeAwardedEventHandler", pCreatureObject) end) end) end) describe("isGlowing", function() local realCountBadges setup(function() realCountBadges = testGlowing.countBadges end) teardown(function() testGlowing.countBadges = realCountBadges end) before_each(function() testGlowing.countBadges = spy.new(function() return TOTALNUMBEROFBADGESREQUIRED end) end) describe("When called with a player as argument", function() it("Should count the number of badges the player has towards the jedi progression.", function() testGlowing:isGlowing(pCreatureObject) assert.spy(testGlowing.countBadges).was.called(1) end) describe("and the player has all the needed badges", function() before_each(function() testGlowing.countBadges = spy.new(function() return TOTALNUMBEROFBADGESREQUIRED end) end) it("Should set the village jedi progression screen play state glowing on the player.", function() testGlowing:isGlowing(pCreatureObject) assert.spy(VillageJediManagerCommonMocks.setJediProgressionScreenPlayState).was.called_with(pCreatureObject, VILLAGE_JEDI_PROGRESSION_GLOWING) end) it("Should start the old man encounter.", function() testGlowing:isGlowing(pCreatureObject) assert.spy(OldManEncounterMocks.start).was.called_with(OldManEncounterMocks, pCreatureObject) end) end) describe("and the player does not have all the needed badges", function() it("Should not start the old man encounter.", function() testGlowing.countBadges = spy.new(function() return TOTALNUMBEROFBADGESREQUIRED - 1 end) testGlowing:isGlowing(pCreatureObject) assert.spy(OldManEncounterMocks.start).was.not_called() end) end) end) end) end) end)
agpl-3.0
Whitechaser/darkstar
scripts/globals/abilities/tabula_rasa.lua
2
1129
----------------------------------- -- Ability: Tabula Rasa -- Optimizes both white and black magic capabilities while allowing charge-free stratagem use. -- Obtained: Scholar Level 1 -- Recast Time: 1:00:00 -- Duration: 0:03:00 ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); ----------------------------------- function onAbilityCheck(player,target,ability) return 0,0; end; function onUseAbility(player,target,ability) local regenbonus = 0; if (player:getMainJob() == JOBS.SCH and player:getMainLvl() >= 20) then regenbonus = 3 * math.floor((player:getMainLvl() - 10) / 10); end local helixbonus = 0; if (player:getMainJob() == JOBS.SCH and player:getMainLvl() >= 20) then helixbonus = math.floor(player:getMainLvl() / 4); end player:resetRecast(RECAST_ABILITY, 228); player:resetRecast(RECAST_ABILITY, 231); player:resetRecast(RECAST_ABILITY, 232); player:addStatusEffect(dsp.effects.TABULA_RASA,math.floor(helixbonus*1.5),0,180,0,math.floor(regenbonus*1.5)); return dsp.effects.TABULA_RASA; end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/player/player_guildhall_generic_style_01.lua
1
4863
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_building_player_player_guildhall_generic_style_01 = object_building_player_shared_player_guildhall_generic_style_01:new { lotSize = 5, baseMaintenanceRate = 12, allowedZones = {"corellia", "dantooine", "lok", "naboo", "rori", "talus", "tatooine"}, publicStructure = 0, constructionMarker = "object/building/player/construction/construction_player_guildhall_corellia_style_01.iff", length = 7, width = 8, skillMods = { {"private_medical_rating", 100}, {"private_buff_mind", 100}, {"private_med_battle_fatigue", 5} }, childObjects = { {templateFile = "object/tangible/sign/player/house_address.iff", x = 4.34, z = 3.4, y = 18.40, ox = 0, oy = 1, oz = 0, ow = 0, cellid = -1, containmentType = -1}, {templateFile = "object/tangible/terminal/terminal_player_structure.iff", x = 17.88, z= 2.75, y = 10.45, ox = 0, oy = 0.707107, oz = 0, ow = 0.707107, cellid = 7, containmentType = -1}, {templateFile = "object/tangible/terminal/terminal_elevator_up.iff", x = 0, z = -8.5, y = 13.5, ow = 0, ox = 0, oy = 1, oz = 0, cellid = 9, containmentType = -1}, {templateFile = "object/tangible/terminal/terminal_elevator_down.iff", x = 0, z = 2.75, y = 13.5, ow = 0, ox = 0, oy = 1, oz = 0, cellid = 9, containmentType = -1}, {templateFile = "object/tangible/terminal/terminal_guild.iff", x = -17.0, z = 2.75, y = 20, ow = 0, ox = 0, oy = 1, oz = 0, cellid = 6, containmentType = -1} }, shopSigns = { {templateFile = "object/tangible/sign/player/house_address.iff", x = 4.34, z = 3.4, y = 18.40, ox = 0, oy = 1, oz = 0, ow = 0, cellid = -1, containmentType = -1, requiredSkill = "", suiItem = "@player_structure:house_address"}, {templateFile = "object/tangible/sign/player/shop_sign_s01.iff", x = 4.34, z = 2.95, y = 19.25, ox = 0, oy = 0, oz = 0, ow = 1, cellid = -1, containmentType = -1, requiredSkill = "crafting_merchant_management_01", suiItem = "@player_structure:shop_sign1"}, {templateFile = "object/tangible/sign/player/shop_sign_s02.iff", x = 4.34, z = 2.95, y = 19.25, ox = 0, oy = 0, oz = 0, ow = 1, cellid = -1, containmentType = -1, requiredSkill = "crafting_merchant_management_02", suiItem = "@player_structure:shop_sign2"}, {templateFile = "object/tangible/sign/player/shop_sign_s03.iff", x = 4.34, z = 2.95, y = 19.25, ox = 0, oy = 0, oz = 0, ow = 1, cellid = -1, containmentType = -1, requiredSkill = "crafting_merchant_management_03", suiItem = "@player_structure:shop_sign3"}, {templateFile = "object/tangible/sign/player/shop_sign_s04.iff", x = 4.34, z = 2.95, y = 19.25, ox = 0, oy = 0, oz = 0, ow = 1, cellid = -1, containmentType = -1, requiredSkill = "crafting_merchant_management_04", suiItem = "@player_structure:shop_sign4"}, }, } ObjectTemplates:addTemplate(object_building_player_player_guildhall_generic_style_01, "object/building/player/player_guildhall_generic_style_01.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_death_watch_grey.lua
3
2212
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_death_watch_grey = object_mobile_shared_dressed_death_watch_grey:new { } ObjectTemplates:addTemplate(object_mobile_dressed_death_watch_grey, "object/mobile/dressed_death_watch_grey.iff")
agpl-3.0
KingRaptor/Zero-K
scripts/corrl.lua
2
5955
local base = piece 'base' local turret = piece 'turret' local lever = piece 'lever' local pod = piece 'pod' local l_poddoor = piece 'l_poddoor' local r_poddoor = piece 'r_poddoor' local base2 = piece 'base2' local door = piece 'door' local doorpist = piece 'doorpist' local arm = piece 'arm' local hand = piece 'hand' local bay = { { missile = piece 'm_1', exhaust = piece 'ex_1', backDoor = piece 'd_1', greenLight = piece 'lt_1g', redLight = piece 'lt_1r', fire = piece 'fire1', }, { missile = piece 'm_2', exhaust = piece 'ex_2', backDoor = piece 'd_2', greenLight = piece 'lt_2g', redLight = piece 'lt_2r', fire = piece 'fire2', }, { missile = piece 'm_3', exhaust = piece 'ex_3', backDoor = piece 'd_3', greenLight = piece 'lt_3g', redLight = piece 'lt_3r', fire = piece 'fire3', }, } include "constants.lua" local ammo, missile, missilespeed, mfront local SIG_AIM = 1 local SIG_RESTORE = 2 local ammo = 3 local lights = 3 local shotNum = 1 function script.Create() StartThread(SmokeUnit, {turret}) Turn(bay[1].exhaust, x_axis, math.rad(170)) Turn(bay[2].exhaust, x_axis, math.rad(170)) Turn(bay[3].exhaust, x_axis, math.rad(170)) Move(bay[1].fire, x_axis, -0.7) Move(bay[2].fire, x_axis, -0.7) Move(bay[3].fire, x_axis, -0.7) Hide(door) Hide(doorpist) Hide(arm) Hide(hand) Hide(base2) Move(l_poddoor, x_axis, 4, 5) Move(r_poddoor, x_axis, -4, 5) end local function RestoreAfterDelay() Signal(SIG_RESTORE) SetSignalMask(SIG_RESTORE) Sleep(5000) Turn(turret, y_axis, 0, math.rad(150)) Turn(pod, x_axis, 0, math.rad(150)) end local function FireAndReload(num) Hide(bay[num].missile) --Move(bay[num].missile, z_axis, 22, 500) Hide(bay[num].greenLight) EmitSfx(bay[num].exhaust, UNIT_SFX2) Turn(bay[num].backDoor, x_axis, math.rad(100), math.rad(1000)) Turn(lever, x_axis, math.rad(-5), math.rad(80)) Turn(pod, x_axis, math.rad(7), math.rad(70)) Sleep(40) shotNum = shotNum + 1 if shotNum > 3 then shotNum = 1 end Turn(lever, x_axis, 0, math.rad(50)) Turn(pod, x_axis, 0, math.rad(50)) Turn(bay[num].backDoor, x_axis, 0, math.rad(100)) Sleep(500) local adjustedDuration = 0 while adjustedDuration < 8 do local stunnedOrInbuild = Spring.GetUnitIsStunned(unitID) local reloadMult = (stunnedOrInbuild and 0) or (Spring.GetUnitRulesParam(unitID, "totalReloadSpeedChange") or 1) adjustedDuration = adjustedDuration + reloadMult Sleep(1000) end Move(bay[num].missile, z_axis, -2.2) Move(l_poddoor, x_axis, 0, 5) Move(r_poddoor, x_axis, 0, 5) Sleep(500) Show(bay[num].missile) Move(bay[num].missile, z_axis, 0, 1) Sleep(500) lights = lights + 1 if lights == 3 then Move(l_poddoor, x_axis, 4, 5) Move(r_poddoor, x_axis, -4, 5) StartThread(RestoreAfterDelay) end Sleep(500) while adjustedDuration < 10 do local stunnedOrInbuild = Spring.GetUnitIsStunned(unitID) local reloadMult = (stunnedOrInbuild and 0) or (Spring.GetUnitRulesParam(unitID, "totalReloadSpeedChange") or 1) adjustedDuration = adjustedDuration + reloadMult Sleep(1000) end Show(bay[num].greenLight) ammo = ammo + 1 end function script.AimFromWeapon() return pod end function script.QueryWeapon() return bay[shotNum].fire end function script.AimWeapon(num, heading, pitch) if ammo >= 1 then Signal(SIG_RESTORE) Signal(SIG_AIM) SetSignalMask(SIG_AIM) Turn(turret, y_axis, heading, math.rad(450)) -- left-right Turn(pod, x_axis, -pitch, math.rad(450)) --up-down WaitForTurn(turret, y_axis) WaitForTurn(pod, x_axis) return true end end function script.BlockShot(num, targetID) return GG.OverkillPrevention_CheckBlock(unitID, targetID, 103, 30) end function script.FireWeapon() ammo = ammo - 1 lights = lights - 1 if ammo == 0 then firstFire = true end StartThread(FireAndReload, shotNum) end function script.Killed(recentDamage, maxHealth) local severity = recentDamage / maxHealth if severity <= 0.25 then Explode(base, sfxShatter) Explode(lever, sfxNone) --Explode(door, sfxNone) Explode(pod, sfxNone) Explode(bay[1].missile, sfxExplodeOnHit + sfxSmoke) Explode(bay[2].missile, sfxExplodeOnHit + sfxSmoke) Explode(bay[3].missile, sfxExplodeOnHit + sfxSmoke) Explode(bay[1].backDoor, sfxNone) Explode(bay[2].backDoor, sfxNone) Explode(bay[3].backDoor, sfxNone) Explode(turret, sfxNone) return 1 elseif severity <= 0.50 then Explode(base, sfxShatter) Explode(lever, sfxFall) --Explode(door, sfxFall) Explode(pod, sfxShatter) Explode(bay[1].missile, sfxFall + sfxExplodeOnHit + sfxSmoke) Explode(bay[2].missile, sfxFall + sfxExplodeOnHit + sfxSmoke) Explode(bay[3].missile, sfxFall + sfxExplodeOnHit + sfxSmoke) Explode(bay[1].backDoor, sfxNone) Explode(bay[2].backDoor, sfxNone) Explode(bay[3].backDoor, sfxNone) Explode(turret, sfxNone) return 1 elseif severity <= 0.99 then Explode(base, sfxShatter) Explode(lever, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) --Explode(door, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(pod, sfxFall) Explode(bay[1].missile, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(bay[2].missile, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(bay[3].missile, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(bay[1].backDoor, sfxNone + sfxExplodeOnHit) Explode(bay[2].backDoor, sfxNone + sfxExplodeOnHit) Explode(bay[3].backDoor, sfxNone + sfxExplodeOnHit) Explode(turret, sfxNone) return 2 end Explode(base, sfxShatter) Explode(lever, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) --Explode(door, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(pod, sfxShatter + sfxExplodeOnHit) Explode(bay[1].missile, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(bay[2].missile, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(bay[3].missile, sfxFall + sfxSmoke + sfxFire + sfxExplodeOnHit) Explode(turret, sfxNone) return 2 end
gpl-2.0
DailyShana/ygopro-scripts
c12197543.lua
3
1218
--剣の采配 function c12197543.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_HANDES+CATEGORY_DESTROY) e1:SetCode(EVENT_DRAW) e1:SetCondition(c12197543.condition) e1:SetOperation(c12197543.activate) c:RegisterEffect(e1) end function c12197543.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and r==REASON_RULE end function c12197543.dfilter(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() end function c12197543.activate(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(tp,tc) if tc:IsType(TYPE_SPELL+TYPE_TRAP) then local g=Duel.GetMatchingGroup(c12197543.dfilter,tp,0,LOCATION_ONFIELD,nil) local opt=0 if g:GetCount()==0 then opt=Duel.SelectOption(tp,aux.Stringid(12197543,0)) else opt=Duel.SelectOption(tp,aux.Stringid(12197543,0),aux.Stringid(12197543,1)) end if opt==0 then Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=g:Select(tp,1,1,nil) Duel.Destroy(dg,REASON_EFFECT) Duel.ShuffleHand(1-tp) end end else Duel.ShuffleHand(1-tp) end end
gpl-2.0
Whitechaser/darkstar
scripts/zones/Port_Windurst/npcs/Yujuju.lua
5
2373
----------------------------------- -- Area: Port Windurst -- NPC: Yujuju -- Involved In Quest: Making Headlines -- !pos 201.523 -4.785 138.978 240 ----------------------------------- package.loaded["scripts/zones/Port_Windurst/TextIDs"] = nil; ----------------------------------- require("scripts/globals/quests"); require("scripts/globals/settings"); require("scripts/globals/titles"); require("scripts/zones/Port_Windurst/TextIDs"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) function testflag(set,flag) return (set % (2*flag) >= flag) end local MakingHeadlines = player:getQuestStatus(WINDURST,MAKING_HEADLINES); local WildcatWindurst = player:getVar("WildcatWindurst"); if (player:getQuestStatus(WINDURST,LURE_OF_THE_WILDCAT_WINDURST) == QUEST_ACCEPTED and player:getMaskBit(WildcatWindurst,19) == false) then player:startEvent(621); elseif (player:getCurrentMission(COP) == THE_ROAD_FORKS and player:getVar("MEMORIES_OF_A_MAIDEN_Status")==9) then player:startEvent(592);--COP event elseif (MakingHeadlines == 1) then local prog = player:getVar("QuestMakingHeadlines_var"); -- Variable to track if player has talked to 4 NPCs and a door -- 1 = Kyume -- 2 = Yujuju -- 4 = Hiwom -- 8 = Umumu -- 16 = Mahogany Door if (testflag(tonumber(prog),2) == false) then player:startEvent(314); -- Get Scoop else player:startEvent(315); -- After receiving scoop end else player:startEvent(340); -- Standard Conversation end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if (csid == 314) then prog = player:getVar("QuestMakingHeadlines_var"); player:addKeyItem(PORT_WINDURST_SCOOP); player:messageSpecial(KEYITEM_OBTAINED,PORT_WINDURST_SCOOP); player:setVar("QuestMakingHeadlines_var",prog+2); elseif (csid == 592) then player:setVar("MEMORIES_OF_A_MAIDEN_Status",10); elseif (csid == 621) then player:setMaskBit(player:getVar("WildcatWindurst"),"WildcatWindurst",19,true); end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/commands/saber2hHit1.lua
2
2377
--Copyright (C) 2007 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --which carries forward this exception. --true = 1, false = 0 Saber2hHit1Command = { name = "saber2hhit1", damageMultiplier = 1.25, speedMultiplier = 1.25, forceCostMultiplier = 1.0, animationCRC = hashCode("combo_2c_light"), combatSpam = "saber2hhit1", poolsToDamage = RANDOM_ATTRIBUTE, weaponType = TWOHANDJEDIWEAPON, range = -1 } AddCommand(Saber2hHit1Command)
agpl-3.0
DailyShana/ygopro-scripts
c20358953.lua
3
1551
--シャーク・ザ・クルー function c20358953.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(20358953,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCondition(c20358953.spcon) e1:SetTarget(c20358953.sptg) e1:SetOperation(c20358953.spop) c:RegisterEffect(e1) end function c20358953.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()==1-tp end function c20358953.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c20358953.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c20358953.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) end function c20358953.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end if ft>2 then ft=2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c20358953.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) if g:GetCount()~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/wearables/armor/zam/objects.lua
3
20842
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --which carries forward this exception. object_tangible_wearables_armor_zam_shared_armor_zam_wesell_belt = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_belt_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/belt.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 259, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_belt", gameObjectType = 259, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_belt", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_belt", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 1255925428, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_belt.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_belt, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_belt.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_boots = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_boots.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_boots_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/shoe.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 263, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_boots", gameObjectType = 263, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_boots", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_boots", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 509585055, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_shoes.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_boots, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_boots.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_chest_plate = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_chest_plate.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_chest_plate_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/vest.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 257, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_chest_plate", gameObjectType = 257, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_chest_plate", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_chest_plate", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 3303691594, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_vest.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_chest_plate, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_chest_plate.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_chest_plate_quest = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_chest_plate_quest.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_chest_plate_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/vest.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 257, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_chest_plate_quest", gameObjectType = 257, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_chest_plate", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_chest_plate_quest", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 2543046725, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_vest.iff", "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_chest_plate.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_chest_plate_quest, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_chest_plate_quest.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_gloves = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_gloves.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_gloves_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/gauntlets_long.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 262, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_gloves", gameObjectType = 262, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_gloves", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_gloves", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 2822062160, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_gauntlets_long.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_gloves, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_gloves.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_helmet = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_helmet.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_helmet_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/helmet_closed_full.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 258, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_helmet", gameObjectType = 258, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_helmet", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_helmet", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 519414104, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_armor_base.iff", "object/tangible/wearables/base/shared_base_helmet_closed_full.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_helmet, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_helmet.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_helmet_quest = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_helmet_quest.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_helmet_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/helmet_closed_full.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 258, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_helmet_quest", gameObjectType = 258, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_helmet", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_helmet_quest", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 2324855644, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_armor_base.iff", "object/tangible/wearables/base/shared_base_helmet_closed_full.iff", "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_helmet.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_helmet_quest, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_helmet_quest.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_pants = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_pants.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_pants_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/skirt.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 260, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_pants", gameObjectType = 260, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_pants", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_pants", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 2684655133, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_skirt.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_pants, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_pants.iff") object_tangible_wearables_armor_zam_shared_armor_zam_wesell_pants_quest = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_pants_quest.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "appearance/armor_zam_wesell_pants_f.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/skirt.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 260, collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@wearables_detail:armor_zam_wesell_pants_quest", gameObjectType = 260, locationReservationRadius = 0, lookAtText = "@wearables_lookat:armor_zam_wesell_pants", noBuildRadius = 0, objectName = "@wearables_name:armor_zam_wesell_pants_quest", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, totalCellNumber = 0, useStructureFootprintOutline = 0, clientObjectCRC = 3252715807, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/base/shared_tangible_craftable.iff", "object/tangible/wearables/base/shared_wearables_base.iff", "object/tangible/wearables/base/shared_base_skirt.iff", "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_pants.iff"} ]] } ObjectTemplates:addClientTemplate(object_tangible_wearables_armor_zam_shared_armor_zam_wesell_pants_quest, "object/tangible/wearables/armor/zam/shared_armor_zam_wesell_pants_quest.iff")
agpl-3.0
DailyShana/ygopro-scripts
c7369217.lua
3
3242
--メタル化寄生生物-ルナタイト function c7369217.initial_effect(c) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(7369217,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetTarget(c7369217.eqtg) e1:SetOperation(c7369217.eqop) c:RegisterEffect(e1) --unequip local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(7369217,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCondition(c7369217.uncon) e2:SetTarget(c7369217.sptg) e2:SetOperation(c7369217.spop) c:RegisterEffect(e2) --immune local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCondition(c7369217.uncon) e3:SetValue(c7369217.efilter) c:RegisterEffect(e3) --destroy sub local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_EQUIP) e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e5:SetCode(EFFECT_DESTROY_SUBSTITUTE) e5:SetCondition(c7369217.uncon) e5:SetValue(c7369217.repval) c:RegisterEffect(e5) --eqlimit local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_EQUIP_LIMIT) e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e6:SetValue(1) c:RegisterEffect(e6) end function c7369217.uncon(e) return e:GetHandler():IsStatus(STATUS_UNION) end function c7369217.repval(e,re,r,rp) return bit.band(r,REASON_BATTLE)~=0 end function c7369217.filter(c) return c:IsFaceup() and c:GetUnionCount()==0 end function c7369217.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c7369217.filter(chkc) end if chk==0 then return e:GetHandler():GetFlagEffect(7369217)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c7369217.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,c7369217.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) e:GetHandler():RegisterFlagEffect(7369217,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function c7369217.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not tc:IsRelateToEffect(e) or not c7369217.filter(tc) then Duel.SendtoGrave(c,REASON_EFFECT) return end if not Duel.Equip(tp,c,tc,false) then return end c:SetStatus(STATUS_UNION,true) end function c7369217.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(7369217)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) e:GetHandler():RegisterFlagEffect(7369217,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function c7369217.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) end end function c7369217.efilter(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_SPELL) end
gpl-2.0