repo_name stringlengths 6 69 | path stringlengths 6 178 | copies stringclasses 278
values | size stringlengths 4 7 | content stringlengths 671 917k | license stringclasses 15
values |
|---|---|---|---|---|---|
sprunk/Zero-K | units/droneheavyslow.lua | 1 | 3412 | unitDef = {
unitname = [[droneheavyslow]],
name = [[Viper]],
description = [[Advanced Battle Drone]],
acceleration = 0.3,
airHoverFactor = 4,
brakeRate = 0.24,
buildCostMetal = 35,
builder = false,
buildPic = [[droneheavyslow.png]],
canBeAssisted = false,
canFly = true,
canGuard = true,
canMove = true,
canPatrol = true,
canSubmerge = false,
category = [[GUNSHIP]],
collide = false,
cruiseAlt = 100,
explodeAs = [[TINY_BUILDINGEX]],
floater = true,
footprintX = 2,
footprintZ = 2,
hoverAttack = true,
iconType = [[gunship]],
maxDamage = 430,
maxVelocity = 5,
minCloakDistance = 75,
noAutoFire = false,
noChaseCategory = [[TERRAFORM SATELLITE SUB]],
objectName = [[battledrone.s3o]],
reclaimable = false,
script = [[droneheavyslow.lua]],
selfDestructAs = [[TINY_BUILDINGEX]],
customParams = {
is_drone = 1,
},
sfxtypes = {
explosiongenerators = {
},
},
sightDistance = 500,
turnRate = 792,
upright = true,
weapons = {
{
def = [[DISRUPTOR]],
badTargetCategory = [[FIXEDWING]],
mainDir = [[0 0 1]],
maxAngleDif = 20,
onlyTargetCategory = [[FIXEDWING LAND SINK TURRET SHIP SWIM FLOAT GUNSHIP HOVER]],
},
},
weaponDefs = {
DISRUPTOR = {
name = [[Disruptor Pulse Beam]],
areaOfEffect = 24,
beamdecay = 0.9,
beamTime = 1/30,
beamttl = 50,
coreThickness = 0.25,
craterBoost = 0,
craterMult = 0,
customParams = {
timeslow_damagefactor = [[2]],
light_camera_height = 2000,
light_color = [[0.85 0.33 1]],
light_radius = 150,
},
damage = {
default = 200,
},
explosionGenerator = [[custom:flash2purple]],
fireStarter = 30,
impactOnly = true,
impulseBoost = 0,
impulseFactor = 0.4,
interceptedByShieldType = 1,
largeBeamLaser = true,
laserFlareSize = 4.33,
minIntensity = 1,
noSelfDamage = true,
range = 350,
reloadtime = 2,
rgbColor = [[0.3 0 0.4]],
soundStart = [[weapon/laser/heavy_laser5]],
soundStartVolume = 3,
soundTrigger = true,
sweepfire = false,
texture1 = [[largelaser]],
texture2 = [[flare]],
texture3 = [[flare]],
texture4 = [[smallflare]],
thickness = 8,
tolerance = 18000,
turret = false,
weaponType = [[BeamLaser]],
weaponVelocity = 500,
},
},
}
return lowerkeys({ droneheavyslow = unitDef })
| gpl-2.0 |
bedll19/amir-arman | bot/bot.lua | 7 | 6651 | package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua'
..';.luarocks/share/lua/5.2/?/init.lua'
package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so'
require("./bot/utils")
local f = assert(io.popen('/usr/bin/git describe --tags', 'r'))
VERSION = assert(f:read('*a'))
f:close()
-- This function is called when tg receive a msg
function on_msg_receive (msg)
if not started then
return
end
local receiver = get_receiver(msg)
-- vardump(msg)
msg = pre_process_service_msg(msg)
if msg_valid(msg) then
msg = pre_process_msg(msg)
if msg then
match_plugins(msg)
mark_read(receiver, ok_cb, false)
end
end
end
function ok_cb(extra, success, result)
end
function on_binlog_replay_end()
started = true
postpone (cron_plugins, false, 60*5.0)
-- See plugins/isup.lua as an example for cron
_config = load_config()
-- load plugins
plugins = {}
load_plugins()
end
function msg_valid(msg)
-- Don't process outgoing messages
if msg.out then
print('\27[36mNot valid: msg from us\27[39m')
return false
end
-- Before bot was started
if msg.date < now then
print('\27[36mNot valid: old msg\27[39m')
return false
end
if msg.unread == 0 then
print('\27[36mNot valid: readed\27[39m')
return false
end
if not msg.to.id then
print('\27[36mNot valid: To id not provided\27[39m')
return false
end
if not msg.from.id then
print('\27[36mNot valid: From id not provided\27[39m')
return false
end
if msg.from.id == our_id then
print('\27[36mNot valid: Msg from our id\27[39m')
return false
end
if msg.to.type == 'encr_chat' then
print('\27[36mNot valid: Encrypted chat\27[39m')
return false
end
if msg.from.id == 777000 then
print('\27[36mNot valid: Telegram message\27[39m')
return false
end
return true
end
--
function pre_process_service_msg(msg)
if msg.service then
local action = msg.action or {type=""}
-- Double ! to discriminate of normal actions
msg.text = "!!tgservice " .. action.type
-- wipe the data to allow the bot to read service messages
if msg.out then
msg.out = false
end
if msg.from.id == our_id then
msg.from.id = 0
end
end
return msg
end
-- Apply plugin.pre_process function
function pre_process_msg(msg)
for name,plugin in pairs(plugins) do
if plugin.pre_process and msg then
print('Preprocess', name)
msg = plugin.pre_process(msg)
end
end
return msg
end
-- Go over enabled plugins patterns.
function match_plugins(msg)
for name, plugin in pairs(plugins) do
match_plugin(plugin, name, msg)
end
end
-- Check if plugin is on _config.disabled_plugin_on_chat table
local function is_plugin_disabled_on_chat(plugin_name, receiver)
local disabled_chats = _config.disabled_plugin_on_chat
-- Table exists and chat has disabled plugins
if disabled_chats and disabled_chats[receiver] then
-- Checks if plugin is disabled on this chat
for disabled_plugin,disabled in pairs(disabled_chats[receiver]) do
if disabled_plugin == plugin_name and disabled then
local warning = 'Plugin '..disabled_plugin..' is disabled on this chat'
print(warning)
send_msg(receiver, warning, ok_cb, false)
return true
end
end
end
return false
end
function match_plugin(plugin, plugin_name, msg)
local receiver = get_receiver(msg)
-- Go over patterns. If one matches it's enough.
for k, pattern in pairs(plugin.patterns) do
local matches = match_pattern(pattern, msg.text)
if matches then
print("msg matches: ", pattern)
if is_plugin_disabled_on_chat(plugin_name, receiver) then
return nil
end
-- Function exists
if plugin.run then
-- If plugin is for privileged users only
if not warns_user_not_allowed(plugin, msg) then
local result = plugin.run(msg, matches)
if result then
send_large_msg(receiver, result)
end
end
end
-- One patterns matches
return
end
end
end
-- DEPRECATED, use send_large_msg(destination, text)
function _send_msg(destination, text)
send_large_msg(destination, text)
end
-- Save the content of _config to config.lua
function save_config( )
serialize_to_file(_config, './data/config.lua')
print ('saved config into ./data/config.lua')
end
-- Returns the config from config.lua file.
-- If file doesn't exist, create it.
function load_config( )
local f = io.open('./data/config.lua', "r")
-- If config.lua doesn't exist
if not f then
print ("Created new config file: data/config.lua")
create_config()
else
f:close()
end
local config = loadfile ("./data/config.lua")()
for v,user in pairs(config.sudo_users) do
print("Allowed user: " .. user)
end
return config
end
-- Create a basic config.json file and saves it.
function create_config( )
-- A simple config with basic plugins and ourselves as privileged user
config = {
enabled_plugins = {
"9gag",
"eur",
"echo",
"btc",
"get",
"giphy",
"google",
"gps",
"help",
"id",
"images",
"img_google",
"location",
"media",
"plugins",
"channels",
"set",
"stats",
"time",
"version",
"weather",
"xkcd",
"youtube" },
sudo_users = {168398326},
disabled_channels = {}
}
serialize_to_file(config, './data/config.lua')
print ('saved config into ./data/config.lua')
end
function on_our_id (id)
our_id = id
end
function on_user_update (user, what)
--vardump (user)
end
function on_chat_update (chat, what)
--vardump (chat)
end
function on_secret_chat_update (schat, what)
--vardump (schat)
end
function on_get_difference_end ()
end
-- Enable plugins in config.json
function load_plugins()
for k, v in pairs(_config.enabled_plugins) do
print("Loading plugin", v)
local ok, err = pcall(function()
local t = loadfile("plugins/"..v..'.lua')()
plugins[v] = t
end)
if not ok then
print('\27[31mError loading plugin '..v..'\27[39m')
print('\27[31m'..err..'\27[39m')
end
end
end
-- Call and postpone execution for cron plugins
function cron_plugins()
for name, plugin in pairs(plugins) do
-- Only plugins with cron function
if plugin.cron ~= nil then
plugin.cron()
end
end
-- Called again in 5 mins
postpone (cron_plugins, false, 5*60.0)
end
-- Start and load values
our_id = 0
now = os.time()
math.randomseed(now)
started = false
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/kwi.lua | 3 | 2128 | --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_kwi = object_mobile_shared_kwi:new {
}
ObjectTemplates:addTemplate(object_mobile_kwi, "object/mobile/kwi.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/particle/particle_test_91.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_static_particle_particle_test_91 = object_static_particle_shared_particle_test_91:new {
}
ObjectTemplates:addTemplate(object_static_particle_particle_test_91, "object/static/particle/particle_test_91.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/poi/tatooine_evil_hermit_large2.lua | 2 | 2270 | --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_evil_hermit_large2 = object_building_poi_shared_tatooine_evil_hermit_large2:new {
gameObjectType = 531,
}
ObjectTemplates:addTemplate(object_building_poi_tatooine_evil_hermit_large2, "object/building/poi/tatooine_evil_hermit_large2.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/item/item_fruit_melon.lua | 3 | 2200 | --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_fruit_melon = object_static_item_shared_item_fruit_melon:new {
}
ObjectTemplates:addTemplate(object_static_item_item_fruit_melon, "object/static/item/item_fruit_melon.iff")
| agpl-3.0 |
digitall/scummvm | devtools/create_ultima/files/ultima6/scripts/u6/usecode.lua | 18 | 2112 | local USE_EVENT_USE = 0x01
function use_telescope(obj, actor)
if obj.on_map == true then
mapwindow_center_at_location(obj.x, obj.y, obj.z)
else -- FIXME - should probably work in the inventory (can't be done without cheating though)
print("Not usable\n")
return
end
local dir = really_get_direction("Direction-")
if dir == nil or dir == DIR_NONE then
mapwindow_center_at_location(actor.x, actor.y, actor.z)
print("nowhere.\n")
return
end
local dir_string = direction_string(dir)
dir_string = dir_string:gsub("^%l", string.upper)
print(dir_string..".\n")
local loc = mapwindow_get_location()
--FIXME need to fade out blacking.
mapwindow_set_enable_blacking(false)
for i=0,40 do
loc.x,loc.y = direction_get_loc(dir,loc.x, loc.y)
mapwindow_set_location(loc.x, loc.y, loc.z)
script_wait(50)
end
script_wait(600)
mapwindow_set_enable_blacking(true)
mapwindow_center_at_location(actor.x, actor.y, actor.z)
print("\nDone\n")
end
function use_silver_horn(obj, actor)
local i
for i=0,0xff do
local tmp_actor = Actor.get(i)
if tmp_actor.obj_n == 413 and tmp_actor.alive == true and actor_find_max_xy_distance(tmp_actor, actor.x, actor.y) <= 8 then
print("Not now!\n")
return
end
end
local random = math.random
for i=1,3 do
local new_x = random(1, 7) + random(1, 7) + actor.x - 8
local new_y = random(1, 7) + random(1, 7) + actor.y - 8
local snake = Actor.new(413, new_x, new_y, actor.z, ALIGNMENT_CHAOTIC)
end
print("Silver snakes are generated!\n")
end
local usecode_table = {
[154]=use_telescope,
[313]=use_silver_horn
}
function has_usecode(obj, usecode_type)
if usecode_type == USE_EVENT_USE and usecode_table[obj.obj_n] ~= nil then
return true
end
return false
end
function use_obj(obj, actor)
if type(usecode_table[obj.obj_n]) == "function" then
local func = usecode_table[obj.obj_n]
if func ~= nil then
print("\n")
func(obj, actor)
end
else
use_obj_on(obj, actor, usecode_table[obj.obj_n])
end
end
function move_obj(obj, rel_x, rel_y)
return false
end
function is_ranged_select(operation)
return false
end
| gpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/ship/blacksun_heavy_s02_tier4.lua | 3 | 2204 | --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_blacksun_heavy_s02_tier4 = object_ship_shared_blacksun_heavy_s02_tier4:new {
}
ObjectTemplates:addTemplate(object_ship_blacksun_heavy_s02_tier4, "object/ship/blacksun_heavy_s02_tier4.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/scout/item_camokit_naboo.lua | 1 | 3210 | --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_scout_item_camokit_naboo = object_draft_schematic_scout_shared_item_camokit_naboo:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Camo Kit: Naboo",
craftingToolTab = 524288, -- (See DraftSchematicObjectTemplate.h)
complexity = 2,
size = 1,
xpType = "scout",
xp = 170,
assemblySkill = "general_assembly",
experimentingSkill = "general_experimentation",
customizationSkill = "clothing_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n"},
ingredientTitleNames = {"musk_extract", "native_animal_skins", "camo_dye"},
ingredientSlotType = {0, 0, 0},
resourceTypes = {"meat_herbivore_naboo", "hide_scaley_naboo", "bone_avian_naboo"},
resourceQuantities = {20, 30, 10},
contribution = {100, 100, 100},
targetTemplate = "object/tangible/scout/camokit/camokit_naboo.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_scout_item_camokit_naboo, "object/draft_schematic/scout/item_camokit_naboo.iff")
| agpl-3.0 |
TerraME/terrame | packages/base/tests/functional/basics/Package.lua | 2 | 2746 | -------------------------------------------------------------------------------------------
-- TerraME - a software platform for multiple scale spatially-explicit dynamic modeling.
-- Copyright (C) 2001-2014 INPE and TerraLAB/UFOP.
--
-- This code is part of the TerraME framework.
-- This framework 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.1 of the License, or (at your option) any later version.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library.
--
-- The authors reassure the license terms regarding the warranties.
-- They specifically disclaim any warranties, including, but not limited to,
-- the implied warranties of merchantability and fitness for a particular purpose.
-- The framework provided hereunder is on an "as is" basis, and the authors have no
-- obligation to provide maintenance, support, updates, enhancements, or modifications.
-- In no event shall INPE and TerraLAB / UFOP be held liable to any party for direct,
-- indirect, special, incidental, or consequential damages arising out of the use
-- of this library and its documentation.
--
-- Authors: Tiago Garcia de Senna Carneiro (tiago@dpi.inpe.br)
-- Pedro R. Andrade (pedro.andrade@inpe.br)
-------------------------------------------------------------------------------------------
return{
filePath = function(unitTest)
unitTest:assertType(filePath("test/simple-cs.csv"), "File")
end,
filesByExtension = function(unitTest)
local files = filesByExtension("base", "csv")
unitTest:assertType(files, "table")
unitTest:assertEquals(#files, 1)
unitTest:assertType(files[1], "File")
end,
isLoaded = function(unitTest)
unitTest:assert(isLoaded("base"))
end,
getPackage = function(unitTest)
local base = getPackage("base")
local cs = base.CellularSpace{xdim = 10}
unitTest:assertType(cs, "CellularSpace")
-- The assert below checks the number of functions in package 'base'.
unitTest:assertEquals(getn(base), 181)
end,
import = function(unitTest)
forEachCell = nil
import("base", true)
unitTest:assertType(forEachCell, "function")
local warning_func = function()
import("base")
end
unitTest:assertWarning(warning_func, "Package 'base' is already loaded.")
unitTest:assertType(forEachCell, "function")
end,
packageInfo = function(unitTest)
local r = packageInfo()
unitTest:assertEquals(r.version, "2.0.1")
unitTest:assertEquals(r.package, "base")
unitTest:assertEquals(r.url, "http://www.terrame.org")
unitTest:assertType(r.data, "Directory")
unitTest:assertType(r.path, "Directory")
end
}
| lgpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/installation/faction_perk/turret/serverobjects.lua | 3 | 2607 | --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
includeFile("installation/faction_perk/turret/base/serverobjects.lua")
-- Server Objects
includeFile("installation/faction_perk/turret/block_lg.lua")
includeFile("installation/faction_perk/turret/block_med.lua")
includeFile("installation/faction_perk/turret/block_sm.lua")
includeFile("installation/faction_perk/turret/dish_lg.lua")
includeFile("installation/faction_perk/turret/dish_sm.lua")
includeFile("installation/faction_perk/turret/tower_lg.lua")
includeFile("installation/faction_perk/turret/tower_med.lua")
includeFile("installation/faction_perk/turret/tower_sm.lua")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/item/item_recycler_flora.lua | 1 | 3610 | --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_item_item_recycler_flora = object_draft_schematic_item_shared_item_recycler_flora:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Flora Recycler Schematic",
craftingToolTab = 524288, -- (See DraftSchematicObjectTemplate.h)
complexity = 12,
size = 1,
xpType = "crafting_general",
xp = 28,
assemblySkill = "general_assembly",
experimentingSkill = "general_experimentation",
customizationSkill = "general_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n"},
ingredientTitleNames = {"agitator_motor", "feed_tubes", "chemical_tubing", "processor_attachments", "spinning_blades", "end_result_bowl"},
ingredientSlotType = {1, 1, 0, 1, 2, 0},
resourceTypes = {"object/tangible/loot/simple_kit/shared_motor_small_red.iff", "object/tangible/loot/simple_kit/shared_feed_tubes.iff", "fiberplast", "object/tangible/loot/simple_kit/shared_processor_attachments.iff", "object/tangible/loot/simple_kit/shared_spinning_blade.iff", "metal"},
resourceQuantities = {1, 1, 50, 1, 4, 50},
contribution = {100, 100, 100, 100, 100, 100},
targetTemplate = "object/tangible/recycler/flora_recycler.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_item_item_recycler_flora, "object/draft_schematic/item/item_recycler_flora.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/dantooine/kunga_harvester.lua | 1 | 1307 | kunga_harvester = Creature:new {
objectName = "@mob/creature_names:kunga_harvester",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "kunga_tribe",
faction = "kunga_tribe",
level = 28,
chanceHit = 0.37,
damageMin = 260,
damageMax = 270,
baseXp = 2822,
baseHAM = 8100,
baseHAMmax = 9900,
armor = 0,
resists = {15,40,15,-1,-1,60,40,-1,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = ATTACKABLE,
creatureBitmask = PACK + HERD,
optionsBitmask = AIENABLED,
diet = HERBIVORE,
templates = {
"object/mobile/dantari_male.iff",
"object/mobile/dantari_female.iff"},
lootGroups = {
{
groups = {
{group = "junk", chance = 3500000},
{group = "loot_kit_parts", chance = 3000000},
{group = "armor_attachments", chance = 500000},
{group = "clothing_attachments", chance = 500000},
{group = "wearables_common", chance = 1000000},
{group = "wearables_uncommon", chance = 1000000},
{group = "crystals_poor", chance = 500000}
}
}
},
weapons = {"primitive_weapons"},
conversationTemplate = "",
attacks = merge(pikemanmaster,fencermaster,brawlermaster)
}
CreatureTemplates:addCreatureTemplate(kunga_harvester, "kunga_harvester")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/components/armor/arm_rss_light_plastisteel.lua | 3 | 2312 | --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_rss_light_plastisteel = object_tangible_ship_components_armor_shared_arm_rss_light_plastisteel:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_components_armor_arm_rss_light_plastisteel, "object/tangible/ship/components/armor/arm_rss_light_plastisteel.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/space_comm_station_dantooine.lua | 3 | 2228 | --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_space_comm_station_dantooine = object_mobile_shared_space_comm_station_dantooine:new {
}
ObjectTemplates:addTemplate(object_mobile_space_comm_station_dantooine, "object/mobile/space_comm_station_dantooine.iff")
| agpl-3.0 |
llnoverll/NOVER | plugins/lockbot.lua | 6 | 2561 |
local function isAntiBotEnabled (chatId)
local hash = 'bot:lock:'..chatId
local lock = redis:get(hash)
return lock
end
local function enableAntiBot (chatId)
local hash = 'bot:lock:'..chatId
redis:set(hash, true)
end
local function disableAntiBot (chatId)
local hash = 'bot:lock:'..chatId
redis:del(hash)
end
local function isABot (user)
local binFlagIsBot = 4096
local result = bit32.band(user.flags, binFlagIsBot)
return result == binFlagIsBot
end
local function isABotBadWay (user)
local username = user.username or ''
return username:match("[Bb]ot$")
end
local function kickUser(userId, chatId)
local channel = 'channel#id'..chatId
local user = 'user#id'..userId
channel_kick_user(channel, user, function (data, success, result)
if success ~= 1 then
print('I can\'t kick '..data.user..' but should be kicked')
end
end, {chat=chat, user=user})
end
local function run (msg, matches)
if matches[1] ~= 'chat_add_user' and matches[1] ~= 'chat_add_user_link' then
if msg.to.type ~= 'chat' and msg.to.type ~= 'channel' then
return nil
end
end
local chatId = msg.to.id
if matches[1] == 'قفل البوتات' then
enableAntiBot(chatId)
return 'تہٍـِـِۣـّ̐ہٰم ِِِ ✾❣قہٍّْـٍّْ﴿🔐﴾ٍّْـفہلٍٍّّْْ ﭑضـــٰٰـॡۣۛﭑإ́فۂ͜ާـہ بـ✍ـﮩٍّﮩٍّﮩٍّـ✍ـﮩٍّوتات✿❥'
end
if matches[1] == 'فتح البوتات' then
disableAntiBot(chatId)
return 'تہٍـِـِۣـّ̐ہٰم ِِ ✾❣فہٍّْـٍّْ﴿🔓﴾ٍّْـتہح❣ﭑضـــٰٰـॡۣۛﭑإ́فۂ͜ާـہ بـ✍ـﮩٍّﮩٍّﮩٍّـ✍ـﮩٍّوتات✿❥'
end
if matches[1] == 'chat_add_user' or matches[1] == 'chat_add_user_link' then
local user = msg.action.user or msg.from
if isABotBadWay(user) then
print("It' a bot!")
if isAntiBotEnabled(chatId) then
print('bot is locked')
local userId = user.id
if not isBotAllowed(userId, chatId) then
kickUser(userId, chatId)
else
print('')
end
end
end
end
end
return {
description = 'Anti bot create by Mustafa ip',
usage = {
'/bot lock: locked add bots to supergroup',
'/bot unlock: unlock add bots to supergroup'
},
patterns = {
'^(قفل البوتات)$',
'^(فتح البوتات)$',
'^!!tgservice (chat_add_user)$',
'^!!tgservice (chat_add_user_link)$'
},
run = run
}
| gpl-2.0 |
MmxBoy/metal-anti | plugins/invite.lua | 11 | 1182 | do
local function callbackres(extra, success, result) -- Callback for res_user in line 27
local user = 'user#id'..result.id
local chat = 'chat#id'..extra.chatid
if is_banned(result.id, extra.chatid) then -- Ignore bans
send_large_msg(chat, 'User is banned.')
elseif is_gbanned(result.id) then -- Ignore globall bans
send_large_msg(chat, 'User is globaly banned.')
else
chat_add_user(chat, user, ok_cb, false) -- Add user on chat
end
end
function run(msg, matches)
local data = load_data(_config.moderation.data)
if not is_realm(msg) then
if data[tostring(msg.to.id)]['settings']['lock_member'] == 'yes' and not is_admin(msg) then
return 'Group is private.'
end
end
if msg.to.type ~= 'chat' then
return
end
if not is_momod(msg) then
return
end
if not is_admin(msg) then -- For admins only !
return 'Only admins can invite.'
end
local cbres_extra = {chatid = msg.to.id}
local username = matches[1]
local username = username:gsub("@","")
res_user(username, callbackres, cbres_extra)
end
return {
patterns = {
"^invite (.*)$"
},
run = run
}
end
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/soundobject/objects.lua | 3 | 97494 | --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_soundobject_shared_soundobject_cantina_large = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_cantina_large.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_cantina_large.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1113312589,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_cantina_large, "object/soundobject/shared_soundobject_cantina_large.iff")
object_soundobject_shared_soundobject_cantina_medium = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_cantina_medium.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_cantina_medium.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 769239243,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_cantina_medium, "object/soundobject/shared_soundobject_cantina_medium.iff")
object_soundobject_shared_soundobject_cantina_small = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_cantina_small.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_cantina_small.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1983928676,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_cantina_small, "object/soundobject/shared_soundobject_cantina_small.iff")
object_soundobject_shared_soundobject_cave_drip = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_cave_drip.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_cave_drip.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 526901089,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_cave_drip, "object/soundobject/shared_soundobject_cave_drip.iff")
object_soundobject_shared_soundobject_chamber_music = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_chamber_music.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_chamber_music.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1471626100,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_chamber_music, "object/soundobject/shared_soundobject_chamber_music.iff")
object_soundobject_shared_soundobject_city_crowd_booing = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_city_crowd_booing.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_city_crowd_booing.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1649456437,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_city_crowd_booing, "object/soundobject/shared_soundobject_city_crowd_booing.iff")
object_soundobject_shared_soundobject_city_crowd_cheering = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_city_crowd_cheering.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3171942528,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_city_crowd_cheering, "object/soundobject/shared_soundobject_city_crowd_cheering.iff")
object_soundobject_shared_soundobject_city_crowd_medium = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_city_crowd_medium.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_city_crowd_medium.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1007094640,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_city_crowd_medium, "object/soundobject/shared_soundobject_city_crowd_medium.iff")
object_soundobject_shared_soundobject_city_crowd_sentients = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_city_crowd_sentients.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_city_crowd_sentients.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2995810506,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_city_crowd_sentients, "object/soundobject/shared_soundobject_city_crowd_sentients.iff")
object_soundobject_shared_soundobject_city_crowd_sentients_large = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_city_crowd_sentients_large.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_city_crowd_sentients_large.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1220356330,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_city_crowd_sentients_large, "object/soundobject/shared_soundobject_city_crowd_sentients_large.iff")
object_soundobject_shared_soundobject_city_crowd_small = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_city_crowd_small.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_city_crowd_small.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2160245111,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_city_crowd_small, "object/soundobject/shared_soundobject_city_crowd_small.iff")
object_soundobject_shared_soundobject_cloning_facility = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_cloning_facility.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_cloning_facility.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2219862072,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_cloning_facility, "object/soundobject/shared_soundobject_cloning_facility.iff")
object_soundobject_shared_soundobject_elevator_music = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_elevator_music.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_ladyluck_elevator.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 805544317,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_elevator_music, "object/soundobject/shared_soundobject_elevator_music.iff")
object_soundobject_shared_soundobject_factory_exterior = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_factory_exterior.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_factory_exterior.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3185407219,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_factory_exterior, "object/soundobject/shared_soundobject_factory_exterior.iff")
object_soundobject_shared_soundobject_figrin_dan_band = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_figrin_dan_band.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_figrin_dan_band.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2322270980,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_figrin_dan_band, "object/soundobject/shared_soundobject_figrin_dan_band.iff")
object_soundobject_shared_soundobject_fire_roaring = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_fire_roaring.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_fire_roaring.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 543287439,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_fire_roaring, "object/soundobject/shared_soundobject_fire_roaring.iff")
object_soundobject_shared_soundobject_fort_tusken = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_fort_tusken.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_fort_tusken_lp.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1387709357,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_fort_tusken, "object/soundobject/shared_soundobject_fort_tusken.iff")
object_soundobject_shared_soundobject_fusion_power_generator = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_fusion_power_generator.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_fusion_power_gen.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 111680330,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_fusion_power_generator, "object/soundobject/shared_soundobject_fusion_power_generator.iff")
object_soundobject_shared_soundobject_hovering = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_hovering.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_hovering.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1865831738,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_hovering, "object/soundobject/shared_soundobject_hovering.iff")
object_soundobject_shared_soundobject_hydro_power_generator = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_hydro_power_generator.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_hydro_power_gen.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 111189793,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_hydro_power_generator, "object/soundobject/shared_soundobject_hydro_power_generator.iff")
object_soundobject_shared_soundobject_installation_hydro = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_installation_hydro.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_installation_hydro.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 995137663,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_installation_hydro, "object/soundobject/shared_soundobject_installation_hydro.iff")
object_soundobject_shared_soundobject_installation_photo_bio = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_installation_photo_bio.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_installation_photo_bio.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3621719598,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_installation_photo_bio, "object/soundobject/shared_soundobject_installation_photo_bio.iff")
object_soundobject_shared_soundobject_installation_wind = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_installation_wind.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_installation_wind.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 522992257,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_installation_wind, "object/soundobject/shared_soundobject_installation_wind.iff")
object_soundobject_shared_soundobject_jabba_audience_chamber = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_jabba_audience_chamber.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_jabba_audience_chamber.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2503585302,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_jabba_audience_chamber, "object/soundobject/shared_soundobject_jabba_audience_chamber.iff")
object_soundobject_shared_soundobject_jabba_max_rebo_band = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_jabba_max_rebo_band.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_jabba_max_rebo_band.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1106794,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_jabba_max_rebo_band, "object/soundobject/shared_soundobject_jabba_max_rebo_band.iff")
object_soundobject_shared_soundobject_jabba_monk_hideaway = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_jabba_monk_hideaway.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_jabba_monk_hideaway.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3562507459,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_jabba_monk_hideaway, "object/soundobject/shared_soundobject_jabba_monk_hideaway.iff")
object_soundobject_shared_soundobject_jabba_palace_entrance = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_jabba_palace_entrance.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_jabba_palace_entrance.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1643654633,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_jabba_palace_entrance, "object/soundobject/shared_soundobject_jabba_palace_entrance.iff")
object_soundobject_shared_soundobject_jungle_music_a = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_jungle_music_a.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_jungle_a.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2070906203,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_jungle_music_a, "object/soundobject/shared_soundobject_jungle_music_a.iff")
object_soundobject_shared_soundobject_jungle_music_b = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_jungle_music_b.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_jungle_b.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2692230604,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_jungle_music_b, "object/soundobject/shared_soundobject_jungle_music_b.iff")
object_soundobject_shared_soundobject_lakeshore = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_lakeshore.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_lakeshore.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 999668036,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_lakeshore, "object/soundobject/shared_soundobject_lakeshore.iff")
object_soundobject_shared_soundobject_lava = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_lava.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_lava.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3854588989,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_lava, "object/soundobject/shared_soundobject_lava.iff")
object_soundobject_shared_soundobject_loud_steam = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_loud_steam.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_loud_steam.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3479780870,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_loud_steam, "object/soundobject/shared_soundobject_loud_steam.iff")
object_soundobject_shared_soundobject_marketplace_large = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_marketplace_large.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_marketplace_large.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3222553098,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_marketplace_large, "object/soundobject/shared_soundobject_marketplace_large.iff")
object_soundobject_shared_soundobject_marketplace_small = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_marketplace_small.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_marketplace_small.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 4094678563,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_marketplace_small, "object/soundobject/shared_soundobject_marketplace_small.iff")
object_soundobject_shared_soundobject_mountain_winds = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_mountain_winds.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_mountain_winds.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 293547237,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_mountain_winds, "object/soundobject/shared_soundobject_mountain_winds.iff")
object_soundobject_shared_soundobject_nightsisters_stronghold = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_nightsisters_stronghold.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_nightsisters_stronghold.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1031338094,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_nightsisters_stronghold, "object/soundobject/shared_soundobject_nightsisters_stronghold.iff")
object_soundobject_shared_soundobject_power_generator = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_power_generator.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_power_generator.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 590222819,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_power_generator, "object/soundobject/shared_soundobject_power_generator.iff")
object_soundobject_shared_soundobject_quiet_steam = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_quiet_steam.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_quiet_steam.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1143794115,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_quiet_steam, "object/soundobject/shared_soundobject_quiet_steam.iff")
object_soundobject_shared_soundobject_rebel_hideout = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_rebel_hideout.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_rebel_hideout.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3950943395,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_rebel_hideout, "object/soundobject/shared_soundobject_rebel_hideout.iff")
object_soundobject_shared_soundobject_refrigeration_unit = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_refrigeration_unit.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_refrigeration_unit.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2124729098,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_refrigeration_unit, "object/soundobject/shared_soundobject_refrigeration_unit.iff")
object_soundobject_shared_soundobject_river_indoors = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_river_indoors.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_river_indoors.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2374956061,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_river_indoors, "object/soundobject/shared_soundobject_river_indoors.iff")
object_soundobject_shared_soundobject_river_large = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_river_large.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_river_large.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3441954755,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_river_large, "object/soundobject/shared_soundobject_river_large.iff")
object_soundobject_shared_soundobject_river_small = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_river_small.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_river_small.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 4180909034,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_river_small, "object/soundobject/shared_soundobject_river_small.iff")
object_soundobject_shared_soundobject_sailbarge_lower = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_sailbarge_lower.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_sailbarge_lower.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 4258394168,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_sailbarge_lower, "object/soundobject/shared_soundobject_sailbarge_lower.iff")
object_soundobject_shared_soundobject_sailbarge_upper = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_sailbarge_upper.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_sailbarge_upper.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2386769474,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_sailbarge_upper, "object/soundobject/shared_soundobject_sailbarge_upper.iff")
object_soundobject_shared_soundobject_seashore_indoors = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_seashore_indoors.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_seashore_indoors.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 279468825,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_seashore_indoors, "object/soundobject/shared_soundobject_seashore_indoors.iff")
object_soundobject_shared_soundobject_seashore_outdoors = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_seashore_outdoors.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_seashore_outdoors.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2890368574,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_seashore_outdoors, "object/soundobject/shared_soundobject_seashore_outdoors.iff")
object_soundobject_shared_soundobject_shield_generator = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_shield_generator.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_shield_generator.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3705653312,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_shield_generator, "object/soundobject/shared_soundobject_shield_generator.iff")
object_soundobject_shared_soundobject_snow_outside = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_snow_outside.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_snow_outside.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1803959668,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_snow_outside, "object/soundobject/shared_soundobject_snow_outside.iff")
object_soundobject_shared_soundobject_space_yacht = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_space_yacht.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_space_yacht.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2863794774,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_space_yacht, "object/soundobject/shared_soundobject_space_yacht.iff")
object_soundobject_shared_soundobject_sparks = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_sparks.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_sparks.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 740379187,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_sparks, "object/soundobject/shared_soundobject_sparks.iff")
object_soundobject_shared_soundobject_starport_announcer = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_starport_announcer.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_starport_announcer.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 111749873,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_starport_announcer, "object/soundobject/shared_soundobject_starport_announcer.iff")
object_soundobject_shared_soundobject_starport_exterior = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_starport_exterior.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_starport_exterior.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 93072533,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_starport_exterior, "object/soundobject/shared_soundobject_starport_exterior.iff")
object_soundobject_shared_soundobject_starport_interior = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_starport_interior.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_starport_interior.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2601406698,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_starport_interior, "object/soundobject/shared_soundobject_starport_interior.iff")
object_soundobject_shared_soundobject_theed_fountain = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_theed_fountain.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_theed_fountain.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 20514831,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_theed_fountain, "object/soundobject/shared_soundobject_theed_fountain.iff")
object_soundobject_shared_soundobject_transport_interior = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_transport_interior.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_transport_interior.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 425345644,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_transport_interior, "object/soundobject/shared_soundobject_transport_interior.iff")
object_soundobject_shared_soundobject_underground_music_a = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_underground_music_a.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_underground_music_a.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1630317945,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_underground_music_a, "object/soundobject/shared_soundobject_underground_music_a.iff")
object_soundobject_shared_soundobject_underground_music_b = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_underground_music_b.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_underground_music_b.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 3124430318,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_underground_music_b, "object/soundobject/shared_soundobject_underground_music_b.iff")
object_soundobject_shared_soundobject_water_gurgle = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_water_gurgle.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_water_gurgle.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2014649812,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_water_gurgle, "object/soundobject/shared_soundobject_water_gurgle.iff")
object_soundobject_shared_soundobject_water_gurgle_small = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_water_gurgle_small.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_water_gurgle_small.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 4152482150,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_water_gurgle_small, "object/soundobject/shared_soundobject_water_gurgle_small.iff")
object_soundobject_shared_soundobject_waterfall_indoors = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_waterfall_indoors.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_waterfall_indoors.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1465513069,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_waterfall_indoors, "object/soundobject/shared_soundobject_waterfall_indoors.iff")
object_soundobject_shared_soundobject_waterfall_large = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_waterfall_large.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_waterfall_large.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2572356312,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_waterfall_large, "object/soundobject/shared_soundobject_waterfall_large.iff")
object_soundobject_shared_soundobject_waterfall_outdoors = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_waterfall_outdoors.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_waterfall_outdoors.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 1999229516,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_waterfall_outdoors, "object/soundobject/shared_soundobject_waterfall_outdoors.iff")
object_soundobject_shared_soundobject_waterfall_small = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_waterfall_small.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_waterfall_small.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2907217649,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_waterfall_small, "object/soundobject/shared_soundobject_waterfall_small.iff")
object_soundobject_shared_soundobject_wind_power_generator = SharedStaticObjectTemplate:new {
clientTemplateFileName = "object/soundobject/shared_soundobject_wind_power_generator.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/pt_sound_location.prt",
arrangementDescriptorFilename = "",
clearFloraRadius = 0,
clientDataFile = "clientdata/soundobject/client_shared_soundobject_wind_power_generator.cdf",
clientGameObjectType = 5,
collisionActionBlockFlags = 255,
collisionActionFlags = 1,
collisionActionPassFlags = 0,
collisionMaterialBlockFlags = 1,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 0,
detailedDescription = "@string_table:sound_object",
gameObjectType = 5,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 0,
objectName = "@obj_n:unknown_object",
onlyVisibleInTools = 1,
portalLayoutFilename = "",
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 0,
surfaceType = 0,
totalCellNumber = 0,
clientObjectCRC = 2041745522,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/soundobject/base/shared_soundobject_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_soundobject_shared_soundobject_wind_power_generator, "object/soundobject/shared_soundobject_wind_power_generator.iff")
| agpl-3.0 |
sprunk/Zero-K | LuaUI/Widgets/init_autofirstbuildfacing.lua | 2 | 2497 | -- $Id$
function widget:GetInfo()
return {
name = "Auto First Build Facing",
desc = "Set buildfacing toward map center on the first building placed",
author = "zwzsg with lotsa help from #lua channel",
date = "October 26, 2008", --29 May 2014
license = "Free",
layer = 0,
enabled = true -- loaded by default
}
end
local facing=0
local x --intentionally Nil
local z=0
local n=0
function widget:Initialize()
if Spring.GetSpectatingState() then
Spring.Echo("Spectator mode detected. Removed: Auto First Build Facing") --added this message because widget removed message might not appear (make debugging harder)
widgetHandler:RemoveWidget(self)
end
end
-- Count all units and calculate their barycenter
local function SetStartPos()
if Spring.GetTeamUnitCount(Spring.GetMyTeamID()) and Spring.GetTeamUnitCount(Spring.GetMyTeamID())>0 then
x= 0
for k,unitID in pairs(Spring.GetTeamUnits(Spring.GetMyTeamID())) do
local ux=0
local uz=0
ux,_,uz=Spring.GetUnitPosition(unitID)
if ux and uz then
x=x+ux
z=z+uz
n=n+1
end
end
x=x/n
z=z/n
end
end
local function GetStartPos()
local sx, _, sz = Spring.GetTeamStartPosition(Spring.GetMyTeamID()) -- Returns -100, -100, -100 when none chosen
if (sx > 0) then
x = sx
z = sz
end
end
local function SetPreGameStartPos()
local mx, my = Spring.GetMouseState()
local _, pos = Spring.TraceScreenRay(mx, my, true, false,false, true)--only coordinate, NOT thru minimap, NOT include sky, ignore water surface
if pos then
x = pos[1]
z = pos[3]
end
end
-- Set buildfacing the first time a building is about to be built
function widget:Update()
local _,cmd=Spring.GetActiveCommand()
if cmd and cmd<0 then
if not x then SetStartPos() end --use unit's mean position as start pos
if not x then GetStartPos() end --no unit, use official start pos
if not x then SetPreGameStartPos() end --no official start pos, use mouse cursor as startpos
if x then
if math.abs(Game.mapSizeX - 2*x) > math.abs(Game.mapSizeZ - 2*z) then
if (2*x>Game.mapSizeX) then
-- facing="west"
facing=3
else
-- facing="east"
facing=1
end
else
if (2*z>Game.mapSizeZ) then
-- facing="north"
facing=2
else
-- facing="south"
facing=0
end
end
-- Spring.SendCommands({"buildfacing "..facing})
Spring.SetBuildFacing(facing)
widget.widgetHandler.RemoveCallIn(widget.widget,"Update")
end
end
end
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/loot/misc/artifact_rare_s01.lua | 3 | 2232 | --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_loot_misc_artifact_rare_s01 = object_tangible_loot_misc_shared_artifact_rare_s01:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_misc_artifact_rare_s01, "object/tangible/loot/misc/artifact_rare_s01.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/intangible/pet/eg6_power_droid_crafted.lua | 3 | 2240 | --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_pet_eg6_power_droid_crafted = object_intangible_pet_shared_eg6_power_droid_crafted:new {
}
ObjectTemplates:addTemplate(object_intangible_pet_eg6_power_droid_crafted, "object/intangible/pet/eg6_power_droid_crafted.iff")
| agpl-3.0 |
renoth/factorio-alien-module | alien-module/prototypes/technology/technology.lua | 1 | 2590 | table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-plate"
})
table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-magazine"
})
table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-wall"
})
if settings.startup["alien-module-hyper-ammo-enabled"].value then
table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-hyper-magazine-1"
})
end
table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-ore-magazine"
})
table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-fuel"
})
table.insert(data.raw["technology"]["military"].effects,
{
type = "unlock-recipe",
recipe = "alien-gun-turret"
})
if data.raw["item"]["alien-artifact"] then
table.insert(data.raw["technology"]["automation"].effects,
{
type = "unlock-recipe",
recipe = "alien-artifact-to-ore"
})
end
table.insert(data.raw["technology"]["advanced-material-processing"].effects,
{
type = "unlock-recipe",
recipe = "alien-steel-plate"
})
table.insert(data.raw["technology"]["automation-2"].effects,
{
type = "unlock-recipe",
recipe = "alien-steam-engine"
})
table.insert(data.raw["technology"]["automation"].effects,
{
type = "unlock-recipe",
recipe = "alien-module-1"
})
table.insert(data.raw["technology"]["automation"].effects,
{
type = "unlock-recipe",
recipe = "alien-hyper-module-1"
})
table.insert(data.raw["technology"]["automation"].effects,
{
type = "unlock-recipe",
recipe = "alien-module-2"
})
table.insert(data.raw["technology"]["automation"].effects,
{
type = "unlock-recipe",
recipe = "alien-mining-drill"
})
table.insert(data.raw["technology"]["advanced-electronics"].effects,
{
type = "unlock-recipe",
recipe = "alien-module-3"
})
table.insert(data.raw["technology"]["advanced-electronics"].effects,
{
type = "unlock-recipe",
recipe = "alien-module-4"
})
table.insert(data.raw["technology"]["advanced-electronics"].effects,
{
type = "unlock-recipe",
recipe = "alien-module-5"
})
table.insert(data.raw["technology"]["solar-energy"].effects,
{
type = "unlock-recipe",
recipe = "alien-solarpanel"
})
table.insert(data.raw["technology"]["electric-energy-accumulators"].effects,
{
type = "unlock-recipe",
recipe = "alien-accumulator"
})
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/space/debris/death_star_debris_d.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_static_space_debris_death_star_debris_d = object_static_space_debris_shared_death_star_debris_d:new {
}
ObjectTemplates:addTemplate(object_static_space_debris_death_star_debris_d, "object/static/space/debris/death_star_debris_d.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/crafted/engine/hyperdrive_class1.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_ship_crafted_engine_hyperdrive_class1 = object_tangible_ship_crafted_engine_shared_hyperdrive_class1:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_crafted_engine_hyperdrive_class1, "object/tangible/ship/crafted/engine/hyperdrive_class1.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/component/armor/armor_segment_zam_advanced.lua | 2 | 3366 | --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_segment_zam_advanced = object_tangible_component_armor_shared_armor_segment_zam_advanced:new {
numberExperimentalProperties = {1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1},
experimentalProperties = {"XX", "XX", "XX", "XX", "OQ", "SR", "OQ", "UT", "MA", "OQ", "MA", "OQ", "MA", "OQ", "XX", "XX", "OQ", "SR", "XX"},
experimentalWeights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "exp_durability", "exp_quality", "exp_quality", "exp_durability", "exp_durability", "exp_durability", "exp_durability", "null", "null", "exp_resistance", "null"},
experimentalSubGroupTitles = {"null", "null", "hit_points", "quality", "armor_effectiveness", "armor_integrity", "armor_health_encumbrance", "armor_action_encumbrance", "armor_mind_encumbrance", "armor_rating", "armor_special_type", "armor_special_effectiveness", "armor_special_integrity"},
experimentalMin = {0, 0, 1000, 1, 1, 100, 6, 8, 4, 1, 32, 1, 100},
experimentalMax = {0, 0, 1000, 40, 10, 1000, 1, 1, 1, 1, 32, 20, 1000},
experimentalPrecision = {0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0},
experimentalCombineType = {0, 0, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1},
}
ObjectTemplates:addTemplate(object_tangible_component_armor_armor_segment_zam_advanced, "object/tangible/component/armor/armor_segment_zam_advanced.iff")
| agpl-3.0 |
bedll19/amir-arman | plugins/img_google.lua | 660 | 3196 | do
local mime = require("mime")
local google_config = load_from_file('data/google.lua')
local cache = {}
--[[
local function send_request(url)
local t = {}
local options = {
url = url,
sink = ltn12.sink.table(t),
method = "GET"
}
local a, code, headers, status = http.request(options)
return table.concat(t), code, headers, status
end]]--
local function get_google_data(text)
local url = "http://ajax.googleapis.com/ajax/services/search/images?"
url = url.."v=1.0&rsz=5"
url = url.."&q="..URL.escape(text)
url = url.."&imgsz=small|medium|large"
if google_config.api_keys then
local i = math.random(#google_config.api_keys)
local api_key = google_config.api_keys[i]
if api_key then
url = url.."&key="..api_key
end
end
local res, code = http.request(url)
if code ~= 200 then
print("HTTP Error code:", code)
return nil
end
local google = json:decode(res)
return google
end
-- Returns only the useful google data to save on cache
local function simple_google_table(google)
local new_table = {}
new_table.responseData = {}
new_table.responseDetails = google.responseDetails
new_table.responseStatus = google.responseStatus
new_table.responseData.results = {}
local results = google.responseData.results
for k,result in pairs(results) do
new_table.responseData.results[k] = {}
new_table.responseData.results[k].unescapedUrl = result.unescapedUrl
new_table.responseData.results[k].url = result.url
end
return new_table
end
local function save_to_cache(query, data)
-- Saves result on cache
if string.len(query) <= 7 then
local text_b64 = mime.b64(query)
if not cache[text_b64] then
local simple_google = simple_google_table(data)
cache[text_b64] = simple_google
end
end
end
local function process_google_data(google, receiver, query)
if google.responseStatus == 403 then
local text = 'ERROR: Reached maximum searches per day'
send_msg(receiver, text, ok_cb, false)
elseif google.responseStatus == 200 then
local data = google.responseData
if not data or not data.results or #data.results == 0 then
local text = 'Image not found.'
send_msg(receiver, text, ok_cb, false)
return false
end
-- Random image from table
local i = math.random(#data.results)
local url = data.results[i].unescapedUrl or data.results[i].url
local old_timeout = http.TIMEOUT or 10
http.TIMEOUT = 5
send_photo_from_url(receiver, url)
http.TIMEOUT = old_timeout
save_to_cache(query, google)
else
local text = 'ERROR!'
send_msg(receiver, text, ok_cb, false)
end
end
function run(msg, matches)
local receiver = get_receiver(msg)
local text = matches[1]
local text_b64 = mime.b64(text)
local cached = cache[text_b64]
if cached then
process_google_data(cached, receiver, text)
else
local data = get_google_data(text)
process_google_data(data, receiver, text)
end
end
return {
description = "Search image with Google API and sends it.",
usage = "!img [term]: Random search an image with Google API.",
patterns = {
"^!img (.*)$"
},
run = run
}
end
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/wearables/bracelet/bracelet_s04_r.lua | 3 | 4215 | --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_bracelet_bracelet_s04_r = object_tangible_wearables_bracelet_shared_bracelet_s04_r: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/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/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/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/zabrak_female.iff",
"object/mobile/vendor/zabrak_male.iff" },
}
ObjectTemplates:addTemplate(object_tangible_wearables_bracelet_bracelet_s04_r, "object/tangible/wearables/bracelet/bracelet_s04_r.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/space/weapon/wpn_advanced_ioncannon.lua | 1 | 3483 | --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_weapon_wpn_advanced_ioncannon = object_draft_schematic_space_weapon_shared_wpn_advanced_ioncannon:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Advanced Ion Cannon",
craftingToolTab = 131072, -- (See DraftSchematicObjectTemplate.h)
complexity = 32,
size = 1,
xpType = "shipwright",
xp = 625,
assemblySkill = "weapon_systems",
experimentingSkill = "weapons_systems_experimentation",
customizationSkill = "medicine_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n"},
ingredientTitleNames = {"casing", "ship_blaster_core", "weapon_upgrade", "blaster_cooling_mechanism", "energy_shielding"},
ingredientSlotType = {0, 0, 3, 0, 0},
resourceTypes = {"steel", "radioactive", "object/tangible/ship/crafted/weapon/shared_base_weapon_subcomponent_mk4.iff", "gas_inert", "ore_carbonate"},
resourceQuantities = {625, 625, 1, 625, 625},
contribution = {100, 100, 100, 100, 100},
targetTemplate = "object/tangible/ship/crafted/weapon/wpn_advanced_ioncannon.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_space_weapon_wpn_advanced_ioncannon, "object/draft_schematic/space/weapon/wpn_advanced_ioncannon.iff")
| agpl-3.0 |
sprunk/Zero-K | effects/nota_otaplas.lua | 50 | 48727 | -- miniotaplas_fireball11
-- otaplas_fireball3
-- otaplas_fireball16
-- otaplas_fireball14
-- ota_plas
-- miniotaplas_fireball17
-- otaplas_fireball18
-- otaplas_fireball1
-- otaplas_fireball11
-- miniotaplas_fireball13
-- otaplas_fireball10
-- miniotaplas_fireball16
-- otaplas_fireball13
-- miniotaplas_fireball2
-- otaplas_fireball7
-- miniotaplas_fireball14
-- otaplas_fireball12
-- miniotaplas_fireball7
-- otaplas_fireball17
-- miniotaplas_fireball9
-- miniotaplas_fireball18
-- miniota_plas
-- miniotaplas_fireball3
-- otaplas_fireball6
-- otaplas_fireball4
-- miniotaplas_fireball5
-- otaplas_fireball8
-- miniotaplas_fireball15
-- otaplas_fireball2
-- miniotaplas_fireball6
-- otaplas_fireball15
-- otaplas_fireball9
-- miniotaplas_fireball8
-- miniotaplas_fireball4
-- miniotaplas_fireball10
-- miniotaplas_fireball12
-- miniotaplas_fireball1
-- otaplas_fireball5
return {
["miniotaplas_fireball11"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas11]],
},
},
},
["otaplas_fireball3"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas3]],
},
},
},
["otaplas_fireball16"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas16]],
},
},
},
["otaplas_fireball14"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas14]],
},
},
},
["ota_plas"] = {
frame1 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 0,
explosiongenerator = [[custom:OTAPLAS_FIREBALL1]],
pos = [[0, 0, 0]],
},
},
frame10 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 18,
explosiongenerator = [[custom:OTAPLAS_FIREBALL10]],
pos = [[0, 9, 0]],
},
},
frame11 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 20,
explosiongenerator = [[custom:OTAPLAS_FIREBALL11]],
pos = [[0, 10, 0]],
},
},
frame12 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 22,
explosiongenerator = [[custom:OTAPLAS_FIREBALL12]],
pos = [[0, 11, 0]],
},
},
frame13 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 24,
explosiongenerator = [[custom:OTAPLAS_FIREBALL13]],
pos = [[0, 12, 0]],
},
},
frame14 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 26,
explosiongenerator = [[custom:OTAPLAS_FIREBALL14]],
pos = [[0, 13, 0]],
},
},
frame15 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 28,
explosiongenerator = [[custom:OTAPLAS_FIREBALL15]],
pos = [[0, 14, 0]],
},
},
frame16 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 30,
explosiongenerator = [[custom:OTAPLAS_FIREBALL16]],
pos = [[0, 15, 0]],
},
},
frame17 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 32,
explosiongenerator = [[custom:OTAPLAS_FIREBALL17]],
pos = [[0, 16, 0]],
},
},
frame18 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 34,
explosiongenerator = [[custom:OTAPLAS_FIREBALL18]],
pos = [[0, 17, 0]],
},
},
frame2 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 2,
explosiongenerator = [[custom:OTAPLAS_FIREBALL2]],
pos = [[0, 1, 0]],
},
},
frame3 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 4,
explosiongenerator = [[custom:OTAPLAS_FIREBALL3]],
pos = [[0, 2, 0]],
},
},
frame4 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 6,
explosiongenerator = [[custom:OTAPLAS_FIREBALL4]],
pos = [[0, 3, 0]],
},
},
frame5 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 8,
explosiongenerator = [[custom:OTAPLAS_FIREBALL5]],
pos = [[0, 4, 0]],
},
},
frame6 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 10,
explosiongenerator = [[custom:OTAPLAS_FIREBALL6]],
pos = [[0, 5, 0]],
},
},
frame7 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 12,
explosiongenerator = [[custom:OTAPLAS_FIREBALL7]],
pos = [[0, 6, 0]],
},
},
frame8 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 14,
explosiongenerator = [[custom:OTAPLAS_FIREBALL8]],
pos = [[0, 7, 0]],
},
},
frame9 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 16,
explosiongenerator = [[custom:OTAPLAS_FIREBALL9]],
pos = [[0, 8, 0]],
},
},
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 0.9,
flashsize = 40,
ttl = 20,
color = {
[1] = 1,
[2] = 0.69999998807907,
[3] = 0.69999998807907,
},
},
},
["miniotaplas_fireball17"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas17]],
},
},
},
["otaplas_fireball18"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0 0 0 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas18]],
},
},
},
["otaplas_fireball1"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[1 1 1 0.01 1 1 1 0.01 .5 .5 .5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas1]],
},
},
},
["otaplas_fireball11"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas11]],
},
},
},
["miniotaplas_fireball13"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas13]],
},
},
},
["otaplas_fireball10"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas10]],
},
},
},
["miniotaplas_fireball16"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas16]],
},
},
},
["otaplas_fireball13"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas13]],
},
},
},
["miniotaplas_fireball2"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .5,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas2]],
},
},
},
["otaplas_fireball7"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas7]],
},
},
},
["miniotaplas_fireball14"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas14]],
},
},
},
["otaplas_fireball12"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas12]],
},
},
},
["miniotaplas_fireball7"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas7]],
},
},
},
["otaplas_fireball17"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas17]],
},
},
},
["miniotaplas_fireball9"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas9]],
},
},
},
["miniotaplas_fireball18"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0 0 0 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas18]],
},
},
},
["miniota_plas"] = {
frame1 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 0,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL1]],
pos = [[0, 0, 0]],
},
},
frame10 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 18,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL10]],
pos = [[0, 9, 0]],
},
},
frame11 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 20,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL11]],
pos = [[0, 10, 0]],
},
},
frame12 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 22,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL12]],
pos = [[0, 11, 0]],
},
},
frame13 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 24,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL13]],
pos = [[0, 12, 0]],
},
},
frame14 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 26,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL14]],
pos = [[0, 13, 0]],
},
},
frame15 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 28,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL15]],
pos = [[0, 14, 0]],
},
},
frame16 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 30,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL16]],
pos = [[0, 15, 0]],
},
},
frame17 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 32,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL17]],
pos = [[0, 16, 0]],
},
},
frame18 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 34,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL18]],
pos = [[0, 17, 0]],
},
},
frame2 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 2,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL2]],
pos = [[0, 1, 0]],
},
},
frame3 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 4,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL3]],
pos = [[0, 2, 0]],
},
},
frame4 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 6,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL4]],
pos = [[0, 3, 0]],
},
},
frame5 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 8,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL5]],
pos = [[0, 4, 0]],
},
},
frame6 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 10,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL6]],
pos = [[0, 5, 0]],
},
},
frame7 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 12,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL7]],
pos = [[0, 6, 0]],
},
},
frame8 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 14,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL8]],
pos = [[0, 7, 0]],
},
},
frame9 = {
air = true,
class = [[CExpGenSpawner]],
count = 1,
ground = true,
water = true,
properties = {
delay = 16,
explosiongenerator = [[custom:MINIOTAPLAS_FIREBALL9]],
pos = [[0, 8, 0]],
},
},
groundflash = {
circlealpha = 1,
circlegrowth = 0,
flashalpha = 0.9,
flashsize = 40,
ttl = 20,
color = {
[1] = 1,
[2] = 0.69999998807907,
[3] = 0.69999998807907,
},
},
},
["miniotaplas_fireball3"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas3]],
},
},
},
["otaplas_fireball6"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas6]],
},
},
},
["otaplas_fireball4"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas4]],
},
},
},
["miniotaplas_fireball5"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas5]],
},
},
},
["otaplas_fireball8"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas8]],
},
},
},
["miniotaplas_fireball15"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas15]],
},
},
},
["otaplas_fireball2"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .5,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas2]],
},
},
},
["miniotaplas_fireball6"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas6]],
},
},
},
["otaplas_fireball15"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas15]],
},
},
},
["otaplas_fireball9"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas9]],
},
},
},
["miniotaplas_fireball8"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas8]],
},
},
},
["miniotaplas_fireball4"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas4]],
},
},
},
["miniotaplas_fireball10"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas10]],
},
},
},
["miniotaplas_fireball12"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas12]],
},
},
},
["miniotaplas_fireball1"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[1 1 1 0.01 1 1 1 0.01 .5 .5 .5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 25,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas1]],
},
},
},
["otaplas_fireball5"] = {
wezels = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 1,
colormap = [[0.5 0.5 0.5 0.01 1 1 1 0.01 0.5 0.5 0.5 0.01]],
directional = false,
emitrot = 0,
emitrotspread = 1,
emitvector = [[0, 1, 0]],
gravity = [[0, 0, 0]],
numparticles = 1,
particlelife = 6,
particlelifespread = 0,
particlesize = 35,
particlesizespread = 0,
particlespeed = .3,
particlespeedspread = 0,
pos = [[0, 0, 0]],
sizegrowth = 0,
sizemod = 1.0,
texture = [[otaplas5]],
},
},
},
}
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/attachment/weapon/xwing_weapon2_pos_s01_1.lua | 3 | 2308 | --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_attachment_weapon_xwing_weapon2_pos_s01_1 = object_tangible_ship_attachment_weapon_shared_xwing_weapon2_pos_s01_1:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_attachment_weapon_xwing_weapon2_pos_s01_1, "object/tangible/ship/attachment/weapon/xwing_weapon2_pos_s01_1.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/loot/items/armor/kashyyykian_hunting_armor_leggings.lua | 4 | 1939 | kashyyykian_hunting_armor_leggings = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/wearables/armor/kashyyykian_hunting/armor_kashyyykian_hunting_leggings.iff",
craftingValues = {
{"armor_rating",1,1,0},
{"armor_effectiveness",8,39,10},
{"armor_integrity",30000, 55000,0},
{"armor_health_encumbrance",70,40,0},
{"armor_action_encumbrance",175,105,0},
{"armor_mind_encumbrance",22,13,0},
},
skillMods = {
},
customizationStringNames = {"/private/index_color_1", "/private/index_color_2", "/private/index_color_3", "/private/index_color_4"},
customizationValues = {
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}
},
junkDealerTypeNeeded = JUNKARMOUR,
junkMinValue = 55,
junkMaxValue = 110
}
addLootItemTemplate("kashyyykian_hunting_armor_leggings", kashyyykian_hunting_armor_leggings)
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/sign/all_sign_city_s03.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_tangible_sign_all_sign_city_s03 = object_tangible_sign_shared_all_sign_city_s03:new {
}
ObjectTemplates:addTemplate(object_tangible_sign_all_sign_city_s03, "object/tangible/sign/all_sign_city_s03.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_pirate_leader_of_tatooine.lua | 3 | 2248 | --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_pirate_leader_of_tatooine = object_mobile_shared_dressed_pirate_leader_of_tatooine:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_pirate_leader_of_tatooine, "object/mobile/dressed_pirate_leader_of_tatooine.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/component/armor/heavy_armor_layer_electrical.lua | 3 | 2300 | --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_heavy_armor_layer_electrical = object_tangible_component_armor_shared_heavy_armor_layer_electrical:new {
}
ObjectTemplates:addTemplate(object_tangible_component_armor_heavy_armor_layer_electrical, "object/tangible/component/armor/heavy_armor_layer_electrical.iff")
| agpl-3.0 |
mretegan/crispy | crispy/quanty/templates/5d_C3v_XAS_3s.lua | 1 | 25024 | --------------------------------------------------------------------------------
-- Quanty input file generated using Crispy. If you use this file please cite
-- the following reference: http://dx.doi.org/10.5281/zenodo.1008184.
--
-- elements: 5d
-- symmetry: C3v
-- experiment: XAS
-- edge: M1 (3s)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Set the verbosity of the calculation. For increased verbosity use the values
-- 0x00FF or 0xFFFF.
--------------------------------------------------------------------------------
Verbosity($Verbosity)
--------------------------------------------------------------------------------
-- Define the parameters of the calculation.
--------------------------------------------------------------------------------
Temperature = $Temperature -- Temperature (Kelvin).
NPsis = $NPsis -- Number of states to consider in the spectra calculation.
NPsisAuto = $NPsisAuto -- Determine the number of state automatically.
NConfigurations = $NConfigurations -- Number of configurations.
Emin = $XEmin -- Minimum value of the energy range (eV).
Emax = $XEmax -- Maximum value of the energy range (eV).
NPoints = $XNPoints -- Number of points of the spectra.
ZeroShift = $XZeroShift -- Shift that brings the edge or line energy to approximately zero (eV).
ExperimentalShift = $XExperimentalShift -- Experimental edge or line energy (eV).
Gaussian = $XGaussian -- Gaussian FWHM (eV).
Lorentzian = $XLorentzian -- Lorentzian FWHM (eV).
Gamma = $XGamma -- Lorentzian FWHM used in the spectra calculation (eV).
WaveVector = $XWaveVector -- Wave vector.
Ev = $XFirstPolarization -- Vertical polarization.
Eh = $XSecondPolarization -- Horizontal polarization.
SpectraToCalculate = $SpectraToCalculate -- Types of spectra to calculate.
DenseBorder = $DenseBorder -- Number of determinants where we switch from dense methods to sparse methods.
ShiftSpectra = $ShiftSpectra -- If enabled, shift the spectra in the experimental energy range.
Prefix = "$Prefix" -- File name prefix.
--------------------------------------------------------------------------------
-- Toggle the Hamiltonian terms.
--------------------------------------------------------------------------------
AtomicTerm = $AtomicTerm
CrystalFieldTerm = $CrystalFieldTerm
MagneticFieldTerm = $MagneticFieldTerm
ExchangeFieldTerm = $ExchangeFieldTerm
--------------------------------------------------------------------------------
-- Define the number of electrons, shells, etc.
--------------------------------------------------------------------------------
NBosons = 0
NFermions = 12
NElectrons_3s = 2
NElectrons_5d = $NElectrons_5d
IndexDn_3s = {0}
IndexUp_3s = {1}
IndexDn_5d = {2, 4, 6, 8, 10}
IndexUp_5d = {3, 5, 7, 9, 11}
--------------------------------------------------------------------------------
-- Initialize the Hamiltonians.
--------------------------------------------------------------------------------
H_i = 0
H_f = 0
--------------------------------------------------------------------------------
-- Define the atomic term.
--------------------------------------------------------------------------------
N_3s = NewOperator("Number", NFermions, IndexUp_3s, IndexUp_3s, {1})
+ NewOperator("Number", NFermions, IndexDn_3s, IndexDn_3s, {1})
N_5d = NewOperator("Number", NFermions, IndexUp_5d, IndexUp_5d, {1, 1, 1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_5d, IndexDn_5d, {1, 1, 1, 1, 1})
if AtomicTerm then
F0_5d_5d = NewOperator("U", NFermions, IndexUp_5d, IndexDn_5d, {1, 0, 0})
F2_5d_5d = NewOperator("U", NFermions, IndexUp_5d, IndexDn_5d, {0, 1, 0})
F4_5d_5d = NewOperator("U", NFermions, IndexUp_5d, IndexDn_5d, {0, 0, 1})
F0_3s_5d = NewOperator("U", NFermions, IndexUp_3s, IndexDn_3s, IndexUp_5d, IndexDn_5d, {1}, {0})
G2_3s_5d = NewOperator("U", NFermions, IndexUp_3s, IndexDn_3s, IndexUp_5d, IndexDn_5d, {0}, {1})
U_5d_5d_i = $U(5d,5d)_i_value
F2_5d_5d_i = $F2(5d,5d)_i_value * $F2(5d,5d)_i_scaleFactor
F4_5d_5d_i = $F4(5d,5d)_i_value * $F4(5d,5d)_i_scaleFactor
F0_5d_5d_i = U_5d_5d_i + 2 / 63 * F2_5d_5d_i + 2 / 63 * F4_5d_5d_i
U_5d_5d_f = $U(5d,5d)_f_value
F2_5d_5d_f = $F2(5d,5d)_f_value * $F2(5d,5d)_f_scaleFactor
F4_5d_5d_f = $F4(5d,5d)_f_value * $F4(5d,5d)_f_scaleFactor
F0_5d_5d_f = U_5d_5d_f + 2 / 63 * F2_5d_5d_f + 2 / 63 * F4_5d_5d_f
U_3s_5d_f = $U(3s,5d)_f_value
G2_3s_5d_f = $G2(3s,5d)_f_value * $G2(3s,5d)_f_scaleFactor
F0_3s_5d_f = U_3s_5d_f + 1 / 10 * G2_3s_5d_f
H_i = H_i + Chop(
F0_5d_5d_i * F0_5d_5d
+ F2_5d_5d_i * F2_5d_5d
+ F4_5d_5d_i * F4_5d_5d)
H_f = H_f + Chop(
F0_5d_5d_f * F0_5d_5d
+ F2_5d_5d_f * F2_5d_5d
+ F4_5d_5d_f * F4_5d_5d
+ F0_3s_5d_f * F0_3s_5d
+ G2_3s_5d_f * G2_3s_5d)
ldots_5d = NewOperator("ldots", NFermions, IndexUp_5d, IndexDn_5d)
zeta_5d_i = $zeta(5d)_i_value * $zeta(5d)_i_scaleFactor
zeta_5d_f = $zeta(5d)_f_value * $zeta(5d)_f_scaleFactor
H_i = H_i + Chop(
zeta_5d_i * ldots_5d)
H_f = H_f + Chop(
zeta_5d_f * ldots_5d)
end
--------------------------------------------------------------------------------
-- Define the crystal field term.
--------------------------------------------------------------------------------
if CrystalFieldTerm then
Akm = {{4, 0, -14}, {4, 3, -2 * math.sqrt(70)}, {4, -3, 2 * math.sqrt(70)}}
Dq_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, Akm)
Akm = {{2, 0, -7}}
Dsigma_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, Akm)
Akm = {{4, 0, -21}}
Dtau_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, Akm)
Dq_5d_i = $10Dq(5d)_i_value / 10.0
Dsigma_5d_i = $Dsigma(5d)_i_value
Dtau_5d_i = $Dtau(5d)_i_value
io.write("Diagonal values of the initial crystal field Hamiltonian:\n")
io.write("================\n")
io.write("Irrep. E\n")
io.write("================\n")
io.write(string.format("a1(t2g) %8.3f\n", -4 * Dq_5d_i - 2 * Dsigma_5d_i - 6 * Dtau_5d_i))
io.write(string.format("e(t2g) %8.3f\n", -4 * Dq_5d_i + Dsigma_5d_i + 2 / 3 * Dtau_5d_i))
io.write(string.format("e(eg) %8.3f\n", 6 * Dq_5d_i + 7 / 3 * Dtau_5d_i))
io.write("================\n")
io.write("For the C3v symmetry, the crystal field Hamiltonian is not necessarily diagonal in\n")
io.write("the basis of the irreducible representations. See the König and Kremer book, page 56.\n")
io.write(string.format("The non-digonal element <e(t2g)|H|e(eg)> is %.3f.\n", -math.sqrt(2) / 3 * (3 * Dsigma_5d_i - 5 * Dtau_5d_i)))
io.write("\n")
Dq_5d_f = $10Dq(5d)_f_value / 10.0
Dsigma_5d_f = $Dsigma(5d)_f_value
Dtau_5d_f = $Dtau(5d)_f_value
H_i = H_i + Chop(
Dq_5d_i * Dq_5d
+ Dsigma_5d_i * Dsigma_5d
+ Dtau_5d_i * Dtau_5d)
H_f = H_f + Chop(
Dq_5d_f * Dq_5d
+ Dsigma_5d_f * Dsigma_5d
+ Dtau_5d_f * Dtau_5d)
end
--------------------------------------------------------------------------------
-- Define the magnetic field and exchange field terms.
--------------------------------------------------------------------------------
Sx_5d = NewOperator("Sx", NFermions, IndexUp_5d, IndexDn_5d)
Sy_5d = NewOperator("Sy", NFermions, IndexUp_5d, IndexDn_5d)
Sz_5d = NewOperator("Sz", NFermions, IndexUp_5d, IndexDn_5d)
Ssqr_5d = NewOperator("Ssqr", NFermions, IndexUp_5d, IndexDn_5d)
Splus_5d = NewOperator("Splus", NFermions, IndexUp_5d, IndexDn_5d)
Smin_5d = NewOperator("Smin", NFermions, IndexUp_5d, IndexDn_5d)
Lx_5d = NewOperator("Lx", NFermions, IndexUp_5d, IndexDn_5d)
Ly_5d = NewOperator("Ly", NFermions, IndexUp_5d, IndexDn_5d)
Lz_5d = NewOperator("Lz", NFermions, IndexUp_5d, IndexDn_5d)
Lsqr_5d = NewOperator("Lsqr", NFermions, IndexUp_5d, IndexDn_5d)
Lplus_5d = NewOperator("Lplus", NFermions, IndexUp_5d, IndexDn_5d)
Lmin_5d = NewOperator("Lmin", NFermions, IndexUp_5d, IndexDn_5d)
Jx_5d = NewOperator("Jx", NFermions, IndexUp_5d, IndexDn_5d)
Jy_5d = NewOperator("Jy", NFermions, IndexUp_5d, IndexDn_5d)
Jz_5d = NewOperator("Jz", NFermions, IndexUp_5d, IndexDn_5d)
Jsqr_5d = NewOperator("Jsqr", NFermions, IndexUp_5d, IndexDn_5d)
Jplus_5d = NewOperator("Jplus", NFermions, IndexUp_5d, IndexDn_5d)
Jmin_5d = NewOperator("Jmin", NFermions, IndexUp_5d, IndexDn_5d)
Tx_5d = NewOperator("Tx", NFermions, IndexUp_5d, IndexDn_5d)
Ty_5d = NewOperator("Ty", NFermions, IndexUp_5d, IndexDn_5d)
Tz_5d = NewOperator("Tz", NFermions, IndexUp_5d, IndexDn_5d)
Sx = Sx_5d
Sy = Sy_5d
Sz = Sz_5d
Lx = Lx_5d
Ly = Ly_5d
Lz = Lz_5d
Jx = Jx_5d
Jy = Jy_5d
Jz = Jz_5d
Tx = Tx_5d
Ty = Ty_5d
Tz = Tz_5d
Ssqr = Sx * Sx + Sy * Sy + Sz * Sz
Lsqr = Lx * Lx + Ly * Ly + Lz * Lz
Jsqr = Jx * Jx + Jy * Jy + Jz * Jz
if MagneticFieldTerm then
-- The values are in eV, and not Tesla. To convert from Tesla to eV multiply
-- the value with EnergyUnits.Tesla.value.
Bx_i = $Bx_i_value
By_i = $By_i_value
Bz_i = $Bz_i_value
Bx_f = $Bx_f_value
By_f = $By_f_value
Bz_f = $Bz_f_value
H_i = H_i + Chop(
Bx_i * (2 * Sx + Lx)
+ By_i * (2 * Sy + Ly)
+ Bz_i * (2 * Sz + Lz))
H_f = H_f + Chop(
Bx_f * (2 * Sx + Lx)
+ By_f * (2 * Sy + Ly)
+ Bz_f * (2 * Sz + Lz))
end
if ExchangeFieldTerm then
Hx_i = $Hx_i_value
Hy_i = $Hy_i_value
Hz_i = $Hz_i_value
Hx_f = $Hx_f_value
Hy_f = $Hy_f_value
Hz_f = $Hz_f_value
H_i = H_i + Chop(
Hx_i * Sx
+ Hy_i * Sy
+ Hz_i * Sz)
H_f = H_f + Chop(
Hx_f * Sx
+ Hy_f * Sy
+ Hz_f * Sz)
end
--------------------------------------------------------------------------------
-- Define the restrictions and set the number of initial states.
--------------------------------------------------------------------------------
InitialRestrictions = {NFermions, NBosons, {"11 0000000000", NElectrons_3s, NElectrons_3s},
{"00 1111111111", NElectrons_5d, NElectrons_5d}}
FinalRestrictions = {NFermions, NBosons, {"11 0000000000", NElectrons_3s - 1, NElectrons_3s - 1},
{"00 1111111111", NElectrons_5d + 1, NElectrons_5d + 1}}
CalculationRestrictions = nil
--------------------------------------------------------------------------------
-- Define some helper functions.
--------------------------------------------------------------------------------
function MatrixToOperator(Matrix, StartIndex)
-- Transform a matrix to an operator.
local Operator = 0
for i = 1, #Matrix do
for j = 1, #Matrix do
local Weight = Matrix[i][j]
Operator = Operator + NewOperator("Number", #Matrix + StartIndex, i + StartIndex - 1, j + StartIndex - 1) * Weight
end
end
Operator.Chop()
return Operator
end
function ValueInTable(Value, Table)
-- Check if a value is in a table.
for _, v in ipairs(Table) do
if Value == v then
return true
end
end
return false
end
function GetSpectrum(G, Ids, dZ, NOperators, NPsis)
-- Extract the spectrum corresponding to the operators identified using the
-- Ids argument. The returned spectrum is a weighted sum, where the weights
-- are the Boltzmann probabilities.
--
-- @param G userdata: Spectrum object as returned by the functions defined in Quanty, i.e. one spectrum
-- for each operator and each wavefunction.
-- @param Ids table: Indexes of the operators that are considered in the returned spectrum.
-- @param dZ table: Boltzmann prefactors for each of the spectrum in the spectra object.
-- @param NOperators number: Number of transition operators.
-- @param NPsis number: Number of wavefunctions.
if not (type(Ids) == "table") then
Ids = {Ids}
end
local Id = 1
local dZs = {}
for i = 1, NOperators do
for _ = 1, NPsis do
if ValueInTable(i, Ids) then
table.insert(dZs, dZ[Id])
else
table.insert(dZs, 0)
end
Id = Id + 1
end
end
return Spectra.Sum(G, dZs)
end
function SaveSpectrum(G, Filename, Gaussian, Lorentzian, Pcl)
if Pcl == nil then
Pcl = 1
end
G = -1 / math.pi / Pcl * G
G.Broaden(Gaussian, Lorentzian)
G.Print({{"file", Filename .. ".spec"}})
end
function CalculateT(Basis, Eps, K)
-- Calculate the transition operator in the basis of tesseral harmonics for
-- an arbitrary polarization and wave-vector (for quadrupole operators).
--
-- @param Basis table: Operators forming the basis.
-- @param Eps table: Cartesian components of the polarization vector.
-- @param K table: Cartesian components of the wave-vector.
if #Basis == 3 then
-- The basis for the dipolar operators must be in the order x, y, z.
T = Eps[1] * Basis[1]
+ Eps[2] * Basis[2]
+ Eps[3] * Basis[3]
elseif #Basis == 5 then
-- The basis for the quadrupolar operators must be in the order xy, xz, yz, x2y2, z2.
T = (Eps[1] * K[2] + Eps[2] * K[1]) / math.sqrt(3) * Basis[1]
+ (Eps[1] * K[3] + Eps[3] * K[1]) / math.sqrt(3) * Basis[2]
+ (Eps[2] * K[3] + Eps[3] * K[2]) / math.sqrt(3) * Basis[3]
+ (Eps[1] * K[1] - Eps[2] * K[2]) / math.sqrt(3) * Basis[4]
+ (Eps[3] * K[3]) * Basis[5]
end
return Chop(T)
end
function DotProduct(a, b)
return Chop(a[1] * b[1] + a[2] * b[2] + a[3] * b[3])
end
function WavefunctionsAndBoltzmannFactors(H, NPsis, NPsisAuto, Temperature, Threshold, StartRestrictions, CalculationRestrictions)
-- Calculate the wavefunctions and Boltzmann factors of a Hamiltonian.
--
-- @param H userdata: Hamiltonian for which to calculate the wavefunctions.
-- @param NPsis number: The number of wavefunctions.
-- @param NPsisAuto boolean: Determine automatically the number of wavefunctions that are populated at the specified
-- temperature and within the threshold.
-- @param Temperature number: The temperature in eV.
-- @param Threshold number: Threshold used to determine the number of wavefunction in the automatic procedure.
-- @param StartRestrictions table: Occupancy restrictions at the start of the calculation.
-- @param CalculationRestrictions table: Occupancy restrictions used during the calculation.
-- @return table: The calculated wavefunctions.
-- @return table: The calculated Boltzmann factors.
if Threshold == nil then
Threshold = 1e-8
end
local dZ = {}
local Z = 0
local Psis
if NPsisAuto == true and NPsis ~= 1 then
NPsis = 4
local NPsisIncrement = 8
local NPsisIsConverged = false
while not NPsisIsConverged do
if CalculationRestrictions == nil then
Psis = Eigensystem(H, StartRestrictions, NPsis)
else
Psis = Eigensystem(H, StartRestrictions, NPsis, {{"restrictions", CalculationRestrictions}})
end
if not (type(Psis) == "table") then
Psis = {Psis}
end
if E_gs == nil then
E_gs = Psis[1] * H * Psis[1]
end
Z = 0
for i, Psi in ipairs(Psis) do
local E = Psi * H * Psi
if math.abs(E - E_gs) < Threshold ^ 2 then
dZ[i] = 1
else
dZ[i] = math.exp(-(E - E_gs) / Temperature)
end
Z = Z + dZ[i]
if dZ[i] / Z < Threshold then
i = i - 1
NPsisIsConverged = true
NPsis = i
Psis = {unpack(Psis, 1, i)}
dZ = {unpack(dZ, 1, i)}
break
end
end
if NPsisIsConverged then
break
else
NPsis = NPsis + NPsisIncrement
end
end
else
if CalculationRestrictions == nil then
Psis = Eigensystem(H, StartRestrictions, NPsis)
else
Psis = Eigensystem(H, StartRestrictions, NPsis, {{"restrictions", CalculationRestrictions}})
end
if not (type(Psis) == "table") then
Psis = {Psis}
end
local E_gs = Psis[1] * H * Psis[1]
Z = 0
for i, psi in ipairs(Psis) do
local E = psi * H * psi
if math.abs(E - E_gs) < Threshold ^ 2 then
dZ[i] = 1
else
dZ[i] = math.exp(-(E - E_gs) / Temperature)
end
Z = Z + dZ[i]
end
end
-- Normalize the Boltzmann factors to unity.
for i in ipairs(dZ) do
dZ[i] = dZ[i] / Z
end
return Psis, dZ
end
function PrintHamiltonianAnalysis(Psis, Operators, dZ, Header, Footer)
io.write(Header)
for i, Psi in ipairs(Psis) do
io.write(string.format("%5d", i))
for j, Operator in ipairs(Operators) do
if j == 1 then
io.write(string.format("%12.6f", Complex.Re(Psi * Operator * Psi)))
elseif Operator == "dZ" then
io.write(string.format("%12.2e", dZ[i]))
else
io.write(string.format("%10.4f", Complex.Re(Psi * Operator * Psi)))
end
end
io.write("\n")
end
io.write(Footer)
end
function CalculateEnergyDifference(H1, H1Restrictions, H2, H2Restrictions)
-- Calculate the energy difference between the lowest eigenstates of the two
-- Hamiltonians.
--
-- @param H1 userdata: The first Hamiltonian.
-- @param H1Restrictions table: Restrictions of the occupation numbers for H1.
-- @param H2 userdata: The second Hamiltonian.
-- @param H2Restrictions table: Restrictions of the occupation numbers for H2.
local E1 = 0.0
local E2 = 0.0
if H1 ~= nil and H1Restrictions ~= nil then
Psis1, _ = WavefunctionsAndBoltzmannFactors(H1, 1, false, 0, nil, H1Restrictions, nil)
E1 = Psis1[1] * H1 * Psis1[1]
end
if H2 ~= nil and H2Restrictions ~= nil then
Psis2, _ = WavefunctionsAndBoltzmannFactors(H2, 1, false, 0, nil, H2Restrictions, nil)
E2 = Psis2[1] * H2 * Psis2[1]
end
return E1 - E2
end
--------------------------------------------------------------------------------
-- Analyze the initial Hamiltonian.
--------------------------------------------------------------------------------
Temperature = Temperature * EnergyUnits.Kelvin.value
Sk = DotProduct(WaveVector, {Sx, Sy, Sz})
Lk = DotProduct(WaveVector, {Lx, Ly, Lz})
Jk = DotProduct(WaveVector, {Jx, Jy, Jz})
Tk = DotProduct(WaveVector, {Tx, Ty, Tz})
Operators = {H_i, Ssqr, Lsqr, Jsqr, Sk, Lk, Jk, Tk, ldots_5d, N_3s, N_5d, "dZ"}
Header = "Analysis of the %s Hamiltonian:\n"
Header = Header .. "=================================================================================================================================\n"
Header = Header .. "State E <S^2> <L^2> <J^2> <Sk> <Lk> <Jk> <Tk> <l.s> <N_3s> <N_5d> dZ\n"
Header = Header .. "=================================================================================================================================\n"
Footer = "=================================================================================================================================\n"
local Psis_i, dZ_i = WavefunctionsAndBoltzmannFactors(H_i, NPsis, NPsisAuto, Temperature, nil, InitialRestrictions, CalculationRestrictions)
PrintHamiltonianAnalysis(Psis_i, Operators, dZ_i, string.format(Header, "initial"), Footer)
-- Stop the calculation if no spectra need to be calculated.
if next(SpectraToCalculate) == nil then
return
end
--------------------------------------------------------------------------------
-- Calculate and save the spectra.
--------------------------------------------------------------------------------
local t = math.sqrt(1 / 2)
Txy_3s_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, IndexUp_3s, IndexDn_3s, {{2, -2, t * I}, {2, 2, -t * I}})
Txz_3s_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, IndexUp_3s, IndexDn_3s, {{2, -1, t }, {2, 1, -t }})
Tyz_3s_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, IndexUp_3s, IndexDn_3s, {{2, -1, t * I}, {2, 1, t * I}})
Tx2y2_3s_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, IndexUp_3s, IndexDn_3s, {{2, -2, t }, {2, 2, t }})
Tz2_3s_5d = NewOperator("CF", NFermions, IndexUp_5d, IndexDn_5d, IndexUp_3s, IndexDn_3s, {{2, 0, 1 } })
Er = {t * (Eh[1] - I * Ev[1]),
t * (Eh[2] - I * Ev[2]),
t * (Eh[3] - I * Ev[3])}
El = {-t * (Eh[1] + I * Ev[1]),
-t * (Eh[2] + I * Ev[2]),
-t * (Eh[3] + I * Ev[3])}
local T = {Txy_3s_5d, Txz_3s_5d, Tyz_3s_5d, Tx2y2_3s_5d, Tz2_3s_5d}
Tv_3s_5d = CalculateT(T, Ev, WaveVector)
Th_3s_5d = CalculateT(T, Eh, WaveVector)
Tr_3s_5d = CalculateT(T, Er, WaveVector)
Tl_3s_5d = CalculateT(T, El, WaveVector)
Tk_3s_5d = CalculateT(T, WaveVector, WaveVector)
-- Initialize a table with the available spectra and the required operators.
SpectraAndOperators = {
["Isotropic Absorption"] = {Txy_3s_5d, Txz_3s_5d, Tyz_3s_5d, Tx2y2_3s_5d, Tz2_3s_5d},
["Absorption"] = {Tk_3s_5d,},
["Circular Dichroic"] = {Tr_3s_5d, Tl_3s_5d},
["Linear Dichroic"] = {Tv_3s_5d, Th_3s_5d},
}
-- Create an unordered set with the required operators.
local T_3s_5d = {}
for Spectrum, Operators in pairs(SpectraAndOperators) do
if ValueInTable(Spectrum, SpectraToCalculate) then
for _, Operator in pairs(Operators) do
T_3s_5d[Operator] = true
end
end
end
-- Give the operators table the form required by Quanty's functions.
local T = {}
for Operator, _ in pairs(T_3s_5d) do
table.insert(T, Operator)
end
T_3s_5d = T
Emin = Emin - (ZeroShift + ExperimentalShift)
Emax = Emax - (ZeroShift + ExperimentalShift)
if CalculationRestrictions == nil then
G_3s_5d = CreateSpectra(H_f, T_3s_5d, Psis_i, {{"Emin", Emin}, {"Emax", Emax}, {"NE", NPoints}, {"Gamma", Gamma}, {"DenseBorder", DenseBorder}})
else
G_3s_5d = CreateSpectra(H_f, T_3s_5d, Psis_i, {{"Emin", Emin}, {"Emax", Emax}, {"NE", NPoints}, {"Gamma", Gamma}, {"Restrictions", CalculationRestrictions}, {"DenseBorder", DenseBorder}})
end
if ShiftSpectra then
G_3s_5d.Shift(ZeroShift + ExperimentalShift)
end
-- Create a list with the Boltzmann probabilities for a given operator and wavefunction.
local dZ_3s_5d = {}
for _ in ipairs(T_3s_5d) do
for j in ipairs(Psis_i) do
table.insert(dZ_3s_5d, dZ_i[j])
end
end
local Ids = {}
for k, v in pairs(T_3s_5d) do
Ids[v] = k
end
-- Subtract the broadening used in the spectra calculations from the Lorentzian table.
for i, _ in ipairs(Lorentzian) do
-- The FWHM is the second value in each pair.
Lorentzian[i][2] = Lorentzian[i][2] - Gamma
end
Pcl_3s_5d = 1
for Spectrum, Operators in pairs(SpectraAndOperators) do
if ValueInTable(Spectrum, SpectraToCalculate) then
-- Find the indices of the spectrum's operators in the table used during the
-- calculation (this is unsorted).
SpectrumIds = {}
for _, Operator in pairs(Operators) do
table.insert(SpectrumIds, Ids[Operator])
end
if Spectrum == "Isotropic Absorption" then
Giso = GetSpectrum(G_3s_5d, SpectrumIds, dZ_3s_5d, #T_3s_5d, #Psis_i)
Giso = Giso / 15
SaveSpectrum(Giso, Prefix .. "_iso", Gaussian, Lorentzian, Pcl_3s_5d)
end
if Spectrum == "Absorption" then
Gk = GetSpectrum(G_3s_5d, SpectrumIds, dZ_3s_5d, #T_3s_5d, #Psis_i)
SaveSpectrum(Gk, Prefix .. "_k", Gaussian, Lorentzian, Pcl_3s_5d)
end
if Spectrum == "Circular Dichroic" then
Gr = GetSpectrum(G_3s_5d, SpectrumIds[1], dZ_3s_5d, #T_3s_5d, #Psis_i)
Gl = GetSpectrum(G_3s_5d, SpectrumIds[2], dZ_3s_5d, #T_3s_5d, #Psis_i)
SaveSpectrum(Gr, Prefix .. "_r", Gaussian, Lorentzian, Pcl_3s_5d)
SaveSpectrum(Gl, Prefix .. "_l", Gaussian, Lorentzian, Pcl_3s_5d)
SaveSpectrum(Gr - Gl, Prefix .. "_cd", Gaussian, Lorentzian)
end
if Spectrum == "Linear Dichroic" then
Gv = GetSpectrum(G_3s_5d, SpectrumIds[1], dZ_3s_5d, #T_3s_5d, #Psis_i)
Gh = GetSpectrum(G_3s_5d, SpectrumIds[2], dZ_3s_5d, #T_3s_5d, #Psis_i)
SaveSpectrum(Gv, Prefix .. "_v", Gaussian, Lorentzian, Pcl_3s_5d)
SaveSpectrum(Gh, Prefix .. "_h", Gaussian, Lorentzian, Pcl_3s_5d)
SaveSpectrum(Gv - Gh, Prefix .. "_ld", Gaussian, Lorentzian)
end
end
end
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/loot/collectible/collectible_parts/sculpture_structure_02.lua | 3 | 2352 | --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_loot_collectible_collectible_parts_sculpture_structure_02 = object_tangible_loot_collectible_collectible_parts_shared_sculpture_structure_02:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_collectible_collectible_parts_sculpture_structure_02, "object/tangible/loot/collectible/collectible_parts/sculpture_structure_02.iff")
| agpl-3.0 |
uspgamedev/demos | shadow-casting/light_source.lua | 1 | 1709 | local light_source = {
position = nil,
dragged = nil
}
local LightSource = {}
function LightSource.new(x, y)
local inst = setmetatable({}, {__index = light_source})
inst.position = {x, y}
inst.dragged = false
return inst
end
function light_source:mousepressed(x, y, button)
if button == 'l' then
if math.abs(x-self.position[1])<10 and math.abs(y-self.position[2])<10 then
self.dragged = true
end
end
end
function light_source:mousereleased(x, y, button)
if button == 'l' then
if self.dragged then
self.dragged = false
end
end
end
function light_source:draw()
local x, y = unpack(self.position)
love.graphics.push()
love.graphics.setColor(200, 200, 100)
love.graphics.circle("fill", x, y, 10, 5)
love.graphics.translate(x, y)
love.graphics.rotate(math.pi/5)
love.graphics.circle("fill", 0, 0, 10, 5)
love.graphics.pop()
if not _G.properties.string_mode then return end
love.graphics.setColor(125, 125, 125)
for _,v in pairs(_G.properties.entities) do
love.graphics.line(x, y, v.points[1], v.points[2])
love.graphics.line(x, y, v.points[3], v.points[4])
end
end
function light_source:update()
local W, H = _G.properties.width, _G.properties.height
local px, py = unpack(self.position)
if self.dragged then
self.position[1], self.position[2] = love.mouse.getX(), love.mouse.getY()
end
for _,v in pairs(_G.properties.entities) do
local x1, y1, x2, y2 = unpack(v.points)
local polygon = v.shadow.vertices
polygon[1], polygon[2] = x1, y1
polygon[3], polygon[4] = x1 + W*(x1-px), y1 + H*(y1-py)
polygon[5], polygon[6] = x2 + W*(x2-px), y2 + H*(y2-py)
polygon[7], polygon[8] = x2, y2
v.shadow.active = true
end
end
return LightSource
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/wearables/shirt/nightsister_shirt_s01.lua | 1 | 3633 | --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_shirt_nightsister_shirt_s01 = object_tangible_wearables_shirt_shared_nightsister_shirt_s01:new {
playerRaces = { "object/creature/player/bothan_female.iff",
"object/creature/player/human_female.iff",
"object/creature/player/moncal_female.iff",
"object/creature/player/rodian_female.iff",
"object/creature/player/sullustan_female.iff",
"object/creature/player/trandoshan_female.iff",
"object/creature/player/twilek_female.iff",
"object/creature/player/zabrak_female.iff",
"object/mobile/vendor/aqualish_female.iff",
"object/mobile/vendor/bith_female.iff",
"object/mobile/vendor/bothan_female.iff",
"object/mobile/vendor/human_female.iff",
"object/mobile/vendor/moncal_female.iff",
"object/mobile/vendor/rodian_female.iff",
"object/mobile/vendor/sullustan_female.iff",
"object/mobile/vendor/trandoshan_female.iff",
"object/mobile/vendor/twilek_female.iff",
"object/mobile/vendor/zabrak_female.iff" },
templateType = ARMOROBJECT,
objectMenuComponent = "ArmorObjectMenuComponent",
vulnerability = BLAST + ELECTRICITY + HEAT + COLD + ACID + LIGHTSABER,
specialResists = STUN,
-- These are default Blue Frog stats
healthEncumbrance = 300,
actionEncumbrance = 150,
mindEncumbrance = 100,
maxCondition = 30000,
-- LIGHT, MEDIUM, HEAVY
rating = LIGHT,
kinetic = 50,
energy = 50,
electricity = 0,
stun = 50,
blast = 20,
heat = 10,
cold = 10,
acid = 0,
lightSaber = 0,
}
ObjectTemplates:addTemplate(object_tangible_wearables_shirt_nightsister_shirt_s01, "object/tangible/wearables/shirt/nightsister_shirt_s01.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_tatooine_om_aynat.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_mobile_dressed_tatooine_om_aynat = object_mobile_shared_dressed_tatooine_om_aynat:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_tatooine_om_aynat, "object/mobile/dressed_tatooine_om_aynat.iff")
| agpl-3.0 |
mretegan/crispy | crispy/quanty/templates/4d_D4h_XAS_3p.lua | 1 | 36930 | --------------------------------------------------------------------------------
-- Quanty input file generated using Crispy. If you use this file please cite
-- the following reference: http://dx.doi.org/10.5281/zenodo.1008184.
--
-- elements: 4d
-- symmetry: D4h
-- experiment: XAS
-- edge: M2,3 (3p)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Set the verbosity of the calculation. For increased verbosity use the values
-- 0x00FF or 0xFFFF.
--------------------------------------------------------------------------------
Verbosity($Verbosity)
--------------------------------------------------------------------------------
-- Define the parameters of the calculation.
--------------------------------------------------------------------------------
Temperature = $Temperature -- Temperature (Kelvin).
NPsis = $NPsis -- Number of states to consider in the spectra calculation.
NPsisAuto = $NPsisAuto -- Determine the number of state automatically.
NConfigurations = $NConfigurations -- Number of configurations.
Emin = $XEmin -- Minimum value of the energy range (eV).
Emax = $XEmax -- Maximum value of the energy range (eV).
NPoints = $XNPoints -- Number of points of the spectra.
ZeroShift = $XZeroShift -- Shift that brings the edge or line energy to approximately zero (eV).
ExperimentalShift = $XExperimentalShift -- Experimental edge or line energy (eV).
Gaussian = $XGaussian -- Gaussian FWHM (eV).
Lorentzian = $XLorentzian -- Lorentzian FWHM (eV).
Gamma = $XGamma -- Lorentzian FWHM used in the spectra calculation (eV).
WaveVector = $XWaveVector -- Wave vector.
Ev = $XFirstPolarization -- Vertical polarization.
Eh = $XSecondPolarization -- Horizontal polarization.
SpectraToCalculate = $SpectraToCalculate -- Types of spectra to calculate.
DenseBorder = $DenseBorder -- Number of determinants where we switch from dense methods to sparse methods.
ShiftSpectra = $ShiftSpectra -- If enabled, shift the spectra in the experimental energy range.
Prefix = "$Prefix" -- File name prefix.
--------------------------------------------------------------------------------
-- Toggle the Hamiltonian terms.
--------------------------------------------------------------------------------
AtomicTerm = $AtomicTerm
CrystalFieldTerm = $CrystalFieldTerm
LmctLigandsHybridizationTerm = $LmctLigandsHybridizationTerm
MlctLigandsHybridizationTerm = $MlctLigandsHybridizationTerm
MagneticFieldTerm = $MagneticFieldTerm
ExchangeFieldTerm = $ExchangeFieldTerm
--------------------------------------------------------------------------------
-- Define the number of electrons, shells, etc.
--------------------------------------------------------------------------------
NBosons = 0
NFermions = 16
NElectrons_3p = 6
NElectrons_4d = $NElectrons_4d
IndexDn_3p = {0, 2, 4}
IndexUp_3p = {1, 3, 5}
IndexDn_4d = {6, 8, 10, 12, 14}
IndexUp_4d = {7, 9, 11, 13, 15}
if LmctLigandsHybridizationTerm then
NFermions = 26
NElectrons_L1 = 10
IndexDn_L1 = {16, 18, 20, 22, 24}
IndexUp_L1 = {17, 19, 21, 23, 25}
end
if MlctLigandsHybridizationTerm then
NFermions = 26
NElectrons_L2 = 0
IndexDn_L2 = {16, 18, 20, 22, 24}
IndexUp_L2 = {17, 19, 21, 23, 25}
end
if LmctLigandsHybridizationTerm and MlctLigandsHybridizationTerm then
return
end
--------------------------------------------------------------------------------
-- Initialize the Hamiltonians.
--------------------------------------------------------------------------------
H_i = 0
H_f = 0
--------------------------------------------------------------------------------
-- Define the atomic term.
--------------------------------------------------------------------------------
N_3p = NewOperator("Number", NFermions, IndexUp_3p, IndexUp_3p, {1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_3p, IndexDn_3p, {1, 1, 1})
N_4d = NewOperator("Number", NFermions, IndexUp_4d, IndexUp_4d, {1, 1, 1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_4d, IndexDn_4d, {1, 1, 1, 1, 1})
if AtomicTerm then
F0_4d_4d = NewOperator("U", NFermions, IndexUp_4d, IndexDn_4d, {1, 0, 0})
F2_4d_4d = NewOperator("U", NFermions, IndexUp_4d, IndexDn_4d, {0, 1, 0})
F4_4d_4d = NewOperator("U", NFermions, IndexUp_4d, IndexDn_4d, {0, 0, 1})
F0_3p_4d = NewOperator("U", NFermions, IndexUp_3p, IndexDn_3p, IndexUp_4d, IndexDn_4d, {1, 0}, {0, 0})
F2_3p_4d = NewOperator("U", NFermions, IndexUp_3p, IndexDn_3p, IndexUp_4d, IndexDn_4d, {0, 1}, {0, 0})
G1_3p_4d = NewOperator("U", NFermions, IndexUp_3p, IndexDn_3p, IndexUp_4d, IndexDn_4d, {0, 0}, {1, 0})
G3_3p_4d = NewOperator("U", NFermions, IndexUp_3p, IndexDn_3p, IndexUp_4d, IndexDn_4d, {0, 0}, {0, 1})
U_4d_4d_i = $U(4d,4d)_i_value
F2_4d_4d_i = $F2(4d,4d)_i_value * $F2(4d,4d)_i_scaleFactor
F4_4d_4d_i = $F4(4d,4d)_i_value * $F4(4d,4d)_i_scaleFactor
F0_4d_4d_i = U_4d_4d_i + 2 / 63 * F2_4d_4d_i + 2 / 63 * F4_4d_4d_i
U_4d_4d_f = $U(4d,4d)_f_value
F2_4d_4d_f = $F2(4d,4d)_f_value * $F2(4d,4d)_f_scaleFactor
F4_4d_4d_f = $F4(4d,4d)_f_value * $F4(4d,4d)_f_scaleFactor
F0_4d_4d_f = U_4d_4d_f + 2 / 63 * F2_4d_4d_f + 2 / 63 * F4_4d_4d_f
U_3p_4d_f = $U(3p,4d)_f_value
F2_3p_4d_f = $F2(3p,4d)_f_value * $F2(3p,4d)_f_scaleFactor
G1_3p_4d_f = $G1(3p,4d)_f_value * $G1(3p,4d)_f_scaleFactor
G3_3p_4d_f = $G3(3p,4d)_f_value * $G3(3p,4d)_f_scaleFactor
F0_3p_4d_f = U_3p_4d_f + 1 / 15 * G1_3p_4d_f + 3 / 70 * G3_3p_4d_f
H_i = H_i + Chop(
F0_4d_4d_i * F0_4d_4d
+ F2_4d_4d_i * F2_4d_4d
+ F4_4d_4d_i * F4_4d_4d)
H_f = H_f + Chop(
F0_4d_4d_f * F0_4d_4d
+ F2_4d_4d_f * F2_4d_4d
+ F4_4d_4d_f * F4_4d_4d
+ F0_3p_4d_f * F0_3p_4d
+ F2_3p_4d_f * F2_3p_4d
+ G1_3p_4d_f * G1_3p_4d
+ G3_3p_4d_f * G3_3p_4d)
ldots_4d = NewOperator("ldots", NFermions, IndexUp_4d, IndexDn_4d)
ldots_3p = NewOperator("ldots", NFermions, IndexUp_3p, IndexDn_3p)
zeta_4d_i = $zeta(4d)_i_value * $zeta(4d)_i_scaleFactor
zeta_4d_f = $zeta(4d)_f_value * $zeta(4d)_f_scaleFactor
zeta_3p_f = $zeta(3p)_f_value * $zeta(3p)_f_scaleFactor
H_i = H_i + Chop(
zeta_4d_i * ldots_4d)
H_f = H_f + Chop(
zeta_4d_f * ldots_4d
+ zeta_3p_f * ldots_3p)
end
--------------------------------------------------------------------------------
-- Define the crystal field term.
--------------------------------------------------------------------------------
if CrystalFieldTerm then
-- PotentialExpandedOnClm("D4h", 2, {Ea1g, Eb1g, Eb2g, Eeg})
-- Dq_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, { 6, 6, -4, -4}))
-- Ds_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {-2, 2, 2, -1}))
-- Dt_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {-6, -1, -1, 4}))
Akm = {{4, 0, 21}, {4, -4, 1.5 * sqrt(70)}, {4, 4, 1.5 * sqrt(70)}}
Dq_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, Akm)
Akm = {{2, 0, -7}}
Ds_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, Akm)
Akm = {{4, 0, -21}}
Dt_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, Akm)
Dq_4d_i = $10Dq(4d)_i_value / 10.0
Ds_4d_i = $Ds(4d)_i_value
Dt_4d_i = $Dt(4d)_i_value
io.write("Diagonal values of the initial crystal field Hamiltonian:\n")
io.write("================\n")
io.write("Irrep. E\n")
io.write("================\n")
io.write(string.format("a1g %8.3f\n", 6 * Dq_4d_i - 2 * Ds_4d_i - 6 * Dt_4d_i ))
io.write(string.format("b1g %8.3f\n", 6 * Dq_4d_i + 2 * Ds_4d_i - Dt_4d_i ))
io.write(string.format("b2g %8.3f\n", -4 * Dq_4d_i + 2 * Ds_4d_i - Dt_4d_i ))
io.write(string.format("eg %8.3f\n", -4 * Dq_4d_i - Ds_4d_i + 4 * Dt_4d_i))
io.write("================\n")
io.write("\n")
Dq_4d_f = $10Dq(4d)_f_value / 10.0
Ds_4d_f = $Ds(4d)_f_value
Dt_4d_f = $Dt(4d)_f_value
H_i = H_i + Chop(
Dq_4d_i * Dq_4d
+ Ds_4d_i * Ds_4d
+ Dt_4d_i * Dt_4d)
H_f = H_f + Chop(
Dq_4d_f * Dq_4d
+ Ds_4d_f * Ds_4d
+ Dt_4d_f * Dt_4d)
end
--------------------------------------------------------------------------------
-- Define the 4d-ligands hybridization term (LMCT).
--------------------------------------------------------------------------------
if LmctLigandsHybridizationTerm then
N_L1 = NewOperator("Number", NFermions, IndexUp_L1, IndexUp_L1, {1, 1, 1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_L1, IndexDn_L1, {1, 1, 1, 1, 1})
Delta_4d_L1_i = $Delta(4d,L1)_i_value
E_4d_i = (10 * Delta_4d_L1_i - NElectrons_4d * (19 + NElectrons_4d) * U_4d_4d_i / 2) / (10 + NElectrons_4d)
E_L1_i = NElectrons_4d * ((1 + NElectrons_4d) * U_4d_4d_i / 2 - Delta_4d_L1_i) / (10 + NElectrons_4d)
Delta_4d_L1_f = $Delta(4d,L1)_f_value
E_4d_f = (10 * Delta_4d_L1_f - NElectrons_4d * (31 + NElectrons_4d) * U_4d_4d_f / 2 - 90 * U_3p_4d_f) / (16 + NElectrons_4d)
E_3p_f = (10 * Delta_4d_L1_f + (1 + NElectrons_4d) * (NElectrons_4d * U_4d_4d_f / 2 - (10 + NElectrons_4d) * U_3p_4d_f)) / (16 + NElectrons_4d)
E_L1_f = ((1 + NElectrons_4d) * (NElectrons_4d * U_4d_4d_f / 2 + 6 * U_3p_4d_f) - (6 + NElectrons_4d) * Delta_4d_L1_f) / (16 + NElectrons_4d)
H_i = H_i + Chop(
E_4d_i * N_4d
+ E_L1_i * N_L1)
H_f = H_f + Chop(
E_4d_f * N_4d
+ E_3p_f * N_3p
+ E_L1_f * N_L1)
Dq_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, { 6, 6, -4, -4}))
Ds_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, {-2, 2, 2, -1}))
Dt_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, {-6, -1, -1, 4}))
Va1g_4d_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {1, 0, 0, 0}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, {1, 0, 0, 0}))
Vb1g_4d_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {0, 1, 0, 0}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, {0, 1, 0, 0}))
Vb2g_4d_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {0, 0, 1, 0}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, {0, 0, 1, 0}))
Veg_4d_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {0, 0, 0, 1}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("D4h", 2, {0, 0, 0, 1}))
Dq_L1_i = $10Dq(L1)_i_value / 10.0
Ds_L1_i = $Ds(L1)_i_value
Dt_L1_i = $Dt(L1)_i_value
Va1g_4d_L1_i = $Va1g(4d,L1)_i_value
Vb1g_4d_L1_i = $Vb1g(4d,L1)_i_value
Vb2g_4d_L1_i = $Vb2g(4d,L1)_i_value
Veg_4d_L1_i = $Veg(4d,L1)_i_value
Dq_L1_f = $10Dq(L1)_f_value / 10.0
Ds_L1_f = $Ds(L1)_f_value
Dt_L1_f = $Dt(L1)_f_value
Va1g_4d_L1_f = $Va1g(4d,L1)_f_value
Vb1g_4d_L1_f = $Vb1g(4d,L1)_f_value
Vb2g_4d_L1_f = $Vb2g(4d,L1)_f_value
Veg_4d_L1_f = $Veg(4d,L1)_f_value
H_i = H_i + Chop(
Dq_L1_i * Dq_L1
+ Ds_L1_i * Ds_L1
+ Dt_L1_i * Dt_L1
+ Va1g_4d_L1_i * Va1g_4d_L1
+ Vb1g_4d_L1_i * Vb1g_4d_L1
+ Vb2g_4d_L1_i * Vb2g_4d_L1
+ Veg_4d_L1_i * Veg_4d_L1)
H_f = H_f + Chop(
Dq_L1_f * Dq_L1
+ Ds_L1_f * Ds_L1
+ Dt_L1_f * Dt_L1
+ Va1g_4d_L1_f * Va1g_4d_L1
+ Vb1g_4d_L1_f * Vb1g_4d_L1
+ Vb2g_4d_L1_f * Vb2g_4d_L1
+ Veg_4d_L1_f * Veg_4d_L1)
end
--------------------------------------------------------------------------------
-- Define the 4d-ligands hybridization term (MLCT).
--------------------------------------------------------------------------------
if MlctLigandsHybridizationTerm then
N_L2 = NewOperator("Number", NFermions, IndexUp_L2, IndexUp_L2, {1, 1, 1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_L2, IndexDn_L2, {1, 1, 1, 1, 1})
Delta_4d_L2_i = $Delta(4d,L2)_i_value
E_4d_i = U_4d_4d_i * (-NElectrons_4d + 1) / 2
E_L2_i = Delta_4d_L2_i + U_4d_4d_i * NElectrons_4d / 2 - U_4d_4d_i / 2
Delta_4d_L2_f = $Delta(4d,L2)_f_value
E_4d_f = -(U_4d_4d_f * NElectrons_4d^2 + 11 * U_4d_4d_f * NElectrons_4d + 60 * U_3p_4d_f) / (2 * NElectrons_4d + 12)
E_3p_f = NElectrons_4d * (U_4d_4d_f * NElectrons_4d + U_4d_4d_f - 2 * U_3p_4d_f * NElectrons_4d - 2 * U_3p_4d_f) / (2 * (NElectrons_4d + 6))
E_L2_f = (2 * Delta_4d_L2_f * NElectrons_4d + 12 * Delta_4d_L2_f + U_4d_4d_f * NElectrons_4d^2 - U_4d_4d_f * NElectrons_4d - 12 * U_4d_4d_f + 12 * U_3p_4d_f * NElectrons_4d + 12 * U_3p_4d_f) / (2 * (NElectrons_4d + 6))
H_i = H_i + Chop(
E_4d_i * N_4d
+ E_L2_i * N_L2)
H_f = H_f + Chop(
E_4d_f * N_4d
+ E_3p_f * N_3p
+ E_L2_f * N_L2)
Dq_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, { 6, 6, -4, -4}))
Ds_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, {-2, 2, 2, -1}))
Dt_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, {-6, -1, -1, 4}))
Va1g_4d_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {1, 0, 0, 0}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, {1, 0, 0, 0}))
Vb1g_4d_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {0, 1, 0, 0}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, {0, 1, 0, 0}))
Vb2g_4d_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {0, 0, 1, 0}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, {0, 0, 1, 0}))
Veg_4d_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, IndexUp_4d, IndexDn_4d, PotentialExpandedOnClm("D4h", 2, {0, 0, 0, 1}))
+ NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("D4h", 2, {0, 0, 0, 1}))
Dq_L2_i = $10Dq(L2)_i_value / 10.0
Ds_L2_i = $Ds(L2)_i_value
Dt_L2_i = $Dt(L2)_i_value
Va1g_4d_L2_i = $Va1g(4d,L2)_i_value
Vb1g_4d_L2_i = $Vb1g(4d,L2)_i_value
Vb2g_4d_L2_i = $Vb2g(4d,L2)_i_value
Veg_4d_L2_i = $Veg(4d,L2)_i_value
Dq_L2_f = $10Dq(L2)_f_value / 10.0
Ds_L2_f = $Ds(L2)_f_value
Dt_L2_f = $Dt(L2)_f_value
Va1g_4d_L2_f = $Va1g(4d,L2)_f_value
Vb1g_4d_L2_f = $Vb1g(4d,L2)_f_value
Vb2g_4d_L2_f = $Vb2g(4d,L2)_f_value
Veg_4d_L2_f = $Veg(4d,L2)_f_value
H_i = H_i + Chop(
Dq_L2_i * Dq_L2
+ Ds_L2_i * Ds_L2
+ Dt_L2_i * Dt_L2
+ Va1g_4d_L2_i * Va1g_4d_L2
+ Vb1g_4d_L2_i * Vb1g_4d_L2
+ Vb2g_4d_L2_i * Vb2g_4d_L2
+ Veg_4d_L2_i * Veg_4d_L2)
H_f = H_f + Chop(
Dq_L2_f * Dq_L2
+ Ds_L2_f * Ds_L2
+ Dt_L2_f * Dt_L2
+ Va1g_4d_L2_f * Va1g_4d_L2
+ Vb1g_4d_L2_f * Vb1g_4d_L2
+ Vb2g_4d_L2_f * Vb2g_4d_L2
+ Veg_4d_L2_f * Veg_4d_L2)
end
--------------------------------------------------------------------------------
-- Define the magnetic field and exchange field terms.
--------------------------------------------------------------------------------
Sx_4d = NewOperator("Sx", NFermions, IndexUp_4d, IndexDn_4d)
Sy_4d = NewOperator("Sy", NFermions, IndexUp_4d, IndexDn_4d)
Sz_4d = NewOperator("Sz", NFermions, IndexUp_4d, IndexDn_4d)
Ssqr_4d = NewOperator("Ssqr", NFermions, IndexUp_4d, IndexDn_4d)
Splus_4d = NewOperator("Splus", NFermions, IndexUp_4d, IndexDn_4d)
Smin_4d = NewOperator("Smin", NFermions, IndexUp_4d, IndexDn_4d)
Lx_4d = NewOperator("Lx", NFermions, IndexUp_4d, IndexDn_4d)
Ly_4d = NewOperator("Ly", NFermions, IndexUp_4d, IndexDn_4d)
Lz_4d = NewOperator("Lz", NFermions, IndexUp_4d, IndexDn_4d)
Lsqr_4d = NewOperator("Lsqr", NFermions, IndexUp_4d, IndexDn_4d)
Lplus_4d = NewOperator("Lplus", NFermions, IndexUp_4d, IndexDn_4d)
Lmin_4d = NewOperator("Lmin", NFermions, IndexUp_4d, IndexDn_4d)
Jx_4d = NewOperator("Jx", NFermions, IndexUp_4d, IndexDn_4d)
Jy_4d = NewOperator("Jy", NFermions, IndexUp_4d, IndexDn_4d)
Jz_4d = NewOperator("Jz", NFermions, IndexUp_4d, IndexDn_4d)
Jsqr_4d = NewOperator("Jsqr", NFermions, IndexUp_4d, IndexDn_4d)
Jplus_4d = NewOperator("Jplus", NFermions, IndexUp_4d, IndexDn_4d)
Jmin_4d = NewOperator("Jmin", NFermions, IndexUp_4d, IndexDn_4d)
Tx_4d = NewOperator("Tx", NFermions, IndexUp_4d, IndexDn_4d)
Ty_4d = NewOperator("Ty", NFermions, IndexUp_4d, IndexDn_4d)
Tz_4d = NewOperator("Tz", NFermions, IndexUp_4d, IndexDn_4d)
Sx = Sx_4d
Sy = Sy_4d
Sz = Sz_4d
Lx = Lx_4d
Ly = Ly_4d
Lz = Lz_4d
Jx = Jx_4d
Jy = Jy_4d
Jz = Jz_4d
Tx = Tx_4d
Ty = Ty_4d
Tz = Tz_4d
Ssqr = Sx * Sx + Sy * Sy + Sz * Sz
Lsqr = Lx * Lx + Ly * Ly + Lz * Lz
Jsqr = Jx * Jx + Jy * Jy + Jz * Jz
if MagneticFieldTerm then
-- The values are in eV, and not Tesla. To convert from Tesla to eV multiply
-- the value with EnergyUnits.Tesla.value.
Bx_i = $Bx_i_value
By_i = $By_i_value
Bz_i = $Bz_i_value
Bx_f = $Bx_f_value
By_f = $By_f_value
Bz_f = $Bz_f_value
H_i = H_i + Chop(
Bx_i * (2 * Sx + Lx)
+ By_i * (2 * Sy + Ly)
+ Bz_i * (2 * Sz + Lz))
H_f = H_f + Chop(
Bx_f * (2 * Sx + Lx)
+ By_f * (2 * Sy + Ly)
+ Bz_f * (2 * Sz + Lz))
end
if ExchangeFieldTerm then
Hx_i = $Hx_i_value
Hy_i = $Hy_i_value
Hz_i = $Hz_i_value
Hx_f = $Hx_f_value
Hy_f = $Hy_f_value
Hz_f = $Hz_f_value
H_i = H_i + Chop(
Hx_i * Sx
+ Hy_i * Sy
+ Hz_i * Sz)
H_f = H_f + Chop(
Hx_f * Sx
+ Hy_f * Sy
+ Hz_f * Sz)
end
--------------------------------------------------------------------------------
-- Define the restrictions and set the number of initial states.
--------------------------------------------------------------------------------
InitialRestrictions = {NFermions, NBosons, {"111111 0000000000", NElectrons_3p, NElectrons_3p},
{"000000 1111111111", NElectrons_4d, NElectrons_4d}}
FinalRestrictions = {NFermions, NBosons, {"111111 0000000000", NElectrons_3p - 1, NElectrons_3p - 1},
{"000000 1111111111", NElectrons_4d + 1, NElectrons_4d + 1}}
CalculationRestrictions = nil
if LmctLigandsHybridizationTerm then
InitialRestrictions = {NFermions, NBosons, {"111111 0000000000 0000000000", NElectrons_3p, NElectrons_3p},
{"000000 1111111111 0000000000", NElectrons_4d, NElectrons_4d},
{"000000 0000000000 1111111111", NElectrons_L1, NElectrons_L1}}
FinalRestrictions = {NFermions, NBosons, {"111111 0000000000 0000000000", NElectrons_3p - 1, NElectrons_3p - 1},
{"000000 1111111111 0000000000", NElectrons_4d + 1, NElectrons_4d + 1},
{"000000 0000000000 1111111111", NElectrons_L1, NElectrons_L1}}
CalculationRestrictions = {NFermions, NBosons, {"000000 0000000000 1111111111", NElectrons_L1 - (NConfigurations - 1), NElectrons_L1}}
end
if MlctLigandsHybridizationTerm then
InitialRestrictions = {NFermions, NBosons, {"111111 0000000000 0000000000", NElectrons_3p, NElectrons_3p},
{"000000 1111111111 0000000000", NElectrons_4d, NElectrons_4d},
{"000000 0000000000 1111111111", NElectrons_L2, NElectrons_L2}}
FinalRestrictions = {NFermions, NBosons, {"111111 0000000000 0000000000", NElectrons_3p - 1, NElectrons_3p - 1},
{"000000 1111111111 0000000000", NElectrons_4d + 1, NElectrons_4d + 1},
{"000000 0000000000 1111111111", NElectrons_L2, NElectrons_L2}}
CalculationRestrictions = {NFermions, NBosons, {"000000 0000000000 1111111111", NElectrons_L2, NElectrons_L2 + (NConfigurations - 1)}}
end
--------------------------------------------------------------------------------
-- Define some helper functions.
--------------------------------------------------------------------------------
function MatrixToOperator(Matrix, StartIndex)
-- Transform a matrix to an operator.
local Operator = 0
for i = 1, #Matrix do
for j = 1, #Matrix do
local Weight = Matrix[i][j]
Operator = Operator + NewOperator("Number", #Matrix + StartIndex, i + StartIndex - 1, j + StartIndex - 1) * Weight
end
end
Operator.Chop()
return Operator
end
function ValueInTable(Value, Table)
-- Check if a value is in a table.
for _, v in ipairs(Table) do
if Value == v then
return true
end
end
return false
end
function GetSpectrum(G, Ids, dZ, NOperators, NPsis)
-- Extract the spectrum corresponding to the operators identified using the
-- Ids argument. The returned spectrum is a weighted sum, where the weights
-- are the Boltzmann probabilities.
--
-- @param G userdata: Spectrum object as returned by the functions defined in Quanty, i.e. one spectrum
-- for each operator and each wavefunction.
-- @param Ids table: Indexes of the operators that are considered in the returned spectrum.
-- @param dZ table: Boltzmann prefactors for each of the spectrum in the spectra object.
-- @param NOperators number: Number of transition operators.
-- @param NPsis number: Number of wavefunctions.
if not (type(Ids) == "table") then
Ids = {Ids}
end
local Id = 1
local dZs = {}
for i = 1, NOperators do
for _ = 1, NPsis do
if ValueInTable(i, Ids) then
table.insert(dZs, dZ[Id])
else
table.insert(dZs, 0)
end
Id = Id + 1
end
end
return Spectra.Sum(G, dZs)
end
function SaveSpectrum(G, Filename, Gaussian, Lorentzian, Pcl)
if Pcl == nil then
Pcl = 1
end
G = -1 / math.pi / Pcl * G
G.Broaden(Gaussian, Lorentzian)
G.Print({{"file", Filename .. ".spec"}})
end
function CalculateT(Basis, Eps, K)
-- Calculate the transition operator in the basis of tesseral harmonics for
-- an arbitrary polarization and wave-vector (for quadrupole operators).
--
-- @param Basis table: Operators forming the basis.
-- @param Eps table: Cartesian components of the polarization vector.
-- @param K table: Cartesian components of the wave-vector.
if #Basis == 3 then
-- The basis for the dipolar operators must be in the order x, y, z.
T = Eps[1] * Basis[1]
+ Eps[2] * Basis[2]
+ Eps[3] * Basis[3]
elseif #Basis == 5 then
-- The basis for the quadrupolar operators must be in the order xy, xz, yz, x2y2, z2.
T = (Eps[1] * K[2] + Eps[2] * K[1]) / math.sqrt(3) * Basis[1]
+ (Eps[1] * K[3] + Eps[3] * K[1]) / math.sqrt(3) * Basis[2]
+ (Eps[2] * K[3] + Eps[3] * K[2]) / math.sqrt(3) * Basis[3]
+ (Eps[1] * K[1] - Eps[2] * K[2]) / math.sqrt(3) * Basis[4]
+ (Eps[3] * K[3]) * Basis[5]
end
return Chop(T)
end
function DotProduct(a, b)
return Chop(a[1] * b[1] + a[2] * b[2] + a[3] * b[3])
end
function WavefunctionsAndBoltzmannFactors(H, NPsis, NPsisAuto, Temperature, Threshold, StartRestrictions, CalculationRestrictions)
-- Calculate the wavefunctions and Boltzmann factors of a Hamiltonian.
--
-- @param H userdata: Hamiltonian for which to calculate the wavefunctions.
-- @param NPsis number: The number of wavefunctions.
-- @param NPsisAuto boolean: Determine automatically the number of wavefunctions that are populated at the specified
-- temperature and within the threshold.
-- @param Temperature number: The temperature in eV.
-- @param Threshold number: Threshold used to determine the number of wavefunction in the automatic procedure.
-- @param StartRestrictions table: Occupancy restrictions at the start of the calculation.
-- @param CalculationRestrictions table: Occupancy restrictions used during the calculation.
-- @return table: The calculated wavefunctions.
-- @return table: The calculated Boltzmann factors.
if Threshold == nil then
Threshold = 1e-8
end
local dZ = {}
local Z = 0
local Psis
if NPsisAuto == true and NPsis ~= 1 then
NPsis = 4
local NPsisIncrement = 8
local NPsisIsConverged = false
while not NPsisIsConverged do
if CalculationRestrictions == nil then
Psis = Eigensystem(H, StartRestrictions, NPsis)
else
Psis = Eigensystem(H, StartRestrictions, NPsis, {{"restrictions", CalculationRestrictions}})
end
if not (type(Psis) == "table") then
Psis = {Psis}
end
if E_gs == nil then
E_gs = Psis[1] * H * Psis[1]
end
Z = 0
for i, Psi in ipairs(Psis) do
local E = Psi * H * Psi
if math.abs(E - E_gs) < Threshold ^ 2 then
dZ[i] = 1
else
dZ[i] = math.exp(-(E - E_gs) / Temperature)
end
Z = Z + dZ[i]
if dZ[i] / Z < Threshold then
i = i - 1
NPsisIsConverged = true
NPsis = i
Psis = {unpack(Psis, 1, i)}
dZ = {unpack(dZ, 1, i)}
break
end
end
if NPsisIsConverged then
break
else
NPsis = NPsis + NPsisIncrement
end
end
else
if CalculationRestrictions == nil then
Psis = Eigensystem(H, StartRestrictions, NPsis)
else
Psis = Eigensystem(H, StartRestrictions, NPsis, {{"restrictions", CalculationRestrictions}})
end
if not (type(Psis) == "table") then
Psis = {Psis}
end
local E_gs = Psis[1] * H * Psis[1]
Z = 0
for i, psi in ipairs(Psis) do
local E = psi * H * psi
if math.abs(E - E_gs) < Threshold ^ 2 then
dZ[i] = 1
else
dZ[i] = math.exp(-(E - E_gs) / Temperature)
end
Z = Z + dZ[i]
end
end
-- Normalize the Boltzmann factors to unity.
for i in ipairs(dZ) do
dZ[i] = dZ[i] / Z
end
return Psis, dZ
end
function PrintHamiltonianAnalysis(Psis, Operators, dZ, Header, Footer)
io.write(Header)
for i, Psi in ipairs(Psis) do
io.write(string.format("%5d", i))
for j, Operator in ipairs(Operators) do
if j == 1 then
io.write(string.format("%12.6f", Complex.Re(Psi * Operator * Psi)))
elseif Operator == "dZ" then
io.write(string.format("%12.2e", dZ[i]))
else
io.write(string.format("%10.4f", Complex.Re(Psi * Operator * Psi)))
end
end
io.write("\n")
end
io.write(Footer)
end
function CalculateEnergyDifference(H1, H1Restrictions, H2, H2Restrictions)
-- Calculate the energy difference between the lowest eigenstates of the two
-- Hamiltonians.
--
-- @param H1 userdata: The first Hamiltonian.
-- @param H1Restrictions table: Restrictions of the occupation numbers for H1.
-- @param H2 userdata: The second Hamiltonian.
-- @param H2Restrictions table: Restrictions of the occupation numbers for H2.
local E1 = 0.0
local E2 = 0.0
if H1 ~= nil and H1Restrictions ~= nil then
Psis1, _ = WavefunctionsAndBoltzmannFactors(H1, 1, false, 0, nil, H1Restrictions, nil)
E1 = Psis1[1] * H1 * Psis1[1]
end
if H2 ~= nil and H2Restrictions ~= nil then
Psis2, _ = WavefunctionsAndBoltzmannFactors(H2, 1, false, 0, nil, H2Restrictions, nil)
E2 = Psis2[1] * H2 * Psis2[1]
end
return E1 - E2
end
--------------------------------------------------------------------------------
-- Analyze the initial Hamiltonian.
--------------------------------------------------------------------------------
Temperature = Temperature * EnergyUnits.Kelvin.value
Sk = DotProduct(WaveVector, {Sx, Sy, Sz})
Lk = DotProduct(WaveVector, {Lx, Ly, Lz})
Jk = DotProduct(WaveVector, {Jx, Jy, Jz})
Tk = DotProduct(WaveVector, {Tx, Ty, Tz})
Operators = {H_i, Ssqr, Lsqr, Jsqr, Sk, Lk, Jk, Tk, ldots_4d, N_3p, N_4d, "dZ"}
Header = "Analysis of the %s Hamiltonian:\n"
Header = Header .. "=================================================================================================================================\n"
Header = Header .. "State E <S^2> <L^2> <J^2> <Sk> <Lk> <Jk> <Tk> <l.s> <N_3p> <N_4d> dZ\n"
Header = Header .. "=================================================================================================================================\n"
Footer = "=================================================================================================================================\n"
if LmctLigandsHybridizationTerm then
Operators = {H_i, Ssqr, Lsqr, Jsqr, Sk, Lk, Jk, Tk, ldots_4d, N_3p, N_4d, N_L1, "dZ"}
Header = "Analysis of the %s Hamiltonian:\n"
Header = Header .. "===========================================================================================================================================\n"
Header = Header .. "State E <S^2> <L^2> <J^2> <Sk> <Lk> <Jk> <Tk> <l.s> <N_3p> <N_4d> <N_L1> dZ\n"
Header = Header .. "===========================================================================================================================================\n"
Footer = "===========================================================================================================================================\n"
end
if MlctLigandsHybridizationTerm then
Operators = {H_i, Ssqr, Lsqr, Jsqr, Sk, Lk, Jk, Tk, ldots_4d, N_3p, N_4d, N_L2, "dZ"}
Header = "Analysis of the %s Hamiltonian:\n"
Header = Header .. "===========================================================================================================================================\n"
Header = Header .. "State E <S^2> <L^2> <J^2> <Sk> <Lk> <Jk> <Tk> <l.s> <N_3p> <N_4d> <N_L2> dZ\n"
Header = Header .. "===========================================================================================================================================\n"
Footer = "===========================================================================================================================================\n"
end
local Psis_i, dZ_i = WavefunctionsAndBoltzmannFactors(H_i, NPsis, NPsisAuto, Temperature, nil, InitialRestrictions, CalculationRestrictions)
PrintHamiltonianAnalysis(Psis_i, Operators, dZ_i, string.format(Header, "initial"), Footer)
-- Stop the calculation if no spectra need to be calculated.
if next(SpectraToCalculate) == nil then
return
end
--------------------------------------------------------------------------------
-- Calculate and save the spectra.
--------------------------------------------------------------------------------
local t = math.sqrt(1 / 2)
Tx_3p_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_3p, IndexDn_3p, {{1, -1, t}, {1, 1, -t}})
Ty_3p_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_3p, IndexDn_3p, {{1, -1, t * I}, {1, 1, t * I}})
Tz_3p_4d = NewOperator("CF", NFermions, IndexUp_4d, IndexDn_4d, IndexUp_3p, IndexDn_3p, {{1, 0, 1}})
Er = {t * (Eh[1] - I * Ev[1]),
t * (Eh[2] - I * Ev[2]),
t * (Eh[3] - I * Ev[3])}
El = {-t * (Eh[1] + I * Ev[1]),
-t * (Eh[2] + I * Ev[2]),
-t * (Eh[3] + I * Ev[3])}
local T = {Tx_3p_4d, Ty_3p_4d, Tz_3p_4d}
Tv_3p_4d = CalculateT(T, Ev)
Th_3p_4d = CalculateT(T, Eh)
Tr_3p_4d = CalculateT(T, Er)
Tl_3p_4d = CalculateT(T, El)
Tk_3p_4d = CalculateT(T, WaveVector)
-- Initialize a table with the available spectra and the required operators.
SpectraAndOperators = {
["Isotropic Absorption"] = {Tk_3p_4d, Tr_3p_4d, Tl_3p_4d},
["Absorption"] = {Tk_3p_4d,},
["Circular Dichroic"] = {Tr_3p_4d, Tl_3p_4d},
["Linear Dichroic"] = {Tv_3p_4d, Th_3p_4d},
}
-- Create an unordered set with the required operators.
local T_3p_4d = {}
for Spectrum, Operators in pairs(SpectraAndOperators) do
if ValueInTable(Spectrum, SpectraToCalculate) then
for _, Operator in pairs(Operators) do
T_3p_4d[Operator] = true
end
end
end
-- Give the operators table the form required by Quanty's functions.
local T = {}
for Operator, _ in pairs(T_3p_4d) do
table.insert(T, Operator)
end
T_3p_4d = T
if ShiftSpectra then
Emin = Emin - (ZeroShift + ExperimentalShift)
Emax = Emax - (ZeroShift + ExperimentalShift)
end
if CalculationRestrictions == nil then
G_3p_4d = CreateSpectra(H_f, T_3p_4d, Psis_i, {{"Emin", Emin}, {"Emax", Emax}, {"NE", NPoints}, {"Gamma", Gamma}, {"DenseBorder", DenseBorder}})
else
G_3p_4d = CreateSpectra(H_f, T_3p_4d, Psis_i, {{"Emin", Emin}, {"Emax", Emax}, {"NE", NPoints}, {"Gamma", Gamma}, {"Restrictions", CalculationRestrictions}, {"DenseBorder", DenseBorder}})
end
if ShiftSpectra then
G_3p_4d.Shift(ZeroShift + ExperimentalShift)
end
-- Create a list with the Boltzmann probabilities for a given operator and wavefunction.
local dZ_3p_4d = {}
for _ in ipairs(T_3p_4d) do
for j in ipairs(Psis_i) do
table.insert(dZ_3p_4d, dZ_i[j])
end
end
local Ids = {}
for k, v in pairs(T_3p_4d) do
Ids[v] = k
end
-- Subtract the broadening used in the spectra calculations from the Lorentzian table.
for i, _ in ipairs(Lorentzian) do
-- The FWHM is the second value in each pair.
Lorentzian[i][2] = Lorentzian[i][2] - Gamma
end
Pcl_3p_4d = 2
for Spectrum, Operators in pairs(SpectraAndOperators) do
if ValueInTable(Spectrum, SpectraToCalculate) then
-- Find the indices of the spectrum's operators in the table used during the
-- calculation (this is unsorted).
SpectrumIds = {}
for _, Operator in pairs(Operators) do
table.insert(SpectrumIds, Ids[Operator])
end
if Spectrum == "Isotropic Absorption" then
Giso = GetSpectrum(G_3p_4d, SpectrumIds, dZ_3p_4d, #T_3p_4d, #Psis_i)
Giso = Giso / 3
SaveSpectrum(Giso, Prefix .. "_iso", Gaussian, Lorentzian, Pcl_3p_4d)
end
if Spectrum == "Absorption" then
Gk = GetSpectrum(G_3p_4d, SpectrumIds, dZ_3p_4d, #T_3p_4d, #Psis_i)
SaveSpectrum(Gk, Prefix .. "_k", Gaussian, Lorentzian, Pcl_3p_4d)
end
if Spectrum == "Circular Dichroic" then
Gr = GetSpectrum(G_3p_4d, SpectrumIds[1], dZ_3p_4d, #T_3p_4d, #Psis_i)
Gl = GetSpectrum(G_3p_4d, SpectrumIds[2], dZ_3p_4d, #T_3p_4d, #Psis_i)
SaveSpectrum(Gr, Prefix .. "_r", Gaussian, Lorentzian, Pcl_3p_4d)
SaveSpectrum(Gl, Prefix .. "_l", Gaussian, Lorentzian, Pcl_3p_4d)
SaveSpectrum(Gr - Gl, Prefix .. "_cd", Gaussian, Lorentzian)
end
if Spectrum == "Linear Dichroic" then
Gv = GetSpectrum(G_3p_4d, SpectrumIds[1], dZ_3p_4d, #T_3p_4d, #Psis_i)
Gh = GetSpectrum(G_3p_4d, SpectrumIds[2], dZ_3p_4d, #T_3p_4d, #Psis_i)
SaveSpectrum(Gv, Prefix .. "_v", Gaussian, Lorentzian, Pcl_3p_4d)
SaveSpectrum(Gh, Prefix .. "_h", Gaussian, Lorentzian, Pcl_3p_4d)
SaveSpectrum(Gv - Gh, Prefix .. "_ld", Gaussian, Lorentzian)
end
end
end
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/faction/imperial/fbase_elite_dark_trooper_hard.lua | 1 | 1506 | fbase_elite_dark_trooper_hard = Creature:new {
objectName = "@mob/creature_names:fbase_elite_dark_trooper_hard",
randomNameType = NAME_DARKTROOPER,
randomNameTag = true,
socialGroup = "imperial",
faction = "imperial",
level = 180,
chanceHit = 9.0,
damageMin = 1045,
damageMax = 1800,
baseXp = 18000,
baseHAM = 119000,
baseHAMmax = 165000,
armor = 3,
resists = {140,125,115,150,150,150,150,125,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = ATTACKABLE + OVERT,
creatureBitmask = PACK + KILLER,
optionsBitmask = AIENABLED,
diet = HERBIVORE,
scale = 1.5,
templates = {"object/mobile/dark_trooper.iff"},
lootGroups = {
{
groups = {
{group = "color_crystals", chance = 300000},
{group = "junk", chance = 6000000},
{group = "holocron_dark", chance = 150000},
{group = "holocron_light", chance = 150000},
{group = "weapons_all", chance = 1050000},
{group = "armor_all", chance = 1050000},
{group = "clothing_attachments", chance = 150000},
{group = "armor_attachments", chance = 150000},
{group = "wearables_all", chance = 1000000}
}
}
},
weapons = {"dark_trooper_weapons"},
conversationTemplate = "",
reactionStf = "@npc_reaction/stormtrooper",
attacks = merge(riflemanmaster,marksmanmaster,fencermaster,brawlermaster)
}
CreatureTemplates:addCreatureTemplate(fbase_elite_dark_trooper_hard, "fbase_elite_dark_trooper_hard")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/attachment/weapon/star_destroyer_mini_turret_base.lua | 3 | 2340 | --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_attachment_weapon_star_destroyer_mini_turret_base = object_tangible_ship_attachment_weapon_shared_star_destroyer_mini_turret_base:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_attachment_weapon_star_destroyer_mini_turret_base, "object/tangible/ship/attachment/weapon/star_destroyer_mini_turret_base.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/attachment/weapon/kse_firespray_weapon1_s03.lua | 3 | 2316 | --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_attachment_weapon_kse_firespray_weapon1_s03 = object_tangible_ship_attachment_weapon_shared_kse_firespray_weapon1_s03:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_attachment_weapon_kse_firespray_weapon1_s03, "object/tangible/ship/attachment/weapon/kse_firespray_weapon1_s03.iff")
| agpl-3.0 |
thexamx/forgottenserver | data/lib/compat/compat.lua | 6 | 50110 | TRUE = true
FALSE = false
result.getDataInt = result.getNumber
result.getDataLong = result.getNumber
result.getDataString = result.getString
result.getDataStream = result.getStream
LUA_ERROR = false
LUA_NO_ERROR = true
STACKPOS_GROUND = 0
STACKPOS_FIRST_ITEM_ABOVE_GROUNDTILE = 1
STACKPOS_SECOND_ITEM_ABOVE_GROUNDTILE = 2
STACKPOS_THIRD_ITEM_ABOVE_GROUNDTILE = 3
STACKPOS_FOURTH_ITEM_ABOVE_GROUNDTILE = 4
STACKPOS_FIFTH_ITEM_ABOVE_GROUNDTILE = 5
STACKPOS_TOP_CREATURE = 253
STACKPOS_TOP_FIELD = 254
STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE = 255
THING_TYPE_PLAYER = CREATURETYPE_PLAYER + 1
THING_TYPE_MONSTER = CREATURETYPE_MONSTER + 1
THING_TYPE_NPC = CREATURETYPE_NPC + 1
COMBAT_POISONDAMAGE = COMBAT_EARTHDAMAGE
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON
MESSAGE_STATUS_CONSOLE_BLUE = MESSAGE_INFO_DESCR
MESSAGE_STATUS_CONSOLE_RED = MESSAGE_STATUS_WARNING
MESSAGE_EVENT_ORANGE = MESSAGE_STATUS_WARNING
MESSAGE_STATUS_CONSOLE_ORANGE = MESSAGE_STATUS_WARNING
TALKTYPE_ORANGE_1 = TALKTYPE_MONSTER_SAY
TALKTYPE_ORANGE_2 = TALKTYPE_MONSTER_YELL
NORTH = DIRECTION_NORTH
EAST = DIRECTION_EAST
SOUTH = DIRECTION_SOUTH
WEST = DIRECTION_WEST
SOUTHWEST = DIRECTION_SOUTHWEST
SOUTHEAST = DIRECTION_SOUTHEAST
NORTHWEST = DIRECTION_NORTHWEST
NORTHEAST = DIRECTION_NORTHEAST
SPEECHBUBBLE_QUESTTRADER = SPEECHBUBBLE_QUEST
do
local function storageProxy(player)
return setmetatable({}, {
__index = function(self, key)
return player:getStorageValue(key)
end,
__newindex = function(self, key, value)
player:setStorageValue(key, value)
end
})
end
local function accountStorageProxy(player)
return setmetatable({}, {
__index = function(self, key)
return Game.getAccountStorageValue(player:getAccountId(), key)
end,
__newindex = function(self, key, value)
Game.setAccountStorageValue(player:getAccountId(), key, value)
end
})
end
local function CreatureIndex(self, key)
local methods = getmetatable(self)
if key == "uid" then
return methods.getId(self)
elseif key == "type" then
local creatureType = 0
if methods.isPlayer(self) then
creatureType = THING_TYPE_PLAYER
elseif methods.isMonster(self) then
creatureType = THING_TYPE_MONSTER
elseif methods.isNpc(self) then
creatureType = THING_TYPE_NPC
end
return creatureType
elseif key == "itemid" then
return 1
elseif key == "actionid" then
return 0
elseif key == "storage" then
if methods.isPlayer(self) then
return storageProxy(self)
end
elseif key == "accountStorage" then
if methods.isPlayer(self) then
return accountStorageProxy(self)
end
end
return methods[key]
end
rawgetmetatable("Player").__index = CreatureIndex
rawgetmetatable("Monster").__index = CreatureIndex
rawgetmetatable("Npc").__index = CreatureIndex
end
do
local function ItemIndex(self, key)
local methods = getmetatable(self)
if key == "itemid" then
return methods.getId(self)
elseif key == "actionid" then
return methods.getActionId(self)
elseif key == "uid" then
return methods.getUniqueId(self)
elseif key == "type" then
return methods.getSubType(self)
end
return methods[key]
end
rawgetmetatable("Item").__index = ItemIndex
rawgetmetatable("Container").__index = ItemIndex
rawgetmetatable("Teleport").__index = ItemIndex
rawgetmetatable("Podium").__index = ItemIndex
end
do
local function ActionNewIndex(self, key, value)
if key == "onUse" then
self:onUse(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("Action").__newindex = ActionNewIndex
end
do
local function TalkActionNewIndex(self, key, value)
if key == "onSay" then
self:onSay(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("TalkAction").__newindex = TalkActionNewIndex
end
do
local function CreatureEventNewIndex(self, key, value)
if key == "onLogin" then
self:type("login")
self:onLogin(value)
return
elseif key == "onLogout" then
self:type("logout")
self:onLogout(value)
return
elseif key == "onThink" then
self:type("think")
self:onThink(value)
return
elseif key == "onPrepareDeath" then
self:type("preparedeath")
self:onPrepareDeath(value)
return
elseif key == "onDeath" then
self:type("death")
self:onDeath(value)
return
elseif key == "onKill" then
self:type("kill")
self:onKill(value)
return
elseif key == "onAdvance" then
self:type("advance")
self:onAdvance(value)
return
elseif key == "onModalWindow" then
self:type("modalwindow")
self:onModalWindow(value)
return
elseif key == "onTextEdit" then
self:type("textedit")
self:onTextEdit(value)
return
elseif key == "onHealthChange" then
self:type("healthchange")
self:onHealthChange(value)
return
elseif key == "onManaChange" then
self:type("manachange")
self:onManaChange(value)
return
elseif key == "onExtendedOpcode" then
self:type("extendedopcode")
self:onExtendedOpcode(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("CreatureEvent").__newindex = CreatureEventNewIndex
end
do
local function MoveEventNewIndex(self, key, value)
if key == "onEquip" then
self:type("equip")
self:onEquip(value)
return
elseif key == "onDeEquip" then
self:type("deequip")
self:onDeEquip(value)
return
elseif key == "onAddItem" then
self:type("additem")
self:onAddItem(value)
return
elseif key == "onRemoveItem" then
self:type("removeitem")
self:onRemoveItem(value)
return
elseif key == "onStepIn" then
self:type("stepin")
self:onStepIn(value)
return
elseif key == "onStepOut" then
self:type("stepout")
self:onStepOut(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("MoveEvent").__newindex = MoveEventNewIndex
end
do
local function GlobalEventNewIndex(self, key, value)
if key == "onThink" then
self:onThink(value)
return
elseif key == "onTime" then
self:onTime(value)
return
elseif key == "onStartup" then
self:type("startup")
self:onStartup(value)
return
elseif key == "onShutdown" then
self:type("shutdown")
self:onShutdown(value)
return
elseif key == "onRecord" then
self:type("record")
self:onRecord(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("GlobalEvent").__newindex = GlobalEventNewIndex
end
do
local function WeaponNewIndex(self, key, value)
if key == "onUseWeapon" then
self:onUseWeapon(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("Weapon").__newindex = WeaponNewIndex
end
do
local function SpellNewIndex(self, key, value)
if key == "onCastSpell" then
self:onCastSpell(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("Spell").__newindex = SpellNewIndex
end
do
local function MonsterTypeNewIndex(self, key, value)
if key == "onThink" then
self:eventType(MONSTERS_EVENT_THINK)
self:onThink(value)
return
elseif key == "onAppear" then
self:eventType(MONSTERS_EVENT_APPEAR)
self:onAppear(value)
return
elseif key == "onDisappear" then
self:eventType(MONSTERS_EVENT_DISAPPEAR)
self:onDisappear(value)
return
elseif key == "onMove" then
self:eventType(MONSTERS_EVENT_MOVE)
self:onMove(value)
return
elseif key == "onSay" then
self:eventType(MONSTERS_EVENT_SAY)
self:onSay(value)
return
end
rawset(self, key, value)
end
rawgetmetatable("MonsterType").__newindex = MonsterTypeNewIndex
end
function pushThing(thing)
local t = {uid = 0, itemid = 0, type = 0, actionid = 0}
if thing then
if thing:isItem() then
t.uid = thing:getUniqueId()
t.itemid = thing:getId()
if ItemType(t.itemid):hasSubType() then
t.type = thing:getSubType()
end
t.actionid = thing:getActionId()
elseif thing:isCreature() then
t.uid = thing:getId()
t.itemid = 1
if thing:isPlayer() then
t.type = THING_TYPE_PLAYER
elseif thing:isMonster() then
t.type = THING_TYPE_MONSTER
else
t.type = THING_TYPE_NPC
end
end
end
return t
end
createCombatObject = Combat
addCombatCondition = Combat.addCondition
setCombatArea = Combat.setArea
setCombatCallback = Combat.setCallback
setCombatFormula = Combat.setFormula
setCombatParam = Combat.setParameter
Combat.setCondition = function(...)
print("[Warning - " .. debug.getinfo(2).source:match("@?(.*)") .. "] Function Combat.setCondition was renamed to Combat.addCondition and will be removed in the future")
Combat.addCondition(...)
end
setCombatCondition = function(...)
print("[Warning - " .. debug.getinfo(2).source:match("@?(.*)") .. "] Function setCombatCondition was renamed to addCombatCondition and will be removed in the future")
Combat.addCondition(...)
end
function doTargetCombatHealth(...) return doTargetCombat(...) end
function doAreaCombatHealth(...) return doAreaCombat(...) end
doCombatAreaHealth = doAreaCombatHealth
function doTargetCombatMana(cid, target, min, max, effect) return doTargetCombat(cid, target, COMBAT_MANADRAIN, min, max, effect) end
doCombatAreaMana = doTargetCombatMana
function doAreaCombatMana(cid, pos, area, min, max, effect) return doAreaCombat(cid, COMBAT_MANADRAIN, pos, area, min, max, effect) end
createConditionObject = Condition
setConditionParam = Condition.setParameter
setConditionFormula = Condition.setFormula
addDamageCondition = Condition.addDamage
addOutfitCondition = Condition.setOutfit
function doCombat(cid, combat, var) return combat:execute(cid, var) end
function isCreature(cid) return Creature(cid) end
function isPlayer(cid) return Player(cid) end
function isMonster(cid) return Monster(cid) end
function isSummon(cid) local c = Creature(cid) return c and c:getMaster() end
function isNpc(cid) return Npc(cid) end
function isItem(uid) return Item(uid) end
function isContainer(uid) return Container(uid) end
function getCreatureName(cid) local c = Creature(cid) return c and c:getName() or false end
function getCreatureStorage(uid, key) local c = Creature(uid) return c and c:getStorageValue(key) or false end
function getCreatureHealth(cid) local c = Creature(cid) return c and c:getHealth() or false end
function getCreatureMaxHealth(cid) local c = Creature(cid) return c and c:getMaxHealth() or false end
function getCreatureMana(cid) local c = Creature(cid) return c and c:getMana() or false end
function getCreatureMaxMana(cid) local c = Creature(cid) return c and c:getMaxMana() or false end
function getCreaturePosition(cid) local c = Creature(cid) return c and c:getPosition() or false end
function getCreatureOutfit(cid) local c = Creature(cid) return c and c:getOutfit() or false end
function getCreatureSpeed(cid) local c = Creature(cid) return c and c:getSpeed() or false end
function getCreatureBaseSpeed(cid) local c = Creature(cid) return c and c:getBaseSpeed() or false end
function getCreatureLookDirection(cid) local c = Creature(cid) return c and c:getDirection() or false end
function getCreatureHideHealth(cid) local c = Creature(cid) return c and c:isHealthHidden() or false end
function getCreatureSkullType(cid) local c = Creature(cid) return c and c:getSkull() or false end
function getCreatureNoMove(cid) local c = Creature(cid) return c and c:isMovementBlocked() or false end
function getCreatureTarget(cid)
local c = Creature(cid)
if c then
local target = c:getTarget()
return target and target:getId() or 0
end
return false
end
function getCreatureMaster(cid)
local c = Creature(cid)
if c then
local master = c:getMaster()
return master and master:getId() or c:getId()
end
return false
end
function getCreatureSummons(cid)
local c = Creature(cid)
if not c then
return false
end
local result = {}
for _, summon in ipairs(c:getSummons()) do
result[#result + 1] = summon:getId()
end
return result
end
getCreaturePos = getCreaturePosition
function doCreatureAddHealth(cid, health) local c = Creature(cid) return c and c:addHealth(health) or false end
function doCreatureAddMana(cid, mana) local c = Creature(cid) return c and c:addMana(mana) or false end
function doRemoveCreature(cid) local c = Creature(cid) return c and c:remove() or false end
function doCreatureSetStorage(uid, key, value) local c = Creature(uid) return c and c:setStorageValue(key, value) or false end
function doCreatureSetLookDir(cid, direction) local c = Creature(cid) return c and c:setDirection(direction) or false end
function doCreatureSetSkullType(cid, skull) local c = Creature(cid) return c and c:setSkull(skull) or false end
function setCreatureMaxHealth(cid, health) local c = Creature(cid) return c and c:setMaxHealth(health) or false end
function setCreatureMaxMana(cid, mana) local c = Creature(cid) return c and c:setMaxMana(mana) or false end
function doCreatureSetHideHealth(cid, hide) local c = Creature(cid) return c and c:setHiddenHealth(hide) or false end
function doCreatureSetNoMove(cid, block) local c = Creature(cid) return c and c:setMovementBlocked(block) or false end
function doCreatureSay(cid, text, type, ...) local c = Creature(cid) return c and c:say(text, type, ...) or false end
function doCreatureChangeOutfit(cid, outfit) local c = Creature(cid) return c and c:setOutfit(outfit) or false end
function doSetCreatureDropLoot(cid, doDrop) local c = Creature(cid) return c and c:setDropLoot(doDrop) or false end
doCreatureSetDropLoot = doSetCreatureDropLoot
function doChangeSpeed(cid, delta) local c = Creature(cid) return c and c:changeSpeed(delta) or false end
function doAddCondition(cid, conditionId) local c = Creature(cid) return c and c:addCondition(conditionId) or false end
function doRemoveCondition(cid, conditionType, subId) local c = Creature(cid) return c and (c:removeCondition(conditionType, CONDITIONID_COMBAT, subId) or c:removeCondition(conditionType, CONDITIONID_DEFAULT, subId) or true) end
function getCreatureCondition(cid, type, subId) local c = Creature(cid) return c and c:hasCondition(type, subId) or false end
doCreatureSetLookDirection = doCreatureSetLookDir
doSetCreatureDirection = doCreatureSetLookDir
function registerCreatureEvent(cid, name) local c = Creature(cid) return c and c:registerEvent(name) or false end
function unregisterCreatureEvent(cid, name) local c = Creature(cid) return c and c:unregisterEvent(name) or false end
function getPlayerByName(name) local p = Player(name) return p and p:getId() or false end
function getIPByPlayerName(name) local p = Player(name) return p and p:getIp() or false end
function getPlayerGUID(cid) local p = Player(cid) return p and p:getGuid() or false end
function getPlayerNameDescription(cid, distance) local p = Player(cid) return p and p:getDescription(distance) or false end
function getPlayerSpecialDescription() debugPrint("Deprecated function, use Player:onLook event instead.") return true end
function getPlayerAccountId(cid) local p = Player(cid) return p and p:getAccountId() or false end
getPlayerAccount = getPlayerAccountId
function getPlayerIp(cid) local p = Player(cid) return p and p:getIp() or false end
function getPlayerAccountType(cid) local p = Player(cid) return p and p:getAccountType() or false end
function getPlayerLastLoginSaved(cid) local p = Player(cid) return p and p:getLastLoginSaved() or false end
getPlayerLastLogin = getPlayerLastLoginSaved
function getPlayerName(cid) local p = Player(cid) return p and p:getName() or false end
getPlayerNameDescription = getPlayerName
function getPlayerFreeCap(cid) local p = Player(cid) return p and (p:getFreeCapacity() / 100) or false end
function getPlayerPosition(cid) local p = Player(cid) return p and p:getPosition() or false end
function getPlayerMagLevel(cid) local p = Player(cid) return p and p:getMagicLevel() or false end
function getPlayerSpentMana(cid) local p = Player(cid) return p and p:getManaSpent() or false end
function getPlayerRequiredMana(cid, magicLevel) local p = Player(cid) return p and p:getVocation():getRequiredManaSpent(magicLevel) or false end
function getPlayerRequiredSkillTries(cid, skillId) local p = Player(cid) return p and p:getVocation():getRequiredSkillTries(skillId) or false end
function getPlayerAccess(cid)
local player = Player(cid)
if not player then
return false
end
return player:getGroup():getAccess() and 1 or 0
end
function getPlayerSkill(cid, skillId) local p = Player(cid) return p and p:getSkillLevel(skillId) or false end
getPlayerSkillLevel = getPlayerSkill
function getPlayerSkillTries(cid, skillId) local p = Player(cid) return p and p:getSkillTries(skillId) or false end
function getPlayerMana(cid) local p = Player(cid) return p and p:getMana() or false end
function getPlayerMaxMana(cid) local p = Player(cid) return p and p:getMaxMana() or false end
function getPlayerLevel(cid) local p = Player(cid) return p and p:getLevel() or false end
function getPlayerExperience(cid) local p = Player(cid) return p and p:getExperience() or false end
function getPlayerTown(cid) local p = Player(cid) return p and p:getTown():getId() or false end
function getPlayerVocation(cid) local p = Player(cid) return p and p:getVocation():getId() or false end
function getPlayerSoul(cid) local p = Player(cid) return p and p:getSoul() or false end
function getPlayerSex(cid) local p = Player(cid) return p and p:getSex() or false end
function getPlayerStorageValue(cid, key) local p = Player(cid) return p and p:getStorageValue(key) or false end
function getPlayerBalance(cid) local p = Player(cid) return p and p:getBankBalance() or false end
function getPlayerMoney(cid) local p = Player(cid) return p and p:getMoney() or false end
function getPlayerGroupId(cid) local p = Player(cid) return p and p:getGroup():getId() or false end
function getPlayerLookDir(cid) local p = Player(cid) return p and p:getDirection() or false end
function getPlayerLight(cid) local p = Player(cid) return p and p:getLight() or false end
function getPlayerDepotItems(cid, depotId) local p = Player(cid) return p and p:getDepotItems(depotId) or false end
function getPlayerStamina(cid) local p = Player(cid) return p and p:getStamina() or false end
function getPlayerSkullType(cid) local p = Player(cid) return p and p:getSkull() or false end
function getPlayerLossPercent(cid) local p = Player(cid) return p and p:getDeathPenalty() or false end
function getPlayerMount(cid, mountId) local p = Player(cid) return p and p:hasMount(mountId) or false end
function getPlayerPremiumDays(cid) local p = Player(cid) return p and p:getPremiumDays() or false end
function getPlayerBlessing(cid, blessing) local p = Player(cid) return p and p:hasBlessing(blessing) or false end
function getPlayerFlagValue(cid, flag) local p = Player(cid) return p and p:hasFlag(flag) or false end
function getPlayerCustomFlagValue() debugPrint("Deprecated function, use player:hasFlag(flag) instead.") return true end
function getPlayerParty(cid)
local player = Player(cid)
if not player then
return false
end
local party = player:getParty()
if not party then
return nil
end
return party:getLeader():getId()
end
function getPlayerGuildId(cid)
local player = Player(cid)
if not player then
return false
end
local guild = player:getGuild()
if not guild then
return false
end
return guild:getId()
end
function getPlayerGuildLevel(cid) local p = Player(cid) return p and p:getGuildLevel() or false end
function getPlayerGuildName(cid)
local player = Player(cid)
if not player then
return false
end
local guild = player:getGuild()
if not guild then
return false
end
return guild:getName()
end
function getPlayerGuildRank(cid)
local player = Player(cid)
if not player then
return false
end
local guild = player:getGuild()
if not guild then
return false
end
local rank = guild:getRankByLevel(player:getGuildLevel())
return rank and rank.name or false
end
function getPlayerGuildRankId(cid) local p = Player(cid) return p and p:getGuildLevel() or false end
function getPlayerGuildNick(cid) local p = Player(cid) return p and p:getGuildNick() or false end
function getPlayerMasterPos(cid) local p = Player(cid) return p and p:getTown():getTemplePosition() or false end
function getPlayerItemCount(cid, itemId, ...) local p = Player(cid) return p and p:getItemCount(itemId, ...) or false end
function getPlayerWeapon(cid) local p = Player(cid) return p and p:getWeaponType() or false end
function getPlayerSlotItem(cid, slot)
local player = Player(cid)
if not player then
return pushThing(nil)
end
return pushThing(player:getSlotItem(slot))
end
function getPlayerItemById(cid, deepSearch, itemId, ...)
local player = Player(cid)
if not player then
return pushThing(nil)
end
return pushThing(player:getItemById(itemId, deepSearch, ...))
end
function getPlayerFood(cid)
local player = Player(cid)
if not player then
return false
end
local c = player:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) return c and math.floor(c:getTicks() / 1000) or 0
end
function canPlayerLearnInstantSpell(cid, name) local p = Player(cid) return p and p:canLearnSpell(name) or false end
function getPlayerLearnedInstantSpell(cid, name) local p = Player(cid) return p and p:hasLearnedSpell(name) or false end
function isPlayerGhost(cid) local p = Player(cid) return p and p:isInGhostMode() or false end
function isPlayerPzLocked(cid) local p = Player(cid) return p and p:isPzLocked() or false end
function isPremium(cid) local p = Player(cid) return p and p:isPremium() or false end
function getPlayersByIPAddress(ip, mask)
if not mask then mask = 0xFFFFFFFF end
local masked = bit.band(ip, mask)
local result = {}
for _, player in ipairs(Game.getPlayers()) do
if bit.band(player:getIp(), mask) == masked then
result[#result + 1] = player:getId()
end
end
return result
end
getPlayersByIp = getPlayersByIPAddress
function getOnlinePlayers()
local result = {}
for _, player in ipairs(Game.getPlayers()) do
result[#result + 1] = player:getName()
end
return result
end
getPlayersOnline = getOnlinePlayers
function getPlayersByAccountNumber(accountNumber)
local result = {}
for _, player in ipairs(Game.getPlayers()) do
if player:getAccountId() == accountNumber then
result[#result + 1] = player:getId()
end
end
return result
end
function getPlayerGUIDByName(name)
local player = Player(name)
if player then
return player:getGuid()
end
local resultId = db.storeQuery("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(name))
if resultId then
local guid = result.getNumber(resultId, "id")
result.free(resultId)
return guid
end
return 0
end
function getAccountNumberByPlayerName(name)
local player = Player(name)
if player then
return player:getAccountId()
end
local resultId = db.storeQuery("SELECT `account_id` FROM `players` WHERE `name` = " .. db.escapeString(name))
if resultId then
local accountId = result.getNumber(resultId, "account_id")
result.free(resultId)
return accountId
end
return 0
end
getPlayerAccountBalance = getPlayerBalance
getIpByName = getIPByPlayerName
function setPlayerStorageValue(cid, key, value) local p = Player(cid) return p and p:setStorageValue(key, value) or false end
function doPlayerSetNameDescription() debugPrint("Deprecated function, use Player:onLook event instead.") return true end
function doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel) local p = Player(cid) return p and p:sendChannelMessage(author, message, SpeakClasses, channel) or false end
function doPlayerSetMaxCapacity(cid, cap) local p = Player(cid) return p and p:setCapacity(cap) or false end
function doPlayerSetSpecialDescription() debugPrint("Deprecated function, use Player:onLook event instead.") return true end
function doPlayerSetBalance(cid, balance) local p = Player(cid) return p and p:setBankBalance(balance) or false end
function doPlayerSetPromotionLevel(cid, level) local p = Player(cid) return p and p:setVocation(p:getVocation():getPromotion()) or false end
function doPlayerAddMoney(cid, money) local p = Player(cid) return p and p:addMoney(money) or false end
function doPlayerRemoveMoney(cid, money) local p = Player(cid) return p and p:removeMoney(money) or false end
function doPlayerTakeItem(cid, itemid, count) local p = Player(cid) return p and p:removeItem(itemid, count) or false end
function doPlayerTransferMoneyTo(cid, target, money)
if not isValidMoney(money) then
return false
end
local p = Player(cid)
return p and p:transferMoneyTo(target, money) or false
end
function doPlayerSave(cid) local p = Player(cid) return p and p:save() or false end
function doPlayerAddSoul(cid, soul) local p = Player(cid) return p and p:addSoul(soul) or false end
function doPlayerSetVocation(cid, vocation) local p = Player(cid) return p and p:setVocation(Vocation(vocation)) or false end
function doPlayerSetTown(cid, town) local p = Player(cid) return p and p:setTown(Town(town)) or false end
function setPlayerGroupId(cid, groupId) local p = Player(cid) return p and p:setGroup(Group(groupId)) or false end
doPlayerSetGroupId = setPlayerGroupId
function doPlayerSetSex(cid, sex) local p = Player(cid) return p and p:setSex(sex) or false end
function doPlayerSetGuildLevel(cid, level) local p = Player(cid) return p and p:setGuildLevel(level) or false end
function doPlayerSetGuildNick(cid, nick) local p = Player(cid) return p and p:setGuildNick(nick) or false end
function doPlayerSetOfflineTrainingSkill(cid, skillId) local p = Player(cid) return p and p:setOfflineTrainingSkill(skillId) or false end
function doShowTextDialog(cid, itemId, text) local p = Player(cid) return p and p:showTextDialog(itemId, text) or false end
function doPlayerAddItemEx(cid, uid, ...) local p = Player(cid) return p and p:addItemEx(Item(uid), ...) or false end
function doPlayerRemoveItem(cid, itemid, count, ...) local p = Player(cid) return p and p:removeItem(itemid, count, ...) or false end
function doPlayerAddPremiumDays(cid, days) local p = Player(cid) return p and p:addPremiumDays(days) or false end
function doPlayerRemovePremiumDays(cid, days) local p = Player(cid) return p and p:removePremiumDays(days) or false end
function doPlayerSetStamina(cid, minutes) local p = Player(cid) return p and p:setStamina(minutes) or false end
function doPlayerAddBlessing(cid, blessing) local p = Player(cid) return p and p:addBlessing(blessing) or false end
function doPlayerAddOutfit(cid, lookType, addons) local p = Player(cid) return p and p:addOutfitAddon(lookType, addons) or false end
function doPlayerRemOutfit(cid, lookType, addons)
local player = Player(cid)
if not player then
return false
end
if addons == 255 then
return player:removeOutfit(lookType)
end
return player:removeOutfitAddon(lookType, addons)
end
doPlayerRemoveOutfit = doPlayerRemOutfit
function doPlayerAddAddons(cid, addon) local p = Player(cid) return p and p:addAddonToAllOutfits(addon) or false end
function canPlayerWearOutfit(cid, lookType, addons) local p = Player(cid) return p and p:hasOutfit(lookType, addons) or false end
function doPlayerAddMount(cid, mountId) local p = Player(cid) return p and p:addMount(mountId) or false end
function doPlayerRemoveMount(cid, mountId) local p = Player(cid) return p and p:removeMount(mountId) or false end
function doPlayerSendOutfitWindow(cid) local p = Player(cid) return p and p:sendOutfitWindow() or false end
function doPlayerSendCancel(cid, text) local p = Player(cid) return p and p:sendCancelMessage(text) or false end
function doPlayerFeed(cid, food) local p = Player(cid) return p and p:feed(food) or false end
function playerLearnInstantSpell(cid, name) local p = Player(cid) return p and p:learnSpell(name) or false end
doPlayerLearnInstantSpell = playerLearnInstantSpell
function doPlayerUnlearnInstantSpell(cid, name) local p = Player(cid) return p and p:forgetSpell(name) or false end
function doPlayerPopupFYI(cid, message) local p = Player(cid) return p and p:popupFYI(message) or false end
function doSendTutorial(cid, tutorialId) local p = Player(cid) return p and p:sendTutorial(tutorialId) or false end
doPlayerSendTutorial = doSendTutorial
function doAddMapMark(cid, pos, type, description) local p = Player(cid) return p and p:addMapMark(pos, type, description or "") or false end
doPlayerAddMapMark = doAddMapMark
function doPlayerSendTextMessage(cid, type, text, ...) local p = Player(cid) return p and p:sendTextMessage(type, text, ...) or false end
function doSendAnimatedText() debugPrint("Deprecated function.") return true end
function getPlayerAccountManager() debugPrint("Deprecated function.") return true end
function doPlayerSetExperienceRate() debugPrint("Deprecated function, use Player:onGainExperience event instead.") return true end
function doPlayerSetSkillLevel(cid, skillId, value, ...) local p = Player(cid) return p and p:addSkill(skillId, value, ...) end
function doPlayerSetMagicLevel(cid, value) local p = Player(cid) return p and p:addMagicLevel(value) end
function doPlayerAddLevel(cid, amount, round) local p = Player(cid) return p and p:addLevel(amount, round) end
function doPlayerAddExp(cid, exp, useMult, ...)
local player = Player(cid)
if not player then
return false
end
if useMult then
exp = exp * Game.getExperienceStage(player:getLevel())
end
return player:addExperience(exp, ...)
end
doPlayerAddExperience = doPlayerAddExp
function doPlayerAddManaSpent(cid, mana) local p = Player(cid) return p and p:addManaSpent(mana) or false end
doPlayerAddSpentMana = doPlayerAddManaSpent
function doPlayerAddSkillTry(cid, skillid, n) local p = Player(cid) return p and p:addSkillTries(skillid, n) or false end
function doPlayerAddMana(cid, mana, ...) local p = Player(cid) return p and p:addMana(mana, ...) or false end
function doPlayerJoinParty(cid, leaderId)
local player = Player(cid)
if not player then
return false
end
if player:getParty() then
player:sendTextMessage(MESSAGE_INFO_DESCR, "You are already in a party.")
return true
end
local leader = Player(leaderId)
if not leader then
return false
end
local party = leader:getParty()
if not party or party:getLeader() ~= leader then
return true
end
for _, invitee in ipairs(party:getInvitees()) do
if player ~= invitee then
return true
end
end
party:addMember(player)
return true
end
function getPartyMembers(cid)
local player = Player(cid)
if not player then
return false
end
local party = player:getParty()
if not party then
return false
end
local result = {party:getLeader():getId()}
for _, member in ipairs(party:getMembers()) do
result[#result + 1] = member:getId()
end
return result
end
doPlayerSendDefaultCancel = doPlayerSendCancel
function getMonsterTargetList(cid)
local monster = Monster(cid)
if not monster then
return false
end
local result = {}
for _, creature in ipairs(monster:getTargetList()) do
if monster:isTarget(creature) then
result[#result + 1] = creature:getId()
end
end
return result
end
function getMonsterFriendList(cid)
local monster = Monster(cid)
if not monster then
return false
end
local z = monster:getPosition().z
local result = {}
for _, creature in ipairs(monster:getFriendList()) do
if not creature:isRemoved() and creature:getPosition().z == z then
result[#result + 1] = creature:getId()
end
end
return result
end
function doSetMonsterTarget(cid, target)
local monster = Monster(cid)
if not monster then
return false
end
if monster:getMaster() then
return true
end
local target = Creature(cid)
if not target then
return false
end
monster:selectTarget(target)
return true
end
doMonsterSetTarget = doSetMonsterTarget
function doMonsterChangeTarget(cid)
local monster = Monster(cid)
if not monster then
return false
end
if monster:getMaster() then
return true
end
monster:searchTarget(1)
return true
end
function doCreateNpc(name, pos, ...)
local npc = Game.createNpc(name, pos, ...) return npc and npc:setMasterPos(pos) or false
end
function doSummonCreature(name, pos, ...)
local m = Game.createMonster(name, pos, ...) return m and m:getId() or false
end
doCreateMonster = doSummonCreature
function doConvinceCreature(cid, target)
local creature = Creature(cid)
if not creature then
return false
end
local targetCreature = Creature(target)
if not targetCreature then
return false
end
creature:addSummon(targetCreature)
return true
end
function doSummonMonster(cid, name)
local player = Player(cid)
local position = player:getPosition()
local monster = Game.createMonster(name, position)
if monster then
player:addSummon(monster)
monster:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
else
player:sendCancelMessage("There is not enough room.")
position:sendMagicEffect(CONST_ME_POFF)
end
return true
end
function getTownId(townName) local t = Town(townName) return t and t:getId() or false end
function getTownName(townId) local t = Town(townId) return t and t:getName() or false end
function getTownTemplePosition(townId) local t = Town(townId) return t and t:getTemplePosition() or false end
function doSetItemActionId(uid, actionId) local i = Item(uid) return i and i:setActionId(actionId) or false end
function doTransformItem(uid, newItemId, ...) local i = Item(uid) return i and i:transform(newItemId, ...) or false end
function doChangeTypeItem(uid, newType) local i = Item(uid) return i and i:transform(i:getId(), newType) or false end
function doRemoveItem(uid, ...) local i = Item(uid) return i and i:remove(...) or false end
function getContainerSize(uid) local c = Container(uid) return c and c:getSize() or false end
function getContainerCap(uid) local c = Container(uid) return c and c:getCapacity() or false end
function getContainerItem(uid, slot)
local container = Container(uid)
if not container then
return pushThing(nil)
end
return pushThing(container:getItem(slot))
end
function doAddContainerItemEx(uid, virtualId)
local container = Container(uid)
if not container then
return false
end
local res = container:addItemEx(Item(virtualId))
if not res then
return false
end
return res
end
function doSendMagicEffect(pos, magicEffect, ...) return Position(pos):sendMagicEffect(magicEffect, ...) end
function doSendDistanceShoot(fromPos, toPos, distanceEffect, ...) return Position(fromPos):sendDistanceEffect(toPos, distanceEffect, ...) end
function isSightClear(fromPos, toPos, floorCheck) return Position(fromPos):isSightClear(toPos, floorCheck) end
function getPromotedVocation(vocationId)
local vocation = Vocation(vocationId)
if not vocation then
return 0
end
local promotedVocation = vocation:getPromotion()
if not promotedVocation then
return 0
end
return promotedVocation:getId()
end
getPlayerPromotionLevel = getPromotedVocation
function getGuildId(guildName)
local resultId = db.storeQuery("SELECT `id` FROM `guilds` WHERE `name` = " .. db.escapeString(guildName))
if not resultId then
return false
end
local guildId = result.getNumber(resultId, "id")
result.free(resultId)
return guildId
end
function getHouseName(houseId) local h = House(houseId) return h and h:getName() or false end
function getHouseOwner(houseId) local h = House(houseId) return h and h:getOwnerGuid() or false end
function getHouseEntry(houseId) local h = House(houseId) return h and h:getExitPosition() or false end
function getHouseTown(houseId) local h = House(houseId) if not h then return false end local t = h:getTown() return t and t:getId() or false end
function getHouseTilesSize(houseId) local h = House(houseId) return h and h:getTileCount() or false end
function isItemStackable(itemId) return ItemType(itemId):isStackable() end
function isItemRune(itemId) return ItemType(itemId):isRune() end
function isItemDoor(itemId) return ItemType(itemId):isDoor() end
function isItemContainer(itemId) return ItemType(itemId):isContainer() end
function isItemFluidContainer(itemId) return ItemType(itemId):isFluidContainer() end
function isItemMovable(itemId) return ItemType(itemId):isMovable() end
function isCorpse(uid) local i = Item(uid) return i and ItemType(i:getId()):isCorpse() or false end
isItemMoveable = isItemMovable
isMoveable = isMovable
function getItemName(itemId) return ItemType(itemId):getName() end
getItemNameById = getItemName
function getItemWeight(itemId, ...) return ItemType(itemId):getWeight(...) / 100 end
function getItemDescriptions(itemId)
local itemType = ItemType(itemId)
return {
name = itemType:getName(),
plural = itemType:getPluralName(),
article = itemType:getArticle(),
description = itemType:getDescription()
}
end
function getItemIdByName(name)
local id = ItemType(name):getId()
if id == 0 then
return false
end
return id
end
function getItemWeightByUID(uid, ...)
local item = Item(uid)
if not item then
return false
end
local itemType = ItemType(item:getId())
return itemType:isStackable() and (itemType:getWeight(item:getCount(), ...) / 100) or (itemType:getWeight(1, ...) / 100)
end
function getItemRWInfo(uid)
local item = Item(uid)
if not item then
return false
end
local rwFlags = 0
local itemType = ItemType(item:getId())
if itemType:isReadable() then
rwFlags = bit.bor(rwFlags, 1)
end
if itemType:isWritable() then
rwFlags = bit.bor(rwFlags, 2)
end
return rwFlags
end
function getContainerCapById(itemId) return ItemType(itemId):getCapacity() end
function getFluidSourceType(itemId) local it = ItemType(itemId) return it.id ~= 0 and it:getFluidSource() or false end
function hasProperty(uid, prop)
local item = Item(uid)
if not item then
return false
end
local parent = item:getParent()
if parent:isTile() and item == parent:getGround() then
return parent:hasProperty(prop)
end
return item:hasProperty(prop)
end
function doSetItemText(uid, text)
local item = Item(uid)
if not item then
return false
end
if text ~= "" then
item:setAttribute(ITEM_ATTRIBUTE_TEXT, text)
else
item:removeAttribute(ITEM_ATTRIBUTE_TEXT)
end
return true
end
function doSetItemSpecialDescription(uid, desc)
local item = Item(uid)
if not item then
return false
end
if desc ~= "" then
item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, desc)
else
item:removeAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
end
return true
end
function doDecayItem(uid) local i = Item(uid) return i and i:decay() or false end
function setHouseOwner(id, guid) local h = House(id) return h and h:setOwnerGuid(guid) or false end
function getHouseRent(id) local h = House(id) return h and h:getRent() or nil end
function getHouseAccessList(id, listId) local h = House(id) return h and h:getAccessList(listId) or nil end
function setHouseAccessList(id, listId, listText) local h = House(id) return h and h:setAccessList(listId, listText) or false end
function getHouseByPlayerGUID(playerGUID)
for _, house in ipairs(Game.getHouses()) do
if house:getOwnerGuid() == playerGUID then
return house:getId()
end
end
return nil
end
function getTileHouseInfo(pos)
local t = Tile(pos)
if not t then
return false
end
local h = t:getHouse()
return h and h:getId() or false
end
function getTilePzInfo(position)
local t = Tile(position)
if not t then
return false
end
return t:hasFlag(TILESTATE_PROTECTIONZONE)
end
function getTileInfo(position)
local t = Tile(position)
if not t then
return false
end
local ret = pushThing(t:getGround())
ret.protection = t:hasFlag(TILESTATE_PROTECTIONZONE)
ret.nopz = ret.protection
ret.nologout = t:hasFlag(TILESTATE_NOLOGOUT)
ret.refresh = t:hasFlag(TILESTATE_REFRESH)
ret.house = t:getHouse()
ret.bed = t:hasFlag(TILESTATE_BED)
ret.depot = t:hasFlag(TILESTATE_DEPOT)
ret.things = t:getThingCount()
ret.creatures = t:getCreatureCount()
ret.items = t:getItemCount()
ret.topItems = t:getTopItemCount()
ret.downItems = t:getDownItemCount()
return ret
end
function getTileItemByType(position, itemType)
local t = Tile(position)
if not t then
return pushThing(nil)
end
return pushThing(t:getItemByType(itemType))
end
function getTileItemById(position, itemId, ...)
local t = Tile(position)
if not t then
return pushThing(nil)
end
return pushThing(t:getItemById(itemId, ...))
end
function getTileThingByPos(position)
local t = Tile(position)
if not t then
if position.stackpos == -1 then
return -1
end
return pushThing(nil)
end
if position.stackpos == -1 then
return t:getThingCount()
end
return pushThing(t:getThing(position.stackpos))
end
function getTileThingByTopOrder(position, topOrder)
local t = Tile(position)
if not t then
return pushThing(nil)
end
return pushThing(t:getItemByTopOrder(topOrder))
end
function getTopCreature(position)
local t = Tile(position)
if not t then
return pushThing(nil)
end
return pushThing(t:getTopCreature())
end
function queryTileAddThing(thing, position, ...) local t = Tile(position) return t and t:queryAdd(thing, ...) or false end
function doTeleportThing(uid, dest, pushMovement)
if type(uid) == "userdata" then
if uid:isCreature() then
return uid:teleportTo(dest, pushMovement or false)
end
return uid:moveTo(dest)
else
local thing = getThing(uid)
if thing then
if thing:isCreature() then
return thing:teleportTo(dest, pushMovement or false)
end
return thing:moveTo(dest)
end
end
return false
end
function getThingPos(uid)
local thing
if type(uid) ~= "userdata" then
thing = getThing(uid)
else
thing = uid
end
if not thing then
return false
end
local stackpos = 0
local tile = thing:getTile()
if tile then
stackpos = tile:getThingIndex(thing)
end
local position = thing:getPosition()
position.stackpos = stackpos
return position
end
getThingPosition = getThingPos
function getThingfromPos(pos)
local tile = Tile(pos)
if not tile then
return pushThing(nil)
end
local thing
local stackpos = pos.stackpos or 0
if stackpos == STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE then
thing = tile:getTopCreature()
if not thing then
local item = tile:getTopDownItem()
if item and item:getType():isMovable() then
thing = item
end
end
elseif stackpos == STACKPOS_TOP_FIELD then
thing = tile:getFieldItem()
elseif stackpos == STACKPOS_TOP_CREATURE then
thing = tile:getTopCreature()
else
thing = tile:getThing(stackpos)
end
return pushThing(thing)
end
function doRelocate(fromPos, toPos)
if fromPos == toPos then
return false
end
local fromTile = Tile(fromPos)
if not fromTile then
return false
end
if not Tile(toPos) then
return false
end
for i = fromTile:getThingCount() - 1, 0, -1 do
local thing = fromTile:getThing(i)
if thing then
if thing:isItem() then
if ItemType(thing:getId()):isMovable() then
thing:moveTo(toPos)
end
elseif thing:isCreature() then
thing:teleportTo(toPos)
end
end
end
return true
end
function getThing(uid)
return uid >= CREATURE_ID_MIN and pushThing(Creature(uid)) or pushThing(Item(uid))
end
function getConfigInfo(info)
if type(info) ~= "string" then
return nil
end
dofile('config.lua')
return _G[info]
end
function getWorldCreatures(type)
if type == 0 then
return Game.getPlayerCount()
elseif type == 1 then
return Game.getMonsterCount()
elseif type == 2 then
return Game.getNpcCount()
end
return Game.getPlayerCount() + Game.getMonsterCount() + Game.getNpcCount()
end
saveData = saveServer
function getGlobalStorageValue(key)
return Game.getStorageValue(key) or -1
end
getStorage = getGlobalStorageValue
function setGlobalStorageValue(key, value)
Game.setStorageValue(key, value)
return true
end
doSetStorage = setGlobalStorageValue
getWorldType = Game.getWorldType
function setWorldType(type)
return Game.setWorldType(type)
end
function getGameState()
return Game.getGameState()
end
function doSetGameState(state)
return Game.setGameState(state)
end
function doExecuteRaid(raidName)
return Game.startRaid(raidName)
end
numberToVariant = Variant
stringToVariant = Variant
positionToVariant = Variant
function targetPositionToVariant(position)
local variant = Variant(position)
variant.type = VARIANT_TARGETPOSITION
return variant
end
variantToNumber = Variant.getNumber
variantToString = Variant.getString
variantToPosition = Variant.getPosition
function doCreateTeleport(itemId, destination, position)
local item = Game.createItem(itemId, 1, position)
if not item:isTeleport() then
item:remove()
return false
end
item:setDestination(destination)
return item:getUniqueId()
end
function getSpectators(centerPos, rangex, rangey, multifloor, onlyPlayers)
local result = Game.getSpectators(centerPos, multifloor, onlyPlayers or false, rangex, rangex, rangey, rangey)
if #result == 0 then
return nil
end
for index, spectator in ipairs(result) do
result[index] = spectator:getId()
end
return result
end
function broadcastMessage(message, messageType)
Game.broadcastMessage(message, messageType)
print("> Broadcasted message: \"" .. message .. "\".")
end
doBroadcastMessage = broadcastMessage
function Guild.addMember(self, player)
return player:setGuild(self)
end
function Guild.removeMember(self, player)
return player:getGuild() == self and player:setGuild(nil)
end
function getPlayerInstantSpellCount(cid) local p = Player(cid) return p and #p:getInstantSpells() end
function getPlayerInstantSpellInfo(cid, spellId)
local player = Player(cid)
if not player then
return false
end
local spell = Spell(spellId)
if not spell or not player:canCast(spell) then
return false
end
return spell
end
function doSetItemOutfit(cid, item, time) local c = Creature(cid) return c and c:setItemOutfit(item, time) end
function doSetMonsterOutfit(cid, name, time) local c = Creature(cid) return c and c:setMonsterOutfit(name, time) end
function doSetCreatureOutfit(cid, outfit, time)
local creature = Creature(cid)
if not creature then
return false
end
local condition = Condition(CONDITION_OUTFIT)
condition:setOutfit(outfit)
condition:setTicks(time)
creature:addCondition(condition)
return true
end
function doTileAddItemEx(pos, uid, flags)
local tile = Tile(pos)
if not tile then
return false
end
local item = Item(uid)
if item then
return tile:addItemEx(item, flags)
end
return false
end
function isInArray(array, value) return table.contains(array, value) end
function doCreateItem(itemid, count, pos)
local tile = Tile(pos)
if not tile then
return false
end
local item = Game.createItem(itemid, count, pos)
if item then
return item:getUniqueId()
end
return false
end
function doCreateItemEx(itemid, count)
local item = Game.createItem(itemid, count)
if item then
return item:getUniqueId()
end
return false
end
function doMoveCreature(cid, direction) local c = Creature(cid) return c and c:move(direction) end
function createFunctions(class)
local exclude = {[2] = {"is"}, [3] = {"get", "set", "add", "can"}, [4] = {"need"}}
local temp = {}
for name, func in pairs(class) do
local add = true
for strLen, strTable in pairs(exclude) do
if table.contains(strTable, name:sub(1, strLen)) then
add = false
end
end
if add then
local str = name:sub(1, 1):upper() .. name:sub(2)
local getFunc = function(self) return func(self) end
local setFunc = function(self, ...) return func(self, ...) end
local get = "get" .. str
local set = "set" .. str
if not (rawget(class, get) and rawget(class, set)) then
table.insert(temp, {set, setFunc, get, getFunc})
end
end
end
for _, func in ipairs(temp) do
rawset(class, func[1], func[2])
rawset(class, func[3], func[4])
end
end
function isNumber(str)
return tonumber(str)
end
function doSetCreatureLight(cid, lightLevel, lightColor, time)
local creature = Creature(cid)
if not creature then
return false
end
local condition = Condition(CONDITION_LIGHT)
condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, lightLevel)
condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, lightColor)
condition:setTicks(time)
creature:addCondition(condition)
return true
end
function getExperienceForLevel(level) return Game.getExperienceForLevel(level) end
do
local combats = {
[COMBAT_PHYSICALDAMAGE] = 'physical',
[COMBAT_ENERGYDAMAGE] = 'energy',
[COMBAT_EARTHDAMAGE] = 'earth',
[COMBAT_FIREDAMAGE] = 'fire',
[COMBAT_UNDEFINEDDAMAGE] = 'undefined',
[COMBAT_LIFEDRAIN] = 'lifedrain',
[COMBAT_MANADRAIN] = 'manadrain',
[COMBAT_HEALING] = 'healing',
[COMBAT_DROWNDAMAGE] = 'drown',
[COMBAT_ICEDAMAGE] = 'ice',
[COMBAT_HOLYDAMAGE] = 'holy',
[COMBAT_DEATHDAMAGE] = 'death'
}
function getCombatName(combat)
return combats[combat]
end
end
do
local skills = {
[SKILL_FIST] = 'fist fighting',
[SKILL_CLUB] = 'club fighting',
[SKILL_SWORD] = 'sword fighting',
[SKILL_AXE] = 'axe fighting',
[SKILL_DISTANCE] = 'distance fighting',
[SKILL_SHIELD] = 'shielding',
[SKILL_FISHING] = 'fishing',
[SKILL_MAGLEVEL] = 'magic level',
[SKILL_LEVEL] = 'level'
}
function getSkillName(skill)
return skills[skill] or 'unknown'
end
end
do
local specialSkills = {
[SPECIALSKILL_CRITICALHITCHANCE] = 'critical hit chance', -- format: x%
[SPECIALSKILL_CRITICALHITAMOUNT] = 'critical extra damage', -- format: +y%
[SPECIALSKILL_LIFELEECHCHANCE] = 'life leech chance',
[SPECIALSKILL_LIFELEECHAMOUNT] = 'life leech amount',
[SPECIALSKILL_MANALEECHCHANCE] = 'mana leech chance',
[SPECIALSKILL_MANALEECHAMOUNT] = 'mana leech amount',
}
function getSpecialSkillName(specialSkill)
return specialSkills[specialSkill] or 'unknown'
end
end
do
local stats = {
[STAT_MAXHITPOINTS] = 'hitpoints',
[STAT_MAXMANAPOINTS] = 'mana',
[STAT_SOULPOINTS] = 'soul points',
[STAT_MAGICPOINTS] = 'magic level'
}
function getStatName(stat)
return stats[stat] or 'unknown'
end
end
do
local mounts = {}
for _, mountData in pairs(Game.getMounts()) do
mounts[mountData.clientId] = mountData.name
end
function getMountNameByLookType(lookType)
return mounts[lookType]
end
end
function indexToCombatType(idx)
return bit.lshift(1, idx)
end
function showpos(v)
return v > 0 and '+' or '-'
end
-- this is a fix for lua52 or higher which has the function renamed to table.unpack, while luajit still uses unpack
if not unpack then unpack = table.unpack end
| gpl-2.0 |
sprunk/Zero-K | units/vehraid.lua | 1 | 4146 | unitDef = {
unitname = [[vehraid]],
name = [[Scorcher]],
description = [[Raider Rover]],
acceleration = 0.057,
brakeRate = 0.07,
buildCostMetal = 130,
builder = false,
buildPic = [[vehraid.png]],
canGuard = true,
canMove = true,
canPatrol = true,
category = [[LAND TOOFAST]],
collisionVolumeOffsets = [[0 -5 0]],
collisionVolumeScales = [[26 26 36]],
collisionVolumeType = [[cylZ]],
selectionVolumeOffsets = [[0 0 0]],
selectionVolumeScales = [[28 28 34]],
selectionVolumeType = [[cylZ]],
corpse = [[DEAD]],
customParams = {
modelradius = [[10]],
},
explodeAs = [[BIG_UNITEX]],
footprintX = 2,
footprintZ = 2,
iconType = [[vehicleraider]],
idleAutoHeal = 5,
idleTime = 1800,
leaveTracks = true,
maxDamage = 420,
maxSlope = 18,
maxVelocity = 3.7,
maxWaterDepth = 22,
minCloakDistance = 75,
movementClass = [[TANK2]],
noAutoFire = false,
noChaseCategory = [[TERRAFORM FIXEDWING SATELLITE SUB]],
objectName = [[corgator_512.s3o]],
script = [[vehraid.lua]],
selfDestructAs = [[BIG_UNITEX]],
sfxtypes = {
explosiongenerators = {
[[custom:BEAMWEAPON_MUZZLE_ORANGE_SMALL]],
},
},
sightDistance = 400,
trackOffset = 5,
trackStrength = 5,
trackStretch = 1,
trackType = [[StdTank]],
trackWidth = 28,
turninplace = 0,
turnRate = 703,
workerTime = 0,
weapons = {
{
def = [[HEATRAY]],
badTargetCategory = [[FIXEDWING]],
onlyTargetCategory = [[FIXEDWING LAND SINK TURRET SHIP SWIM FLOAT GUNSHIP HOVER]],
},
},
weaponDefs = {
HEATRAY = {
name = [[Heat Ray]],
accuracy = 512,
areaOfEffect = 20,
coreThickness = 0.5,
craterBoost = 0,
craterMult = 0,
customParams = {
light_camera_height = 1500,
light_color = [[0.9 0.4 0.12]],
light_radius = 180,
light_fade_time = 25,
light_fade_offset = 10,
light_beam_mult_frames = 9,
light_beam_mult = 8,
},
damage = {
default = 31.4,
planes = 31.4,
subs = 1.5,
},
duration = 0.3,
dynDamageExp = 1,
dynDamageInverted = false,
explosionGenerator = [[custom:HEATRAY_HIT]],
fallOffRate = 1,
fireStarter = 90,
heightMod = 1,
impactOnly = true,
impulseBoost = 0,
impulseFactor = 0.4,
interceptedByShieldType = 1,
lodDistance = 10000,
noSelfDamage = true,
proximityPriority = 10,
range = 270,
reloadtime = 0.1,
rgbColor = [[1 0.1 0]],
rgbColor2 = [[1 1 0.25]],
soundStart = [[weapon/heatray_fire]],
thickness = 3,
tolerance = 5000,
turret = true,
weaponType = [[LaserCannon]],
weaponVelocity = 500,
},
},
featureDefs = {
DEAD = {
blocking = true,
featureDead = [[HEAP]],
footprintX = 2,
footprintZ = 2,
object = [[gatorwreck.s3o]],
},
HEAP = {
blocking = false,
footprintX = 2,
footprintZ = 2,
object = [[debris2x2c.s3o]],
},
},
}
return lowerkeys({ vehraid = unitDef })
| gpl-2.0 |
sigma/vicious | contrib/rss.lua | 18 | 1741 | ---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2009, olcc
--
-- This is now a standalone RSS reader for awesome:
-- * http://github.com/olcc/aware
---------------------------------------------------
-- {{{ Grab environment
local pairs = pairs
local io = { popen = io.popen }
local setmetatable = setmetatable
-- }}}
-- RSS: provides latest world news
-- vicious.contrib.rss
local rss = {}
-- {{{ RSS widget type
local function worker(format, input)
-- input: * feed - feed url
-- * object - entity to look for (typically: 'item')
-- * fields - fields to read (example: 'link', 'title', 'description')
-- output: * count - number of entities found
-- * one table for each field, containing wanted values
local feed = input.feed
local object = input.object
local fields = input.fields
-- Initialise tables
local out = {}
for _, v in pairs(fields) do
out[v] = {}
end
-- Initialise variables
local ob = nil
local i,j,k = 1, 1, 0
local curl = "curl -A 'Mozilla/4.0' -fsm 5 --connect-timeout 3 "
-- Get the feed
local f = io.popen(curl .. '"' .. feed .. '"')
local feed = f:read("*all")
f:close()
while true do
i, j, ob = feed.find(feed, "<" .. object .. ">(.-)</" .. object .. ">", i)
if not ob then break end
for _, v in pairs(fields) do
out[v][k] = ob:match("<" .. v .. ">(.*)</" .. v .. ">")
end
k = k+1
i = j+1
end
-- Update the entity count
out.count = k
return out
end
-- }}}
return setmetatable(rss, { __call = function(_, ...) return worker(...) end })
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/item/item_kitchen_pot_style_02.lua | 3 | 2236 | --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_kitchen_pot_style_02 = object_static_item_shared_item_kitchen_pot_style_02:new {
}
ObjectTemplates:addTemplate(object_static_item_item_kitchen_pot_style_02, "object/static/item/item_kitchen_pot_style_02.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/crafted/weapon/missile/countermeasure_chaff_pack.lua | 3 | 3010 | --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_countermeasure_chaff_pack = object_tangible_ship_crafted_weapon_missile_shared_countermeasure_chaff_pack:new {
numberExperimentalProperties = {1, 1, 2, 2, 1, 2, 1},
experimentalProperties = {"XX", "XX", "CD", "OQ", "CD", "OQ", "XX", "CD", "OQ", "XX"},
experimentalWeights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "exp_maximum_chaff_effectiveness", "exp_min_chaff_effectiveness", "null", "exp_ammo", "null"},
experimentalSubGroupTitles = {"null", "null", "fltmaxeffectiveness", "fltmineffectiveness", "fltrefirerate", "fltmaxammo", "energy_per_shot"},
experimentalMin = {0, 0, 68, 43, 289, 12, 0},
experimentalMax = {0, 0, 92, 58, 391, 16, 0},
experimentalPrecision = {0, 0, 0, 0, 0, 0, 0},
experimentalCombineType = {0, 0, 1, 1, 1, 1, 1},
}
ObjectTemplates:addTemplate(object_tangible_ship_crafted_weapon_missile_countermeasure_chaff_pack, "object/tangible/ship/crafted/weapon/missile/countermeasure_chaff_pack.iff")
| agpl-3.0 |
cappiewu/luci | protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_map.lua | 32 | 2615 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Copyright 2013 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local peeraddr, ip6addr
local tunlink, defaultroute, metric, ttl, mtu
maptype = section:taboption("general", ListValue, "type", translate("Type"))
maptype:value("map-e", "MAP-E")
maptype:value("map-t", "MAP-T")
maptype:value("lw4o6", "LW4over6")
peeraddr = section:taboption("general", Value, "peeraddr",
translate("BR / DMR / AFTR"))
peeraddr.rmempty = false
peeraddr.datatype = "ip6addr"
ipaddr = section:taboption("general", Value, "ipaddr",
translate("IPv4 prefix"))
ipaddr.datatype = "ip4addr"
ip4prefixlen = s:taboption("general", Value, "ip4prefixlen",
translate("IPv4 prefix length"),
translate("The length of the IPv4 prefix in bits, the remainder is used in the IPv6 addresses."))
ip4prefixlen.placeholder = "32"
ip4prefixlen.datatype = "range(0,32)"
ip6addr = s:taboption("general", Value, "ip6prefix",
translate("IPv6 prefix"),
translate("The IPv6 prefix assigned to the provider, usually ends with <code>::</code>"))
ip6addr.rmempty = false
ip6addr.datatype = "ip6addr"
ip6prefixlen = s:taboption("general", Value, "ip6prefixlen",
translate("IPv6 prefix length"),
translate("The length of the IPv6 prefix in bits"))
ip6prefixlen.placeholder = "16"
ip6prefixlen.datatype = "range(0,64)"
s:taboption("general", Value, "ealen",
translate("EA-bits length")).datatype = "range(0,48)"
s:taboption("general", Value, "psidlen",
translate("PSID-bits length")).datatype = "range(0,16)"
s:taboption("general", Value, "offset",
translate("PSID offset")).datatype = "range(0,16)"
tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
tunlink.template = "cbi/network_netlist"
tunlink.nocreate = true
defaultroute = section:taboption("advanced", Flag, "defaultroute",
translate("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)
ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
ttl.placeholder = "64"
ttl.datatype = "range(1,255)"
mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
mtu.placeholder = "1280"
mtu.datatype = "max(9200)"
| apache-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/murra/lair_murra_mountain.lua | 1 | 2287 | --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_murra_lair_murra_mountain = object_tangible_lair_murra_shared_lair_murra_mountain:new {
objectMenuComponent = "LairMenuComponent",
}
ObjectTemplates:addTemplate(object_tangible_lair_murra_lair_murra_mountain, "object/tangible/lair/murra/lair_murra_mountain.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/vynock_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_vynock_hue = object_mobile_shared_vynock_hue:new {
}
ObjectTemplates:addTemplate(object_mobile_vynock_hue, "object/mobile/vynock_hue.iff")
| agpl-3.0 |
sprunk/Zero-K | LuaUI/Widgets/unit_blobshadow.lua | 2 | 7153 | -- $Id: unit_blobshadow.lua 3171 2008-11-06 09:06:29Z det $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- author: jK
--
-- Copyright (C) 2007,2009.
-- Licensed under the terms of the GNU GPL, v2 or later.
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "BlobShadow",
desc = "shows blob shadows",
author = "jK",
date = "2007,2009",
license = "GNU GPL, v2 or later",
layer = -1000,
enabled = false -- loaded by default?
}
end
local onlyShowOnAirOption = true
local ResetWidget --forward-declared
local BLOB_TEXTURE = 'LuaUI/Images/blob2.dds' -- 'LuaUI/Images/blob.png' vr_grid.png
local SIZE_MULT = 1.3
local function OnOptionsChange()
ResetWidget()
end
options_path = 'Settings/Graphics/Unit Visibility/BlobShadow'
options = {
--onlyShowOnAir = {
-- name = 'Only on air',
-- desc = 'Only show blob shadows for flying units. Land units will not display blob shadows',
-- type = 'bool',
-- value = true,
-- advanced = false,
-- OnChange = OnOptionsChange,
--},
}
local shadowUnitDefID = {}
for i = 1, #UnitDefs do
local ud = UnitDefs[i]
if (not ud.isImmobile) and ud.isGroundUnit then
shadowUnitDefID[i] = true
end
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local gameFrame = 0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- speed-ups
local GL_QUADS = GL.QUADS
local glVertex = gl.Vertex
local glTexCoord = gl.TexCoord
local glBeginEnd = gl.BeginEnd
local glTranslate = gl.Translate
local glColor = gl.Color
local glDepthTest = gl.DepthTest
local glTexture = gl.Texture
local glPushMatrix = gl.PushMatrix
local glPopMatrix = gl.PopMatrix
local glPolygonOffset = gl.PolygonOffset
local insert = table.insert
local spGetUnitViewPosition = Spring.GetUnitViewPosition
local spIsSphereInView = Spring.IsSphereInView
local spGetUnitDefID = Spring.GetUnitDefID
local spGetGroundHeight = Spring.GetGroundHeight
local spGetCameraPosition = Spring.GetCameraPosition
local spValidUnitID = Spring.ValidUnitID
local spGetAllUnits = Spring.GetAllUnits
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local unitsCount = 0
local unitsList = {}
local unitMap = {}
local function AddUnit(unitID, unitDefID)
unitDefID = unitDefID or spGetUnitDefID(unitID)
if (not shadowUnitDefID[unitDefID]) or unitMap[unitID] then
return
end
unitsCount = unitsCount + 1
unitsList[unitsCount] = unitID
unitMap[unitID] = unitsCount
end
local function RemoveUnit(unitID)
if not unitMap[unitID] then
return
end
local index = unitMap[unitID]
unitsList[index] = unitsList[unitsCount]
unitMap[unitsList[index]] = index
unitMap[unitID] = nil
unitsList[unitsCount] = nil
unitsCount = unitsCount - 1
end
function widget:UnitEnteredAir(unitID)
RemoveUnit(unitID)
end
function widget:UnitFinished(unitID, unitDefID)
AddUnit(unitID, unitDefID)
end
function widget:UnitEnteredLos(unitID, unitDefID)
AddUnit(unitID, unitDefID)
end
function widget:UnitLeftAir(unitID)
AddUnit(unitID)
end
local function RemoveUnitByIndex(i)
unitsList[i] = unitsList[unitsCount]
unitsCount = unitsCount - 1
end
--forward-declared function
ResetWidget = function()
unitsList = {}
unitsCount = 0
unitMap = {}
local units = spGetAllUnits()
for _, unitID in ipairs(units) do
AddUnit(unitID)
end
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local function MyDrawGroundQuad(wx,wz,quadSize,gy,gy_tl,gy_tr,gy_bl,gy_br,gy_t,gy_b,gy_l,gy_r)
--topleft
glTexCoord(0,0)
glVertex(wx-quadSize,gy_bl,wz-quadSize)
glTexCoord(0,0.5)
glVertex(wx-quadSize,gy_l,wz)
glTexCoord(0.5,0.5)
glVertex(wx,gy,wz)
glTexCoord(0.5,0)
glVertex(wx,gy_t,wz-quadSize)
--topright
glTexCoord(0.5,0)
glVertex(wx,gy_t,wz-quadSize)
glTexCoord(0.5,0.5)
glVertex(wx,gy,wz)
glTexCoord(1,0.5)
glVertex(wx+quadSize,gy_r,wz)
glTexCoord(1,0)
glVertex(wx+quadSize,gy_tr,wz-quadSize)
--bottomright
glTexCoord(0.5,0.5)
glVertex(wx,gy,wz)
glTexCoord(0.5,1)
glVertex(wx,gy_b,wz+quadSize)
glTexCoord(1,1)
glVertex(wx+quadSize,gy_br,wz+quadSize)
glTexCoord(1,0.5)
glVertex(wx+quadSize,gy_r,wz)
--bottomleft
glTexCoord(0.5,0)
glVertex(wx-quadSize,gy_l,wz)
glTexCoord(1,0)
glVertex(wx-quadSize,gy_bl,wz+quadSize)
glTexCoord(1,0.5)
glVertex(wx,gy_b,wz+quadSize)
glTexCoord(0.5,0.5)
glVertex(wx,gy,wz)
end
local function DrawShadows()
-- object position
local wx, wy, wz, dist
-- ground heights
local gy
local gy_tl,gy_tr
local gy_bl,gy_br
local gy_t,gy_b
local gy_l,gy_r
local unitID
local unitDefID
local quadSize
for i=1,unitsCount do
unitID = unitsList[i]
if spValidUnitID(unitID) then
-- calculate quad size
unitDefID = spGetUnitDefID(unitID)
local xsize = UnitDefs[unitDefID].xsize
if xsize then
quadSize = xsize * 4
else
quadSize = 16
end
quadSize = quadSize * SIZE_MULT
wx, wy, wz = spGetUnitViewPosition(unitID)
if wx and wy and wz then
gy = spGetGroundHeight(wx, wz)
if (spIsSphereInView(wx,gy,wz,quadSize)) then
-- get ground heights
gy_tl,gy_tr = spGetGroundHeight(wx-quadSize,wz-quadSize),spGetGroundHeight(wx+quadSize,wz-quadSize)
gy_bl,gy_br = spGetGroundHeight(wx-quadSize,wz+quadSize),spGetGroundHeight(wx+quadSize,wz+quadSize)
gy_t,gy_b = spGetGroundHeight(wx,wz-quadSize),spGetGroundHeight(wx,wz+quadSize)
gy_l,gy_r = spGetGroundHeight(wx-quadSize,wz),spGetGroundHeight(wx+quadSize,wz)
MyDrawGroundQuad(wx,wz,quadSize,gy,gy_tl,gy_tr,gy_bl,gy_br,gy_t,gy_b,gy_l,gy_r)
end
end
--end
else
RemoveUnit(unitID)
end
end
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:Initialize()
ResetWidget()
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:DrawWorld()
glColor(1,1,1,0.4)
glDepthTest(true)
glTexture(BLOB_TEXTURE)
glPolygonOffset(0,-10)
glBeginEnd(GL_QUADS, DrawShadows)
glPolygonOffset(false)
glTexture(false)
glDepthTest(false)
glColor(1,1,1,1)
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/clothing/clothing_armor_composite_boots.lua | 1 | 3963 | --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_armor_composite_boots = object_draft_schematic_clothing_shared_clothing_armor_composite_boots:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Composite Armor Boots",
craftingToolTab = 2, -- (See DraftSchematicObjectTemplate.h)
complexity = 45,
size = 4,
xpType = "crafting_clothing_armor",
xp = 420,
assemblySkill = "armor_assembly",
experimentingSkill = "armor_experimentation",
customizationSkill = "armor_customization",
customizationOptions = {2},
customizationStringNames = {"/private/index_color_1"},
customizationDefaults = {0},
ingredientTemplateNames = {"craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n", "craft_clothing_ingredients_n"},
ingredientTitleNames = {"auxilary_coverage", "body", "liner", "hardware_and_attachments", "binding_and_reinforcement", "padding", "armor", "load_bearing_harness", "reinforcement"},
ingredientSlotType = {0, 0, 0, 0, 0, 0, 1, 1, 1},
resourceTypes = {"ore_intrusive", "fuel_petrochem_solid_known", "fiberplast_naboo", "aluminum", "copper_beyrllius", "hide_wooly", "object/tangible/component/armor/shared_armor_segment_composite.iff", "object/tangible/component/clothing/shared_synthetic_cloth.iff", "object/tangible/component/clothing/shared_reinforced_fiber_panels.iff"},
resourceQuantities = {50, 50, 25, 30, 20, 20, 1, 1, 1},
contribution = {100, 100, 100, 100, 100, 100, 100, 100, 100},
targetTemplate = "object/tangible/wearables/armor/composite/armor_composite_boots.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_clothing_clothing_armor_composite_boots, "object/draft_schematic/clothing/clothing_armor_composite_boots.iff")
| agpl-3.0 |
mempko/firestr | example_apps/voice/code.lua | 1 | 1767 |
m = app:mic("got_sound", "opus")
m:start()
muteb = app:button("mute mic")
app:place(muteb, 0, 0)
muteb:when_clicked("mute()")
smuteb = app:button("mute speaker")
app:place(smuteb, 0,1)
smuteb:when_clicked("smute()")
muted = false
talkers = {}
row = 2
update_timer = app:timer(1000, "update()")
tick = 0;
function init_talker(id, name)
if talkers[id] == nil then
local l = app:label(name.." talking")
local s = app:speaker("opus")
if muted then s:mute() end
app:place(l, row, 0)
row = row + 1
talkers[id] = {n=name, ticks = 0, label=l, speaker=s, tick=0}
end
end
function got_sound(d)
tick = tick + 1
local m = app:message()
m:not_robust()
m:set_type("s")
m:set("t", tick)
m:set_bin("d", d)
app:send(m)
end
app:when_message("s", "play_sound")
function play_sound(m)
local id = m:from():id()
local name = m:from():name()
if #id == 0 then return end
init_talker(id, name)
local tick = m:get("t")
local u = talkers[id]
if tick < u.tick then return end
u.speaker:play(m:get_bin("d"))
if u.ticks > 1 then
u.label:set_text(u.n.." talking")
end
u.ticks = 0
u.tick = tick
end
function mute()
m:stop()
muteb:when_clicked("unmute()")
muteb:set_text("unmute mic")
end
function unmute()
m:start()
muteb:when_clicked("mute()")
muteb:set_text("mute mic")
end
function smute()
muted=true
for id,u in pairs(talkers) do
u.speaker:mute()
end
smuteb:when_clicked("sunmute()")
smuteb:set_text("unmute speaker")
end
function sunmute()
muted=false
for id,u in pairs(talkers) do
u.speaker:unmute()
end
smuteb:when_clicked("smute()")
smuteb:set_text("mute speaker")
end
function update()
for id,u in pairs(talkers) do
u.ticks = u.ticks + 1
if u.ticks > 1 then
u.label:set_text(u.n.." not talking")
end
end
end
| gpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/screenplays/caves/talus_aakuan_cave.lua | 2 | 4532 | TalusAakuanCaveScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "TalusAakuanCaveScreenPlay",
lootContainers = {
6075899,
6075900,
6075901,
6075902,
6075903
},
lootLevel = 25,
lootGroups = {
{
groups = {
{group = "color_crystals", chance = 160000},
{group = "junk", chance = 8240000},
{group = "melee_weapons", chance = 1000000},
{group = "clothing_attachments", chance = 300000},
{group = "armor_attachments", chance = 300000}
},
lootChance = 8000000
}
},
lootContainerRespawn = 1800
}
registerScreenPlay("TalusAakuanCaveScreenPlay", true)
function TalusAakuanCaveScreenPlay:start()
if (isZoneEnabled("talus")) then
self:spawnMobiles()
self:initializeLootContainers()
end
end
function TalusAakuanCaveScreenPlay:spawnMobiles()
spawnMobile("talus", "aakuan_follower", 300, 5932.6, 39.2, 4646.6, -73, 0)
spawnMobile("talus", "aakuan_follower", 300, 5926.5, 40.0, 4647.9, 89, 0)
spawnMobile("talus", "aakuan_steward", 300, 5928.6, 40.6, 4650.5, -164, 0)
spawnMobile("talus", "aakuan_sentinel", 300, 24.6, -28.6, -11.5, -50, 4255652)
spawnMobile("talus", "aakuan_keeper", 300, 24.6, -27.4, -7.5, -128, 4255652)
spawnMobile("talus", "aakuan_sentinel", 300, 21.9, -41.5, -70.6, 39, 4255653)
spawnMobile("talus", "aakuan_keeper", 300, 23.1, -42.3, -64.7, -167, 4255653)
spawnMobile("talus", "aakuan_keeper", 300, 26.0, -42.9, -69.1, -100, 4255653)
spawnMobile("talus", "aakuan_sentinel", 300, 54.7, -48.6, -58.7, 124, 4255653)
spawnMobile("talus", "aakuan_follower", 300, 51.1, -49.0, -54.8, 164, 4255653)
spawnMobile("talus", "aakuan_follower", 300, 49.4, -48.6, -59.1, 69, 4255653)
spawnMobile("talus", "aakuan_follower", 300, 48.8, -47.6, -71.5, -11, 4255653)
spawnMobile("talus", "aakuan_follower", 300, 54.7, -47.3, -69.8, -43, 4255653)
spawnMobile("talus", "aakuan_guardian", 300, 40.6, -46.2, -10.3, 128, 4255653)
spawnMobile("talus", "aakuan_guardian", 300, 46.8, -46.8, -5.2, -175, 4255653)
spawnMobile("talus", "aakuan_follower", 300, 42.6, -46.7, -7.0, 142, 4255653)
spawnMobile("talus", "aakuan_anarchist", 300, 56.8, -68.5, -38.2, 82, 4255653)
spawnMobile("talus", "aakuan_steward", 300, 95.9, -46.4, -121.1, 171, 4255656)
spawnMobile("talus", "aakuan_steward", 300, 90.3, -46.0, -120.6, 165, 4255656)
spawnMobile("talus", "aakuan_warder", 300, 88.9, -46.6, -109.7, -87, 4255656)
spawnMobile("talus", "aakuan_warder", 300, 81.0, -77.4, -93.4, -72, 4255656)
spawnMobile("talus", "aakuan_spice_guard", 300, 89.2, -61.2, -8.5, 42, 4255654)
spawnMobile("talus", "aakuan_steward", 300, 77.1, -60.9, -7.6, 82, 4255654)
spawnMobile("talus", "aakuan_steward", 300, 89.8, -66.9, -38.0, -11, 4255654)
spawnMobile("talus", "aakuan_defender", 300, 89.2, -76.3, -58.7, -34, 4255655)
spawnMobile("talus", "aakuan_steward", 300, 96.4, -75.4, -64.2, 85, 4255655)
spawnMobile("talus", "aakuan_defender", 300, 88.5, -76.6, -70.6, -34, 4255655)
spawnMobile("talus", "aakuan_guardian", 300, 56.9, -70.0, -121.8, -10, 4255657)
spawnMobile("talus", "aakuan_warder", 300, 86.8, -66.9, -136.6, -113, 4255658)
spawnMobile("talus", "aakuan_sentinel", 300, 83.9, -66.1, -141.8, -143, 4255658)
spawnMobile("talus", "aakuan_guardian", 300, 116.3, -66.8, -91.1, -160, 4255659)
spawnMobile("talus", "aakuan_spice_guard", 300, 110.8, -66.7, -92.4, -94, 4255659)
spawnMobile("talus", "aakuan_warder", 300, 129.2, -66.7, -109.2, -87, 4255659)
spawnMobile("talus", "aakuan_spice_guard", 300, 144.9, -66.2, -86.5, -125, 4255659)
spawnMobile("talus", "aakuan_spice_guard", 300, 139.6, -66.7, -86.5, -156, 4255659)
spawnMobile("talus", "aakuan_anarchist", 300, 153.7, -65.9, -129.6, -47, 4255659)
spawnMobile("talus", "aakuan_champion", 300, 189.3, -66.1, -105.5, -72, 4255660)
spawnMobile("talus", "aakuan_assassin", 300, 190.0, -66.3, -97.9, -93, 4255660)
spawnMobile("talus", "aakuan_warder", 300, 165.0, -66.7, -98.0, -96, 4255660)
end
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/particle/particle_test_98.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_static_particle_particle_test_98 = object_static_particle_shared_particle_test_98:new {
}
ObjectTemplates:addTemplate(object_static_particle_particle_test_98, "object/static/particle/particle_test_98.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/wearables/ring/serverobjects.lua | 3 | 2540 | --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/wearables/ring/aakuan_ring.lua")
includeFile("tangible/wearables/ring/ring_base.lua")
includeFile("tangible/wearables/ring/ring_mark_hero.lua")
includeFile("tangible/wearables/ring/ring_nightsister.lua")
includeFile("tangible/wearables/ring/ring_s01.lua")
includeFile("tangible/wearables/ring/ring_s02.lua")
includeFile("tangible/wearables/ring/ring_s03.lua")
includeFile("tangible/wearables/ring/ring_s03_quest.lua")
includeFile("tangible/wearables/ring/ring_s04.lua")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/particle/pt_waterfall_mist_med.lua | 3 | 2236 | --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_particle_pt_waterfall_mist_med = object_static_particle_shared_pt_waterfall_mist_med:new {
}
ObjectTemplates:addTemplate(object_static_particle_pt_waterfall_mist_med, "object/static/particle/pt_waterfall_mist_med.iff")
| agpl-3.0 |
djarek/forgottenserver | data/creaturescripts/scripts/offlinetraining.lua | 7 | 2373 | function onLogin(player)
local lastLogout = player:getLastLogout()
local offlineTime = lastLogout ~= 0 and math.min(os.time() - lastLogout, 86400 * 21) or 0
local offlineTrainingSkill = player:getOfflineTrainingSkill()
if offlineTrainingSkill == -1 then
player:addOfflineTrainingTime(offlineTime * 1000)
return true
end
player:setOfflineTrainingSkill(-1)
if offlineTime < 600 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be logged out for more than 10 minutes to start offline training.")
return true
end
local trainingTime = math.max(0, math.min(offlineTime, math.min(43200, player:getOfflineTrainingTime() / 1000)))
player:removeOfflineTrainingTime(trainingTime * 1000)
local remainder = offlineTime - trainingTime
if remainder > 0 then
player:addOfflineTrainingTime(remainder * 1000)
end
if trainingTime < 60 then
return true
end
local text = "During your absence you trained for"
local hours = math.floor(trainingTime / 3600)
if hours > 1 then
text = string.format("%s %d hours", text, hours)
elseif hours == 1 then
text = string.format("%s 1 hour", text)
end
local minutes = math.floor((trainingTime % 3600) / 60)
if minutes ~= 0 then
if hours ~= 0 then
text = string.format("%s and", text)
end
if minutes > 1 then
text = string.format("%s %d minutes", text, minutes)
else
text = string.format("%s 1 minute", text)
end
end
text = string.format("%s.", text)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, text)
local vocation = player:getVocation()
local promotion = vocation:getPromotion()
local topVocation = not promotion and vocation or promotion
local updateSkills = false
if table.contains({SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE}, offlineTrainingSkill) then
local modifier = topVocation:getAttackSpeed() / 1000
updateSkills = player:addOfflineTrainingTries(offlineTrainingSkill, (trainingTime / modifier) / (offlineTrainingSkill == SKILL_DISTANCE and 4 or 2))
elseif offlineTrainingSkill == SKILL_MAGLEVEL then
local gainTicks = topVocation:getManaGainTicks() * 2
if gainTicks == 0 then
gainTicks = 1
end
updateSkills = player:addOfflineTrainingTries(SKILL_MAGLEVEL, trainingTime * (vocation:getManaGainAmount() / gainTicks))
end
if updateSkills then
player:addOfflineTrainingTries(SKILL_SHIELD, trainingTime / 4)
end
return true
end
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_rebel_specforce_general_bothan_male_01.lua | 3 | 2300 | --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_rebel_specforce_general_bothan_male_01 = object_mobile_shared_dressed_rebel_specforce_general_bothan_male_01:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_rebel_specforce_general_bothan_male_01, "object/mobile/dressed_rebel_specforce_general_bothan_male_01.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/furniture/bestine/painting_bestine_golden_flower_03.lua | 1 | 3264 | --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_furniture_bestine_painting_bestine_golden_flower_03 = object_draft_schematic_furniture_bestine_shared_painting_bestine_golden_flower_03:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Abstract Painting of Golden Petals 3",
craftingToolTab = 512, -- (See DraftSchematicObjectTemplate.h)
complexity = 15,
size = 2,
xpType = "crafting_structure_general",
xp = 80,
assemblySkill = "structure_assembly",
experimentingSkill = "structure_experimentation",
customizationSkill = "structure_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_furniture_ingredients_n", "craft_furniture_ingredients_n", "craft_furniture_ingredients_n"},
ingredientTitleNames = {"frame", "canvas", "paints"},
ingredientSlotType = {0, 0, 0},
resourceTypes = {"metal", "hide", "petrochem_inert_polymer"},
resourceQuantities = {50, 50, 40},
contribution = {100, 100, 100},
targetTemplate = "object/tangible/painting/painting_bestine_golden_flower_03.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_furniture_bestine_painting_bestine_golden_flower_03, "object/draft_schematic/furniture/bestine/painting_bestine_golden_flower_03.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/chemistry/medpack_poison_area_mind_a.lua | 1 | 3717 | --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_chemistry_medpack_poison_area_mind_a = object_draft_schematic_chemistry_shared_medpack_poison_area_mind_a:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Mind Area Poison Delivery Unit - A",
craftingToolTab = 64, -- (See DraftSchematicObjectTemplate.h)
complexity = 20,
size = 3,
xpType = "crafting_bio_engineer_creature",
xp = 70,
assemblySkill = "bio_engineer_assembly",
experimentingSkill = "bio_engineer_experimentation",
customizationSkill = "bio_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n"},
ingredientTitleNames = {"body_shell", "organic_element", "inorganic_element", "delivery_medium", "drug_duration_compound", "drug_strength_compound"},
ingredientSlotType = {0, 0, 0, 1, 1, 1},
resourceTypes = {"metal_nonferrous", "vegetable_fungi", "chemical", "object/tangible/component/chemistry/shared_dispersal_mechanism.iff", "object/tangible/component/chemistry/shared_resilience_compound.iff", "object/tangible/component/chemistry/shared_infection_amplifier.iff"},
resourceQuantities = {8, 10, 15, 1, 1, 1},
contribution = {100, 100, 100, 100, 100, 100},
targetTemplate = "object/tangible/medicine/crafted/medpack_poison_area_mind_a.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_chemistry_medpack_poison_area_mind_a, "object/draft_schematic/chemistry/medpack_poison_area_mind_a.iff")
| agpl-3.0 |
Kyrremann/CCCCCC | firework/Firework.lua | 1 | 2223 | require 'firework.class'
local Vector=require 'firework.Vector'
local Particle=require 'firework.Particle'
STATE={ROCKET=1, EXPLODE=2, LIVE=3, DEAD=4}
local M=class(function(self, x, y)
self.Position=Vector(x, y)
self.state=STATE.ROCKET
self.Particles={}
self.numParticles=math.random(150, 450)
self.elapsed=0
self.R=math.random(50, 255)
self.G=math.random(50, 255)
self.B=math.random(50, 255)
self.StartPosition=Vector(math.random(0, love.graphics.getWidth()), love.graphics.getHeight())
self.elapsed=0
self.livetime=math.random(3,20)/10
end)
function M:update(dt)
self.elapsed=self.elapsed+dt
local state=self.state
if state==STATE.LIVE or state==STATE.EXPLODE then
if state==STATE.EXPLODE then
for i=1,math.random(50,120) do
self:addParticle(self.Position.x, self.Position.y)
end
if #self.Particles>= self.numParticles then
self.state=STATE.LIVE
end
end
for k=#self.Particles,1,-1 do
local p=self.Particles[k]
if p:isDead() then
table.remove(self.Particles, k)
else
p:update(dt)
end
end
if state==STATE.LIVE and #self.Particles==0 then
self.state=STATE.DEAD
end
elseif state==STATE.DEAD then
return
elseif state==STATE.ROCKET then
local pct=self.elapsed/self.livetime*100
if pct>=100 then
self.elapsed=0
self.state=STATE.EXPLODE
end
else
error('UNKNOWN STATE: '..state)
end
end
function M:draw()
if self.state==STATE.ROCKET then
local pct=self.elapsed/self.livetime
local d=(self.StartPosition-self.Position)*pct
local d2=(self.StartPosition-self.Position)*(pct+0.03)
local pos1=self.StartPosition-d
local pos2=self.StartPosition-d2
love.graphics.setColor(self.R, self.G, self.B, 255)
love.graphics.setLineWidth(3)
love.graphics.line(pos1.x, pos1.y, pos2.x, pos2.y)
love.graphics.circle('fill', self.StartPosition.x, self.StartPosition.y, 10, 10)
else
for k,v in ipairs(self.Particles) do
v:draw()
end
end
end
function M:isDead()
return self.state==STATE.DEAD
end
function M:addParticle(x, y)
table.insert(self.Particles, Particle(x, y, self.R, self.G, self.B))
end
return M
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/jellyfish/lair_jellyfish_underwater.lua | 1 | 2327 | --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_jellyfish_lair_jellyfish_underwater = object_tangible_lair_jellyfish_shared_lair_jellyfish_underwater:new {
objectMenuComponent = "LairMenuComponent",
}
ObjectTemplates:addTemplate(object_tangible_lair_jellyfish_lair_jellyfish_underwater, "object/tangible/lair/jellyfish/lair_jellyfish_underwater.iff")
| agpl-3.0 |
TeleCU/cna2 | plugins/stats.lua | 866 | 4001 | do
-- Returns a table with `name` and `msgs`
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print_name(user)..' ['..user_id..']'
return user_info
end
local function chat_stats(chat_id)
-- Users on chat
local hash = 'chat:'..chat_id..':users'
local users = redis:smembers(hash)
local users_info = {}
-- Get user info
for i = 1, #users do
local user_id = users[i]
local user_info = get_msgs_user_chat(user_id, chat_id)
table.insert(users_info, user_info)
end
-- Sort users by msgs number
table.sort(users_info, function(a, b)
if a.msgs and b.msgs then
return a.msgs > b.msgs
end
end)
local text = 'users in this chat \n'
for k,user in pairs(users_info) do
text = text..user.name..' = '..user.msgs..'\n'
end
local file = io.open("./groups/lists/"..chat_id.."stats.txt", "w")
file:write(text)
file:flush()
file:close()
send_document("chat#id"..chat_id,"./groups/lists/"..chat_id.."stats.txt", ok_cb, false)
return --text
end
local function chat_stats2(chat_id)
-- Users on chat
local hash = 'chat:'..chat_id..':users'
local users = redis:smembers(hash)
local users_info = {}
-- Get user info
for i = 1, #users do
local user_id = users[i]
local user_info = get_msgs_user_chat(user_id, chat_id)
table.insert(users_info, user_info)
end
-- Sort users by msgs number
table.sort(users_info, function(a, b)
if a.msgs and b.msgs then
return a.msgs > b.msgs
end
end)
local text = 'users in this chat \n'
for k,user in pairs(users_info) do
text = text..user.name..' = '..user.msgs..'\n'
end
return text
end
-- Save stats, ban user
local function bot_stats()
local redis_scan = [[
local cursor = '0'
local count = 0
repeat
local r = redis.call("SCAN", cursor, "MATCH", KEYS[1])
cursor = r[1]
count = count + #r[2]
until cursor == '0'
return count]]
-- Users
local hash = 'msgs:*:'..our_id
local r = redis:eval(redis_scan, 1, hash)
local text = 'Users: '..r
hash = 'chat:*:users'
r = redis:eval(redis_scan, 1, hash)
text = text..'\nGroups: '..r
return text
end
local function run(msg, matches)
if matches[1]:lower() == 'teleseed' then -- Put everything you like :)
local about = _config.about_text
local name = user_print_name(msg.from)
savelog(msg.to.id, name.." ["..msg.from.id.."] used /teleseed ")
return about
end
if matches[1]:lower() == "statslist" then
if not is_momod(msg) then
return "For mods only !"
end
local chat_id = msg.to.id
local name = user_print_name(msg.from)
savelog(msg.to.id, name.." ["..msg.from.id.."] requested group stats ")
return chat_stats2(chat_id)
end
if matches[1]:lower() == "stats" then
if not matches[2] then
if not is_momod(msg) then
return "For mods only !"
end
if msg.to.type == 'chat' then
local chat_id = msg.to.id
local name = user_print_name(msg.from)
savelog(msg.to.id, name.." ["..msg.from.id.."] requested group stats ")
return chat_stats(chat_id)
else
return
end
end
if matches[2] == "teleseed" then -- Put everything you like :)
if not is_admin(msg) then
return "For admins only !"
else
return bot_stats()
end
end
if matches[2] == "group" then
if not is_admin(msg) then
return "For admins only !"
else
return chat_stats(matches[3])
end
end
end
end
return {
patterns = {
"^[!/]([Ss]tats)$",
"^[!/]([Ss]tatslist)$",
"^[!/]([Ss]tats) (group) (%d+)",
"^[!/]([Ss]tats) (teleseed)",-- Put everything you like :)
"^[!/]([Tt]eleseed)"-- Put everything you like :)
},
run = run
}
end
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/components/engine/eng_reward_kuat_elite.lua | 3 | 2300 | --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_engine_eng_reward_kuat_elite = object_tangible_ship_components_engine_shared_eng_reward_kuat_elite:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_components_engine_eng_reward_kuat_elite, "object/tangible/ship/components/engine/eng_reward_kuat_elite.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/dantooine/janta_rockshaper.lua | 1 | 1149 | janta_rockshaper = Creature:new {
objectName = "@mob/creature_names:janta_rockshaper",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "janta_tribe",
faction = "janta_tribe",
level = 75,
chanceHit = 0.7,
damageMin = 495,
damageMax = 700,
baseXp = 7115,
baseHAM = 13000,
baseHAMmax = 15000,
armor = 1,
resists = {100,25,-1,25,25,100,25,-1,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = ATTACKABLE,
creatureBitmask = PACK + HERD,
optionsBitmask = AIENABLED,
diet = HERBIVORE,
templates = {
"object/mobile/dantari_male.iff",
"object/mobile/dantari_female.iff"},
lootGroups = {
{
groups = {
{group = "junk", chance = 5000000},
{group = "janta_common", chance = 1500000},
{group = "loot_kit_parts", chance = 3000000},
{group = "wearables_all", chance = 500000}
}
}
},
weapons = {"primitive_weapons"},
conversationTemplate = "",
attacks = merge(pikemanmaster,fencermaster,brawlermaster)
}
CreatureTemplates:addCreatureTemplate(janta_rockshaper, "janta_rockshaper")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/moncal_male.lua | 3 | 2160 | --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_moncal_male = object_mobile_shared_moncal_male:new {
}
ObjectTemplates:addTemplate(object_mobile_moncal_male, "object/mobile/moncal_male.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/attachment/weapon/hutt_medium_weapon1_s06.lua | 3 | 2308 | --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_attachment_weapon_hutt_medium_weapon1_s06 = object_tangible_ship_attachment_weapon_shared_hutt_medium_weapon1_s06:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_attachment_weapon_hutt_medium_weapon1_s06, "object/tangible/ship/attachment/weapon/hutt_medium_weapon1_s06.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/item/quest_item/fs_craft_puzzle_solid_state_array.lua | 1 | 3357 | --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_item_quest_item_fs_craft_puzzle_solid_state_array = object_draft_schematic_item_quest_item_shared_fs_craft_puzzle_solid_state_array:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Solid State Array",
craftingToolTab = 2148007936, -- (See DraftSchematicObjectTemplate.h)
complexity = 1,
size = 1,
xpType = "crafting_general",
xp = 40,
assemblySkill = "general_assembly",
experimentingSkill = "general_experimentation",
customizationSkill = "artisan_clothing_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n", "craft_item_ingredients_n"},
ingredientTitleNames = {"solid_state_units", "cooling_network", "array_housing", "socket_connection"},
ingredientSlotType = {0, 0, 0, 0},
resourceTypes = {"ore_extrusive", "water_vapor_naboo", "petrochem_inert_polymer", "copper"},
resourceQuantities = {100, 10, 20, 10},
contribution = {100, 100, 100, 100},
targetTemplate = "object/tangible/item/quest/force_sensitive/fs_craft_puzzle_solid_state_array.iff",
additionalTemplates = {}
}
ObjectTemplates:addTemplate(object_draft_schematic_item_quest_item_fs_craft_puzzle_solid_state_array, "object/draft_schematic/item/quest_item/fs_craft_puzzle_solid_state_array.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/crafted/engine/eng_mk1.lua | 2 | 3365 | --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_engine_eng_mk1 = object_tangible_ship_crafted_engine_shared_eng_mk1:new {
numberExperimentalProperties = {1, 1, 2, 1, 2, 2, 1, 2, 3, 3, 3, 2},
experimentalProperties = {"XX", "XX", "OQ", "UT", "XX", "OQ", "UT", "OQ", "UT", "XX", "CD", "OQ", "CD", "OQ", "PE", "CD", "OQ", "PE", "CD", "OQ", "PE", "OQ", "PE"},
experimentalWeights = {1, 1, 1, 3, 1, 1, 3, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
experimentalGroupTitles = {"null", "null", "exp_hp", "null", "exp_mass", "exp_armorhpmax", "null", "exp_energy_maintenance", "exp_pitch", "exp_yaw", "exp_roll", "exp_speed"},
experimentalSubGroupTitles = {"null", "null", "ship_component_hitpoints", "efficiency", "ship_component_mass", "ship_component_armor", "energy_efficiency", "ship_component_energy_required", "ship_component_engine_pitch_rate_maximum", "ship_component_engine_yaw_rate_maximum", "ship_component_engine_roll_rate_maximum", "ship_component_engine_speed_maximum"},
experimentalMin = {0, 0, 128, 1, 920, 64, 1, 1725, 38, 38, 38, 36},
experimentalMax = {0, 0, 173, 1, 680, 86, 1, 1275, 52, 52, 52, 48},
experimentalPrecision = {0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1},
experimentalCombineType = {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
}
ObjectTemplates:addTemplate(object_tangible_ship_crafted_engine_eng_mk1, "object/tangible/ship/crafted/engine/eng_mk1.iff")
| agpl-3.0 |
CorcovadoMing/AnimalAdoption | App/AnimalAdoption/scene_give.lua | 2 | 9758 | ---------------------------------------------------------------------------------
--
-- scene2.lua
--
---------------------------------------------------------------------------------
local composer = require( "composer" )
local widget = require( "widget" )
local scene = composer.newScene()
local image, text1, text2, text3, memTimer
local ox, oy = math.abs(display.screenOriginX), math.abs(display.screenOriginY)
local function onRowRender( event )
local sex = {}
sex["M"] = "公"
sex["F"] = "母"
sex["N"] = "性別未提供"
local row = event.row
local url = res[row.index].album_file
local split_url = split(url, '/')
local tmp_image = table.remove(split_url)
local rowImage
local path = system.pathForFile( tmp_image, system.TemporaryDirectory )
local fhd = io.open( path )
if fhd then
fhd:close()
rowImage = display.newImage( tmp_image, system.TemporaryDirectory)
else
rowImage = display.newImage( "images/no_pic.png" )
end
rowImage:scale(640/rowImage.width, row.contentHeight/rowImage.height)
rowImage.x = 320
rowImage.y = row.contentHeight/2
row:insert(rowImage)
local title = res[row.index].animal_kind .. ', ' .. res[row.index].animal_colour .. ", " .. sex[res[row.index].animal_sex]
local title2 = res[row.index].shelter_name
local rowTitle = display.newText(row, title, 0, 0, native.systemFont, 40)
rowTitle.anchorX = 0
rowTitle.x = 20
rowTitle.y = row.contentHeight - 120
rowTitle:setFillColor(0.8, 0.8, 0.8)
row:insert(rowTitle)
local rowTitle2 = display.newText(row, title2, 0, 0, native.systemFont, 40)
rowTitle2.anchorX = 0
rowTitle2.x = 20
rowTitle2.y = row.contentHeight - 70
rowTitle2:setFillColor(0.8, 0.8, 0.8)
row:insert(rowTitle2)
local saperator = display.newRect(320, row.contentHeight - 5, 640, 10)
saperator:setFillColor(0.8, 0.8, 0.8)
row:insert(saperator)
end
function scene:create( event )
local sceneGroup = self.view
end
function scene:show( event )
local tableView -- for shadow reference
local navigator
local descript_image
local backButton
local nav_title
local image
local itemSelected
local itemSelected2
local itemSelected3
local itemSelected4
local itemSelected5
local itemSelected6
local itemSelected7
local function goBack( event )
homeButton.isVisible = true
transition.to( tableView, { x=display.contentWidth*0.5, time=600, transition=easing.outQuint } )
transition.to( descript_image, { x=display.contentWidth+descript_image.contentWidth, time=500, transition=easing.outQuint } )
transition.to( itemSelected, { x=display.contentWidth+itemSelected.contentWidth, time=700, transition=easing.outQuint } )
transition.to( itemSelected2, { x=display.contentWidth+itemSelected2.contentWidth, time=700, transition=easing.outQuint } )
transition.to( itemSelected3, { x=display.contentWidth+itemSelected3.contentWidth, time=700, transition=easing.outQuint } )
transition.to( itemSelected4, { x=display.contentWidth+itemSelected4.contentWidth, time=700, transition=easing.outQuint } )
transition.to( itemSelected5, { x=display.contentWidth+itemSelected5.contentWidth, time=700, transition=easing.outQuint } )
transition.to( itemSelected6, { x=display.contentWidth+itemSelected6.contentWidth, time=700, transition=easing.outQuint } )
transition.to( itemSelected7, { x=display.contentWidth+itemSelected7.contentWidth, time=700, transition=easing.outQuint } )
transition.to( event.target, { x=display.contentWidth+event.target.contentWidth, time=900, transition=easing.outQuint } )
end
local function goHome( event )
composer.gotoScene( "main_screen", "crossFade", 800 )
tableView.isVisible = false
navigator.isVisible = false
nav_title.isVisible = false
homeButton.isVisible = false
image.isVisible = false
end
bodytype = {}
bodytype["MINI"] = "迷你"
bodytype["SMALL"] = "小"
bodytype["MEDIUM"] = "中"
bodytype["BIG"] = "大"
age = {}
age["CHILD"] = "年幼"
age["ADULT"] = "成熟"
local function onRowTouch( event )
local phase = event.phase
local row = event.target
if ( "release" == phase) then
local url = res[row.index].album_file
local split_url = split(url, '/')
local tmp_image = table.remove(split_url)
local path = system.pathForFile( tmp_image, system.TemporaryDirectory )
local fhd = io.open( path )
if fhd then
fhd:close()
descript_image = display.newImage( tmp_image, system.TemporaryDirectory)
else
descript_image = display.newImage( "images/no_pic.png" )
end
descript_image:scale(640/descript_image.width, row.contentHeight/descript_image.height)
descript_image.x = display.contentWidth+descript_image.contentWidth
descript_image.y = descript_image.contentHeight/2 + 100
itemSelected.text = "種類: " .. res[row.index].animal_kind
itemSelected2.text = "體型: " .. bodytype[res[row.index].animal_bodytype]
itemSelected3.text = "顏色: " .. res[row.index].animal_colour
itemSelected4.text = "年齡: " .. age[res[row.index].animal_age]
itemSelected5.text = "收容所: " .. res[row.index].shelter_name
itemSelected6.text = "刊登時間: " .. res[row.index].animal_opendate
itemSelected7.text = "截止時間: " .. res[row.index].animal_closeddate
itemSelected:setFillColor(0.4, 0.2, 0.2)
itemSelected2:setFillColor(0.4, 0.2, 0.2)
itemSelected3:setFillColor(0.4, 0.2, 0.2)
itemSelected4:setFillColor(0.4, 0.2, 0.2)
itemSelected5:setFillColor(0.4, 0.2, 0.2)
itemSelected6:setFillColor(0.4, 0.2, 0.2)
itemSelected7:setFillColor(0.4, 0.2, 0.2)
transition.to( tableView, { x=((display.contentWidth/2)+ox+ox)*-1, time=500, transition=easing.outQuint } )
transition.to( descript_image, { x=display.contentCenterX, time=700, transition=easing.outQuint } )
transition.to( itemSelected, { x=itemSelected.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( itemSelected2, { x=itemSelected2.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( itemSelected3, { x=itemSelected3.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( itemSelected4, { x=itemSelected4.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( itemSelected5, { x=itemSelected5.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( itemSelected6, { x=itemSelected6.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( itemSelected7, { x=itemSelected7.contentWidth / 2 + 20, time=900, transition=easing.outQuint } )
transition.to( backButton, { x=50, time=1100, transition=easing.outQuint } )
homeButton.isVisible = false
end
end
local phase = event.phase
if "did" == phase then
image = display.newImage( "images/second_screen.png" )
image.x = display.contentCenterX
image.y = display.contentCenterY + 50
itemSelected = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected.x = display.contentWidth + itemSelected.contentWidth
itemSelected.y = 650
itemSelected2 = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected2.x = display.contentWidth + itemSelected2.contentWidth
itemSelected2.y = 700
itemSelected3 = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected3.x = display.contentWidth + itemSelected3.contentWidth
itemSelected3.y = 750
itemSelected4 = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected4.x = display.contentWidth + itemSelected4.contentWidth
itemSelected4.y = 800
itemSelected5 = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected5.x = display.contentWidth + itemSelected5.contentWidth
itemSelected5.y = 850
itemSelected6 = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected6.x = display.contentWidth + itemSelected6.contentWidth
itemSelected6.y = 900
itemSelected7 = display.newText( "No description", 0, 0, native.systemFont, 40 )
itemSelected7.x = display.contentWidth + itemSelected7.contentWidth
itemSelected7.y = 950
tableView = widget.newTableView {
left = 0,
top = 100,
height = 1136 - 100,
width = 640,
backgroundColor = { 0.8, 0.8, 0.8 },
onRowRender = onRowRender,
onRowTouch = onRowTouch,
listener = scrollListener
}
navigator = display.newRect(320, 50, 640, 100)
navigator:setFillColor(1.0,0.9,0.5)
nav_title = display.newImage( "images/logo.png" )
nav_title:scale(0.6, 0.6)
nav_title.x = display.contentCenterX
nav_title.y = 50
homeButton = widget.newButton {
height = 50,
width = 60,
defaultFile = "images/home.png",
overFile = "images/home.png",
onRelease = goHome
}
homeButton.x = 50
homeButton.y = 50
backButton = widget.newButton {
height = 50,
width = 60,
defaultFile = "images/back.png",
overFile = "images/back.png",
onRelease = goBack
}
backButton.x = display.contentWidth+backButton.contentWidth
backButton.y = 50
for i = 1, #res do
-- Insert a row into the tableView
tableView:insertRow {
rowHeight = 500,
rowColor = {default={1,0,0,1}}
}
end
-- remove previous scene's view
composer.removeScene( "main_screen" )
end
end
function scene:hide( event )
local phase = event.phase
if "will" == phase then
end
end
function scene:destroy( event )
end
---------------------------------------------------------------------------------
-- Listener setup
scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )
scene:addEventListener( "hide", scene )
scene:addEventListener( "destroy", scene )
---------------------------------------------------------------------------------
return scene | apache-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/dressed_theed_palace_chamberlain.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_theed_palace_chamberlain = object_mobile_shared_dressed_theed_palace_chamberlain:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_theed_palace_chamberlain, "object/mobile/dressed_theed_palace_chamberlain.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/furniture/tatooine/frn_tatt_chair_cantina_seat_2.lua | 3 | 2316 | --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_furniture_tatooine_frn_tatt_chair_cantina_seat_2 = object_tangible_furniture_tatooine_shared_frn_tatt_chair_cantina_seat_2:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_tatooine_frn_tatt_chair_cantina_seat_2, "object/tangible/furniture/tatooine/frn_tatt_chair_cantina_seat_2.iff")
| agpl-3.0 |
aircross/OpenWrt-Firefly-LuCI | libs/nixio/docsrc/nixio.lua | 151 | 15824 | --- General POSIX IO library.
module "nixio"
--- Look up a hostname and service via DNS.
-- @class function
-- @name nixio.getaddrinfo
-- @param host hostname to lookup (optional)
-- @param family address family [<strong>"any"</strong>, "inet", "inet6"]
-- @param service service name or port (optional)
-- @return Table containing one or more tables containing: <ul>
-- <li>family = ["inet", "inet6"]</li>
-- <li>socktype = ["stream", "dgram", "raw"]</li>
-- <li>address = Resolved IP-Address</li>
-- <li>port = Resolved Port (if service was given)</li>
-- </ul>
--- Reverse look up an IP-Address via DNS.
-- @class function
-- @name nixio.getnameinfo
-- @param ipaddr IPv4 or IPv6-Address
-- @return FQDN
--- (Linux, BSD) Get a list of available network interfaces and their addresses.
-- @class function
-- @name nixio.getifaddrs
-- @return Table containing one or more tables containing: <ul>
-- <li>name = Interface Name</li>
-- <li>family = ["inet", "inet6", "packet"]</li>
-- <li>addr = Interface Address (IPv4, IPv6, MAC, ...)</li>
-- <li>broadaddr = Broadcast Address</li>
-- <li>dstaddr = Destination Address (Point-to-Point)</li>
-- <li>netmask = Netmask (if available)</li>
-- <li>prefix = Prefix (if available)</li>
-- <li>flags = Table of interface flags (up, multicast, loopback, ...)</li>
-- <li>data = Statistics (Linux, "packet"-family)</li>
-- <li>hatype = Hardware Type Identifier (Linix, "packet"-family)</li>
-- <li>ifindex = Interface Index (Linux, "packet"-family)</li>
-- </ul>
--- Get protocol entry by name.
-- @usage This function returns nil if the given protocol is unknown.
-- @class function
-- @name nixio.getprotobyname
-- @param name protocol name to lookup
-- @return Table containing the following fields: <ul>
-- <li>name = Protocol Name</li>
-- <li>proto = Protocol Number</li>
-- <li>aliases = Table of alias names</li>
-- </ul>
--- Get protocol entry by number.
-- @usage This function returns nil if the given protocol is unknown.
-- @class function
-- @name nixio.getprotobynumber
-- @param proto protocol number to lookup
-- @return Table containing the following fields: <ul>
-- <li>name = Protocol Name</li>
-- <li>proto = Protocol Number</li>
-- <li>aliases = Table of alias names</li>
-- </ul>
--- Get all or a specifc proto entry.
-- @class function
-- @name nixio.getproto
-- @param proto protocol number or name to lookup (optional)
-- @return Table (or if no parameter is given, a table of tables)
-- containing the following fields: <ul>
-- <li>name = Protocol Name</li>
-- <li>proto = Protocol Number</li>
-- <li>aliases = Table of alias names</li>
-- </ul>
--- Create a new socket and bind it to a network address.
-- This function is a shortcut for calling nixio.socket and then bind()
-- on the socket object.
-- @usage This functions calls getaddrinfo(), socket(),
-- setsockopt() and bind() but NOT listen().
-- @usage The <em>reuseaddr</em>-option is automatically set before binding.
-- @class function
-- @name nixio.bind
-- @param host Hostname or IP-Address (optional, default: all addresses)
-- @param port Port or service description
-- @param family Address family [<strong>"any"</strong>, "inet", "inet6"]
-- @param socktype Socket Type [<strong>"stream"</strong>, "dgram"]
-- @return Socket Object
--- Create a new socket and connect to a network address.
-- This function is a shortcut for calling nixio.socket and then connect()
-- on the socket object.
-- @usage This functions calls getaddrinfo(), socket() and connect().
-- @class function
-- @name nixio.connect
-- @param host Hostname or IP-Address (optional, default: localhost)
-- @param port Port or service description
-- @param family Address family [<strong>"any"</strong>, "inet", "inet6"]
-- @param socktype Socket Type [<strong>"stream"</strong>, "dgram"]
-- @return Socket Object
--- Open a file.
-- @class function
-- @name nixio.open
-- @usage Although this function also supports the traditional fopen()
-- file flags it does not create a file stream but uses the open() syscall.
-- @param path Filesystem path to open
-- @param flags Flag string or number (see open_flags).
-- [<strong>"r"</strong>, "r+", "w", "w+", "a", "a+"]
-- @param mode File mode for newly created files (see chmod, umask).
-- @see nixio.umask
-- @see nixio.open_flags
-- @return File Object
--- Generate flags for a call to open().
-- @class function
-- @name nixio.open_flags
-- @usage This function cannot fail and will never return nil.
-- @usage The "nonblock" and "ndelay" flags are aliases.
-- @usage The "nonblock", "ndelay" and "sync" flags are no-ops on Windows.
-- @param flag1 First Flag ["append", "creat", "excl", "nonblock", "ndelay",
-- "sync", "trunc", "rdonly", "wronly", "rdwr"]
-- @param ... More Flags [-"-]
-- @return flag to be used as second paramter to open
--- Duplicate a file descriptor.
-- @class function
-- @name nixio.dup
-- @usage This funcation calls dup2() if <em>newfd</em> is set, otherwise dup().
-- @param oldfd Old descriptor [File Object, Socket Object (POSIX only)]
-- @param newfd New descriptor to serve as copy (optional)
-- @return File Object of new descriptor
--- Create a pipe.
-- @class function
-- @name nixio.pipe
-- @return File Object of the read end
-- @return File Object of the write end
--- Get the last system error code.
-- @class function
-- @name nixio.errno
-- @return Error code
--- Get the error message for the corresponding error code.
-- @class function
-- @name nixio.strerror
-- @param errno System error code
-- @return Error message
--- Sleep for a specified amount of time.
-- @class function
-- @usage Not all systems support nanosecond precision but you can expect
-- to have at least maillisecond precision.
-- @usage This function is not signal-protected and may fail with EINTR.
-- @param seconds Seconds to wait (optional)
-- @param nanoseconds Nanoseconds to wait (optional)
-- @name nixio.nanosleep
-- @return true
--- Generate events-bitfield or parse revents-bitfield for poll.
-- @class function
-- @name nixio.poll_flags
-- @param mode1 revents-Flag bitfield returned from poll to parse OR
-- ["in", "out", "err", "pri" (POSIX), "hup" (POSIX), "nval" (POSIX)]
-- @param ... More mode strings for generating the flag [-"-]
-- @see nixio.poll
-- @return table with boolean fields reflecting the mode parameter
-- <strong>OR</strong> bitfield to use for the events-Flag field
--- Wait for some event on a file descriptor.
-- poll() sets the revents-field of the tables provided by fds to a bitfield
-- indicating the events that occured.
-- @class function
-- @usage This function works in-place on the provided table and only
-- writes the revents field, you can use other fields on your demand.
-- @usage All metamethods on the tables provided as fds are ignored.
-- @usage The revents-fields are not reset when the call times out.
-- You have to check the first return value to be 0 to handle this case.
-- @usage If you want to wait on a TLS-Socket you have to use the underlying
-- socket instead.
-- @usage On Windows poll is emulated through select(), can only be used
-- on socket descriptors and cannot take more than 64 descriptors per call.
-- @usage This function is not signal-protected and may fail with EINTR.
-- @param fds Table containing one or more tables containing <ul>
-- <li> fd = I/O Descriptor [Socket Object, File Object (POSIX)]</li>
-- <li> events = events to wait for (bitfield generated with poll_flags)</li>
-- </ul>
-- @param timeout Timeout in milliseconds
-- @name nixio.poll
-- @see nixio.poll_flags
-- @return number of ready IO descriptors
-- @return the fds-table with revents-fields set
--- (POSIX) Clone the current process.
-- @class function
-- @name nixio.fork
-- @return the child process id for the parent process, 0 for the child process
--- (POSIX) Send a signal to one or more processes.
-- @class function
-- @name nixio.kill
-- @param target Target process of process group.
-- @param signal Signal to send
-- @return true
--- (POSIX) Get the parent process id of the current process.
-- @class function
-- @name nixio.getppid
-- @return parent process id
--- (POSIX) Get the user id of the current process.
-- @class function
-- @name nixio.getuid
-- @return process user id
--- (POSIX) Get the group id of the current process.
-- @class function
-- @name nixio.getgid
-- @return process group id
--- (POSIX) Set the group id of the current process.
-- @class function
-- @name nixio.setgid
-- @param gid New Group ID
-- @return true
--- (POSIX) Set the user id of the current process.
-- @class function
-- @name nixio.setuid
-- @param gid New User ID
-- @return true
--- (POSIX) Change priority of current process.
-- @class function
-- @name nixio.nice
-- @param nice Nice Value
-- @return true
--- (POSIX) Create a new session and set the process group ID.
-- @class function
-- @name nixio.setsid
-- @return session id
--- (POSIX) Wait for a process to change state.
-- @class function
-- @name nixio.waitpid
-- @usage If the "nohang" is given this function becomes non-blocking.
-- @param pid Process ID (optional, default: any childprocess)
-- @param flag1 Flag (optional) ["nohang", "untraced", "continued"]
-- @param ... More Flags [-"-]
-- @return process id of child or 0 if no child has changed state
-- @return ["exited", "signaled", "stopped"]
-- @return [exit code, terminate signal, stop signal]
--- (POSIX) Get process times.
-- @class function
-- @name nixio.times
-- @return Table containing: <ul>
-- <li>utime = user time</li>
-- <li>utime = system time</li>
-- <li>cutime = children user time</li>
-- <li>cstime = children system time</li>
-- </ul>
--- (POSIX) Get information about current system and kernel.
-- @class function
-- @name nixio.uname
-- @return Table containing: <ul>
-- <li>sysname = operating system</li>
-- <li>nodename = network name (usually hostname)</li>
-- <li>release = OS release</li>
-- <li>version = OS version</li>
-- <li>machine = hardware identifier</li>
-- </ul>
--- Change the working directory.
-- @class function
-- @name nixio.chdir
-- @param path New working directory
-- @return true
--- Ignore or use set the default handler for a signal.
-- @class function
-- @name nixio.signal
-- @param signal Signal
-- @param handler ["ign", "dfl"]
-- @return true
--- Get the ID of the current process.
-- @class function
-- @name nixio.getpid
-- @return process id
--- Get the current working directory.
-- @class function
-- @name nixio.getcwd
-- @return workign directory
--- Get the current environment table or a specific environment variable.
-- @class function
-- @name nixio.getenv
-- @param variable Variable (optional)
-- @return environment table or single environment variable
--- Set or unset a environment variable.
-- @class function
-- @name nixio.setenv
-- @usage The environment variable will be unset if value is ommited.
-- @param variable Variable
-- @param value Value (optional)
-- @return true
--- Execute a file to replace the current process.
-- @class function
-- @name nixio.exec
-- @usage The name of the executable is automatically passed as argv[0]
-- @usage This function does not return on success.
-- @param executable Executable
-- @param ... Parameters
--- Invoke the shell and execute a file to replace the current process.
-- @class function
-- @name nixio.execp
-- @usage The name of the executable is automatically passed as argv[0]
-- @usage This function does not return on success.
-- @param executable Executable
-- @param ... Parameters
--- Execute a file with a custom environment to replace the current process.
-- @class function
-- @name nixio.exece
-- @usage The name of the executable is automatically passed as argv[0]
-- @usage This function does not return on success.
-- @param executable Executable
-- @param arguments Argument Table
-- @param environment Environment Table (optional)
--- Sets the file mode creation mask.
-- @class function
-- @name nixio.umask
-- @param mask New creation mask (see chmod for format specifications)
-- @return the old umask as decimal mode number
-- @return the old umask as mode string
--- (Linux) Get overall system statistics.
-- @class function
-- @name nixio.sysinfo
-- @return Table containing: <ul>
-- <li>uptime = system uptime in seconds</li>
-- <li>loads = {loadavg1, loadavg5, loadavg15}</li>
-- <li>totalram = total RAM</li>
-- <li>freeram = free RAM</li>
-- <li>sharedram = shared RAM</li>
-- <li>bufferram = buffered RAM</li>
-- <li>totalswap = total SWAP</li>
-- <li>freeswap = free SWAP</li>
-- <li>procs = number of running processes</li>
-- </ul>
--- Create a new socket.
-- @class function
-- @name nixio.socket
-- @param domain Domain ["inet", "inet6", "unix"]
-- @param type Type ["stream", "dgram", "raw"]
-- @return Socket Object
--- (POSIX) Send data from a file to a socket in kernel-space.
-- @class function
-- @name nixio.sendfile
-- @param socket Socket Object
-- @param file File Object
-- @param length Amount of data to send (in Bytes).
-- @return bytes sent
--- (Linux) Send data from / to a pipe in kernel-space.
-- @class function
-- @name nixio.splice
-- @param fdin Input I/O descriptor
-- @param fdout Output I/O descriptor
-- @param length Amount of data to send (in Bytes).
-- @param flags (optional, bitfield generated by splice_flags)
-- @see nixio.splice_flags
-- @return bytes sent
--- (Linux) Generate a flag bitfield for a call to splice.
-- @class function
-- @name nixio.splice_flags
-- @param flag1 First Flag ["move", "nonblock", "more"]
-- @param ... More flags [-"-]
-- @see nixio.splice
-- @return Flag bitfield
--- (POSIX) Open a connection to the system logger.
-- @class function
-- @name nixio.openlog
-- @param ident Identifier
-- @param flag1 Flag 1 ["cons", "nowait", "pid", "perror", "ndelay", "odelay"]
-- @param ... More flags [-"-]
--- (POSIX) Close the connection to the system logger.
-- @class function
-- @name nixio.closelog
--- (POSIX) Write a message to the system logger.
-- @class function
-- @name nixio.syslog
-- @param priority Priority ["emerg", "alert", "crit", "err", "warning",
-- "notice", "info", "debug"]
-- @param message
--- (POSIX) Set the logmask of the system logger for current process.
-- @class function
-- @name nixio.setlogmask
-- @param priority Priority ["emerg", "alert", "crit", "err", "warning",
-- "notice", "info", "debug"]
--- (POSIX) Encrypt a user password.
-- @class function
-- @name nixio.crypt
-- @param key Key
-- @param salt Salt
-- @return password hash
--- (POSIX) Get all or a specific user group.
-- @class function
-- @name nixio.getgr
-- @param group Group ID or groupname (optional)
-- @return Table containing: <ul>
-- <li>name = Group Name</li>
-- <li>gid = Group ID</li>
-- <li>passwd = Password</li>
-- <li>mem = {Member #1, Member #2, ...}</li>
-- </ul>
--- (POSIX) Get all or a specific user account.
-- @class function
-- @name nixio.getpw
-- @param user User ID or username (optional)
-- @return Table containing: <ul>
-- <li>name = Name</li>
-- <li>uid = ID</li>
-- <li>gid = Group ID</li>
-- <li>passwd = Password</li>
-- <li>dir = Home directory</li>
-- <li>gecos = Information</li>
-- <li>shell = Shell</li>
-- </ul>
--- (Linux, Solaris) Get all or a specific shadow password entry.
-- @class function
-- @name nixio.getsp
-- @param user username (optional)
-- @return Table containing: <ul>
-- <li>namp = Name</li>
-- <li>expire = Expiration Date</li>
-- <li>flag = Flags</li>
-- <li>inact = Inactivity Date</li>
-- <li>lstchg = Last change</li>
-- <li>max = Maximum</li>
-- <li>min = Minimum</li>
-- <li>warn = Warning</li>
-- <li>pwdp = Password Hash</li>
-- </ul>
--- Create a new TLS context.
-- @class function
-- @name nixio.tls
-- @param mode TLS-Mode ["client", "server"]
-- @return TLSContext Object
| apache-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/warren_cyborg_worker.lua | 3 | 2196 | --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_warren_cyborg_worker = object_mobile_shared_warren_cyborg_worker:new {
}
ObjectTemplates:addTemplate(object_mobile_warren_cyborg_worker, "object/mobile/warren_cyborg_worker.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/hair/zabrak/hair_zabrak_female_s04.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_tangible_hair_zabrak_hair_zabrak_female_s04 = object_tangible_hair_zabrak_shared_hair_zabrak_female_s04:new {
}
ObjectTemplates:addTemplate(object_tangible_hair_zabrak_hair_zabrak_female_s04, "object/tangible/hair/zabrak/hair_zabrak_female_s04.iff")
| agpl-3.0 |
xinst/NoahGameFrame | _Out/NFDataCfg/ScriptModule/TestModule.lua | 3 | 4719 | TestModule = {}
register_module(TestModule,"TestModule");
function TestModule.Init()
io.write("TestModule Init!\n");
io.write("Addr of pPluginManager " .. tostring(pPluginManager) .. "\n");
local pKernelModule = pPluginManager:FindKernelModule("NFCKernelModule");
io.write("Addr of NFCKernelModule " .. tostring(pKernelModule) .. "\n");
local pLogicClassModule = pPluginManager:FindLogicClassModule("NFCLogicClassModule");
io.write("Addr of NFCLogicClassModule " .. tostring(pLogicClassModule) .. "\n");
local pElementInfoModule = pPluginManager:FindElementInfoModule("NFCElementInfoModule");
io.write("Addr of NFCElementInfoModule " .. tostring(pElementInfoModule) .. "\n");
pLuaScriptModule:AddClassCallBack("Player", "TestModule.OnClassCommonEvent");
end
function TestModule.AfterInit()
io.write("TestModule AfterInit!" .. tostring(pLuaScriptModule) .. "\n");
local pKernelModule = pPluginManager:FindKernelModule("NFCKernelModule");
pKernelModule:CreateScene(1);
local pObject = pKernelModule:CreateObject(NFGUID(), 1, 0, "Player", "", NFCDataList());
local OID = pObject:Self();
--property callback
pLuaScriptModule:AddPropertyCallBack(OID, "MAXHP", "TestModule.MaxPropertyCallBack");
pKernelModule:SetPropertyInt(OID,"MAXHP",100);
--record callback
pLuaScriptModule:AddRecordCallBack(OID, "TaskList", "TestModule.TaskListCallBack");
local varTask = NFCDataList();
varTask:AddString("Task_From_Lua");
varTask:AddInt(1);
varTask:AddInt(1);
pLuaScriptModule:AddRow(OID, "TaskList", varTask);
pKernelModule:SetRecordInt(OID, "TaskList", 0, 1, 3);
pKernelModule:SetRecordString(OID, "TaskList", 0, 0, "NewStr_Task_From_Lua");
--event callback
pLuaScriptModule:AddEventCallBack(OID, 1, "TestModule.EventCallBack");
local obj = NFCDataList();
obj:AddInt(21);
obj:AddFloat(22.5);
obj:AddString("str23");
local ident = NFGUID();
ident:SetHead(241);
ident:SetData(242);
obj:AddObject(ident);
pKernelModule:DoEvent(OID, 1, obj);
--Hearback
pLuaScriptModule:AddHeartBeat(OID, "strHeartBeatName", "TestModule.HearCallBack", 2, 55555);
end
function TestModule.MaxPropertyCallBack(self, propertyName, oldVar, newVar)
local nOldVar = oldVar:GetInt();
local nNewVar = newVar:GetInt();
local obj = NFCDataList();
io.write("Hello Lua MaxPropertyCallBack oldVar:" .. tostring(nOldVar) .. " newVar:" .. tostring(nNewVar) .. "\n");
end
function TestModule.TaskListCallBack(self, recordName, nOpType, nRow, nCol, oldVar, newVar)
io.write("Hello Lua TaskListCallBack ")
if nCol == 0 then
local nOldVar = oldVar:GetString();
local nNewVar = newVar:GetString();
io.write(" nOpType:".. tostring(nOpType).. " oldVar:".. tostring(nOldVar) .." newVar:" .. tostring(nNewVar) .. "\n");
end
if nCol == 1 then
local nOldVar = oldVar:GetInt();
local nNewVar = newVar:GetInt();
io.write(" nOpType:".. tostring(nOpType).. " oldVar:".. tostring(nOldVar) .." newVar:" .. tostring(nNewVar) .. "\n");
end
end
function TestModule.EventCallBack(self, nEventID, arg)
local nValue = arg:Int(0);
local fValue = arg:Float(1);
local strValue = arg:String(2);
local ident = arg:Object(3);
local head = ident:GetHead();
local data = ident:GetData();
io.write("Hello Lua EventCallBack nEventID:".. nEventID .. "\n");
io.write("\r\targ:nValue:".. tostring(nValue) .. " fValue:"..tostring(fValue).. " strValue:"..tostring(strValue).." head:"..tostring(head).." data:"..tostring(data).."\n");
end
function TestModule.HearCallBack(self, strHeartBeat, fTime, nCount)
local obj = NFCDataList();
--local s = os.clock()
local s = pPluginManager:GetNowTime();
if oldTime == nil then
oldTime = s
end
io.write("Hello Lua HearCallBack :".. strHeartBeat .. " Time:" .. (s-oldTime) .. "\n");
oldTime = s;
end
function TestModule.OnClassCommonEvent(self, strClassName, eventID, varData)
io.write("onClassCommonEvent, ClassName: " .. tostring(strClassName) .. " EventID: " .. tostring(eventID) .. "\n");
end
function TestModule.OnRecordCommonEvent(self, recordName, nOpType, nRow, nCol, oldVar, newVar)
io.write("OnRecordCommonEvent, self: " .. tostring(self) .. " nOpType: " .. tostring(nOpType) .. " oldVar: " .. tostring(oldVar) .. " newVar: " .. tostring(newVar) .. "\n");
end
function TestModule.OnPropertyCommEvent(self, strPropertyName, oldVar, newVar)
io.write("OnPropertyCommEvent, self: " .. tostring(self) .. " strPropertyName: " .. tostring(strPropertyName) .. " oldVar: " .. tostring(oldVar) .. " newVar: " .. tostring(newVar) .. "\n");
end
function TestModule.Execute()
io.write("TestModule Execute!\n");
end
function TestModule.BeforeShut()
io.write("TestModule BeforeShut!\n");
end
function TestModule.Shut()
io.write("TestModule Shut!\n");
end | apache-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/tybis/serverobjects.lua | 3 | 2158 | --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/tybis/lair_tybis.lua")
includeFile("tangible/lair/tybis/lair_tybis_grassland.lua")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/weapon/melee/knife/knife_donkuwah.lua | 1 | 5084 | --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_knife_knife_donkuwah = object_weapon_melee_knife_shared_knife_donkuwah: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, LIGHTSABER
damageType = KINETIC,
-- NONE, LIGHT, MEDIUM, HEAVY
armorPiercing = NONE,
-- 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, combat_meleespecialize_onehandlightsaber
xpType = "combat_meleespecialize_onehand",
-- See http://www.ocdsoft.com/files/certifications.xls
certificationsRequired = { "cert_knife_dagger" },
-- See http://www.ocdsoft.com/files/accuracy.xls
creatureAccuracyModifiers = { "onehandmelee_accuracy" },
-- See http://www.ocdsoft.com/files/defense.xls
defenderDefenseModifiers = { "melee_defense" },
-- Leave as "dodge" for now, may have additions later
defenderSecondaryDefenseModifiers = { "dodge" },
defenderToughnessModifiers = { "onehandmelee_toughness" },
-- See http://www.ocdsoft.com/files/speed.xls
speedModifiers = { "onehandmelee_speed" },
-- Leave blank for now
damageModifiers = { },
-- The values below are the default values. To be used for blue frog objects primarily
healthAttackCost = 6,
actionAttackCost = 6,
mindAttackCost = 2,
forceCost = 0,
pointBlankAccuracy = 0,
pointBlankRange = 3,
idealRange = 3,
idealAccuracy = 3,
maxRange = 3,
maxRangeAccuracy = 4,
minDamage = 24,
maxDamage = 36,
attackSpeed = 4.5,
woundsRatio = 6,
}
ObjectTemplates:addTemplate(object_weapon_melee_knife_knife_donkuwah, "object/weapon/melee/knife/knife_donkuwah.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/deed/faction_perk/hq/serverobjects.lua | 3 | 2690 | --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/deed/faction_perk/hq/hq_deed_base.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s01.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s01_pvp.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s02.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s02_pvp.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s03.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s03_pvp.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s04.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s04_pvp.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s05.lua")
includeFile("tangible/deed/faction_perk/hq/hq_s05_pvp.lua")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/roba_hill/objects.lua | 3 | 3746 | --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_lair_roba_hill_shared_lair_roba_hill = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/lair/roba_hill/shared_lair_roba_hill.iff"
--Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
appearanceFilename = "appearance/defaultappearance.apt",
arrangementDescriptorFilename = "",
certificationsRequired = {},
clearFloraRadius = 25,
clientDataFile = "clientdata/client_shared_lair_small.cdf",
clientGameObjectType = 4,
collisionActionBlockFlags = 0,
collisionActionFlags = 51,
collisionActionPassFlags = 1,
collisionMaterialBlockFlags = 0,
collisionMaterialFlags = 1,
collisionMaterialPassFlags = 0,
containerType = 0,
containerVolumeLimit = 1,
customizationVariableMapping = {},
detailedDescription = "@lair_d:roba_hill",
gameObjectType = 4,
locationReservationRadius = 0,
lookAtText = "string_id_table",
noBuildRadius = 64,
objectName = "@lair_n:roba_hill",
onlyVisibleInTools = 0,
paletteColorCustomizationVariables = {},
portalLayoutFilename = "",
rangedIntCustomizationVariables = {},
scale = 1,
scaleThresholdBeforeExtentTest = 0.5,
sendToClient = 1,
slotDescriptorFilename = "",
snapToTerrain = 1,
socketDestinations = {},
structureFootprintFileName = "",
surfaceType = 0,
targetable = 1,
totalCellNumber = 0,
useStructureFootprintOutline = 0,
clientObjectCRC = 2140994340,
derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff", "object/tangible/lair/base/shared_lair_base.iff"}
]]
}
ObjectTemplates:addClientTemplate(object_tangible_lair_roba_hill_shared_lair_roba_hill, "object/tangible/lair/roba_hill/shared_lair_roba_hill.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/component/weapon/parallel_weapon_targeting_computer.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_tangible_component_weapon_parallel_weapon_targeting_computer = object_tangible_component_weapon_shared_parallel_weapon_targeting_computer:new {
}
ObjectTemplates:addTemplate(object_tangible_component_weapon_parallel_weapon_targeting_computer, "object/tangible/component/weapon/parallel_weapon_targeting_computer.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/deed/city_deed/garden_corellia_lrg_03_deed.lua | 3 | 2488 | --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_deed_city_deed_garden_corellia_lrg_03_deed = object_tangible_deed_city_deed_shared_garden_corellia_lrg_03_deed:new {
templateType = STRUCTUREDEED,
placeStructureComponent = "PlaceDecorationComponent",
gameObjectType = 8388609,
generatedObjectTemplate = "object/building/player/city/garden_corellia_lrg_03.iff"
}
ObjectTemplates:addTemplate(object_tangible_deed_city_deed_garden_corellia_lrg_03_deed, "object/tangible/deed/city_deed/garden_corellia_lrg_03_deed.iff")
| agpl-3.0 |
mretegan/crispy | crispy/quanty/templates/meta/rixs/pdd/oh_lf.lua | 1 | 7125 | --------------------------------------------------------------------------------
-- Define the crystal field term.
--------------------------------------------------------------------------------
if CrystalFieldTerm then
-- PotentialExpandedOnClm("Oh", 2, {Eeg, Et2g})
-- tenDq_#m = NewOperator("CF", NFermions, IndexUp_#m, IndexDn_#m, PotentialExpandedOnClm("Oh", 2, {0.6, -0.4}))
Akm = {{4, 0, 2.1}, {4, -4, 1.5 * sqrt(0.7)}, {4, 4, 1.5 * sqrt(0.7)}}
tenDq_#m = NewOperator("CF", NFermions, IndexUp_#m, IndexDn_#m, Akm)
tenDq_#m_i = $10Dq(#m)_i_value
io.write("Diagonal values of the initial crystal field Hamiltonian:\n")
io.write("================\n")
io.write("Irrep. E\n")
io.write("================\n")
io.write(string.format("eg %8.3f\n", 0.6 * tenDq_#m_i))
io.write(string.format("t2g %8.3f\n", -0.4 * tenDq_#m_i))
io.write("================\n")
io.write("\n")
tenDq_#m_m = $10Dq(#m)_m_value
tenDq_#m_f = $10Dq(#m)_f_value
H_i = H_i + Chop(
tenDq_#m_i * tenDq_#m)
H_m = H_m + Chop(
tenDq_#m_m * tenDq_#m)
H_f = H_f + Chop(
tenDq_#m_f * tenDq_#m)
end
--------------------------------------------------------------------------------
-- Define the #m-ligands hybridization term (LMCT).
--------------------------------------------------------------------------------
if LmctLigandsHybridizationTerm then
N_L1 = NewOperator("Number", NFermions, IndexUp_L1, IndexUp_L1, {1, 1, 1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_L1, IndexDn_L1, {1, 1, 1, 1, 1})
Delta_#m_L1_i = $Delta(#m,L1)_i_value
E_#m_i = (10 * Delta_#m_L1_i - NElectrons_#m * (19 + NElectrons_#m) * U_#m_#m_i / 2) / (10 + NElectrons_#m)
E_L1_i = NElectrons_#m * ((1 + NElectrons_#m) * U_#m_#m_i / 2 - Delta_#m_L1_i) / (10 + NElectrons_#m)
Delta_#m_L1_m = $Delta(#m,L1)_m_value
E_#m_m = (10 * Delta_#m_L1_m - NElectrons_#m * (31 + NElectrons_#m) * U_#m_#m_m / 2 - 90 * U_#i_#m_m) / (16 + NElectrons_#m)
E_#i_m = (10 * Delta_#m_L1_m + (1 + NElectrons_#m) * (NElectrons_#m * U_#m_#m_m / 2 - (10 + NElectrons_#m) * U_#i_#m_m)) / (16 + NElectrons_#m)
E_L1_m = ((1 + NElectrons_#m) * (NElectrons_#m * U_#m_#m_m / 2 + 6 * U_#i_#m_m) - (6 + NElectrons_#m) * Delta_#m_L1_m) / (16 + NElectrons_#m)
Delta_#m_L1_f = $Delta(#m,L1)_f_value
E_#m_f = (10 * Delta_#m_L1_f - NElectrons_#m * (19 + NElectrons_#m) * U_#m_#m_f / 2) / (10 + NElectrons_#m)
E_L1_f = NElectrons_#m * ((1 + NElectrons_#m) * U_#m_#m_f / 2 - Delta_#m_L1_f) / (10 + NElectrons_#m)
H_i = H_i + Chop(
E_#m_i * N_#m
+ E_L1_i * N_L1)
H_m = H_m + Chop(
E_#m_m * N_#m
+ E_#i_m * N_#i
+ E_L1_m * N_L1)
H_f = H_f + Chop(
E_#m_f * N_#m
+ E_L1_f * N_L1)
tenDq_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("Oh", 2, {0.6, -0.4}))
Veg_#m_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, IndexUp_#m, IndexDn_#m, PotentialExpandedOnClm("Oh", 2, {1, 0}))
+ NewOperator("CF", NFermions, IndexUp_#m, IndexDn_#m, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("Oh", 2, {1, 0}))
Vt2g_#m_L1 = NewOperator("CF", NFermions, IndexUp_L1, IndexDn_L1, IndexUp_#m, IndexDn_#m, PotentialExpandedOnClm("Oh", 2, {0, 1}))
+ NewOperator("CF", NFermions, IndexUp_#m, IndexDn_#m, IndexUp_L1, IndexDn_L1, PotentialExpandedOnClm("Oh", 2, {0, 1}))
tenDq_L1_i = $10Dq(L1)_i_value
Veg_#m_L1_i = $Veg(#m,L1)_i_value
Vt2g_#m_L1_i = $Vt2g(#m,L1)_i_value
tenDq_L1_m = $10Dq(L1)_m_value
Veg_#m_L1_m = $Veg(#m,L1)_m_value
Vt2g_#m_L1_m = $Vt2g(#m,L1)_m_value
tenDq_L1_f = $10Dq(L1)_f_value
Veg_#m_L1_f = $Veg(#m,L1)_f_value
Vt2g_#m_L1_f = $Vt2g(#m,L1)_f_value
H_i = H_i + Chop(
tenDq_L1_i * tenDq_L1
+ Veg_#m_L1_i * Veg_#m_L1
+ Vt2g_#m_L1_i * Vt2g_#m_L1)
H_m = H_m + Chop(
tenDq_L1_m * tenDq_L1
+ Veg_#m_L1_m * Veg_#m_L1
+ Vt2g_#m_L1_m * Vt2g_#m_L1)
H_f = H_f + Chop(
tenDq_L1_f * tenDq_L1
+ Veg_#m_L1_f * Veg_#m_L1
+ Vt2g_#m_L1_f * Vt2g_#m_L1)
end
--------------------------------------------------------------------------------
-- Define the #m-ligands hybridization term (MLCT).
--------------------------------------------------------------------------------
if MlctLigandsHybridizationTerm then
N_L2 = NewOperator("Number", NFermions, IndexUp_L2, IndexUp_L2, {1, 1, 1, 1, 1})
+ NewOperator("Number", NFermions, IndexDn_L2, IndexDn_L2, {1, 1, 1, 1, 1})
Delta_#m_L2_i = $Delta(#m,L2)_i_value
E_#m_i = U_#m_#m_i * (-NElectrons_#m + 1) / 2
E_L2_i = Delta_#m_L2_i + U_#m_#m_i * NElectrons_#m / 2 - U_#m_#m_i / 2
Delta_#m_L2_m = $Delta(#m,L2)_m_value
E_#m_m = -(U_#m_#m_m * NElectrons_#m^2 + 11 * U_#m_#m_m * NElectrons_#m + 60 * U_#i_#m_m) / (2 * NElectrons_#m + 12)
E_#i_m = NElectrons_#m * (U_#m_#m_m * NElectrons_#m + U_#m_#m_m - 2 * U_#i_#m_m * NElectrons_#m - 2 * U_#i_#m_m) / (2 * (NElectrons_#m + 6))
E_L2_m = (2 * Delta_#f_L2_m * NElectrons_#f + 12 * Delta_#f_L2_m + U_#f_#f_m * NElectrons_#f^2 - U_#f_#f_m * NElectrons_#f - 12 * U_#f_#f_m + 12 * U_#i_#f_m * NElectrons_#f + 12 * U_#i_#f_m) / (2 * (NElectrons_#f + 6))
Delta_#m_L2_f = $Delta(#m,L2)_f_value
E_#m_f = U_#m_#m_f * (-NElectrons_#m + 1) / 2
E_L2_f = Delta_#m_L2_f + U_#m_#m_f * NElectrons_#m / 2 - U_#m_#m_f / 2
H_i = H_i + Chop(
E_#m_i * N_#m
+ E_L2_i * N_L2)
H_m = H_m + Chop(
E_#m_m * N_#m
+ E_#i_m * N_#i
+ E_L2_m * N_L2)
H_f = H_f + Chop(
E_#m_f * N_#m
+ E_L2_f * N_L2)
tenDq_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("Oh", 2, {0.6, -0.4}))
Veg_#m_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, IndexUp_#m, IndexDn_#m, PotentialExpandedOnClm("Oh", 2, {1, 0}))
+ NewOperator("CF", NFermions, IndexUp_#m, IndexDn_#m, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("Oh", 2, {1, 0}))
Vt2g_#m_L2 = NewOperator("CF", NFermions, IndexUp_L2, IndexDn_L2, IndexUp_#m, IndexDn_#m, PotentialExpandedOnClm("Oh", 2, {0, 1}))
+ NewOperator("CF", NFermions, IndexUp_#m, IndexDn_#m, IndexUp_L2, IndexDn_L2, PotentialExpandedOnClm("Oh", 2, {0, 1}))
tenDq_L2_i = $10Dq(L2)_i_value
Veg_#m_L2_i = $Veg(#m,L2)_i_value
Vt2g_#m_L2_i = $Vt2g(#m,L2)_i_value
tenDq_L2_m = $10Dq(L2)_m_value
Veg_#m_L2_m = $Veg(#m,L2)_m_value
Vt2g_#m_L2_m = $Vt2g(#m,L2)_m_value
tenDq_L2_f = $10Dq(L2)_f_value
Veg_#m_L2_f = $Veg(#m,L2)_f_value
Vt2g_#m_L2_f = $Vt2g(#m,L2)_f_value
H_i = H_i + Chop(
tenDq_L2_i * tenDq_L2
+ Veg_#m_L2_i * Veg_#m_L2
+ Vt2g_#m_L2_i * Vt2g_#m_L2)
H_m = H_m + Chop(
tenDq_L2_m * tenDq_L2
+ Veg_#m_L2_m * Veg_#m_L2
+ Vt2g_#m_L2_m * Vt2g_#m_L2)
H_f = H_f + Chop(
tenDq_L2_f * tenDq_L2
+ Veg_#m_L2_f * Veg_#m_L2
+ Vt2g_#m_L2_f * Vt2g_#m_L2)
end
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/mobile/conversations/tasks/hero_of_tatooine/hero_of_tat_ranchers_wife_conv.lua | 3 | 7222 | heroOfTatRanchersWifeConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "heroOfTatRanchersWifeConvoHandler",
screens = {}
}
intro = ConvoScreen:new {
id = "intro",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_82bd1b20", -- Who are you?! More of those thugs? I'll lock you up like I did the rest of your friends! Get out!!
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_wife:s_84ee73da", "guess_you_arent"}, -- Hold on! I'm not a thug or a pirate at all.
{"@conversation/quest_hero_of_tatooine_wife:s_f6c25472", "leave_now"}, -- Eep! Okay, bye!
}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(intro);
guess_you_arent = ConvoScreen:new {
id = "guess_you_arent",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_aebcaa68", -- Really? Wait a second. I guess you don't look like a pirate or a thug. I'm sorry. I'm so riled up I can hardly think straight. Look, I could use your help with this. My husband has left to contact the authorities. I need to go calm down or I may do something drastic. Please, go down the stairs and keep an eye on those thugs for me. It would really help me out.
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_wife:s_c5a33502", "thanks_intercom"}, -- I'll go keep an eye on them.
{"@conversation/quest_hero_of_tatooine_wife:s_e45adc31", "so_heartless"}, -- I'd rather not get into this mess.
}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(guess_you_arent);
thanks_intercom = ConvoScreen:new {
id = "thanks_intercom",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_83da2e04", -- Thank you so much! There's an intercom outside the room in which I've locked them up. They may try to coerce you into helping them. Just ignore them. I need to go relax for a minute...
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(thanks_intercom);
so_heartless = ConvoScreen:new {
id = "so_heartless",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_18dbba11", -- Ugh! You're so heartless! Get out of my house! I don't need this right now!
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(so_heartless);
leave_now = ConvoScreen:new {
id = "leave_now",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_f26b5d58", -- I'll call the authorities on you!! Leave now!
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(leave_now);
intro_hasquest = ConvoScreen:new {
id = "intro_hasquest",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_7ee07d1c", -- I need to get myself calm. Please go downstairs and keep an eye out for escaping thugs.
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(intro_hasquest);
intro_noquest = ConvoScreen:new {
id = "intro_noquest",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_b8584429", -- Being a rancer's wife is hard work. I barely get any time for myself with what all the work I have to do. Oh well. As you can see, having a successful rancher as a husband has its perks! Do you like how I decorated the place? Ack! Look at the time... I really need to get back to work. Nice meeting you!
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(intro_noquest);
intro_otherinprogress = ConvoScreen:new {
id = "intro_otherinprogress",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_c74cdffb", -- I'm sorry. I'm having issues with pirates right now. Come back a little later. Maybe you can help me then. I really need to concentrate on the situation at hand...
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(intro_otherinprogress);
intro_distract = ConvoScreen:new {
id = "intro_distract",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_3220d628", -- How are they? Are they behaving? Thank you for helping me. I completely appreciate this.
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_wife:s_f74cb815", "you_really_think_so"}, -- You know, you did a great job decorating this place.
{"@conversation/quest_hero_of_tatooine_wife:s_ea1b59c", "cant_believe_this"}, -- They're planning to break out as we speak!
}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(intro_distract);
you_really_think_so = ConvoScreen:new {
id = "you_really_think_so",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_8ad6289", -- You really think so?! I'm so glad you noticed! I hope to win a house decorating contest this coming summer. I hope to get my home in the spotlight! Do you really think I'll win?
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_wife:s_abec95a3", "so_nice_ahh"}, -- I really think so!
}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(you_really_think_so);
so_nice_ahh = ConvoScreen:new {
id = "so_nice_ahh",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_2622df9f", -- You're so nice! I--AHHH!
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(so_nice_ahh);
cant_believe_this = ConvoScreen:new {
id = "cant_believe_this",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_63f6701b", -- I can't believe this! I am awed by your honor. Thank you so much for helping us! Oh, here comes my husband now! They're going to take those nasty thugs away! Here, you really deserve this. I hope it will do you well.
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(cant_believe_this);
intro_leftprior = ConvoScreen:new {
id = "intro_leftprior",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_43f5726a", -- It's you again! What do you want? Can't you see I'm busy?!
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_wife:s_37c0824f", "so_riled_up"}, -- Wait! I want to help you.
{"@conversation/quest_hero_of_tatooine_wife:s_e83ad536", "go_away"}, -- I'm sorry to disturb you.
}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(intro_leftprior);
go_away = ConvoScreen:new {
id = "go_away",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_6422820b", -- Go away!
stopConversation = "true",
options = {}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(go_away);
so_riled_up = ConvoScreen:new {
id = "so_riled_up",
leftDialog = "@conversation/quest_hero_of_tatooine_wife:s_50587782", -- You do? I'm so riled up I can hardly think straight. My husband has left to contact the authorities. I need to go calm down or I may do something drastic. Please, go down the stairs and keep an eye on those thugs for me. It would really help me out. Will you help me?
stopConversation = "false",
options = {
{"@conversation/quest_hero_of_tatooine_wife:s_210b4c5b", "thanks_intercom"}, -- Yes, I will!
{"@conversation/quest_hero_of_tatooine_wife:s_1ecfff90", "so_heartless"}, -- No, I have other things to do.
}
}
heroOfTatRanchersWifeConvoTemplate:addScreen(so_riled_up);
addConversationTemplate("heroOfTatRanchersWifeConvoTemplate", heroOfTatRanchersWifeConvoTemplate); | agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/screenplays/village/convos/elder_conv_handler.lua | 1 | 2955 | local ObjectManager = require("managers.object.object_manager")
local CRYSTAL_OBJECT = "object/tangible/loot/quest/force_sensitive/force_crystal.iff"
villageElderConvoHandler = Object:new {}
function villageElderConvoHandler:getNextConversationScreen(pConversationTemplate, pPlayer, selectedOption, pConversingNpc)
local pConversationSession = CreatureObject(pPlayer):getConversationSession()
local pLastConversationScreen = nil
if (pConversationSession ~= nil) then
local conversationSession = LuaConversationSession(pConversationSession)
pLastConversationScreen = conversationSession:getLastConversationScreen()
end
local conversationTemplate = LuaConversationTemplate(pConversationTemplate)
if (pLastConversationScreen ~= nil) then
local lastConversationScreen = LuaConversationScreen(pLastConversationScreen)
local optionLink = lastConversationScreen:getOptionLink(selectedOption)
return conversationTemplate:getScreen(optionLink)
end
return self:getInitialScreen(pPlayer, pConversingNpc, pConversationTemplate)
end
function villageElderConvoHandler:getInitialScreen(pPlayer, pNpc, pConversationTemplate)
local convoTemplate = LuaConversationTemplate(pConversationTemplate)
return convoTemplate:getScreen("intro")
end
function villageElderConvoHandler:runScreenHandlers(pConversationTemplate, pConversingPlayer, pConversingNpc, selectedOption, pConversationScreen)
local screen = LuaConversationScreen(pConversationScreen)
local screenID = screen:getScreenID()
if (screenID == "intro") then
local conversationScreen = screen:cloneScreen()
local clonedConversation = LuaConversationScreen(conversationScreen)
local pInventory = CreatureObject(pConversingPlayer):getSlottedObject("inventory")
if (pInventory ~= nil) then
local pInvItem = getContainerObjectByTemplate(pInventory, CRYSTAL_OBJECT, true)
if (pInvItem ~= nil) then
clonedConversation:addOption("@conversation/village_elder_1:s_9dc8bf5d", "already_have_crystal") -- String does not change between phases, can use phase 1 string on all phases
else
clonedConversation:addOption("@conversation/village_elder_1:s_9dc8bf5d", "give_new_crystal") -- String does not change between phases, can use phase 1 string on all phases
end
end
return conversationScreen
elseif (screenID == "give_new_crystal") then
local pInventory = CreatureObject(pConversingPlayer):getSlottedObject("inventory")
if (pInventory ~= nil) then
local pItem = getContainerObjectByTemplate(pInventory, CRYSTAL_OBJECT, true)
if (pItem == nil) then
if (SceneObject(pInventory):isContainerFullRecursive()) then
CreatureObject(pConversingPlayer):sendSystemMessage("@error_message:inv_full")
else
pItem = giveItem(pInventory, CRYSTAL_OBJECT, -1)
if (pItem == nil) then
CreatureObject(pConversingPlayer):sendSystemMessage("Error: Unable to generate item.")
end
end
end
end
end
return pConversationScreen
end
| agpl-3.0 |
antogerva/PcsxrrWorkflow | src/socket/http.lua | 20 | 12193 | -----------------------------------------------------------------------------
-- HTTP/1.1 client support for the Lua language.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: http.lua,v 1.70 2007/03/12 04:08:40 diego Exp $
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Declare module and import dependencies
-------------------------------------------------------------------------------
local socket = require("socket")
local url = require("socket.url")
local ltn12 = require("ltn12")
local mime = require("mime")
local string = require("string")
local base = _G
local table = require("table")
module("socket.http")
-----------------------------------------------------------------------------
-- Program constants
-----------------------------------------------------------------------------
-- connection timeout in seconds
TIMEOUT = 60
-- default port for document retrieval
PORT = 80
-- user agent field sent in request
USERAGENT = socket._VERSION
-----------------------------------------------------------------------------
-- Reads MIME headers from a connection, unfolding where needed
-----------------------------------------------------------------------------
local function receiveheaders(sock, headers)
local line, name, value, err
headers = headers or {}
-- get first line
line, err = sock:receive()
if err then return nil, err end
-- headers go until a blank line is found
while line ~= "" do
-- get field-name and value
name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)"))
if not (name and value) then return nil, "malformed reponse headers" end
name = string.lower(name)
-- get next line (value might be folded)
line, err = sock:receive()
if err then return nil, err end
-- unfold any folded values
while string.find(line, "^%s") do
value = value .. line
line = sock:receive()
if err then return nil, err end
end
-- save pair in table
if headers[name] then headers[name] = headers[name] .. ", " .. value
else headers[name] = value end
end
return headers
end
-----------------------------------------------------------------------------
-- Extra sources and sinks
-----------------------------------------------------------------------------
socket.sourcet["http-chunked"] = function(sock, headers)
return base.setmetatable({
getfd = function() return sock:getfd() end,
dirty = function() return sock:dirty() end
}, {
__call = function()
-- get chunk size, skip extention
local line, err = sock:receive()
if err then return nil, err end
local size = base.tonumber(string.gsub(line, ";.*", ""), 16)
if not size then return nil, "invalid chunk size" end
-- was it the last chunk?
if size > 0 then
-- if not, get chunk and skip terminating CRLF
local chunk, err, part = sock:receive(size)
if chunk then sock:receive() end
return chunk, err
else
-- if it was, read trailers into headers table
headers, err = receiveheaders(sock, headers)
if not headers then return nil, err end
end
end
})
end
socket.sinkt["http-chunked"] = function(sock)
return base.setmetatable({
getfd = function() return sock:getfd() end,
dirty = function() return sock:dirty() end
}, {
__call = function(self, chunk, err)
if not chunk then return sock:send("0\r\n\r\n") end
local size = string.format("%X\r\n", string.len(chunk))
return sock:send(size .. chunk .. "\r\n")
end
})
end
-----------------------------------------------------------------------------
-- Low level HTTP API
-----------------------------------------------------------------------------
local metat = { __index = {} }
function open(host, port, create)
-- create socket with user connect function, or with default
local c = socket.try((create or socket.tcp)())
local h = base.setmetatable({ c = c }, metat)
-- create finalized try
h.try = socket.newtry(function() h:close() end)
-- set timeout before connecting
h.try(c:settimeout(TIMEOUT))
h.try(c:connect(host, port or PORT))
-- here everything worked
return h
end
function metat.__index:sendrequestline(method, uri)
local reqline = string.format("%s %s HTTP/1.1\r\n", method or "GET", uri)
return self.try(self.c:send(reqline))
end
function metat.__index:sendheaders(headers)
local h = "\r\n"
for i, v in base.pairs(headers) do
h = i .. ": " .. v .. "\r\n" .. h
end
self.try(self.c:send(h))
return 1
end
function metat.__index:sendbody(headers, source, step)
source = source or ltn12.source.empty()
step = step or ltn12.pump.step
-- if we don't know the size in advance, send chunked and hope for the best
local mode = "http-chunked"
if headers["content-length"] then mode = "keep-open" end
return self.try(ltn12.pump.all(source, socket.sink(mode, self.c), step))
end
function metat.__index:receivestatusline()
local status = self.try(self.c:receive(5))
-- identify HTTP/0.9 responses, which do not contain a status line
-- this is just a heuristic, but is what the RFC recommends
if status ~= "HTTP/" then return nil, status end
-- otherwise proceed reading a status line
status = self.try(self.c:receive("*l", status))
local code = socket.skip(2, string.find(status, "HTTP/%d*%.%d* (%d%d%d)"))
return self.try(base.tonumber(code), status)
end
function metat.__index:receiveheaders()
return self.try(receiveheaders(self.c))
end
function metat.__index:receivebody(headers, sink, step)
sink = sink or ltn12.sink.null()
step = step or ltn12.pump.step
local length = base.tonumber(headers["content-length"])
local t = headers["transfer-encoding"] -- shortcut
local mode = "default" -- connection close
if t and t ~= "identity" then mode = "http-chunked"
elseif base.tonumber(headers["content-length"]) then mode = "by-length" end
return self.try(ltn12.pump.all(socket.source(mode, self.c, length),
sink, step))
end
function metat.__index:receive09body(status, sink, step)
local source = ltn12.source.rewind(socket.source("until-closed", self.c))
source(status)
return self.try(ltn12.pump.all(source, sink, step))
end
function metat.__index:close()
return self.c:close()
end
-----------------------------------------------------------------------------
-- High level HTTP API
-----------------------------------------------------------------------------
local function adjusturi(reqt)
local u = reqt
-- if there is a proxy, we need the full url. otherwise, just a part.
if not reqt.proxy and not PROXY then
u = {
path = socket.try(reqt.path, "invalid path 'nil'"),
params = reqt.params,
query = reqt.query,
fragment = reqt.fragment
}
end
return url.build(u)
end
local function adjustproxy(reqt)
local proxy = reqt.proxy or PROXY
if proxy then
proxy = url.parse(proxy)
return proxy.host, proxy.port or 3128
else
return reqt.host, reqt.port
end
end
local function adjustheaders(reqt)
-- default headers
local lower = {
["user-agent"] = USERAGENT,
["host"] = reqt.host,
["connection"] = "close, TE",
["te"] = "trailers"
}
-- if we have authentication information, pass it along
if reqt.user and reqt.password then
lower["authorization"] =
"Basic " .. (mime.b64(reqt.user .. ":" .. reqt.password))
end
-- override with user headers
for i,v in base.pairs(reqt.headers or lower) do
lower[string.lower(i)] = v
end
return lower
end
-- default url parts
local default = {
host = "",
port = PORT,
path ="/",
scheme = "http"
}
local function adjustrequest(reqt)
-- parse url if provided
local nreqt = reqt.url and url.parse(reqt.url, default) or {}
-- explicit components override url
for i,v in base.pairs(reqt) do nreqt[i] = v end
if nreqt.port == "" then nreqt.port = 80 end
socket.try(nreqt.host and nreqt.host ~= "",
"invalid host '" .. base.tostring(nreqt.host) .. "'")
-- compute uri if user hasn't overriden
nreqt.uri = reqt.uri or adjusturi(nreqt)
-- ajust host and port if there is a proxy
nreqt.host, nreqt.port = adjustproxy(nreqt)
-- adjust headers in request
nreqt.headers = adjustheaders(nreqt)
return nreqt
end
local function shouldredirect(reqt, code, headers)
return headers.location and
string.gsub(headers.location, "%s", "") ~= "" and
(reqt.redirect ~= false) and
(code == 301 or code == 302) and
(not reqt.method or reqt.method == "GET" or reqt.method == "HEAD")
and (not reqt.nredirects or reqt.nredirects < 5)
end
local function shouldreceivebody(reqt, code)
if reqt.method == "HEAD" then return nil end
if code == 204 or code == 304 then return nil end
if code >= 100 and code < 200 then return nil end
return 1
end
-- forward declarations
local trequest, tredirect
function tredirect(reqt, location)
local result, code, headers, status = trequest {
-- the RFC says the redirect URL has to be absolute, but some
-- servers do not respect that
url = url.absolute(reqt.url, location),
source = reqt.source,
sink = reqt.sink,
headers = reqt.headers,
proxy = reqt.proxy,
nredirects = (reqt.nredirects or 0) + 1,
create = reqt.create
}
-- pass location header back as a hint we redirected
headers = headers or {}
headers.location = headers.location or location
return result, code, headers, status
end
function trequest(reqt)
-- we loop until we get what we want, or
-- until we are sure there is no way to get it
local nreqt = adjustrequest(reqt)
local h = open(nreqt.host, nreqt.port, nreqt.create)
-- send request line and headers
h:sendrequestline(nreqt.method, nreqt.uri)
h:sendheaders(nreqt.headers)
-- if there is a body, send it
if nreqt.source then
h:sendbody(nreqt.headers, nreqt.source, nreqt.step)
end
local code, status = h:receivestatusline()
-- if it is an HTTP/0.9 server, simply get the body and we are done
if not code then
h:receive09body(status, nreqt.sink, nreqt.step)
return 1, 200
end
local headers
-- ignore any 100-continue messages
while code == 100 do
headers = h:receiveheaders()
code, status = h:receivestatusline()
end
headers = h:receiveheaders()
-- at this point we should have a honest reply from the server
-- we can't redirect if we already used the source, so we report the error
if shouldredirect(nreqt, code, headers) and not nreqt.source then
h:close()
return tredirect(reqt, headers.location)
end
-- here we are finally done
if shouldreceivebody(nreqt, code) then
h:receivebody(headers, nreqt.sink, nreqt.step)
end
h:close()
return 1, code, headers, status
end
local function srequest(u, b)
local t = {}
local reqt = {
url = u,
sink = ltn12.sink.table(t)
}
if b then
reqt.source = ltn12.source.string(b)
reqt.headers = {
["content-length"] = string.len(b),
["content-type"] = "application/x-www-form-urlencoded"
}
reqt.method = "POST"
end
local code, headers, status = socket.skip(1, trequest(reqt))
return table.concat(t), code, headers, status
end
request = socket.protect(function(reqt, body)
if base.type(reqt) == "string" then return srequest(reqt, body)
else return trequest(reqt) end
end)
| mit |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/commands/grantTitle.lua | 4 | 2123 | --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
GrantTitleCommand = {
name = "granttitle",
}
AddCommand(GrantTitleCommand)
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/mobile/gurnaset_hue.lua | 3 | 2164 | --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_gurnaset_hue = object_mobile_shared_gurnaset_hue:new {
}
ObjectTemplates:addTemplate(object_mobile_gurnaset_hue, "object/mobile/gurnaset_hue.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/building/corellia/filler_slum_16x32_s01.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_building_corellia_filler_slum_16x32_s01 = object_building_corellia_shared_filler_slum_16x32_s01:new {
}
ObjectTemplates:addTemplate(object_building_corellia_filler_slum_16x32_s01, "object/building/corellia/filler_slum_16x32_s01.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/creature/tatooine_bantha_nosaddle.lua | 3 | 2248 | --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_tatooine_bantha_nosaddle = object_static_creature_shared_tatooine_bantha_nosaddle:new {
}
ObjectTemplates:addTemplate(object_static_creature_tatooine_bantha_nosaddle, "object/static/creature/tatooine_bantha_nosaddle.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/structure/dathomir/nsister_gate_style_01.lua | 3 | 2276 | --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_dathomir_nsister_gate_style_01 = object_static_structure_dathomir_shared_nsister_gate_style_01:new {
}
ObjectTemplates:addTemplate(object_static_structure_dathomir_nsister_gate_style_01, "object/static/structure/dathomir/nsister_gate_style_01.iff")
| agpl-3.0 |
elijah513/SOHU-DBProxy | tests/suite/base/t/bug_45167-mock.lua | 4 | 1559 | --[[ $%BEGINLICENSE%$
Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the
License.
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 St, Fifth Floor, Boston, MA
02110-1301 USA
$%ENDLICENSE%$ --]]
local proto = assert(require("mysql.proto"))
function connect_server()
-- emulate a server
proxy.response = {
type = proxy.MYSQLD_PACKET_RAW,
packets = {
proto.to_challenge_packet({
server_version = 50114
})
}
}
return proxy.PROXY_SEND_RESULT
end
function read_query(packet)
if packet:byte() ~= proxy.COM_QUERY then
proxy.response = {
type = proxy.MYSQLD_PACKET_OK
}
return proxy.PROXY_SEND_RESULT
end
proxy.response = {
type = proxy.MYSQLD_PACKET_OK,
resultset = {
fields = {
{ name = "Name", type = proxy.MYSQL_TYPE_STRING },
{ name = "Value", type = proxy.MYSQL_TYPE_STRING }
},
rows = { }
}
}
for i = 1, 4 do
proxy.response.resultset.rows[i] = { ("%d"):format(i), ("%d"):format(i) }
end
return proxy.PROXY_SEND_RESULT
end
| gpl-2.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/commands/planet.lua | 4 | 2111 | --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
PlanetCommand = {
name = "planet",
}
AddCommand(PlanetCommand)
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/static/creature/dathomir_baz_nitch.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_creature_dathomir_baz_nitch = object_static_creature_shared_dathomir_baz_nitch:new {
}
ObjectTemplates:addTemplate(object_static_creature_dathomir_baz_nitch, "object/static/creature/dathomir_baz_nitch.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/deed/event_perk/tatooine_flag_deed.lua | 2 | 2437 | --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_deed_event_perk_tatooine_flag_deed = object_tangible_deed_event_perk_shared_tatooine_flag_deed:new {
templateType = EVENTPERKDEED,
gameObjectType = 8388615,
noTrade = 1,
generatedObjectTemplate = "object/tangible/event_perk/tato_imprv_flagpole_s01.iff",
perkType = STATIC,
}
ObjectTemplates:addTemplate(object_tangible_deed_event_perk_tatooine_flag_deed, "object/tangible/deed/event_perk/tatooine_flag_deed.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/lair/base/poi_all_lair_mound_large_fog_gray.lua | 1 | 2339 | --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_base_poi_all_lair_mound_large_fog_gray = object_tangible_lair_base_shared_poi_all_lair_mound_large_fog_gray:new {
objectMenuComponent = "LairMenuComponent",
}
ObjectTemplates:addTemplate(object_tangible_lair_base_poi_all_lair_mound_large_fog_gray, "object/tangible/lair/base/poi_all_lair_mound_large_fog_gray.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/draft_schematic/bio_engineer/utilities/pet_stimpack_b.lua | 1 | 3652 | --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_utilities_pet_stimpack_b = object_draft_schematic_bio_engineer_utilities_shared_pet_stimpack_b:new {
templateType = DRAFTSCHEMATIC,
customObjectName = "Pet Stimpack - B",
craftingToolTab = 128, -- (See DraftSchematicObjectTemplate.h)
complexity = 24,
size = 3,
xpType = "crafting_bio_engineer_creature",
xp = 90,
assemblySkill = "bio_engineer_assembly",
experimentingSkill = "bio_engineer_experimentation",
customizationSkill = "bio_customization",
customizationOptions = {},
customizationStringNames = {},
customizationDefaults = {},
ingredientTemplateNames = {"craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n", "craft_chemical_ingredients_n"},
ingredientTitleNames = {"organic_element", "inorganic_element", "delivery_medium", "drug_duration_compound", "drug_strength_compound"},
ingredientSlotType = {0, 0, 1, 1, 1},
resourceTypes = {"vegetable_fungi_talus", "fiberplast", "object/tangible/component/chemistry/shared_liquid_delivery_suspension.iff", "object/tangible/component/chemistry/shared_release_mechanism_duration.iff", "object/tangible/component/chemistry/shared_biologic_effect_controller.iff"},
resourceQuantities = {18, 24, 1, 1, 1},
contribution = {100, 100, 100, 100, 100},
targetTemplate = "object/tangible/medicine/pet/pet_stimpack_b.iff",
additionalTemplates = {
}
}
ObjectTemplates:addTemplate(object_draft_schematic_bio_engineer_utilities_pet_stimpack_b, "object/draft_schematic/bio_engineer/utilities/pet_stimpack_b.iff")
| agpl-3.0 |
Tatwi/legend-of-hondo | MMOCoreORB/bin/scripts/object/tangible/ship/components/weapon/wpn_koensayr_deluxe_ion_accelerator.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_ship_components_weapon_wpn_koensayr_deluxe_ion_accelerator = object_tangible_ship_components_weapon_shared_wpn_koensayr_deluxe_ion_accelerator:new {
}
ObjectTemplates:addTemplate(object_tangible_ship_components_weapon_wpn_koensayr_deluxe_ion_accelerator, "object/tangible/ship/components/weapon/wpn_koensayr_deluxe_ion_accelerator.iff")
| agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.