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
The-HalcyonDays/darkstar
scripts/globals/spells/curaga_v.lua
13
1247
----------------------------------------- -- Spell: Curaga V -- Restores HP of all party members within area of effect. ----------------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/magic"); ----------------------------------------- -- OnSpellCast ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0; end; function onSpellCast(caster,target,spell) local minCure = 600; local divisor = 1; local constant = 570; local power = getCurePowerOld(caster); if(power > 780) then divisor = 2.667; constant = 814;--this is too powerful and needs to be fixed when the rest of the curaga 5 numbers are determined end local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,false); final = final + (final * (target:getMod(MOD_CURE_POTENCY_RCVD)/100)); --Applying server mods.... final = final * CURE_POWER; local diff = (target:getMaxHP() - target:getHP()); if(final > diff) then final = diff; end target:restoreHP(final); target:wakeUp(); caster:updateEnmityFromCure(target,final); spell:setMsg(367); return final; end;
gpl-3.0
sepehrpk/firebot1
plugins/anti-flood.lua
281
2422
local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 5 local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, function (data, success, result) if success ~= 1 then local text = 'I can\'t kick '..data.user..' but should be kicked' send_msg(data.chat, '', ok_cb, nil) end end, {chat=chat, user=user}) end local function run (msg, matches) if msg.to.type ~= 'chat' then return 'Anti-flood works only on channels' else local chat = msg.to.id local hash = 'anti-flood:enabled:'..chat if matches[1] == 'enable' then redis:set(hash, true) return 'Anti-flood enabled on chat' end if matches[1] == 'disable' then redis:del(hash) return 'Anti-flood disabled on chat' end end end local function pre_process (msg) -- Ignore service msg if msg.service then print('Service message') return msg end local hash_enable = 'anti-flood:enabled:'..msg.to.id local enabled = redis:get(hash_enable) if enabled then print('anti-flood enabled') -- Check flood if msg.from.type == 'user' then -- Increase the number of messages from the user on the chat local hash = 'anti-flood:'..msg.from.id..':'..msg.to.id..':msg-num' local msgs = tonumber(redis:get(hash) or 0) if msgs > NUM_MSG_MAX then local receiver = get_receiver(msg) local user = msg.from.id local text = 'User '..user..' is flooding' local chat = msg.to.id send_msg(receiver, text, ok_cb, nil) if msg.to.type ~= 'chat' then print("Flood in not a chat group!") elseif user == tostring(our_id) then print('I won\'t kick myself') elseif is_sudo(msg) then print('I won\'t kick an admin!') else -- Ban user -- TODO: Check on this plugin bans local bhash = 'banned:'..msg.to.id..':'..msg.from.id redis:set(bhash, true) kick_user(user, chat) end msg = nil end redis:setex(hash, TIME_CHECK, msgs+1) end end return msg end return { description = 'Plugin to kick flooders from group.', usage = {}, patterns = { '^!antiflood (enable)$', '^!antiflood (disable)$' }, run = run, privileged = true, pre_process = pre_process }
gpl-2.0
FingasGaming/Game-Development
VRPE/sandbox/bin/scripts/core/baseClass/statemachine.lua
2
2021
function new(entity) local object = {} object.entity = entity -- the object/entity to manipulate object.states = {} -- states stored by the state machine object.transitions = {} -- transtions stored by the state machine object.currState = nil -- points to the current state object.prevState = nil -- points to the previous state object.trans = nil -- points to the current transition --Function: addStates to the FSM function object:addState(stateName, state) if object.states[stateName] == nil then object.states[stateName] = state print("State: " .. stateName .. " was added..") else print("State: " .. transName .. " was not added..") end end --Function: addTransition to the FSM function object:addTransition( transName, trans) if object.transitions[transName] == nil then object.transitions[transName] = trans print("Transtion: " .. transName .. " was added..") else print("Transtion: " .. transName .. " was not added..") end end --Function: Transition to another state function object:toTransition( toTrans) if object.transitions[toTrans] then object.trans = object.transitions[toTrans] end end function exeOnTransition(toTrans) this.toTransition(toTrans) this.onExecute() end --Function: setState of the FSM function object:setState( stateName) object.prevState = currState object.currState = states[stateName] end --Function: setDefaultState of the FSM function object:setDefaultState( stateName) object.currState = states[stateName] object.prevState = currState end --Function: onExecute the FSM function object:onExecute() if (object.trans) then object.currState:onExit() object.trans:onEnter() object.trans:onExecute() tmp = object.trans:getInfo() object:setState(tmp) object.trans:onExit() object.currState:onEnter() object.trans = nil end if object.prevState == nil then object.currState:onExecute() else object.currState:onExecute() end end return object end return { new = new}
gpl-2.0
The-HalcyonDays/darkstar
scripts/globals/spells/dark_carol.lua
13
1501
----------------------------------------- -- Spell: Dark Carol -- Increases dark resistance for party members within the area of effect. ----------------------------------------- require("scripts/globals/status"); require("scripts/globals/magic"); ----------------------------------------- -- OnSpellCast ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0; end; function onSpellCast(caster,target,spell) local sLvl = caster:getSkillLevel(SKILL_SNG); -- Gets skill level of Singing local iLvl = caster:getWeaponSkillLevel(SLOT_RANGED); local power = 20; if (sLvl+iLvl > 200) then power = power + math.floor((sLvl+iLvl-200) / 10); end if(power >= 40) then power = 40; end local iBoost = caster:getMod(MOD_CAROL_EFFECT) + caster:getMod(MOD_ALL_SONGS_EFFECT); power = power + iBoost*5; if (caster:hasStatusEffect(EFFECT_SOUL_VOICE)) then power = power * 2; elseif (caster:hasStatusEffect(EFFECT_MARCATO)) then power = power * 1.5; end caster:delStatusEffect(EFFECT_MARCATO); local duration = 120; duration = duration * ((iBoost * 0.1) + (caster:getMod(MOD_SONG_DURATION_BONUS)/100) + 1); if (caster:hasStatusEffect(EFFECT_TROUBADOUR)) then duration = duration * 2; end if not (target:addBardSong(caster,EFFECT_CAROL,power,0,duration,caster:getID(), ELE_DARK, 1)) then spell:setMsg(75); end return EFFECT_CAROL; end;
gpl-3.0
PointOneNav/fusion-engine-client
wireshark/p1_fusion_engine_dissector.lua
1
14928
-------------------------------------------------------------------------------- -- @brief Point One FusionEngine Protocol Wireshark packet dissector. -- -- To use, install in `~/.local/lib/wireshark/plugins/`, then reload the -- Wireshark plugins (Analyze -> Reload Lua Plugins) or restart Wireshark. We -- recommend using a symlink so that the plugin stays up to date with new -- changes. For example: -- ``` -- > mkdir -p ~/.local/lib/wireshark/plugins -- > ln -s /path/to/p1_fusion_engine_dissector.lua ~/.local/lib/wireshark/plugins/ -- ``` -------------------------------------------------------------------------------- -- Protocol definition. local fe_proto = Proto("FusionEngine", "Point One FusionEngine Protocol") -- MessageType local message_type_to_name = {} message_type_to_name[0] = "Invalid" message_type_to_name[10000] = "PoseMessage" message_type_to_name[10001] = "GNSSInfoMessage" message_type_to_name[10002] = "GNSSSatelliteMessage" message_type_to_name[10003] = "PoseAuxMessage" message_type_to_name[11000] = "IMUMeasurement" message_type_to_name[12000] = "ros::PoseMessage" message_type_to_name[12010] = "ros::GPSFixMessage" message_type_to_name[12011] = "ros::IMUMessage" -- MessageHeader local SYNC0 = 0x2E -- '.' local SYNC1 = 0x31 -- '1' local MESSAGE_HEADER_SIZE = 24 local PAYLOAD_SIZE_OFFSET = 16 local pf_header = ProtoField.new("Header", "fusionengine.header", ftypes.NONE) local pf_preamble = ProtoField.new("Preamble", "fusionengine.header.preamble", ftypes.STRING) local pf_crc = ProtoField.new("CRC", "fusionengine.header.event_id", ftypes.UINT32, nil, base.HEX) local pf_version = ProtoField.new("Protocol Version", "fusionengine.header.version", ftypes.UINT8) local pf_message_type = ProtoField.new("Message Type", "fusionengine.header.message_type", ftypes.UINT16) local pf_message_name = ProtoField.new("Message Name", "fusionengine.header.message_name", ftypes.STRING) local pf_sequence_num = ProtoField.new("Sequence Number", "fusionengine.header.sequence_num", ftypes.UINT32) local pf_payload_size = ProtoField.new("Payload Size", "fusionengine.header.payload_size", ftypes.UINT32) local pf_source_id = ProtoField.new("Source ID", "fusionengine.header.source_id", ftypes.UINT32) -- Generic message payload byte array. local pf_payload = ProtoField.new("Payload", "fusionengine.payload", ftypes.BYTES) -- PoseMessage local pf_pose = ProtoField.new("PoseMessage", "fusionengine.pose", ftypes.NONE) local pf_pose_p1_time = ProtoField.new("P1 Time", "fusionengine.pose.p1_time", ftypes.STRING) local pf_pose_p1_time_sec = ProtoField.new("Seconds", "fusionengine.pose.p1_time.sec", ftypes.UINT32) local pf_pose_p1_time_frac = ProtoField.new("Nanoseconds", "fusionengine.pose.p1_time.frac", ftypes.UINT32) local pf_pose_gps_time = ProtoField.new("GPS Time", "fusionengine.pose.gps_time", ftypes.STRING) local pf_pose_gps_time_sec = ProtoField.new("Seconds", "fusionengine.pose.gps_time.sec", ftypes.UINT32) local pf_pose_gps_time_frac = ProtoField.new("Nanoseconds", "fusionengine.pose.gps_time.frac", ftypes.UINT32) local pf_pose_solution_type = ProtoField.new("Solution Type", "fusionengine.pose.solution_type", ftypes.UINT8) local pf_pose_undulation_cm = ProtoField.new("Undulation (cm)", "fusionengine.pose.undulation_cm", ftypes.INT16) local pf_pose_undulation_m = ProtoField.new("Undulation (m)", "fusionengine.pose.undulation_m", ftypes.STRING) local pf_pose_lla = ProtoField.new("LLA (deg)", "fusionengine.pose.lla", ftypes.STRING) local pf_pose_lla_lat = ProtoField.new("Latitude (deg)", "fusionengine.pose.lla.lat", ftypes.DOUBLE) local pf_pose_lla_lon = ProtoField.new("Longitude (deg)", "fusionengine.pose.lla.lon", ftypes.DOUBLE) local pf_pose_lla_alt = ProtoField.new("Altitude (deg)", "fusionengine.pose.lla.alt", ftypes.DOUBLE) -- Add all field definitions to the protocol. fe_proto.fields = { -- MessageHeader pf_header, pf_preamble, pf_crc, pf_version, pf_message_type, pf_message_name, pf_sequence_num, pf_payload_size, pf_source_id, pf_payload, -- PoseMessage pf_pose, pf_pose_p1_time, pf_pose_p1_time_sec, pf_pose_p1_time_frac, pf_pose_gps_time, pf_pose_gps_time_sec, pf_pose_gps_time_frac, pf_pose_solution_type, pf_pose_undulation_cm, pf_pose_undulation_m, pf_pose_lla, pf_pose_lla_lat, pf_pose_lla_lon, pf_pose_lla_alt, } -- Define extractable fields to be used in dissect functions. local message_type_field = Field.new("fusionengine.header.message_type") local payload_size_field = Field.new("fusionengine.header.payload_size") local pose_p1_time_sec_field = Field.new("fusionengine.pose.p1_time.sec") local pose_p1_time_frac_field = Field.new("fusionengine.pose.p1_time.frac") local pose_gps_time_sec_field = Field.new("fusionengine.pose.gps_time.sec") local pose_gps_time_frac_field = Field.new("fusionengine.pose.gps_time.frac") local pose_undulation_cm_field = Field.new("fusionengine.pose.undulation_cm") local pose_lla_lat_field = Field.new("fusionengine.pose.lla.lat") local pose_lla_lon_field = Field.new("fusionengine.pose.lla.lon") local pose_lla_alt_field = Field.new("fusionengine.pose.lla.alt") -------------------------------------------------------------------------------- -- @brief Helper function for extracting the value of a specified field. -------------------------------------------------------------------------------- local function getValue(field, index) local tbl = { field() } return tbl[#tbl]() end -------------------------------------------------------------------------------- -- @brief Dissect the message header. -- -- @return The offset into the data buffer at which the contents end. -- @return The message name (or message type value if unknown). -------------------------------------------------------------------------------- dissectHeader = function(tvbuf, pktinfo, tree, offset, message_index) local header = tree:add(pf_header, tvbuf:range(offset, MESSAGE_HEADER_SIZE)) -- Preamble header:add(pf_preamble, tvbuf:range(offset, 2)) offset = offset + 2 -- Reserved offset = offset + 2 -- CRC header:add_le(pf_crc, tvbuf:range(offset, 4)) offset = offset + 4 -- Version header:add_le(pf_version, tvbuf:range(offset, 1)) offset = offset + 1 -- Reserved offset = offset + 1 -- Message type header:add_le(pf_message_type, tvbuf:range(offset, 2)) offset = offset + 2 local message_type = getValue(message_type_field, message_index) local message_name = message_type_to_name[message_type] if message_name ~= nil then header:add(pf_message_name, tvbuf:range(offset - 2, 2), message_name) else header:add(pf_message_name, tvbuf:range(offset - 2, 2), "<unknown>") message_name = string.format("%d", message_type) end -- Sequence number header:add_le(pf_sequence_num, tvbuf:range(offset, 4)) offset = offset + 4 -- Payload size header:add_le(pf_payload_size, tvbuf:range(offset, 4)) offset = offset + 4 -- Source ID header:add_le(pf_source_id, tvbuf:range(offset, 4)) offset = offset + 4 -- Set packet display info. pktinfo.cols.protocol:set("P1 FusionEngine") tree:append_text(string.format(" (%s) [%u bytes]", message_name, MESSAGE_HEADER_SIZE + payload_size)) return offset, message_name end -------------------------------------------------------------------------------- -- @brief Dissect a PoseMessage. -- -- @return `true` if the message decoded successfully. -------------------------------------------------------------------------------- dissectPoseMessage = function(tvbuf, pktinfo, tree, offset, payload_size, message_index) -- P1 time local p1_time = tree:add(pf_pose_p1_time, tvbuf:range(offset, 8)) p1_time:add_le(pf_pose_p1_time_sec, tvbuf:range(offset, 4)) offset = offset + 4 p1_time:add_le(pf_pose_p1_time_frac, tvbuf:range(offset, 4)) offset = offset + 4 local p1_time_sec = getValue(pose_p1_time_sec_field, message_index) local p1_time_frac = getValue(pose_p1_time_frac_field, message_index) p1_time_sec = p1_time_sec + p1_time_frac * 1e-9 p1_time:set_text(string.format("%s: %.9f", "P1 Time", p1_time_sec)) -- GPS time local gps_time = tree:add(pf_pose_gps_time, tvbuf:range(offset, 8)) gps_time:add_le(pf_pose_gps_time_sec, tvbuf:range(offset, 4)) offset = offset + 4 gps_time:add_le(pf_pose_gps_time_frac, tvbuf:range(offset, 4)) offset = offset + 4 local gps_time_sec = getValue(pose_gps_time_sec_field, message_index) local gps_time_frac = getValue(pose_gps_time_frac_field, message_index) gps_time_sec = gps_time_sec + gps_time_frac * 1e-9 gps_time:set_text(string.format("%s: %.9f", "GPS Time", gps_time_sec)) -- Solution type tree:add_le(pf_pose_solution_type, tvbuf:range(offset, 1)) offset = offset + 1 -- Reserved offset = offset + 1 -- Undulation tree:add_le(pf_pose_undulation_cm, tvbuf:range(offset, 2)):set_hidden(true) local undulation_m = tree:add_le(pf_pose_undulation_m, tvbuf:range(offset, 2)) offset = offset + 2 local undulation_cm = getValue(pose_undulation_cm_field, message_index) undulation_m:set_text(string.format("%s: %.2f", "Undulation (m)", undulation_cm * 0.01)) -- LLA local lla = tree:add(pf_pose_lla, tvbuf:range(offset, 24)) lla:add_le(pf_pose_lla_lat, tvbuf:range(offset, 8)) offset = offset + 8 lla:add_le(pf_pose_lla_lon, tvbuf:range(offset, 8)) offset = offset + 8 lla:add_le(pf_pose_lla_alt, tvbuf:range(offset, 8)) offset = offset + 8 local lat = getValue(pose_lla_lat_field, message_index) local lon = getValue(pose_lla_lon_field, message_index) local alt = getValue(pose_lla_alt_field, message_index) lla:set_text(string.format("%s: %.6f, %.6f, %.3f", "LLA (deg)", lat, lon, alt)) return true end -------------------------------------------------------------------------------- -- @brief Check for a complete message. -- -- @return The message size (in bytes), or -N where N is the number of bytes -- needed to complete the message. -- @return The payload size (in bytes). -------------------------------------------------------------------------------- checkMessageSize = function(tvbuf, offset) -- Get the total (non-consumed) packet length. local bytes_available = tvbuf:len() - offset -- If the packet was cutoff due to Wireshark a size limit, we can't use it. if bytes_available ~= tvbuf:reported_length_remaining(offset) then return 0, nil end -- Do we have enough data to decode the header? if bytes_available < MESSAGE_HEADER_SIZE then return -DESEGMENT_ONE_MORE_SEGMENT, nil end -- Do we have enough data to decode the payload? payload_size_range = tvbuf:range(offset + 16, 4) local payload_size = payload_size_range:le_uint() local message_size = MESSAGE_HEADER_SIZE + payload_size if bytes_available < message_size then return -(message_size - bytes_available), nil end return message_size, payload_size end -------------------------------------------------------------------------------- -- @brief Dissect a single FusionEngine message. -- -- @return The offset into the data buffer at which the contents end, or -N if -- more bytes are needed to complete the message, where N is the number -- of required bytes. -- @return The message name (or message type value if unknown). -------------------------------------------------------------------------------- dissectMessage = function(tvbuf, pktinfo, root, offset, message_index) -- See if we have a complete message. If the message is incomplete (<0), -- return the number of bytes to finish it. message_size, payload_size = checkMessageSize(tvbuf, offset) if message_size < 0 then return message_size, nil end -- Add an entry for a single message and dissect the header and payload. local tree = root:add(fe_proto, tvbuf:range(offset, message_size)) -- Dissect the header. payload_offset, message_name = dissectHeader(tvbuf, pktinfo, tree, offset, message_index) local success = true if message_name == "PoseMessage" then success = dissectPoseMessage(tvbuf, pktinfo, tree, payload_offset, message_index) else -- Unhandled message - display the payload as a byte array. tree:add(pf_payload, tvbuf:range(payload_offset, payload_size)) end if success then return offset + message_size, message_name else return 0, message_name end end -------------------------------------------------------------------------------- -- @brief Dissect incoming TCP data. -- -- A TCP data buffer may contain one or more FusionEngine messages. -- -- @return The offset into the data buffer at which the contents end. -------------------------------------------------------------------------------- function fe_proto.dissector(tvbuf, pktinfo, root) -- Process all complete messages in the TCP data. local packet_length = tvbuf:len() local bytes_consumed = 0 local total_messages = 0 local message_count = {} while bytes_consumed < packet_length do local message_length = 0 local start_offset = bytes_consumed -- Try to dissect a complete message. If this returns >0, we found a -- message. If it returns <0, we need more data to complete the message. end_offset, message_name = dissectMessage(tvbuf, pktinfo, root, start_offset, total_messages) if end_offset > 0 then bytes_consumed = (end_offset - start_offset) start_offset = end_offset total_messages = total_messages + 1 if(message_count[message_name] == nil) then message_count[message_name] = 0 end message_count[message_name] = message_count[message_name] + 1 elseif end_offset == 0 then -- This shouldn't happen normally. Return 0 to indicate a protocol -- error/this packet isn't for us. return 0 else -- Set the offset to the start of the incomplete message, and the -- length to the number of bytes required to complete it. pktinfo.desegment_offset = start_offset pktinfo.desegment_len = -end_offset bytes_consumed = packet_length break end end if(total_messages > 0) then local s = "" if(total_messages > 1) then s = "s" end pktinfo.cols.info:append(string.format(" %d message%s: [", total_messages, s)) local count_string = "" for key, value in pairs(message_count) do if(count_string ~= "") then count_string = count_string .. ", " end count_string = count_string .. string.format("%d %s", value, key) end pktinfo.cols.info:append(count_string .. "]") end return bytes_consumed end DissectorTable.get("tcp.port"):add(30201, fe_proto)
mit
GoblinInventor/Snail
hardoncollider/polygon.lua
14
13533
--[[ Copyright (c) 2011 Matthias Richter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]]-- local _PACKAGE, common_local = (...):match("^(.+)%.[^%.]+"), common if not (type(common) == 'table' and common.class and common.instance) then assert(common_class ~= false, 'No class commons specification available.') require(_PACKAGE .. '.class') common_local, common = common, common_local end local vector = require(_PACKAGE .. '.vector-light') ---------------------------- -- Private helper functions -- -- create vertex list of coordinate pairs local function toVertexList(vertices, x,y, ...) if not (x and y) then return vertices end -- no more arguments vertices[#vertices + 1] = {x = x, y = y} -- set vertex return toVertexList(vertices, ...) -- recurse end -- returns true if three vertices lie on a line local function areCollinear(p, q, r, eps) return math.abs(vector.det(q.x-p.x, q.y-p.y, r.x-p.x,r.y-p.y)) <= (eps or 1e-32) end -- remove vertices that lie on a line local function removeCollinear(vertices) local ret = {} local i,k = #vertices - 1, #vertices for l=1,#vertices do if not areCollinear(vertices[i], vertices[k], vertices[l]) then ret[#ret+1] = vertices[k] end i,k = k,l end return ret end -- get index of rightmost vertex (for testing orientation) local function getIndexOfleftmost(vertices) local idx = 1 for i = 2,#vertices do if vertices[i].x < vertices[idx].x then idx = i end end return idx end -- returns true if three points make a counter clockwise turn local function ccw(p, q, r) return vector.det(q.x-p.x, q.y-p.y, r.x-p.x, r.y-p.y) >= 0 end -- test wether a and b lie on the same side of the line c->d local function onSameSide(a,b, c,d) local px, py = d.x-c.x, d.y-c.y local l = vector.det(px,py, a.x-c.x, a.y-c.y) local m = vector.det(px,py, b.x-c.x, b.y-c.y) return l*m >= 0 end local function pointInTriangle(p, a,b,c) return onSameSide(p,a, b,c) and onSameSide(p,b, a,c) and onSameSide(p,c, a,b) end -- test whether any point in vertices (but pqr) lies in the triangle pqr -- note: vertices is *set*, not a list! local function anyPointInTriangle(vertices, p,q,r) for v in pairs(vertices) do if v ~= p and v ~= q and v ~= r and pointInTriangle(v, p,q,r) then return true end end return false end -- test is the triangle pqr is an "ear" of the polygon -- note: vertices is *set*, not a list! local function isEar(p,q,r, vertices) return ccw(p,q,r) and not anyPointInTriangle(vertices, p,q,r) end local function segmentsInterset(a,b, p,q) return not (onSameSide(a,b, p,q) or onSameSide(p,q, a,b)) end -- returns starting/ending indices of shared edge, i.e. if p and q share the -- edge with indices p1,p2 of p and q1,q2 of q, the return value is p1,q2 local function getSharedEdge(p,q) local pindex = setmetatable({}, {__index = function(t,k) local s = {} t[k] = s return s end}) -- record indices of vertices in p by their coordinates for i = 1,#p do pindex[p[i].x][p[i].y] = i end -- iterate over all edges in q. if both endpoints of that -- edge are in p as well, return the indices of the starting -- vertex local i,k = #q,1 for k = 1,#q do local v,w = q[i], q[k] if pindex[v.x][v.y] and pindex[w.x][w.y] then return pindex[w.x][w.y], k end i = k end end ----------------- -- Polygon class -- local Polygon = {} function Polygon:init(...) local vertices = removeCollinear( toVertexList({}, ...) ) assert(#vertices >= 3, "Need at least 3 non collinear points to build polygon (got "..#vertices..")") -- assert polygon is oriented counter clockwise local r = getIndexOfleftmost(vertices) local q = r > 1 and r - 1 or #vertices local s = r < #vertices and r + 1 or 1 if not ccw(vertices[q], vertices[r], vertices[s]) then -- reverse order if polygon is not ccw local tmp = {} for i=#vertices,1,-1 do tmp[#tmp + 1] = vertices[i] end vertices = tmp end -- assert polygon is not self-intersecting -- outer: only need to check segments #vert;1, 1;2, ..., #vert-3;#vert-2 -- inner: only need to check unconnected segments local q,p = vertices[#vertices] for i = 1,#vertices-2 do p, q = q, vertices[i] for k = i+1,#vertices-1 do local a,b = vertices[k], vertices[k+1] assert(not segmentsInterset(p,q, a,b), 'Polygon may not intersect itself') end end self.vertices = vertices -- make vertices immutable setmetatable(self.vertices, {__newindex = function() error("Thou shall not change a polygon's vertices!") end}) -- compute polygon area and centroid local p,q = vertices[#vertices], vertices[1] local det = vector.det(p.x,p.y, q.x,q.y) -- also used below self.area = det for i = 2,#vertices do p,q = q,vertices[i] self.area = self.area + vector.det(p.x,p.y, q.x,q.y) end self.area = self.area / 2 p,q = vertices[#vertices], vertices[1] self.centroid = {x = (p.x+q.x)*det, y = (p.y+q.y)*det} for i = 2,#vertices do p,q = q,vertices[i] det = vector.det(p.x,p.y, q.x,q.y) self.centroid.x = self.centroid.x + (p.x+q.x) * det self.centroid.y = self.centroid.y + (p.y+q.y) * det end self.centroid.x = self.centroid.x / (6 * self.area) self.centroid.y = self.centroid.y / (6 * self.area) -- get outcircle self._radius = 0 for i = 1,#vertices do self._radius = math.max(self._radius, vector.dist(vertices[i].x,vertices[i].y, self.centroid.x,self.centroid.y)) end end local newPolygon -- return vertices as x1,y1,x2,y2, ..., xn,yn function Polygon:unpack() local v = {} for i = 1,#self.vertices do v[2*i-1] = self.vertices[i].x v[2*i] = self.vertices[i].y end return unpack(v) end -- deep copy of the polygon function Polygon:clone() return Polygon( self:unpack() ) end -- get bounding box function Polygon:bbox() local ulx,uly = self.vertices[1].x, self.vertices[1].y local lrx,lry = ulx,uly for i=2,#self.vertices do local p = self.vertices[i] if ulx > p.x then ulx = p.x end if uly > p.y then uly = p.y end if lrx < p.x then lrx = p.x end if lry < p.y then lry = p.y end end return ulx,uly, lrx,lry end -- a polygon is convex if all edges are oriented ccw function Polygon:isConvex() local function isConvex() local v = self.vertices if #v == 3 then return true end if not ccw(v[#v], v[1], v[2]) then return false end for i = 2,#v-1 do if not ccw(v[i-1], v[i], v[i+1]) then return false end end if not ccw(v[#v-1], v[#v], v[1]) then return false end return true end -- replace function so that this will only be computed once local status = isConvex() self.isConvex = function() return status end return status end function Polygon:move(dx, dy) if not dy then dx, dy = dx:unpack() end for i,v in ipairs(self.vertices) do v.x = v.x + dx v.y = v.y + dy end self.centroid.x = self.centroid.x + dx self.centroid.y = self.centroid.y + dy end function Polygon:rotate(angle, cx, cy) if not (cx and cy) then cx,cy = self.centroid.x, self.centroid.y end for i,v in ipairs(self.vertices) do -- v = (v - center):rotate(angle) + center v.x,v.y = vector.add(cx,cy, vector.rotate(angle, v.x-cx, v.y-cy)) end local v = self.centroid v.x,v.y = vector.add(cx,cy, vector.rotate(angle, v.x-cx, v.y-cy)) end function Polygon:scale(s, cx,cy) if not (cx and cy) then cx,cy = self.centroid.x, self.centroid.y end for i,v in ipairs(self.vertices) do -- v = (v - center) * s + center v.x,v.y = vector.add(cx,cy, vector.mul(s, v.x-cx, v.y-cy)) end self._radius = self._radius * s end -- triangulation by the method of kong function Polygon:triangulate() if #self.vertices == 3 then return {self:clone()} end local vertices = self.vertices local next_idx, prev_idx = {}, {} for i = 1,#vertices do next_idx[i], prev_idx[i] = i+1,i-1 end next_idx[#next_idx], prev_idx[1] = 1, #prev_idx local concave = {} for i, v in ipairs(vertices) do if not ccw(vertices[prev_idx[i]], v, vertices[next_idx[i]]) then concave[v] = true end end local triangles = {} local n_vert, current, skipped, next, prev = #vertices, 1, 0 while n_vert > 3 do next, prev = next_idx[current], prev_idx[current] local p,q,r = vertices[prev], vertices[current], vertices[next] if isEar(p,q,r, concave) then triangles[#triangles+1] = newPolygon(p.x,p.y, q.x,q.y, r.x,r.y) next_idx[prev], prev_idx[next] = next, prev concave[q] = nil n_vert, skipped = n_vert - 1, 0 else skipped = skipped + 1 assert(skipped <= n_vert, "Cannot triangulate polygon") end current = next end next, prev = next_idx[current], prev_idx[current] local p,q,r = vertices[prev], vertices[current], vertices[next] triangles[#triangles+1] = newPolygon(p.x,p.y, q.x,q.y, r.x,r.y) return triangles end -- return merged polygon if possible or nil otherwise function Polygon:mergedWith(other) local p,q = getSharedEdge(self.vertices, other.vertices) assert(p and q, "Polygons do not share an edge") local ret = {} for i = 1,p-1 do ret[#ret+1] = self.vertices[i].x ret[#ret+1] = self.vertices[i].y end for i = 0,#other.vertices-2 do i = ((i-1 + q) % #other.vertices) + 1 ret[#ret+1] = other.vertices[i].x ret[#ret+1] = other.vertices[i].y end for i = p+1,#self.vertices do ret[#ret+1] = self.vertices[i].x ret[#ret+1] = self.vertices[i].y end return newPolygon(unpack(ret)) end -- split polygon into convex polygons. -- note that this won't be the optimal split in most cases, as -- finding the optimal split is a really hard problem. -- the method is to first triangulate and then greedily merge -- the triangles. function Polygon:splitConvex() -- edge case: polygon is a triangle or already convex if #self.vertices <= 3 or self:isConvex() then return {self:clone()} end local convex = self:triangulate() local i = 1 repeat local p = convex[i] local k = i + 1 while k <= #convex do local success, merged = pcall(function() return p:mergedWith(convex[k]) end) if success and merged:isConvex() then convex[i] = merged p = convex[i] table.remove(convex, k) else k = k + 1 end end i = i + 1 until i >= #convex return convex end function Polygon:contains(x,y) -- test if an edge cuts the ray local function cut_ray(p,q) return ((p.y > y and q.y < y) or (p.y < y and q.y > y)) -- possible cut and (x - p.x < (y - p.y) * (q.x - p.x) / (q.y - p.y)) -- x < cut.x end -- test if the ray crosses boundary from interior to exterior. -- this is needed due to edge cases, when the ray passes through -- polygon corners local function cross_boundary(p,q) return (p.y == y and p.x > x and q.y < y) or (q.y == y and q.x > x and p.y < y) end local v = self.vertices local in_polygon = false local p,q = v[#v],v[#v] for i = 1, #v do p,q = q,v[i] if cut_ray(p,q) or cross_boundary(p,q) then in_polygon = not in_polygon end end return in_polygon end function Polygon:intersectionsWithRay(x,y, dx,dy) local nx,ny = vector.perpendicular(dx,dy) local wx,xy,det local ts = {} -- ray parameters of each intersection local q1,q2 = nil, self.vertices[#self.vertices] for i = 1, #self.vertices do q1,q2 = q2,self.vertices[i] wx,wy = q2.x - q1.x, q2.y - q1.y det = vector.det(dx,dy, wx,wy) if det ~= 0 then -- there is an intersection point. check if it lies on both -- the ray and the segment. local rx,ry = q2.x - x, q2.y - y local l = vector.det(rx,ry, wx,wy) / det local m = vector.det(dx,dy, rx,ry) / det if m >= 0 and m <= 1 then -- we cannot jump out early here (i.e. when l > tmin) because -- the polygon might be concave ts[#ts+1] = l end else -- lines parralel or incident. get distance of line to -- anchor point. if they are incident, check if an endpoint -- lies on the ray local dist = vector.dot(q1.x-x,q1.y-y, nx,ny) if dist == 0 then local l = vector.dot(dx,dy, q1.x-x,q1.y-y) local m = vector.dot(dx,dy, q2.x-x,q2.y-y) if l >= m then ts[#ts+1] = l else ts[#ts+1] = m end end end end return ts end function Polygon:intersectsRay(x,y, dx,dy) local tmin = math.huge for _, t in ipairs(self:intersectionsWithRay(x,y,dx,dy)) do tmin = math.min(tmin, t) end return tmin ~= math.huge, tmin end Polygon = common_local.class('Polygon', Polygon) newPolygon = function(...) return common_local.instance(Polygon, ...) end return Polygon
mit
mcodegeeks/OpenKODE-Framework
03_Tutorial/T02_XMCocos2D-v3-Lua/Resource/luaScript/RenderTextureTest/RenderTextureTest.lua
4
18323
-- Test #1 by Jason Booth (slipster216) -- Test #3 by David Deaco (ddeaco) --/** -- * Impelmentation of RenderTextureSave --*/ local function RenderTextureSave() local ret = createTestLayer("Touch the screen", "Press 'Save Image' to create an snapshot of the render texture") local s = cc.Director:getInstance():getWinSize() local m_pTarget = nil local m_pBrush = nil local m_pTarget = nil local counter = 0 local function clearImage(tag, pSender) m_pTarget:clear(math.random(), math.random(), math.random(), math.random()) end local function saveImage(tag, pSender) local png = string.format("image-%d.png", counter) local jpg = string.format("image-%d.jpg", counter) m_pTarget:saveToFile(png, cc.IMAGE_FORMAT_PNG) m_pTarget:saveToFile(jpg, cc.IMAGE_FORMAT_JPEG) local pImage = m_pTarget:newImage() local tex = cc.TextureCache:getInstance():addUIImage(pImage, png) pImage:release() local sprite = cc.Sprite:createWithTexture(tex) sprite:setScale(0.3) ret:addChild(sprite) sprite:setPosition(cc.p(40, 40)) sprite:setRotation(counter * 3) cclog("Image saved %s and %s", png, jpg) counter = counter + 1 end local function onNodeEvent(event) if event == "exit" then m_pBrush:release() m_pTarget:release() cc.TextureCache:getInstance():removeUnusedTextures() end end ret:registerScriptHandler(onNodeEvent) -- create a render texture, this is what we are going to draw into m_pTarget = cc.RenderTexture:create(s.width, s.height, cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888) m_pTarget:retain() m_pTarget:setPosition(cc.p(s.width / 2, s.height / 2)) -- note that the render texture is a cc.Node, and contains a sprite of its texture for convience, -- so we can just parent it to the scene like any other cc.Node ret:addChild(m_pTarget, -1) -- create a brush image to draw into the texture with m_pBrush = cc.Sprite:create("Images/fire.png") m_pBrush:retain() m_pBrush:setColor(cc.c3b(255, 0, 0)) m_pBrush:setOpacity(20) local prev = {x = 0, y = 0} local function onTouchEvent(eventType, x, y) if eventType == "began" then prev.x = x prev.y = y return true elseif eventType == "moved" then local diffX = x - prev.x local diffY = y - prev.y local startP = cc.p(x, y) local endP = cc.p(prev.x, prev.y) -- begin drawing to the render texture m_pTarget:begin() -- for extra points, we'll draw this smoothly from the last position and vary the sprite's -- scale/rotation/offset local distance = cc.pGetDistance(startP, endP) if distance > 1 then local d = distance local i = 0 for i = 0, d-1 do local difx = endP.x - startP.x local dify = endP.y - startP.y local delta = i / distance m_pBrush:setPosition(cc.p(startP.x + (difx * delta), startP.y + (dify * delta))) m_pBrush:setRotation(math.random(0, 359)) local r = math.random(0, 49) / 50.0 + 0.25 m_pBrush:setScale(r) -- Use cc.RANDOM_0_1() will cause error when loading libtests.so on android, I don't know why. m_pBrush:setColor(cc.c3b(math.random(0, 126) + 128, 255, 255)) -- Call visit to draw the brush, don't call draw.. m_pBrush:visit() end end -- finish drawing and return context back to the screen m_pTarget:endToLua() end prev.x = x prev.y = y end ret:setTouchEnabled(true) ret:registerScriptTouchHandler(onTouchEvent) -- Save Image menu cc.MenuItemFont:setFontSize(16) local item1 = cc.MenuItemFont:create("Save Image") item1:registerScriptTapHandler(saveImage) local item2 = cc.MenuItemFont:create("Clear") item2:registerScriptTapHandler(clearImage) local menu = cc.Menu:create(item1, item2) ret:addChild(menu) menu:alignItemsVertically() menu:setPosition(cc.p(VisibleRect:rightTop().x - 80, VisibleRect:rightTop().y - 30)) return ret end --/** -- * Impelmentation of RenderTextureIssue937 --*/ -- local function RenderTextureIssue937() -- /* -- * 1 2 -- * A: A1 A2 -- * -- * B: B1 B2 -- * -- * A1: premulti sprite -- * A2: premulti render -- * -- * B1: non-premulti sprite -- * B2: non-premulti render -- */ -- local background = cc.LayerColor:create(cc.c4b(200,200,200,255)) -- addChild(background) -- local spr_premulti = cc.Sprite:create("Images/fire.png") -- spr_premulti:setPosition(cc.p(16,48)) -- local spr_nonpremulti = cc.Sprite:create("Images/fire.png") -- spr_nonpremulti:setPosition(cc.p(16,16)) -- /* A2 & B2 setup */ -- local rend = cc.RenderTexture:create(32, 64, cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888) -- if (NULL == rend) -- return -- end -- -- It's possible to modify the RenderTexture blending function by -- -- [[rend sprite] setBlendFunc:(BlendFunc) GL_ONE, GL_ONE_MINUS_SRC_ALPHAend] -- rend:begin() -- spr_premulti:visit() -- spr_nonpremulti:visit() -- rend:end() -- local s = cc.Director:getInstance():getWinSize() -- --/* A1: setup */ -- spr_premulti:setPosition(cc.p(s.width/2-16, s.height/2+16)) -- --/* B1: setup */ -- spr_nonpremulti:setPosition(cc.p(s.width/2-16, s.height/2-16)) -- rend:setPosition(cc.p(s.width/2+16, s.height/2)) -- addChild(spr_nonpremulti) -- addChild(spr_premulti) -- addChild(rend) -- end -- local function title() -- return "Testing issue #937" -- end -- local function subtitle() -- return "All images should be equal..." -- end -- local function runThisTest() -- local pLayer = nextTestCase() -- addChild(pLayer) -- cc.Director:getInstance():replaceScene(this) -- end -- --/** -- -- * Impelmentation of RenderTextureZbuffer -- --*/ -- local function RenderTextureZbuffer() -- this:setTouchEnabled(true) -- local size = cc.Director:getInstance():getWinSize() -- local label = cc.LabelTTF:create("vertexZ = 50", "Marker Felt", 64) -- label:setPosition(cc.p(size.width / 2, size.height * 0.25)) -- this:addChild(label) -- local label2 = cc.LabelTTF:create("vertexZ = 0", "Marker Felt", 64) -- label2:setPosition(cc.p(size.width / 2, size.height * 0.5)) -- this:addChild(label2) -- local label3 = cc.LabelTTF:create("vertexZ = -50", "Marker Felt", 64) -- label3:setPosition(cc.p(size.width / 2, size.height * 0.75)) -- this:addChild(label3) -- label:setVertexZ(50) -- label2:setVertexZ(0) -- label3:setVertexZ(-50) -- cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("Images/bugs/circle.plist") -- mgr = cc.SpriteBatchNode:create("Images/bugs/circle.png", 9) -- this:addChild(mgr) -- sp1 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp2 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp3 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp4 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp5 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp6 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp7 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp8 = cc.Sprite:createWithSpriteFrameName("circle.png") -- sp9 = cc.Sprite:createWithSpriteFrameName("circle.png") -- mgr:addChild(sp1, 9) -- mgr:addChild(sp2, 8) -- mgr:addChild(sp3, 7) -- mgr:addChild(sp4, 6) -- mgr:addChild(sp5, 5) -- mgr:addChild(sp6, 4) -- mgr:addChild(sp7, 3) -- mgr:addChild(sp8, 2) -- mgr:addChild(sp9, 1) -- sp1:setVertexZ(400) -- sp2:setVertexZ(300) -- sp3:setVertexZ(200) -- sp4:setVertexZ(100) -- sp5:setVertexZ(0) -- sp6:setVertexZ(-100) -- sp7:setVertexZ(-200) -- sp8:setVertexZ(-300) -- sp9:setVertexZ(-400) -- sp9:setScale(2) -- sp9:setColor(cc.c3b::YELLOW) -- end -- local function title() -- return "Testing Z Buffer in Render Texture" -- end -- local function subtitle() -- return "Touch screen. It should be green" -- end -- local function ccTouchesBegan(cocos2d:cc.Set *touches, cocos2d:cc.Event *event) -- cc.SetIterator iter -- cc.Touch *touch -- for (iter = touches:begin() iter != touches:end() ++iter) -- touch = (cc.Touch *)(*iter) -- local location = touch:getLocation() -- sp1:setPosition(location) -- sp2:setPosition(location) -- sp3:setPosition(location) -- sp4:setPosition(location) -- sp5:setPosition(location) -- sp6:setPosition(location) -- sp7:setPosition(location) -- sp8:setPosition(location) -- sp9:setPosition(location) -- end -- end -- local function ccTouchesMoved(cc.const std::vector<Touch*>& touches, cc.Event* event) -- cc.SetIterator iter -- cc.Touch *touch -- for (iter = touches:begin() iter != touches:end() ++iter) -- touch = (cc.Touch *)(*iter) -- local location = touch:getLocation() -- sp1:setPosition(location) -- sp2:setPosition(location) -- sp3:setPosition(location) -- sp4:setPosition(location) -- sp5:setPosition(location) -- sp6:setPosition(location) -- sp7:setPosition(location) -- sp8:setPosition(location) -- sp9:setPosition(location) -- end -- end -- local function ccTouchesEnded(cc.const std::vector<Touch*>& touches, cc.Event* event) -- this:renderScreenShot() -- end -- local function renderScreenShot() -- local texture = cc.RenderTexture:create(512, 512) -- if (NULL == texture) -- return -- end -- texture:setAnchorPoint(cc.p(0, 0)) -- texture:begin() -- this:visit() -- texture:end() -- local sprite = cc.Sprite:createWithTexture(texture:getSprite():getTexture()) -- sprite:setPosition(cc.p(256, 256)) -- sprite:setOpacity(182) -- sprite:setFlipY(1) -- this:addChild(sprite, 999999) -- sprite:setColor(cc.c3b::GREEN) -- sprite:runAction(cc.Sequence:create(cc.FadeTo:create(2, 0), -- cc.Hide:create(), -- NULL)) -- end -- -- RenderTextureTestDepthStencil -- local function RenderTextureTestDepthStencil() -- local s = cc.Director:getInstance():getWinSize() -- local sprite = cc.Sprite:create("Images/fire.png") -- sprite:setPosition(cc.p(s.width * 0.25, 0)) -- sprite:setScale(10) -- local rend = cc.RenderTexture:create(s.width, s.height, kcc.Texture2DPixelFormat_RGBA4444, GL_DEPTH24_STENCIL8) -- glStencilMask(0xFF) -- rend:beginWithClear(0, 0, 0, 0, 0, 0) -- --! mark sprite quad into stencil buffer -- glEnable(GL_STENCIL_TEST) -- glStencilFunc(GL_ALWAYS, 1, 0xFF) -- glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE) -- glColorMask(0, 0, 0, 1) -- sprite:visit() -- --! move sprite half width and height, and draw only where not marked -- sprite:setPosition(cc.p__add(sprite:getPosition(), cc.p__mul(cc.p(sprite:getContentSize().width * sprite:getScale(), sprite:getContentSize().height * sprite:getScale()), 0.5))) -- glStencilFunc(GL_NOTEQUAL, 1, 0xFF) -- glColorMask(1, 1, 1, 1) -- sprite:visit() -- rend:end() -- glDisable(GL_STENCIL_TEST) -- rend:setPosition(cc.p(s.width * 0.5, s.height * 0.5)) -- this:addChild(rend) -- end -- local function title() -- return "Testing depthStencil attachment" -- end -- local function subtitle() -- return "Circle should be missing 1/4 of its region" -- end -- -- RenderTextureTest -- local function RenderTextureTargetNode() -- /* -- * 1 2 -- * A: A1 A2 -- * -- * B: B1 B2 -- * -- * A1: premulti sprite -- * A2: premulti render -- * -- * B1: non-premulti sprite -- * B2: non-premulti render -- */ -- local background = cc.LayerColor:create(cc.c4b(40,40,40,255)) -- addChild(background) -- -- sprite 1 -- sprite1 = cc.Sprite:create("Images/fire.png") -- -- sprite 2 -- sprite2 = cc.Sprite:create("Images/fire_rgba8888.pvr") -- local s = cc.Director:getInstance():getWinSize() -- /* Create the render texture */ -- local renderTexture = cc.RenderTexture:create(s.width, s.height, kcc.Texture2DPixelFormat_RGBA4444) -- this:renderTexture = renderTexture -- renderTexture:setPosition(cc.p(s.width/2, s.height/2)) -- -- [renderTexture setPosition:cc.p(s.width, s.height)] -- -- renderTexture.scale = 2 -- /* add the sprites to the render texture */ -- renderTexture:addChild(sprite1) -- renderTexture:addChild(sprite2) -- renderTexture:setClearColor(cc.c4f(0, 0, 0, 0)) -- renderTexture:setClearFlags(GL_COLOR_BUFFER_BIT) -- /* add the render texture to the scene */ -- addChild(renderTexture) -- renderTexture:setAutoDraw(true) -- scheduleUpdate() -- -- Toggle clear on / off -- local item = cc.MenuItemFont:create("Clear On/Off", this, menu_selector(RenderTextureTargetNode:touched)) -- local menu = cc.Menu:create(item, NULL) -- addChild(menu) -- menu:setPosition(cc.p(s.width/2, s.height/2)) -- end -- local function touched(cc.Object* sender) -- if (renderTexture:getClearFlags() == 0) -- renderTexture:setClearFlags(GL_COLOR_BUFFER_BIT) -- end -- else -- renderTexture:setClearFlags(0) -- renderTexture:setClearColor(cc.c4f( cc.RANDOM_0_1(), cc.RANDOM_0_1(), cc.RANDOM_0_1(), 1)) -- end -- end -- local function update(float dt) -- static float time = 0 -- float r = 80 -- sprite1:setPosition(cc.p(cosf(time * 2) * r, sinf(time * 2) * r)) -- sprite2:setPosition(cc.p(sinf(time * 2) * r, cosf(time * 2) * r)) -- time += dt -- end -- local function title() -- return "Testing Render Target Node" -- end -- local function subtitle() -- return "Sprites should be equal and move with each frame" -- end -- -- SpriteRenderTextureBug -- local function SimpleSprite() : rt(NULL) {} -- local function SimpleSprite* SpriteRenderTextureBug:SimpleSprite:create(const char* filename, const cc.rect &rect) -- SimpleSprite *sprite = new SimpleSprite() -- if (sprite && sprite:initWithFile(filename, rect)) -- sprite:autorelease() -- end -- else -- cc._SAFE_DELETE(sprite) -- end -- return sprite -- end -- local function SimpleSprite:draw() -- if (rt == NULL) -- local s = cc.Director:getInstance():getWinSize() -- rt = new cc.RenderTexture() -- rt:initWithWidthAndHeight(s.width, s.height, cc.TEXTURE2_D_PIXEL_FORMAT_RGB_A8888) -- end -- rt:beginWithClear(0.0, 0.0, 0.0, 1.0) -- rt:end() -- cc._NODE_DRAW_SETUP() -- BlendFunc blend = getBlendFunc() -- ccGLBlendFunc(blend.src, blend.dst) -- ccGLBindTexture2D(getTexture():getName()) -- -- -- -- Attributes -- -- -- ccGLEnableVertexAttribs(kcc.VertexAttribFlag_PosColorTex) -- #define kQuadSize sizeof(m_sQuad.bl) -- long offset = (long)&m_sQuad -- -- vertex -- int diff = offsetof( V3F_C4B_T2F, vertices) -- glVertexAttribPointer(kcc.VertexAttrib_Position, 3, GL_FLOAT, GL_FALSE, kQuadSize, (void*) (offset + diff)) -- -- texCoods -- diff = offsetof( V3F_C4B_T2F, texCoords) -- glVertexAttribPointer(kcc.VertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, kQuadSize, (void*)(offset + diff)) -- -- color -- diff = offsetof( V3F_C4B_T2F, colors) -- glVertexAttribPointer(kcc.VertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (void*)(offset + diff)) -- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4) -- end -- local function SpriteRenderTextureBug() -- setTouchEnabled(true) -- local s = cc.Director:getInstance():getWinSize() -- addNewSpriteWithCoords(cc.p(s.width/2, s.height/2)) -- end -- local function SimpleSprite* SpriteRenderTextureBug:addNewSpriteWithCoords(const cc.p& p) -- int idx = cc.RANDOM_0_1() * 1400 / 100 -- int x = (idx%5) * 85 -- int y = (idx/5) * 121 -- SpriteRenderTextureBug:SimpleSprite *sprite = SpriteRenderTextureBug:SimpleSprite:create("Images/grossini_dance_atlas.png", -- cc.rect(x,y,85,121)) -- addChild(sprite) -- sprite:setPosition(p) -- local action = NULL -- float rd = cc.RANDOM_0_1() -- if (rd < 0.20) -- action = cc.ScaleBy:create(3, 2) -- else if (rd < 0.40) -- action = cc.RotateBy:create(3, 360) -- else if (rd < 0.60) -- action = cc.Blink:create(1, 3) -- else if (rd < 0.8 ) -- action = cc.TintBy:create(2, 0, -255, -255) -- else -- action = cc.FadeOut:create(2) -- local action_back = action:reverse() -- local seq = cc.Sequence:create(action, action_back, NULL) -- sprite:runAction(cc.RepeatForever:create(seq)) -- --return sprite -- return NULL -- end -- local function ccTouchesEnded(cc.const std::vector<Touch*>& touches, cc.Event* event) -- cc.SetIterator iter = touches:begin() -- for( iter != touches:end() ++iter) -- local location = ((cc.Touch*)(*iter)):getLocation() -- addNewSpriteWithCoords(location) -- end -- end -- local function title() -- return "SpriteRenderTextureBug" -- end -- local function subtitle() -- return "Touch the screen. Sprite should appear on under the touch" -- end function RenderTextureTestMain() cclog("RenderTextureTestMain") Helper.index = 1 local scene = cc.Scene:create() Helper.createFunctionTable = { RenderTextureSave, -- RenderTextureIssue937, -- RenderTextureZbuffer, -- RenderTextureTestDepthStencil, -- RenderTextureTargetNode, -- SpriteRenderTextureBug } scene:addChild(RenderTextureSave()) scene:addChild(CreateBackMenuItem()) return scene end
mit
The-HalcyonDays/darkstar
scripts/zones/Qufim_Island/npcs/Trodden_Snow.lua
13
4765
----------------------------------- -- Area: Qufim Island -- NPC: Trodden Snow -- Mission: ASA - THAT_WHICH_CURDLES_BLOOD -- Mission: ASA - SUGAR_COATED_DIRECTIVE -- @zone 126 -- @pos -19 -17 104 ----------------------------------- package.loaded["scripts/zones/Qufim_Island/TextIDs"] = nil; ------------------------------------- require("scripts/zones/Qufim_Island/TextIDs"); require("scripts/globals/settings"); require("scripts/globals/keyitems"); require("scripts/globals/missions"); ----------------------------------- -- onTrade ----------------------------------- function onTrade(player,npc,trade) -- Trade Enfeebling Kit if (player:getCurrentMission(ASA) == THAT_WHICH_CURDLES_BLOOD) then local item = 0; local asaStatus = player:getVar("ASA_Status"); -- TODO: Other Enfeebling Kits if(asaStatus == 0) then item = 2779; else printf("Error: Unknown ASA Status Encountered <%u>", asaStatus); end if(trade:getItemCount() == 1 and trade:hasItemQty(item,1)) then player:tradeComplete(); player:startEvent(0x002c); end end end; ----------------------------------- -- onTrigger ----------------------------------- function onTrigger(player,npc) --ASA 4 CS: Triggers With At Least 3 Counterseals. if (player:getCurrentMission(ASA) == SUGAR_COATED_DIRECTIVE) then local completedSeals = 0; if(player:hasKeyItem(AMBER_COUNTERSEAL)) then completedSeals = completedSeals + 1; end; if(player:hasKeyItem(AZURE_COUNTERSEAL)) then completedSeals = completedSeals + 1; end; if(player:hasKeyItem(CERULEAN_COUNTERSEAL)) then completedSeals = completedSeals + 1; end; if(player:hasKeyItem(EMERALD_COUNTERSEAL)) then completedSeals = completedSeals + 1; end; if(player:hasKeyItem(SCARLET_COUNTERSEAL)) then completedSeals = completedSeals + 1; end; if(player:hasKeyItem(VIOLET_COUNTERSEAL)) then completedSeals = completedSeals + 1; end; if(completedSeals >= 3) then player:setVar("ASA_Status", completedSeals); player:startEvent(0x002d); end; end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if(csid==0x002c) then player:addKeyItem(DOMINAS_SCARLET_SEAL); player:messageSpecial(KEYITEM_OBTAINED,DOMINAS_SCARLET_SEAL); player:addKeyItem(DOMINAS_CERULEAN_SEAL); player:messageSpecial(KEYITEM_OBTAINED,DOMINAS_CERULEAN_SEAL); player:addKeyItem(DOMINAS_EMERALD_SEAL); player:messageSpecial(KEYITEM_OBTAINED,DOMINAS_EMERALD_SEAL); player:addKeyItem(DOMINAS_AMBER_SEAL); player:messageSpecial(KEYITEM_OBTAINED,DOMINAS_AMBER_SEAL); player:addKeyItem(DOMINAS_VIOLET_SEAL); player:messageSpecial(KEYITEM_OBTAINED,DOMINAS_VIOLET_SEAL); player:addKeyItem(DOMINAS_AZURE_SEAL); player:messageSpecial(KEYITEM_OBTAINED,DOMINAS_AZURE_SEAL); player:completeMission(ASA,THAT_WHICH_CURDLES_BLOOD); player:addMission(ASA,SUGAR_COATED_DIRECTIVE); player:setVar("ASA_Status",0); player:setVar("ASA4_Amber","0"); player:setVar("ASA4_Azure","0"); player:setVar("ASA4_Cerulean","0"); player:setVar("ASA4_Emerald","0"); player:setVar("ASA4_Scarlet","0"); player:setVar("ASA4_Violet","0"); elseif(csid==0x002d) then local completedSeals = player:getVar("ASA_Status"); -- Calculate Reward if(completedSeals == 3) then player:addGil(GIL_RATE*3000); elseif(completedSeals == 4) then player:addGil(GIL_RATE*10000); elseif(completedSeals == 5) then player:addGil(GIL_RATE*30000); elseif(completedSeals == 6) then player:addGil(GIL_RATE*50000); end -- Clean Up Remaining Key Items player:delKeyItem(DOMINAS_SCARLET_SEAL); player:delKeyItem(DOMINAS_CERULEAN_SEAL); player:delKeyItem(DOMINAS_EMERALD_SEAL); player:delKeyItem(DOMINAS_AMBER_SEAL); player:delKeyItem(DOMINAS_VIOLET_SEAL); player:delKeyItem(DOMINAS_AZURE_SEAL); player:delKeyItem(SCARLET_COUNTERSEAL); player:delKeyItem(CERULEAN_COUNTERSEAL); player:delKeyItem(EMERALD_COUNTERSEAL); player:delKeyItem(AMBER_COUNTERSEAL); player:delKeyItem(VIOLET_COUNTERSEAL); player:delKeyItem(AZURE_COUNTERSEAL); -- Advance Mission player:completeMission(ASA,SUGAR_COATED_DIRECTIVE); player:addMission(ASA,ENEMY_OF_THE_EMPIRE_I); player:setVar("ASA_Status",0); end end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/globals/items/strip_of_bison_jerky.lua
35
1398
----------------------------------------- -- ID: 5207 -- Item: strip_of_bison_jerky -- Food Effect: 60Min, All Races ----------------------------------------- -- Strength 5 -- Mind -2 -- Attack % 18 -- Attack Cap 70 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- -- OnItemCheck ----------------------------------------- function onItemCheck(target) local result = 0; if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then result = 246; end return result; end; ----------------------------------------- -- OnItemUse ----------------------------------------- function onItemUse(target) target:addStatusEffect(EFFECT_FOOD,0,0,3600,5207); end; ----------------------------------------- -- onEffectGain Action ----------------------------------------- function onEffectGain(target,effect) target:addMod(MOD_STR, 5); target:addMod(MOD_MND, -2); target:addMod(MOD_FOOD_ATTP, 18); target:addMod(MOD_FOOD_ATT_CAP, 70); end; ----------------------------------------- -- onEffectLose Action ----------------------------------------- function onEffectLose(target,effect) target:delMod(MOD_STR, 5); target:delMod(MOD_MND, -2); target:delMod(MOD_FOOD_ATTP, 18); target:delMod(MOD_FOOD_ATT_CAP, 70); end;
gpl-3.0
coltonj96/UsefulCombinators
UsefulCombinators_0.2.2/prototypes/signal/signal.lua
8
5506
data:extend( { { type = "virtual-signal", name = "counting-signal", icon = "__UsefulCombinators__/graphics/icons/signal/counting-signal.png", subgroup = "virtual-signal", order = "u[counting]" }, { type = "virtual-signal", name = "time-mod-signal", icon = "__UsefulCombinators__/graphics/icons/signal/time-mod-signal.png", subgroup = "virtual-signal", order = "u[time-mod]" }, { type = "virtual-signal", name = "divisor-signal", icon = "__UsefulCombinators__/graphics/icons/signal/divisor-signal.png", subgroup = "virtual-signal", order = "u[divisor]" }, { type = "virtual-signal", name = "interval-signal", icon = "__UsefulCombinators__/graphics/icons/signal/interval-signal.png", subgroup = "virtual-signal", order = "u[interval]" }, { type = "virtual-signal", name = "lower-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lower-signal.png", subgroup = "virtual-signal", order = "u[lower]" }, { type = "virtual-signal", name = "plus-one-signal", icon = "__UsefulCombinators__/graphics/icons/signal/plus-one-signal.png", subgroup = "virtual-signal", order = "u[plus-one]" }, { type = "virtual-signal", name = "output-signal", icon = "__UsefulCombinators__/graphics/icons/signal/output-signal.png", subgroup = "virtual-signal", order = "u[output]" }, { type = "virtual-signal", name = "reset-signal", icon = "__UsefulCombinators__/graphics/icons/signal/reset-signal.png", subgroup = "virtual-signal", order = "u[reset]" }, { type = "virtual-signal", name = "ticks-signal", icon = "__UsefulCombinators__/graphics/icons/signal/ticks-signal.png", subgroup = "virtual-signal", order = "u[ticks]" }, { type = "virtual-signal", name = "upper-signal", icon = "__UsefulCombinators__/graphics/icons/signal/upper-signal.png", subgroup = "virtual-signal", order = "u[upper]" }, { type = "virtual-signal", name = "lt-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lt-signal.png", subgroup = "virtual-signal", order = "u[lt]" }, { type = "virtual-signal", name = "lte-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lte-signal.png", subgroup = "virtual-signal", order = "u[lte]" }, { type = "virtual-signal", name = "eq-signal", icon = "__UsefulCombinators__/graphics/icons/signal/eq-signal.png", subgroup = "virtual-signal", order = "u[eq]" }, { type = "virtual-signal", name = "gte-signal", icon = "__UsefulCombinators__/graphics/icons/signal/gte-signal.png", subgroup = "virtual-signal", order = "u[gte]" }, { type = "virtual-signal", name = "gt-signal", icon = "__UsefulCombinators__/graphics/icons/signal/gt-signal.png", subgroup = "virtual-signal", order = "u[gt]" }, { type = "virtual-signal", name = "blank", icon = "__UsefulCombinators__/graphics/icons/signal/blank.png", subgroup = "virtual-signal", order = "u[blank]" }, { type = "virtual-signal", name = "minus-one-signal", icon = "__UsefulCombinators__/graphics/icons/signal/minus-one-signal.png", subgroup = "virtual-signal", order = "u[minus-one]" }, { type = "virtual-signal", name = "radius-signal", icon = "__UsefulCombinators__/graphics/icons/signal/radius-signal.png", subgroup = "virtual-signal", order = "u[radius]" }, { type = "virtual-signal", name = "width-signal", icon = "__UsefulCombinators__/graphics/icons/signal/width-signal.png", subgroup = "virtual-signal", order = "u[width]" }, { type = "virtual-signal", name = "height-signal", icon = "__UsefulCombinators__/graphics/icons/signal/height-signal.png", subgroup = "virtual-signal", order = "u[height]" }, { type = "virtual-signal", name = "red-signal", icon = "__UsefulCombinators__/graphics/icons/signal/red-signal.png", subgroup = "virtual-signal", order = "u[red]" }, { type = "virtual-signal", name = "yellow-signal", icon = "__UsefulCombinators__/graphics/icons/signal/yellow-signal.png", subgroup = "virtual-signal", order = "u[yellow]" }, { type = "virtual-signal", name = "green-signal", icon = "__UsefulCombinators__/graphics/icons/signal/green-signal.png", subgroup = "virtual-signal", order = "u[green]" }, { type = "virtual-signal", name = "cyan-signal", icon = "__UsefulCombinators__/graphics/icons/signal/cyan-signal.png", subgroup = "virtual-signal", order = "u[cyan]" }, { type = "virtual-signal", name = "blue-signal", icon = "__UsefulCombinators__/graphics/icons/signal/blue-signal.png", subgroup = "virtual-signal", order = "u[blue]" }, { type = "virtual-signal", name = "magenta-signal", icon = "__UsefulCombinators__/graphics/icons/signal/magenta-signal.png", subgroup = "virtual-signal", order = "u[magenta]" }, { type = "virtual-signal", name = "white-signal", icon = "__UsefulCombinators__/graphics/icons/signal/white-signal.png", subgroup = "virtual-signal", order = "u[white]" } })
mit
coltonj96/UsefulCombinators
UsefulCombinators_0.2.4/prototypes/signal/signal.lua
8
5506
data:extend( { { type = "virtual-signal", name = "counting-signal", icon = "__UsefulCombinators__/graphics/icons/signal/counting-signal.png", subgroup = "virtual-signal", order = "u[counting]" }, { type = "virtual-signal", name = "time-mod-signal", icon = "__UsefulCombinators__/graphics/icons/signal/time-mod-signal.png", subgroup = "virtual-signal", order = "u[time-mod]" }, { type = "virtual-signal", name = "divisor-signal", icon = "__UsefulCombinators__/graphics/icons/signal/divisor-signal.png", subgroup = "virtual-signal", order = "u[divisor]" }, { type = "virtual-signal", name = "interval-signal", icon = "__UsefulCombinators__/graphics/icons/signal/interval-signal.png", subgroup = "virtual-signal", order = "u[interval]" }, { type = "virtual-signal", name = "lower-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lower-signal.png", subgroup = "virtual-signal", order = "u[lower]" }, { type = "virtual-signal", name = "plus-one-signal", icon = "__UsefulCombinators__/graphics/icons/signal/plus-one-signal.png", subgroup = "virtual-signal", order = "u[plus-one]" }, { type = "virtual-signal", name = "output-signal", icon = "__UsefulCombinators__/graphics/icons/signal/output-signal.png", subgroup = "virtual-signal", order = "u[output]" }, { type = "virtual-signal", name = "reset-signal", icon = "__UsefulCombinators__/graphics/icons/signal/reset-signal.png", subgroup = "virtual-signal", order = "u[reset]" }, { type = "virtual-signal", name = "ticks-signal", icon = "__UsefulCombinators__/graphics/icons/signal/ticks-signal.png", subgroup = "virtual-signal", order = "u[ticks]" }, { type = "virtual-signal", name = "upper-signal", icon = "__UsefulCombinators__/graphics/icons/signal/upper-signal.png", subgroup = "virtual-signal", order = "u[upper]" }, { type = "virtual-signal", name = "lt-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lt-signal.png", subgroup = "virtual-signal", order = "u[lt]" }, { type = "virtual-signal", name = "lte-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lte-signal.png", subgroup = "virtual-signal", order = "u[lte]" }, { type = "virtual-signal", name = "eq-signal", icon = "__UsefulCombinators__/graphics/icons/signal/eq-signal.png", subgroup = "virtual-signal", order = "u[eq]" }, { type = "virtual-signal", name = "gte-signal", icon = "__UsefulCombinators__/graphics/icons/signal/gte-signal.png", subgroup = "virtual-signal", order = "u[gte]" }, { type = "virtual-signal", name = "gt-signal", icon = "__UsefulCombinators__/graphics/icons/signal/gt-signal.png", subgroup = "virtual-signal", order = "u[gt]" }, { type = "virtual-signal", name = "blank", icon = "__UsefulCombinators__/graphics/icons/signal/blank.png", subgroup = "virtual-signal", order = "u[blank]" }, { type = "virtual-signal", name = "minus-one-signal", icon = "__UsefulCombinators__/graphics/icons/signal/minus-one-signal.png", subgroup = "virtual-signal", order = "u[minus-one]" }, { type = "virtual-signal", name = "radius-signal", icon = "__UsefulCombinators__/graphics/icons/signal/radius-signal.png", subgroup = "virtual-signal", order = "u[radius]" }, { type = "virtual-signal", name = "width-signal", icon = "__UsefulCombinators__/graphics/icons/signal/width-signal.png", subgroup = "virtual-signal", order = "u[width]" }, { type = "virtual-signal", name = "height-signal", icon = "__UsefulCombinators__/graphics/icons/signal/height-signal.png", subgroup = "virtual-signal", order = "u[height]" }, { type = "virtual-signal", name = "red-signal", icon = "__UsefulCombinators__/graphics/icons/signal/red-signal.png", subgroup = "virtual-signal", order = "u[red]" }, { type = "virtual-signal", name = "yellow-signal", icon = "__UsefulCombinators__/graphics/icons/signal/yellow-signal.png", subgroup = "virtual-signal", order = "u[yellow]" }, { type = "virtual-signal", name = "green-signal", icon = "__UsefulCombinators__/graphics/icons/signal/green-signal.png", subgroup = "virtual-signal", order = "u[green]" }, { type = "virtual-signal", name = "cyan-signal", icon = "__UsefulCombinators__/graphics/icons/signal/cyan-signal.png", subgroup = "virtual-signal", order = "u[cyan]" }, { type = "virtual-signal", name = "blue-signal", icon = "__UsefulCombinators__/graphics/icons/signal/blue-signal.png", subgroup = "virtual-signal", order = "u[blue]" }, { type = "virtual-signal", name = "magenta-signal", icon = "__UsefulCombinators__/graphics/icons/signal/magenta-signal.png", subgroup = "virtual-signal", order = "u[magenta]" }, { type = "virtual-signal", name = "white-signal", icon = "__UsefulCombinators__/graphics/icons/signal/white-signal.png", subgroup = "virtual-signal", order = "u[white]" } })
mit
coltonj96/UsefulCombinators
UsefulCombinators_0.2.1/prototypes/signal/signal.lua
8
5506
data:extend( { { type = "virtual-signal", name = "counting-signal", icon = "__UsefulCombinators__/graphics/icons/signal/counting-signal.png", subgroup = "virtual-signal", order = "u[counting]" }, { type = "virtual-signal", name = "time-mod-signal", icon = "__UsefulCombinators__/graphics/icons/signal/time-mod-signal.png", subgroup = "virtual-signal", order = "u[time-mod]" }, { type = "virtual-signal", name = "divisor-signal", icon = "__UsefulCombinators__/graphics/icons/signal/divisor-signal.png", subgroup = "virtual-signal", order = "u[divisor]" }, { type = "virtual-signal", name = "interval-signal", icon = "__UsefulCombinators__/graphics/icons/signal/interval-signal.png", subgroup = "virtual-signal", order = "u[interval]" }, { type = "virtual-signal", name = "lower-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lower-signal.png", subgroup = "virtual-signal", order = "u[lower]" }, { type = "virtual-signal", name = "plus-one-signal", icon = "__UsefulCombinators__/graphics/icons/signal/plus-one-signal.png", subgroup = "virtual-signal", order = "u[plus-one]" }, { type = "virtual-signal", name = "output-signal", icon = "__UsefulCombinators__/graphics/icons/signal/output-signal.png", subgroup = "virtual-signal", order = "u[output]" }, { type = "virtual-signal", name = "reset-signal", icon = "__UsefulCombinators__/graphics/icons/signal/reset-signal.png", subgroup = "virtual-signal", order = "u[reset]" }, { type = "virtual-signal", name = "ticks-signal", icon = "__UsefulCombinators__/graphics/icons/signal/ticks-signal.png", subgroup = "virtual-signal", order = "u[ticks]" }, { type = "virtual-signal", name = "upper-signal", icon = "__UsefulCombinators__/graphics/icons/signal/upper-signal.png", subgroup = "virtual-signal", order = "u[upper]" }, { type = "virtual-signal", name = "lt-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lt-signal.png", subgroup = "virtual-signal", order = "u[lt]" }, { type = "virtual-signal", name = "lte-signal", icon = "__UsefulCombinators__/graphics/icons/signal/lte-signal.png", subgroup = "virtual-signal", order = "u[lte]" }, { type = "virtual-signal", name = "eq-signal", icon = "__UsefulCombinators__/graphics/icons/signal/eq-signal.png", subgroup = "virtual-signal", order = "u[eq]" }, { type = "virtual-signal", name = "gte-signal", icon = "__UsefulCombinators__/graphics/icons/signal/gte-signal.png", subgroup = "virtual-signal", order = "u[gte]" }, { type = "virtual-signal", name = "gt-signal", icon = "__UsefulCombinators__/graphics/icons/signal/gt-signal.png", subgroup = "virtual-signal", order = "u[gt]" }, { type = "virtual-signal", name = "blank", icon = "__UsefulCombinators__/graphics/icons/signal/blank.png", subgroup = "virtual-signal", order = "u[blank]" }, { type = "virtual-signal", name = "minus-one-signal", icon = "__UsefulCombinators__/graphics/icons/signal/minus-one-signal.png", subgroup = "virtual-signal", order = "u[minus-one]" }, { type = "virtual-signal", name = "radius-signal", icon = "__UsefulCombinators__/graphics/icons/signal/radius-signal.png", subgroup = "virtual-signal", order = "u[radius]" }, { type = "virtual-signal", name = "width-signal", icon = "__UsefulCombinators__/graphics/icons/signal/width-signal.png", subgroup = "virtual-signal", order = "u[width]" }, { type = "virtual-signal", name = "height-signal", icon = "__UsefulCombinators__/graphics/icons/signal/height-signal.png", subgroup = "virtual-signal", order = "u[height]" }, { type = "virtual-signal", name = "red-signal", icon = "__UsefulCombinators__/graphics/icons/signal/red-signal.png", subgroup = "virtual-signal", order = "u[red]" }, { type = "virtual-signal", name = "yellow-signal", icon = "__UsefulCombinators__/graphics/icons/signal/yellow-signal.png", subgroup = "virtual-signal", order = "u[yellow]" }, { type = "virtual-signal", name = "green-signal", icon = "__UsefulCombinators__/graphics/icons/signal/green-signal.png", subgroup = "virtual-signal", order = "u[green]" }, { type = "virtual-signal", name = "cyan-signal", icon = "__UsefulCombinators__/graphics/icons/signal/cyan-signal.png", subgroup = "virtual-signal", order = "u[cyan]" }, { type = "virtual-signal", name = "blue-signal", icon = "__UsefulCombinators__/graphics/icons/signal/blue-signal.png", subgroup = "virtual-signal", order = "u[blue]" }, { type = "virtual-signal", name = "magenta-signal", icon = "__UsefulCombinators__/graphics/icons/signal/magenta-signal.png", subgroup = "virtual-signal", order = "u[magenta]" }, { type = "virtual-signal", name = "white-signal", icon = "__UsefulCombinators__/graphics/icons/signal/white-signal.png", subgroup = "virtual-signal", order = "u[white]" } })
mit
The-HalcyonDays/darkstar
scripts/zones/Pashhow_Marshlands/npcs/Cavernous_Maw.lua
29
1512
----------------------------------- -- Area: Pashhow Marshlands -- NPC: Cavernous Maw -- @pos 418 25 27 109 -- Teleports Players to Pashhow Marshlands [S] ----------------------------------- package.loaded["scripts/zones/Pashhow_Marshlands/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/keyitems"); require("scripts/globals/teleports"); require("scripts/globals/campaign"); require("scripts/zones/Pashhow_Marshlands/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) if (ENABLE_WOTG == 1 and player:hasKeyItem(PURE_WHITE_FEATHER) and hasMawActivated(player,4)) then player:startEvent(0x0389); else player:messageSpecial(NOTHING_HAPPENS); end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish Action ----------------------------------- function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if (csid == 0x0389 and option == 1) then toMaw(player,15); end end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/globals/mobskills/Tail_Crush.lua
25
1026
--------------------------------------------- -- Tail Crush -- -- Description: Smashes a single target with its tail. Additional effect: Poison -- Type: Physical -- Utsusemi/Blink absorb: 1 shadow -- Range: Melee -- Notes: --------------------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/monstertpmoves"); --------------------------------------------- function onMobSkillCheck(target,mob,skill) return 0; end; function onMobWeaponSkill(target, mob, skill) local numhits = 1; local accmod = 1; local dmgmod = 2.5; local info = MobPhysicalMove(mob,target,skill,numhits,accmod,dmgmod,TP_NO_EFFECT); local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,MOBSKILL_PHYSICAL,MOBPARAM_SLASH,info.hitslanded); local typeEffect = EFFECT_POISON; local power = mob:getMainLvl()/10 + 10; MobPhysicalStatusEffectMove(mob, target, skill, typeEffect, power, 3, 60); target:delHP(dmg); return dmg; end;
gpl-3.0
rgieseke/scintillua
lexers/glsl.lua
1
5668
-- Copyright 2006-2018 Mitchell mitchell.att.foicica.com. See LICENSE. -- GLSL LPeg lexer. local lexer = require('lexer') local token, word_match = lexer.token, lexer.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local lex = lexer.new('glsl', {inherit = lexer.load('cpp')}) -- Whitespace. lex:modify_rule('whitespace', token(lexer.WHITESPACE, lexer.space^1)) -- Keywords. lex:modify_rule('keyword', token(lexer.KEYWORD, word_match[[ attribute const in inout out uniform varying invariant centroid flat smooth noperspective layout patch sample subroutine lowp mediump highp precision -- Macros. __VERSION__ __LINE__ __FILE__ ]]) + lex:get_rule('keyword')) -- Types. lex:modify_rule('type', token(lexer.TYPE, S('bdiu')^-1 * 'vec' * R('24') + P('d')^-1 * 'mat' * R('24') * ('x' * R('24')^-1) + S('iu')^-1 * 'sampler' * R('13') * 'D' + 'sampler' * R('12') * 'D' * P('Array')^-1 * 'Shadow' + S('iu')^-1 * 'sampler' * (R('12') * 'DArray' + word_match[[ Cube 2DRect Buffer 2DMS 2DMSArray 2DMSCubeArray ]]) + word_match[[ samplerCubeShadow sampler2DRectShadow samplerCubeArrayShadow ]]) + lex:get_rule('type') + -- Functions. token(lexer.FUNCTION, word_match[[ radians degrees sin cos tan asin acos atan sinh cosh tanh asinh acosh atanh pow exp log exp2 log2 sqrt inversesqrt abs sign floor trunc round roundEven ceil fract mod modf min max clamp mix step smoothstep isnan isinf floatBitsToInt floatBitsToUint intBitsToFloat uintBitsToFloat fma frexp ldexp packUnorm2x16 packUnorm4x8 packSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 unpackSnorm4x8 packDouble2x32 unpackDouble2x32 length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult outerProduct transpose determinant inverse lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not uaddCarry usubBorrow umulExtended imulExtended bitfieldExtract bitfildInsert bitfieldReverse bitCount findLSB findMSB textureSize textureQueryLOD texture textureProj textureLod textureOffset texelFetch texelFetchOffset textureProjOffset textureLodOffset textureProjLod textureProjLodOffset textureGrad textureGradOffset textureProjGrad textureProjGradOffset textureGather textureGatherOffset texture1D texture2D texture3D texture1DProj texture2DProj texture3DProj texture1DLod texture2DLod texture3DLod texture1DProjLod texture2DProjLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth interpolateAtCentroid interpolateAtSample interpolateAtOffset noise1 noise2 noise3 noise4 EmitStreamVertex EndStreamPrimitive EmitVertex EndPrimitive barrier ]]) + -- Variables. token(lexer.VARIABLE, word_match[[ gl_VertexID gl_InstanceID gl_Position gl_PointSize gl_ClipDistance gl_PrimitiveIDIn gl_InvocationID gl_PrimitiveID gl_Layer gl_PatchVerticesIn gl_TessLevelOuter gl_TessLevelInner gl_TessCoord gl_FragCoord gl_FrontFacing gl_PointCoord gl_SampleID gl_SamplePosition gl_FragColor gl_FragData gl_FragDepth gl_SampleMask gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_Color gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord ]]) + -- Constants. token(lexer.CONSTANT, word_match[[ gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVaryingComponents gl_MaxVertexOutputComponents gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxFragmentInputComponents gl_MaxVertexTextureImageUnits gl_MaxCombinedTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxDrawBuffers gl_MaxClipDistances gl_MaxGeometryTextureImageUnits gl_MaxGeometryOutputVertices gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlUniformComponents gl_MaxTessControlTotalOutputComponents gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessPatchComponents gl_MaxPatchVertices gl_MaxTessGenLevel gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxClipPlanes gl_DepthRange gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixInverse gl_ModelViewMatrixTranspose gl_ProjectionMatrixTranspose gl_ModelViewProjectionMatrixTranspose gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_FrontLightProduct gl_BackLightProduct gl_TextureEnvColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_ObjectPlaneS gl_ObjectPlaneT gl_ObjectPlaneR gl_ObjectPlaneQ gl_Fog ]])) return lex
mit
zhaozg/luvit
deps/http-codec.lua
2
9174
--[[ Copyright 2014-2015 The Luvit Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --]] --[[lit-meta name = "luvit/http-codec" version = "2.0.5" homepage = "https://github.com/luvit/luvit/blob/master/deps/http-codec.lua" description = "A simple pair of functions for converting between hex and raw strings." tags = {"codec", "http"} license = "Apache 2" author = { name = "Tim Caswell" } ]] local sub = string.sub local gsub = string.gsub local lower = string.lower local find = string.find local format = string.format local concat = table.concat local match = string.match local STATUS_CODES = { [100] = 'Continue', [101] = 'Switching Protocols', [102] = 'Processing', -- RFC 2518, obsoleted by RFC 4918 [200] = 'OK', [201] = 'Created', [202] = 'Accepted', [203] = 'Non-Authoritative Information', [204] = 'No Content', [205] = 'Reset Content', [206] = 'Partial Content', [207] = 'Multi-Status', -- RFC 4918 [300] = 'Multiple Choices', [301] = 'Moved Permanently', [302] = 'Moved Temporarily', [303] = 'See Other', [304] = 'Not Modified', [305] = 'Use Proxy', [307] = 'Temporary Redirect', [400] = 'Bad Request', [401] = 'Unauthorized', [402] = 'Payment Required', [403] = 'Forbidden', [404] = 'Not Found', [405] = 'Method Not Allowed', [406] = 'Not Acceptable', [407] = 'Proxy Authentication Required', [408] = 'Request Time-out', [409] = 'Conflict', [410] = 'Gone', [411] = 'Length Required', [412] = 'Precondition Failed', [413] = 'Request Entity Too Large', [414] = 'Request-URI Too Large', [415] = 'Unsupported Media Type', [416] = 'Requested Range Not Satisfiable', [417] = 'Expectation Failed', [418] = "I'm a teapot", -- RFC 2324 [422] = 'Unprocessable Entity', -- RFC 4918 [423] = 'Locked', -- RFC 4918 [424] = 'Failed Dependency', -- RFC 4918 [425] = 'Unordered Collection', -- RFC 4918 [426] = 'Upgrade Required', -- RFC 2817 [428] = 'Precondition Required', -- RFC 6585 [429] = 'Too Many Requests', -- RFC 6585 [431] = 'Request Header Fields Too Large', -- RFC 6585 [500] = 'Internal Server Error', [501] = 'Not Implemented', [502] = 'Bad Gateway', [503] = 'Service Unavailable', [504] = 'Gateway Time-out', [505] = 'HTTP Version not supported', [506] = 'Variant Also Negotiates', -- RFC 2295 [507] = 'Insufficient Storage', -- RFC 4918 [509] = 'Bandwidth Limit Exceeded', [510] = 'Not Extended', -- RFC 2774 [511] = 'Network Authentication Required' -- RFC 6585 } local function encoder() local mode local encodeHead, encodeRaw, encodeChunked function encodeHead(item) if not item or item == "" then return item elseif not (type(item) == "table") then error("expected a table but got a " .. type(item) .. " when encoding data") end local head, chunkedEncoding local version = item.version or 1.1 if item.method then local path = item.path assert(path and #path > 0, "expected non-empty path") head = { item.method .. ' ' .. item.path .. ' HTTP/' .. version .. '\r\n' } else local reason = item.reason or STATUS_CODES[item.code] or "Unknown reason" head = { 'HTTP/' .. version .. ' ' .. item.code .. ' ' .. reason .. '\r\n' } end for i = 1, #item do local key, value = unpack(item[i]) local lowerKey = lower(key) if lowerKey == "transfer-encoding" then chunkedEncoding = lower(value) == "chunked" end value = gsub(tostring(value), "[\r\n]+", " ") head[#head + 1] = key .. ': ' .. tostring(value) .. '\r\n' end head[#head + 1] = '\r\n' mode = chunkedEncoding and encodeChunked or encodeRaw return concat(head) end function encodeRaw(item) if type(item) ~= "string" then mode = encodeHead return encodeHead(item) end return item end function encodeChunked(item) if type(item) ~= "string" then mode = encodeHead local extra = encodeHead(item) if extra then return "0\r\n\r\n" .. extra else return "0\r\n\r\n" end end if #item == 0 then mode = encodeHead end return format("%x", #item) .. "\r\n" .. item .. "\r\n" end mode = encodeHead return function (item) return mode(item) end end local function decoder() -- This decoder is somewhat stateful with 5 different parsing states. local decodeHead, decodeEmpty, decodeRaw, decodeChunked, decodeCounted local mode -- state variable that points to various decoders local bytesLeft -- For counted decoder -- This state is for decoding the status line and headers. function decodeHead(chunk) if not chunk then return end local _, length = find(chunk, "\r?\n\r?\n", 1) -- First make sure we have all the head before continuing if not length then if #chunk < 8 * 1024 then return end -- But protect against evil clients by refusing heads over 8K long. error("entity too large") end -- Parse the status/request line local head = {} local _, offset local version _, offset, version, head.code, head.reason = find(chunk, "^HTTP/(%d%.%d) (%d+) ([^\r\n]*)\r?\n") if offset then head.code = tonumber(head.code) else _, offset, head.method, head.path, version = find(chunk, "^(%u+) ([^ ]+) HTTP/(%d%.%d)\r?\n") if not offset then error("expected HTTP data") end end version = tonumber(version) head.version = version head.keepAlive = version > 1.0 -- We need to inspect some headers to know how to parse the body. local contentLength local chunkedEncoding -- Parse the header lines while true do local key, value _, offset, key, value = find(chunk, "^([^:\r\n]+): *([^\r\n]*)\r?\n", offset + 1) if not offset then break end local lowerKey = lower(key) -- Inspect a few headers and remember the values if lowerKey == "content-length" then contentLength = tonumber(value) elseif lowerKey == "transfer-encoding" then chunkedEncoding = lower(value) == "chunked" elseif lowerKey == "connection" then head.keepAlive = lower(value) == "keep-alive" end head[#head + 1] = {key, value} end if head.keepAlive and (not (chunkedEncoding or (contentLength and contentLength > 0))) or (head.method == "GET" or head.method == "HEAD") then mode = decodeEmpty elseif chunkedEncoding then mode = decodeChunked elseif contentLength then bytesLeft = contentLength mode = decodeCounted elseif not head.keepAlive then mode = decodeRaw end return head, sub(chunk, length + 1) end -- This is used for inserting a single empty string into the output string for known empty bodies function decodeEmpty(chunk) mode = decodeHead return "", chunk or "" end function decodeRaw(chunk) if not chunk then return "", "" end if #chunk == 0 then return end return chunk, "" end function decodeChunked(chunk) local len, term len, term = match(chunk, "^(%x+)(..)") if not len then return end if term ~= "\r\n" then -- Wait for full chunk-size\r\n header if #chunk < 18 then return end -- But protect against evil clients by refusing chunk-sizes longer than 16 hex digits. error("chunk-size field too large") end local length = tonumber(len, 16) if #chunk < length + 4 + #len then return end if length == 0 then mode = decodeHead end chunk = sub(chunk, #len + 3) assert(sub(chunk, length + 1, length + 2) == "\r\n") return sub(chunk, 1, length), sub(chunk, length + 3) end function decodeCounted(chunk) if bytesLeft == 0 then mode = decodeEmpty return mode(chunk) end local length = #chunk -- Make sure we have at least one byte to process if length == 0 then return end if length >= bytesLeft then mode = decodeEmpty end -- If the entire chunk fits, pass it all through if length <= bytesLeft then bytesLeft = bytesLeft - length return chunk, "" end return sub(chunk, 1, bytesLeft), sub(chunk, bytesLeft + 1) end -- Switch between states by changing which decoder mode points to mode = decodeHead return function (chunk) return mode(chunk) end end return { encoder = encoder, decoder = decoder, }
apache-2.0
The-HalcyonDays/darkstar
scripts/globals/items/pot_of_honey.lua
35
1143
----------------------------------------- -- ID: 4370 -- Item: pot_of_honey -- Food Effect: 5Min, All Races ----------------------------------------- -- Magic Regen While Healing 1 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- -- OnItemCheck ----------------------------------------- function onItemCheck(target) local result = 0; if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then result = 246; end return result; end; ----------------------------------------- -- OnItemUse ----------------------------------------- function onItemUse(target) target:addStatusEffect(EFFECT_FOOD,0,0,300,4370); end; ----------------------------------- -- onEffectGain Action ----------------------------------- function onEffectGain(target,effect) target:addMod(MOD_MPHEAL, 1); end; ----------------------------------------- -- onEffectLose Action ----------------------------------------- function onEffectLose(target,effect) target:delMod(MOD_MPHEAL, 1); end;
gpl-3.0
johnd0e/FarManager
enc/tools/lua/lua/lxsh/lexers/bib.lua
3
2442
--[[ Lexer for BibTeX source code powered by LPeg. Authors: - Brendan O'Flaherty - Peter Odding Last Change: October 4, 2011 URL: http://peterodding.com/code/lua/lxsh/ TODO Comments?! ]] local lxsh = require 'lxsh' local lpeg = require 'lpeg' local P, R, S = lpeg.P, lpeg.R, lpeg.S local D = R'09' local I = R('AZ', 'az', '\127\255') + '_' local U, L = R'AZ', R'az' -- uppercase, lowercase local W = U + L -- case insensitive letter local A = W + D + '_' -- identifier local B = -(I + D) -- word boundary -- Create an LPeg pattern that matches a word case insensitively. local function ic(word) local pattern for chr in word:gmatch '.' do local uc, lc = chr:upper(), chr:lower() local p = (uc == lc) and lpeg.P(chr) or (lpeg.P(uc) + lpeg.P(lc)) pattern = pattern and (pattern * p) or p end return pattern end -- Create a lexer definition context. local context = lxsh.lexers.new 'bib' -- Pattern definitions start here. context:define('whitespace' , S'\r\n\f\t\v '^1) -- Entries. context:define('entry', '@' * (ic'booklet' + ic'article' + ic'book' + ic'conference' + ic'inbook' + ic'incollection' + ic'inproceedings' + ic'manual' + ic'mastersthesis' + ic'lambda' + ic'misc' + ic'phdthesis' + ic'proceedings' + ic'techreport' + ic'unpublished') * B) -- Fields. context:define('field', (ic'author' + ic'title' + ic'journal' + ic'year' + ic'volume' + ic'number' + ic'pages' + ic'month' + ic'note' + ic'key' + ic'publisher' + ic'editor' + ic'series' + ic'address' + ic'edition' + ic'howpublished' + ic'booktitle' + ic'organization' + ic'chapter' + ic'school' + ic'institution' + ic'type' + ic'isbn' + ic'issn' + ic'affiliation' + ic'issue' + ic'keyword' + ic'url') * B) context:define('identifier', (W + '_') * A^0) -- Character and string literals. context:define('string', '"' * ((1 - P'"'))^0 * '"') -- Numbers (matched before operators because .1 is a number). local int = ('0' + (D^1)) * S'lL'^-2 local flt = ((D^1 * '.' * D^0 + D^0 * '.' * D^1 + D^1 * 'e' * D^1) * S'fF'^-1) + D^1 * S'fF' context:define('number', flt + int) -- Operators. context:define('operator', '=') -- Delimiters. context:define('delimiter', S',{}') -- Define an `error' token kind that consumes one character and enables -- the lexer to resume as a last resort for dealing with unknown input. context:define('error', 1) return context:compile() -- vim: ts=2 sw=2 et
bsd-3-clause
The-HalcyonDays/darkstar
scripts/globals/spells/pyrohelix.lua
22
1717
-------------------------------------- -- Spell: Pyrohelix -- Deals fire damage that gradually reduces -- a target's HP. Damage dealt is greatly affected by the weather. -------------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/magic"); ----------------------------------------- -- OnSpellCast ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0; end; function onSpellCast(caster,target,spell) --get helix acc/att merits local merit = caster:getMerit(MERIT_HELIX_MAGIC_ACC_ATT); --calculate raw damage local dmg = calculateMagicDamage(35,1,caster,spell,target,ELEMENTAL_MAGIC_SKILL,MOD_INT,false); dmg = dmg + caster:getMod(MOD_HELIX_EFFECT); --get resist multiplier (1x if no resist) local resist = applyResistance(caster,spell,target,caster:getStat(MOD_INT)-target:getStat(MOD_INT),ELEMENTAL_MAGIC_SKILL,merit*3); --get the resisted damage. dmg = dmg*resist; --add on bonuses (staff/day/weather/jas/mab/etc all go in this function) dmg = addBonuses(caster,spell,target,dmg,merit*2); --add in target adjustment dmg = adjustForTarget(target,dmg,spell:getElement()); local dot = dmg; --add in final adjustments dmg =finalMagicAdjustments(caster,target,spell,dmg); -- calculate Damage over time dot = target:magicDmgTaken(dot); utils.clamp(dot, 0, 99999); local duration = getHelixDuration(caster) + caster:getMod(MOD_HELIX_DURATION); duration = duration * (resist/2); target:addStatusEffect(EFFECT_HELIX,dot,3,duration); return dmg; end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/zones/Palborough_Mines/npcs/_3z9.lua
19
1592
----------------------------------- -- Area: Palborough Mines -- NPC: Refiner Lever -- Involved In Mission: Journey Abroad -- @zone 143 -- @pos 180 -32 167 ----------------------------------- package.loaded["scripts/zones/Palborough_Mines/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/zones/Palborough_Mines/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) refiner_output = player:getVar("refiner_output"); if(refiner_output > 0 and player:getFreeSlotsCount() >= 1) then player:setVar("refiner_output",refiner_output - 1) player:messageSpecial(SOMETHING_FALLS_OUT_OF_THE_MACHINE); player:addItem(599); player:messageSpecial(ITEM_OBTAINED,599,1); elseif(refiner_output > 0 and player:getFreeSlotsCount() == 0) then player:messageSpecial(YOU_CANT_CARRY_ANY_MORE_ITEMS); else player:messageSpecial(THE_MACHINE_SEEMS_TO_BE_WORKING); end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end;
gpl-3.0
NAM-IL/VLC-2_2_0
share/lua/intf/dumpmeta.lua
98
2125
--[==========================================================================[ dumpmeta.lua: dump a file's meta data on stdout/stderr --[==========================================================================[ Copyright (C) 2010 the VideoLAN team $Id$ Authors: Antoine Cellerier <dionoea at videolan dot org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. --]==========================================================================] --[[ to dump meta data information in the debug output, run: vlc -I luaintf --lua-intf dumpmeta coolmusic.mp3 Additional options can improve performance and output readability: -V dummy -A dummy --no-video-title --no-media-library -q --]] local item repeat item = vlc.input.item() until (item and item:is_preparsed()) -- preparsing doesn't always provide all the information we want (like duration) repeat until item:stats()["demux_read_bytes"] > 0 vlc.msg.info("name: "..item:name()) vlc.msg.info("uri: "..vlc.strings.decode_uri(item:uri())) vlc.msg.info("duration: "..tostring(item:duration())) vlc.msg.info("meta data:") local meta = item:metas() if meta then for key, value in pairs(meta) do vlc.msg.info(" "..key..": "..value) end else vlc.msg.info(" no meta data available") end vlc.msg.info("info:") for cat, data in pairs(item:info()) do vlc.msg.info(" "..cat) for key, value in pairs(data) do vlc.msg.info(" "..key..": "..value) end end vlc.misc.quit()
lgpl-2.1
Amaz1/interact
rules.lua
1
1364
--The actual rules. interact.rules = [[ Rules: 1. No griefing. 2. No hacked clients. 3. No swearing or insults towards other players. 4. No family roleplay. 5. No dating. 6. Do not ask for more privs, or to be an admin. Also do not ask for items. 7. PVP is not allowed. ]] --The questions on the rules, if the quiz is used. --The checkboxes for the first 4 questions are in config.lua interact.s4_question1 = "Is PVP is allowed?" interact.s4_question2 = "Is family roleplay allowed?" interact.s4_question3 = "Should you be nice to all players?" interact.s4_question4 = "Should you ask for all the privs you can?" interact.s4_multi_question = "Which of these is a rule?" --The answers to the multiple choice questions. Only one of these should be true. interact.s4_multi1 = "No griefing!" interact.s4_multi2 = "PVP is allowed." interact.s4_multi3 = "Be rude to other players." --Which answer is needed for the quiz questions. interact.quiz1-4 takes true or false. --True is left, false is right. --Please, please spell true and false right!!! If you spell it wrong it won't work! --interact.quiz can be 1, 2 or 3. --1 is the top one by the question, 2 is the bottom left one, 3 is the bottom right one. --Make sure these agree with your answers! interact.quiz1 = false interact.quiz2 = false interact.quiz3 = true interact.quiz4 = false interact.quiz_multi = 1
mit
The-HalcyonDays/darkstar
scripts/zones/Port_Windurst/npcs/Sattsuh_Ahkanpari.lua
36
1598
----------------------------------- -- Area: Port Windurst -- NPC: Sattsuh Ahkanpari -- Regional Marchant NPC -- Only sells when Windurst controlls Elshimo Uplands -- Confirmed shop stock, August 2013 ----------------------------------- require("scripts/globals/shop"); require("scripts/globals/conquest"); package.loaded["scripts/zones/Port_Windurst/TextIDs"] = nil; require("scripts/zones/Port_Windurst/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) RegionOwner = GetRegionOwner(ELSHIMOUPLANDS); if (RegionOwner ~= WINDURST) then player:showText(npc,SATTSUHAHKANPARI_CLOSED_DIALOG); else player:showText(npc,SATTSUHAHKANPARI_OPEN_DIALOG); stock = { 0x0585, 1656, --Cattleya 0x0274, 239, --Cinnamon 0x1174, 73, --Pamamas 0x02d1, 147 --Rattan Lumber } showShop(player,WINDURST,stock); end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/zones/Inner_Horutoto_Ruins/npcs/_5cr.lua
17
2435
----------------------------------- -- Area: Inner Horutoto Ruins -- NPC: _5cr (Magical Gizmo) #3 -- Involved In Mission: The Horutoto Ruins Experiment ----------------------------------- package.loaded["scripts/zones/Inner_Horutoto_Ruins/TextIDs"] = nil; ----------------------------------- require("scripts/globals/missions"); require("scripts/zones/Inner_Horutoto_Ruins/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) -- The Magical Gizmo Number, this number will be compared to the random -- value created by the mission The Horutoto Ruins Experiment, when you -- reach the Gizmo Door and have the cutscene local magical_gizmo_no = 3; -- of the 6 -- Check if we are on Windurst Mission 1-1 if(player:getCurrentMission(WINDURST) == THE_HORUTOTO_RUINS_EXPERIMENT and player:getVar("MissionStatus") == 2) then -- Check if we found the correct Magical Gizmo or not if(player:getVar("MissionStatus_rv") == magical_gizmo_no) then player:startEvent(0x0034); else if(player:getVar("MissionStatus_op3") == 2) then -- We've already examined this player:messageSpecial(EXAMINED_RECEPTACLE); else -- Opened the wrong one player:startEvent(0x0035); end end end return 1; end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); -- If we just finished the cutscene for Windurst Mission 1-1 -- The cutscene that we opened the correct Magical Gizmo if(csid == 0x0034) then player:setVar("MissionStatus",3); player:setVar("MissionStatus_rv", 0); player:addKeyItem(CRACKED_MANA_ORBS); player:messageSpecial(KEYITEM_OBTAINED,CRACKED_MANA_ORBS); elseif(csid == 0x0035) then -- Opened the wrong one player:setVar("MissionStatus_op3", 2); -- Give the message that thsi orb is not broken player:messageSpecial(NOT_BROKEN_ORB); end end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/globals/spells/Vital_Etude.lua
11
1611
----------------------------------------- -- Spell: Vital Etude -- Static VIT Boost, BRD 70 ----------------------------------------- require("scripts/globals/status"); require("scripts/globals/magic"); ----------------------------------------- -- OnSpellCast ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0; end; function onSpellCast(caster,target,spell) local sLvl = caster:getSkillLevel(SKILL_SNG); -- Gets skill level of Singing local iLvl = caster:getWeaponSkillLevel(SLOT_RANGED); local power = 0; if (sLvl+iLvl <= 416) then power = 12; elseif((sLvl+iLvl >= 417) and (sLvl+iLvl <= 445)) then power = 13; elseif((sLvl+iLvl >= 446) and (sLvl+iLvl <= 474)) then power = 14; elseif(sLvl+iLvl >= 475) then power = 15; end local iBoost = caster:getMod(MOD_ETUDE_EFFECT) + caster:getMod(MOD_ALL_SONGS_EFFECT); power = power + iBoost; if (caster:hasStatusEffect(EFFECT_SOUL_VOICE)) then power = power * 2; elseif (caster:hasStatusEffect(EFFECT_MARCATO)) then power = power * 1.5; end caster:delStatusEffect(EFFECT_MARCATO); local duration = 120; duration = duration * ((iBoost * 0.1) + (caster:getMod(MOD_SONG_DURATION_BONUS)/100) + 1); if (caster:hasStatusEffect(EFFECT_TROUBADOUR)) then duration = duration * 2; end if not (target:addBardSong(caster,EFFECT_ETUDE,power,10,duration,caster:getID(), MOD_VIT, 2)) then spell:setMsg(75); end return EFFECT_ETUDE; end;
gpl-3.0
ccw808/mtasa-blue
vendor/pthreads/premake5.lua
4
1320
project "pthread" language "C++" kind "SharedLib" targetname "pthread" targetdir(buildpath("server")) includedirs { "include" } vpaths { ["Headers"] = "**.h", ["Sources"] = "**.c", ["*"] = "premake5.lua" } files { "premake5.lua", "include/pthread.c", "include/config.h", "include/context.h", "include/implement.h", "include/need_errno.h", "include/pthread.h", "include/sched.h", "include/semaphore.h", } filter {"system:windows", "platforms:x86"} postbuildcommands { copy "mta" } filter {"system:windows", "platforms:x86", "configurations:Debug"} postbuildcommands { -- Fix net(c).dll requiring the release build "copy \"%{wks.location}..\\Bin\\server\\pthread_d.dll\" \"%{wks.location}..\\Bin\\mta\\pthread.dll\"", "copy \"%{wks.location}..\\Bin\\server\\pthread_d.dll\" \"%{wks.location}..\\Bin\\server\\pthread.dll\"" } filter {"system:windows", "platforms:x64", "configurations:Debug"} postbuildcommands { -- Fix net.dll requiring the release build "copy \"%{wks.location}..\\Bin\\server\\x64\\pthread_d.dll\" \"%{wks.location}..\\Bin\\server\\x64\\pthread.dll\"" } filter {"system:windows", "platforms:x64"} targetdir(buildpath("server/x64")) filter "system:windows" defines { "HAVE_PTW32_CONFIG_H", "PTW32_BUILD_INLINED" }
gpl-3.0
angeloc/sysdig
userspace/sysdig/chisels/spy_syslog.lua
3
5814
--[[ Copyright (C) 2013-2018 Draios Inc dba Sysdig. This file is part of sysdig. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --]] -- Chisel description description = "Print every message written to syslog by any process. You can combine this chisel with filters like 'proc.name=foo' (to restrict the output to a specific process), or 'syslog.message contains foo' (to show only messages including a specific string). You can also write the events generated around each log entry to file by using the dump_file_name and dump_range_ms arguments."; short_description = "Print every message written to syslog. Optionally, export the events around each syslog message to file."; category = "Logs"; -- Argument list args = { { name = "dump_file_name", description = "The name of the file where the chisel will write the events related to each syslog entry.", argtype = "string", optional = true }, { name = "dump_range_ms", description = "The time interval to capture *before* and *after* each event, in milliseconds. For example, 500 means that 1 second around each displayed event (.5s before and .5s after) will be saved to <dump_file_name>. The default value for dump_range_ms is 1000.", argtype = "int", optional = true }, { name = "disable_color", description = "Set to 'disable_colors' if you want to disable color output", argtype = "string", optional = true }, } -- Imports and globals require "common" terminal = require "ansiterminal" terminal.enable_color(true) local do_dump = false local dump_file_name = nil local dump_range_ms = "1000" local entrylist = {} local capturing = false -- Argument notification callback function on_set_arg(name, val) if name == "dump_file_name" then do_dump = true dump_file_name = val return true elseif name == "dump_range_ms" then dump_range_ms = val return true elseif name == "disable_color" and val == "disable_color" then terminal.enable_color(false) return true end return false end -- Initialization callback function on_init() -- Request the fields that we need ffac = chisel.request_field("syslog.facility.str") fsev = chisel.request_field("syslog.severity.str") fsevcode = chisel.request_field("syslog.severity") fmsg = chisel.request_field("syslog.message") ftid = chisel.request_field("thread.tid") fpname = chisel.request_field("proc.name") fcontainername = chisel.request_field("container.name") fcontainerid = chisel.request_field("container.id") -- The -pc or -pcontainer options was supplied on the cmd line print_container = sysdig.is_print_container_data() -- increase the snaplen so we capture more of the conversation sysdig.set_snaplen(1000) -- set the filter chisel.set_filter("fd.name contains /dev/log and evt.is_io_write=true and evt.dir=< and evt.failed=false") is_tty = sysdig.is_tty() return true end -- Final chisel initialization function on_capture_start() if do_dump then if sysdig.is_live() then print("events export not supported on live captures") return false end end capturing = true return true end -- Event parsing callback function on_event() local color = "" -- Extract the event details local fac = evt.field(ffac) local sev = evt.field(fsev) local msg = evt.field(fmsg) local sevcode = evt.field(fsevcode) local tid = evt.field(ftid) local pname = evt.field(fpname) local containername = evt.field(fcontainername) local containerid = evt.field(fcontainerid) -- Render the message to screen if is_tty then local color = terminal.green if sevcode == 4 then color = terminal.yellow elseif sevcode < 4 then color = terminal.red elseif containername ~= "host" then -- If -pc or -pcontainer option change default to blue color = terminal.blue else color = terminal.green end -- The -pc or -pcontainer options was supplied on the cmd line if print_container then infostr = string.format("%s%-20s %-20s %s.%s %s[%u] %s", color, containerid, containername, fac, sev, pname, tid, msg) else infostr = string.format("%s%s.%s %s[%u] %s", color, fac, sev, pname, tid, msg) end else if print_container then infostr = string.format("%-20s %-20s %s.%s %s[%u] %s", fac, containerid, containername, sev, pname, tid, msg) else infostr = string.format("%s.%s %s[%u] %s", fac, sev, pname, tid, msg) end end print(infostr) if do_dump then local hi, low = evt.get_ts() table.insert(entrylist, {hi, low, tid}) end return true end -- Called by the engine at the end of the capture (Ctrl-C) function on_capture_end() if is_tty then print(terminal.reset) end if do_dump then if capturing then local sn = sysdig.get_evtsource_name() local args = "-F -r" .. sn .. " -w" .. dump_file_name .. " " for i, v in ipairs(entrylist) do if i ~= 1 then args = args .. " or " end args = args .. "(evt.around[" .. ts_to_str(v[1], v[2]) .. "]=" .. dump_range_ms .. " and thread.tid=" .. v[3] .. ")" end print("Writing events for " .. #entrylist .. " log entries") sysdig.run_sysdig(args) end end end
apache-2.0
The-HalcyonDays/darkstar
scripts/zones/Aht_Urhgan_Whitegate/npcs/Kabihyam.lua
34
1033
----------------------------------- -- Area: Aht Urhgan Whitegate -- NPC: Kabihyam -- Standard Info NPC ----------------------------------- package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) player:startEvent(0x00F5); end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end;
gpl-3.0
NAM-IL/VLC-2_2_0
share/lua/playlist/pluzz.lua
105
3740
--[[ $Id$ Copyright © 2011 VideoLAN Authors: Ludovic Fauvet <etix at l0cal dot com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. --]] -- Probe function. function probe() return vlc.access == "http" and string.match( vlc.path, "pluzz.fr/%w+" ) or string.match( vlc.path, "info.francetelevisions.fr/.+") or string.match( vlc.path, "france4.fr/%w+") end -- Helpers function key_match( line, key ) return string.match( line, "name=\"" .. key .. "\"" ) end function get_value( line ) local _,_,r = string.find( line, "content=\"(.*)\"" ) return r end -- Parse function. function parse() p = {} if string.match ( vlc.path, "www.pluzz.fr/%w+" ) then while true do line = vlc.readline() if not line then break end if string.match( line, "id=\"current_video\"" ) then _,_,redirect = string.find (line, "href=\"(.-)\"" ) print ("redirecting to: " .. redirect ) return { { path = redirect } } end end end if string.match ( vlc.path, "www.france4.fr/%w+" ) then while true do line = vlc.readline() if not line then break end -- maybe we should get id from tags having video/cappuccino type instead if string.match( line, "id=\"lavideo\"" ) then _,_,redirect = string.find (line, "href=\"(.-)\"" ) print ("redirecting to: " .. redirect ) return { { path = redirect } } end end end if string.match ( vlc.path, "info.francetelevisions.fr/.+" ) then title = "" arturl = "http://info.francetelevisions.fr/video-info/player_sl/Images/PNG/gene_ftv.png" while true do line = vlc.readline() if not line then break end -- Try to find the video's path if key_match( line, "urls--url--video" ) then video = get_value( line ) end -- Try to find the video's title if key_match( line, "vignette--titre--court" ) then title = get_value( line ) title = vlc.strings.resolve_xml_special_chars( title ) print ("playing: " .. title ) end -- Try to find the video's thumbnail if key_match( line, "vignette" ) then arturl = get_value( line ) if not string.match( line, "http://" ) then arturl = "http://info.francetelevisions.fr/" .. arturl end end end if video then -- base url is hardcoded inside a js source file -- see http://www.pluzz.fr/layoutftv/arches/common/javascripts/jquery.player-min.js base_url = "mms://a988.v101995.c10199.e.vm.akamaistream.net/7/988/10199/3f97c7e6/ftvigrp.download.akamai.com/10199/cappuccino/production/publication/" table.insert( p, { path = base_url .. video; name = title; arturl = arturl; } ) end end return p end
lgpl-2.1
The-HalcyonDays/darkstar
scripts/globals/spells/bluemagic/death_ray.lua
9
1601
----------------------------------------- -- Spell: Death Ray -- Deals dark damage to an enemy -- Spell cost: 49 MP -- Monster Type: Amorphs -- Spell Type: Magical (Dark) -- Blue Magic Points: 2 -- Stat Bonus: HP-5, MP+5 -- Level: 34 -- Casting Time: 4.5 seconds -- Recast Time: 29.25 seconds -- Magic Bursts on: Compression, Gravitation, Darkness -- Combos: None ----------------------------------------- require("scripts/globals/magic"); require("scripts/globals/status"); require("scripts/globals/bluemagic"); ----------------------------------------- -- OnMagicCastingCheck ----------------------------------------- function onMagicCastingCheck(caster,target,spell) return 0; end; ----------------------------------------- -- OnSpellCast ----------------------------------------- function onSpellCast(caster,target,spell) local params = {}; -- This data should match information on http://wiki.ffxiclopedia.org/wiki/Calculating_Blue_Magic_Damage local multi = 1.625; if(caster:hasStatusEffect(EFFECT_AZURE_LORE)) then multi = multi + 2.0; end params.multiplier = multi; params.tMultiplier = 1.0; params.duppercap = 51; params.str_wsc = 0.0; params.dex_wsc = 0.0; params.vit_wsc = 0.0; params.agi_wsc = 0.0; params.int_wsc = 0.2; params.mnd_wsc = 0.1; params.chr_wsc = 0.0; damage = BlueMagicalSpell(caster, target, spell, params, INT_BASED); damage = BlueFinalAdjustments(caster, target, spell, damage, params); return damage; end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/zones/Port_Bastok/npcs/Ronan.lua
19
2559
----------------------------------- -- Area: Port Bastok -- NPC: Ronan -- Start & Finishes Quest: Out of One's Shell ----------------------------------- package.loaded["scripts/zones/Port_Bastok/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/titles"); require("scripts/globals/quests"); require("scripts/zones/Port_Bastok/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) if(player:getQuestStatus(BASTOK,OUT_OF_ONE_S_SHELL) == QUEST_ACCEPTED and player:getVar("OutOfOneShell") == 0) then if(trade:hasItemQty(17397,3) and trade:getItemCount() == 3) then player:startEvent(0x0054); end end end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) OutOfOneShell = player:getQuestStatus(BASTOK,OUT_OF_ONE_S_SHELL); if(OutOfOneShell == QUEST_ACCEPTED and player:getVar("OutOfOneShell") == 1) then if(player:needToZone()) then player:startEvent(0x0055); else player:startEvent(0x0056); end elseif(OutOfOneShell == QUEST_ACCEPTED) then player:showText(npc,RONAN_DIALOG_1); elseif(OutOfOneShell == QUEST_COMPLETED) then player:startEvent(0x0059); elseif(player:getQuestStatus(BASTOK,THE_QUADAV_S_CURSE) == QUEST_COMPLETED and player:getFameLevel(BASTOK) >= 2) then player:startEvent(0x0052); else player:startEvent(0x0025); end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); if(csid == 0x0052) then player:addQuest(BASTOK,OUT_OF_ONE_S_SHELL); elseif(csid == 0x0054) then player:needToZone(true); player:setVar("OutOfOneShell",1); player:tradeComplete(); elseif(csid == 0x0056) then if(player:getFreeSlotsCount() >= 1) then player:addTitle(SHELL_OUTER); player:setVar("OutOfOneShell",0); player:addItem(12501); player:messageSpecial(ITEM_OBTAINED,12501); player:addFame(BASTOK,BAS_FAME*120); player:completeQuest(BASTOK,OUT_OF_ONE_S_SHELL); else player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,12501); end end end;
gpl-3.0
shahabsaf1/beni-dalton
plugins/stats.lua
24
3698
do local NUM_MSG_MAX = 1 local TIME_CHECK = 1 -- seconds local function user_print_name(user) if user.print_name then return user.print_name end local text = '' if user.first_name then text = user.last_name..' ' end if user.lastname then text = text..user.last_name end return text end -- 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 = '' 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 pre_process(msg) -- Ignore service msg if msg.service then print('Service message') return msg end -- Save user on Redis if msg.from.type == 'user' then local hash = 'user:'..msg.from.id print('Saving user', hash) if msg.from.print_name then redis:hset(hash, 'print_name', msg.from.print_name) end if msg.from.first_name then redis:hset(hash, 'first_name', msg.from.first_name) end if msg.from.last_name then redis:hset(hash, 'last_name', msg.from.last_name) end end -- Save stats on Redis if msg.to.type == 'chat' then -- User is on chat local hash = 'chat:'..msg.to.id..':users' redis:sadd(hash, msg.from.id) end -- Total user msgs local hash = 'msgs:'..msg.from.id..':'..msg.to.id redis:incr(hash) -- Check flood local kick = chat_del_user(chat_id , user_id, ok_cb, true) vardump(kick) if msg.from.type == 'user' then local hash = 'user:'..msg.from.id..':msgs' local msgs = tonumber(redis:get(hash) or 0) if msgs > NUM_MSG_MAX then chat_del_user('chat#id'..msg.to.id,'user#id'..msg.from.id,ok_cb,false) print('User '..msg.from.id..'is flooding '..msgs) msg = nil end redis:setex(hash, TIME_CHECK, msgs+1) end return msg end 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..'\nChats: '..r return text end local function run(msg, matches) if matches[1]:lower() == "stats" then if not matches[2] then if msg.to.type == 'chat' then local chat_id = msg.to.id return chat_stats(chat_id) else return 'Stats works only on chats' end end if matches[2] == "bot" then if not is_sudo(msg) then return "Bot stats requires privileged user" else return bot_stats() end end if matches[2] == "chat" then if not is_sudo(msg) then return "This command requires privileged user" else return chat_stats(matches[3]) end end end end return { description = "Plugin to update user stats.", usage = { "!stats: Returns a list of Username [telegram_id]: msg_num", "!stats chat <chat_id>: Show stats for chat_id", "!stats bot: Shows bot stats (sudo users)" }, patterns = { "^!([Ss]tats)$", "^!([Ss]tats) (chat) (%d+)", "^!([Ss]tats) (bot)" }, run = run, pre_process = pre_process } end
gpl-2.0
hxw804781317/MT7620N
package/ralink/ui/luci-mtk/src/applications/luci-ahcp/luasrc/model/cbi/ahcp.lua
36
3895
--[[ LuCI - Lua Configuration Interface Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id: init.lua 5764 2010-03-08 19:05:34Z jow $ ]]-- m = Map("ahcpd", translate("AHCP Server"), translate("AHCP is an autoconfiguration protocol " .. "for IPv6 and dual-stack IPv6/IPv4 networks designed to be used in place of router " .. "discovery or DHCP on networks where it is difficult or impossible to configure a " .. "server within every link-layer broadcast domain, for example mobile ad-hoc networks.")) m:section(SimpleSection).template = "ahcp_status" s = m:section(TypedSection, "ahcpd") s:tab("general", translate("General Setup")) s:tab("advanced", translate("Advanced Settings")) s.addremove = false s.anonymous = true mode = s:taboption("general", ListValue, "mode", translate("Operation mode")) mode:value("server", translate("Server")) mode:value("forwarder", translate("Forwarder")) net = s:taboption("general", Value, "interface", translate("Served interfaces")) net.template = "cbi/network_netlist" net.widget = "checkbox" net.nocreate = true function net.cfgvalue(self, section) return m.uci:get("ahcpd", section, "interface") end pfx = s:taboption("general", DynamicList, "prefix", translate("Announced prefixes"), translate("Specifies the announced IPv4 and IPv6 network prefixes in CIDR notation")) pfx.optional = true pfx.datatype = "ipaddr" pfx:depends("mode", "server") nss = s:taboption("general", DynamicList, "name_server", translate("Announced DNS servers"), translate("Specifies the announced IPv4 and IPv6 name servers")) nss.optional = true nss.datatype = "ipaddr" nss:depends("mode", "server") ntp = s:taboption("general", DynamicList, "ntp_server", translate("Announced NTP servers"), translate("Specifies the announced IPv4 and IPv6 NTP servers")) ntp.optional = true ntp.datatype = "ipaddr" ntp:depends("mode", "server") mca = s:taboption("general", Value, "multicast_address", translate("Multicast address")) mca.optional = true mca.placeholder = "ff02::cca6:c0f9:e182:5359" mca.datatype = "ip6addr" port = s:taboption("general", Value, "port", translate("Port")) port.optional = true port.placeholder = 5359 port.datatype = "port" fam = s:taboption("general", ListValue, "_family", translate("Protocol family")) fam:value("", translate("IPv4 and IPv6")) fam:value("ipv4", translate("IPv4 only")) fam:value("ipv6", translate("IPv6 only")) function fam.cfgvalue(self, section) local v4 = m.uci:get_bool("ahcpd", section, "ipv4_only") local v6 = m.uci:get_bool("ahcpd", section, "ipv6_only") if v4 then return "ipv4" elseif v6 then return "ipv6" end return "" end function fam.write(self, section, value) if value == "ipv4" then m.uci:set("ahcpd", section, "ipv4_only", "true") m.uci:delete("ahcpd", section, "ipv6_only") elseif value == "ipv6" then m.uci:set("ahcpd", section, "ipv6_only", "true") m.uci:delete("ahcpd", section, "ipv4_only") end end function fam.remove(self, section) m.uci:delete("ahcpd", section, "ipv4_only") m.uci:delete("ahcpd", section, "ipv6_only") end ltime = s:taboption("general", Value, "lease_time", translate("Lease validity time")) ltime.optional = true ltime.placeholder = 3666 ltime.datatype = "uinteger" ld = s:taboption("advanced", Value, "lease_dir", translate("Lease directory")) ld.datatype = "directory" ld.placeholder = "/var/lib/leases" id = s:taboption("advanced", Value, "id_file", translate("Unique ID file")) --id.datatype = "file" id.placeholder = "/var/lib/ahcpd-unique-id" log = s:taboption("advanced", Value, "log_file", translate("Log file")) --log.datatype = "file" log.placeholder = "/var/log/ahcpd.log" return m
gpl-2.0
Jereviendrai/telegram-bot
plugins/giphy.lua
1
1782
-- Idea by https://github.com/asdofindia/telegram-bot/ -- See http://api.giphy.com/ do local BASE_URL = 'http://api.giphy.com/v1' local API_KEY = 'dc6zaTOxFJmzC' -- public beta key function get_image(response) local images = json:decode(response).data if #images == 0 then return nil end -- No images local i = math.random(#images) local image = images[i] -- A random one if image.images.downsized then return image.images.downsized.url end if image.images.original then return image.original.url end return nil end function get_random_top() local url = BASE_URL.."/gifs/trending?api_key="..API_KEY local response, code = http.request(url) if code ~= 200 then return nil end return get_image(response) end function search(text) text = URL.escape(text) local url = BASE_URL.."/gifs/search?q="..text.."&api_key="..API_KEY local response, code = http.request(url) if code ~= 200 then return nil end return get_image(response) end function run(msg, matches) local gif_url = nil -- If no search data, a random trending GIF will be sended if matches[1] == "!gif" or matches[1] == "!giphy" then gif_url = get_random_top() else gif_url = search(matches[1]) end if not gif_url then return "Error: GIF not found" end local receiver = get_receiver(msg) send_document_from_url(receiver, gif_url) return "Preparing to make you laugh" end return { description = "GIFs from telegram with Giphy API", usage = { "!gif (term): Search and sends GIF from Giphy. If no param, sends a trending GIF.", "!giphy (term): Search and sends GIF from Giphy. If no param, sends a trending GIF." }, patterns = { "^!gif$", "^!gif (.*)", "^!giphy (.*)", "^!giphy$" }, run = run } end
gpl-2.0
The-HalcyonDays/darkstar
scripts/zones/Northern_San_dOria/npcs/_6fc.lua
21
1890
----------------------------------- -- Area: Northern San d'Oria -- NPC: Papal Chambers -- Finish Mission: The Davoi Report -- @pos 131 -11 122 231 ----------------------------------- package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil; package.loaded["scripts/globals/missions"] = nil; ----------------------------------- require("scripts/globals/missions"); require("scripts/globals/keyitems"); require("scripts/zones/Northern_San_dOria/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) if(player:getCurrentMission(SANDORIA) == THE_DAVOI_REPORT and player:hasKeyItem(TEMPLE_KNIGHTS_DAVOI_REPORT)) then player:startEvent(0x02b7); -- Finish Mission "The Davoi Report" elseif(player:getCurrentMission(SANDORIA,PRESTIGE_OF_THE_PAPSQUE) and player:getVar("MissionStatus") == 0)then player:startEvent(0x0007); elseif(player:getCurrentMission(SANDORIA,PRESTIGE_OF_THE_PAPSQUE) and player:getVar("MissionStatus") == 1)then player:startEvent(0x0009); elseif(player:getCurrentMission(SANDORIA,PRESTIGE_OF_THE_PAPSQUE) and player:hasKeyItem(ANCIENT_SANDORIAN_TABLET))then player:startEvent(0x0008); end return 1; end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if(csid == 0x02b7 or csid == 0x0007 or csid == 0x0008) then finishMissionTimeline(player,3,csid,option); end end;
gpl-3.0
rrpgfirecast/firecast
Plugins/Sheets/Ficha Starfinder/output/rdkObjs/FichaNave/ReactorPart.lfm.lua
1
13863
require("firecast.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); require("locale.lua"); local __o_Utils = require("utils.lua"); local function constructNew_frmReactorPart() local obj = GUI.fromHandle(_obj_newObject("form")); local self = obj; local sheet = nil; rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject")); function obj:setNodeObject(nodeObject) sheet = nodeObject; self.sheet = nodeObject; self:_oldSetNodeObjectFunction(nodeObject); end; function obj:setNodeDatabase(nodeObject) self:setNodeObject(nodeObject); end; _gui_assignInitialParentForForm(obj.handle); obj:beginUpdate(); obj:setName("frmReactorPart"); obj:setWidth(465); obj:setHeight(25); obj:setTheme("dark"); obj:setMargins({top=1}); local function askForDelete() Dialogs.confirmYesNo("Deseja realmente apagar?", function (confirmado) if confirmado then NDB.deleteNode(sheet); end; end); end; local function showPopup() local pop = self:findControlByName("reactorPop"); if pop ~= nil then pop:setNodeObject(self.sheet); pop:showPopupEx("bottomCenter", self); else showMessage("Ops, bug.. nao encontrei o popup para exibir"); end; end; obj.reator = GUI.fromHandle(_obj_newObject("comboBox")); obj.reator:setParent(obj); obj.reator:setAlign("client"); obj.reator:setField("reator"); obj.reator:setName("reator"); obj.reator:setMargins({top=1,bottom=1}); obj.reator:setValues({}); obj.reator:setItems({}); obj.layout1 = GUI.fromHandle(_obj_newObject("layout")); obj.layout1:setParent(obj); obj.layout1:setAlign("right"); obj.layout1:setWidth(50); obj.layout1:setName("layout1"); obj.button1 = GUI.fromHandle(_obj_newObject("button")); obj.button1:setParent(obj.layout1); obj.button1:setAlign("right"); obj.button1:setWidth(23); obj.button1:setText("i"); obj.button1:setMargins({top=1,bottom=1}); obj.button1:setName("button1"); obj.button2 = GUI.fromHandle(_obj_newObject("button")); obj.button2:setParent(obj.layout1); obj.button2:setAlign("right"); obj.button2:setWidth(23); obj.button2:setText("X"); obj.button2:setMargins({top=1,bottom=1}); obj.button2:setName("button2"); obj.dataLink1 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink1:setParent(obj); obj.dataLink1:setField("tamanho"); obj.dataLink1:setName("dataLink1"); obj.dataLink2 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink2:setParent(obj); obj.dataLink2:setField("reator"); obj.dataLink2:setName("dataLink2"); obj.dataLink3 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink3:setParent(obj); obj.dataLink3:setField("pf"); obj.dataLink3:setName("dataLink3"); obj.dataLink4 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink4:setParent(obj); obj.dataLink4:setField("une"); obj.dataLink4:setName("dataLink4"); obj.dataLink5 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink5:setParent(obj); obj.dataLink5:setField("blocos"); obj.dataLink5:setName("dataLink5"); obj.dataLink6 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink6:setParent(obj); obj.dataLink6:setField("tripMin"); obj.dataLink6:setName("dataLink6"); obj.dataLink7 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink7:setParent(obj); obj.dataLink7:setField("tripMax"); obj.dataLink7:setName("dataLink7"); obj._e_event0 = obj.button1:addEventListener("onClick", function (_) showPopup(); end, obj); obj._e_event1 = obj.button2:addEventListener("onClick", function (_) askForDelete(); end, obj); obj._e_event2 = obj.dataLink1:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local tamanho = tonumber(sheet.tamanho) or 1; local reator = (tonumber(sheet.reator) or 1); local items = {'Micron Leve', 'Micron Pesado', 'Micron Ultra', 'Arcus Leve', 'Pulso Marrom', 'Pulso Preto', 'Pulso Branco', 'Pulso Cinza', 'Arcus Pesado', 'Pulso Verde', 'Pulso Vermelho', 'Pulso Azul', 'Arcus Ultra', 'Arcus Máximo', 'Pulso Laranja', 'Pulso Prismático', 'Nova Leve', 'Nova Pesado', 'Nova Ultra', 'Portal Leve', 'Portal Pesado', 'Portal Ultra'}; local values = {'1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22'}; local current = items[reator]; if tamanho == 1 then -- Mn items = {'Micron Leve', 'Micron Pesado', 'Micron Ultra', 'Arcus Leve', 'Pulso Marrom', 'Pulso Preto', 'Pulso Branco', 'Pulso Cinza', 'Arcus Pesado', 'Pulso Verde', 'Pulso Vermelho', 'Pulso Azul'}; values = {'1','2','3','4','5','6','7','8','9','10','11','12'}; elseif tamanho==2 then -- P items = {'Arcus Leve', 'Pulso Marrom', 'Pulso Preto', 'Pulso Branco', 'Pulso Cinza', 'Arcus Pesado', 'Pulso Verde', 'Pulso Vermelho', 'Pulso Azul', 'Arcus Ultra', 'Arcus Máximo', 'Pulso Laranja', 'Pulso Prismático'}; values = {'4','5','6','7','8','9','10','11','12','13','14','15','16'}; elseif tamanho==3 then -- M items = {'Pulso Cinza', 'Arcus Pesado', 'Pulso Verde', 'Pulso Vermelho', 'Pulso Azul', 'Arcus Ultra', 'Arcus Máximo', 'Pulso Laranja', 'Pulso Prismático', 'Nova Leve', 'Nova Pesado', 'Nova Ultra'}; values = {'8','9','10','11','12','13','14','15','16','17','18','19'}; elseif tamanho==4 then -- G items = {'Arcus Ultra', 'Arcus Máximo', 'Pulso Laranja', 'Pulso Prismático', 'Nova Leve', 'Nova Pesado', 'Nova Ultra', 'Portal Leve', 'Portal Pesado', 'Portal Ultra'}; values = {'13','14','15','16','17','18','19','20','21','22'}; elseif tamanho==5 then -- E items = {'Nova Leve', 'Nova Pesado', 'Nova Ultra', 'Portal Leve', 'Portal Pesado', 'Portal Ultra'}; values = {'17','18','19','20','21','22'}; elseif tamanho>=6then -- I or C items = {'Portal Leve', 'Portal Pesado', 'Portal Ultra'}; values = {'20','21','22'}; end; self.reator.items = items; self.reator.values = values; self.reator.text = current; end, obj); obj._e_event3 = obj.dataLink2:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local reator = (tonumber(sheet.reator) or 1); local pf = {4,6,8,7,9,12,14,10,13,15,17,20,15,20,25,30,15,20,30,30,40,50}; local une = {50,70,80,75,90,120,140,100,130,150,175,200,150,200,250,300,150,200,300,300,400,500}; local blocos = {2,6,12,18,23,30,35,55,72,83,94,110,450,600,750,900,6750,9000,13500,153600,204800,256000}; local tripMin = {0,0,0,1,2,3,4,2,3,5,7,9,20,30,40,50,60,90,120,150,200,250}; local tripMax = {1,2,4,5,10,15,20,10,15,25,35,45,100,150,200,250,300,450,600,750,1000,1250}; sheet.pf = pf[reator]; sheet.une = une[reator]; sheet.blocos = blocos[reator]; sheet.tripMin = tripMin[reator]; sheet.tripMax = tripMax[reator]; sheet.tripTipo = "Engenheiro"; end, obj); obj._e_event4 = obj.dataLink3:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local pf = 0; local node = NDB.getParent(NDB.getParent(sheet)); local nodes = NDB.getChildNodes(node.listaReatores); for i=1, #nodes, 1 do pf = pf + (tonumber(nodes[i].pf) or 0); end; node.reator_pf = pf; end, obj); obj._e_event5 = obj.dataLink4:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local une = 0; local node = NDB.getParent(NDB.getParent(sheet)); local nodes = NDB.getChildNodes(node.listaReatores); for i=1, #nodes, 1 do une = une + (tonumber(nodes[i].une) or 0); end; node.energiaMax = une; end, obj); obj._e_event6 = obj.dataLink5:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local blocos = 0; local node = NDB.getParent(NDB.getParent(sheet)); local nodes = NDB.getChildNodes(node.listaReatores); for i=1, #nodes, 1 do blocos = blocos + (tonumber(nodes[i].blocos) or 0); end; node.reator_blocos = blocos; end, obj); obj._e_event7 = obj.dataLink6:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local tripMin = 0; local node = NDB.getParent(NDB.getParent(sheet)); local nodes = NDB.getChildNodes(node.listaReatores); for i=1, #nodes, 1 do tripMin = tripMin + (tonumber(nodes[i].tripMin) or 0); end; node.reator_tripMin = tripMin; end, obj); obj._e_event8 = obj.dataLink7:addEventListener("onChange", function (_, field, oldValue, newValue) if sheet==nil then return end; local tripMax = 0; local node = NDB.getParent(NDB.getParent(sheet)); local nodes = NDB.getChildNodes(node.listaReatores); for i=1, #nodes, 1 do tripMax = tripMax + (tonumber(nodes[i].tripMax) or 0); end; node.reator_tripMax = tripMax; end, obj); function obj:_releaseEvents() __o_rrpgObjs.removeEventListenerById(self._e_event8); __o_rrpgObjs.removeEventListenerById(self._e_event7); __o_rrpgObjs.removeEventListenerById(self._e_event6); __o_rrpgObjs.removeEventListenerById(self._e_event5); __o_rrpgObjs.removeEventListenerById(self._e_event4); __o_rrpgObjs.removeEventListenerById(self._e_event3); __o_rrpgObjs.removeEventListenerById(self._e_event2); __o_rrpgObjs.removeEventListenerById(self._e_event1); __o_rrpgObjs.removeEventListenerById(self._e_event0); end; obj._oldLFMDestroy = obj.destroy; function obj:destroy() self:_releaseEvents(); if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then self:setNodeDatabase(nil); end; if self.dataLink6 ~= nil then self.dataLink6:destroy(); self.dataLink6 = nil; end; if self.dataLink3 ~= nil then self.dataLink3:destroy(); self.dataLink3 = nil; end; if self.dataLink2 ~= nil then self.dataLink2:destroy(); self.dataLink2 = nil; end; if self.button1 ~= nil then self.button1:destroy(); self.button1 = nil; end; if self.dataLink4 ~= nil then self.dataLink4:destroy(); self.dataLink4 = nil; end; if self.layout1 ~= nil then self.layout1:destroy(); self.layout1 = nil; end; if self.reator ~= nil then self.reator:destroy(); self.reator = nil; end; if self.dataLink5 ~= nil then self.dataLink5:destroy(); self.dataLink5 = nil; end; if self.dataLink7 ~= nil then self.dataLink7:destroy(); self.dataLink7 = nil; end; if self.button2 ~= nil then self.button2:destroy(); self.button2 = nil; end; if self.dataLink1 ~= nil then self.dataLink1:destroy(); self.dataLink1 = nil; end; self:_oldLFMDestroy(); end; obj:endUpdate(); return obj; end; function newfrmReactorPart() local retObj = nil; __o_rrpgObjs.beginObjectsLoading(); __o_Utils.tryFinally( function() retObj = constructNew_frmReactorPart(); end, function() __o_rrpgObjs.endObjectsLoading(); end); assert(retObj ~= nil); return retObj; end; local _frmReactorPart = { newEditor = newfrmReactorPart, new = newfrmReactorPart, name = "frmReactorPart", dataType = "", formType = "undefined", formComponentName = "form", title = "", description=""}; frmReactorPart = _frmReactorPart; Firecast.registrarForm(_frmReactorPart); return _frmReactorPart;
apache-2.0
eiro/lua-Spore
src/Spore/Middleware/Format/YAML.lua
1
1289
-- -- lua-Spore : <http://fperrad.github.com/lua-Spore/> -- local pcall = pcall local type = type local raises = require 'Spore'.raises local yaml = require 'lyaml' local _ENV = nil local m = {} function m:call (req) local spore = req.env.spore if spore.payload and type(spore.payload) == 'table' then spore.payload = yaml.dump({ spore.payload }) req.headers['content-type'] = 'text/x-yaml' end req.headers['accept'] = 'text/x-yaml' return function (res) if type(res.body) == 'string' and res.body:match'%S' then local r, msg = pcall(function () res.body = yaml.load(res.body) end) if not r then if spore.errors then spore.errors:write(msg) spore.errors:write(res.body, "\n") end if res.status == 200 then raises(res, msg) end end end return res end end return m -- -- Copyright (c) 2010-2015 Francois Perrad -- -- This library is licensed under the terms of the MIT/X11 license, -- like Lua itself. --
mit
The-HalcyonDays/darkstar
scripts/globals/mobskills/PW_Head_Snatch.lua
13
1029
--------------------------------------------- -- Head Snatch -- -- Description: Grabs a single target's head. -- Type: Physical -- Utsusemi/Blink absorb: Ignores shadows -- Range: Melee -- Notes: Only used by Gurfurlur the Menacing. Reduces HP to 10%. --------------------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/monstertpmoves"); --------------------------------------------- function onMobSkillCheck(target,mob,skill) local mobSkin = mob:getModelId(); if (mobSkin == 1867) then return 0; else return 1; end end; function onMobWeaponSkill(target, mob, skill) local numhits = 1; local accmod = 1; local dmgmod = 2; local info = MobPhysicalMove(mob,target,skill,numhits,accmod,dmgmod,TP_NO_EFFECT); local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,MOBSKILL_PHYSICAL,MOBPARAM_SLASH,MOBPARAM_IGNORE_SHADOWS); target:delHP(dmg); return dmg; end;
gpl-3.0
ypkang/treelstm
util/Tree.lua
9
1126
--[[ A basic tree structure. --]] local Tree = torch.class('treelstm.Tree') function Tree:__init() self.parent = nil self.num_children = 0 self.children = {} end function Tree:add_child(c) c.parent = self self.num_children = self.num_children + 1 self.children[self.num_children] = c end function Tree:size() if self._size ~= nil then return self._size end local size = 1 for i = 1, self.num_children do size = size + self.children[i]:size() end self._size = size return size end function Tree:depth() local depth = 0 if self.num_children > 0 then for i = 1, self.num_children do local child_depth = self.children[i]:depth() if child_depth > depth then depth = child_depth end end depth = depth + 1 end return depth end local function depth_first_preorder(tree, nodes) if tree == nil then return end table.insert(nodes, tree) for i = 1, tree.num_children do depth_first_preorder(tree.children[i], nodes) end end function Tree:depth_first_preorder() local nodes = {} depth_first_preorder(self, nodes) return nodes end
gpl-2.0
The-HalcyonDays/darkstar
scripts/globals/items/dish_of_spaghetti_nero_di_seppia_+1.lua
36
1731
----------------------------------------- -- ID: 5202 -- Item: Dish of Spaghetti Nero Di Seppia +1 -- Food Effect: 60 Mins, All Races ----------------------------------------- -- HP % 17 (cap 140) -- Dexterity 3 -- Vitality 2 -- Agility -1 -- Mind -2 -- Charisma -1 -- Double Attack 1 -- Store TP 6 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- -- OnItemCheck ----------------------------------------- function onItemCheck(target) result = 0; if (target:hasStatusEffect(EFFECT_FOOD) == true or target:hasStatusEffect(EFFECT_FIELD_SUPPORT_FOOD) == true) then result = 246; end return result; end; ----------------------------------------- -- OnItemUse ----------------------------------------- function onItemUse(target) target:addStatusEffect(EFFECT_FOOD,0,0,3600,5202); end; ----------------------------------------- -- onEffectGain Action ----------------------------------------- function onEffectGain(target,effect) target:addMod(MOD_FOOD_HPP, 17); target:addMod(MOD_FOOD_HP_CAP, 140); target:addMod(MOD_DEX, 3); target:addMod(MOD_VIT, 2); target:addMod(MOD_AGI, -1); target:addMod(MOD_MND, -2); target:addMod(MOD_CHR, -1); target:addMod(MOD_DOUBLE_ATTACK, 1); target:addMod(MOD_STORETP, 6); end; ----------------------------------------- -- onEffectLose Action ----------------------------------------- function onEffectLose(target,effect) target:delMod(MOD_FOOD_HPP, 17); target:delMod(MOD_FOOD_HP_CAP, 140); target:delMod(MOD_DEX, 3); target:delMod(MOD_VIT, 2); target:delMod(MOD_AGI, -1); target:delMod(MOD_MND, -2); target:delMod(MOD_CHR, -1); target:delMod(MOD_DOUBLE_ATTACK, 1); target:delMod(MOD_STORETP, 6); end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/zones/Port_Jeuno/npcs/Challoux.lua
37
1148
----------------------------------- -- Area: Port Jeuno -- NPC: Challoux -- Standard Merchant NPC ----------------------------------- require("scripts/globals/shop"); package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil; require("scripts/zones/Port_Jeuno/TextIDs"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) player:showText(npc,CHALLOUX_SHOP_DIALOG); stock = {0x11C1,62, --Gysahl Greens 0x0348,4, --Chocobo Feather 0x439B,9} --Dart showShop(player, STATIC, stock); end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end;
gpl-3.0
The-HalcyonDays/darkstar
scripts/zones/Windurst_Waters_[S]/npcs/Ranpi-Monpi.lua
38
1048
----------------------------------- -- Area: Windurst Waters (S) -- NPC: Ranpi-Monpi -- Type: Standard NPC -- @zone: 94 -- @pos -115.452 -3 43.389 -- -- Auto-Script: Requires Verification (Verified by Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Waters_[S]/TextIDs"] = nil; ----------------------------------- ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) player:startEvent(0x0075); end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end;
gpl-3.0
brianhang/nutscript2
gamemode/classes/sh_character.lua
1
6964
--[[ File: classes/sh_character.lua Purpose: Defines the character class here which is used to store data related to a character. --]] -- The DT variable for character ID. CHAR_ID = 31 -- The number of bits in a longer number. local LONG = 32 local CHARACTER = nut.meta.character or {} CHARACTER.__index = CHARACTER CHARACTER.id = 0 CHARACTER.vars = {} -- Finds a player whose active character matches a given ID. local function findPlayerByCharID(id) for _, client in ipairs(player.GetAll()) do if (client:GetDTInt(CHAR_ID) == id) then return client end end end -- Returns a string representation of the character. function CHARACTER:__tostring() return "character["..self.id.."]" end -- Returns whether or not two characters are equal by checking for ID. function CHARACTER:__eq(other) return self.id == other.id end -- Deallocates a character. function CHARACTER:destroy() nut.char.delete(self:getID(), nil, true) end -- Gets the numeric ID for the character. function CHARACTER:getID() return self.id end -- Micro-optimizations for getPlayer. local isValid = IsValid -- Gets the player that is the owner of the character. function CHARACTER:getPlayer() self.player = isValid(self.player) and self.player.getChar(self.player) == self and self.player or findPlayerByCharID(self.id) return self.player end if (SERVER) then -- Number of seconds in a minute. local MINUTE = 60 -- Prevents this character from being used. function CHARACTER:ban(time, reason) -- Get when the ban will expire. local expiration = 0 if (time) then time = tonumber(time) or MINUTE expiration = os.time() + time else time = 0 end -- Store the expiration time. self:setData("ban", expiration) -- Store the reason as well. if (reason) then self:setData("banReason", tostring(reason)) end hook.Run("CharacterBanned", self, time, reason and tostring(reason) or "") end -- Deletes this character permanently. function CHARACTER:delete() nut.char.delete(self:getID()) end -- Ejects the owner of this character. function CHARACTER:kick(reason) -- Stop this character from being an active character for a player. local client = self:getPlayer() if (IsValid(client) and client:getChar() == self) then -- Set the player's active character to none. client:SetDTInt(CHAR_ID, 0) -- Default the reason to an empty string. if (type(reason) ~= "string") then reason = "" end hook.Run("CharacterKicked", self, client, reason) end end -- Saves the character to the database. function CHARACTER:save(callback) -- The data for the update query. local data = {} -- Save each applicable variable. for name, variable in pairs(nut.char.vars) do -- If onSave is given, overwrite the normal saving. if (type(variable.onSave) == "function") then variable.onSave(self) continue end -- Ignore constant variables and variables without SQL fields. if (not variable.field or variable.isConstant) then continue end -- Get the character's value for this variable. local value = self.vars[name] -- Make sure not null variables are not updated to null. if (variable.notNull and value == nil) then ErrorNoHalt("Tried to set not null '"..name.."' to null".. " for character #"..self.id.."!\n") continue end data[variable.field] = value end -- Run the update query. nut.db.update(CHARACTERS, data, "id = "..self.id, callback) hook.Run("CharacterSave", self) end -- Sets up a player to reflect this character. function CHARACTER:setup(client) assert(type(client) == "Player", "client is not a player") assert(IsValid(client), "client is not a valid player") -- Set the player's active character to be this character. client:SetDTInt(CHAR_ID, self:getID()) -- Set up all the character variables. for _, variable in pairs(nut.char.vars) do if (type(variable.onSetup) == "function") then variable.onSetup(self, client) end end hook.Run("CharacterSetup", self, client) end -- Networks the character data to the given recipient(s). function CHARACTER:sync(recipient, ignorePrivacy) -- Whether or not recipient is a table. local isTable = type(recipient) == "table" -- Default synchronizing to everyone. if (type(recipient) ~= "Player" and not isTable) then recipient = player.GetAll() isTable = true end -- Sync a list of players by syncing them individually. if (isTable) then for k, v in ipairs(recipient) do if (type(v) == "Player" and IsValid(v)) then self:sync(v, ignorePrivacy) end end return end assert(IsValid(recipient), "recipient is not a valid player") -- Synchronize all applicable variables. for name, variable in pairs(nut.char.vars) do -- Ignore variables that do not need any networking. if (variable.replication == CHARVAR_NONE) then continue end -- Keep private variables to the owner only. if (variable.replication == CHARVAR_PRIVATE and recipient ~= self:getPlayer() and not ignorePrivacy) then continue end -- Allow for custom synchronization. if (type(variable.onSync) == "function" and variable.onSync(self, recipient) == false) then continue end -- Network this variable. net.Start("nutCharVar") net.WriteInt(self:getID(), LONG) net.WriteString(name) net.WriteType(self.vars[name]) net.Send(recipient) end hook.Run("CharacterSync", self, recipient) end -- Allows the character to be used again. function CHARACTER:unban() -- Clear the ban status. if (self:getData("ban")) then self:setData("ban", nil) end -- Clear the ban reason. if (self:getData("banReason")) then self:setData("banReason", nil) end hook.Run("CharacterUnbanned", self) end end nut.meta.character = CHARACTER
mit
JioCloud/contrail-controller
src/analytics/uvedelete.lua
3
1266
-- -- Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. -- local function sub_del(_values) local lres = redis.call('hgetall',_values) local iter = 1 while iter <= #lres do local attr = lres[iter] local val = lres[iter+1] if string.byte(val,1) ~= 60 then local descs = cjson.decode(val) for k,desc in pairs(descs) do if desc.href ~= nil then redis.call('del',desc.href) redis.log(redis.LOG_NOTICE,"Deleting for "..desc.href) end end redis.call('hdel', _values, attr) end iter = iter + 2 end end local sm = ARGV[1]..":"..ARGV[2]..":"..ARGV[3]..":"..ARGV[4] local typ = ARGV[5] local key = ARGV[6] local db = tonumber(ARGV[7]) local _del = KEYS[1] local _values = KEYS[2] local _uves = KEYS[3] local _origins = KEYS[4] local _table = KEYS[5] local _deleted = KEYS[6] redis.log(redis.LOG_NOTICE,"DelUVE on "..sm.." for "..key) redis.call('select',db) sub_del(_values) redis.call('rename', _values, _del) redis.call('zrem', _uves, key) redis.call('srem', _origins, sm..":"..typ) redis.call('srem', _table, key..":"..sm..":"..typ) redis.call('lpush',_deleted, _del) return true
apache-2.0
The-HalcyonDays/darkstar
scripts/zones/RuLude_Gardens/npcs/Muhoho.lua
34
1386
----------------------------------- -- Area: Ru'Lud Gardens -- NPC: Muhoho -- Standard Info NPC ----------------------------------- package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; ----------------------------------- require("scripts/zones/RuLude_Gardens/TextIDs"); require("scripts/globals/quests"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) local WildcatJeuno = player:getVar("WildcatJeuno"); if (player:getQuestStatus(JEUNO,LURE_OF_THE_WILDCAT_JEUNO) == QUEST_ACCEPTED and player:getMaskBit(WildcatJeuno,2) == false) then player:startEvent(10093); else player:startEvent(0x0098); end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); end; ----------------------------------- -- onEventFinish ----------------------------------- function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); if (csid == 10093) then player:setMaskBit(player:getVar("WildcatJeuno"),"WildcatJeuno",2,true); end end;
gpl-3.0
rgieseke/scintillua
lexers/diff.lua
1
1302
-- Copyright 2006-2018 Mitchell mitchell.att.foicica.com. See LICENSE. -- Diff LPeg lexer. local lexer = require('lexer') local token, word_match = lexer.token, lexer.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local lex = lexer.new('diff', {lex_by_line = true}) -- Text, separators, and file headers. lex:add_rule('index', token(lexer.COMMENT, 'Index: ' * lexer.any^0 * -1)) lex:add_rule('separator', token(lexer.COMMENT, ('---' + P('*')^4 + P('=')^1) * lexer.space^0 * -1)) lex:add_rule('header', token('header', (P('*** ') + '--- ' + '+++ ') * lexer.any^1)) lex:add_style('header', lexer.STYLE_COMMENT) -- Location. lex:add_rule('location', token(lexer.NUMBER, ('@@' + lexer.digit^1 + '****') * lexer.any^1)) -- Additions, deletions, and changes. lex:add_rule('addition', token('addition', S('>+') * lexer.any^0)) lex:add_style('addition', 'fore:$(color.green)') lex:add_rule('deletion', token('deletion', S('<-') * lexer.any^0)) lex:add_style('deletion', 'fore:$(color.red)') lex:add_rule('change', token('change', '!' * lexer.any^0)) lex:add_style('change', 'fore:$(color.yellow)') lex:add_rule('any_line', token(lexer.DEFAULT, lexer.any^1)) return lex
mit
The-HalcyonDays/darkstar
scripts/globals/mobskills/Ill_Wind.lua
15
1309
--------------------------------------------- -- Ill Wind -- Description: Deals Wind damage to enemies within an area of effect. Additional effect: Dispel -- Type: Magical -- Utsusemi/Blink absorb: Wipes Shadows -- Range: Unknown radial -- Notes: Only used by Puks in Mamook, Besieged, and the following Notorious Monsters: Vulpangue, Nis Puk, Nguruvilu, Seps , Phantom Puk and Waugyl. Dispels one effect. --------------------------------------------- require("scripts/globals/settings"); require("scripts/globals/status"); require("scripts/globals/monstertpmoves"); --------------------------------------------- function onMobSkillCheck(target,mob,skill) return 0; end; function onMobWeaponSkill(target, mob, skill) target:dispelStatusEffect(); local dmgmod = 1; local info = MobMagicalMove(mob,target,skill,mob:getWeaponDmg()*2.5,ELE_WIND,dmgmod,TP_NO_EFFECT); local dmg = MobFinalAdjustments(info.dmg,mob,skill,target,MOBSKILL_MAGICAL,MOBPARAM_WIND,MOBPARAM_WIPE_SHADOWS); target:delHP(dmg); --printf("[TP MOVE] Zone: %u Monster: %u Mob lvl: %u TP: %u TP Move: %u Damage: %u on Player: %u Level: %u HP: %u",mob:getZoneID(),mob:getID(),mob:getMainLvl(),skill:getTP(),skill:getID(),dmg,target:getID(),target:getMainLvl(),target:getMaxHP()); return dmg; end;
gpl-3.0
KlonD90/tarantool
test/app/msgpackffi.test.lua
8
2398
#!/usr/bin/env tarantool package.path = "lua/?.lua;"..package.path local tap = require('tap') local common = require('serializer_test') local function is_map(s) local b = string.byte(string.sub(s, 1, 1)) return b >= 0x80 and b <= 0x8f or b == 0xde or b == 0xdf end local function is_array(s) local b = string.byte(string.sub(s, 1, 1)) return b >= 0x90 and b <= 0x9f or b == 0xdc or b == 0xdd end local function test_offsets(test, s) test:plan(6) local arr1 = {1, 2, 3} local arr2 = {4, 5, 6} local dump = s.encode(arr1)..s.encode(arr2) test:is(dump:len(), 8, "length of part1 + part2") local a local offset = 1 a, offset = s.decode(dump, offset) test:is_deeply(a, arr1, "decoded part1") test:is(offset, 5, "offset of part2") a, offset = s.decode(dump, offset) test:is_deeply(a, arr2, "decoded part2") test:is(offset, 9, "offset of end") test:ok(not pcall(s.decode, dump, offset), "invalid offset") end local function test_other(test, s) test:plan(3) local buf = string.char(0x93, 0x6e, 0xcb, 0x42, 0x2b, 0xed, 0x30, 0x47, 0x6f, 0xff, 0xff, 0xac, 0x77, 0x6b, 0x61, 0x71, 0x66, 0x7a, 0x73, 0x7a, 0x75, 0x71, 0x71, 0x78) local num = s.decode(buf)[2] test:ok(num < 59971740600 and num > 59971740599, "gh-633 double decode") -- gh-596: msgpack and msgpackffi have different behaviour local arr = {1, 2, 3} local map = {k1 = 'v1', k2 = 'v2', k3 = 'v3'} test:is(getmetatable(s.decode(s.encode(arr))).__serialize, "seq", "array save __serialize") test:is(getmetatable(s.decode(s.encode(map))).__serialize, "map", "map save __serialize") end tap.test("msgpackffi", function(test) local serializer = require('msgpackffi') test:plan(9) test:test("unsigned", common.test_unsigned, serializer) test:test("signed", common.test_signed, serializer) test:test("double", common.test_double, serializer) test:test("boolean", common.test_boolean, serializer) test:test("string", common.test_string, serializer) test:test("nil", common.test_nil, serializer) test:test("table", common.test_table, serializer, is_array, is_map) -- udata/cdata hooks are not implemented --test:test("ucdata", common.test_ucdata, serializer) test:test("offsets", test_offsets, serializer) test:test("other", test_other, serializer) end)
bsd-2-clause
Andrettin/Wyrmsun
scripts/civilizations/anglo_saxon/characters.lua
1
66450
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > -- \/ \/ \//_____/ \/ -- ______________________ ______________________ -- T H E W A R B E G I N S -- Stratagus - A free fantasy real time strategy game engine -- -- (c) Copyright 2016-2022 by Andrettin -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- DefineCharacter("aelle", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 75. Name = "Aelle", -- "Ælle" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "deira", DeathDate = 588, -- died Background = "Aelle is the first known king of Deira.", HistoricalTitles = { "ruler", 0, 588, "deira" -- first recorded king of Deira }, Deities = {"odin", "tyr"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("ida", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 76. Name = "Ida", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "bernicia", StartDate = 547, -- became king of Bernicia HistoricalTitles = { "ruler", 547, 0, "bernicia" -- first king of Bernicia }, Deities = {"odin", "tyr"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("theodric-of-bernicia", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 76. Name = "Theodric", -- in his age, the Anglo-Saxons suffered a siege in Holy Island for three days Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "bernicia", -- his father was king of Bernicia Father = "ida", Deities = {"odin", "tyr"}, HistoricalTitles = { -- "ruler", 0, 0, "bernicia" -- presumably, since his father was king of Bernicia }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("aethelric", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 75-76. Name = "Aethelric", -- "Æthelric" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "bernicia", StartDate = 588, -- according to tradition, Æthelric acquired the kingdom of Deira upon Ælle's death in 588 AD Father = "ida", -- the source says that his son Æthelfrith was grandson of Ida Deities = {"odin", "tyr"}, HistoricalTitles = { "ruler", 588, 0, "bernicia", -- king of Bernicia "ruler", 588, 0, "deira" -- according to tradition, Æthelric acquired the kingdom of Deira upon Ælle's death in 588 AD }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia" or GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("aethelfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 75, 78. Name = "Aethelfrith", -- "Æthelfrith" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "bernicia", StartDate = 593, -- beginning of reign DeathDate = 616, -- died in battle against Rædwald Father = "aethelric", Description = "Aethelfrith was the king of Bernicia between 593 and 616. He simultaneously ruled over Deira, and is famed for his defeat of the Britons at Chester. Aethelfrith came to a tragic end at the hands of Raedwald of East Anglia in 616, being killed in battle.", Deities = {"odin", "tyr"}, HistoricalTitles = { "ruler", 593, 616, "bernicia", -- king of Bernicia "ruler", 593, 616, "deira" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia" or GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end -- married the daughter of the Deiran king Ælle -- at some point between 613 and 616, he defeated the Britons at Chester; before the battle of Chester, Æthelfrith's warriors killed a group of British monks who stemmed from the monastery of Bangor Iscoed, and had come to pray for the Briton forces; Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 77-78 }) DefineCharacter("ceawlin", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 76. Name = "Ceawlin", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "wessex", Deities = {"odin", "tyr"}, HistoricalTitles = { "ruler", 0, 0, "wessex" -- king of Wessex }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("edwin-of-deira", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 78-81, 113, 116. Name = "Edwin", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "deira", Father = "aelle", StartDate = 616, -- in 616 Rædwald of East Anglia (with whom Edwin had taken refuge), fought and won against Æthelfrith of Bernicia to support Edwin's claim to the Deiran throne DeathDate = {632, 10, 12}, -- died on the 12th of October 632 in battle against Cadwallon of Gwynedd, at Hatfield -- married Æthelberg in 625 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 616, 632, "bernicia", "ruler", 616, 632, "deira" -- was the heir to Deira, but also became the king of Bernicia after the battle against Æthelfrith in 616 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira" or GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("raedwald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 78-79. Name = "Raedwald", -- "Rædwald" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "east_anglia", StartDate = 616, -- in the summer or early fall of 616, Rædwald (supporting Edwin's claim to the Deiran throne; Edwin had taken refuge with him) engaged in a battle against Æthelfrith of Bernicia, with the location being at the southern border of Deira, where the Idle river crosses with the Lincoln-Doncaster Roman road Deities = {"odin", "tyr"}, HistoricalTitles = { "ruler", 616, 0, "east_anglia" -- king of East Anglia }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "east_anglia") then return true end return false end }) DefineCharacter("lilla", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 79. Name = "Lilla", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- thegn Civilization = "anglo-saxon", Faction = "deira", Description = "Lilla was a thegn of Edwin of Deira. He saved his lord's life by stopping an assassin from Wessex just as he was about to strike Edwin.", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira" or GetPlayerData(trigger_player, "Faction") == "bernicia") then -- Edwin also ruled over Bernicia return true end return false end }) DefineCharacter("aethelberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 79, 105, 112. Name = "Aethelberht", -- "Æthelberht" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "kent", -- his daughter married Edwin of Deira -- married Bertha of Paris before 588 DeathDate = 616, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 597, 616, "kent" -- was king of Kent in 597 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent") then return true end return false end }) DefineCharacter("saberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 109. Name = "Saberht", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "essex", Deities = {"odin", "tyr"}, HistoricalTitles = { "ruler", 604, 0, "essex" -- was king of Essex in 604 }, -- son of king Æthelberht of Kent's sister Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "essex") then return true end return false end }) DefineCharacter("aethelberg", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 113. Name = "Aethelberg", -- "Æthelberg" Gender = "female", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "kent", Father = "aethelberht", Deities = {"christian-god"}, -- married king Edwin of Northumbria in 625 Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent") then return true end return false end }) DefineCharacter("birinus", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 117-118. Name = "Birinus", Gender = "male", Type = "unit-teuton-priest", -- priest, and first bishop in Wessex Civilization = "anglo-saxon", Faction = "wessex", StartDate = 635, -- baptized the West Saxon king Cynegils in 635 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("hereric", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 80. Name = "Hereric", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "deira", -- presumably Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira" or GetPlayerData(trigger_player, "Faction") == "bernicia") then -- Edwin also ruled over Bernicia return true end return false end -- was the son of a nephew of Edwin of Deira's -- was exiled by Æthelfrith of Bernicia -- was poisoned and died during his stay as an exile with Certic of Elmet }) DefineCharacter("osfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 80-81. Name = "Osfrith", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "deira", Father = "edwin-of-deira", DeathDate = 632, -- died in 632 in battle against Cadwallon of Gwynedd Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira" or GetPlayerData(trigger_player, "Faction") == "bernicia") then -- Edwin also ruled over Bernicia return true end return false end }) DefineCharacter("penda", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 39, 75, 80-81, 83-84, 120. Name = "Penda", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "mercia", StartDate = 632, -- in 632, Penda (still a noble belonging to the Mercian royal house with no throne) allied himself Cadwallon of Gwynedd against Edwin of Deira DeathDate = 654, -- died fighting against Oswiu of Bernicia; died in the autumn of 654 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 632, 654, "mercia" -- became king of Mercia in 632 after Edwin's demise }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end -- attacked Oswiu of Bernicia in 654 with thirty "legions" }) DefineCharacter("osric", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 81. Name = "Osric", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "deira", StartDate = 632, DeathDate = 633, -- died fighting against Cadwallon in the summer of 633 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 632, 633, "deira" -- king of Deira from Edwin's death to 633 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("eanfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 81. Name = "Eanfrith", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "bernicia", Father = "aethelfrith", StartDate = 632, DeathDate = 633, -- killed in 633 while visiting Cadwallon to sue for peace Deities = {"christian-god"}, HistoricalTitles = { "ruler", 632, 633, "bernicia" -- king of Bernicia from Edwin's death to 633 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("talorcan", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 87. Name = "Talorcan", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "bernicia", Father = "eanfrith", Deities = {"christian-god"}, HistoricalTitles = { "ruler", 632, 633, "pict-tribe" -- was king of the Picts }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("oswald-of-bernicia", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 81-82. Name = "Oswald", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "bernicia", Father = "aethelfrith", -- he was a brother of Eanfrith's, so presumably also a son of Æthelfrith StartDate = 633, -- destroyed Cadwallon at Rowley Burn (south of Hexham) in 633, becoming king of both Bernicia and Deira DeathDate = 641, -- defeated and killed by Penda of Mercia at Maserfelth (likely Oswestry in Shropshire) on the 5h of August 641 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 633, 641, "bernicia", "ruler", 633, 641, "deira" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia" or GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end -- married the daughter of Cynegils of Wessex }) DefineCharacter("eadfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 81. Name = "Eadfrith", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "deira", Father = "edwin-of-deira", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end -- gave himself up to Penda, who killed him }) DefineCharacter("wuscfrea", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 81. Name = "Wuscfrea", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "deira", Father = "edwin-of-deira", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("yffi", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 81. Name = "Yffi", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "deira", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end -- grandson of Edwin of Deira }) DefineCharacter("eanflaed", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 81. Name = "Eanflaed", -- "Eanflæd" Gender = "female", Type = "unit-teuton-archer", Civilization = "anglo-saxon", Faction = "deira", Father = "edwin-of-deira", Deities = {"christian-god"} -- married to Oswiu, brother of Oswald of Bernicia }) DefineCharacter("oswiu", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 81-85. Name = "Oswiu", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", Father = "aethelfrith", -- he was a brother of Oswald's, so also of Eanfrith's, and as such likely also a son of Æthelfrith StartDate = 641, DeathDate = 670, Background = "Oswiu unified the kingdoms of Bernicia and Deira into Northumbria in 654 AD.", Deities = {"christian-god"}, HistoricalTitles = { "ruler", 641, 654, "bernicia", -- became king of Bernicia on the death of his brother Oswald "ruler", 654, 670, "northumbria" -- Northumbria unified in 654 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "bernicia" or GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end -- married to Eanflæd, daughter of Edwin of Deira -- fought and won against Penda in the battle of the Winwæd (a stream, somewhere around Leeds) in 654 }) DefineCharacter("cynegils", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 81, 118. Name = "Cynegils", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "wessex", StartDate = 635, -- was already king when he was baptized in 635 by Birinus HistoricalTitles = { "ruler", 635, 0, "wessex" -- king of Wessex }, Deities = {"christian-god"}, -- baptized in 635 by Birinus Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("eadbald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 112-113. Name = "Eadbald", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "kent", Father = "aethelberht", -- son of Bertha of Paris DeathDate = 640, -- reign ended Deities = {"christian-god"}, HistoricalTitles = { "ruler", 616, 640, "kent" -- became king of Kent in 616, and ceased to be king in 640 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent") then return true end return false end }) DefineCharacter("eorcenberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 113. Name = "Eorcenberht", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "kent", Father = "eadbald", Deities = {"christian-god"}, HistoricalTitles = { "ruler", 640, 0, "kent" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent") then return true end return false end }) DefineCharacter("oswine", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 82-83. Name = "Oswine", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "deira", Father = "osric", StartDate = 641, DeathDate = 651, -- died as a result of Oswiu of Bernicia's invasion of Deira in 651 AD Deities = {"christian-god"}, HistoricalTitles = { "ruler", 641, 651, "deira" -- became king of Deira on the death of Oswald of Bernicia }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("aethelwald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 83. Name = "Aethelwald", -- "Æthelwald" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "deira", Father = "oswald-of-bernicia", StartDate = 651, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 651, 0, "deira" -- was chosen by the Deirans as their king upon the demise of Oswine; he was under the protection of Penda of Mercia (apparently) from his accession }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("aethelhere", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 83-84. Name = "Aethelhere", -- "Æthelhere" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "east_anglia", StartDate = 654, DeathDate = 654, -- in 654 went with Penda to attack Oswiu of Bernicia, resulting in Æthelhere's death Deities = {"christian-god"}, HistoricalTitles = { "ruler", 654, 654, "east_anglia" -- king of East Anglia; in 654 went with Penda to attack Oswiu of Bernicia, resulting in Æthelhere's death }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "east_anglia") then return true end return false end }) DefineCharacter("sigeberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 84. Name = "Sigeberht", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "essex", Deities = {"christian-god"}, HistoricalTitles = { "ruler", 0, 0, "essex" -- king of Essex }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "essex") then return true end return false end }) DefineCharacter("cenwalh", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 84, 118. Name = "Cenwalh", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "wessex", Father = "cynegils", -- second son of Cynegils DeathDate = 645, -- reign ended Deities = {"christian-god"}, HistoricalTitles = { "ruler", 0, 645, "wessex" -- king of Wessex; was driven from his kingdom by Penda's Mercia in 645 }, -- remained pagan as late as 645, though he was later converted to Christianity Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end -- was forced into exile from his lands by Penda of Mercia }) DefineCharacter("cuthbert-of-lindisfarne", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 126, 138-139. Name = "Cuthbert", Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 651, -- became a novice in Melrose in 651 -- moved to Lindisfarne in 664 -- was elected bishop of Hexham in 684, being consecrated on the 26th of March 685 -- retired from the world in 687 DeathDate = {687, 3, 20}, -- died on 687.3.20 -- became a saint Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("peada", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 84, 120. Name = "Peada", -- king of the Middle Angles Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "middle_anglia", Father = "penda", StartDate = 653, -- was ruling the Middle Angles in 653 when he was baptized DeathDate = 656, -- murdered in the spring of 656 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 654, 656, "middle_anglia" }, -- was given the Mercian territories south of the Trent after Penda's fall, at which point he was already king of the Middle Angles Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "middle_anglia") then return true end return false end -- married Alhflæd, the daughter of Oswiu of Bernicia, in 653 }) DefineCharacter("alhflaed", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 120. Name = "Alhflaed", -- "Alhflæd" Gender = "female", Type = "unit-teuton-archer", Civilization = "anglo-saxon", Faction = "northumbria", Father = "oswiu", -- Oswiu of Bernicia StartDate = 653, -- married Peada in 653 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("deusdedit", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 130. Name = "Deusdedit", Gender = "male", Type = "unit-teuton-priest", -- archbishop Civilization = "anglo-saxon", Faction = "kent", StartDate = 654, -- became archbishop of Canterbury in the spring of 654 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("wulfhere", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 34, 84-85. Name = "Wulfhere", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "mercia", Father = "penda", StartDate = 657, -- beginning of reign DeathDate = 674, -- died Deities = {"christian-god"}, HistoricalTitles = { "ruler", 657, 674, "mercia" -- became king of Mercia in 657; died in 674 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end -- became overlord of the kings of Essex in 665 -- invaded Northumbria in 674, possessing an army gathered from all Anglo-Saxon kingdoms south of the Humber }) DefineCharacter("wine", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 122. Name = "Wine", Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "wessex", StartDate = 660, -- became bishop of Winchester around 660 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("hild-of-streoneshalh", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 123. Name = "Hild", Gender = "female", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 663, -- was abbess of a monastery in Streoneshalh, in Northumbria, in 663 Deities = {"christian-god"}, -- was related to king Oswiu of Northumbria Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("wilfrid", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 123, 135-139, 143-145. Name = "Wilfrid", Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "northumbria", -- from Northumbria StartDate = 663, -- participated in a synod in Streoneshalh, in Northumbria, in 663 -- predominated over the whole Northumbrian church in the 669-677 period -- expelled from Northumbria in 677 -- was restored to his see in York in 679.10 by Rome, but this decision was not obeyed in Northumbria -- in 681 he found refuge in Sussex -- was allowed to return to Northumbria in 686, having his residence at Ripon -- administered the see of Lindisfarne after Cuthbert died in 687.3 -- expelled from Northumbria again in 691, due to his ambition to once more predominate over the entirety of the Northumbrian church, moving to Mercia DeathDate = 709, -- died in 709 at Oundle Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "sussex") then return true end return false end }) DefineCharacter("egbert-of-kent", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 130. Name = "Egbert", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "kent", StartDate = 667, -- was king of Kent as of 667 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 667, 0, "kent" -- was king of Kent as of 667 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent") then return true end return false end }) DefineCharacter("wighard", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 130. Name = "Wighard", Gender = "male", Type = "unit-teuton-priest", -- archbishop Civilization = "anglo-saxon", Faction = "kent", StartDate = 667, -- became archbishop of Canterbury in 667 DeathDate = 667, -- died very soon after becoming archbishop, when he was sent to Rome to be consecrated, and died of plague Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("leuthere", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 132-134. Name = "Leuthere", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "wessex", StartDate = 670, -- became bishop of Winchester in 670 (consecrated by archbishop Theodore of Canterbury) DeathDate = 676, -- succeeded by Hæddi as bishop of Winchester in 676 -- nephew of Agilbert Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("ecgfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 85, 88. Name = "Ecgfrith", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", Father = "oswiu", StartDate = 674, -- defeated Wulfhere of Mercia's invasion of Northumbria in 674 DeathDate = {685, 5, 20}, -- died in the 20th of May 685 at Duin Nechtain / Nechtanesmere while leading a raid against the Picts under their king Bruide Deities = {"christian-god"}, HistoricalTitles = { "ruler", 674, 685, "northumbria" -- king of Northumbria }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end -- was defeated in 678 by Æthelred, Wulfhere's brother, in a battle close to the Trent river -- in 684 had an army sent to Ireland against the kingdom of Meath }) DefineCharacter("benedict-biscop", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 184-185. Name = "Benedict", Surname = "Biscop", Gender = "male", Type = "unit-teuton-priest", -- founder of monasteries Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 674, -- founded a monastery at Wearmouth in 674, with the land being given by king Ecgfrith of Northumbria DeathDate = 689, -- died in 689 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("haeddi", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 134. Name = "Haeddi", -- "Hæddi" Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "wessex", StartDate = 676, -- became bishop of Winchester in 676, succeeding Leuthere -- friend of archbishop Theodore of Canterbury Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("bosa", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 135-136, 139. Name = "Bosa", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 677, -- became bishop of Deira (with seat in York) in 677 DeathDate = 705, -- died in 705 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "deira") then return true end return false end }) DefineCharacter("eata", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 135-136, 139. Name = "Eata", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 677, -- became bishop of Bernicia in 677 DeathDate = 686, -- died just before Wilfrid's return to Northumbria in 686 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("beornhaeth", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 88. Name = "Beornhaeth", -- "Beornhæth"; Northumbrian ealdorman, quelled a Pictish rebellion with Ecgfrith of Northumbria Gender = "male", Type = "unit-teuton-heroic-swordsman", -- ealdorman Civilization = "anglo-saxon", Faction = "northumbria", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("aethelred-of-mercia", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 85. Name = "Aethelred", -- "Æthelred" Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "mercia", Father = "penda", -- presumably, since he was Wulfhere of Mercia's brother StartDate = 678, -- defeated Ecgfrith of Northumbria in a battle close to the Trent river in 678 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end }) DefineCharacter("aethelwalh", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 137-138. Name = "Aethelwalh", -- "Æthelwalh" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "sussex", StartDate = 681, -- was king of the South Saxons as of 681 DeathDate = 686, -- died in 686, having been killed by Cædwalla Deities = {"christian-god"}, HistoricalTitles = { "ruler", 681, 686, "sussex" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "sussex") then return true end return false end }) DefineCharacter("tunberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 138. Name = "Tunberht", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", DeathDate = 684, -- was deposed as bishop of Hexham in 684 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "bernicia") then return true end return false end }) DefineCharacter("berhtwald-of-mercia", { -- probably not the same Berhtwald as the archbishop of Canterbury; Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 151. Name = "Berhtwald", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "mercia", -- nephew of king Æthelred of Mercia StartDate = 685, -- gave forty hides (a measure of land area) to abbot Aldhelm in 685 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end }) DefineCharacter("aldhelm", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 89, 142, 151; Source: Alaric Hall, "The Meanings of Elf and Elves in Medieval England", 2004, p. 98. Name = "Aldhelm", Gender = "male", Type = "unit-teuton-priest", -- abbot, and later bishop Civilization = "anglo-saxon", Faction = "wessex", StartDate = 685, -- received forty hides (a measure of land area) from Berhtwald in 685 -- became bishop at Sherborne in 705, having previously been abbot of Malmesbury DeathDate = 709, -- died in 709/710 Deities = {"christian-god"}, -- composed the "Helleborus" riddle Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("aldfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 88, 144. Name = "Aldfrith", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", Father = "oswiu", StartDate = {685, 5, 20}, DeathDate = 704, -- died on 704.12 Deities = {"christian-god"}, HistoricalTitles = { "ruler", {685, 5, 20}, 704, "northumbria" -- succeeded his brother Ecgfrith as king of Northumbria on 685.5.20 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("caedwalla", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 137-138. Name = "Caedwalla", -- "Cædwalla" Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "wessex", -- West Saxon exile StartDate = 686, -- killed king Aethelwalh of Sussex in 686 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("john-of-beverley", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 139. Name = "John", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 686, -- succeeded Eata as bishop of Hexham -- moved to York in 705 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("swithberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 166. Name = "Swithberht", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", -- received consecration from Wilfrid of Northumbria StartDate = 692, -- was consecrated bishop with seat at Wijk bij Duurstede in 692/693 -- partook in a mission to Frisia Deities = {"christian-god"}, HistoricalLocations = { 692, "old_earth", "wijk-bij-duurstede" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("berhtwald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 142, 145. Name = "Berhtwald", Gender = "male", Type = "unit-teuton-priest", -- abbot, and later archbishop Civilization = "anglo-saxon", Faction = "kent", StartDate = {692, 7, 1}, -- became archbishop of Canterbury on 692.7.1, having previously been abbot of Reculver DeathDate = 731, -- died in 731 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("willibrord", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 166-167. Name = "Willibrord", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", -- from Northumbria StartDate = 695, -- was the leader of the mission to Frisia as of 695 -- became bishop of Frisia on 695.11.21, being consecrated by pope Sergius I DeathDate = 739, -- died in 739 in the monastery of Echternach Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("wihtred", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 142. Name = "Wihtred", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "kent", StartDate = 695, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 695, 0, "kent" -- king of Kent as of 695 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent") then return true end return false end }) DefineCharacter("osred", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 91. Name = "Osred", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", Father = "aldfrith", Trait = "upgrade-cruel", -- described as wild, irreligious and tyrannical to his noble subjects StartDate = 697, -- began to rule in 705, when he was eight years old DeathDate = 716, -- murdered in 716 Deities = {"christian-god"}, HistoricalTitles = { "ruler", 705, 716, "northumbria" -- king of Northumbria; began to rule in 705 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("waldhere", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 142, 179. Name = "Waldhere", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "essex", StartDate = 704, -- was bishop of London as of 704 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "middlesex" or GetPlayerData(trigger_player, "Faction") == "essex") then return true end return false end }) DefineCharacter("cenred", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 142. Name = "Cenred", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "mercia", StartDate = 704, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 704, 0, "mercia" -- king of Mercia as of 704/705 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end }) DefineCharacter("acca", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 151. Name = "Acca", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", -- was bishop of Hexham DeathDate = 740, -- died in 740 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("beorhtfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 88. Name = "Beorhtfrith", -- Northumbrian ealdorman Gender = "male", Type = "unit-teuton-heroic-swordsman", -- ealdorman Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 711, -- defeated a Pictish army in the Scottish central plain in 711 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("wynfrith", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 168-169, 171. Name = "Wynfrith", -- also known as Boniface Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "wessex", -- born just before 675 StartDate = 716, -- was the head of the monastic school at a monastery in Nursling in 716, when he left it to go perform missionary work in Frisia -- his mission to Frisia was cancelled due to the pagan Frisians reconquering land from the Franks in 717 -- on 722.11.30 he was consecrated as bishop to the Germans by the pope -- became archbishop in 732 (though without a permanent seat) -- in 747 he settled the seat of his archbishopric at Mainz DeathDate = {754, 6, 5}, -- killed at Dockum by pagans on 754.6.5, while conducting missionary work in Frisia Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("daniel", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 168. Name = "Daniel", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "wessex", StartDate = 718, -- was the bishop of Winchester as of 718 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("willibald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 174-175. Name = "Willibald", Gender = "male", Type = "unit-teuton-priest", -- pilgrim, and later priest, and afterwards bishop Civilization = "anglo-saxon", Faction = "wessex", -- was from eastern Wessex Deities = {"christian-god"}, -- brother of Wynbald and Waldburg StartDate = 720, -- began a pilgrimage to the Middle East in 720 with his brother Wynbald and their father -- returned to Rome in 730 -- became a priest in 740 -- became bishop of Eichstätt in 741 DeathDate = 786, -- died in 786 Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("wynbald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 174-175. Name = "Wynbald", Gender = "male", Type = "unit-teuton-priest", -- pilgrim, and later head of a monastery Civilization = "anglo-saxon", Faction = "wessex", -- was from eastern Wessex Deities = {"christian-god"}, -- brother of Willibald and Waldburg StartDate = 720, -- began a pilgrimage to the Middle East in 720 with his brother Willibald and their father -- by 750 had become the head of a double monastery at Heidenheim together with his sister Waldburg DeathDate = 761, -- died in 761 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("ceolwulf", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 91. Name = "Ceolwulf", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 729, DeathDate = 737, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 729, 737, "northumbria" -- was king of Northumbria between 729 and 737 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("tatwine", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 145, 183. Name = "Tatwine", Gender = "male", Type = "unit-teuton-priest", -- abbot, and later archbishop Civilization = "anglo-saxon", Faction = "kent", -- archbishop of Canterbury, but he was Mercian StartDate = 731, -- became archbishop of Canterbury in 731, having previously been abbot of Breedon, Leicestershire DeathDate = 734, -- died in 734 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent" or GetPlayerData(trigger_player, "Faction") == "mercia" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("bede", { -- Source: Snorri Sturlson, "Heimskringla", 1844, vol. 1, pp. 34; Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 160-161, 185-186. Name = "Bede", Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "northumbria", -- studied at a Northumbrian monastery StartDate = 703, -- wrote "De Temporibus" in 703 -- wrote "De Temporum Ratione" in 725 -- wrote "Historia Ecclesiastica Venerabilis Bedae" in 731 AD Deities = {"christian-god"}, AuthoredWorks = {"upgrade-work-historia-ecclesiastica-venerabilis-bedae"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("eadberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 92. Name = "Eadberht", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 737, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 737, 758, "northumbria" -- succeeded Ceolwulf as king of Northumbria, withdrew from public life in 758, becoming a clerk under his brother Egbert, the archbishop of York }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end -- conquered Kyle and other areas from Strathclyde in 750 -- allied with the Picts in 756 and attacked Alcluith }) DefineCharacter("aethelbald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 92. Name = "Aethelbald", -- "Æthelbald" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "mercia", Deities = {"christian-god"}, HistoricalTitles = { "ruler", 0, 0, "mercia" -- was king of Mercia }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end }) DefineCharacter("offa-of-northumbria", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 92. Name = "Offa", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "northumbria", Father = "aldfrith", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("egbert", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 92, 145, 160-161, 188-189. Name = "Egbert", Gender = "male", Type = "unit-teuton-priest", -- bishop, and later archbishop Civilization = "anglo-saxon", Faction = "northumbria", Deities = {"christian-god"}, -- was Eadberht of Northumbria's brother StartDate = 734, -- was bishop of York in 734, when Bede wrote a letter to him -- became archbishop of York in 735, having been previously bishop of York DeathDate = 767, -- his kinsman Æthelberht became archbishop of York in 767 Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("leofwine", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 169. Name = "Leofwine", -- also known as Lebuin Gender = "male", Type = "unit-teuton-priest", -- bishop, and later missionary Civilization = "anglo-saxon", StartDate = 747, -- was a bishop who worked with Boniface in 747 -- later went to perform missionary work in Frisia -- eventually came to be regarded as a saint Deities = {"christian-god"} }) DefineCharacter("oswulf", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 92. Name = "Oswulf", Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "northumbria", Father = "eadberht", DeathDate = 758, -- killed by his retainers in the summer of 758 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("dynne", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 173. Name = "Dynne", Gender = "male", Type = "unit-teuton-priest", -- unknown, but he was a friend of Boniface, so he could have been a priest or monk Civilization = "anglo-saxon", Faction = "wessex", -- was a West Saxon Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("waldburg", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 175. Name = "Waldburg", Gender = "female", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "wessex", Deities = {"christian-god"}, -- sister of Willibald and Wynbald StartDate = 750, -- by 750 had become the head of a double monastery at Heidenheim together with her brother Willibald Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("leofgyth", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 173. Name = "Leofgyth", Gender = "female", Type = "unit-teuton-priest", -- abbess Civilization = "anglo-saxon", Faction = "wessex", -- her father was a West Saxon Father = "dynne", StartDate = 754, -- was abbess of Tauberbischofsheim as of 754 DeathDate = 780, -- died in 780 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("aethelwald-moll", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 92. Name = "Aethelwald", -- "Æthelwald" FamilyName = "Moll", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 759, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 759, 765, "northumbria" -- became king of Northumbria in 759, lost the throne to Alhred six years later }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("alhred", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 90, 92-93. Name = "Alhred", -- descendant of Ida of Bernicia Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 765, DeathDate = 774, -- end of reign Deities = {"christian-god"}, HistoricalTitles = { "ruler", 765, 774, "northumbria" -- king of Northumbria between 765 and 774; in 774 lost the throne by a formal act of the nobility and his own household }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("aluberht", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 175. Name = "Aluberht", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", Deities = {"christian-god"}, StartDate = 767, -- became bishop of the Old Saxons in 767, being consecrated at York Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("aethelberht-of-york", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 188-189. Name = "Aethelberht", -- "Æthelberht" Gender = "male", Type = "unit-teuton-priest", -- archbishop Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 767, -- became archbishop of York in 767 DeathDate = 780, -- resigned as archbishop in 780 Deities = {"christian-god"}, HistoricalLocations = { 767, "old_earth", "york" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("alcuin", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 90, 188-189. Name = "Alcuin", -- Northumbrian scholar who made the school of York famous Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "francia", Deities = {"christian-god"}, StartDate = 767, -- became encharged with the direction of the school of York in 767 -- moved from England to the court of Charlemagne in 782, and received the abbeys of Ferrières and St. Lupus at Troyes -- received the greater abbey of St. Martin at Tours from Charlemagne in 796 DeathDate = 804, -- died in 804 HistoricalLocations = { 767, "old_earth", "york" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("torhtmund", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 90. Name = "Torhtmund", -- Minister of the Northumbrian king Æthelred Moll, Torhtmund killed the king's murderer Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", Faction = "northumbria", Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end -- was introduced by Alcuin to Charlemagne }) DefineCharacter("aethelred-moll", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 93-94. Name = "Aethelred", -- "Æthelred" FamilyName = "Moll", Trait = "upgrade-cruel", -- treacherous and merciless Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", Father = "aethelwald-moll", StartDate = 774, DeathDate = 796, -- murdered Deities = {"christian-god"}, HistoricalTitles = { "ruler", 774, 779, "northumbria", -- became king of Northumbria after Alhred was deposed, was expelled in 779 from Northumbria by Ælfwald "ruler", 789, 796, "northumbria" -- was restored to the throne within a year after Ælfwald's reign ended }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end -- married a daughter of Offa, king of Mercia, in 792 }) DefineCharacter("aelfwald", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 90, 93. Name = "Aelfwald", -- "Ælfwald"; grandson of Eadberht Trait = "upgrade-pious", -- considered just and pious Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 779, -- expelled Æthelred Moll from Northumbria DeathDate = 788, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 779, 788, "northumbria" -- king of Northumbria between 779 and 788 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("willehad", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 175-176. Name = "Willehad", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "northumbria", Deities = {"christian-god"}, StartDate = 780, -- went to preach to the Saxons between the Elbe and the Weser at the behest of Charlemagne in 780 -- became bishop of Bremen in 785 DeathDate = 789, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("offa-of-mercia", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 93. Name = "Offa", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "mercia", StartDate = 792, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 792, 0, "mercia" -- was king of Mercia in 792 when Æthelred Moll married a daughter of his }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end }) DefineCharacter("eardwulf", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, pp. 94-95. Name = "Eardwulf", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", StartDate = 801, DeathDate = 810, -- died Deities = {"christian-god"}, HistoricalTitles = { "ruler", 801, 808, "northumbria", -- was king of Northumbia in 801 when he invaded Mercia; in the spring of 808 he was expelled from Northumbria "ruler", 808, 810, "northumbria" -- was restored as king in the same year of being expelled, with the support of Charlemagne and Pope Leo III; died in or before 810 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("cenwulf", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 94. Name = "Cenwulf", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "mercia", StartDate = 801, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 801, 0, "mercia" -- was king of Mercia in 801 when Eardwulf of Northumbria invaded it }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "mercia") then return true end return false end }) DefineCharacter("sigulf-of-ferrieres", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 189. Name = "Sigulf", -- Northumbrian pupil of Alcuin Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "francia", Deities = {"christian-god"}, StartDate = 804, -- succeeded Alcuin to the abbey of Ferrières when he died in 804 HistoricalLocations = { 804, "old_earth", "ferrieres" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("frithugisl", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 189. Name = "Frithugisl", -- Anglo-Saxon pupil of Alcuin Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", Faction = "francia", Deities = {"christian-god"}, StartDate = 804, -- succeeded Alcuin to the greater abbey of St. Martin at Tours when he died in 804 HistoricalLocations = { 804, "old_earth", "tours" }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then -- Alcuin's place of origin return true end return false end }) DefineCharacter("eanred", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 95. Name = "Eanred", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "northumbria", Father = "eardwulf", StartDate = 810, DeathDate = 840, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 810, 840, "northumbria" -- succeeded Eardwulf as king of Northumbria, and ruled for thirty years }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "northumbria") then return true end return false end }) DefineCharacter("wulfred", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 36. Name = "Wulfred", Gender = "male", Type = "unit-teuton-priest", -- archbishop of Canterbury Civilization = "anglo-saxon", Faction = "kent", Deities = {"christian-god"}, StartDate = 811, -- archbishop of Canterbury in 811 Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "kent" or GetPlayerData(trigger_player, "Faction") == "englaland") then return true end return false end }) DefineCharacter("egbert-of-wessex", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 95. Name = "Egbert", Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "wessex", StartDate = 829, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 829, 0, "wessex" -- was king of Wessex in 829 when Eanred of Northumbria submitted to him }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("swithun", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 147. Name = "Swithun", Gender = "male", Type = "unit-teuton-priest", -- bishop Civilization = "anglo-saxon", Faction = "wessex", StartDate = 858, -- was bishop at Winchester as of 858 Deities = {"christian-god"}, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) DefineCharacter("aethelbald-of-wessex", { -- Source: Frank Stenton, "Anglo-Saxon England", 1971, p. 147. Name = "Aethelbald", -- "Æthelbald" Gender = "male", Type = "unit-teuton-heroic-swordsman", -- king Civilization = "anglo-saxon", Faction = "wessex", StartDate = 858, Deities = {"christian-god"}, HistoricalTitles = { "ruler", 858, 0, "wessex" -- was king of Wessex as of 858 }, Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "wessex") then return true end return false end }) --[[ DefineCharacter("ethelred", { -- Source: Snorri Sturlson, "Heimskringla", 1844, vol. 1, p. 127. Name = "Ethelred", -- did the massacre of the Danes in 1002 AD Gender = "male", Type = "unit-teuton-swordsman", Civilization = "anglo-saxon", StartDate = 1002, -- massacred the Danes in 1002 Deities = {"christian-god"} }) DefineCharacter("nicolas-breakspear", { -- Source: Snorri Sturlson, "Heimskringla", 1844, vol. 1, p. 126. Name = "Nicolas", -- son of a peasant employed in the Benedictine monastery of Saint Albans in Hertfordshire; was educated by the monks there; later became a cardinal and was sent on a mission to Norway to settle the Church there; was elected Pope in 1154 AD under the title of Hadrian IV Surname = "Breakspear", -- I assume this isn't his family name, but a nickname or something of the sort Gender = "male", Type = "unit-teuton-priest", Civilization = "anglo-saxon", -- English? Faction = "england", Deities = {"christian-god"}, StartDate = 1154, -- elected Pope Conditions = function(s) if (GetPlayerData(trigger_player, "Faction") == "england") then return true end return false end }) --]]
gpl-2.0
TheAnswer/FirstTest
bin/scripts/slashcommands/admin/completeQuest.lua
1
2449
--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 CompleteQuestSlashCommand = { name = "completequest", alternativeNames = "", animation = "", invalidStateMask = 2097152, --glowingJedi, invalidPostures = "", target = 2, targeType = 1, disabled = 0, maxRangeToTarget = 0, --adminLevel = 0, addToCombatQueue = 0, } AddCompleteQuestSlashCommand(CompleteQuestSlashCommand)
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/items/objects/weapons/carbines/ee3CarbineElite.lua
1
2422
--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. ee3CarbineElite = Weapon:new{ objectName = "EE3 Carbine Elite", templateName = "object/weapon/ranged/carbine/shared_carbine_ee3.iff", objectCRC = 749154215, objectType = CARBINE, damageType = WEAPON_HEAT, certification = "cert_carbine_ee3", attackSpeed = 3.1, minDamage = 128, maxDamage = 241 }
lgpl-3.0
Mizugola/MeltingSagaEngine
engine/Lib/Extlibs/pl/array2d.lua
5
13419
--- Operations on two-dimensional arrays. -- See @{02-arrays.md.Operations_on_two_dimensional_tables|The Guide} -- -- Dependencies: `pl.utils`, `pl.tablex`, `pl.types` -- @module pl.array2d local type,tonumber,assert,tostring,io,ipairs,string,table = _G.type,_G.tonumber,_G.assert,_G.tostring,_G.io,_G.ipairs,_G.string,_G.table local setmetatable,getmetatable = setmetatable,getmetatable local tablex = require 'Lib.Extlibs.pl.tablex' local utils = require 'Lib.Extlibs.pl.utils' local types = require 'Lib.Extlibs.pl.types' local imap,tmap,reduce,keys,tmap2,tset,index_by = tablex.imap,tablex.map,tablex.reduce,tablex.keys,tablex.map2,tablex.set,tablex.index_by local remove = table.remove local splitv,fprintf,assert_arg = utils.splitv,utils.fprintf,utils.assert_arg local byte = string.byte local stdout = io.stdout local array2d = {} local function obj (int,out) local mt = getmetatable(int) if mt then setmetatable(out,mt) end return out end local function makelist (res) return setmetatable(res, require('Lib.Extlibs.pl.List')) end local function index (t,k) return t[k] end --- return the row and column size. -- @array2d t a 2d array -- @treturn int number of rows -- @treturn int number of cols function array2d.size (t) assert_arg(1,t,'table') return #t,#t[1] end --- extract a column from the 2D array. -- @array2d a 2d array -- @param key an index or key -- @return 1d array function array2d.column (a,key) assert_arg(1,a,'table') return makelist(imap(index,a,key)) end local column = array2d.column --- map a function over a 2D array -- @func f a function of at least one argument -- @array2d a 2d array -- @param arg an optional extra argument to be passed to the function. -- @return 2d array function array2d.map (f,a,arg) assert_arg(1,a,'table') f = utils.function_arg(1,f) return obj(a,imap(function(row) return imap(f,row,arg) end, a)) end --- reduce the rows using a function. -- @func f a binary function -- @array2d a 2d array -- @return 1d array -- @see pl.tablex.reduce function array2d.reduce_rows (f,a) assert_arg(1,a,'table') return tmap(function(row) return reduce(f,row) end, a) end --- reduce the columns using a function. -- @func f a binary function -- @array2d a 2d array -- @return 1d array -- @see pl.tablex.reduce function array2d.reduce_cols (f,a) assert_arg(1,a,'table') return tmap(function(c) return reduce(f,column(a,c)) end, keys(a[1])) end --- reduce a 2D array into a scalar, using two operations. -- @func opc operation to reduce the final result -- @func opr operation to reduce the rows -- @param a 2D array function array2d.reduce2 (opc,opr,a) assert_arg(3,a,'table') local tmp = array2d.reduce_rows(opr,a) return reduce(opc,tmp) end local function dimension (t) return type(t[1])=='table' and 2 or 1 end --- map a function over two arrays. -- They can be both or either 2D arrays -- @func f function of at least two arguments -- @int ad order of first array (1 or 2) -- @int bd order of second array (1 or 2) -- @tab a 1d or 2d array -- @tab b 1d or 2d array -- @param arg optional extra argument to pass to function -- @return 2D array, unless both arrays are 1D function array2d.map2 (f,ad,bd,a,b,arg) assert_arg(1,a,'table') assert_arg(2,b,'table') f = utils.function_arg(1,f) if ad == 1 and bd == 2 then return imap(function(row) return tmap2(f,a,row,arg) end, b) elseif ad == 2 and bd == 1 then return imap(function(row) return tmap2(f,row,b,arg) end, a) elseif ad == 1 and bd == 1 then return tmap2(f,a,b) elseif ad == 2 and bd == 2 then return tmap2(function(rowa,rowb) return tmap2(f,rowa,rowb,arg) end, a,b) end end --- cartesian product of two 1d arrays. -- @func f a function of 2 arguments -- @array t1 a 1d table -- @array t2 a 1d table -- @return 2d table -- @usage product('..',{1,2},{'a','b'}) == {{'1a','2a'},{'1b','2b'}} function array2d.product (f,t1,t2) f = utils.function_arg(1,f) assert_arg(2,t1,'table') assert_arg(3,t2,'table') local res, map = {}, tablex.map for i,v in ipairs(t2) do res[i] = map(f,t1,v) end return res end --- flatten a 2D array. -- (this goes over columns first.) -- @array2d t 2d table -- @return a 1d table -- @usage flatten {{1,2},{3,4},{5,6}} == {1,2,3,4,5,6} function array2d.flatten (t) local res = {} local k = 1 for _,a in ipairs(t) do -- for all rows for i = 1,#a do res[k] = a[i] k = k + 1 end end return makelist(res) end --- reshape a 2D array. -- @array2d t 2d array -- @int nrows new number of rows -- @bool co column-order (Fortran-style) (default false) -- @return a new 2d array function array2d.reshape (t,nrows,co) local nr,nc = array2d.size(t) local ncols = nr*nc / nrows local res = {} local ir,ic = 1,1 for i = 1,nrows do local row = {} for j = 1,ncols do row[j] = t[ir][ic] if not co then ic = ic + 1 if ic > nc then ir = ir + 1 ic = 1 end else ir = ir + 1 if ir > nr then ic = ic + 1 ir = 1 end end end res[i] = row end return obj(t,res) end --- swap two rows of an array. -- @array2d t a 2d array -- @int i1 a row index -- @int i2 a row index function array2d.swap_rows (t,i1,i2) assert_arg(1,t,'table') t[i1],t[i2] = t[i2],t[i1] end --- swap two columns of an array. -- @array2d t a 2d array -- @int j1 a column index -- @int j2 a column index function array2d.swap_cols (t,j1,j2) assert_arg(1,t,'table') for i = 1,#t do local row = t[i] row[j1],row[j2] = row[j2],row[j1] end end --- extract the specified rows. -- @array2d t 2d array -- @tparam {int} ridx a table of row indices function array2d.extract_rows (t,ridx) return obj(t,index_by(t,ridx)) end --- extract the specified columns. -- @array2d t 2d array -- @tparam {int} cidx a table of column indices function array2d.extract_cols (t,cidx) assert_arg(1,t,'table') local res = {} for i = 1,#t do res[i] = index_by(t[i],cidx) end return obj(t,res) end --- remove a row from an array. -- @function array2d.remove_row -- @array2d t a 2d array -- @int i a row index array2d.remove_row = remove --- remove a column from an array. -- @array2d t a 2d array -- @int j a column index function array2d.remove_col (t,j) assert_arg(1,t,'table') for i = 1,#t do remove(t[i],j) end end local Ai = byte 'A' local function _parse (s) local c,r if s:sub(1,1) == 'R' then r,c = s:match 'R(%d+)C(%d+)' r,c = tonumber(r),tonumber(c) else c,r = s:match '(.)(.)' c = byte(c) - byte 'A' + 1 r = tonumber(r) end assert(c ~= nil and r ~= nil,'bad cell specifier: '..s) return r,c end --- parse a spreadsheet range. -- The range can be specified either as 'A1:B2' or 'R1C1:R2C2'; -- a special case is a single element (e.g 'A1' or 'R1C1') -- @string s a range. -- @treturn int start col -- @treturn int start row -- @treturn int end col -- @treturn int end row function array2d.parse_range (s) if s:find ':' then local start,finish = splitv(s,':') local i1,j1 = _parse(start) local i2,j2 = _parse(finish) return i1,j1,i2,j2 else -- single value local i,j = _parse(s) return i,j end end --- get a slice of a 2D array using spreadsheet range notation. @see parse_range -- @array2d t a 2D array -- @string rstr range expression -- @return a slice -- @see array2d.parse_range -- @see array2d.slice function array2d.range (t,rstr) assert_arg(1,t,'table') local i1,j1,i2,j2 = array2d.parse_range(rstr) if i2 then return array2d.slice(t,i1,j1,i2,j2) else -- single value return t[i1][j1] end end local function default_range (t,i1,j1,i2,j2) local nr, nc = array2d.size(t) i1,j1 = i1 or 1, j1 or 1 i2,j2 = i2 or nr, j2 or nc if i2 < 0 then i2 = nr + i2 + 1 end if j2 < 0 then j2 = nc + j2 + 1 end return i1,j1,i2,j2 end --- get a slice of a 2D array. Note that if the specified range has -- a 1D result, the rank of the result will be 1. -- @array2d t a 2D array -- @int i1 start row (default 1) -- @int j1 start col (default 1) -- @int i2 end row (default N) -- @int j2 end col (default M) -- @return an array, 2D in general but 1D in special cases. function array2d.slice (t,i1,j1,i2,j2) assert_arg(1,t,'table') i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) local res = {} for i = i1,i2 do local val local row = t[i] if j1 == j2 then val = row[j1] else val = {} for j = j1,j2 do val[#val+1] = row[j] end end res[#res+1] = val end if i1 == i2 then res = res[1] end return obj(t,res) end --- set a specified range of an array to a value. -- @array2d t a 2D array -- @param value the value (may be a function) -- @int i1 start row (default 1) -- @int j1 start col (default 1) -- @int i2 end row (default N) -- @int j2 end col (default M) -- @see tablex.set function array2d.set (t,value,i1,j1,i2,j2) i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) for i = i1,i2 do tset(t[i],value,j1,j2) end end --- write a 2D array to a file. -- @array2d t a 2D array -- @param f a file object (default stdout) -- @string fmt a format string (default is just to use tostring) -- @int i1 start row (default 1) -- @int j1 start col (default 1) -- @int i2 end row (default N) -- @int j2 end col (default M) function array2d.write (t,f,fmt,i1,j1,i2,j2) assert_arg(1,t,'table') f = f or stdout local rowop if fmt then rowop = function(row,j) fprintf(f,fmt,row[j]) end else rowop = function(row,j) f:write(tostring(row[j]),' ') end end local function newline() f:write '\n' end array2d.forall(t,rowop,newline,i1,j1,i2,j2) end --- perform an operation for all values in a 2D array. -- @array2d t 2D array -- @func row_op function to call on each value -- @func end_row_op function to call at end of each row -- @int i1 start row (default 1) -- @int j1 start col (default 1) -- @int i2 end row (default N) -- @int j2 end col (default M) function array2d.forall (t,row_op,end_row_op,i1,j1,i2,j2) assert_arg(1,t,'table') i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) for i = i1,i2 do local row = t[i] for j = j1,j2 do row_op(row,j) end if end_row_op then end_row_op(i) end end end local min, max = math.min, math.max ---- move a block from the destination to the source. -- @array2d dest a 2D array -- @int di start row in dest -- @int dj start col in dest -- @array2d src a 2D array -- @int i1 start row (default 1) -- @int j1 start col (default 1) -- @int i2 end row (default N) -- @int j2 end col (default M) function array2d.move (dest,di,dj,src,i1,j1,i2,j2) assert_arg(1,dest,'table') assert_arg(4,src,'table') i1,j1,i2,j2 = default_range(src,i1,j1,i2,j2) local nr,nc = array2d.size(dest) i2, j2 = min(nr,i2), min(nc,j2) --i1, j1 = max(1,i1), max(1,j1) dj = dj - 1 for i = i1,i2 do local drow, srow = dest[i+di-1], src[i] for j = j1,j2 do drow[j+dj] = srow[j] end end end --- iterate over all elements in a 2D array, with optional indices. -- @array2d a 2D array -- @tparam {int} indices with indices (default false) -- @int i1 start row (default 1) -- @int j1 start col (default 1) -- @int i2 end row (default N) -- @int j2 end col (default M) -- @return either value or i,j,value depending on indices function array2d.iter (a,indices,i1,j1,i2,j2) assert_arg(1,a,'table') local norowset = not (i2 and j2) i1,j1,i2,j2 = default_range(a,i1,j1,i2,j2) local n,i,j = i2-i1+1,i1-1,j1-1 local row,nr = nil,0 local onr = j2 - j1 + 1 return function() j = j + 1 if j > nr then j = j1 i = i + 1 if i > i2 then return nil end row = a[i] nr = norowset and #row or onr end if indices then return i,j,row[j] else return row[j] end end end --- iterate over all columns. -- @array2d a a 2D array -- @return each column in turn function array2d.columns (a) assert_arg(1,a,'table') local n = a[1][1] local i = 0 return function() i = i + 1 if i > n then return nil end return column(a,i) end end --- new array of specified dimensions -- @int rows number of rows -- @int cols number of cols -- @param val initial value; if it's a function then use `val(i,j)` -- @return new 2d array function array2d.new(rows,cols,val) local res = {} local fun = types.is_callable(val) for i = 1,rows do local row = {} if fun then for j = 1,cols do row[j] = val(i,j) end else for j = 1,cols do row[j] = val end end res[i] = row end return res end return array2d
mit
weiDDD/WSSParticleSystem
cocos2d/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua
1
1107
-------------------------------- -- @module EaseBounceOut -- @extend EaseBounce -- @parent_module cc -------------------------------- -- brief Create the action with the inner action.<br> -- param action The pointer of the inner action.<br> -- return A pointer of EaseBounceOut action. If creation failed, return nil. -- @function [parent=#EaseBounceOut] create -- @param self -- @param #cc.ActionInterval action -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- -- -- @function [parent=#EaseBounceOut] clone -- @param self -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- -- -- @function [parent=#EaseBounceOut] update -- @param self -- @param #float time -- @return EaseBounceOut#EaseBounceOut self (return value: cc.EaseBounceOut) -------------------------------- -- -- @function [parent=#EaseBounceOut] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) return nil
apache-2.0
TheAnswer/FirstTest
bin/scripts/object/tangible/hair/human/objects.lua
1
103827
--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_hair_human_shared_hair_human_female_s01 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s01.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s01, 3485410635) object_tangible_hair_human_shared_hair_human_female_s02 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s02.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s02, 346590684) object_tangible_hair_human_shared_hair_human_female_s03 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s03.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s03, 1571154513) object_tangible_hair_human_shared_hair_human_female_s04 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s04.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s04, 2789654853) object_tangible_hair_human_shared_hair_human_female_s05 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s05.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s05, 4014712520) object_tangible_hair_human_shared_hair_human_female_s06 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s06.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s06, 878448223) object_tangible_hair_human_shared_hair_human_female_s07 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s07.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s07, 2102487506) object_tangible_hair_human_shared_hair_human_female_s08 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s08.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s08, 3344647616) object_tangible_hair_human_shared_hair_human_female_s09 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s09.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s09, 2388009549) object_tangible_hair_human_shared_hair_human_female_s10 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s10.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s10, 2644135870) object_tangible_hair_human_shared_hair_human_female_s11 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s11.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s11, 3566676019) object_tangible_hair_human_shared_hair_human_female_s12 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s12.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s12, 260079780) object_tangible_hair_human_shared_hair_human_female_s14 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s14.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s14, 3178155069) object_tangible_hair_human_shared_hair_human_female_s15 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s15.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s15, 4100172720) object_tangible_hair_human_shared_hair_human_female_s16 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s16.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s16, 796132135) object_tangible_hair_human_shared_hair_human_female_s17 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s17.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s17, 1719231658) object_tangible_hair_human_shared_hair_human_female_s18 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s18.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s18, 3698542776) object_tangible_hair_human_shared_hair_human_female_s19 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s19.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s19, 2508074805) object_tangible_hair_human_shared_hair_human_female_s20 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s20.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s20, 2967623734) object_tangible_hair_human_shared_hair_human_female_s21 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s21.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s21, 4193206203) object_tangible_hair_human_shared_hair_human_female_s22 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s22.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s22, 586716972) object_tangible_hair_human_shared_hair_human_female_s23 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s23.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s23, 1811280033) object_tangible_hair_human_shared_hair_human_female_s24 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s24.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s24, 2417417141) object_tangible_hair_human_shared_hair_human_female_s25 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s25.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s25, 3642473528) object_tangible_hair_human_shared_hair_human_female_s26 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s26.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s26, 34346159) object_tangible_hair_human_shared_hair_human_female_s27 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s27.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s27, 1258386210) object_tangible_hair_human_shared_hair_human_female_s30 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s30.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s30, 2882164046) object_tangible_hair_human_shared_hair_human_female_s31 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s31.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s31, 3804705475) object_tangible_hair_human_shared_hair_human_female_s32 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s32.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s32, 969972308) object_tangible_hair_human_shared_hair_human_female_s34 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s34.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s34, 2336151245) object_tangible_hair_human_shared_hair_human_female_s35 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s35.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s35, 3258167616) object_tangible_hair_human_shared_hair_human_female_s36 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s36.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s36, 421796311) object_tangible_hair_human_shared_hair_human_female_s37 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s37.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s37, 1344896602) object_tangible_hair_human_shared_hair_human_female_s38 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s38.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s38, 3928183368) object_tangible_hair_human_shared_hair_human_female_s39 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s39.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s39, 2737714629) object_tangible_hair_human_shared_hair_human_female_s40 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s40.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s40, 3927078694) object_tangible_hair_human_shared_hair_human_female_s41 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s41.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s41, 2736722091) object_tangible_hair_human_shared_hair_human_female_s42 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_f_hair_s42.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_female_s42, 2013837372) object_tangible_hair_human_shared_hair_human_male_s01 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s01.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s01, 2377331336) object_tangible_hair_human_shared_hair_human_male_s02 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s02.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s02, 1453627935) object_tangible_hair_human_shared_hair_human_male_s03 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s03.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s03, 531234194) object_tangible_hair_human_shared_hair_human_male_s04 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s04.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s04, 3830109830) object_tangible_hair_human_shared_hair_human_male_s05 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s05.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s05, 2907156747) object_tangible_hair_human_shared_hair_human_male_s06 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s06.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s06, 1984960924) object_tangible_hair_human_shared_hair_human_male_s07 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s07.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s07, 1063091729) object_tangible_hair_human_shared_hair_human_male_s08 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s08.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s08, 2237092355) object_tangible_hair_human_shared_hair_human_male_s09 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s09.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s09, 3428464014) object_tangible_hair_human_shared_hair_human_male_s10 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s10.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s10, 3751172221) object_tangible_hair_human_shared_hair_human_male_s11 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s11.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s11, 2526756848) object_tangible_hair_human_shared_hair_human_male_s12 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s12.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s12, 1301059431) object_tangible_hair_human_shared_hair_human_male_s13 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s13.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s13, 75624682) object_tangible_hair_human_shared_hair_human_male_s14 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s14.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s14, 4284668926) object_tangible_hair_human_shared_hair_human_male_s15 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s15.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s15, 3060776051) object_tangible_hair_human_shared_hair_human_male_s16 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s16.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s16, 1836586212) object_tangible_hair_human_shared_hair_human_male_s17 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s17.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s17, 611677033) object_tangible_hair_human_shared_hair_human_male_s18 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s18.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s18, 2659147643) object_tangible_hair_human_shared_hair_human_male_s19 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s19.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s19, 3614587126) object_tangible_hair_human_shared_hair_human_male_s20 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s20.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s20, 4075704309) object_tangible_hair_human_shared_hair_human_male_s21 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s21.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s21, 3152226424) object_tangible_hair_human_shared_hair_human_male_s22 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s22.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s22, 1626636527) object_tangible_hair_human_shared_hair_human_male_s23 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s23.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s23, 704243554) object_tangible_hair_human_shared_hair_human_male_s24 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s24.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s24, 3524971638) object_tangible_hair_human_shared_hair_human_male_s25 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s25.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s25, 2602019835) object_tangible_hair_human_shared_hair_human_male_s26 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s26.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s26, 1073742700) object_tangible_hair_human_shared_hair_human_male_s27 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s27.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s27, 151872737) object_tangible_hair_human_shared_hair_human_male_s28 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s28.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s28, 3003599091) object_tangible_hair_human_shared_hair_human_male_s29 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s29.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s29, 4194971518) object_tangible_hair_human_shared_hair_human_male_s30 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s30.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s30, 3922084493) object_tangible_hair_human_shared_hair_human_male_s31 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s31.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s31, 2697667840) object_tangible_hair_human_shared_hair_human_male_s32 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s32.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s32, 2078051735) object_tangible_hair_human_shared_hair_human_male_s33 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s33.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s33, 852617754) object_tangible_hair_human_shared_hair_human_male_s34 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s34.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s34, 3375546638) object_tangible_hair_human_shared_hair_human_male_s35 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s35.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s35, 2151655043) object_tangible_hair_human_shared_hair_human_male_s37 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s37.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s37, 304441753) object_tangible_hair_human_shared_hair_human_male_s38 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s38.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s38, 2821670283) object_tangible_hair_human_shared_hair_human_male_s39 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s39.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s39, 3777110534) object_tangible_hair_human_shared_hair_human_male_s40 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s40.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s40, 2820563173) object_tangible_hair_human_shared_hair_human_male_s41 = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/hum_m_hair_s41.sat", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hair.iff", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@hair_detail:hair", gameObjectType = 8211, locationReservationRadius = 0, lookAtText = "@hair_lookat:hair", noBuildRadius = 0, objectName = "@hair_name:hair", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_hair_human_shared_hair_human_male_s41, 3776120680)
lgpl-3.0
yannayl/packages
net/wifidog-ng/files/wifidog-ng/heartbeat.lua
22
1457
--[[ Copyright (C) 2018 Jianhui Zhao <jianhuizhao329@gmail.com> 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.1 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 library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --]] local uloop = require "uloop" local http = require "socket.http" local util = require "wifidog-ng.util" local config = require "wifidog-ng.config" local M = {} local timer = nil local start_time = os.time() local function heartbeat() local cfg = config.get() timer:set(1000 * cfg.checkinterval) local sysinfo = util.ubus("system", "info") local url = string.format("%s&sys_uptime=%d&sys_memfree=%d&sys_load=%d&wifidog_uptime=%d", cfg.ping_url, sysinfo.uptime, sysinfo.memory.free, sysinfo.load[1], os.time() - start_time) http.request(url) end function M.start() timer = uloop.timer(heartbeat, 1000) end return M
gpl-2.0
JarnoVgr/ZombieSurvival
gamemodes/zombiesurvival/gamemode/sv_profiling.lua
1
7271
-- This system creates nodes which can be used to spawn dynamic objectives. GM.ProfilerNodes = {} GM.ProfilerFolder = "zsprofiler" GM.ProfilerFolderPreMade = "profiler_premade" GM.MaxProfilerNodes = 128 hook.Add("Initialize", "ZSProfiler", function() file.CreateDir(GAMEMODE.ProfilerFolder) file.CreateDir(GAMEMODE.ProfilerFolderPreMade) end) local mapname = string.lower(game.GetMap()) if file.Exists(GM.ProfilerFolderPreMade.."/"..mapname..".txt", "DATA") then GM.ProfilerIsPreMade = true GM.ProfilerNodes = Deserialize(file.Read(GM.ProfilerFolderPreMade.."/"..mapname..".txt", "DATA")) SRL = nil elseif file.Exists(GM.FolderName.."/gamemode/"..GM.ProfilerFolderPreMade.."/"..mapname..".lua", "LUA") then include(GM.ProfilerFolderPreMade.."/"..mapname..".lua") GM.ProfilerIsPreMade = true GM.ProfilerNodes = SRL or GM.ProfilerNodes SRL = nil end function GM:ClearProfiler() if not self:ProfilerEnabled() then return end self:SaveProfiler() end function GM:SaveProfilerPreMade(tab) file.Write(self:GetProfilerFilePreMade(), Serialize(tab)) end function GM:DeleteProfilerPreMade() file.Delete(self:GetProfilerFilePreMade()) end function GM:SaveProfiler() if not self:ProfilerEnabled() or self.ProfilerIsPreMade then return end file.Write(self:GetProfilerFile(), Serialize(self.ProfilerNodes)) end function GM:LoadProfiler() if not self:ProfilerEnabled() or self.ProfilerIsPreMade then return end local filename = self:GetProfilerFile() if file.Exists(filename, "DATA") then self.ProfilerNodes = Deserialize(file.Read(filename, "DATA")) end end function GM:GetProfilerFile() return self.ProfilerFolder.."/"..string.lower(game.GetMap())..".txt" end function GM:GetProfilerFilePreMade() return self.ProfilerFolderPreMade.."/"..string.lower(game.GetMap())..".txt" end function GM:ProfilerEnabled() return not self.ZombieEscape and not self.ObjectiveMap end function GM:NeedsProfiling() return #self.ProfilerNodes <= self.MaxProfilerNodes and not self.ProfilerIsPreMade end function GM:DebugProfiler() for _, node in pairs(self.ProfilerNodes) do local spawned = false for __, e in pairs(ents.FindByClass("prop_dynamic*")) do if e.IsNode and e:GetPos() == node then spawned = true end end if not spawned then local ent = ents.Create("prop_dynamic_override") if ent:IsValid() then ent:SetModel("models/player/breen.mdl") ent:SetKeyValue("solid", "0") ent:SetColor(Color(255, 0, 0)) ent:SetPos(node) ent:Spawn() ent.IsNode = true end end end end local playerheight = Vector(0, 0, 92) local playermins = Vector(-24, -24, 0) local playermaxs = Vector(24, 24, 4) local vecsky = Vector(0, 0, 32000) local function SkewedDistance(a, b, skew) if a.z > b.z then return math.sqrt((b.x - a.x) ^ 2 + (b.y - a.y) ^ 2 + ((a.z - b.z) * skew) ^ 2) end return a:Distance(b) end function GM:ProfilerPlayerValid(pl) -- Preliminary checks. We need to mark players as incompatible when they do certain things. if pl.NoProfiling then return false end -- Basic checks (movement, etc.) if not (pl:Team() == TEAM_HUMAN and pl:Alive() and pl:GetMoveType() == MOVETYPE_WALK and not pl:Crouching() and pl:OnGround() and pl:IsOnGround() and pl:GetGroundEntity() == game.GetWorld()) then return false end local plcenter = pl:LocalToWorld(pl:OBBCenter()) local plpos = pl:GetPos() -- Are they near another node? for _, node in pairs(self.ProfilerNodes) do if SkewedDistance(node, plpos, 3) <= 128 then --print('near') return false end end -- Are they inside something? local pos = plpos + Vector(0, 0, 1) if util.TraceHull({start = pos, endpos = pos + playerheight, mins = playermins, maxs = playermaxs, mask = MASK_SOLID, filter = team.GetPlayers(pl:Team())}).Hit then --print('inside') return false end -- Are they near a trigger hurt? for _, ent in pairs(ents.FindInSphere(plcenter, 256)) do local entclass = ent:GetClass() if entclass == "trigger_hurt" then --print('trigger hurt') return false end end -- What about zombie spawns? for _, ent in pairs(team.GetValidSpawnPoint(TEAM_UNDEAD)) do if ent:GetPos():Distance(plcenter) < 420 then --print('near spawn') return false end end -- Time for the more complicated stuff. local trace = {start = plcenter, endpos = plcenter + vecsky, mins = playermins, maxs = playermaxs, mask = MASK_SOLID_BRUSHONLY} local trsky = util.TraceHull(trace) if trsky.HitSky or trsky.HitNoDraw then --print('outside') return false end -- Check to see if they're near a window or the entrance of somewhere. This also doubles as a check for long hallways. local ang = Angle(0, 0, 0) for t = 0, 359, 15 do ang.yaw = t for d = 32, 92, 24 do trace.start = plcenter + ang:Forward() * d trace.endpos = trace.start + Vector(0, 0, 640) local tr = util.TraceHull(trace) if not tr.Hit or tr.HitNormal.z > -0.65 then --print('not hit ceiling') return false end trace.endpos = trace.start + Vector(0, 0, -64) local tr = util.TraceHull(trace) if not tr.Hit or tr.HitNormal.z < 0.65 then --print('not hit floor') return false end end end -- Are they outside? --[[local trace = {start = plcenter, endpos = plcenter + vecsky, mins = playermins, maxs = playermaxs, mask = MASK_SOLID_BRUSHONLY} local trsky = util.TraceHull(trace) if trsky.HitSky or trsky.HitNoDraw then --print('outside') return false end -- Check to see if they're near a window or the entrance of somewhere. This also doubles as a check for long hallways. local ang = Angle(-30, 0, 0) for t = 0, 359, 15 do ang.yaw = t trace.endpos = trace.start + ang:Forward() * 350 local tr = util.TraceLine(trace) if not tr.Hit then --print('not hit ceiling') return false end end local ang = Angle(-50, 0, 0) for t = 0, 359, 15 do ang.yaw = t trace.endpos = trace.start + ang:Forward() * 300 local tr = util.TraceLine(trace) if tr.Fraction == 0 or tr.HitSky or tr.HitNoDraw or tr.HitNormal.z > -0.65 then print('fractions differ') return false end end -- Check to make sure the floor is even all around. local ang = Angle(55, 0, 0) local floordist = playerheight.z for t = 0, 359, 15 do ang.yaw = t trace.endpos = trace.start + ang:Forward() * floordist local tr = util.TraceLine(trace) if not tr.Hit then --print('floor uneven') return false end end]] --print('valid') return true end function GM:ProfilerTick() if not self:ProfilerEnabled() or not self:NeedsProfiling() then return end local changed = false for _, pl in pairs(player.GetAll()) do if not self:ProfilerPlayerValid(pl) then continue end table.insert(self.ProfilerNodes, pl:GetPos()) changed = true end if changed then self:SaveProfiler() --self:--DebugProfiler() end end timer.Create("ZSProfiler", 3, 0, function() GAMEMODE:ProfilerTick() end) hook.Add("OnWaveStateChanged", "ZSProfiler", function() -- Only profile during start if GAMEMODE:GetWave() > 0 then timer.Destroy("ZSProfiler") end end)
gpl-2.0
yannayl/packages
net/dynapoint/src/dynapoint.lua
94
6369
#!/usr/bin/lua --[[ Copyright (C) 2016 Tobias Ilte <tobias.ilte@campus.tu-berlin.de> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --]] require "uci" require "ubus" require "uloop" log = require "nixio" --open sys-logging log.openlog("DynaPoint", "ndelay", "cons", "nowait"); local uci_cursor = uci.cursor() -- get all config sections with the given type function getConfType(conf_file,type) local ifce={} uci_cursor:foreach(conf_file,type,function(s) ifce[s[".index"]]=s end) return ifce end ubus = ubus.connect() if not ubus then error("Failed to connect to ubusd") end ubus:call("network", "reload", {}) local interval = uci_cursor:get("dynapoint", "internet", "interval") local timeout = uci_cursor:get("dynapoint", "internet", "timeout") local offline_threshold = tonumber(uci_cursor:get("dynapoint", "internet", "offline_threshold")) local hosts = uci_cursor:get("dynapoint", "internet", "hosts") local numhosts = #hosts local curl = tonumber(uci_cursor:get("dynapoint", "internet", "use_curl")) if (curl == 1) then curl_interface = uci_cursor:get("dynapoint", "internet", "curl_interface") end function get_system_sections(t) for pos,val in pairs(t) do if (type(val)=="table") then get_system_sections(val); elseif (type(val)=="string") then if (pos == "hostname") then localhostname = val end end end end if (tonumber(uci_cursor:get("dynapoint", "internet", "add_hostname_to_ssid")) == 1 ) then get_system_sections(getConfType("system","system")) if (not localhostname) then error("Failed to obtain system hostname") end end local table_names_rule = {} local table_names_not_rule = {} local ssids_with_hostname = {} local ssids_not_rule = {} function get_dynapoint_sections(t) for pos,val in pairs(t) do if (type(val)=="table") then get_dynapoint_sections(val); elseif (type(val)=="string") then if (pos == "dynapoint_rule") then if (val == "internet") then table_names_rule[#table_names_rule+1] = t[".name"] elseif (val == "!internet") then table_names_not_rule[#table_names_not_rule+1] = t[".name"] if (localhostname) then ssids_not_rule[#ssids_not_rule+1] = uci_cursor:get("wireless", t[".name"], "ssid") ssids_with_hostname[#ssids_with_hostname+1] = uci_cursor:get("wireless", t[".name"], "ssid").."_"..localhostname end end end end end end --print(table.getn(hosts)) get_dynapoint_sections(getConfType("wireless","wifi-iface")) -- revert all non-persistent ssid uci-changes regarding sections affecting dynapoint for i = 1, #table_names_not_rule do uci_cursor:revert("wireless", table_names_not_rule[i], "ssid") end local online = true if (#table_names_rule > 0) then if (tonumber(uci_cursor:get("wireless", table_names_rule[1], "disabled")) == 1) then online = false end else log.syslog("info","Not properly configured. Please add <option dynapoint_rule 'internet'> to /etc/config/wireless") end local timer local offline_counter = 0 uloop.init() function do_internet_check(host) if (curl == 1 ) then if (curl_interface) then result = os.execute("curl -s -m "..timeout.." --max-redirs 0 --interface "..curl_interface.." --head "..host.." > /dev/null") else result = os.execute("curl -s -m "..timeout.." --max-redirs 0 --head "..host.." > /dev/null") end else result = os.execute("wget -q --timeout="..timeout.." --spider "..host) end if (result == 0) then return true else return false end end function change_wireless_config(switch_to_offline) if (switch_to_offline == 1) then log.syslog("info","Switched to OFFLINE") for i = 1, #table_names_not_rule do uci_cursor:set("wireless",table_names_not_rule[i], "disabled", "0") if (localhostname) then uci_cursor:set("wireless", table_names_not_rule[i], "ssid", ssids_with_hostname[i]) end log.syslog("info","Bring up new AP "..uci_cursor:get("wireless", table_names_not_rule[i], "ssid")) end for i = 1, #table_names_rule do uci_cursor:set("wireless",table_names_rule[i], "disabled", "1") end else log.syslog("info","Switched to ONLINE") for i = 1, #table_names_not_rule do uci_cursor:set("wireless",table_names_not_rule[i], "disabled", "1") if (localhostname) then uci_cursor:set("wireless", table_names_not_rule[i], "ssid", ssids_not_rule[i]) end end for i = 1, #table_names_rule do uci_cursor:set("wireless",table_names_rule[i], "disabled", "0") log.syslog("info","Bring up new AP "..uci_cursor:get("wireless", table_names_rule[i], "ssid")) end end uci_cursor:save("wireless") ubus:call("network", "reload", {}) end local hostindex = 1 function check_internet_connection() print("checking "..hosts[hostindex].."...") if (do_internet_check(hosts[hostindex]) == true) then -- online print("...seems to be online") offline_counter = 0 hostindex = 1 if (online == false) then print("changed state to online") online = true change_wireless_config(0) end else --offline print("...seems to be offline") hostindex = hostindex + 1 if (hostindex <= numhosts) then check_internet_connection() else hostindex = 1 -- and activate offline-mode print("all hosts offline") if (online == true) then offline_counter = offline_counter + 1 if (offline_counter == offline_threshold) then print("changed state to offline") online = false change_wireless_config(1) end end end end timer:set(interval * 1000) end timer = uloop.timer(check_internet_connection) timer:set(interval * 1000) uloop.run()
gpl-2.0
TheAnswer/FirstTest
bin/scripts/crafting/objects/draftschematics/tailor/fieldWearIiReinforcedFibers/reinforcedWorkShirt.lua
1
4367
--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. reinforcedWorkShirt = Object:new { objectName = "Reinforced Work Shirt", stfName = "shirt_s10", stfFile = "wearables_name", objectCRC = 116665857, groupName = "craftClothingFieldGroupB", -- Group schematic is awarded in (See skills table) craftingToolTab = 8, -- (See DraftSchemticImplementation.h) complexity = 21, size = 3, xpType = "crafting_clothing_general", xp = 75, assemblySkill = "clothing_assembly", experimentingSkill = "clothing_experimentation", ingredientTemplateNames = "craft_clothing_ingredients_n, craft_clothing_ingredients_n, craft_clothing_ingredients_n", ingredientTitleNames = "body, trim, binding_and_hardware", ingredientSlotType = "2, 0, 0", resourceTypes = "object/tangible/component/clothing/shared_reinforced_fiber_panels.iff, fiberplast, metal", resourceQuantities = "1, 20, 10", combineTypes = "1, 0, 0", contribution = "100, 100, 100", numberExperimentalProperties = "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", experimentalProperties = "XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX", experimentalWeights = "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", experimentalGroupTitles = "null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null", experimentalSubGroupTitles = "null, null, sockets, hitpoints, mod_idx_one, mod_val_one, mod_idx_two, mod_val_two, mod_idx_three, mod_val_three, mod_idx_four, mod_val_four, mod_idx_five, mod_val_five, mod_idx_six, mod_val_six", experimentalMin = "0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", experimentalMax = "0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", experimentalPrecision = "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", tanoAttributes = "objecttype=16777230:objectcrc=3169222941:stfFile=wearables_name:stfName=shirt_s10:stfDetail=:itemmask=62975::", blueFrogAttributes = "", blueFrogEnabled = False, customizationOptions = "/private/index_color_1, /private/index_color_2", customizationDefaults = "14, 14", customizationSkill = "clothing_customization" } DraftSchematics:addDraftSchematic(reinforcedWorkShirt, 116665857)--- Add to global DraftSchematics table
lgpl-3.0
Modified-MW-DF/modified-MDF
MWDF Project/Dwarf Fortress/hack/scripts/masterwork/functions/attack.lua
2
17640
--attack based functions, version 42.06a --[[ addAttack(unit,defender_id,body_id,target_id,item_id,attack_id,hitchance,velocity,delay) - Add an attack to unit targeting defender_id's target_id body part. If a body part attack will use body_id, if an item attack will use item_id. getAttack(unit,main_type,sub_type) - Get attack information (material, momentum, contact area, penetration, and sharpness) checkCoverage(unit,bp_id,inventory_item) - Checks if a given item provides coverage for the specified body part. Returns true if it does, false if it does not. getDefense(unit,main_type,sub_type) - Get defense information (layers, tissues, items, materials, and body part) getAttackItem(unit,item,attack) - Called by getAttack for handling item attacks getAttackItemMaterial(item) - Called by getAttackItem, returns the item material getAttackItemMomentum(unit,velocity,weight) - Called by getAttackItem, returns the attack momentum getAttackItemVelocity(unit,attack,weight) - Called by getAttackItem, returns the attack velocity getAttacKItemWeight(unit,item,material) - Called by getAttackItem, returns the items actual and effective weights getAttackUnit(unit,bp_id,attack) - Called by getAttack for handling unit body part attacks getAttackUnitMaterial(unit,bp_id) - Called by getAttackUnit, returns the body part material getAttackUnitMomentum(unit,velocity,weight) - Called by getAttackUnit, returns the attack momentum getAttackUnitVelocity(unit,attack) - Called by getAttackUnit, returns the attack velocity getAttackUnitWeight(unit,bp_id,material) - Called by getAttackUnit, returns the body parts actual and effective weights computeAttackValues(attacker,defender,attack_type,attack_subtype,defense_type,defense_subtype) - Calculates momentum deduction for items and layers, returns two momentum deduction values computeAttackValuesItems(attacker,defender,attack,target) - Called by computeAttackValues, returns momentum deduction for passing through items computeAttackValuesLayers(attacker,defender,attack,target) - Called by computeAttackValues, returns momentum deduction for passing through tissue layers NOTE: All computed values are based on Urist DaVinci's work. ]] --------------------------------------------------------------------------------------- function addAttack(unit,defender_id,body_id,target_id,item_id,attack_id,hitchance,velocity,delay) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end action = df.unit_action:new() action.id = unit.next_action_id unit.next_action_id = unit.next_action_id + 1 action.type = 1 attack_action = action.data.attack attack_action.target_unit_id = defender_id attack_action.attack_item_id = item_id attack_action.target_body_part_id = target_id attack_action.attack_body_part_id = body_id attack_action.attack_velocity = velocity attack_action.attack_id = attack_id attack_action.attack_accuracy = hitchance attack_action.timer1 = delay attack_action.timer2 = delay -- Unknown values attack_action.flags = 7 attack_action.unk_28 = 1 attack_action.unk_2c = 1 attack_action.unk_38 = 1 for i,x in pairs(attack_action.unk_4) do attack_action.unk_4[i] = 7 end attack_action.unk_4.wrestle_type = -1 unit.actions:insert('#',action) end function getAttack(unit,main_type,sub_type) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end local attack = {} if main_type == 'Equipped' then item = dfhack.script_environment('functions/unit').checkInventoryType(unit,'WEAPON')[1] attack_id = dfhack.script_environment('functions/item').checkAttack(item,sub_type) momentum,weight,material,velocity,item = getAttackItem(unit,item,attack_id) attack.item = item attack.material = material attack.momentum = momentum attack.contact = item.subtype.attacks[attack_id].contact attack.penetration = item.subtype.attacks[attack_id].penetration attack.sharpness = item.sharpness elseif main_type == 'Created' then -- Created weapons not yet implemented elseif main_type == 'BodyPart' then attack_id, bp_id = dfhack.script_environment('functions/unit').checkAttack(unit,sub_type) momentum,weight,material,velocity,body_part = getAttackUnit(unit,bp_id,attack_id) attack.body_part = body_part attack.material = material attack.momentum = momentum attack.contact = unit.body.body_plan.attacks[attack_id].contact_perc attack.penetration = unit.body.body_plan.attacks[attack_id].penetration_perc attack.sharpness = 1 end return attack end function checkCoverage(unit,bp_id,inventory_item) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end covers = false item = inventory_item.item itype = df.item_type[item:getType()] base_bp_id = inventory_item.body_part_id if base_bp_id == bp_id then covers = true return covers end step = 0 connect = {base_bp_id} if itype == 'ARMOR' then ubstep = item.subtype.ubstep while step < ubstep do temp = {} for i,x in pairs(unit.body.body_plan.body_parts) do for j,y in pairs(connect) do if x.con_part_id == y and not x.flags.LOWERBODY and not x.flags.HEAD then if i == bp_id then covers = true return covers else table.insert(temp,i) end end end end connect = temp step = step + 1 end step = 0 for i,x in pairs(unit.body.body_plan.body_parts) do if x.flags.LOWERBODY then base_bp_id = i break end end if base_bp_id == bp_id then covers = true return covers end connect = {base_bp_id} lbstep = item.subtype.lbstep while step < lbstep do temp = {} for i,x in pairs(unit.body.body_plan.body_parts) do for j,y in pairs(connect) do if x.con_part_id == y and not x.flags.UPPERBODY and not x.flags.STANCE then if i == bp_id then covers = true return covers else table.insert(temp,i) end end end end connect = temp step = step + 1 end elseif itype == 'HELM' then return covers elseif itype == 'GLOVES' then upstep = item.subtype.upstep while step < upstep do temp = {} for i,x in pairs(unit.body.body_plan.body_parts) do for j,y in pairs(connect) do if x.con_part_id == y and not x.flags.UPPERBODY and not x.flags.LOWERBODY then if i == bp_id then covers = true return covers else table.insert(temp,i) end end end end connect = temp step = step + 1 end elseif itype == 'SHOES' then upstep = item.subtype.upstep while step < upstep do temp = {} for i,x in pairs(unit.body.body_plan.body_parts) do for j,y in pairs(connect) do if x.con_part_id == y and not x.flags.UPPERBODY and not x.flags.LOWERBODY then if i == bp_id then covers = true return covers else table.insert(temp,i) end end end end connect = temp step = step + 1 end elseif itype == 'PANTS' then lbstep = item.subtype.lbstep while step < lbstep do temp = {} for i,x in pairs(unit.body.body_plan.body_parts) do for j,y in pairs(connect) do if x.con_part_id == y and not x.flags.UPPERBODY and not x.flags.STANCE then if i == bp_id then covers = true return covers else table.insert(temp,i) end end end end connect = temp step = step + 1 end end return covers end function getDefense(unit,main_type,sub_type) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end if main_type == 'Random' then bp_id = dfhack.script_environment('functions/unit').checkBodyRandom(unit) elseif main_type == 'Category' then bp_id = dfhack.script_environment('functions/unit').checkBodyCategory(unit,sub_type)[1] elseif main_type == 'Token' then bp_id = dfhack.script_environment('functions/unit').checkBodyToken(unit,sub_type)[1] elseif main_type == 'Type' then bp_id = dfhack.script_environment('functions/unit').checkBodyType(unit,sub_type)[1] end local target = {} target.layers = {} target.tissues = {} target.items = {} target.materials = {} target.body_part = unit.body.body_plan.body_parts[bp_id] for i,x in pairs(target.body_part.layers) do table.insert(target.layers,x) local defender_race = df.global.world.raws.creatures.all[unit.race] local tisdata=defender_race.tissue[x.tissue_id] table.insert(target.tissues,tisdata) end for i,x in pairs(unit.inventory) do if x.mode == 2 then if checkCoverage(unit,bp_id,x) then table.insert(target.items,x.item) table.insert(target.materials,dfhack.matinfo.decode(x.item).material) end end end return target end function getAttackItem(unit,item,attack) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end if tonumber(item) then item = df.item.find(tonumber(item)) end material = getAttackItemMaterial(item) actweight,effweight = getAttackItemWeight(unit,item,material) velocity = getAttackItemVelocity(unit,attack,effweight) momentum = getAttackItemMomentum(unit,velocity,actweight) return momentum,weight,material,velocity,item end function getAttackItemMaterial(item) if tonumber(item) then item = df.item.find(tonumber(item)) end material = dfhack.matinfo.decode(item.mat_type,item.mat_index).material return material end function getAttackItemMomentum(unit,velocity,weight) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end if tonumber(item) then item = df.item.find(tonumber(item)) end momentum=velocity*weight/1000+1 return momentum end function getAttackItemVelocity(unit,attack,weight) if tonumber(item) then item = df.item.find(tonumber(item)) end if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end vel_mod = item.subtype.attacks[attack].velocity_mult velocity = unit.body.size_info.size_base * dfhack.units.getPhysicalAttrValue(unit,0) * vel_mod/1000/weight/1000 if velocity == 0 then velocity = 1 end return velocity end function getAttackItemWeight(unit,item,material) if tonumber(item) then item = df.item.find(tonumber(item)) end if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end weight = math.floor(item.subtype.size*material.solid_density/100000) weight_fraction = item.subtype.size*material.solid_density*10 - weight*1000000 actweight=weight*1000+weight_fraction/1000 effweight=unit.body.size_info.size_cur/100+weight*100+weight_fraction/10000 return actweight,effweight end function getAttackUnit(unit,bp_id,attack) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end body_part = unit.body.body_plan.body_parts[bp_id] velocity = getAttackUnitVelocity(unit,attack) material = getAttackUnitMaterial(unit,body_part) weight = getAttackUnitWeight(unit,body_part,material) momentum = getAttackUnitMomentum(unit,velocity,weight) return momentum,weight,material,velocity,body_part end function getAttackUnitMaterial(unit,body_part) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end attacker_race = df.global.world.raws.creatures.all[unit.race] layerdata = body_part.layers[#body_part.layers-1] tisdata=attacker_race.tissue[layerdata.tissue_id] material = dfhack.matinfo.decode(tisdata.mat_type,tisdata.mat_index).material return material end function getAttackUnitMomentum(unit,velocity,weight) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end momentum = velocity * weight / 1000 + 1 return momentum end function getAttackUnitVelocity(unit,attack) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end vel_mod = unit.body.body_plan.attacks[attack].velocity_modifier velocity = 100 * dfhack.units.getPhysicalAttrValue(unit,0) / 1000 * vel_mod / 1000 if velocity == 0 then velocity = 1 end return velocity end function getAttackUnitWeight(unit,body_part,material) if tonumber(unit) then unit = df.unit.find(tonumber(unit)) end partsize = math.floor(unit.body.size_info.size_cur * body_part.relsize / unit.body.body_plan.total_relsize) partweight = math.floor(partsize * material.solid_density / 100) return partweight end function computeAttackValues(attacker,defender,attack_type,attack_subtype,defense_type,defense_subtype) if tonumber(attacker) then attacker = df.unit.find(tonumber(attacker)) end if tonumber(defender) then defender = df.unit.find(tonumber(defender)) end target = getDefense(defender,defense_type,defense_subtype) attack = getAttack(attacker,attack_type,attack_subtype) if target.items then momentum_deduction1 = computeAttackValuesItems(attacker,defender,attack,target) end if target.layers then momentum_deduction2 = computeAttackValuesLayers(attacker,defender,attack,target) end return momentum_deduction1,momentum_deduction2 end function computeAttackValuesItems(attacker,defender,attack,target) ashyld = attack.material.strength.yield.SHEAR ashfrc = attack.material.strength.fracture.SHEAR for i,x in pairs(target.items) do factors = 1 tshyld = target.materials[i].strength.yield.SHEAR tshfrc = target.materials[i].strength.fracture.SHEAR tshstr = target.materials[i].strength.strain_at_yield.SHEAR timyld = target.materials[i].strength.yield.IMPACT timfrc = target.materials[i].strength.fracture.IMPACT timstr = target.materials[i].strength.strain_at_yield.IMPACT part_size = defender.body.size_info.size_base*target.body_part.relsize/defender.body.body_plan.total_relsize coverage = x.subtype.props.coverage layer_size = x.subtype.props.layer_size step_factor = 1.00 itype = df.item_type[x:getType()] if itype == 'ARMOR' then step_factor = step_factor + 0.25*x.subtype.ubstep + 0.25*x.subtype.lbstep elseif itype == 'HELM' then step_factor = step_factor elseif itype == 'GLOVES' then step_factor = step_factor + 0.25*x.subtype.upstep elseif itype == 'SHOES' then step_factor = step_factor + 0.25*x.subtype.upstep elseif itype == 'PANTS' then step_factor = step_factor + 0.25*x.subtype.lbstep end step_factor = math.max(3,step_factor) tvol = part_size*coverage*layer_size*step_factor/100/100 if attack.item then contact_area = attack.contact end if attack.body_part then contact_area = (attacker.body.size_info.size_base*attack.body_part.relsize/attacker.body.body_plan.total_relsize ^ 0.666) * attack.contact/100 end if contact_area < tvol then tvol = contact_area end shear_cost_1 = tshyld*5000*factors/ashyld/attack.sharpness/1000 shear_cost_2 = tshfrc*5000*factors/ashfrc/attack.sharpness/1000 shear_cost_3 = tshfrc*tvol*5000*factors/ashfrc/attack.sharpness/1000 blunt_cost_1 = tvol*timyld*factors/100/10/500 blunt_cost_2 = tvol*(timfrc-timyld)*factors/100/10/500 blunt_cost_3 = tvol*(timfrc-timyld)*factors/100/10/500 if timstr >= 50000 or x.subtype.props.flags.STRUCTURAL_ELASTICITY_WOVEN_THREAD==true or x.subtype.props.flags.STRUCTURAL_ELASTICITY_CHAIN_METAL==true or x.subtype.props.flags.STRUCTURAL_ELASTICITY_CHAIN_ALL==true then blunt_cost_2 = 0 blunt_cost_3 = 0 end momentum_deduction = math.max(shear_cost_1,blunt_cost_1)/10 end return momentum_deduction end function computeAttackValuesLayers(attacker,defender,attack,target) ashyld = attack.material.strength.yield.SHEAR ashfrc = attack.material.strength.fracture.SHEAR for i,x in pairs(target.layers) do factors = 1 material=dfhack.matinfo.decode(target.tissues[i].mat_type,target.tissues[i].mat_index).material tshyld = material.strength.yield.SHEAR tshfrc = material.strength.fracture.SHEAR tshstr = material.strength.strain_at_yield.SHEAR timyld = material.strength.yield.IMPACT timfrc = material.strength.fracture.IMPACT timstr = material.strength.strain_at_yield.IMPACT part_size = defender.body.size_info.size_base*target.body_part.relsize/defender.body.body_plan.total_relsize part_thick = (part_size * 10000) ^ 0.333 modpartfraction= x.part_fraction if target.tissues[i].flags.THICKENS_ON_ENERGY_STORAGE == true then modpartfraction = defender.counters2.stored_fat * modpartfraction / 2500 / 100 end if target.tissues[i].flags.THICKENS_ON_STRENGTH == true then modpartfraction = dfhack.units.getPhysicalAttrValue(defender,0) * modpartfraction / 1000 end layervolume = part_size * modpartfraction / target.body_part.fraction_total layerthick = part_thick * modpartfraction / target.body_part.fraction_total if layervolume == 0 then layervolume = 1 end if layerthick == 0 then layerthick = 1 end tvol = layervolume if attack.item then contact_area = attack.contact end if attack.body_part then contact_area = (attacker.body.size_info.size_base*attack.body_part.relsize/attacker.body.body_plan.total_relsize ^ 0.666) * attack.contact/100 end if contact_area < part_size^0.66 then tvol = tvol*(contact_area/(part_size^0.66)) end shear_cost_1 = tshyld*5000*factors/ashyld/attack.sharpness/1000 shear_cost_2 = tshfrc*5000*factors/ashfrc/attack.sharpness/1000 shear_cost_3 = tshfrc*tvol*5000*factors/ashfrc/attack.sharpness/1000 blunt_cost_1 = tvol*timyld*factors/100/10/500 blunt_cost_2 = tvol*(timfrc-timyld)*factors/100/10/500 blunt_cost_3 = tvol*(timfrc-timyld)*factors/100/10/500 if timstr >= 50000 then blunt_cost_2 = 0 blunt_cost_3 = 0 end momentum_deduction = math.max(shear_cost_1,blunt_cost_1)/10 end return momentum_deduction end
mit
Modified-MW-DF/modified-MDF
MWDF Project/Dwarf Fortress/hack/lua/plugins/sort/items.lua
3
1162
local _ENV = mkmodule('plugins.sort.items') local utils = require('utils') orders = orders or {} -- Relies on NULL being auto-translated to NULL, and then sorted orders.exists = { key = function(item) return 1 end } orders.type = { key = function(item) return item:getType() end } orders.description = { key = function(item) return dfhack.items.getDescription(item,0) end } orders.base_quality = { key = function(item) return item:getQuality() end } orders.quality = { key = function(item) return item:getOverallQuality() end } orders.improvement = { key = function(item) return item:getImprovementQuality() end } orders.wear = { key = function(item) return item:getWear() end } orders.material = { key = function(item) local mattype = item:getActualMaterial() local matindex = item:getActualMaterialIndex() local info = dfhack.matinfo.decode(mattype, matindex) if info then return info:toString() end end } return _ENV
mit
weiDDD/WSSParticleSystem
cocos2d/cocos/scripting/lua-bindings/auto/api/TintBy.lua
1
1376
-------------------------------- -- @module TintBy -- @extend ActionInterval -- @parent_module cc -------------------------------- -- Creates an action with duration and color.<br> -- param duration Duration time, in seconds.<br> -- param deltaRed Delta red color.<br> -- param deltaGreen Delta green color.<br> -- param deltaBlue Delta blue color.<br> -- return An autoreleased TintBy object. -- @function [parent=#TintBy] create -- @param self -- @param #float duration -- @param #short deltaRed -- @param #short deltaGreen -- @param #short deltaBlue -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- -- -- @function [parent=#TintBy] startWithTarget -- @param self -- @param #cc.Node target -- @return TintBy#TintBy self (return value: cc.TintBy) -------------------------------- -- -- @function [parent=#TintBy] clone -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- -- -- @function [parent=#TintBy] reverse -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- -- param time In seconds. -- @function [parent=#TintBy] update -- @param self -- @param #float time -- @return TintBy#TintBy self (return value: cc.TintBy) return nil
apache-2.0
C60Project/C60-CPU
plugins/Gpmoderator.lua
2
22293
do local function callback(extra, success, result) vardump(success) end local function is_spromoted(chat_id, user_id) local hash = 'sprom:'..chat_id..':'..user_id local spromoted = redis:get(hash) return spromoted or false end local function spromote(receiver, user_id, username) local chat_id = string.gsub(receiver, '.+#id', '') local data = load_data(_config.moderation.data) if not data[tostring(chat_id)] then return send_large_msg(receiver, 'Group is not added.') end if data[tostring(chat_id)]['moderators'][tostring(user_id)] then if is_spromoted(chat_id, user_id) then return send_large_msg(receiver, 'Already as moderator leader') end local hash = 'sprom:'..chat_id..':'..user_id redis:set(hash, true) send_large_msg(receiver, 'User '..username..' ['..user_id..'] promoted as moderator leader') return else data[tostring(chat_id)]['moderators'][tostring(user_id)] = string.gsub(username, '@', '') save_data(_config.moderation.data, data) local hash = 'sprom:'..chat_id..':'..user_id redis:set(hash, true) send_large_msg(receiver, 'User '..username..' ['..user_id..'] promoted as moderator leader') return end end local function sdemote(receiver, user_id, username) local chat_id = string.gsub(receiver, '.+#id', '') if not is_spromoted(chat_id, user_id) then return send_large_msg(receiver, 'Not a moderator leader') end local data = load_data(_config.moderation.data) data[chat_id]['moderators'][tostring(user_id)] = nil save_data(_config.moderation.data, data) local hash = 'sprom:'..chat_id..':'..user_id redis:del(hash) send_large_msg(receiver, 'User '..username..' ['..user_id..'] demoted!') end local function check_member(cb_extra, success, result) local receiver = cb_extra.receiver local data = cb_extra.data local msg = cb_extra.msg for k,v in pairs(result.members) do local user_id = v.id if user_id ~= our_id then local username = v.username data[tostring(msg.to.id)] = { moderators ={}, settings = { set_name = string.gsub(msg.to.print_name, '_', ' '), lock_name = 'no', lock_photo = 'no', lock_member = 'no', lock_bot = 'yes', lock_link = 'no', lock_inviteme = 'no', lock_sticker = 'no', lock_image = 'no', --lock_video = 'no', --lock_audio = 'no', lock_file = 'no', lock_talk = 'no' }, group_type = msg.to.type, blocked_words = {}, } save_data(_config.moderation.data, data) local hash = 'sprom:'..msg.to.id..':'..user_id redis:set(hash, true) return send_large_msg(receiver, 'You have been promoted as moderator for this group.') end end end local function modadd(msg) if not is_admin(msg) then return end local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)] then return 'Group is already added.' end data[tostring(msg.to.id)] = { moderators ={}, settings = { set_name = string.gsub(msg.to.print_name, '_', ' '), lock_name = 'no', lock_photo = 'no', lock_member = 'no', lock_bot = 'yes', lock_link = 'no', lock_inviteme = 'no', lock_sticker = 'no', lock_image = 'no', --lock_video = 'no', --lock_audio = 'no', lock_file = 'no', lock_talk = 'no', }, group_type = msg.to.type, blocked_words = {}, } save_data(_config.moderation.data, data) return 'Group has been added.' end local function modrem(msg) if not is_admin(msg) then return "You're not admin" end local data = load_data(_config.moderation.data) local receiver = get_receiver(msg) if not data[tostring(msg.to.id)] then return 'Group is not added.' end data[tostring(msg.to.id)] = nil save_data(_config.moderation.data, data) return 'Group has been removed' end local function promote(receiver, username, user_id) local data = load_data(_config.moderation.data) local group = string.gsub(receiver, '.+#id', '') if not data[group] then return send_large_msg(receiver, 'Group is not added.') end if data[group]['moderators'][tostring(user_id)] then return send_large_msg(receiver, username..' is already a moderator.') end data[group]['moderators'][tostring(user_id)] = string.gsub(username, '@', '') save_data(_config.moderation.data, data) return send_large_msg(receiver, username..' has been promoted.') end local function demote(receiver, username, user_id) local data = load_data(_config.moderation.data) local group = string.gsub(receiver, '.+#id', '') if not data[group] then return send_large_msg(receiver, 'Group is not added.') end if not data[group]['moderators'][tostring(user_id)] then return send_large_msg(receiver, string.gsub(username, '@', '')..' is not a moderator.') end data[group]['moderators'][tostring(user_id)] = nil save_data(_config.moderation.data, data) return send_large_msg(receiver, username..' has been demoted.') end local function upmanager(receiver, username, user_id) channel_set_admin(receiver, 'user#id'..user_id, callback, false) return send_large_msg(receiver, 'Done!') end local function inmanager(receiver, username, user_id) channel_set_unadmin(receiver, 'user#id'..user_id, callback, false) return send_large_msg(receiver, 'Done!') end local function admin_promote(receiver, username, user_id) local data = load_data(_config.moderation.data) if not data['admins'] then data['admins'] = {} save_data(_config.moderation.data, data) end if data['admins'][tostring(user_id)] then return send_large_msg(receiver, username..' is already as admin.') end data['admins'][tostring(user_id)] = string.gsub(username, '@', '') save_data(_config.moderation.data, data) return send_large_msg(receiver, username..' has been promoted as admin.') end local function admin_demote(receiver, username, user_id) local data = load_data(_config.moderation.data) if not data['admins'] then data['admins'] = {} save_data(_config.moderation.data, data) end if not data['admins'][tostring(user_id)] then return send_large_msg(receiver, username..' is not an admin.') end data['admins'][tostring(user_id)] = nil save_data(_config.moderation.data, data) return send_large_msg(receiver, 'Admin '..username..' has been demoted.') end local function username_id(cb_extra, success, result) local get_cmd = cb_extra.get_cmd local receiver = cb_extra.receiver local member = cb_extra.member local text = 'No user @'..member..' in this group.' for k,v in pairs(result.members) do vusername = v.username if vusername == member then username = member user_id = v.peer_id if get_cmd == 'promote' then return promote(receiver, username, user_id) elseif get_cmd == 'demote' then if is_spromoted(string.gsub(receiver,'.+#id', ''), user_id) then return send_large_msg(receiver, 'Can\'t demote leader') end return demote(receiver, username, user_id) elseif get_cmd == 'adminprom' then if user_id == our_id then return end return admin_promote(receiver, username, user_id) elseif get_cmd == 'admindem' then if user_id == our_id then return end return admin_demote(receiver, username, user_id) elseif get_cmd == 'spromote' then return spromote(receiver, user_id, username) elseif get_cmd == 'sdemote' then return sdemote(receiver, user_id, username) end end end send_large_msg(receiver, text) end local function channel_username_id(cb_extra, success, result) local get_cmd = cb_extra.get_cmd local receiver = cb_extra.receiver local member = cb_extra.member local text = 'No user @'..member..' in this group.' for k,v in pairs(result) do vusername = v.username if vusername == member then username = member user_id = v.peer_id if get_cmd == 'promote' then return promote(receiver, username, user_id) elseif get_cmd == 'demote' then if is_spromoted(string.gsub(receiver,'.+#id', ''), user_id) then return send_large_msg(receiver, 'Can\'t demote leader') end return demote(receiver, username, user_id) elseif get_cmd == 'adminprom' then if user_id == our_id then return end return admin_promote(receiver, username, user_id) elseif get_cmd == 'admindem' then if user_id == our_id then return end return admin_demote(receiver, username, user_id) elseif get_cmd == 'spromote' then return spromote(receiver, user_id, username) elseif get_cmd == 'sdemote' then return sdemote(receiver, user_id, username) elseif get_cmd == 'upmanager' then return upmanager(receiver, username, user_id) elseif get_cmd == 'inmanager' then return inmanager(receiver, username, user_id) end end end send_large_msg(receiver, text) end local function get_msg_callback(extra, success, result) if success ~= 1 then return end local get_cmd = extra.get_cmd local receiver = extra.receiver local user_id = result.from.peer_id local chat_id = result.to.id if result.from.username then username = '@'..result.from.username else username = string.gsub(result.from.print_name, '_', ' ') end if get_cmd == 'spromote' then if user_id == our_id then return nil end return spromote(receiver, user_id, username) end if get_cmd == 'sdemote' then if user_id == our_id then return nil end return sdemote(receiver, user_id, username) end if get_cmd == 'promote' then if user_id == our_id then return nil end return promote(receiver, username, user_id) end if get_cmd == 'demote' then if user_id == our_id then return nil end if is_spromoted(chat_id, user_id) then return send_large_msg(receiver, 'Can\'t demote leader') end return demote(receiver, username, user_id) end if get_cmd == 'upmanager' then return upmanager(receiver, username, user_id) end if get_cmd == 'inmanager' then return inmanager(receiver, username, user_id) end end local function modlist(msg) local data = load_data(_config.moderation.data) if not data[tostring(msg.to.id)] then return 'Group is not added.' end -- determine if table is empty if next(data[tostring(msg.to.id)]['moderators']) == nil then --fix way return 'No moderator in this group.' end local message = 'List of moderators for ' .. string.gsub(msg.to.print_name, '_', ' ') .. ':\n' for k,v in pairs(data[tostring(msg.to.id)]['moderators']) do if is_spromoted(msg.to.id, k) then message = message .. '- '..v..' [' ..k.. '] * \n' else message = message .. '- '..v..' [' ..k.. '] \n' end end return message end local function admin_list(msg) local data = load_data(_config.moderation.data) if not data['admins'] then data['admins'] = {} save_data(_config.moderation.data, data) end if next(data['admins']) == nil then --fix way return 'No admin available.' end local message = 'List for Bot admins:\n' for k,v in pairs(data['admins']) do message = message .. '- ' .. v ..' ['..k..'] \n' end return message end function run(msg, matches) if is_chat_msg(msg) then local get_cmd = matches[1] local receiver = get_receiver(msg) if matches[1] == 'modadd' then return modadd(msg) end if matches[1] == 'modrem' then return modrem(msg) end if matches[1] == 'promote' then if not is_momod(msg) then return end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end local member = string.gsub(matches[2], "@", "") chat_info(receiver, username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'demote' then if not is_momod(msg) then return "Only moderator can demote" end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end if string.gsub(matches[2], "@", "") == msg.from.username then return "You can't demote yourself" end local member = string.gsub(matches[2], "@", "") chat_info(receiver, username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'spromote' then if not is_admin(msg) then return "Only admin can promote moderator leader" end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end local member = string.gsub(matches[2], "@", "") chat_info(receiver, username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'sdemote' then if not is_admin(msg) then return "Only moderator can demote moderator leader" end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end if string.match(matches[2], '^%d+$') then return sdemote(receiver, matches[2], matches[2]) end local member = string.gsub(matches[2], "@", "") chat_info(receiver, username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'modlist' then return modlist(msg) end if matches[1] == 'adminprom' then if not is_admin(msg) then return "Only sudo can promote user as admin" end local member = string.gsub(matches[2], "@", "") chat_info(receiver, username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'admindem' then if not is_admin(msg) then return "Only sudo can promote user as admin" end if string.match(matches[2], '^%d+$') then admin_demote(receiver, matches[2], matches[2]) else local member = string.gsub(matches[2], "@", "") chat_info(receiver, username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end end if matches[1] == 'adminlist' then if not is_admin(msg) then return 'Admin only!' end return admin_list(msg) end if matches[1] == 'chat_add_user' and msg.action.user.id == our_id then chat_del_user(receiver, 'user#id'..our_id, ok_cb, true) end if matches[1] == 'chat_created' and msg.from.id == 0 then --return automodadd(msg) end end if is_channel_msg(msg) then -- supergrouuuuppppppppp local get_cmd = matches[1] local receiver = get_receiver(msg) if matches[1] == 'modadd' then return modadd(msg) end if matches[1] == 'modrem' then return modrem(msg) end if matches[1] == 'promote' then if not is_momod(msg) then return end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'demote' then if not is_momod(msg) then return "Only moderator can demote" end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end if string.gsub(matches[2], "@", "") == msg.from.username then return "You can't demote yourself" end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'spromote' then if not is_admin(msg) then return "Only admin can promote moderator leader" end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'sdemote' then if not is_admin(msg) then return "Only moderator can demote moderator leader" end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end if string.match(matches[2], '^%d+$') then return sdemote(receiver, matches[2], matches[2]) end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'modlist' then return modlist(msg) end if matches[1] == 'upmanager' then if not is_admin(msg) then if not is_spromoted(msg.to.id, msg.from.id) then return "You're not a leader" end end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end if string.match(matches[2], '^%d+$') then return upmanager(receiver, matches[2], matches[2]) end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'inmanager' then if not is_admin(msg) then if not is_spromoted(msg.to.id, msg.from.id) then return "You're not a leader" end end if not matches[2] and msg.reply_id then get_message(msg.reply_id, get_msg_callback, {get_cmd=get_cmd, receiver=receiver}) return end if not matches[2] then return end if string.match(matches[2], '^%d+$') then return sdemote(receiver, matches[2], matches[2]) end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'adminprom' then if not is_admin(msg) then return "Only sudo can promote user as admin" end local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end if matches[1] == 'admindem' then if not is_admin(msg) then return "Only sudo can promote user as admin" end if string.match(matches[2], '^%d+$') then admin_demote(receiver, matches[2], matches[2]) else local member = string.gsub(matches[2], "@", "") channel_get_users(receiver, channel_username_id, {get_cmd= get_cmd, receiver=receiver, member=member}) end end if matches[1] == 'adminlist' then if not is_admin(msg) then return 'Admin only!' end return admin_list(msg) end if matches[1] == 'chat_add_user' and msg.action.user.id == our_id then channel_kick_user(receiver, 'user#id'..our_id, ok_cb, true) end else return end end return { description = "Moderation plugin", usage = { user = { "/modlist : List of moderators", }, moderator = { "/promote <username> : Promote user as moderator by username", "/promote (on reply) : Promote user as moderator by reply", "/demote <username> : Demote user from moderator", "/demote (on reply) : demote user from moderator by reply", }, admin = { "/modadd : Add group to moderation list", "/modrem : Remove group from moderation list", "/spromote <username> : Promote user as moderator leader by username", "/spromote (on reply) : Promote user as moderator leader by reply", "/sdemote <username> : Demote user from being moderator leader by username", "/sdemote (on reply) : Demote user from being moderator leader by reply", }, sudo = { "/adminprom <username> : Promote user as admin (must be done from a group)", "/admindem <username> : Demote user from admin (must be done from a group)", "/admindem <id> : Demote user from admin (must be done from a group)", }, }, patterns = { "^/(modadd)$", "^/(modrem)$", "^/(spromote) (.*)$", "^/(spromote)$", "^/(sdemote) (.*)$", "^/(sdemote)$", "^/(promote) (.*)$", "^/(promote)$", "^/(demote) (.*)$", "^/(demote)$", "^/(upmanager) (.*)$", "^/(upmanager)", "^/(inmanager) (.*)$", "^/(inmanager)", "^/(modlist)$", "^/(adminprom) (.*)$", -- sudoers only "^/(admindem) (.*)$", -- sudoers only "^/(adminlist)$", "^!!tgservice (chat_add_user)$", "^!!tgservice (chat_created)$", }, run = run, } end
gpl-3.0
TheAnswer/FirstTest
bin/scripts/object/building/general/objects.lua
1
172165
--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_building_general_shared_aircar_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:aircar_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:aircar_general", noBuildRadius = 0, objectName = "@building_name:aircar_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_aircar_general, 929068141) object_building_general_shared_arena_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:arena_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:arena_general", noBuildRadius = 0, objectName = "@building_name:arena_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_arena_general, 3257125986) object_building_general_shared_arena_large_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:arena_large_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:arena_large_general", noBuildRadius = 0, objectName = "@building_name:arena_large_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_arena_large_general, 3322084706) object_building_general_shared_association_hall_civilian_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:association_hall_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:association_hall_general", noBuildRadius = 0, objectName = "@building_name:association_hall_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_assoc_hall_civ_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_association_hall_civilian_general, 3632219938) object_building_general_shared_association_hall_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:association_hall_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:association_hall_general", noBuildRadius = 0, objectName = "@building_name:association_hall_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_assoc_hall_civ_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_association_hall_general, 3960949370) object_building_general_shared_bank_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:bank_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:bank_general", noBuildRadius = 0, objectName = "@building_name:bank_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bank_general, 2650754817) object_building_general_shared_bunker_allum_mine = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 50, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_bunker_allum_mine.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_allum_mine, 599067335) object_building_general_shared_bunker_blacksun_outpost_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_small_outpost_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_blacksun_outpost_01, 1938342630) object_building_general_shared_bunker_crimelord_retreat_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_crimelord_retreat", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_crimelord_retreat_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_crimelord_retreat_01, 3171223694) object_building_general_shared_bunker_imperial_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_01, 2982837298) object_building_general_shared_bunker_imperial_02 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_02, 1792922789) object_building_general_shared_bunker_imperial_03 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_03, 600879912) object_building_general_shared_bunker_imperial_bunker_abandoned = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_abandoned_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_bunker_abandoned, 990897798) object_building_general_shared_bunker_imperial_deep_chasm = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_deep_chasm_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_deep_chasm, 2935243152) object_building_general_shared_bunker_imperial_detainment_center_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial_prison", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_imperial_prison_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_detainment_center_01, 1672354378) object_building_general_shared_bunker_imperial_prison_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial_prison", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_imperial_prison_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_prison_01, 1661550307) object_building_general_shared_bunker_imperial_weapons_research_facility_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_research_facility_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_imperial_weapons_research_facility_01, 357299427) object_building_general_shared_bunker_mad_bio = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 43, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_bunker_mad_bio_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_mad_bio, 3223964695) object_building_general_shared_bunker_rebel_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_rebl_bunker_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_rebel_01, 102885585) object_building_general_shared_bunker_rebel_deep_chasm = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_rebl_bunker_deep_chasm_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_rebel_deep_chasm, 3695355168) object_building_general_shared_bunker_rebel_spynet = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_abandoned_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_rebel_spynet, 4133162154) object_building_general_shared_bunker_rebel_weapons_depot = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_small_outpost_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_rebel_weapons_depot, 2551461683) object_building_general_shared_bunker_research_facility_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial_research_facility", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_research_facility_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_research_facility_01, 2046272201) object_building_general_shared_bunker_small_outpost_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_small_outpost_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_small_outpost_01, 1060967532) object_building_general_shared_bunker_small_outpost_02 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_small_outpost_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_small_outpost_02, 3828006139) object_building_general_shared_bunker_talus_chunker_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_small_outpost_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_talus_chunker_bunker, 2130756010) object_building_general_shared_bunker_tok_retreat_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_crimelord_retreat", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_crimelord_retreat_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_tok_retreat_01, 2032341079) object_building_general_shared_bunker_warren_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_warren_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_bunker_warren_01, 2436238099) object_building_general_shared_cantina_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_tatooine_cantina.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cantina", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cantina", noBuildRadius = 0, objectName = "@building_name:cantina_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cantina_general, 4015930050) object_building_general_shared_capitol_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_palace", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_palace", noBuildRadius = 0, objectName = "@building_name:capitol_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_capitol_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_capitol_general, 2926502766) object_building_general_shared_cave_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_01, 3160184163) object_building_general_shared_cave_01_damprock = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_01_damprock, 952315499) object_building_general_shared_cave_01_damprock_mirror = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_damprock_mirror.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_01_damprock_mirror, 2530583699) object_building_general_shared_cave_01_ice = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_01_ice, 3629542620) object_building_general_shared_cave_01_mirror = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_mirror.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_01_mirror, 3887886541) object_building_general_shared_cave_02 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_02, 1732984308) object_building_general_shared_cave_02_damprock = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_02_damprock, 4040916264) object_building_general_shared_cave_02_damprock_mirror = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock_mirror.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_02_damprock_mirror, 3705597680) object_building_general_shared_cave_02_ice = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_02_ice, 3398864833) object_building_general_shared_cave_02_mirror = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_mirror.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_02_mirror, 4020721095) object_building_general_shared_cave_03 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_03, 776362617) object_building_general_shared_cave_03_damprock = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_03_damprock, 3073160169) object_building_general_shared_cave_03_damprock_mirror = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03_damprock_mirror.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_03_damprock_mirror, 426189756) object_building_general_shared_cave_03_ice = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_03_ice, 949364135) object_building_general_shared_cave_03_mirror = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03_mirror.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_03_mirror, 3897669313) object_building_general_shared_cave_04_ice_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_04_ice_s01, 519460091) object_building_general_shared_cave_05_ice_s02 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_05_ice_s02, 759540329) object_building_general_shared_cave_06_flatland_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_06_flatland_s01, 736190789) object_building_general_shared_cave_06_flatland_s01_damprock = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_06_flatland_s01_damprock, 3352052197) object_building_general_shared_cave_06_flatland_s01_ice = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s01_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_06_flatland_s01_ice, 1663639712) object_building_general_shared_cave_07_flatland_s02 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_07_flatland_s02, 1905336231) object_building_general_shared_cave_07_flatland_s02_damprock = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_07_flatland_s02_damprock, 3655237343) object_building_general_shared_cave_07_flatland_s02_ice = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s02_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_07_flatland_s02_ice, 2188080207) object_building_general_shared_cave_08_flatland_s03 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_08_flatland_s03, 2882713804) object_building_general_shared_cave_08_flatland_s03_damprock = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s03_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_08_flatland_s03_damprock, 524918885) object_building_general_shared_cave_08_flatland_s03_ice = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s03_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_08_flatland_s03_ice, 557190412) object_building_general_shared_cave_lok_pirate_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_lok_pirate_cave, 153465138) object_building_general_shared_cave_morag = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave_morag", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_endr_cave_morag.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cave_morag, 1852639945) object_building_general_shared_cloning_facility_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_cloning.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cloning_facility", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cloning_facility", noBuildRadius = 0, objectName = "@building_name:cloning_facility_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_cloning_facility_general, 327514443) object_building_general_shared_corellia_afarathu_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_corellia_afarathu_cave, 1102119105) object_building_general_shared_corellia_drall_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_corellia_drall_cave, 88228892) object_building_general_shared_corellia_nyax_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_corellia_nyax_bunker, 780046145) object_building_general_shared_dantooine_force_crystal_hunter_sd_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_dantooine_force_crystal_hunter_sd_cave, 1263547301) object_building_general_shared_dantooine_janta_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_dantooine_janta_cave, 1976190033) object_building_general_shared_dantooine_kunga_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_dantooine_kunga_cave, 2274845407) object_building_general_shared_dathomir_nsister_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_dathomir_nsister_cave, 711566567) object_building_general_shared_dathomir_nsister_rancor_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:A Cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Cave", noBuildRadius = 0, objectName = "@building_name:Cave Style 02", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_dathomir_nsister_rancor_cave, 1702144691) object_building_general_shared_endor_jinda_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s03_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_endor_jinda_cave, 709151424) object_building_general_shared_endor_korga_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_endor_korga_cave, 1189018300) object_building_general_shared_endor_marauder_orphans_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_endor_marauder_orphans_cave, 3233389758) object_building_general_shared_guild_combat_general_style_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_guild_combat.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:guild_combat_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:guild_combat_general", noBuildRadius = 0, objectName = "@building_name:guild_combat_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_combat_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_guild_combat_general_style_01, 1394323186) object_building_general_shared_guild_commerce_general_style_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_guild_combat.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:guild_commerce_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:guild_commerce_general", noBuildRadius = 0, objectName = "@building_name:guild_commerce_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_commerce_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_guild_commerce_general_style_01, 326541771) object_building_general_shared_guild_university_general_style_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_guild_combat.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:guild_university_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:guild_university_general", noBuildRadius = 0, objectName = "@building_name:guild_university_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_university_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_guild_university_general_style_01, 3594966040) object_building_general_shared_hotel_general_style_1 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_hotel.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:hotel_general_style_1", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:hotel_general_style_1", noBuildRadius = 0, objectName = "@building_name:hotel_general_style_1", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_hotel_general_style_1, 2957667026) object_building_general_shared_hotel_general_style_2 = SharedBuildingObjectTemplate:new { appearanceFilename = "appearance/mockup_hotelb.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_hotel.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:hotel_general_style_2", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:hotel_general_style_2", noBuildRadius = 0, objectName = "@building_name:hotel_general_style_2", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_hotel_general_style_2, 1801306693) object_building_general_shared_housing_general_style_1 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:housing_general_style_1", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:housing_general_style_1", noBuildRadius = 0, objectName = "@building_name:housing_general_style_1", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_housing_general_style_1, 1516155062) object_building_general_shared_landing_pad_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:shuttleport_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:shuttleport_general", noBuildRadius = 0, objectName = "@building_name:shuttleport_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_landing_pad_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 1, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_landing_pad_s01, 766941896) object_building_general_shared_lok_evil_droid_engineer_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_lok_evil_droid_engineer_cave, 1736894341) object_building_general_shared_lok_kimogila_cult_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_warren_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_lok_kimogila_cult_bunker, 2736597128) object_building_general_shared_lok_mercenary_cave_01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_ice.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_lok_mercenary_cave_01, 2476588024) object_building_general_shared_lok_nymstheme_mercenary_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial_research_facility", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_research_facility_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_lok_nymstheme_mercenary_bunker, 526484590) object_building_general_shared_lok_nymstheme_pirate_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_lok_nymstheme_pirate_cave, 18770566) object_building_general_shared_merchant_tent_all_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:merchant_tent_tato_s01", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:merchant_tent_tato_s01", noBuildRadius = 0, objectName = "@building_name:merchant_tent_tato_s01", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/ply_all_merchant_tent_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_merchant_tent_all_s01, 3614150695) object_building_general_shared_mun_all_capitol_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:capitol_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:capitol_general", noBuildRadius = 0, objectName = "@building_name:capitol_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_capitol_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_capitol_s01, 1684189678) object_building_general_shared_mun_all_cloning_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_cloning.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:cloning_facility_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:cloning_facility_general", noBuildRadius = 0, objectName = "@building_name:cloning_facility_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_cloning_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_cloning_s01, 432887298) object_building_general_shared_mun_all_guild_combat_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_guild_combat.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:guild_combat_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:guild_combat_general", noBuildRadius = 0, objectName = "@building_name:guild_combat_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_combat_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_guild_combat_s01, 3789605488) object_building_general_shared_mun_all_guild_commerce_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_guild_combat.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:guild_commerce_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:guild_commerce_general", noBuildRadius = 0, objectName = "@building_name:guild_commerce_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_commerce_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_guild_commerce_s01, 49465033) object_building_general_shared_mun_all_guild_theater_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:theater", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:theater", noBuildRadius = 0, objectName = "@building_name:theater", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_theater_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_guild_theater_s01, 2335562190) object_building_general_shared_mun_all_guild_university_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_guild_combat.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:guild_university_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:guild_university_general", noBuildRadius = 0, objectName = "@building_name:guild_university_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_guild_university_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_guild_university_s01, 1179256079) object_building_general_shared_mun_all_hospital_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:hospital", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:hospital", noBuildRadius = 0, objectName = "@building_name:hospital", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_hospital_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_hospital_s01, 3942101786) object_building_general_shared_mun_all_hospital_s02 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 30, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:hospital", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:hospital", noBuildRadius = 0, objectName = "@building_name:hospital", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_hospital_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_hospital_s02, 836770701) object_building_general_shared_mun_all_hotel_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_hotel.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:hotel_tatooine_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:hotel_tatooine_general", noBuildRadius = 0, objectName = "@building_name:hotel_tatooine_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_hotel_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_hotel_s01, 64245657) object_building_general_shared_mun_all_landing_pad_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 20, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:starport", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:starport", noBuildRadius = 0, objectName = "@building_name:starport", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_landing_pad_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_landing_pad_s01, 2845231920) object_building_general_shared_mun_all_starport_s01 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:starport", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:starport", noBuildRadius = 0, objectName = "@building_name:starport", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_starport_s01_u01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_mun_all_starport_s01, 1399192891) object_building_general_shared_naboo_narglatch_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_naboo_narglatch_cave, 1618666507) object_building_general_shared_naboo_pirate_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_small_outpost_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_naboo_pirate_bunker, 2696571862) object_building_general_shared_naboo_veermok_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_naboo_veermok_cave, 1074091686) object_building_general_shared_newbie_hall = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 48, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:association_hall_civilian_tatooine", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:association_hall_civilian_tatooine", noBuildRadius = 0, objectName = "@building_name:association_hall_civilian_tatooine", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_newbie_hall.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_newbie_hall, 3771444529) object_building_general_shared_newbie_hall_skipped = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 48, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:association_hall_civilian_tatooine", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:association_hall_civilian_tatooine", noBuildRadius = 0, objectName = "@building_name:association_hall_civilian_tatooine", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_newbie_hall_skippedtutorial.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_newbie_hall_skipped, 1011239275) object_building_general_shared_nightsister_slave_mine_sd_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_nightsister_slave_mine_sd_cave, 2054952898) object_building_general_shared_parking_garage_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_garage.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:parking_garage_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:parking_garage_general", noBuildRadius = 0, objectName = "@building_name:parking_garage_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_parking_garage_general, 3151125) object_building_general_shared_ranchers_house_tatooine = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/building/shared_ranchers_house_tatooine.cdf", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:housing_tatt_style01_med", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:housing_tatt_style01_med", noBuildRadius = 0, objectName = "@building_name:housing_tatt_style01_med", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/ply_tato_house_m_s01_fp1.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "footprint/building/player/shared_player_house_tatooine_medium_style_01.sfp", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_ranchers_house_tatooine, 2779359080) object_building_general_shared_rebel_fuel_depot = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_rebl_bunker_deep_chasm_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rebel_fuel_depot, 3374741880) object_building_general_shared_rori_bark_mite_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_bark_mite_cave, 2008111071) object_building_general_shared_rori_bat_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_bat_cave, 2510037668) object_building_general_shared_rori_cobral_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_cobral_bunker, 2753493661) object_building_general_shared_rori_garyn_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_garyn_bunker, 2144664039) object_building_general_shared_rori_hyperdrive_research_facility = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:Hyperdrive Research Facility", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:Bunker", noBuildRadius = 0, objectName = "@building_name:Hyperdrive Research Facility", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_research_facility_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_hyperdrive_research_facility, 2711352465) object_building_general_shared_rori_kobola_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_kobola_cave, 303008890) object_building_general_shared_rori_torton_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_rori_torton_cave, 1919200278) object_building_general_shared_shuttleport_general = SharedBuildingObjectTemplate:new { appearanceFilename = "appearance/mun_all_shuttleport_s01.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:shuttleport_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:shuttleport_general", noBuildRadius = 0, objectName = "@building_name:shuttleport_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_shuttleport_general, 3656969600) object_building_general_shared_space_dungeon_corellian_corvette = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:base_cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_spc_corvette_dungeon.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_space_dungeon_corellian_corvette, 2945204994) object_building_general_shared_space_dungeon_corellian_corvette_imperial = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:base_cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_spc_corvette_dungeon.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_space_dungeon_corellian_corvette_imperial, 3935788511) object_building_general_shared_space_dungeon_corellian_corvette_rebel = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:base_cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_spc_corvette_dungeon.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_space_dungeon_corellian_corvette_rebel, 1523571122) object_building_general_shared_space_dungeon_hutt_asteroid = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:base_cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_spc_asteroid_bunker_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_space_dungeon_hutt_asteroid, 692704019) object_building_general_shared_space_dungeon_star_destroyer = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:base_cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_spc_star_destroyer_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_space_dungeon_star_destroyer, 1431567153) object_building_general_shared_starport_general = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:starport_general", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:starport_general", noBuildRadius = 0, objectName = "@building_name:starport_general", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/mun_all_starport_s01_u01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_starport_general, 4229374013) object_building_general_shared_starport_general_style_1 = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:starport_general_style_1", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:starport_general_style_1", noBuildRadius = 0, objectName = "@building_name:starport_general_style_1", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_starport_general_style_1, 2699737473) object_building_general_shared_starport_general_style_2 = SharedBuildingObjectTemplate:new { appearanceFilename = "appearance/mockup_starportb.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:starport_general_style_2", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:starport_general_style_2", noBuildRadius = 0, objectName = "@building_name:starport_general_style_2", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_starport_general_style_2, 2080182550) object_building_general_shared_talus_aakuan_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_aakuan_cave, 1823419741) object_building_general_shared_talus_aqualish_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_aqualish_cave, 3978592584) object_building_general_shared_talus_binyare_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_binyare_bunker, 4022785523) object_building_general_shared_talus_giant_decay_mite_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_giant_decay_mite_cave, 2459804029) object_building_general_shared_talus_giant_fynock_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_flatland_s01_damprock.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_giant_fynock_cave, 1300216386) object_building_general_shared_talus_kahmurra_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_kahmurra_bunker, 1743913196) object_building_general_shared_talus_traitor_erran = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:bunker_imperial", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_talus_traitor_erran, 330907884) object_building_general_shared_tatooine_beetle_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_tatooine_beetle_cave, 1885974487) object_building_general_shared_tatooine_hutt_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s01.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_tatooine_hutt_cave, 434980665) object_building_general_shared_tatooine_squill_cave = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/thm_all_cave_s03.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_tatooine_squill_cave, 1109209534) object_building_general_shared_tatooine_tusken_bunker = SharedBuildingObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 255, collisionActionFlags = 255, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 1, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "@building_detail:base_cave", gameObjectType = 512, locationReservationRadius = 0, lookAtText = "@building_lookat:base_cave", noBuildRadius = 0, objectName = "@building_name:cave", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "appearance/poi_all_impl_bunker_s02.pob", rangedIntCustomizationVariables = {}, scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 2, targetable = 0, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_building_general_shared_tatooine_tusken_bunker, 2741312696)
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/dathomir/npcs/nightsister/nightsisterElder.lua
1
5099
--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. nightsisterElder = Creature:new { objectName = "nightsisterElder", -- Lua Object Name creatureType = "NPC", faction = "nightsister", factionPoints = 20, gender = "", speciesName = "nightsister_elder", stfName = "mob/creature_names", objectCRC = 4033230337, socialGroup = "nightsister", level = 278, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG + AGGRESSIVE_FLAG, healthMax = 392000, healthMin = 321000, strength = 30000, constitution = 30000, actionMax = 392000, actionMin = 321000, quickness = 30000, stamina = 30000, mindMax = 392000, mindMin = 321000, focus = 30000, willpower = 30000, height = 1, -- Size of creature armor = 3, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 100, energy = 25, electricity = 100, stun = 100, blast = 25, heat = 100, cold = 100, acid = 100, lightsaber = 0, accuracy = 375, healer = 0, pack = 0, herd = 0, stalker = 0, killer = 1, ferocity = 0, aggressive = 1, invincible = 0, meleeDefense = 1, rangedDefense = 1, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/melee/polearm/shared_lance_vibrolance.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "a Vibrolance", -- Name ex. 'a Vibrolance' weaponTemp = "lance_vibrolance", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "PolearmMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 1, weaponMinDamage = 1520, weaponMaxDamage = 2750, weaponAttackSpeed = 2, weaponDamageType = "ELECTRICITY", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "LIGHT", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "object/weapon/melee/polearm/shared_polearm_vibro_axe.iff", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "a Long Vibro Axe", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "lance_vibro_axe", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "PolearmMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateWeaponEquipped = 1, alternateWeaponMinDamage = 1520, alternateWeaponMaxDamage = 2750, alternateweaponAttackSpeed = 2, alternateWeaponDamageType = "KINETIC", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "LIGHT", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0,1,3,4,11,15,30,33,39,40,99", -- Group it belongs to for loot tame = 0, datapadItemCRC = 0, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "", boneMax = 0, hideType = "", hideMax = 0, meatType = "", meatMax = 0, skills = { "nightsisterAttack20", "nightsisterAttack21", "nightsisterAttack22", "nightsisterAttack23", "nightsisterAttack24", "nightsisterAttack25", "nightsisterAttack26", "nightsisterAttack27", "nightsisterAttack28", "nightsisterAttack29", "nightsisterAttack30", "nightsisterAttack31" }, respawnTimer = 300, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(nightsisterElder, 4033230337) -- Add to Global Table
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/corellia/npcs/misc/feralSelonian.lua
1
4743
--Copyright (C) 2008 <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. feralSelonian = Creature:new { objectName = "feralSelonian", -- Lua Object Name creatureType = "NPC", faction = "self", gender = "", name = "Feral Selonian", objectCRC = 3198208329, socialGroup = "self", named = FALSE, level = 12, xp = 514, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG, healthMax = 1400, healthMin = 1200, strength = 0, constitution = 0, actionMax = 1400, actionMin = 1200, quickness = 0, stamina = 0, mindMax = 1400, mindMin = 1200, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 1, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 0, energy = 0, electricity = 0, stun = -1, blast = 0, heat = 0, cold = 0, acid = 0, lightsaber = 0, accuracy = 0, healer = 0, pack = 0, herd = 0, stalker = 0, killer = 1, aggressive = 0, invincible = 0, attackCreatureOnSight = "", -- Enter socialGroups weapon = "", -- File path to weapon -> object\xxx\xxx\xx weaponName = "", -- Name ex. 'a Vibrolance' weaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 0, weaponMinDamage = 0, weaponMaxDamage = 0, weaponAttackSpeed = 0, weaponDamageType = "", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateWeaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateWeaponAttackSpeed = 0, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = 0, -- Group it belongs to for loot tame = 0, datapadItemCRC = 0, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "", boneMax = 0, hideType = "", hideMax = 0, meatType = "", meatMax = 0, skills = { "", "", "" } -- respawnTimer = 180, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(feralSelonian, 3198208329) -- Add to Global Table
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/tatooine/npcs/dimU/dimUMonasteryNun.lua
1
4512
--Copyright (C) 2008 <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. dimUMonasteryNun = Creature:new { objectName = "dimUMonasteryNun", -- Lua Object Name creatureType = "NPC", gender = "", speciesName = "dim_u_monastery_nun", stfName = "mob/creature_names", objectCRC = 507065980, socialGroup = "Dim-U", level = 6, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG, healthMax = 220, healthMin = 180, strength = 0, constitution = 0, actionMax = 220, actionMin = 180, quickness = 0, stamina = 0, mindMax = 220, mindMin = 180, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 1, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 0, energy = 0, electricity = 0, stun = -1, blast = 0, heat = 0, cold = 0, acid = 0, lightsaber = 0, accuracy = 0, healer = 0, pack = 0, herd = 1, stalker = 0, killer = 0, ferocity = 0, aggressive = 0, invincible = 0, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/creature/shared_creature_default_weapon.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "Creature Defualt", -- Name ex. 'a Vibrolance' weaponTemp = "creature_default_weapon", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "UnarmedMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 0, weaponMinDamage = 50, weaponMaxDamage = 55, weaponAttackSpeed = 2, weaponDamageType = "KINETIC", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateWeaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateWeaponAttackSpeed = 0, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0", -- Group it belongs to for loot tame = 0, datapadItemCRC = 0, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "", boneMax = 0, hideType = "", hideMax = 0, meatType = "", meatMax = 0, skills = { "dimUAttack1" }, respawnTimer = 180, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(dimUMonasteryNun, 507065980) -- Add to Global Table
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/object/tangible/lair/hutt_thug/objects.lua
1
3373
--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_hutt_thug_shared_lair_hutt_thug_npc = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/poi_all_lair_bramble.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 25, clientDataFile = "clientdata/lair/shared_poi_all_lair_bones.cdf", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@lair_d:hutt_thug", gameObjectType = 4, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 64, objectName = "@lair_n:hutt_thug", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_lair_hutt_thug_shared_lair_hutt_thug_npc, 2374143434)
lgpl-3.0
yobiya/tdd_game_sample
cross/cocos2d/cocos/scripting/lua/script/extern.lua
48
2506
function clone(object) local lookup_table = {} local function _copy(object) if type(object) ~= "table" then return object elseif lookup_table[object] then return lookup_table[object] end local new_table = {} lookup_table[object] = new_table for key, value in pairs(object) do new_table[_copy(key)] = _copy(value) end return setmetatable(new_table, getmetatable(object)) end return _copy(object) end --Create an class. function class(classname, super) local superType = type(super) local cls if superType ~= "function" and superType ~= "table" then superType = nil super = nil end if superType == "function" or (super and super.__ctype == 1) then -- inherited from native C++ Object cls = {} if superType == "table" then -- copy fields from super for k,v in pairs(super) do cls[k] = v end cls.__create = super.__create cls.super = super else cls.__create = super end cls.ctor = function() end cls.__cname = classname cls.__ctype = 1 function cls.new(...) local instance = cls.__create(...) -- copy fields from class to native object for k,v in pairs(cls) do instance[k] = v end instance.class = cls instance:ctor(...) return instance end else -- inherited from Lua Object if super then cls = clone(super) cls.super = super else cls = {ctor = function() end} end cls.__cname = classname cls.__ctype = 2 -- lua cls.__index = cls function cls.new(...) local instance = setmetatable({}, cls) instance.class = cls instance:ctor(...) return instance end end return cls end function schedule(node, callback, delay) local delay = cc.DelayTime:create(delay) local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback)) local action = cc.RepeatForever:create(sequence) node:runAction(action) return action end function performWithDelay(node, callback, delay) local delay = cc.DelayTime:create(delay) local sequence = cc.Sequence:create(delay, cc.CallFunc:create(callback)) node:runAction(sequence) return sequence end
mit
TheAnswer/FirstTest
bin/scripts/creatures/objects/corellia/npcs/greck/greckAssassin.lua
1
4485
--Copyright (C) 2008 <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. greckAssassin = Creature:new { objectName = "greckAssassin", -- Lua Object Name creatureType = "NPC", gender = "", speciesName = "greck_assassin", stfName = "mob/creature_names", objectCRC = 1197861951, socialGroup = "Olag Greek", level = 11, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG, healthMax = 825, healthMin = 675, strength = 0, constitution = 0, actionMax = 825, actionMin = 675, quickness = 0, stamina = 0, mindMax = 825, mindMin = 675, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 0, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 0, energy = 0, electricity = 0, stun = -1, blast = 0, heat = 0, cold = 0, acid = 0, lightsaber = 0, accuracy = 0, healer = 0, pack = 1, herd = 0, stalker = 0, killer = 1, ferocity = 0, aggressive = 0, invincible = 0, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/ranged/pistol/shared_pistol_dx2.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "DX2 Pistol", -- Name ex. 'a Vibrolance' weaponTemp = "pistol_dx2", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "PistolRangedWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 1, weaponMinDamage = 140, weaponMaxDamage = 150, weaponAttackSpeed = 2, weaponDamageType = "ENERGY", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateWeaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateweaponAttackSpeed = 2, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateweaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0", -- Group it belongs to for loot tame = 0, datapadItemCRC = 0, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "", boneMax = 0, hideType = "", hideMax = 0, meatType = "", meatMax = 0, skills = { "greckAttack1" }, respawnTimer = 180, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(greckAssassin, 1197861951) -- Add to Global Table
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/slashcommands/admin/manufacture.lua
1
2441
--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 ManufactureSlashCommand = { name = "manufacture", alternativeNames = "", animation = "", invalidStateMask = 2097152, --glowingJedi, invalidPostures = "", target = 2, targeType = 0, disabled = 0, maxRangeToTarget = 0, --adminLevel = 0, addToCombatQueue = 0, } AddManufactureSlashCommand(ManufactureSlashCommand)
lgpl-3.0
Andrettin/Wyrmsun
scripts/units_fauna.lua
1
21894
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > -- \/ \/ \//_____/ \/ -- ______________________ ______________________ -- T H E W A R B E G I N S -- Stratagus - A free fantasy real time strategy game engine -- -- (c) Copyright 2016-2022 by Andrettin -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- DefineUnitType("unit-template-fauna-unit", { Name = "Fauna Unit", Parent = "unit-template-unit", Template = true, NeutralMinimapColor = {192, 192, 192}, Intelligence = 2, Charisma = 2, Organic = true, Fauna = true, Mana = {Enable = false, Max = 0, Value = 0, Increase = 1}, Traits = {"upgrade_clumsy", "upgrade_dextrous", "upgrade_dim", "upgrade-keen", "upgrade_limping", "upgrade_mighty", "upgrade-near-sighted", "upgrade-old", "upgrade_quick", "upgrade-reckless", "upgrade-resilient", "upgrade_slow", "upgrade_strong", "upgrade_weak"} }) DefineUnitType("unit-template-diminutive-fauna-unit", { Name = "Diminutive Fauna Unit", Parent = "unit-template-fauna-unit", Template = true, TileSize = {1, 1}, BoxSize = {16, 16}, HitPoints = 1, BasicDamage = 1, Missile = "missile-none", Accuracy = 15, Evasion = 15, MaxAttackRange = 1, Diminutive = true, Priority = 1, Points = 1, BoardSize = 0, }) DefineUnitType("unit-bee", { Name = "Bee", Parent = "unit-template-diminutive-fauna-unit", Species = "bee", Image = {"file", "neutral/units/bee.png", "size", {6, 6}}, Animations = "animations-bee", Icon = "icon-gryphon", Strength = 1, Dexterity = 14, Intelligence = 1, Charisma = 1, Speed = 3, DrawLevel = 44, SightRange = 2, Domain = "air_low", IsNotSelectable = true, RightMouseAction = "move", -- CanAttack = true, -- CanTargetLand = true, RandomMovementProbability = 50, Coward = true, Insect = true, Herbivore = true, PierceDamage = true, HiddenInEditor = true, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", -- "dead", "bird-dead", "hit", "dart-attack", "miss", "attack-miss" } } ) DefineUnitType("unit-fly", { Name = "Fly", Parent = "unit-template-diminutive-fauna-unit", Species = "fly", Image = {"file", "neutral/units/fly.png", "size", {6, 6}}, Animations = "animations-bee", Icon = "icon-gryphon", Strength = 1, Intelligence = 1, Charisma = 1, Speed = 3, DrawLevel = 44, SightRange = 2, Domain = "air_low", IsNotSelectable = true, RightMouseAction = "move", -- CanAttack = true, -- CanTargetLand = true, RandomMovementProbability = 50, Coward = true, Insect = true, Detritivore = true, PierceDamage = true, HiddenInEditor = true, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", -- "dead", "bird-dead", -- "hit", "dart-attack", -- "miss", "attack-miss" } } ) DefineUnitType("unit-bug", { Name = "Bug", Parent = "unit-template-diminutive-fauna-unit", Species = "bug", Image = {"file", "neutral/units/bug.png", "size", {6, 6}}, Animations = "animations-bee", Icon = "icon-gryphon", Strength = 1, Intelligence = 1, Charisma = 1, Speed = 3, DrawLevel = 39, SightRange = 2, Domain = "land", IsNotSelectable = true, RightMouseAction = "move", -- CanAttack = true, -- CanTargetLand = true, RandomMovementProbability = 50, Coward = true, Insect = true, Herbivore = true, HiddenInEditor = true, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", -- "dead", "bird-dead", -- "hit", "dart-attack", "miss", "attack-miss" } } ) DefineUnitType("unit-worm", { Name = "Worm", Parent = "unit-template-diminutive-fauna-unit", Species = "worm", Image = {"file", "neutral/units/worm.png", "size", {72, 72}}, Animations = "animations-worm", Icon = "icon-rat", Strength = 1, Intelligence = 1, Charisma = 1, Speed = 3, DrawLevel = 39, SightRange = 2, Domain = "land", IsNotSelectable = true, RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, Coward = true, Insect = true, Herbivore = true, Detritivore = true, HiddenInEditor = true, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", "dead", "squishy-hit", "hit", "squishy-attack", "miss", "squishy-miss" } } ) DefineUnitType("unit-snail", { Name = "Snail", Parent = "unit-template-fauna-unit", Species = "snail", Image = {"file", "neutral/units/snail.png", "size", {32, 32}}, Animations = "animations-snail", Icon = "icon-rat", Strength = 1, Intelligence = 1, Charisma = 1, Speed = 3, HitPoints = 1, DrawLevel = 39, TileSize = {1, 1}, BoxSize = {16, 16}, SightRange = 2, BasicDamage = 1, Missile = "missile-none", Accuracy = 15, Evasion = 15, MaxAttackRange = 1, Priority = 5, Points = 1, Demand = 1, Domain = "land", IsNotSelectable = true, RightMouseAction = "move", -- CanAttack = true, -- CanTargetLand = true, RandomMovementProbability = 25, Coward = true, Insect = true, Herbivore = true, Detritivore = true, HiddenInEditor = true, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", "dead", "squishy-hit", "hit", "squishy-attack", "miss", "squishy-miss" } } ) DefineUnitType("unit-slug", { Name = "Slug", Parent = "unit-template-fauna-unit", Species = "slug", Image = {"file", "neutral/units/slug.png", "size", {32, 32}}, Animations = "animations-slug", Icon = "icon-rat", Strength = 1, Intelligence = 1, Charisma = 1, Speed = 3, HitPoints = 1, DrawLevel = 39, TileSize = {1, 1}, BoxSize = {16, 16}, SightRange = 2, BasicDamage = 1, Missile = "missile-none", Accuracy = 15, Evasion = 15, MaxAttackRange = 1, Priority = 5, Points = 1, Demand = 1, Domain = "land", IsNotSelectable = true, RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, Coward = true, Insect = true, Herbivore = true, Detritivore = true, HiddenInEditor = true, Variations = { { "variation-id", "brown", "file", "neutral/units/slug_brown.png" }, { "variation-id", "green" }, --[[ { "variation-id", "teal", "file", "neutral/units/slug_teal.png" } --]] { "variation-id", "yellow", "file", "neutral/units/slug_yellow.png" } }, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", "dead", "squishy-hit", "hit", "squishy-attack", "miss", "squishy-miss" } } ) DefineUnitType("unit-snigill", { Name = "Baby Snigill", Parent = "unit-template-fauna-unit", Species = "snigill", Image = {"file", "neutral/units/snail_blue_purple_shell.png", "size", {32, 32}}, Animations = "animations-snail", Icon = "icon-rat", Strength = 1, Intelligence = 1, Charisma = 1, Speed = 3, HitPoints = 1, DrawLevel = 39, TileSize = {1, 1}, BoxSize = {16, 16}, SightRange = 2, BasicDamage = 1, Missile = "missile-none", Accuracy = 15, Evasion = 15, MaxAttackRange = 1, Priority = 5, Points = 1, Demand = 1, Domain = "land", IsNotSelectable = true, RightMouseAction = "move", -- CanAttack = true, -- CanTargetLand = true, RandomMovementProbability = 25, Coward = true, Insect = true, Herbivore = true, Detritivore = true, HiddenInEditor = true, Sounds = { "selected", "click", -- "acknowledge", "bird-selected", -- "ready", "bird-selected", "dead", "squishy-hit", "hit", "squishy-attack", "miss", "squishy-miss" } } ) DefineUnitType("unit-frog", { Name = "Frog", Parent = "unit-template-fauna-unit", Species = "frog", Description = "Frogs are amphibians who eat insects.", Image = {"file", "graphics/neutral/units/frog.png", "size", {18, 18}}, Animations = "animations-frog", Icon = "frog_green", Speed = 4, HitPoints = 5, DrawLevel = 35, TileSize = {1, 1}, BoxSize = {32, 32}, SightRange = 3, Armor = 0, BasicDamage = 1, Missile = "missile-none", Accuracy = 15, Evasion = 15, MaxAttackRange = 1, Priority = 5, Points = 2, Demand = 1, Domain = "land", RightMouseAction = "attack", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, RandomMovementDistance = 1, Flesh = true, Insectivore = true, Variations = { { "variation-id", "green" }, { "variation-id", "teal", "file", "graphics/neutral/units/frog_teal.png", "icon", "frog_teal" }, { "variation-id", "brown", "file", "graphics/neutral/units/frog_brown.png", "icon", "frog_brown" }, { "variation-id", "blue", "file", "graphics/neutral/units/frog_blue.png", "icon", "frog_blue" }, { "variation-id", "purple", "file", "graphics/neutral/units/frog_purple.png", "icon", "frog_purple" }, { "variation-id", "red", "file", "graphics/neutral/units/frog_red.png", "icon", "frog_red" }, { "variation-id", "yellow", "file", "graphics/neutral/units/frog_yellow.png", "icon", "frog_yellow" } }, Sounds = { "selected", "frog-ribbit", "ready", "frog-ribbit", "acknowledge", "frog-ribbit", "dead", "squishy-hit", "idle", "frog-ribbit", "miss", "frog-tongue", "hit", "frog-tongue" } } ) DefineUnitType("unit-adelobasileus-cromptoni", { Name = "Adelobasileus", Parent = "unit-template-fauna-unit", Species = "adelobasileus-cromptoni", Description = "The Adelobasileus was one of the earliest mammal-like animals to have lived, and is possibly a common ancestor of all mammals. It lived in trees, and its diet consisted of insects.", Image = {"file", "neutral/units/rat_light_gray_fur_short_tail.png", "size", {72, 72}}, Animations = "animations-rat", Icon = "icon-adelobasileus-cromptoni", Strength = 2, -- same as the rat Dexterity = 15, -- same as the rat Intelligence = 2, -- same as the rat Charisma = 2, -- same as the rat Speed = 8, HitPoints = 5, DrawLevel = 35, TileSize = {1, 1}, BoxSize = {32, 32}, SightRange = 3, BasicDamage = 1, Missile = "missile-none", MaxAttackRange = 1, Accuracy = 14, Evasion = 15, Priority = 7, Points = 1, Demand = 1, Domain = "land", RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, RandomMovementDistance = 3, Flesh = true, Insectivore = true, PierceDamage = true, Coward = true, Sounds = { "selected", "click", -- "acknowledge", "critter-acknowledge", -- "ready", "critter-ready", "dead", "rat-dead", "hit", "bite-attack", "miss", "attack-miss", "step", "step-dirt", "step-dirt", "step-dirt", "step-gravel", "step-gravel", "step-mud", "step-mud", "step-stone", "step-stone", "step-grass", "step-leaves" } } ) DefineUnitType("unit-galerix-exilis", { Name = "Galerix", Parent = "unit-template-fauna-unit", Species = "galerix-exilis", Description = "The Galerix was an ancient small mammal who lived off insects.", Image = {"file", "neutral/units/rat_light_gray_fur_short_tail.png", "size", {72, 72}}, Animations = "animations-rat", Icon = "icon-galerix-exilis", Strength = 2, -- same as the rat Dexterity = 15, -- same as the rat Intelligence = 2, -- same as the rat Charisma = 2, -- same as the rat Speed = 8, HitPoints = 5, DrawLevel = 35, TileSize = {1, 1}, BoxSize = {32, 32}, SightRange = 3, BasicDamage = 1, Missile = "missile-none", MaxAttackRange = 1, Accuracy = 14, Evasion = 15, Priority = 7, Points = 1, Demand = 1, Domain = "land", RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, RandomMovementDistance = 3, Flesh = true, Insectivore = true, PierceDamage = true, Coward = true, Sounds = { "selected", "click", -- "acknowledge", "critter-acknowledge", -- "ready", "critter-ready", "dead", "rat-dead", "hit", "bite-attack", "miss", "attack-miss", "step", "step-dirt", "step-dirt", "step-dirt", "step-gravel", "step-gravel", "step-mud", "step-mud", "step-stone", "step-stone", "step-grass", "step-leaves" } } ) --[[ DefineUnitType("unit-megacricetodon-collongensis", { Name = "Megacricetodon", Parent = "unit-template-fauna-unit", Species = "megacricetodon-collongensis", Description = "The Megacricetodon was a prehistoric rodent who lived in Europe. It was omnivore, and ate mostly insects.", Image = {"file", "neutral/units/rat_light_gray_fur.png", "size", {72, 72}}, Animations = "animations-rat", Icon = "icon-megacricetodon-collongensis", Strength = 2, -- same as the rat Dexterity = 15, -- same as the rat Intelligence = 2, -- same as the rat Charisma = 2, -- same as the rat Speed = 8, HitPoints = 5, DrawLevel = 35, TileSize = {1, 1}, BoxSize = {32, 32}, SightRange = 3, BasicDamage = 1, Missile = "missile-none", MaxAttackRange = 1, Accuracy = 14, Evasion = 15, Priority = 7, Points = 1, Demand = 1, Domain = "land", RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, RandomMovementDistance = 3, Flesh = true, Insectivore = true, PierceDamage = true, Coward = true, Sounds = { "selected", "click", -- "acknowledge", "critter-acknowledge", -- "ready", "critter-ready", "dead", "rat-dead", "hit", "bite-attack", "miss", "attack-miss", "step", "step-dirt", "step-dirt", "step-dirt", "step-gravel", "step-gravel", "step-mud", "step-mud", "step-stone", "step-stone", "step-grass", "step-leaves" } } ) --]] DefineUnitType("unit-gryphon", { Name = "Gryphon", Parent = "unit-template-fauna-unit", Species = "gryphon", Description = "Gryphons dwell in the dwarven homeworld of Nidavellir, predating smaller animals such as yales. Although many gryphons can be seen in the wild, dwarves have been domesticating the beasts for aeons, riding them into battle. The Gryphon Mountain is the greatest nesting area for wild gryphons.", Quote = "\"What's this? Gryphons in my castle? Remove the beasts!\" - Relgorn, Chieftain of the <a href='faction:norlund_clan'>Norlund Clan</a>", Image = {"file", "neutral/units/gryphon.png", "size", {100, 100}}, Animations = "animations-gryphon", Icon = "icon-gryphon", Strength = 18, Dexterity = 15, Intelligence = 5, Charisma = 8, Speed = 14, HitPoints = 90, DrawLevel = 60, TileSize = {2, 2}, BoxSize = {64, 64}, SightRange = 6, Armor = 0, BasicDamage = 12, Missile = "missile-none", MaxAttackRange = 1, Accuracy = 10, Evasion = 10, Priority = 65, Points = 150, Demand = 2, Domain = "air", RightMouseAction = "move", CanAttack = true, CanTargetLand = true, CanTargetSea = true, CanTargetAir = true, RandomMovementProbability = 25, RandomMovementDistance = 12, Predator = true, PeopleAversion = true, Flesh = true, Carnivore = true, PierceDamage = true, Variations = { --[[ { "variation-id", "young", -- "file", "neutral/units/gryphon_young.png", "frame-size", {50, 50}, "upgrade-required", "upgrade-gryphon-child" }, --]] { "variation-id", "brown-feathers" -- "upgrade-forbidden", "upgrade-gryphon-child" }, { "variation-id", "blue-feathers", "file", "neutral/units/gryphon_blue_feathers.png", "icon", "icon-gryphon-blue-feathers" -- "upgrade-forbidden", "upgrade-gryphon-child" }, { "variation-id", "gray-feathers", "file", "neutral/units/gryphon_gray_feathers.png", "icon", "icon-gryphon-gray-feathers" -- "upgrade-forbidden", "upgrade-gryphon-child" } }, Sounds = { "selected", "gryphon-ready", "acknowledge", "gryphon-ready", "ready", "gryphon-ready", "idle", "gryphon-ready", "dead", "gryphon-dead", "hit", "claw-attack", "miss", "attack-miss" } } ) DefineUnitType("unit-slime", { Name = "Slime", Parent = "unit-template-fauna-unit", Species = "slime", Description = "Slimes are amorphous organic beings which can be found throughout the dark plains and caves of Nidavellir. Little is known about their composition, except that they are acidic to the touch.", Image = {"file", "neutral/units/slime_small.png", "size", {32, 32}}, Animations = "animations-slime", Icon = "icon-slime", Strength = 12, Dexterity = 2, Intelligence = 1, Charisma = 1, Speed = 3, HitPoints = 30, DrawLevel = 35, TileSize = {1, 1}, BoxSize = {32, 32}, Armor = 10, SightRange = 3, AcidDamage = 5, Missile = "missile-none", Accuracy = 8, Evasion = 1, MaxAttackRange = 1, Priority = 37, Points = 20, Demand = 1, Domain = "land", RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 25, PeopleAversion = true, Slime = true, Detritivore = true, Carnivore = true, BluntDamage = true, Traits = {"upgrade_mighty", "upgrade_strong", "upgrade_weak", "upgrade-old", "upgrade_quick", "upgrade-resilient", "upgrade_slow"}, -- slimes have a more limited selection of traits, since they have a rather different biology Variations = { { "variation-id", "green", "file", "neutral/units/slime_baby.png", "frame-size", {16, 16}, "upgrade-required", "upgrade-child" }, { "variation-id", "red", "file", "neutral/units/slime_baby_red.png", "icon", "icon-slime-red", "frame-size", {16, 16}, "upgrade-required", "upgrade-child" }, { "variation-id", "brown", "file", "neutral/units/slime_baby_brown.png", "icon", "icon-slime-brown", "frame-size", {16, 16}, "upgrade-required", "upgrade-child" }, { "variation-id", "blue", "file", "neutral/units/slime_baby_blue.png", "icon", "icon-slime-blue", "frame-size", {16, 16}, "upgrade-required", "upgrade-child" }, { "variation-id", "teal", "file", "neutral/units/slime_baby_teal.png", "icon", "icon-slime-teal", "frame-size", {16, 16}, "upgrade-required", "upgrade-child" }, { "variation-id", "green", "upgrade-forbidden", "upgrade-child" }, { "variation-id", "red", "file", "neutral/units/slime_small_red.png", "icon", "icon-slime-red", "upgrade-forbidden", "upgrade-child" }, { "variation-id", "brown", "file", "neutral/units/slime_small_brown.png", "icon", "icon-slime-brown", "upgrade-forbidden", "upgrade-child" }, { "variation-id", "blue", "file", "neutral/units/slime_small_blue.png", "icon", "icon-slime-blue", "upgrade-forbidden", "upgrade-child" }, { "variation-id", "teal", "file", "neutral/units/slime_small_teal.png", "icon", "icon-slime-teal", "upgrade-forbidden", "upgrade-child" } }, Sounds = { "selected", "click", -- "acknowledge", "critter-acknowledge", -- "ready", "critter-ready", "dead", "squishy-hit", "hit", "squishy-attack", "miss", "squishy-miss", "step", "step-dirt", "step-dirt", "step-dirt", "step-gravel", "step-gravel", "step-mud", "step-mud", "step-stone", "step-stone", "step-grass", "step-leaves" } } ) DefineUnitType("unit-bird", { Name = "Bird", Parent = "unit-template-fauna-unit", Species = "bird", Image = {"file", "neutral/units/bird_brown.png", "size", {32, 32}}, Animations = "animations-bird", Icon = "icon-gryphon", Strength = 1, Dexterity = 15, Intelligence = 3, Charisma = 6, Speed = 14, HitPoints = 5, DrawLevel = 45, TileSize = {1, 1}, BoxSize = {32, 32}, SightRange = 5, BasicDamage = 2, Missile = "missile-none", MaxAttackRange = 1, Priority = 37, Points = 1, Demand = 1, Domain = "air", IsNotSelectable = true, RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 100, RandomMovementDistance = 12, Coward = true, Flesh = true, Insectivore = true, PierceDamage = true, HiddenInEditor = true, Variations = { { "variation-id", "brown" }, { "variation-id", "gray", "file", "neutral/units/bird_gray.png" }, { "variation-id", "white", "file", "neutral/units/bird_white.png" } }, Sounds = { "selected", "bird-selected", "acknowledge", "bird-selected", "ready", "bird-selected", "idle", "bird-selected", "dead", "bird-dead", "hit", "claw-attack", "miss", "attack-miss" } } ) DefineUnitType("unit-crow", { Name = "Crow", Parent = "unit-template-fauna-unit", Species = "crow", Description = "Crows are carrion-eating birds.", Image = {"file", "neutral/units/bird_black.png", "size", {32, 32}}, Animations = "animations-bird", Icon = "crow", Strength = 1, Dexterity = 15, Intelligence = 3, Charisma = 6, Speed = 14, HitPoints = 5, DrawLevel = 45, TileSize = {1, 1}, BoxSize = {32, 32}, SightRange = 5, BasicDamage = 2, Missile = "missile-none", MaxAttackRange = 1, Priority = 37, Points = 1, Demand = 1, Domain = "air", RightMouseAction = "move", CanAttack = true, CanTargetLand = true, RandomMovementProbability = 100, RandomMovementDistance = 12, Coward = true, Flesh = true, Insectivore = true, Detritivore = true, PierceDamage = true, Sounds = { "selected", "crow-selected", "acknowledge", "crow-selected", "ready", "crow-selected", "idle", "crow-selected", "dead", "bird-dead", "hit", "claw-attack", "miss", "attack-miss" } } )
gpl-2.0
Modified-MW-DF/modified-MDF
MWDF Project/Dwarf Fortress/hack/scripts/embark-skills.lua
2
2635
-- Adjusts dwarves' skills when embarking --[====[ embark-skills ============= Adjusts dwarves' skills when embarking. Note that already-used skill points are not taken into account or reset. :points N: Sets the skill points remaining of the selected dwarf to ``N``. :points N all: Sets the skill points remaining of all dwarves to ``N``. :max: Sets all skills of the selected dwarf to "Proficient". :max all: Sets all skills of all dwarves to "Proficient". :legendary: Sets all skills of the selected dwarf to "Legendary". :legendary all: Sets all skills of all dwarves to "Legendary". ]====] VERSION = '0.1' function usage() print([[Usage: embark-skills points N: Sets the skill points remaining of the selected dwarf to 'N'. embark-skills points N all: Sets the skill points remaining of all dwarves to 'N'. embark-skills max: Sets all skills of the selected dwarf to "Proficient". embark-skills max all: Sets all skills of all dwarves to "Proficient". embark-skills legendary: Sets all skills of the selected dwarf to "Legendary". embark-skills legendary all: Sets all skills of all dwarves to "Legendary". embark-skills help: Display this help embark-skills v]] .. VERSION) end function err(msg) dfhack.printerr(msg) usage() qerror('') end function adjust(dwarves, callback) for _, dwf in pairs(dwarves) do callback(dwf) end end scr = dfhack.gui.getCurViewscreen() if dfhack.gui.getCurFocus() ~= 'setupdwarfgame' or scr.show_play_now == 1 then qerror('Must be called on the "Prepare carefully" screen') end dwarf_info = scr.dwarf_info dwarves = dwarf_info selected_dwarf = {[0] = scr.dwarf_info[scr.dwarf_cursor]} args = {...} if args[1] == 'points' then points = tonumber(args[2]) if points == nil then err('Invalid points') end if args[3] ~= 'all' then dwarves = selected_dwarf end adjust(dwarves, function(dwf) dwf.levels_remaining = points end) elseif args[1] == 'max' then if args[2] ~= 'all' then dwarves = selected_dwarf end adjust(dwarves, function(dwf) for skill, level in pairs(dwf.skills) do dwf.skills[skill] = df.skill_rating.Proficient end end) elseif args[1] == 'legendary' then if args[2] ~= 'all' then dwarves = selected_dwarf end adjust(dwarves, function(dwf) for skill, level in pairs(dwf.skills) do dwf.skills[skill] = df.skill_rating.Legendary5 end end) else usage() end
mit
TheAnswer/FirstTest
bin/scripts/object/tangible/component/food/secrets/objects.lua
1
6177
--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_component_food_secrets_shared_secret_base = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/eqp_data_disk.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@craft_food_ingredients_d:secret_base", gameObjectType = 262144, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@craft_food_ingredients_n:secret_base", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_component_food_secrets_shared_secret_base, 4005001840) object_tangible_component_food_secrets_shared_secret_imperial_biochem = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/eqp_data_disk.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@craft_food_ingredients_d:secret_imperial_biochem", gameObjectType = 262144, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@craft_food_ingredients_n:secret_imperial_biochem", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_component_food_secrets_shared_secret_imperial_biochem, 2542399223) object_tangible_component_food_secrets_shared_secret_rebel_biochem = SharedTangibleObjectTemplate:new { appearanceFilename = "appearance/eqp_data_disk.apt", arrangementDescriptorFilename = "", certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 1, customizationVariableMapping = {}, detailedDescription = "@craft_food_ingredients_d:secret_rebel_biochem", gameObjectType = 262144, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@craft_food_ingredients_n:secret_rebel_biochem", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/tangible.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0 } ObjectTemplates:addTemplate(object_tangible_component_food_secrets_shared_secret_rebel_biochem, 1836800845)
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/crafting/objects/draftschematics/artisan/noviceArtisan/bofaTreat.lua
1
4087
--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. bofaTreat = Object:new { objectName = "Bofa Treat", stfName = "bofa_treat", stfFile = "food_name", objectCRC = 2207249955, groupName = "craftArtisanNewbieGroupB", -- Group schematic is awarded in (See skills table) craftingToolTab = 4, -- (See DraftSchemticImplementation.h) complexity = 3, size = 1, xpType = "crafting_general", xp = 20, assemblySkill = "general_assembly", experimentingSkill = "general_experimentation", ingredientTemplateNames = "craft_food_ingredients_n, craft_food_ingredients_n, craft_food_ingredients_n", ingredientTitleNames = "dried_fruit, crust, additive", ingredientSlotType = "0, 0, 4", resourceTypes = "organic, cereal, object/tangible/food/crafted/additive/shared_additive_light.iff", resourceQuantities = "3, 8, 1", combineTypes = "0, 0, 1", contribution = "100, 100, 100", numberExperimentalProperties = "1, 1, 1, 2, 2, 2, 2", experimentalProperties = "XX, XX, XX, PE, OQ, FL, OQ, DR, PE, DR, OQ", experimentalWeights = "1, 1, 1, 2, 1, 2, 1, 1, 3, 3, 1", experimentalGroupTitles = "null, null, null, exp_nutrition, exp_flavor, exp_quantity, exp_filling", experimentalSubGroupTitles = "null, null, hitpoints, nutrition, flavor, quantity, filling", experimentalMin = "0, 0, 1000, 75, 60, 60, 80", experimentalMax = "0, 0, 1000, 120, 120, 100, 120", experimentalPrecision = "0, 0, 0, 0, 0, 0, 0", tanoAttributes = "objecttype=8202:objectcrc=2010692823:stfFile=food_name:stfName=bofa_treat:stfDetail=:itemmask=65535:customattributes=buffCRC=2339561171;downerCRC=0;buffType=1;numAttributes=1;mods=;buffs=health=50,;heals=;quantity=10;filling=9;duration=3000;:", blueFrogAttributes = "", blueFrogEnabled = False, customizationOptions = "", customizationDefaults = "", customizationSkill = "clothing_customization" } DraftSchematics:addDraftSchematic(bofaTreat, 2207249955)--- Add to global DraftSchematics table
lgpl-3.0
Lunovox/minetest_nibirus_game
mods/add/lunoshooters/item_shotgun.lua
1
1078
minetest.register_tool("lunoshooters:shotgun", { description = "Escopeta (12mm)", inventory_image = "shooter_shotgun.png", groups = { shooters=1 }, on_use = function(itemstack, user, pointed_thing) local name = user:get_player_name() lunoshooters:fire_weapon(user, pointed_thing, { name = name, range = 16, step = 15, tool_caps = {full_punch_interval=1.5, damage_groups={fleshy=4}}, groups = {cracky=3, snappy=2, crumbly=2, choppy=2, fleshy=1, oddly_breakable_by_hand=1}, sound = "shooter_shotgun", particle = "smoke_puff.png", }) itemstack:add_wear(1311) -- 50 Rounds return itemstack end, }) minetest.register_craft({ output = "lunoshooters:shotgun", recipe = { {"default:steel_ingot", "", ""}, {"", "default:steel_ingot", ""}, {"", "default:mese_crystal", "default:bronze_ingot"}, }, }) minetest.register_alias("shotgun", "lunoshooters:shotgun") minetest.register_alias("espingarda", "lunoshooters:shotgun") minetest.register_alias("escopeta", "lunoshooters:shotgun") minetest.register_alias("12mm", "lunoshooters:shotgun")
agpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/rori/creatures/capperSpineflapDrone.lua
1
4671
--Copyright (C) 2008 <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. capperSpineflapDrone = Creature:new { objectName = "capperSpineflapDrone", -- Lua Object Name creatureType = "ANIMAL", gender = "", speciesName = "capper_spineflap_drone", stfName = "mob/creature_names", objectCRC = 3797965860, socialGroup = "Spineflap", level = 6, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG, healthMax = 220, healthMin = 180, strength = 0, constitution = 0, actionMax = 220, actionMin = 180, quickness = 0, stamina = 0, mindMax = 220, mindMin = 180, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 0, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 0, energy = 0, electricity = 0, stun = -1, blast = 0, heat = 0, cold = 0, acid = 0, lightsaber = 0, accuracy = 0, healer = 0, pack = 1, herd = 0, stalker = 0, killer = 0, ferocity = 0, aggressive = 0, invincible = 0, meleeDefense = 1, rangedDefense = 1, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/creature/shared_creature_default_weapon.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "Creature Defualt", -- Name ex. 'a Vibrolance' weaponTemp = "creature_default_weapon", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "UnarmedMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 0, weaponMinDamage = 50, weaponMaxDamage = 55, weaponAttackSpeed = 2, weaponDamageType = "KINETIC", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateWeaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateWeaponAttackSpeed = 0, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0", -- Group it belongs to for loot tame = 0.25, -- Likely hood to be tamed datapadItemCRC = 85637661, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "bone_avian_naboo", boneMax = 6, hideType = "hide_scaley_naboo", hideMax = 10, meatType = "meat_insect_naboo", meatMax = 6, skills = { "spineflapAttack1" }, respawnTimer = 60, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(capperSpineflapDrone, 3797965860) -- Add to Global Table
lgpl-3.0
JarnoVgr/ZombieSurvival
gamemodes/zombiesurvival/entities/weapons/weapon_zs_sigilplacer/shared.lua
1
4373
SWEP.PrintName = "Sigil Placer" SWEP.ViewModel = "models/weapons/c_pistol.mdl" SWEP.WorldModel = "models/weapons/w_pistol.mdl" SWEP.UseHands = true SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" function SWEP:Initialize() if SERVER then self:RefreshSigils() end end function SWEP:Deploy() if SERVER then self:RefreshSigils() end return true end function SWEP:Holster() if SERVER then for _, ent in pairs(ents.FindByClass("point_fakesigil")) do ent:Remove() end end return true end function SWEP:PrimaryAttack() local owner = self.Owner if not owner:IsSuperAdmin() then return end owner:DoAttackEvent() if CLIENT then return end local tr = owner:TraceLine(10240) if tr.HitWorld and tr.HitNormal.z >= 0.8 then table.insert(GAMEMODE.ProfilerNodes, tr.HitPos) self:RefreshSigils() GAMEMODE.ProfilerIsPreMade = true GAMEMODE:SaveProfilerPreMade(GAMEMODE.ProfilerNodes) end end function SWEP:SecondaryAttack() local owner = self.Owner if not owner:IsSuperAdmin() then return end owner:DoAttackEvent() if CLIENT then return end local tr = owner:TraceLine(10240) local newpoints = {} for _, point in pairs(GAMEMODE.ProfilerNodes) do if point:Distance(tr.HitPos) > 64 then table.insert(newpoints, point) end end GAMEMODE.ProfilerNodes = newpoints self:RefreshSigils() GAMEMODE.ProfilerIsPreMade = true GAMEMODE:SaveProfilerPreMade(GAMEMODE.ProfilerNodes) end function SWEP:Reload() local owner = self.Owner if not owner:IsSuperAdmin() then return end owner:DoAttackEvent() if CLIENT then return end if not self.StartReload and not self.StartReload2 then self.StartReload = CurTime() owner:ChatPrint("Keep holding reload to clear all pre-made sigil points.") end end if SERVER then function SWEP:Think() if self.StartReload2 then if not self.Owner:KeyDown(IN_RELOAD) then self.StartReload2 = nil return end if CurTime() >= self.StartReload2 + 3 then self.StartReload2 = nil self.Owner:ChatPrint("Deleted everything including generated nodes. Turned off generated mode.") GAMEMODE.ProfilerIsPreMade = true GAMEMODE:DeleteProfilerPreMade() GAMEMODE.ProfilerNodes = {} GAMEMODE:SaveProfiler() self:RefreshSigils() end elseif self.StartReload then if not self.Owner:KeyDown(IN_RELOAD) then self.StartReload = nil return end if CurTime() >= self.StartReload + 3 then self.StartReload = nil self.Owner:ChatPrint("Deleted all pre-made sigil points and reverted to generated mode. Keep holding reload to delete ALL nodes.") GAMEMODE.ProfilerIsPreMade = false GAMEMODE:DeleteProfilerPreMade() GAMEMODE:LoadProfiler() self:RefreshSigils() self.StartReload2 = CurTime() end end end end function SWEP:RefreshSigils() for _, ent in pairs(ents.FindByClass("point_fakesigil")) do ent:Remove() end for _, point in pairs(GAMEMODE.ProfilerNodes) do local ent = ents.Create("point_fakesigil") if ent:IsValid() then ent:SetPos(point) ent:Spawn() end end end concommand.Add("zs_sigilplacer", function(sender) if sender:IsValid() and sender:IsSuperAdmin() then sender:Give("weapon_zs_sigilplacer") end end) local ENT = {} ENT.Type = "anim" function ENT:Initialize() self:DrawShadow(false) self:SetModelScale(1.1, 0) self:SetModel("models/props_wasteland/medbridge_post01.mdl") self:SetMoveType(MOVETYPE_NONE) self:SetSolid(SOLID_NONE) end if CLIENT then ENT.RenderGroup = RENDERGROUP_TRANSLUCENT function ENT:DrawTranslucent() local lp = LocalPlayer() if lp:IsValid() then local wep = lp:GetActiveWeapon() if wep:IsValid() and wep:GetClass() == "weapon_zs_sigilplacer" then cam.IgnoreZ(true) render.SetBlend(0.5) render.SetColorModulation(1, 0, 0) render.SuppressEngineLighting(true) self:DrawModel() render.SuppressEngineLighting(false) render.SetColorModulation(1, 1, 1) render.SetBlend(1) cam.IgnoreZ(false) end end end end scripted_ents.Register(ENT, "point_fakesigil")
gpl-2.0
Modified-MW-DF/modified-MDF
MWDF Project/Dwarf Fortress/hack/scripts/make-monarch.lua
2
1287
--set target unit as king/queen --[====[ make-monarch ============ Make the selected unit King or Queen of your civilisation. ]====] local unit=dfhack.gui.getSelectedUnit() if not unit then qerror("No unit selected") end local newfig=dfhack.units.getNemesis(unit).figure local my_entity=df.historical_entity.find(df.global.ui.civ_id) local monarch_id for k,v in pairs(my_entity.positions.own) do if v.code=="MONARCH" then monarch_id=v.id break end end if not monarch_id then qerror("No monarch found!") end local old_id for pos_id,v in pairs(my_entity.positions.assignments) do if v.position_id==monarch_id then old_id=v.histfig v.histfig=newfig.id local oldfig=df.historical_figure.find(old_id) for k,v in pairs(oldfig.entity_links) do if df.histfig_entity_link_positionst:is_instance(v) and v.assignment_id==pos_id and v.entity_id==df.global.ui.civ_id then oldfig.entity_links:erase(k) break end end newfig.entity_links:insert("#",{new=df.histfig_entity_link_positionst,entity_id=df.global.ui.civ_id, link_strength=100,assignment_id=pos_id,start_year=df.global.cur_year}) break end end
mit
robertbrook/underscore_lua
spec/any_spec.lua
3
1240
require 'spec_helper' describe["_.any"] = function() describe["when providing a truth function"] = function() describe["when some of the elements pass the function"] = function() before = function() input = { 1,2,3 } result = _.any(input, function(i) return i%2==0 end) end it["should return true"] = function() expect(result).should_be(true) end end describe["when none of the elements pass the function"] = function() before = function() input = { 1,3,5 } result = _.any(input, function(i) return i%2==0 end) end it["should return false"] = function() expect(result).should_be(false) end end end describe["when not providing a truth function"] = function() describe["when some elements are not false"] = function() before = function() input = { 1,2,true,false } result = _.any(input) end it["should return true"] = function() expect(result).should_be(true) end end describe["when none of the elements are not true"] = function() before = function() input = { false,false } result = _.any(input) end it["should return false"] = function() expect(result).should_be(false) end end end end spec:report(true)
mit
PAPAGENO-devels/papageno
test/benchmarks/Lua/lua-regression-test/grim/msb_thunder.lua
1
1658
msb_thunder_startwalk = 0 msb_thunder_stopwalk = 1 msb_thunder_walk = 2 msb_thunder_talk = 3 msb_thunder_stop_talk = 4 msb_thunder_run = 5 msb_thunder_start_run = 6 msb_thunder_stop_run = 7 msb_thunder_rest = 8 msb_thunder_turn_right = 9 msb_thunder_walk_upstairs = 10 msb_thunder_walk_downstairs = 11 msb_thunder_putback_small = 12 msb_thunder_putback_done = 13 msb_thunder_takeout_get = 14 msb_thunder_takeout_big = 15 msb_thunder_back_off = 16 msb_thunder_step_fwd = 17 msb_thunder_hand_on_obj = 18 msb_thunder_hand_off_obj = 19 msb_thunder_use_obj = 20 msb_thunder_takeout_empty = 21 msb_thunder_swivel_lf = 22 msb_thunder_swivel_rt = 23 msb_thunder_a = 24 msb_thunder_c = 25 msb_thunder_e = 26 msb_thunder_l = 27 msb_thunder_f = 28 msb_thunder_m = 29 msb_thunder_o = 30 msb_thunder_u = 31 msb_thunder_no_talk = 32 msb_thunder_mumble = 33 msb_thunder_reach_high = 34 msb_thunder_reach_med = 35 msb_thunder_takeout_small = 36 msb_thunder_hold = 37 msb_thunder_hold_scythe = 38 msb_thunder_putback_big = 39 msb_thunder_reach_low = 40 msb_thunder_reach_cabinet = 41 msb_thunder_give = 42 msb_thunder_give_hold = 43 msb_thunder_give_exit = 44 msb_thunder_activate_hand = 45 msb_thunder_activate_mug = 46 msb_thunder_activate_spcan = 47 msb_thunder_activate_nitro = 48 msb_thunder_activate_rag = 49 msb_thunder_activate_grinder = 50 msb_thunder_activate_oily_rag = 51 msb_thunder_activate_bottle = 52 msb_thunder_lf_hand_on_obj = 53 msb_thunder_lf_hand_off_obj = 54 msb_thunder_activate_coffeepot = 55 msb_thunder_activate_lsa_photo = 56 msb_thunder_use_grinder = 57 msb_thunder_use_empty_grinder = 58 msb_thunder_use_boneless_grinder = 59 msb_thunder_t = 60
gpl-2.0
hamode-Aliraq/HAMODE_ALIRAQE
plugins/list1.lua
1
2770
--[[ # #ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ #:(( # For More Information ....! # Developer : hamode ⇒ @llual # our channel: @Dev_com # Version: 1.1 #:)) #ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ # ]] do local function run(msg, matches) if is_momod(msg) and matches[1]== "m2" then return [[ 🔹اوامر الحماية داخل المجموعة 🔹 __________________________ /kick + <user|reply> : طرد | ⛔️ /silent + <user|reply> : كتم | 🔕 /block + <user|reply>: بلوك | ♨️ /ban + <user|reply>: حظر | 🚷 /unban + <user> : الغاء الحظر | ⭕️ /banlist : المحظورين | 🆘 /id : ايدي | 🆔 /kickme : مغادرة | 🚫 _________________________ - اوامر القفل والفتح في المجموعة | ✂️ _________________________ /mute audio : منع الصوتيات | 🔊 /mute photo : منع الصور | 🌠 /mute video : منع الفديوات | 🎥 /mute gifs : منع الصور المتحركة | 🎡 /mute doc : منع الملفات | 🗂 /mute text : منع الكتابة | 📝 /mute all : تفعيل وضع الصمت | 🔕 _________________________ /mute — للمنع , /unmute — للسماح _________________________ /lock ↴ 🔒 اقفل | /unlock ↴ 🔓 افتح links : الروابط | 🔗 contacts : جهات الاتصال | 📵 flood : التكرارات | 🔐 Spam : الكلايش الطويلة | 📊 arabic : اللغة العربية | 🆎 english : اللغة الانكليزية : | 🔡 member : اضافة الاعضاء | 👤 rtl : الرتل | 🚸 Tgservice : اشعارات الدخول | ⚛ sticker : الملصقات | 🎡 tag : الاشارة او التاك | ➕ emoji : السمايلات | 😃 bots : البوتات | 🤖 fwd : اعادة التوجيه | ↩️ reply : الردود | 🔃 join : الدخول عبر الرابط | 🚷 username : اليوزرنيم | @ media : الميديا | 🆘 badword : الكلمات السيئة | 🏧 leave : المغادرة | 🚶 strict : الحماية | ⛔️ all : الكل | 🔕 _________________________ 🔹طريقة استخدام الاوامر 🔹 🔒/lock + للقفل — الامر 🔓/unlock + للفتح — الامر _________________________ Dev :- @llual 🎗 Channel :- @Dev_ckm ]] end if not is_momod(msg) then return "لتلعب بكيفك 😐⛔️" end end return { description = "Help list", usage = "Help list", patterns = { "[#!/](m2)" }, run = run } end
gpl-2.0
PAPAGENO-devels/papageno
test/benchmarks/Lua/lua-regression-test/grim/dlg_bees.lua
1
9920
CheckFirstTime("dlg_bees.lua") be1 = Dialog:create() be1.focus = dd.barrel_bees be1.intro = function(arg1) -- line 13 be1.node = "first_bee_node" break_here() break_here() terry:remove_barrel_stamp() if hh.union_card.owner == manny then be1[190].off = TRUE elseif lm.talked_union and not be1[190].said then be1[190].off = FALSE end if lm.talked_naranja and not be1[200].said then be1[200].off = FALSE end if lm.talked_tools and not be1[170].said then be1[170].off = FALSE end if not be1.talked then be1.talked = 1 manny:head_look_at_point(0.432771, -2.99192, 0.4396) manny:say_line("/ddma074/") wait_for_message() terry:say_line("/ddte075/") terry:stop_barrel_idles() terry:head_left() start_script(terry.head_nod, terry) wait_for_message() else manny:head_look_at_point(0.432771, -2.99192, 0.4396) manny:say_line("/ddma076/") wait_for_message() be1.talked = be1.talked + 1 terry:stop_barrel_idles() terry:head_left() if be1.talked == 2 then terry:say_line("/ddte077/") wait_for_message() start_script(terry.stop_head_left, terry) terry:say_line("/ddte078/") wait_for_message() start_script(terry.head_left, terry) terry:say_line("/ddte079/") elseif be1.talked == 3 then terry:say_line("/ddte080/") wait_for_message() terry:say_line("/ddte081/") wait_for_message() start_script(terry.head_wag, terry) terry:say_line("/ddte082/") elseif be1.talked == 4 then terry:say_line("/ddte083/") wait_for_message() start_script(terry.stop_head_left, terry) terry:say_line("/ddte084/") wait_for_message() start_script(terry.head_left, terry) terry:say_line("/ddte085/") else start_script(terry.lefthand_out, terry) terry:say_line("/ddte086/") wait_for_message() start_script(terry.stop_lefthand_out, terry) terry:say_line("/ddte087/") end end end be1[100] = { text = "/ddma088/", first_bee_node = TRUE, gesture = manny.shrug_gesture } be1[100].response = function(arg1) -- line 87 arg1.off = TRUE be1[110].off = FALSE if not be1[140].said then be1[140].off = FALSE end be1[180].off = FALSE be1.exit_lines.first_bee_node = be1.delayed_exit_line terry:say_line("/ddte089/") terry:shrug() wait_for_message() terry:say_line("/ddte090/") terry:head_wag() start_script(terry.stop_shrug, terry) wait_for_message() terry:say_line("/ddte091/") wait_for_message() start_script(terry.lefthand_out, terry) terry:say_line("/ddte092/") terry:wait_for_message() start_script(terry.stop_lefthand_out, terry) end be1[110] = { text = "/ddma093/", first_bee_node = TRUE, gesture = manny.head_forward_gesture } be1[110].off = TRUE be1[110].response = function(arg1) -- line 112 arg1.off = TRUE terry:say_line("/ddte094/") wait_for_message() manny:point_gesture() manny:say_line("/ddma095/") wait_for_message() terry:say_line("/ddte096/") wait_for_message() terry:say_line("/ddte097/") terry:gesture1() terry:gesture2() wait_for_message() terry:say_line("/ddte098/") terry:stop_gesture() end be1[120] = { text = "/ddma099/", first_bee_node = TRUE, gesture = manny.tilt_head_gesture } be1[120].response = function(arg1) -- line 130 arg1.off = TRUE be1[130].off = FALSE if not be1[140].said then be1[140].off = FALSE end if not be1[150].said then be1[150].off = FALSE end be1[160].off = FALSE be1.exit_lines.first_bee_node = be1.delayed_exit_line start_script(terry.head_wag, terry) terry:say_line("/ddte100/") wait_for_message() start_script(terry.lefthand_out, terry) terry:say_line("/ddte101/") wait_for_message() start_script(terry.stop_lefthand_out, terry) terry:say_line("/ddte102/") end be1[130] = { text = "/ddma103/", first_bee_node = TRUE, gesture = manny.shrug_gesture } be1[130].off = TRUE be1[130].response = function(arg1) -- line 153 arg1.off = TRUE start_script(terry.head_wag, terry) terry:say_line("/ddte104/") wait_for_message() terry:say_line("/ddte105/") terry:stop_head_left() wait_for_message() start_script(terry.head_left, terry) terry:say_line("/ddte106/") wait_for_message() terry:say_line("/ddte107/") sleep_for(1000) start_script(terry.shrug, terry) wait_for_message() start_script(terry.stop_shrug, terry) manny:head_forward_gesture() manny:say_line("/ddma108/") wait_for_message() start_script(terry.head_nod, terry) terry:say_line("/ddte109/") end be1[140] = { text = "/ddma110/", first_bee_node = TRUE, gesture = manny.tilt_head_gesture } be1[140].off = TRUE be1[140].response = function(arg1) -- line 178 arg1.off = TRUE arg1.said = TRUE start_sfx("beeflap1.wav") terry:play_chore_looping(bee_barrel_move_wing, "bee_barrel.cos") start_script(terry.stop_head_left, terry) terry:say_line("/ddte111/") wait_for_message() start_sfx("beeflap2.wav") terry:say_line("/ddte112/") terry:head_left() start_sfx("beeflap3.wav") terry:wait_for_message() terry:stop_chore(bee_barrel_move_wing, "bee_barrel.cos") terry:say_line("/ddte112b/") end be1[150] = { text = "/ddma113/", first_bee_node = TRUE, gesture = manny.head_forward_gesture } be1[150].off = TRUE be1[150].response = function(arg1) -- line 197 arg1.off = TRUE arg1.said = TRUE start_script(terry.shrug, terry) terry:say_line("/ddte114/") wait_for_message() terry:say_line("/ddte115/") wait_for_message() start_script(terry.stop_shrug, terry) terry:say_line("/ddte116/") end be1[160] = { text = "/ddma117/", first_bee_node = TRUE, gesture = manny.twist_head_gesture } be1[160].off = TRUE be1[160].response = function(arg1) -- line 211 arg1.off = TRUE terry:say_line("/ddte118/") terry:head_wag() wait_for_message() start_script(terry.stop_head_left, terry) terry:say_line("/ddte119/") wait_for_message() terry:say_line("/ddte120/") terry:head_left() terry:gesture1() terry:gesture2() terry:stop_gesture() wait_for_message() start_script(terry.head_wag, terry) terry:say_line("/ddte121/") end be1[170] = { text = "/ddma122/", first_bee_node = TRUE, gesture = manny.hand_gesture } be1[170].off = TRUE be1[170].response = function(arg1) -- line 231 arg1.off = TRUE arg1.said = TRUE start_script(terry.lefthand_out, terry) terry:say_line("/ddte123/") wait_for_message() start_script(terry.stop_lefthand_out, terry) manny:say_line("/ddma124/") wait_for_message() start_script(terry.head_wag, terry) terry:say_line("/ddte125/") end be1[180] = { text = "/ddma126/", first_bee_node = TRUE, gesture = manny.tilt_head_gesture } be1[180].off = TRUE be1[180].response = function(arg1) -- line 246 arg1.off = TRUE start_script(terry.shrug, terry) terry:say_line("/ddte127/") wait_for_message() start_script(terry.stop_shrug, terry) terry:say_line("/ddte128/") wait_for_message() terry:say_line("/ddte129/") wait_for_message() terry:say_line("/ddte130/") terry:gesture1() terry:gesture2() terry:stop_gesture() end be1[190] = { text = "/ddma131/", first_bee_node = TRUE, gesture = manny.point_gesture } be1[190].off = TRUE be1[190].response = function(arg1) -- line 264 arg1.off = TRUE arg1.said = TRUE dd.talked_charlie = TRUE cn.charlie_obj.talked_out = FALSE start_script(terry.head_wag, terry) terry:say_line("/ddte132/") wait_for_message() terry:say_line("/ddte133/") terry:shrug() start_script(terry.stop_shrug, terry) end be1[200] = { text = "/ddma134/", first_bee_node = TRUE } be1[200].off = TRUE be1[200].response = function(arg1) -- line 279 arg1.off = TRUE arg1.said = TRUE start_script(terry.head_wag, terry) terry:say_line("/ddte135/") wait_for_message() manny:point_gesture() manny:say_line("/ddma136/") wait_for_message() start_script(terry.head_nod, terry) terry:say_line("/ddte137/") end be1.delayed_exit_line = { text = "/ddma138/", gesture = manny.twist_head_gesture } be1.delayed_exit_line.response = function(arg1) -- line 293 be1.node = "exit_dialog" end be1.aborts.first_bee_node = function(arg1) -- line 297 be1:clear() be1.node = "exit_dialog" manny:head_forward_gesture() manny:say_line("/ddma139/") wait_for_message() end be1.outro = function(arg1) -- line 305 if not be1.outroed then be1.outroed = TRUE start_script(terry.head_wag, terry) terry:say_line("/ddte140/") wait_for_message() terry:say_line("/ddte141/") terry:gesture1() terry:gesture2() wait_for_message() terry:say_line("/ddte142/") terry:stop_gesture() wait_for_message() terry:say_line("/ddte143/") start_script(terry.stop_head_left, terry) wait_for_message() start_script(terry.lefthand_out, terry) terry:say_line("/ddte144/") wait_for_message() start_script(terry.head_left, terry) start_script(terry.stop_lefthand_out, terry) terry:say_line("/ddte145/") wait_for_message() terry:say_line("/ddte146/") terry:head_wag() else terry:say_line("/ddte147/") terry:head_wag() end terry:stop_head_left() wait_for_message() terry:replace_barrel_stamp() terry:barrel_idles() end
gpl-2.0
gabrielPeart/keys
VSCOKeys.lrdevplugin/Terminate.lua
11
1089
--[[---------------------------------------------------------------------------- VSCO Keys for Adobe Lightroom Copyright (C) 2015 Visual Supply Company Licensed under GNU GPLv2 (or any later version). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ------------------------------------------------------------------------------]] require "Shutdown" return {doneFunction = function() end, progressFunction = function (complete, string) return false end}
gpl-2.0
weiDDD/WSSParticleSystem
cocos2d/cocos/scripting/lua-bindings/auto/api/Tween.lua
1
2575
-------------------------------- -- @module Tween -- @extend ProcessBase -- @parent_module ccs -------------------------------- -- -- @function [parent=#Tween] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- -- -- @function [parent=#Tween] gotoAndPause -- @param self -- @param #int frameIndex -- @return Tween#Tween self (return value: ccs.Tween) -------------------------------- -- Start the Process<br> -- param movementBoneData the MovementBoneData include all FrameData<br> -- param durationTo the number of frames changing to this animation needs.<br> -- param durationTween the number of frames this animation actual last.<br> -- param loop whether the animation is loop<br> -- loop < 0 : use the value from MovementData get from Action Editor<br> -- loop = 0 : this animation is not loop<br> -- loop > 0 : this animation is loop<br> -- param tweenEasing tween easing is used for calculate easing effect<br> -- TWEEN_EASING_MAX : use the value from MovementData get from Action Editor<br> -- -1 : fade out<br> -- 0 : line<br> -- 1 : fade in<br> -- 2 : fade in and out -- @function [parent=#Tween] play -- @param self -- @param #ccs.MovementBoneData movementBoneData -- @param #int durationTo -- @param #int durationTween -- @param #int loop -- @param #int tweenEasing -- @return Tween#Tween self (return value: ccs.Tween) -------------------------------- -- -- @function [parent=#Tween] gotoAndPlay -- @param self -- @param #int frameIndex -- @return Tween#Tween self (return value: ccs.Tween) -------------------------------- -- Init with a Bone<br> -- param bone the Bone Tween will bind to -- @function [parent=#Tween] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- -- -- @function [parent=#Tween] setAnimation -- @param self -- @param #ccs.ArmatureAnimation animation -- @return Tween#Tween self (return value: ccs.Tween) -------------------------------- -- Create with a Bone<br> -- param bone the Bone Tween will bind to -- @function [parent=#Tween] create -- @param self -- @param #ccs.Bone bone -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- -- -- @function [parent=#Tween] Tween -- @param self -- @return Tween#Tween self (return value: ccs.Tween) return nil
apache-2.0
weiDDD/WSSParticleSystem
cocos2d/cocos/scripting/lua-bindings/auto/api/Helper.lua
1
3332
-------------------------------- -- @module Helper -- @parent_module ccui -------------------------------- -- brief Get a UTF8 substring from a std::string with a given start position and length<br> -- Sample: std::string str = "涓浗涓浗涓浗"; substr = getSubStringOfUTF8String(str,0,2) will = "涓浗"<br> -- param start The start position of the substring.<br> -- param length The length of the substring in UTF8 count<br> -- return a UTF8 substring -- @function [parent=#Helper] getSubStringOfUTF8String -- @param self -- @param #string str -- @param #unsigned int start -- @param #unsigned int length -- @return string#string ret (return value: string) -------------------------------- -- Change the active property of Layout's @see `LayoutComponent`<br> -- param active A boolean value. -- @function [parent=#Helper] changeLayoutSystemActiveState -- @param self -- @param #bool active -- @return Helper#Helper self (return value: ccui.Helper) -------------------------------- -- Find a widget with a specific action tag from root widget<br> -- This search will be recursive throught all child widgets.<br> -- param root The be searched root widget.<br> -- param tag The widget action's tag.<br> -- return Widget instance pointer. -- @function [parent=#Helper] seekActionWidgetByActionTag -- @param self -- @param #ccui.Widget root -- @param #int tag -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- -- Find a widget with a specific name from root widget.<br> -- This search will be recursive throught all child widgets.<br> -- param root The be searched root widget.<br> -- param name The widget name.<br> -- return Widget isntance pointer. -- @function [parent=#Helper] seekWidgetByName -- @param self -- @param #ccui.Widget root -- @param #string name -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- -- Find a widget with a specific tag from root widget.<br> -- This search will be recursive throught all child widgets.<br> -- param root The be seached root widget.<br> -- param tag The widget tag.<br> -- return Widget instance pointer. -- @function [parent=#Helper] seekWidgetByTag -- @param self -- @param #ccui.Widget root -- @param #int tag -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- -- brief restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0,<br> -- the height goes the same way as width.<br> -- param capInsets A user defined capInsets.<br> -- param textureSize The size of a scale9enabled texture<br> -- return a restricted capInset. -- @function [parent=#Helper] restrictCapInsetRect -- @param self -- @param #rect_table capInsets -- @param #size_table textureSize -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- -- Refresh object and it's children layout state<br> -- param rootNode A Node* or Node* descendant instance pointer. -- @function [parent=#Helper] doLayout -- @param self -- @param #cc.Node rootNode -- @return Helper#Helper self (return value: ccui.Helper) return nil
apache-2.0
TheAnswer/FirstTest
bin/scripts/crafting/objects/draftschematics/tailor/casualWearIiiWeatherWear/decorativeDress.lua
1
4641
--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. decorativeDress = Object:new { objectName = "Decorative Dress", stfName = "dress_s05", stfFile = "wearables_name", objectCRC = 2230028828, groupName = "craftClothingCasualGroupC", -- Group schematic is awarded in (See skills table) craftingToolTab = 8, -- (See DraftSchemticImplementation.h) complexity = 20, size = 3, xpType = "crafting_clothing_general", xp = 75, assemblySkill = "clothing_assembly", experimentingSkill = "clothing_experimentation", ingredientTemplateNames = "craft_clothing_ingredients_n, craft_clothing_ingredients_n, craft_clothing_ingredients_n, craft_clothing_ingredients_n, craft_clothing_ingredients_n", ingredientTitleNames = "trim_and_binding, extra_trim, hardware, skirt, bodice", ingredientSlotType = "0, 2, 2, 2, 1", resourceTypes = "fiberplast, object/tangible/component/clothing/shared_synthetic_cloth.iff, object/tangible/component/clothing/shared_metal_fasteners.iff, object/tangible/component/clothing/shared_synthetic_cloth.iff, object/tangible/component/clothing/shared_synthetic_cloth.iff", resourceQuantities = "30, 1, 1, 1, 2", combineTypes = "0, 1, 1, 1, 1", contribution = "100, 100, 100, 100, 100", numberExperimentalProperties = "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", experimentalProperties = "XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX", experimentalWeights = "1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1", experimentalGroupTitles = "null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null", experimentalSubGroupTitles = "null, null, sockets, hitpoints, mod_idx_one, mod_val_one, mod_idx_two, mod_val_two, mod_idx_three, mod_val_three, mod_idx_four, mod_val_four, mod_idx_five, mod_val_five, mod_idx_six, mod_val_six", experimentalMin = "0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", experimentalMax = "0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", experimentalPrecision = "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", tanoAttributes = "objecttype=16777223:objectcrc=1838065175:stfFile=wearables_name:stfName=dress_s05:stfDetail=:itemmask=62974::", blueFrogAttributes = "", blueFrogEnabled = False, customizationOptions = "/private/index_color_1, /private/index_color_2", customizationDefaults = "125, 131", customizationSkill = "clothing_customization" } DraftSchematics:addDraftSchematic(decorativeDress, 2230028828)--- Add to global DraftSchematics table
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/spawns/dantooine/dungeons/forceCrystalHuntersCave.lua
1
4747
--Copyright (C) 2008 <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. -- Force Crystal Hunter's Cave -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 45.0904, -47.6756, -63.313, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 46.1038, -48.0046, -63.0732, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 22.7714, -40.6993, -48.1753, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 23.6106, -40.5315, -46.4409, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 21.6995, -40.5779, -48.2526, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 23.3531, -29.6389, -14.2453, 8535483) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 22.0372, -29.7611, -14.7857, 8535483) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 20.9014, -29.2072, -13.8818, 8535483) spawnCreatureInCell(darkForceCrystalHunter, 1, 50.056, -47.4545, -6.97608, 8535484) spawnCreatureInCell(darkForceCrystalHunter, 1, 51.387, -47.8643, -5.9065, 8535484) spawnCreatureInCell(darkForceCrystalHunter, 1, 51.5238, -48.6576, -64.4212, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 47.8784, -47.5494, -17.2823, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 47.1368, -47.2097, -16.3451, 8535484) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 92.2009, -65.2158, -31.2866, 8535485) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 90.7143, -65.7253, -32.7367, 8535485) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 88.9163, -66.1718, -34.8198, 8535485) -- spawnCreatureInCell(untrainedWeilderOfTheDarkSide, 1, 91.0278, -65.5753, -32.2358, 8535485) spawnCreatureInCell(darkForceCrystalHunter, 1, 53.0072, -68.0963, -40.6676, 8535484) spawnCreatureInCell(darkForceCrystalHunter, 1, 54.4778, -68.2985, -40.363, 8535484) spawnCreatureInCell(darkForceCrystalHunter, 1, 68.0795, -75.4798, -56.001, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 70.3888, -75.3941, -56.9811, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 87.7348, -76.5133, -66.0111, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 88.5358, -76.431, -66.9858, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 66.0897, -75.4689, -64.6093, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 65.1141, -75.4725, -64.8087, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 75.2572, -76.9339, -88.0694, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 75.9547, -76.8223, -87.7808, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 91.1268, -76.3305, -82.3623, 8535486) spawnCreatureInCell(darkForceCrystalHunter, 1, 89.6152, -76.5638, -83.1857, 8535486)
lgpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/endor/npcs/gundula/gundulaLoremaster.lua
1
4588
--Copyright (C) 2008 <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. gundulaLoremaster = Creature:new { objectName = "gundulaLoremaster", -- Lua Object Name creatureType = "NPC", faction = "gundula_tribe", factionPoints = 20, gender = "", speciesName = "gundula_loremaster", stfName = "mob/creature_names", objectCRC = 556229826, socialGroup = "gundula_tribe", level = 20, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG, healthMax = 5500, healthMin = 4500, strength = 0, constitution = 0, actionMax = 5500, actionMin = 4500, quickness = 0, stamina = 0, mindMax = 5500, mindMin = 4500, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 0, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 0, energy = 0, electricity = -1, stun = -1, blast = 0, heat = 35, cold = 35, acid = -1, lightsaber = 0, accuracy = 0, healer = 0, pack = 1, herd = 0, stalker = 0, killer = 0, ferocity = 0, aggressive = 0, invincible = 0, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/creature/shared_creature_default_weapon.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "Creature Defualt", -- Name ex. 'a Vibrolance' weaponTemp = "creature_default_weapon", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "UnarmedMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 0, weaponMinDamage = 180, weaponMaxDamage = 190, weaponAttackSpeed = 2, weaponDamageType = "KINETIC", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateWeaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateWeaponAttackSpeed = 0, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0", -- Group it belongs to for loot tame = 0, datapadItemCRC = 0, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "", boneMax = 0, hideType = "", hideMax = 0, meatType = "", meatMax = 0, skills = { "gundulaAttack1" }, respawnTimer = 180, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(gundulaLoremaster, 556229826) -- Add to Global Table
lgpl-3.0
JarnoVgr/ZombieSurvival
gamemodes/zombiesurvival/entities/entities/status_packup/init.lua
1
1772
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:PlayerSet(pPlayer, bExists) pPlayer:EmitSound("items/ammocrate_open.wav") pPlayer.PackUp = pPlayer if self:GetStartTime() == 0 then self:SetStartTime(CurTime()) end end function ENT:Think() if self.Removing then return end local packer = self:GetOwner() local owner = packer local pack = self:GetPackUpEntity() if pack:IsValid() and owner:TraceLine(64, MASK_SOLID, owner:GetMeleeFilter()).Entity == pack then if not self:GetNotOwner() and pack.GetObjectOwner then local packowner = pack:GetObjectOwner() if packowner:IsValid() and packowner:Team() == TEAM_HUMAN and packowner ~= packer and not gamemode.Call("PlayerIsAdmin", packer) then self:SetNotOwner(true) end end if CurTime() >= self:GetEndTime() then if self:GetNotOwner() then local count = 0 for _, ent in pairs(ents.FindByClass("status_packup")) do if ent:GetPackUpEntity() == pack then count = count + 1 end end if count < self.PackUpOverride then self:NextThink(CurTime()) return true end if pack.GetObjectOwner then local objowner = pack:GetObjectOwner() if objowner:IsValid() and objowner:Team() == TEAM_HUMAN and objowner:IsValid() then owner = objowner end end end if pack.OnPackedUp and not pack:OnPackedUp(owner) then owner:EmitSound("items/ammocrate_close.wav") self.Removing = true gamemode.Call("ObjectPackedUp", pack, packer, owner) self:Remove() end end else owner:EmitSound("items/medshotno1.wav") self:Remove() self.Removing = true end self:NextThink(CurTime()) return true end
gpl-2.0
fkaa/iceball
pkg/base/ent/expl_grenade.lua
4
3651
--[[ This file is part of Ice Lua Components. Ice Lua Components 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 3 of the License, or (at your option) any later version. Ice Lua Components 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 Ice Lua Components. If not, see <http://www.gnu.org/licenses/>. ]] return function (plr) local this = {} this.this = this this.plr = plr this.mdl = mdl_nade_inst this.gui_x = 0.15 this.gui_y = 0.25 this.gui_scale = 0.1 this.gui_pick_scale = 2.0 this.t_nadeboom = nil this.t_newnade = nil this.ammo = 2 function plr.expl_ammo_checkthrow() if this.ammo <= 0 then return false end if plr.mode == PLM_NORMAL then this.ammo = this.ammo - 1 end return true end function this.restock() this.ammo = 4 end function this.throw_nade(sec_current) local sya = math.sin(plr.angy) local cya = math.cos(plr.angy) local sxa = math.sin(plr.angx) local cxa = math.cos(plr.angx) local fwx,fwy,fwz fwx,fwy,fwz = sya*cxa, sxa, cya*cxa local n = new_nade({ x = plr.x, y = plr.y, z = plr.z, vx = fwx*MODE_NADE_SPEED*MODE_NADE_STEP+plr.vx*MODE_NADE_STEP, vy = fwy*MODE_NADE_SPEED*MODE_NADE_STEP+plr.vy*MODE_NADE_STEP, vz = fwz*MODE_NADE_SPEED*MODE_NADE_STEP+plr.vz*MODE_NADE_STEP, fuse = math.max(0, this.t_nadeboom - sec_current), pid = this.plr.pid }) nade_add(n) net_send(nil, common.net_pack("BhhhhhhH", PKT_NADE_THROW, math.floor(n.x*32+0.5), math.floor(n.y*32+0.5), math.floor(n.z*32+0.5), math.floor(n.vx*256+0.5), math.floor(n.vy*256+0.5), math.floor(n.vz*256+0.5), math.floor(n.fuse*100+0.5))) end function this.tick(sec_current, sec_delta) if this.t_newnade and sec_current >= this.t_newnade then this.t_newnade = nil end if this.t_nadeboom then if (not this.ev_lmb) or sec_current >= this.t_nadeboom then this.throw_nade(sec_current) this.t_newnade = sec_current + MODE_DELAY_NADE_THROW this.t_nadeboom = nil this.ev_lmb = false end end if client and plr.alive and (not plr.t_switch) then if this.ev_lmb and plr.mode ~= PLM_SPECTATE then if plr.tools[plr.tool+1] == this then if (not this.t_newnade) and this.ammo > 0 then if (not this.t_nadeboom) then if plr.mode == PLM_NORMAL then this.ammo = this.ammo - 1 end this.t_nadeboom = sec_current + MODE_NADE_FUSE client.wav_play_global(wav_pin, plr.x, plr.y, plr.z) net_send(nil, common.net_pack("BhhhhhhH", PKT_NADE_PIN)) end end end end end end function this.focus() -- end function this.unfocus() -- end function this.need_restock() return this.ammo < 4 end function this.key(key, state, modif) -- end function this.click(button, state) if button == 1 then -- LMB this.ev_lmb = state end end function this.free() -- end function this.textgen() local col if this.ammo == 0 then col = 0xFFFF3232 else col = 0xFFC0C0C0 end return col, ""..this.ammo end function this.get_model() return this.mdl end function this.render(px, py, pz, ya, xa, ya2) if this.ammo > 0 then this.get_model().render_global( px, py, pz, ya, xa, ya2, 1) end end return this end
gpl-3.0
TheAnswer/FirstTest
bin/scripts/items/objects/clothing/bodysuits/bodysuit6.lua
1
2290
--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. bodysuit6 = Clothing:new { objectName = "Bodysuit 6", templateName = "bodysuit_s06", objectCRC = "707325039", objectType = BODYSUIT, equipped = "0", itemMask = HUMANOID_FEMALES }
lgpl-3.0
Entware-ng/entware-routing
luci-app-bmx6/bmx6/usr/lib/lua/luci/model/cbi/bmx6/tunnels.lua
18
2336
--[[ Copyright (C) 2011 Pau Escrich <pau@dabax.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. The full GNU General Public License is included in this distribution in the file called "COPYING". --]] local sys = require("luci.sys") local bmx6json = require("luci.model.bmx6json") m = Map("bmx6", "bmx6") -- tunOut local tunnelsOut = m:section(TypedSection,"tunOut",translate("Networks to fetch"),translate("Gateways announcements to fetch")) tunnelsOut.addremove = true tunnelsOut.anonymous = true tunnelsOut:option(Value,"tunOut","Name") tunnelsOut:option(Value,"network", translate("Network to fetch")) local tunoptions = bmx6json.getOptions("tunOut") local _,o for _,o in ipairs(tunoptions) do if o.name ~= nil and o.name ~= "network" then help = bmx6json.getHtmlHelp(o) value = tunnelsOut:option(Value,o.name,o.name,help) value.optional = true end end -- tunOut local tunnelsIn = m:section(TypedSection,"tunIn",translate("Networks to offer"),translate("Gateways to announce in the network")) tunnelsIn.addremove = true tunnelsIn.anonymous = true tunnelsIn:option(Value,"tunIn","Name") tunnelsIn:option(Value,"network", translate("Network to offer")) local tunInoptions = bmx6json.getOptions("tunIn") local _,o for _,o in ipairs(tunInoptions) do if o.name ~= nil and o.name ~= "network" then help = bmx6json.getHtmlHelp(o) value = tunnelsIn:option(Value,o.name,o.name,help) value.optional = true end end function m.on_commit(self,map) --Not working. If test returns error the changes are still commited local msg = bmx6json.testandreload() if msg ~= nil then m.message = msg end end return m
gpl-2.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/yavin4/creatures/ravagingGackleBat.lua
1
4738
--Copyright (C) 2008 <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. ravagingGackleBat = Creature:new { objectName = "ravagingGackleBat", -- Lua Object Name creatureType = "ANIMAL", gender = "", speciesName = "ravaging_gackle_bat", stfName = "mob/creature_names", objectCRC = 539898393, socialGroup = "Gacklebat", level = 18, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG + AGGRESSIVE_FLAG, healthMax = 4300, healthMin = 3500, strength = 0, constitution = 0, actionMax = 4300, actionMin = 3500, quickness = 0, stamina = 0, mindMax = 4300, mindMin = 3500, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 0, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 0, energy = 15, electricity = -1, stun = -1, blast = -1, heat = 20, cold = -1, acid = -1, lightsaber = 0, accuracy = 0, healer = 0, pack = 1, herd = 0, stalker = 0, killer = 0, ferocity = 0, aggressive = 1, invincible = 0, meleeDefense = 1, rangedDefense = 1, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/creature/shared_creature_default_weapon.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "Creature Defualt", -- Name ex. 'a Vibrolance' weaponTemp = "creature_default_weapon", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "UnarmedMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 0, weaponMinDamage = 180, weaponMaxDamage = 190, weaponAttackSpeed = 2, weaponDamageType = "KINETIC", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateweaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateWeaponAttackSpeed = 0, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0", -- Group it belongs to for loot tame = 0.25, -- Likely hood to be tamed datapadItemCRC = 184038036, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "bone_mammal_yavin4", boneMax = 4, hideType = "hide_bristley_yavin4", hideMax = 3, meatType = "meat_carnivore_yavin4", meatMax = 5, --skills = { " Stun attack", "", "" } skills = { "gackleBatAttack3" }, respawnTimer = 60, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(ravagingGackleBat, 539898393) -- Add to Global Table
lgpl-3.0
kyle-lu/fceux.js
output/luaScripts/Excitingbike-speedometeronly.lua
9
2348
--Exciting Bike - Speedometer --Written by XKeeper --Shows the speedometer (obviously) require("x_functions"); if not x_requires then -- Sanity check. If they require a newer version, let them know. timer = 1; while (true) do timer = timer + 1; for i = 0, 32 do gui.drawbox( 6, 28 + i, 250, 92 - i, "#000000"); end; gui.text( 10, 32, string.format("This Lua script requires the x_functions library.")); gui.text( 53, 42, string.format("It appears you do not have it.")); gui.text( 39, 58, "Please get the x_functions library at"); gui.text( 14, 69, "http://xkeeper.shacknet.nu/"); gui.text(114, 78, "emu/nes/lua/x_functions.lua"); warningboxcolor = string.format("%02X", math.floor(math.abs(30 - math.fmod(timer, 60)) / 30 * 0xFF)); gui.drawbox(7, 29, 249, 91, "#ff" .. warningboxcolor .. warningboxcolor); FCEU.frameadvance(); end; else x_requires(4); end; function gameloop() end; gui.register(gameloop); barcolors = {}; barcolors[0] = "#000000"; barcolors[1] = "#880000"; barcolors[2] = "#ff0000"; barcolors[3] = "#eeee00"; barcolors[4] = "#00ff00"; barcolors[5] = "#00ffff"; barcolors[6] = "#0000ff"; barcolors[7] = "#ff00ff"; barcolors[8] = "#ffffff"; barcolors[9] = "#123456"; lastvalue = {}; justblinked = {}; lastzero = {}; timer = 0; speed = 0; while (true) do timer = timer + 1; lastvalue['speed'] = speed; speed = memory.readbyte(0x0094) * 0x100 + memory.readbyte(0x0090); positionx = memory.readbyte(0x0050) * 0x100 + memory.readbyte(0x0394); timerspeed = 3 - memory.readbyte(0x004c); timerslant = math.max(0, memory.readbyte(0x0026) - 1); if memory.readbyte(0x0303) ~= 0x8E then text(255, 181, "Didn't advance this frame"); end; speedadj1 = math.fmod(speed, 0x100); speedadj2 = math.fmod(math.floor(speed / 0x100), #barcolors + 1); speedadj3 = math.fmod(speedadj2 + 1, #barcolors + 1); lifebar( 61, 11, 100, 4, speedadj1, 0x100, barcolors[speedadj3], barcolors[speedadj2], "#000000", "#ffffff"); text( 0, 4 + 6, string.format("Speed: %4X", speed)); text( 1, 4 + 14, string.format("S.Chg: %4d", speed - lastvalue['speed'])); text( 20, 222, " 2009 Xkeeper - http://jul.rustedlogic.net/ "); line( 21, 231, 232, 231, "#000000"); FCEU.frameadvance(); end;
gpl-2.0
Iliaaaaa/test
CWR.lua
2
8578
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' URL = require('socket.url') JSON = require('dkjson') redis = (loadfile "./redis.lua")() redis2 = (loadfile "./redis2.lua")() HTTPS = require('ssl.https') redis:auth('CWR_REDIS') ----config---- local bot_api_key = "242799074:AAGvKKomuhL0BdhW2t_G7gbZ01tAL74-VqM" local BASE_URL = "https://api.pwrtelegram.xyz/bot"..bot_api_key ------- ----utilites---- function is_admin(msg)-- Check if user is admin or not local var = false local admins = {122774063} for k,v in pairs(admins) do if msg.from.id == v then var = true end end return var end function sendRequest(url) local dat, res = HTTPS.request(url) local tab = JSON.decode(dat) if res ~= 200 then return false, res end if not tab.ok then return false, tab.description end return tab end function getMe()--https://core.telegram.org/bots/api#getfile local url = BASE_URL .. '/getMe' return sendRequest(url) end function getUpdates(offset)--https://core.telegram.org/bots/api#getupdates local url = BASE_URL .. '/getUpdates?timeout=20' if offset then url = url .. '&offset=' .. offset end return sendRequest(url) end function sendMessage(chat_id, text, disable_web_page_preview, reply_to_message_id, use_markdown)--https://core.telegram.org/bots/api#sendmessage local url = BASE_URL .. '/sendMessage?chat_id=' .. chat_id .. '&text=' .. URL.escape(text) if disable_web_page_preview == true then url = url .. '&disable_web_page_preview=true' end if reply_to_message_id then url = url .. '&reply_to_message_id=' .. reply_to_message_id end if use_markdown then url = url .. '&parse_mode=Markdown' end return sendRequest(url) end function sendDocument(chat_id, document, reply_to_message_id)--https://github.com/topkecleon/otouto/blob/master/bindings.lua local url = BASE_URL .. '/sendDocument' local curl_command = 'cd \''..BASE_FOLDER..currect_folder..'\' && curl -s "' .. url .. '" -F "chat_id=' .. chat_id .. '" -F "document=@' .. document .. '"' if reply_to_message_id then curl_command = curl_command .. ' -F "reply_to_message_id=' .. reply_to_message_id .. '"' end io.popen(curl_command):read("*all") return end function download_to_file(url, file_name, file_path)--https://github.com/yagop/telegram-bot/blob/master/bot/utils.lua print("url to download: "..url) local respbody = {} local options = { url = url, sink = ltn12.sink.table(respbody), redirect = true } -- nil, code, headers, status local response = nil options.redirect = false response = {HTTPS.request(options)} local code = response[2] local headers = response[3] local status = response[4] if code ~= 200 then return nil end local file_path = BASE_FOLDER..currect_folder..file_name print("Saved to: "..file_path) file = io.open(file_path, "w+") file:write(table.concat(respbody)) file:close() return file_path end -------- function bot_run() bot = nil while not bot do -- Get bot info bot = getMe() end bot = bot.result local bot_info = "\27[36mCWR Is Running!\27[39m\nCWR's Username : @"..bot.username.."\nCWR's Name : "..bot.first_name.."\nCWR's ID : "..bot.id.." \n\27[36mBot Developed by iTeam\27[39m\n---------------" print(bot_info) last_update = last_update or 0 is_running = true end function msg_processor(msg) local print_text = "\27[36mChat : "..msg.chat.id..", User : "..msg.from.id.."\27[39m\nText : "..(msg.text or "").."\n---------------" print(print_text) if msg.date < os.time() - 5 then -- Ignore old msgs print("\27[36m(Old Message)\27[39m\n---------------") return end if msg.text == '/start' or msg.text == '/start@CW_Robot' then local text = [[ `سلام من چَتِر بوت 😇 هستم.` _من هوش مصنوعی دارم 😅 و هرچی‌ تو بگی‌ رو میفهمم و جواب میدم_ *من حدود ۲۰ میلیون کلمه فارسی 🙈 بلدم و میتونم باهاشون باهات حرف بزنم* اگه میخوای میتونی‌ باهام حرف 😋 بزنی‌! من تو خصوصی به همه پیامات جواب میدم ولی تو گروها باید روی پیام هایی که من ارسال میکنم ریپلای کنی تا جوابتو بدم :) قدرت گرفته از [iTeam](https://telegram.me/iTeam_ir) ]] redis2:sadd("CW:users",msg.chat.id) sendMessage(msg.chat.id, text, false, msg.message_id, true) elseif msg.text and msg.text:match("(.*)!!(.*)") then local matches = {msg.text:match("(.*)!!(.*)")} if matches[2]:match("(telegram.%s)") or matches[2]:match("@") or matches[2]:match("tlgrm.me") or matches[2]:match("https?://([%w-_%.%?%.:/%+=&]+)") and not is_admin(msg) then local text = "اضافه کردن لینک و آیدی به عنوان جواب کار دستی نیست دوسته گل\nاین ربات قرار نیست برا شما تبلیغ کنه 😉" sendMessage(msg.chat.id, text, false, msg.message_id, true) else redis:sadd(matches[1],matches[2]) local text = "خیلی ممنون که بهم کلمه جدید یاد دادی 😇😍 \n\n حالا بلد شدم اگه بگی 😁 \n"..matches[1].."\n 😋 من جواب بدم \n"..matches[2] sendMessage(msg.chat.id, text, false, msg.message_id, true) end elseif msg.text == "/teachme" or msg.text == "/teachme@CW_Robot" then local text = [[اگه بخوای کلمه یا جمله جدید یادم بدی 😇 باید دو قسمت مسیج یعنی اون چیزی که تو میخوای بفرستی و اون چیزی که میخوای من جواب بدم رو پشت سر هم تو یک مسیج واسم بفرستی و با دو ! پشت سر هم از هم جداشون کنی مثل این 😊 سلام،خوبی؟!!مرسی،ممنونم یا 😋 چه خبر؟!!هیچی، تو چه خبر؟ یا 😁 Miay berim biroon?!!Are, key berim? ممنون از اینکه بهم چیزای جدید یاد میدی]] sendMessage(msg.chat.id, text, false, msg.message_id, true) elseif msg.text == "/stats" and is_admin(msg) then local words = 0 local answers = 0 local allwords = redis:keys("*") for i=1,#allwords do local hash = allwords[i] words = words + 1 answers = answers + redis:scard(hash) end local text = "*Users* : `"..redis2:scard("CW:users").."`\n*Total Saved Words* : `"..words.."`\n*Total Saved Answers* : `"..answers.."`" sendMessage(msg.chat.id, text, false, msg.message_id, true) elseif msg.text == "/cleanads" and is_admin(msg) then local allwords = redis:keys("*") for i=1,#allwords do local hash = allwords[i] local answers = redis:smembers(hash) for i=1,#answers do if answers[i]:match("telegram.me") or answers[i]:match("@") then redis:srem(hash,answers[i]) end end end local text = "*All Links And Usernames Cleaned From Bot Answers*" sendMessage(msg.chat.id, text, false, msg.message_id, true) elseif msg.text:match("^/del") and is_admin(msg) then if msg.text:match("^/del (.*)^(.*)$") then local matches = {msg.text:match("^/del (.*)^(.*)$")} redis:srem(matches[1],matches[2]) local text = matches[2].." از جواب های "..matches[1].." حذف شد " sendMessage(msg.chat.id, text, false, msg.message_id, true) else local matches = {msg.text:match("^/del (.*)$")} redis:del(matches[1]) local text = " تمامی جواب های مربوط به "..matches[1].." حذف شد " sendMessage(msg.chat.id, text, false, msg.message_id, true) end else if msg.chat.type == "private" or msg.chat.type ~= "private" and msg.reply_to_message and msg.reply_to_message.from.id == 242799074 then local answers = redis:smembers(msg.text) if #answers == 0 then local text = [[من اینو بلد نیستم 😋. اما اگه میخوای اینو /teachme کلیک کن تا بتونی یادم بدی]] sendMessage(msg.chat.id, text, false, msg.message_id, true) else local text = answers[math.random(#answers)] sendMessage(msg.chat.id, text, false, msg.message_id, true) end end end end bot_run() -- Run main function while is_running do -- Start a loop witch receive messages. local response = getUpdates(last_update+1) -- Get the latest updates using getUpdates method if response then for i,v in ipairs(response.result) do last_update = v.update_id if v.message then msg_processor(v.message) end end else print("Conection failed") end end print("Bot halted")
agpl-3.0
TheAnswer/FirstTest
bin/scripts/creatures/objects/yavin4/creatures/mawgaxFemale.lua
1
4692
--Copyright (C) 2008 <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. mawgaxFemale = Creature:new { objectName = "mawgaxFemale", -- Lua Object Name creatureType = "ANIMAL", gender = "female", speciesName = "mawgax_female", stfName = "mob/creature_names", objectCRC = 746705038, socialGroup = "Mawgax", level = 23, combatFlags = ATTACKABLE_FLAG + ENEMY_FLAG, healthMax = 7200, healthMin = 5900, strength = 0, constitution = 0, actionMax = 7200, actionMin = 5900, quickness = 0, stamina = 0, mindMax = 7200, mindMin = 5900, focus = 0, willpower = 0, height = 1, -- Size of creature armor = 0, -- 0 = None; 1 = Light; 2 = Medium; 3 = Heavy kinetic = 15, energy = 15, electricity = 0, stun = -1, blast = 0, heat = -1, cold = 0, acid = -1, lightsaber = 0, accuracy = 0, healer = 0, pack = 1, herd = 1, stalker = 0, killer = 0, ferocity = 0, aggressive = 0, invincible = 0, meleeDefense = 1, rangedDefense = 1, attackCreatureOnSight = "", -- Enter socialGroups weapon = "object/weapon/creature/shared_creature_default_weapon.iff", -- File path to weapon -> object\xxx\xxx\xx weaponName = "Creature Defualt", -- Name ex. 'a Vibrolance' weaponTemp = "creature_default_weapon", -- Weapon Template ex. 'lance_vibrolance' weaponClass = "UnarmedMeleeWeapon", -- Weapon Class ex. 'PolearmMeleeWeapon' weaponEquipped = 0, weaponMinDamage = 240, weaponMaxDamage = 250, weaponAttackSpeed = 2, weaponDamageType = "KINETIC", -- ELECTRICITY, KINETIC, etc weaponArmorPiercing = "NONE", -- LIGHT, NONE, MEDIUM, HEAVY alternateWeapon = "", -- File path to weapon -> object\xxx\xxx\xx alternateWeaponName = "", -- Name ex. 'a Vibrolance' alternateWeaponTemp = "", -- Weapon Template ex. 'lance_vibrolance' alternateWeaponClass = "", -- Weapon Class ex. 'PolearmMeleeWeapon' alternateweaponEquipped = 0, alternateWeaponMinDamage = 0, alternateWeaponMaxDamage = 0, alternateWeaponAttackSpeed = 0, alternateWeaponDamageType = "", -- ELECTRICITY, KINETIC, etc alternateWeaponArmorPiercing = "", -- LIGHT, NONE, MEDIUM, HEAVY internalNPCDamageModifier = 0.3, -- Damage Modifier to other NPC's lootGroup = "0", -- Group it belongs to for loot tame = 0, -- Likely hood to be tamed datapadItemCRC = 0, mountCRC = 0, mountSpeed = 0, mountAcceleration = 0, milk = 0, boneType = "bone_avian_yavin4", boneMax = 52, hideType = "hide_leathery_yavin4", hideMax = 72, meatType = "meat_domesticated_yavin4", meatMax = 115, --skills = { " Stun attack", "", "" } skills = { "mawgaxAttack1" }, respawnTimer = 60, behaviorScript = "", -- Link to the behavior script for this object } Creatures:addCreature(mawgaxFemale, 746705038) -- Add to Global Table
lgpl-3.0
Andrettin/Wyrmsun
scripts/languages/turkish.lua
1
1642
-- _________ __ __ -- / _____// |_____________ _/ |______ ____ __ __ ______ -- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ -- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ -- /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > -- \/ \/ \//_____/ \/ -- ______________________ ______________________ -- T H E W A R B E G I N S -- Stratagus - A free fantasy real time strategy game engine -- -- (c) Copyright 2017-2022 by Andrettin -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- DefineLanguageWord("Jenk", { -- Source: Carl D. Buck, "Words for 'Battle,' 'War,' 'Army,' and 'Soldier'", 1919, p. 7. Language = "turkish", -- source gives Modern Turkish Type = "noun", Meanings = {"Battle", "War"} })
gpl-2.0
yannayl/packages
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/cpu.lua
74
1429
-- stat/cpu collector local function scrape() local stat = get_contents("/proc/stat") -- system boot time, seconds since epoch metric("node_boot_time_seconds", "gauge", nil, string.match(stat, "btime ([0-9]+)")) -- context switches since boot (all CPUs) metric("node_context_switches_total", "counter", nil, string.match(stat, "ctxt ([0-9]+)")) -- cpu times, per CPU, per mode local cpu_mode = {"user", "nice", "system", "idle", "iowait", "irq", "softirq", "steal", "guest", "guest_nice"} local i = 0 local cpu_metric = metric("node_cpu_seconds_total", "counter") while true do local cpu = {string.match(stat, "cpu"..i.." (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+) (%d+)")} if #cpu ~= 10 then break end for ii, mode in ipairs(cpu_mode) do cpu_metric({cpu="cpu"..i, mode=mode}, cpu[ii] / 100) end i = i + 1 end -- interrupts served metric("node_intr_total", "counter", nil, string.match(stat, "intr ([0-9]+)")) -- processes forked metric("node_forks_total", "counter", nil, string.match(stat, "processes ([0-9]+)")) -- processes running metric("node_procs_running_total", "gauge", nil, string.match(stat, "procs_running ([0-9]+)")) -- processes blocked for I/O metric("node_procs_blocked_total", "gauge", nil, string.match(stat, "procs_blocked ([0-9]+)")) end return { scrape = scrape }
gpl-2.0
zhityer/zhityer1
plugins/banhammer.lua
27
10471
local function is_user_whitelisted(id) local hash = 'whitelist:user#id'..id local white = redis:get(hash) or false return white end local function is_chat_whitelisted(id) local hash = 'whitelist:chat#id'..id local white = redis:get(hash) or false return white end local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, ok_cb, true) end local function ban_user(user_id, chat_id) -- Save to redis local hash = 'banned:'..chat_id..':'..user_id redis:set(hash, true) -- Kick from chat kick_user(user_id, chat_id) end local function superban_user(user_id, chat_id) -- Save to redis local hash = 'superbanned:'..user_id redis:set(hash, true) -- Kick from chat kick_user(user_id, chat_id) end local function is_banned(user_id, chat_id) local hash = 'banned:'..chat_id..':'..user_id local banned = redis:get(hash) return banned or false end local function is_super_banned(user_id) local hash = 'superbanned:'..user_id local superbanned = redis:get(hash) return superbanned or false end local function pre_process(msg) -- SERVICE MESSAGE if msg.action and msg.action.type then local action = msg.action.type -- Check if banned user joins chat if action == 'chat_add_user' or action == 'chat_add_user_link' then local user_id if msg.action.link_issuer then user_id = msg.from.id else user_id = msg.action.user.id end print('Checking invited user '..user_id) local superbanned = is_super_banned(user_id) local banned = is_banned(user_id, msg.to.id) if superbanned or banned then print('User is banned!') kick_user(user_id, msg.to.id) end end -- No further checks return msg end -- BANNED USER TALKING if msg.to.type == 'chat' then local user_id = msg.from.id local chat_id = msg.to.id local superbanned = is_super_banned(user_id) local banned = is_banned(user_id, chat_id) if superbanned then print('SuperBanned user talking!') superban_user(user_id, chat_id) msg.text = '' end if banned then print('Banned user talking!') ban_user(user_id, chat_id) msg.text = '' end end -- WHITELIST local hash = 'whitelist:enabled' local whitelist = redis:get(hash) local issudo = is_sudo(msg) -- Allow all sudo users even if whitelist is allowed if whitelist and not issudo then print('Whitelist enabled and not sudo') -- Check if user or chat is whitelisted local allowed = is_user_whitelisted(msg.from.id) if not allowed then print('User '..msg.from.id..' not whitelisted') if msg.to.type == 'chat' then allowed = is_chat_whitelisted(msg.to.id) if not allowed then print ('Chat '..msg.to.id..' not whitelisted') else print ('Chat '..msg.to.id..' whitelisted :)') end end else print('User '..msg.from.id..' allowed :)') end if not allowed then msg.text = '' end else print('Whitelist not enabled or is sudo') end return msg end local function username_id(cb_extra, success, result) local get_cmd = cb_extra.get_cmd local receiver = cb_extra.receiver local chat_id = cb_extra.chat_id local member = cb_extra.member local text = 'No user @'..member..' in this group.' for k,v in pairs(result.members) do vusername = v.username if vusername == member then member_username = member member_id = v.id if get_cmd == 'kick' then return kick_user(member_id, chat_id) elseif get_cmd == 'ban user' then send_large_msg(receiver, 'User @'..member..' ['..member_id..'] banned') return ban_user(member_id, chat_id) elseif get_cmd == 'superban user' then send_large_msg(receiver, 'User @'..member..' ['..member_id..'] globally banned!') return superban_user(member_id, chat_id) elseif get_cmd == 'whitelist user' then local hash = 'whitelist:user#id'..member_id redis:set(hash, true) return send_large_msg(receiver, 'User @'..member..' ['..member_id..'] whitelisted') elseif get_cmd == 'whitelist delete user' then local hash = 'whitelist:user#id'..member_id redis:del(hash) return send_large_msg(receiver, 'User @'..member..' ['..member_id..'] removed from whitelist') end end end return send_large_msg(receiver, text) end local function run(msg, matches) if matches[1] == 'kickme' then kick_user(msg.from.id, msg.to.id) end if not is_momod(msg) then return nil end local receiver = get_receiver(msg) if matches[4] then get_cmd = matches[1]..' '..matches[2]..' '..matches[3] elseif matches[3] then get_cmd = matches[1]..' '..matches[2] else get_cmd = matches[1] end if matches[1] == 'ban' then local user_id = matches[3] local chat_id = msg.to.id if msg.to.type == 'chat' then if matches[2] == 'user' then if string.match(matches[3], '^%d+$') then ban_user(user_id, chat_id) send_large_msg(receiver, 'User '..user_id..' banned!') else local member = string.gsub(matches[3], '@', '') chat_info(receiver, username_id, {get_cmd=get_cmd, receiver=receiver, chat_id=chat_id, member=member}) end end if matches[2] == 'delete' then local hash = 'banned:'..chat_id..':'..user_id redis:del(hash) return 'User '..user_id..' unbanned' end else return 'This isn\'t a chat group' end end if matches[1] == 'superban' and is_admin(msg) then local user_id = matches[3] local chat_id = msg.to.id if matches[2] == 'user' then if string.match(matches[3], '^%d+$') then superban_user(user_id, chat_id) send_large_msg(receiver, 'User '..user_id..' globally banned!') else local member = string.gsub(matches[3], '@', '') chat_info(receiver, username_id, {get_cmd=get_cmd, receiver=receiver, chat_id=chat_id, member=member}) end end if matches[2] == 'delete' then local hash = 'superbanned:'..user_id redis:del(hash) return 'User '..user_id..' unbanned' end end if matches[1] == 'kick' then if msg.to.type == 'chat' then if string.match(matches[2], '^%d+$') then kick_user(matches[2], msg.to.id) else local member = string.gsub(matches[2], '@', '') chat_info(receiver, username_id, {get_cmd=get_cmd, receiver=receiver, chat_id=msg.to.id, member=member}) end else return 'This isn\'t a chat group' end end if matches[1] == 'whitelist' then if matches[2] == 'enable' and is_sudo(msg) then local hash = 'whitelist:enabled' redis:set(hash, true) return 'Enabled whitelist' end if matches[2] == 'disable' and is_sudo(msg) then local hash = 'whitelist:enabled' redis:del(hash) return 'Disabled whitelist' end if matches[2] == 'user' then if string.match(matches[3], '^%d+$') then local hash = 'whitelist:user#id'..matches[3] redis:set(hash, true) return 'User '..matches[3]..' whitelisted' else local member = string.gsub(matches[3], '@', '') chat_info(receiver, username_id, {get_cmd=get_cmd, receiver=receiver, chat_id=msg.to.id, member=member}) end end if matches[2] == 'chat' then if msg.to.type ~= 'chat' then return 'This isn\'t a chat group' end local hash = 'whitelist:chat#id'..msg.to.id redis:set(hash, true) return 'Chat '..msg.to.print_name..' ['..msg.to.id..'] whitelisted' end if matches[2] == 'delete' and matches[3] == 'user' then if string.match(matches[4], '^%d+$') then local hash = 'whitelist:user#id'..matches[4] redis:del(hash) return 'User '..matches[4]..' removed from whitelist' else local member = string.gsub(matches[4], '@', '') chat_info(receiver, username_id, {get_cmd=get_cmd, receiver=receiver, chat_id=msg.to.id, member=member}) end end if matches[2] == 'delete' and matches[3] == 'chat' then if msg.to.type ~= 'chat' then return 'This isn\'t a chat group' end local hash = 'whitelist:chat#id'..msg.to.id redis:del(hash) return 'Chat '..msg.to.print_name..' ['..msg.to.id..'] removed from whitelist' end end end return { description = "Plugin to manage bans, kicks and white/black lists.", usage = { user = "!kickme : Exit from group", moderator = { "!whitelist <enable>/<disable> : Enable or disable whitelist mode", "!whitelist user <user_id> : Allow user to use the bot when whitelist mode is enabled", "!whitelist user <username> : Allow user to use the bot when whitelist mode is enabled", "!whitelist chat : Allow everybody on current chat to use the bot when whitelist mode is enabled", "!whitelist delete user <user_id> : Remove user from whitelist", "!whitelist delete chat : Remove chat from whitelist", "!ban user <user_id> : Kick user from chat and kicks it if joins chat again", "!ban user <username> : Kick user from chat and kicks it if joins chat again", "!ban delete <user_id> : Unban user", "!kick <user_id> : Kick user from chat group by id", "!kick <username> : Kick user from chat group by username", }, admin = { "!superban user <user_id> : Kick user from all chat and kicks it if joins again", "!superban user <username> : Kick user from all chat and kicks it if joins again", "!superban delete <user_id> : Unban user", }, }, patterns = { "^!(whitelist) (enable)$", "^!(whitelist) (disable)$", "^!(whitelist) (user) (.*)$", "^!(whitelist) (chat)$", "^!(whitelist) (delete) (user) (.*)$", "^!(whitelist) (delete) (chat)$", "^!(ban) (user) (.*)$", "^!(ban) (delete) (.*)$", "^!(superban) (user) (.*)$", "^!(superban) (delete) (.*)$", "^!(kick) (.*)$", "^!(kickme)$", "^!!tgservice (.+)$", }, run = run, pre_process = pre_process }
gpl-2.0
Entware-ng/entware-routing
alfred/files/bat-hosts.lua
1
3132
#!/usr/bin/lua local type_id = 64 -- bat-hosts function get_hostname() local hostfile = io.open("/proc/sys/kernel/hostname", "r") local ret_string = hostfile:read() hostfile:close() return ret_string end function get_interfaces_names() local ret = {} for name in io.popen("ls -1 /sys/class/net/"):lines() do table.insert(ret, name) end return ret end function get_interface_address(name) local addressfile = io.open("/sys/class/net/"..name.."/address", "r") local ret_string = addressfile:read() addressfile:close() return ret_string end local function generate_bat_hosts() -- get hostname and interface macs/names -- then return a table containing valid bat-hosts lines local n, i local ifaces, ret = {}, {} local hostname = get_hostname() for n, i in ipairs(get_interfaces_names()) do local address = get_interface_address(i) if not ifaces[address] then ifaces[address] = i end end for mac, iname in pairs(ifaces) do if mac:match("^%x%x:%x%x:%x%x:%x%x:%x%x:%x%x$") and not mac:match("00:00:00:00:00:00") then table.insert(ret, mac.." "..hostname.."_"..iname.."\n") end end return ret end local function publish_bat_hosts() -- pass a raw chunk of data to alfred local fd = io.popen("alfred -s " .. type_id, "w") if fd then local ret = generate_bat_hosts() if ret then fd:write(table.concat(ret)) end fd:close() end end local function write_bat_hosts(rows) local content = { "### /tmp/bat-hosts generated by alfred-bat-hosts\n", "### /!\\ This file is overwritten every 5 minutes /!\\\n", "### (To keep manual changes, replace /etc/bat-hosts symlink with a static file)\n" } -- merge the chunks from all nodes, de-escaping newlines for _, row in ipairs(rows) do local node, value = unpack(row) table.insert(content, "# Node ".. node .. "\n") table.insert(content, value:gsub("\x0a", "\n") .. "\n") end -- write parsed content down to disk local fd = io.open("/tmp/bat-hosts", "w") if fd then fd:write(table.concat(content)) fd:close() end -- try to make a symlink in /etc pointing to /tmp, -- if it exists, ln will do nothing. os.execute("ln -ns /tmp/bat-hosts /etc/bat-hosts 2>/dev/null") end local function receive_bat_hosts() -- read raw chunks from alfred, convert them to a nested table and call write_bat_hosts -- "alfred -r" can fail in slave nodes (returns empty stdout), so: -- check output is not null before writing /tmp/bat-hosts, and retry 3 times before giving up. for n = 1, 3 do local fd = io.popen("alfred -r " .. type_id) --[[ this command returns something like { "54:e6:fc:b9:cb:37", "00:11:22:33:44:55 ham_wlan0\x0a00:22:33:22:33:22 ham_eth0\x0a" }, { "90:f6:52:bb:ec:57", "00:22:33:22:33:23 spam\x0a" }, ]]-- if fd then local output = fd:read("*a") fd:close() if output and output ~= "" then assert(loadstring("rows = {" .. output .. "}"))() write_bat_hosts(rows) break end end end end publish_bat_hosts() receive_bat_hosts()
gpl-2.0