repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
AndyClausen/PNRP_HazG
postnukerp/entities/entities/tool_radar/init.lua
1
10443
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include('shared.lua') util.PrecacheModel ("models/props_mining/antlion_detector.mdl") function ENT:Initialize() self.Entity:SetModel("models/props_combine/combine_mortar01b.mdl") self.Entity:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics, self.Entity:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics self.Entity:SetSolid( SOLID_VPHYSICS ) -- Toolbox self:SetHealth( 200 ) self.moveActive = true self.Entity:PhysWake() self:GetPhysicsObject():Wake() self.playbackRate = 0 self.SyncTime = self.Entity:GetNWString("SyncTime", 30) self.PlayerENT = nil self.Enabled = self.Entity:GetNWString("Enabled", false) self.GPRENT = nil self.EnabledGPR = self.Entity:GetNWString("EnabledGPR", false) self.Status = self.Entity:GetNWString("Status", 0) --Status Options -- -2 = Dead -- -1 = No Power -- 0 = None (Off) -- 1 = On/Standby -- 2 = Synching -- 3 = In Use/Working/Runing/Whatever -- Important power vars! self.PowerItem = true self.PowerLevel = 0 self.NetworkContainer = nil self.LinkedItems = {} self.DirectLinks = {} local Radar_Sound = Sound("plats/tram_move.wav") self.RadarAmb = CreateSound(self.Entity, Radar_Sound ) self.Entity:NextThink(CurTime() + 1.0) self.PowerUsage = -50 self.Entity:SetNWString("PowerUsage", self.PowerUsage) end function ENT:Use( activator, caller ) if activator:KeyPressed( IN_USE ) then local allowedtouse = false local foundGPR = false RADAR_FixPlayer(activator, self) if activator:IsAdmin() and GetConVarNumber("pnrp_adminTouchAll") == 1 then activator:ChatPrint("Admin Overide.") allowedtouse = true else if activator:Team() ~= TEAM_WASTELANDER then activator:ChatPrint("You don't have any idea how to use this.") return end if not self.entOwner then self.entOwner = activator allowedtouse = true else if self.entOwner == activator then allowedtouse = true end end end if allowedtouse then net.Start("radar_menu") net.WriteDouble(self:Health()) net.WriteDouble(self.Entity:EntIndex()) net.WriteEntity(self.Entity) net.WriteDouble(self.SyncTime) net.Send(activator) end end end util.AddNetworkString("radar_menu") --Fixes DySych Issues function RADAR_FixPlayer(ply, ent) local plyRadarIndex = ply.RadarENTIndex local foundRadar = false local foundRadars = ents.FindByClass("tool_radar") for k, v in pairs(foundRadars) do if v:EntIndex() == plyRadarIndex then foundRadar = true end end if ent.Entity:EntIndex() == ply.RadarENTIndex then if ent.Status < 1 then foundRadar = false end end if not foundRadar then ply.RadarENT = nil ply.RadarENTIndex = nil ply:SetNWString("RadarENTIndex", nil) ply:SetNWEntity("RadarENT", nil) end end function RADAR_Attach() local ply = net.ReadEntity() local ent = net.ReadEntity() if ent.Status < 0 then ply:ChatPrint("Unit is dissabled") return end ent:GetPhysicsObject():EnableMotion(false) ent.moveActive = false ply.RadarENT = ent ply:SetNWEntity("RadarENT", ent) ply.RadarENTIndex = ent.Entity:EntIndex() ply:SetNWString("RadarENTIndex", ent.Entity:EntIndex()) ent.PlayerENT = ply ent.PowerLevel = -50 if IsValid(ent.NetworkContainer) then ent.NetworkContainer:UpdatePower() end if ent.Status == 0 then ent.Status = 1 ent:SetNWString("Status", 1) end end util.AddNetworkString("RADAR_Attach") net.Receive( "RADAR_Attach", RADAR_Attach ) function RADAR_Detach() local ply = net.ReadEntity() local ent = net.ReadEntity() RADAR_DoDetach(ply, ent) end function RADAR_DoDetach(ply, ent) ply.RadarENT = nil ply.RadarENTIndex = nil ply:SetNWString("RadarENTIndex", 0) ply:SetNWEntity("RadarENT", ply) ent.PlayerENT = nil -- ent.Status = 0 -- ent:SetNWString("Status", 0) end util.AddNetworkString("RADAR_Detach") net.Receive( "RADAR_Detach", RADAR_Detach ) function RADAR_AttachGPR() local ply = net.ReadEntity() local ent = net.ReadEntity() local nearbyEnts = ents.FindInSphere(ent:GetPos(), 150) local gprENT local dist = 500 for k, v in pairs(nearbyEnts) do if v:GetClass() == "tool_gpr" and !v.Charging and (not IsValid(v.NetworkContainer)) then if ent:GetPos():Distance(v:GetPos()) < dist then gprENT = v dist = ent:GetPos():Distance(v:GetPos()) end end end if IsValid(gprENT) then gprENT:SetPos(util.LocalToWorld( ent, Vector(25, 5, 60))) gprENT:SetAngles(ent:GetAngles()+Angle(0,0,0)) constraint.Weld(ent, gprENT, 0, 0, 0, true) ent:EmitSound( "ambient/energy/zap1.wav", SNDLVL_30dB, 100) ply:ChatPrint("You've hooked the GPR.") ent.GPRENT = gprENT ent.EnabledGPR = true ent:SetNWString("EnabledGPR", true) ent.PowerLevel = -60 if IsValid(ent.NetworkContainer) then ent.NetworkContainer:UpdatePower() end gprENT:GetPhysicsObject():EnableMotion(false) ent.moveActive = false else ply:ChatPrint("No nearby GPR.") end end util.AddNetworkString("RADAR_AttachGPR") net.Receive( "RADAR_AttachGPR", RADAR_AttachGPR ) function RADAR_RemoveGPR() local ply = net.ReadEntity() local ent = net.ReadEntity() RADAR_DetachGPR(ent) end function RADAR_DetachGPR(ent) local gprENT = ent.GPRENT if IsValid(gprENT) then constraint.RemoveConstraints( gprENT, "Weld" ) gprENT:GetPhysicsObject():Wake() gprENT:EmitSound( "ambient/energy/zap1.wav", SNDLVL_30dB, 100) if ent.PowerLevel == -60 then ent.PowerLevel = -50 if IsValid(ent.NetworkContainer) then ent.NetworkContainer:UpdatePower() end end gprENT:GetPhysicsObject():EnableMotion(true) gprENT.moveActive = true gprENT:GetPhysicsObject():Wake() end ent.GPRENT = nil ent.EnabledGPR = false ent:SetNWString("EnabledGPR", false) end util.AddNetworkString("RADAR_RemoveGPR") net.Receive( "RADAR_RemoveGPR", RADAR_RemoveGPR ) function RADAR_Synch() local ply = net.ReadEntity() local ent = net.ReadEntity() if ent.Status < 0 then ply:ChatPrint("Unit is dissabled") return end ent.Status = 2 ent:SetNWString("Status", 2) ply:ChatPrint("Syncing Radar...") --Keeps radar from beeing moved. ent.moveActive = false ent:DoFreeze() ent.RadarAmb:Play() ent.playbackRate = 0.1 ent.Entity:SetPlaybackRate(ent.playbackRate) ent.RadarAmb:ChangePitch( 20, 10 ) ent.RadarAmb:ChangeVolume( 50, 10 ) timer.Simple( ent.SyncTime, function () ply:ChatPrint("Sync complete!") ent.Status = 3 ent:SetNWString("Status", 3) ent.BlockF2 = true end ) end util.AddNetworkString("RADAR_Synch") net.Receive( "RADAR_Synch", RADAR_Synch ) function RADAR_Repair() local ply = net.ReadEntity() local ent = net.ReadEntity() local amount = 200 - ent:Health() ply:Freeze(true) ply:ChatPrint("Fixing Radar...") timer.Simple( amount/10, function () ply:Freeze(false) ent:SetHealth( 200 ) if ent:Health() > 200 then ent:SetHealth( 200 ) end ply:ChatPrint("Repair compleate!") ent.Status = 0 ent:SetNWString("Status", 0) end ) end util.AddNetworkString("RADAR_Repair") net.Receive( "RADAR_Repair", RADAR_Repair ) function RADAR_PowerOff() local ply = net.ReadEntity() local ent = net.ReadEntity() if ent.PlayerENT then ent.PlayerENT:ChatPrint("Radar Shutdown...") else ply:ChatPrint("Radar Shutdown...") end RADAR_Shutdown(ent) end util.AddNetworkString("RADAR_PowerOff") net.Receive( "RADAR_PowerOff", RADAR_PowerOff ) function ENT:OnTakeDamage(dmg) self:SetHealth(self:Health() - dmg:GetDamage()) if self:Health() <= 0 then --run on death self:SetHealth( 0 ) RADAR_Shutdown(self) RADAR_DetachGPR(self) end end function RADAR_Shutdown(ent) ent.Enabled = false ent:SetNWString("Enabled", false) if IsValid(ent.PlayerENT) then local ply = ent.PlayerENT ply:ChatPrint("Radar signal lost.") RADAR_DoDetach(ply, ent) end ent.RadarAmb:Stop() ent.PlayerENT = nil RADAR_DetachGPR(ent) ent.GPRENT = nil ent.Status = 0 ent:SetNWString("Status", 0) ent:GetPhysicsObject():EnableMotion(true) ent.moveActive = true ent:GetPhysicsObject():Wake() ent.BlockF2 = false ent.PowerLevel = 0 if IsValid(ent.NetworkContainer) then ent.NetworkContainer:UpdatePower() end end function ENT:Think() if not self.SynchedPlayer and self.Enabled then RADAR_Shutdown(self) return end if self.Status > 0 then if not self:IsOutside() then RADAR_Shutdown(self) end end if self:Health() < 150 then local effectdata = EffectData() local rndGen = math.random(10) if rndGen == 5 then effectdata:SetStart( self:LocalToWorld( Vector( 0, 0, 10 ) ) ) effectdata:SetOrigin( self:LocalToWorld( Vector( 0, 0, 10 ) ) ) effectdata:SetNormal( Vector(0,0,1) ) effectdata:SetScale( 0.7 ) util.Effect( "ManhackSparks", effectdata ) self:EmitSound("ambient/levels/labs/electric_explosion5.wav", 100, 100 ) end end if IsValid(self.GPRENT) then local GPRCheck = false local findRADHost = constraint.FindConstraints( self.GPRENT, "Weld" ) for _, v in pairs(findRADHost) do if v.Entity[1].Entity == self then GPRCheck = true end end if not GPRCheck then self.GPRENT:SetPos(util.LocalToWorld( self, Vector(25, 5, 60))) self.GPRENT:SetAngles(self:GetAngles()+Angle(0,0,0)) constraint.Weld(self, self.GPRENT, 0, 0, 0, true) self:EmitSound( "ambient/energy/zap1.wav", SNDLVL_30dB, 100) GPRCheck = true end elseif self.EnabledGPR then RADAR_DetachGPR(self) end if (not self.NetworkContainer) or (not self.NetworkContainer.NetPower) or self.NetworkContainer.NetPower < 0 then RADAR_Shutdown(self) end self.Entity:NextThink(CurTime() + 1) return true end function ENT:DoFreeze() self:GetPhysicsObject():EnableMotion(false) end function ENT:DoUnFreeze() self:GetPhysicsObject():EnableMotion(true) end function ENT:PostEntityPaste(pl, Ent, CreatedEntities) self:Remove() end function ENT:OnRemove() RADAR_Shutdown(self) self:PowerUnLink() end
gpl-3.0
Rdamonster/devmonster
plugins/stats.lua
22
4011
do -- Returns a table with `name` and `msgs` local function get_msgs_user_chat(user_id, chat_id) local user_info = {} local uhash = 'user:'..user_id local user = redis:hgetall(uhash) local um_hash = 'msgs:'..user_id..':'..chat_id user_info.msgs = tonumber(redis:get(um_hash) or 0) user_info.name = user_print_name(user)..' ['..user_id..']' return user_info end local function chat_stats(receiver, chat_id) -- Users on chat local hash = 'chat:'..chat_id..':users' local users = redis:smembers(hash) local users_info = {} -- Get user info for i = 1, #users do local user_id = users[i] local user_info = get_msgs_user_chat(user_id, chat_id) table.insert(users_info, user_info) end -- Sort users by msgs number table.sort(users_info, function(a, b) if a.msgs and b.msgs then return a.msgs > b.msgs end end) local text = 'Users in this chat \n' for k,user in pairs(users_info) do text = text..user.name..' = '..user.msgs..'\n' end local file = io.open("./groups/lists/"..chat_id.."stats.txt", "w") file:write(text) file:flush() file:close() send_document(receiver,"./groups/lists/"..chat_id.."stats.txt", ok_cb, false) return --text end local function chat_stats2(chat_id) -- Users on chat local hash = 'chat:'..chat_id..':users' local users = redis:smembers(hash) local users_info = {} -- Get user info for i = 1, #users do local user_id = users[i] local user_info = get_msgs_user_chat(user_id, chat_id) table.insert(users_info, user_info) end -- Sort users by msgs number table.sort(users_info, function(a, b) if a.msgs and b.msgs then return a.msgs > b.msgs end end) local text = 'Users in this chat \n' for k,user in pairs(users_info) do text = text..user.name..' = '..user.msgs..'\n' end return text end -- Save stats, ban user local function bot_stats() local redis_scan = [[ local cursor = '0' local count = 0 repeat local r = redis.call("SCAN", cursor, "MATCH", KEYS[1]) cursor = r[1] count = count + #r[2] until cursor == '0' return count]] -- Users local hash = 'msgs:*:'..our_id local r = redis:eval(redis_scan, 1, hash) local text = 'Users: '..r hash = 'chat:*:users' r = redis:eval(redis_scan, 1, hash) text = text..'\nGroups: '..r return text end local function run(msg, matches) if matches[1]:lower() == 'th3boss' then -- Put everything you like :) local about = _config.about_text local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] used /teleseed ") return about end if matches[1]:lower() == "statslist" then if not is_momod(msg) then return "For mods only !" end local chat_id = msg.to.id local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] requested group stats ") return chat_stats2(chat_id) end if matches[1]:lower() == "stats" then if not matches[2] then if not is_momod(msg) then return "For mods only !" end if msg.to.type == 'chat' or msg.to.type == 'channel' then local receiver = get_receiver(msg) local chat_id = msg.to.id local name = user_print_name(msg.from) savelog(msg.to.id, name.." ["..msg.from.id.."] requested group stats ") return chat_stats(receiver, chat_id) else return end end if matches[2] == "th3boss" then -- Put everything you like :) if not is_admin1(msg) then return "For admins only !" else return bot_stats() end end if matches[2] == "group" then if not is_admin1(msg) then return "For admins only !" else return chat_stats(matches[3]) end end end end return { patterns = { "^[#!/]([Ss]tats)$", "^[#!/]([Ss]tatslist)$", "^[#!/]([Ss]tats) (group) (%d+)", "^[#!/]([Ss]tats) (th3boss)", "^[#!/]([Tt]h3boss)" }, run = run } end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/item/item_repairkit_clothing.lua
2
3148
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_item_item_repairkit_clothing = object_draft_schematic_item_shared_item_repairkit_clothing:new { templateType = DRAFTSCHEMATIC, customObjectName = "Clothing Repair Tool", craftingToolTab = 524288, -- (See DraftSchemticImplementation.h) complexity = 7, size = 4, xpType = "crafting_general", xp = 26, assemblySkill = "general_assembly", experimentingSkill = "general_experimentation", customizationSkill = "clothing_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_item_ingredients_n", "craft_item_ingredients_n"}, ingredientTitleNames = {"assembly_enclosure", "thermal_shielding"}, ingredientSlotType = {0, 0}, resourceTypes = {"metal", "metal"}, resourceQuantities = {8, 5}, contribution = {100, 100}, targetTemplate = "object/tangible/crafting/station/clothing_repair.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_item_item_repairkit_clothing, "object/draft_schematic/item/item_repairkit_clothing.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/mission/mission_terminal.lua
3
2220
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_mission_mission_terminal = object_tangible_mission_shared_mission_terminal:new { } ObjectTemplates:addTemplate(object_tangible_mission_mission_terminal, "object/tangible/mission/mission_terminal.iff")
agpl-3.0
DailyShana/ygopro-scripts
c24096228.lua
7
3355
--二重魔法 function c24096228.initial_effect(c) --copy spell local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCost(c24096228.cost) e1:SetTarget(c24096228.target) e1:SetOperation(c24096228.operation) c:RegisterEffect(e1) end function c24096228.cfilter(c) return c:IsDiscardable() and c:IsType(TYPE_SPELL) end function c24096228.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c24096228.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.DiscardHand(tp,c24096228.cfilter,1,1,REASON_COST+REASON_DISCARD) end function c24096228.filter1(c,e,tp,eg,ep,ev,re,r,rp) local te=c:CheckActivateEffect(false,false,false) if c:IsType(TYPE_SPELL) and te then if c:IsSetCard(0x95) then local tg=te:GetTarget() return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0) else return true end end return false end function c24096228.filter2(c,e,tp,eg,ep,ev,re,r,rp) local te=c:CheckActivateEffect(false,false,false) if c:IsType(TYPE_SPELL) and not c:IsType(TYPE_EQUIP+TYPE_CONTINUOUS) and te then if c:IsSetCard(0x95) then local tg=te:GetTarget() return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0) else return true end end return false end function c24096228.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then local b=e:GetHandler():IsLocation(LOCATION_HAND) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if (b and ft>1) or (not b and ft>0) then return Duel.IsExistingTarget(c24096228.filter1,tp,0,LOCATION_GRAVE,1,e:GetHandler(),e,tp,eg,ep,ev,re,r,rp) else return Duel.IsExistingTarget(c24096228.filter2,tp,0,LOCATION_GRAVE,1,e:GetHandler(),e,tp,eg,ep,ev,re,r,rp) end end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then Duel.SelectTarget(tp,c24096228.filter1,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,eg,ep,ev,re,r,rp) else Duel.SelectTarget(tp,c24096228.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,eg,ep,ev,re,r,rp) end end function c24096228.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) then return end local tpe=tc:GetType() local te=tc:GetActivateEffect() local tg=te:GetTarget() local co=te:GetCost() local op=te:GetOperation() e:SetCategory(te:GetCategory()) e:SetProperty(te:GetProperty()) Duel.ClearTargetCard() if bit.band(tpe,TYPE_EQUIP+TYPE_CONTINUOUS)~=0 or tc:IsHasEffect(EFFECT_REMAIN_FIELD) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) elseif bit.band(tpe,TYPE_FIELD)~=0 then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end tc:CreateEffectRelation(te) if co then co(te,tp,eg,ep,ev,re,r,rp,1) end if tg then if tc:IsSetCard(0x95) then tg(e,tp,eg,ep,ev,re,r,rp,1) else tg(te,tp,eg,ep,ev,re,r,rp,1) end end Duel.BreakEffect() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local etc=g:GetFirst() while etc do etc:CreateEffectRelation(te) etc=g:GetNext() end if op then if tc:IsSetCard(0x95) then op(e,tp,eg,ep,ev,re,r,rp) else op(te,tp,eg,ep,ev,re,r,rp) end end tc:ReleaseEffectRelation(te) etc=g:GetFirst() while etc do etc:ReleaseEffectRelation(te) etc=g:GetNext() end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/space/asteroid/asteroid_medium_01.lua
3
2248
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_space_asteroid_asteroid_medium_01 = object_static_space_asteroid_shared_asteroid_medium_01:new { } ObjectTemplates:addTemplate(object_static_space_asteroid_asteroid_medium_01, "object/static/space/asteroid/asteroid_medium_01.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/space/serverobjects.lua
2
1747
includeFile("space/akal_colzet.lua") includeFile("space/alozen.lua") includeFile("space/aqzow.lua") includeFile("space/arnecio_ulvaw_op.lua") includeFile("space/barlow.lua") includeFile("space/barn_sinkko.lua") includeFile("space/corsec_pilot.lua") includeFile("space/denner.lua") includeFile("space/diness_imler.lua") includeFile("space/dinge.lua") includeFile("space/dravis.lua") includeFile("space/dulios.lua") includeFile("space/eker.lua") includeFile("space/extok_evin.lua") includeFile("space/ezkiel.lua") includeFile("space/fa_zoll.lua") includeFile("space/gert_talnin.lua") includeFile("space/gil_burtin.lua") includeFile("space/hakassha_sireen.lua") includeFile("space/haymir_rendundi.lua") includeFile("space/io_tsomcren.lua") includeFile("space/j_pai_brek.lua") includeFile("space/j1_po_space.lua") includeFile("space/jace_yiaso.lua") includeFile("space/jaden_dala.lua") includeFile("space/kaydine.lua") includeFile("space/kreezo.lua") includeFile("space/kulton_woodle.lua") includeFile("space/landau.lua") includeFile("space/larek_tatham.lua") includeFile("space/nial_declann.lua") includeFile("space/nirame_sakute.lua") includeFile("space/nym_fuel_tech.lua") includeFile("space/oberhaur.lua") includeFile("space/prisk_kith_vys.lua") includeFile("space/ral_mundi.lua") includeFile("space/ramna.lua") includeFile("space/rhea.lua") includeFile("space/rikkh.lua") includeFile("space/tarth_jaxx.lua") includeFile("space/ufwol.lua") includeFile("space/ulaire_roye.lua") includeFile("space/v3_fx.lua") includeFile("space/viopa.lua") includeFile("space/vrke.lua") includeFile("space/vrovel.lua") includeFile("space/warvog_arkon.lua") includeFile("space/wlinc_tchrr.lua") includeFile("space/zhanks.lua") includeFile("space/chassis_dealer.lua")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/ship/hutt_light_s02.lua
3
2164
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_ship_hutt_light_s02 = object_ship_shared_hutt_light_s02:new { } ObjectTemplates:addTemplate(object_ship_hutt_light_s02, "object/ship/hutt_light_s02.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/structure/general/cave_stalactite_ice_style_04.lua
3
2300
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_structure_general_cave_stalactite_ice_style_04 = object_static_structure_general_shared_cave_stalactite_ice_style_04:new { } ObjectTemplates:addTemplate(object_static_structure_general_cave_stalactite_ice_style_04, "object/static/structure/general/cave_stalactite_ice_style_04.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/weapon/lightsaber/lightsaber_two_hand_gen1.lua
2
5175
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_weapon_lightsaber_lightsaber_two_hand_gen1 = object_draft_schematic_weapon_lightsaber_shared_lightsaber_two_hand_gen1:new { templateType = DRAFTSCHEMATIC, customObjectName = "Two-Handed First Generation Lightsaber", craftingToolTab = 2048, -- (See DraftSchemticImplementation.h) complexity = 16, size = 1, xpType = "jedi_general", xp = 0, assemblySkill = "jedi_saber_assembly", experimentingSkill = "jedi_saber_experimentation", customizationSkill = "jedi_customization", disableFactoryRun = true, customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n"}, ingredientTitleNames = {"emitter_shroud", "primary_crystal", "activator", "handgrip", "focusing_crystals", "power_field_insulator", "energizers"}, ingredientSlotType = {0, 1, 0, 0, 1, 0, 0}, resourceTypes = {"mineral", "object/tangible/component/weapon/lightsaber/shared_lightsaber_refined_crystal_pack.iff", "metal", "chemical", "object/tangible/component/weapon/lightsaber/shared_lightsaber_refined_crystal_pack.iff", "gas", "metal"}, resourceQuantities = {20, 1, 19, 28, 1, 30, 20}, contribution = {100, 100, 100, 100, 100, 100, 100}, targetTemplate = "object/weapon/melee/2h_sword/crafted_saber/sword_lightsaber_two_handed_gen1.iff", additionalTemplates = { "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s1_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s2_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s3_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s4_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s5_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s6_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s7_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s8_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s9_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s10_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s11_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s12_gen1.iff", "object/weapon/melee/2h_sword/crafted_saber/shared_sword_lightsaber_two_handed_s13_gen1.iff", } } ObjectTemplates:addTemplate(object_draft_schematic_weapon_lightsaber_lightsaber_two_hand_gen1, "object/draft_schematic/weapon/lightsaber/lightsaber_two_hand_gen1.iff")
agpl-3.0
DailyShana/ygopro-scripts
c48229808.lua
3
1635
--ホルスの黒炎竜 LV8 function c48229808.initial_effect(c) c:EnableReviveLimit() --cannot special summon local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) --Negate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(48229808,0)) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(c48229808.condition) e2:SetTarget(c48229808.target) e2:SetOperation(c48229808.operation) c:RegisterEffect(e2) end c48229808.lvupcount=1 c48229808.lvup={11224103} c48229808.lvdncount=2 c48229808.lvdn={75830094,11224103} function c48229808.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) end function c48229808.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end end function c48229808.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.NegateActivation(ev) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/vehicle/speederbike_flash.lua
2
2216
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_vehicle_speederbike_flash = object_mobile_vehicle_shared_speederbike_flash:new { } ObjectTemplates:addTemplate(object_mobile_vehicle_speederbike_flash, "object/mobile/vehicle/speederbike_flash.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/loot/dungeon/geonosian_mad_bunker/engineering_key.lua
3
2320
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_loot_dungeon_geonosian_mad_bunker_engineering_key = object_tangible_loot_dungeon_geonosian_mad_bunker_shared_engineering_key:new { } ObjectTemplates:addTemplate(object_tangible_loot_dungeon_geonosian_mad_bunker_engineering_key, "object/tangible/loot/dungeon/geonosian_mad_bunker/engineering_key.iff")
agpl-3.0
MHPG/MegaBreakerTG
plugins/urbandictionary.lua
11
1055
local doc = [[ /urbandictionary <query> Returns a definition from Urban Dictionary. ]] local triggers = { '^/u[rban]*d[ictionary]*[@'..bot.username..']*', '^/urban[@'..bot.username..']*' } local action = function(msg) local input = msg.text:input() if not input then if msg.reply_to_message and msg.reply_to_message.text then input = msg.reply_to_message.text else sendReply(msg, doc) return end end local url = 'http://api.urbandictionary.com/v0/define?term=' .. URL.escape(input) local jstr, res = HTTP.request(url) if res ~= 200 then sendReply(msg, config.errors.connection) return end local jdat = JSON.decode(jstr) if jdat.result_type == "no_results" then sendReply(msg, config.errors.results) return end local message = '"' .. jdat.list[1].word .. '"\n' .. jdat.list[1].definition:trim() if string.len(jdat.list[1].example) > 0 then message = message .. '\n\nExample:\n' .. jdat.list[1].example:trim() end sendReply(msg, message) end return { action = action, triggers = triggers, doc = doc }
gpl-2.0
njligames/NJLIGameEngine
projects/YappyBirds/_archive/scripts_9.16.2016/Params.lua
2
2793
local ParamInfo = {} ParamInfo = { World = { Gravity = bullet.btVector3(0,-60.81,0), LayerDistance = 15.24, LayerMax = 60.96, WorldOffset = bullet.btVector2(1.0, 19.7), WorldScale = 91.0, MinBrightnessForDistance = 0.8, }, Projectile = { WaterBalloon = { Azimuth = 10, Magnitude = 45, DieY = -50, Mass = 1, FramesPerSecond = 30.0, Hues = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100, -110, -120, -130, -140, -150, -160, -170, -180, }, ScaleMin = 0.9, ScaleMax = 2.0, DeathVariables = { FramesPerSecond = 30.0, ShowParticles = false, }, }, }, Dog = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), DazedTime = (0.5 * 1000), CapturedHeight = 20, }, Bird = { chubiBird = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = 1, PursueTime = (6 * 1000), StealSpeed = 1, YapTime = {low=(10 * 1000), high=(30 * 1000)}, DieY = -50, ScalarVariableExample=0, ArrayVariableExample={ Example1 = true, Example2 = "hello i'm string", Example3 = 1.0, Example4 = { AnotherVariable = 0 }, } }, garuBird = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), PursueTime = (5 * 1000), StealSpeed = 2, YapTime = {low=(10 * 1000), high=(30 * 1000)}, DieY = -50, }, momiBird = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), PursueTime = (4 * 1000), StealSpeed = 3, YapTime = {low=(10 * 1000), high=(30 * 1000)}, DieY = -50, }, puffyBird = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), PursueTime = (3 * 1000), StealSpeed = 4, YapTime = {low=(10 * 1000), high=(30 * 1000)}, DieY = -50, }, weboBird = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), PursueTime = (2 * 1000), StealSpeed = 5, YapTime = {low=(10 * 1000), high=(30 * 1000)}, DieY = -50, }, zuruBird = { MaxSpeed = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), MaxForce = njli.World.getInstance():getWorldLuaVirtualMachine():getMaxNumber(), PursueTime = (1 * 1000), StealSpeed = 6, YapTime = {low=(10 * 1000), high=(30 * 1000)}, DieY = -50, }, }, } return ParamInfo
mit
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/component/dna/dna_template_veermok.lua
3
2260
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_component_dna_dna_template_veermok = object_tangible_component_dna_shared_dna_template_veermok:new { } ObjectTemplates:addTemplate(object_tangible_component_dna_dna_template_veermok, "object/tangible/component/dna/dna_template_veermok.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Navukgo_Execution_Chamber/Zone.lua
5
1145
----------------------------------- -- -- Zone: Navukgo_Execution_Chamber (64) -- ----------------------------------- package.loaded["scripts/zones/Navukgo_Execution_Chamber/TextIDs"] = nil; ----------------------------------- require("scripts/globals/missions"); require("scripts/globals/settings"); require("scripts/zones/Navukgo_Execution_Chamber/TextIDs"); ----------------------------------- function onInitialize(zone) end; function onZoneIn(player,prevZone) local cs = -1; if (player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0) then player:setPos(-660.185,-12.079,-199.532,192); end if (player:getCurrentMission(TOAU) == SHIELD_OF_DIPLOMACY and player:getVar("AhtUrganStatus") == 0) then cs = 1; end return cs; end; function onRegionEnter(player,region) end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); if (csid == 1) then player:setVar("AhtUrganStatus",1); end end;
gpl-3.0
BlubBlab/Micromacro-2-Bot-Framework
libraries/threadframework/64bit/lanes-keeper.lua
2
7247
-- -- KEEPER.LUA -- -- Keeper state logic -- DEPRECATED BY THE EQUIVALENT C IMPLEMENTATION, KEPT FOR REFERENCE ONLY -- SHOULD NOT BE PART OF THE INSTALLATION ANYMORE -- -- This code is read in for each "keeper state", which are the hidden, inter- -- mediate data stores used by Lanes inter-state communication objects. -- -- Author: Asko Kauppi <akauppi@gmail.com> -- --[[ =============================================================================== Copyright (C) 2008-10 Asko Kauppi <akauppi@gmail.com> 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. 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. =============================================================================== ]]-- -- We only need to have base and table libraries (and io for debugging) -- local table_concat = assert( table.concat) local table_insert = assert( table.insert) local table_remove = assert( table.remove) local select, unpack = assert( select), assert( unpack) --[[ local function WR(...) if io then io.stderr:write( table_concat({...},'\t').."\n" ) end end local function DEBUG(title,ud,key) assert( title and ud and key ) local data,_= tables(ud) local s= tostring(data[key]) for _,v in ipairs( data[key] or {} ) do s= s..", "..tostring(v) end WR( "*** "..title.." ("..tostring(key).."): ", s ) end --]] ----- -- FIFO for a key -- local fifo_new = function() return { first = 1, count = 0} end local fifo_push = function( fifo, ...) local first, count, added = fifo.first, fifo.count, select( '#', ...) local start = first + count - 1 for i = 1, added do fifo[start + i] = select( i, ...) end fifo.count = count + added end local fifo_peek = function( fifo, count) if count <= fifo.count then local first = fifo.first local last = first + count - 1 return unpack( fifo, first, last) end end local fifo_pop = function( fifo, count) local first = fifo.first local last = first + count - 1 local out = { unpack( fifo, first, last)} for i = first, last do fifo[i] = nil end fifo.first = first + count fifo.count = fifo.count - count return unpack( out) end ----- -- Actual data store -- -- { [linda_deep_ud]= { key= { val [, ... ] } [, ...] } -- ... -- } -- local _data= {} ----- -- Length limits (if any) for queues -- -- 0: don't queue values at all; ':send()' waits if the slot is not vacant -- N: allow N values to be queued (slot itself + N-1); wait if full -- nil: no limits, '_data' may grow endlessly -- local _limits= {} ----- -- data_tbl, limits_tbl = tables( linda_deep_ud ) -- -- Gives appropriate tables for a certain Linda (creates them if needed) -- local function tables( ud ) -- tables are created either all or nothing -- if not _data[ud] then _data[ud]= {} _limits[ud]= {} end return _data[ud], _limits[ud] end ----- -- bool= send( linda_deep_ud, key, ...) -- -- Send new data (1..N) to 'key' slot. This send is atomic; all the values -- end up one after each other (this is why having possibility for sending -- multiple values in one call is deemed important). -- -- If the queue has a limit, values are sent only if all of them fit in. -- -- Returns: 'true' if all the values were placed -- 'false' if sending would exceed the queue limit (wait & retry) -- function send( ud, key, ...) local data, limits = tables( ud) local n = select( '#', ...) -- Initialize queue for all keys that have been used with ':send()' -- if data[key] == nil then data[key] = fifo_new() end local fifo = data[key] local len = fifo.count local m = limits[key] if m and len+n > m then return false -- would exceed the limit; try again later end fifo_push( fifo, ...) return true end ----- -- [val, key]= receive( linda_deep_ud, key [, ...] ) -- -- Read any of the given keys, consuming the data found. Keys are read in -- order. -- function receive( ud, ...) local data = tables( ud) for i = 1, select( '#', ...) do local key = select( i, ...) local fifo = data[key] if fifo and fifo.count > 0 then local val = fifo_pop( fifo, 1) if val ~= nil then return key, val end end end end ----- -- [val1, ... valCOUNT]= receive_batched( linda_deep_ud, key , min_COUNT, max_COUNT) -- -- Read a single key, consuming the data found. -- receive_batched = function( ud, key, min_count, max_count) if min_count > 0 then local fifo = tables( ud)[key] if fifo then local fifo_count = fifo.count if fifo_count >= min_count then max_count = max_count or min_count max_count = (max_count > fifo_count) and fifo_count or max_count return key, fifo_pop( fifo, max_count) end end end end ----- -- = limit( linda_deep_ud, key, uint ) -- function limit( ud, key, n) local _, limits = tables( ud) limits[key] = n end ----- -- void= set( linda_deep_ud, key, [val] ) -- function set( ud, key, val) local data, _ = tables( ud) -- Setting a key to 'nil' really clears it; only queing uses sentinels. -- if val ~= nil then local fifo = fifo_new() fifo_push( fifo, val) data[key] = fifo else data[key] = nil end end ----- -- [val]= get( linda_deep_ud, key ) -- function get( ud, key) local data, _ = tables( ud) local fifo = data[key] return fifo and fifo_peek( fifo, 1) end ----- -- [val]= count( linda_deep_ud, ...) -- -- 3 modes of operation -- linda:count() -> returns a table of key/count pairs -- linda:count(key) returns the number of items waiting in the key -- linda:count(key,...) -> returns a table telling, for each key, the number of items function count( ud, ...) local data, _ = tables( ud) local n = select( '#', ...) if n == 0 then local out for key, _ in pairs( data) do local fifo = data[key] local count = fifo and fifo.count or 0 out = out or {} out[key] = count found = true end return out elseif n == 1 then local key = ... local fifo = data[key] return fifo and fifo.count or nil else -- more than 1 key local out for i = 1, n do local key = select( i, ...) local fifo = data[key] local count = fifo and fifo.count or nil out = out or {} out[key] = count end return out end end ----- -- void= clear( linda_deep_ud) -- -- Clear the data structures used for a Linda (at its destructor) -- function clear( ud) _data[ud]= nil _limits[ud]= nil end
mit
Zefiros-Software/premake-core
binmodules/luasocket/test/urltest.lua
12
19140
local socket = require("socket") socket.url = require("socket.url") dofile("testsupport.lua") local check_build_url = function(parsed) local built = socket.url.build(parsed) if built ~= parsed.url then print("built is different from expected") print(built) print(expected) os.exit() end end local check_protect = function(parsed, path, unsafe) local built = socket.url.build_path(parsed, unsafe) if built ~= path then print(built, path) print("path composition failed.") os.exit() end end local check_invert = function(url) local parsed = socket.url.parse(url) parsed.path = socket.url.build_path(socket.url.parse_path(parsed.path)) local rebuilt = socket.url.build(parsed) if rebuilt ~= url then print(url, rebuilt) print("original and rebuilt are different") os.exit() end end local check_parse_path = function(path, expect) local parsed = socket.url.parse_path(path) for i = 1, math.max(#parsed, #expect) do if parsed[i] ~= expect[i] then print(path) os.exit() end end if expect.is_directory ~= parsed.is_directory then print(path) print("is_directory mismatch") os.exit() end if expect.is_absolute ~= parsed.is_absolute then print(path) print("is_absolute mismatch") os.exit() end local built = socket.url.build_path(expect) if built ~= path then print(built, path) print("path composition failed.") os.exit() end end local check_absolute_url = function(base, relative, absolute) local res = socket.url.absolute(base, relative) if res ~= absolute then io.write("absolute: In test for '", relative, "' expected '", absolute, "' but got '", res, "'\n") os.exit() end end local check_parse_url = function(gaba) local url = gaba.url gaba.url = nil local parsed = socket.url.parse(url) for i, v in pairs(gaba) do if v ~= parsed[i] then io.write("parse: In test for '", url, "' expected ", i, " = '", v, "' but got '", tostring(parsed[i]), "'\n") for i,v in pairs(parsed) do print(i,v) end os.exit() end end for i, v in pairs(parsed) do if v ~= gaba[i] then io.write("parse: In test for '", url, "' expected ", i, " = '", tostring(gaba[i]), "' but got '", v, "'\n") for i,v in pairs(parsed) do print(i,v) end os.exit() end end end print("testing URL parsing") check_parse_url{ url = "scheme://user:pass$%?#wd@host:port/path;params?query#fragment", scheme = "scheme", authority = "user:pass$%?#wd@host:port", host = "host", port = "port", userinfo = "user:pass$%?#wd", password = "pass$%?#wd", user = "user", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://user:pass?#wd@host:port/path;params?query#fragment", scheme = "scheme", authority = "user:pass?#wd@host:port", host = "host", port = "port", userinfo = "user:pass?#wd", password = "pass?#wd", user = "user", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://user:pass-wd@host:port/path;params?query#fragment", scheme = "scheme", authority = "user:pass-wd@host:port", host = "host", port = "port", userinfo = "user:pass-wd", password = "pass-wd", user = "user", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://user:pass#wd@host:port/path;params?query#fragment", scheme = "scheme", authority = "user:pass#wd@host:port", host = "host", port = "port", userinfo = "user:pass#wd", password = "pass#wd", user = "user", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://user:pass#wd@host:port/path;params?query", scheme = "scheme", authority = "user:pass#wd@host:port", host = "host", port = "port", userinfo = "user:pass#wd", password = "pass#wd", user = "user", path = "/path", params = "params", query = "query", } check_parse_url{ url = "scheme://userinfo@host:port/path;params?query#fragment", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://user:password@host:port/path;params?query#fragment", scheme = "scheme", authority = "user:password@host:port", host = "host", port = "port", userinfo = "user:password", user = "user", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment", } check_parse_url{ url = "scheme://userinfo@host:port/path;params?query#", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "params", query = "query", fragment = "" } check_parse_url{ url = "scheme://userinfo@host:port/path;params?#fragment", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "params", query = "", fragment = "fragment" } check_parse_url{ url = "scheme://userinfo@host:port/path;params#fragment", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "params", fragment = "fragment" } check_parse_url{ url = "scheme://userinfo@host:port/path;?query#fragment", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://userinfo@host:port/path?query#fragment", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://userinfo@host:port/;params?query#fragment", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://userinfo@host:port", scheme = "scheme", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", } check_parse_url{ url = "//userinfo@host:port/path;params?query#fragment", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "//userinfo@host:port/path", authority = "userinfo@host:port", host = "host", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", } check_parse_url{ url = "//userinfo@host/path", authority = "userinfo@host", host = "host", userinfo = "userinfo", user = "userinfo", path = "/path", } check_parse_url{ url = "//user:password@host/path", authority = "user:password@host", host = "host", userinfo = "user:password", password = "password", user = "user", path = "/path", } check_parse_url{ url = "//user:@host/path", authority = "user:@host", host = "host", userinfo = "user:", password = "", user = "user", path = "/path", } check_parse_url{ url = "//user@host:port/path", authority = "user@host:port", host = "host", userinfo = "user", user = "user", port = "port", path = "/path", } check_parse_url{ url = "//host:port/path", authority = "host:port", port = "port", host = "host", path = "/path", } check_parse_url{ url = "//host/path", authority = "host", host = "host", path = "/path", } check_parse_url{ url = "//host", authority = "host", host = "host", } check_parse_url{ url = "/path", path = "/path", } check_parse_url{ url = "path", path = "path", } -- IPv6 tests check_parse_url{ url = "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html", scheme = "http", host = "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", authority = "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80", port = "80", path = "/index.html" } check_parse_url{ url = "http://[1080:0:0:0:8:800:200C:417A]/index.html", scheme = "http", host = "1080:0:0:0:8:800:200C:417A", authority = "[1080:0:0:0:8:800:200C:417A]", path = "/index.html" } check_parse_url{ url = "http://[3ffe:2a00:100:7031::1]", scheme = "http", host = "3ffe:2a00:100:7031::1", authority = "[3ffe:2a00:100:7031::1]", } check_parse_url{ url = "http://[1080::8:800:200C:417A]/foo", scheme = "http", host = "1080::8:800:200C:417A", authority = "[1080::8:800:200C:417A]", path = "/foo" } check_parse_url{ url = "http://[::192.9.5.5]/ipng", scheme = "http", host = "::192.9.5.5", authority = "[::192.9.5.5]", path = "/ipng" } check_parse_url{ url = "http://[::FFFF:129.144.52.38]:80/index.html", scheme = "http", host = "::FFFF:129.144.52.38", port = "80", authority = "[::FFFF:129.144.52.38]:80", path = "/index.html" } check_parse_url{ url = "http://[2010:836B:4179::836B:4179]", scheme = "http", host = "2010:836B:4179::836B:4179", authority = "[2010:836B:4179::836B:4179]", } check_parse_url{ url = "//userinfo@[::FFFF:129.144.52.38]:port/path;params?query#fragment", authority = "userinfo@[::FFFF:129.144.52.38]:port", host = "::FFFF:129.144.52.38", port = "port", userinfo = "userinfo", user = "userinfo", path = "/path", params = "params", query = "query", fragment = "fragment" } check_parse_url{ url = "scheme://user:password@[::192.9.5.5]:port/path;params?query#fragment", scheme = "scheme", authority = "user:password@[::192.9.5.5]:port", host = "::192.9.5.5", port = "port", userinfo = "user:password", user = "user", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment" } print("testing URL building") check_build_url { url = "scheme://user:password@host:port/path;params?query#fragment", scheme = "scheme", host = "host", port = "port", user = "user", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url{ url = "//userinfo@[::FFFF:129.144.52.38]:port/path;params?query#fragment", host = "::FFFF:129.144.52.38", port = "port", user = "userinfo", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url{ url = "scheme://user:password@[::192.9.5.5]:port/path;params?query#fragment", scheme = "scheme", host = "::192.9.5.5", port = "port", user = "user", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://user:password@host/path;params?query#fragment", scheme = "scheme", host = "host", user = "user", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://user@host/path;params?query#fragment", scheme = "scheme", host = "host", user = "user", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://host/path;params?query#fragment", scheme = "scheme", host = "host", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://host/path;params#fragment", scheme = "scheme", host = "host", path = "/path", params = "params", fragment = "fragment" } check_build_url { url = "scheme://host/path#fragment", scheme = "scheme", host = "host", path = "/path", fragment = "fragment" } check_build_url { url = "scheme://host/path", scheme = "scheme", host = "host", path = "/path", } check_build_url { url = "//host/path", host = "host", path = "/path", } check_build_url { url = "/path", path = "/path", } check_build_url { url = "scheme://user:password@host:port/path;params?query#fragment", scheme = "scheme", host = "host", port = "port", user = "user", userinfo = "not used", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://user:password@host:port/path;params?query#fragment", scheme = "scheme", host = "host", port = "port", user = "user", userinfo = "not used", authority = "not used", password = "password", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://user:password@host:port/path;params?query#fragment", scheme = "scheme", host = "host", port = "port", userinfo = "user:password", authority = "not used", path = "/path", params = "params", query = "query", fragment = "fragment" } check_build_url { url = "scheme://user:password@host:port/path;params?query#fragment", scheme = "scheme", authority = "user:password@host:port", path = "/path", params = "params", query = "query", fragment = "fragment" } -- standard RFC tests print("testing absolute resolution") check_absolute_url("http://a/b/c/d;p?q#f", "g:h", "g:h") check_absolute_url("http://a/b/c/d;p?q#f", "g", "http://a/b/c/g") check_absolute_url("http://a/b/c/d;p?q#f", "./g", "http://a/b/c/g") check_absolute_url("http://a/b/c/d;p?q#f", "g/", "http://a/b/c/g/") check_absolute_url("http://a/b/c/d;p?q#f", "/g", "http://a/g") check_absolute_url("http://a/b/c/d;p?q#f", "//g", "http://g") check_absolute_url("http://a/b/c/d;p?q#f", "?y", "http://a/b/c/d;p?y") check_absolute_url("http://a/b/c/d;p?q#f", "g?y", "http://a/b/c/g?y") check_absolute_url("http://a/b/c/d;p?q#f", "g?y/./x", "http://a/b/c/g?y/./x") check_absolute_url("http://a/b/c/d;p?q#f", "#s", "http://a/b/c/d;p?q#s") check_absolute_url("http://a/b/c/d;p?q#f", "g#s", "http://a/b/c/g#s") check_absolute_url("http://a/b/c/d;p?q#f", "g#s/./x", "http://a/b/c/g#s/./x") check_absolute_url("http://a/b/c/d;p?q#f", "g?y#s", "http://a/b/c/g?y#s") check_absolute_url("http://a/b/c/d;p?q#f", ";x", "http://a/b/c/d;x") check_absolute_url("http://a/b/c/d;p?q#f", "g;x", "http://a/b/c/g;x") check_absolute_url("http://a/b/c/d;p?q#f", "g;x?y#s", "http://a/b/c/g;x?y#s") check_absolute_url("http://a/b/c/d;p?q#f", ".", "http://a/b/c/") check_absolute_url("http://a/b/c/d;p?q#f", "./", "http://a/b/c/") check_absolute_url("http://a/b/c/d;p?q#f", "..", "http://a/b/") check_absolute_url("http://a/b/c/d;p?q#f", "../", "http://a/b/") check_absolute_url("http://a/b/c/d;p?q#f", "../g", "http://a/b/g") check_absolute_url("http://a/b/c/d;p?q#f", "../..", "http://a/") check_absolute_url("http://a/b/c/d;p?q#f", "../../", "http://a/") check_absolute_url("http://a/b/c/d;p?q#f", "../../g", "http://a/g") check_absolute_url("http://a/b/c/d;p?q#f", "", "http://a/b/c/d;p?q#f") check_absolute_url("http://a/b/c/d;p?q#f", "/./g", "http://a/./g") check_absolute_url("http://a/b/c/d;p?q#f", "/../g", "http://a/../g") check_absolute_url("http://a/b/c/d;p?q#f", "g.", "http://a/b/c/g.") check_absolute_url("http://a/b/c/d;p?q#f", ".g", "http://a/b/c/.g") check_absolute_url("http://a/b/c/d;p?q#f", "g..", "http://a/b/c/g..") check_absolute_url("http://a/b/c/d;p?q#f", "..g", "http://a/b/c/..g") check_absolute_url("http://a/b/c/d;p?q#f", "./../g", "http://a/b/g") check_absolute_url("http://a/b/c/d;p?q#f", "./g/.", "http://a/b/c/g/") check_absolute_url("http://a/b/c/d;p?q#f", "g/./h", "http://a/b/c/g/h") check_absolute_url("http://a/b/c/d;p?q#f", "g/../h", "http://a/b/c/h") -- extra tests check_absolute_url("//a/b/c/d;p?q#f", "d/e/f", "//a/b/c/d/e/f") check_absolute_url("/a/b/c/d;p?q#f", "d/e/f", "/a/b/c/d/e/f") check_absolute_url("a/b/c/d", "d/e/f", "a/b/c/d/e/f") check_absolute_url("a/b/c/d/../", "d/e/f", "a/b/c/d/e/f") check_absolute_url("http://velox.telemar.com.br", "/dashboard/index.html", "http://velox.telemar.com.br/dashboard/index.html") print("testing path parsing and composition") check_parse_path("/eu/tu/ele", { "eu", "tu", "ele"; is_absolute = 1 }) check_parse_path("/eu/", { "eu"; is_absolute = 1, is_directory = 1 }) check_parse_path("eu/tu/ele/nos/vos/eles/", { "eu", "tu", "ele", "nos", "vos", "eles"; is_directory = 1}) check_parse_path("/", { is_absolute = 1, is_directory = 1}) check_parse_path("", { }) check_parse_path("eu%01/%02tu/e%03l%04e/nos/vos%05/e%12les/", { "eu\1", "\2tu", "e\3l\4e", "nos", "vos\5", "e\18les"; is_directory = 1}) check_parse_path("eu/tu", { "eu", "tu" }) print("testing path protection") check_protect({ "eu", "-_.!~*'():@&=+$,", "tu" }, "eu/-_.!~*'():@&=+$,/tu") check_protect({ "eu ", "~diego" }, "eu%20/~diego") check_protect({ "/eu>", "<diego?" }, "%2Feu%3E/%3Cdiego%3F") check_protect({ "\\eu]", "[diego`" }, "%5Ceu%5D/%5Bdiego%60") check_protect({ "{eu}", "|diego\127" }, "%7Beu%7D/%7Cdiego%7F") check_protect({ "eu ", "~diego" }, "eu /~diego", 1) check_protect({ "/eu>", "<diego?" }, "/eu>/<diego?", 1) check_protect({ "\\eu]", "[diego`" }, "\\eu]/[diego`", 1) check_protect({ "{eu}", "|diego\127" }, "{eu}/|diego\127", 1) print("testing inversion") check_invert("http:") check_invert("a/b/c/d.html") check_invert("//net_loc") check_invert("http:a/b/d/c.html") check_invert("//net_loc/a/b/d/c.html") check_invert("http://net_loc/a/b/d/c.html") check_invert("//who:isit@net_loc") check_invert("http://he:man@boo.bar/a/b/c/i.html;type=moo?this=that#mark") check_invert("/b/c/d#fragment") check_invert("/b/c/d;param#fragment") check_invert("/b/c/d;param?query#fragment") check_invert("/b/c/d?query") check_invert("/b/c/d;param?query") check_invert("http://he:man@[::192.168.1.1]/a/b/c/i.html;type=moo?this=that#mark") print("the library passed all tests")
bsd-3-clause
KingRaptor/Zero-K
units/spherepole.lua
1
4476
unitDef = { unitname = [[spherepole]], name = [[Scythe]], description = [[Cloaked Raider Bot]], acceleration = 0.5, brakeRate = 0.3, buildCostMetal = 250, buildPic = [[spherepole.png]], canAttack = true, canGuard = true, canMove = true, canPatrol = true, canstop = [[1]], category = [[LAND]], collisionVolumeOffsets = [[0 -2 0]], collisionVolumeScales = [[28 36 28]], collisionVolumeType = [[cylY]], cloakCost = 0.2, cloakCostMoving = 1, corpse = [[DEAD]], customParams = { description_de = [[Getarnter Raider Roboter]], description_fr = [[Robot Pilleur]], helptext = [[The Scythe isn't particularly tough in a stand-up fight, but its cloaking device lets it slip past enemy defenses to stab at the enemy's economy. Damaged Scythes can quickly regenerate when out of combat.]], helptext_de = [[Der Scythe ist nicht sehr zäh im Standkampf, aber seine Tarnfähigkeit ermöglicht es ihm hinter die feindliche Verteidigung zu gelangen und so die gegnerische Ökonomie zu beeinträchtigen.]], modelradius = [[14]], }, explodeAs = [[SMALL_UNITEX]], footprintX = 2, footprintZ = 2, iconType = [[stealth]], idleAutoHeal = 20, idleTime = 300, initCloaked = true, leaveTracks = true, maxDamage = 820, maxSlope = 36, maxVelocity = 3, maxWaterDepth = 22, minCloakDistance = 75, movementClass = [[KBOT2]], moveState = 0, noChaseCategory = [[TERRAFORM FIXEDWING SUB]], objectName = [[spherepole.s3o]], script = [[spherepole.lua]], selfDestructAs = [[SMALL_UNITEX]], sfxtypes = { explosiongenerators = { [[custom:emg_shells_l]], [[custom:flashmuzzle1]], }, }, sightDistance = 425, trackOffset = 0, trackStrength = 8, trackStretch = 1, trackType = [[ComTrack]], trackWidth = 18, turnRate = 2200, upright = true, weapons = { { def = [[Blade]], onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER GUNSHIP FIXEDWING]], }, }, weaponDefs = { Blade = { name = [[Blade]], areaOfEffect = 8, beamTime = 0.13, canattackground = true, cegTag = [[orangelaser]], coreThickness = 0.5, craterBoost = 0, craterMult = 0, customParams = { light_camera_height = 500, light_color = [[1 1 0.7]], light_radius = 120, light_beam_start = 0.25, combatrange = 50, }, damage = { default = 200.1, planes = 200, subs = 15, }, explosionGenerator = [[custom:BEAMWEAPON_HIT_ORANGE]], fireStarter = 90, hardStop = false, impactOnly = true, impulseBoost = 0, impulseFactor = 0.4, interceptedByShieldType = 0, lodDistance = 10000, minIntensity = 1, noSelfDamage = true, range = 100, reloadtime = 1.4, rgbColor = [[1 0.25 0]], soundStart = [[BladeSwing]], targetborder = 1, thickness = 0, tolerance = 10000, turret = true, waterweapon = true, weaponType = [[BeamLaser]], weaponVelocity = 2000, }, }, featureDefs = { DEAD = { blocking = false, featureDead = [[HEAP]], footprintX = 2, footprintZ = 2, object = [[scythe_d.dae]], }, HEAP = { blocking = false, footprintX = 2, footprintZ = 2, object = [[debris2x2b.s3o]], }, }, } return lowerkeys({ spherepole = unitDef })
gpl-2.0
DailyShana/ygopro-scripts
c97342942.lua
7
1338
--エクトプラズマー function c97342942.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --release local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(97342942,0)) e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_BOTH_SIDE) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) e2:SetCondition(c97342942.condition) e2:SetTarget(c97342942.target) e2:SetOperation(c97342942.operation) c:RegisterEffect(e2) end function c97342942.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp end function c97342942.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) end function c97342942.rfilter(c,e) return c:IsFaceup() and c:IsReleasableByEffect() and not c:IsImmuneToEffect(e) end function c97342942.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local rg=Duel.SelectReleaseGroup(tp,c97342942.rfilter,1,1,e:GetHandler(),e) if Duel.Release(rg,REASON_EFFECT)>0 then local atk=rg:GetFirst():GetBaseAttack()/2 Duel.Damage(1-tp,atk,REASON_EFFECT) end end
gpl-2.0
Whitechaser/darkstar
scripts/zones/Windurst_Woods/npcs/Rakoh_Buuma.lua
5
2615
----------------------------------- -- Area: Windurst Woods -- NPC: Rakoh Buuma -- Starts Windurst Missions -- !pos 106 -5 -23 241 ----------------------------------- package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = nil; package.loaded["scripts/globals/missions"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/titles"); require("scripts/globals/keyitems"); require("scripts/globals/missions"); require("scripts/zones/Windurst_Woods/TextIDs"); ----------------------------------- function onTrigger(player,npc) if (player:getNation() ~= NATION_WINDURST) then player:startEvent(105); -- for other nation else CurrentMission = player:getCurrentMission(WINDURST); MissionStatus = player:getVar("MissionStatus"); pRank = player:getRank(); cs, p, offset = getMissionOffset(player,1,CurrentMission,MissionStatus); if (CurrentMission <= 15 and (cs ~= 0 or offset ~= 0 or (CurrentMission == 0 and offset == 0))) then if (cs == 0) then player:showText(npc,ORIGINAL_MISSION_OFFSET + offset); -- dialog after accepting mission else player:startEvent(cs,p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8]); end elseif (CurrentMission ~= 255) then player:startEvent(112); elseif (player:hasCompletedMission(WINDURST,THE_HORUTOTO_RUINS_EXPERIMENT) == false) then player:startEvent(121); elseif (player:hasCompletedMission(WINDURST,THE_HEART_OF_THE_MATTER) == false) then player:startEvent(132); elseif (player:hasCompletedMission(WINDURST,THE_PRICE_OF_PEACE) == false) then player:startEvent(149); elseif (player:hasKeyItem(MESSAGE_TO_JEUNO_WINDURST)) then player:startEvent(197); else flagMission, repeatMission = getMissionMask(player); player:startEvent(114,flagMission,0,0,0,STAR_CRESTED_SUMMONS,repeatMission); end end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); finishMissionTimeline(player,1,csid,option); if (csid == 121 and option == 1) then player:addTitle(NEW_BUUMAS_BOOMERS_RECRUIT); elseif (csid == 114 and (option == 12 or option == 15)) then player:addKeyItem(STAR_CRESTED_SUMMONS); player:messageSpecial(KEYITEM_OBTAINED,STAR_CRESTED_SUMMONS); end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/naboo/mauler.lua
1
1062
mauler = Creature:new { objectName = "@mob/creature_names:mauler", socialGroup = "mauler", faction = "", level = 16, chanceHit = 0.310000, damageMin = 160, damageMax = 170, baseXp = 1102, baseHAM = 3500, baseHAMmax = 4300, armor = 0, resists = {10,0,15,-1,-1,-1,-1,-1,-1}, meatType = "", meatAmount = 0, hideType = "", hideAmount = 0, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0.000000, ferocity = 0, pvpBitmask = ATTACKABLE + AGGRESSIVE + ENEMY, creatureBitmask = PACK + KILLER + STALKER, diet = HERBIVORE, templates = {"object/mobile/dressed_mauler.iff"}, lootGroups = { { groups = { {group = "junk", chance = 4000000}, {group = "tailor_components", chance = 1000000}, {group = "loot_kit_parts", chance = 2000000}, {group = "carbines", chance = 1000000}, {group = "mauler_common", chance = 2000000} } } }, weapons = {"pirate_weapons_medium"}, reactionStf = "@npc_reaction/fancy", attacks = merge(brawlermaster,marksmanmaster) } CreatureTemplates:addCreatureTemplate(mauler, "mauler")
agpl-3.0
Zefiros-Software/premake-core
tests/api/test_boolean_kind.lua
16
1312
-- -- tests/api/test_boolean_kind.lua -- Tests the boolean API value type. -- Copyright (c) 2014 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("api_boolean_kind") local api = p.api -- -- Setup and teardown -- function suite.setup() api.register { name = "testapi", kind = "boolean", scope = "project", } test.createWorkspace() end function suite.teardown() testapi = nil end -- -- Check setting of true values. -- function suite.setsTrue_onYes() testapi "yes" test.istrue(api.scope.project.testapi) end function suite.setsTrue_onBooleanTrue() testapi (true) test.istrue(api.scope.project.testapi) end function suite.setsTrue_onNonZero() testapi (1) test.istrue(api.scope.project.testapi) end -- -- Check setting of false values. -- function suite.setsFalse_onNo() testapi "no" test.isfalse(api.scope.project.testapi) end function suite.setsFalse_onBooleanFalse() testapi (false) test.isfalse(api.scope.project.testapi) end function suite.setsFalse_onZero() testapi (0) test.isfalse(api.scope.project.testapi) end -- -- Raise an error on an invalid string value. -- function suite.raisesError_onDisallowedValue() ok, err = pcall(function () testapi "maybe" end) test.isfalse(ok) end
bsd-3-clause
KingRaptor/Zero-K
gamedata/explosions_post.lua
17
1247
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- Load CA's effects from ./effects and not ./gamedata/explosions -- local luaFiles = VFS.DirList('effects', '*.lua', '*.tdf') --couldn't be arsed to convert to lua since there is no real benefit for CEG's -Zement/DOT for _, filename in ipairs(luaFiles) do local edEnv = {} edEnv._G = edEnv edEnv.Shared = Shared edEnv.GetFilename = function() return filename end setmetatable(edEnv, { __index = system }) local success, eds = pcall(VFS.Include, filename, edEnv) if (not success) then Spring.Log("explosions_post.lua", "error", 'Error parsing ' .. filename .. ': ' .. eds) elseif (eds == nil) then Spring.Log("explosions_post.lua", "error", 'Missing return table from: ' .. filename) else for edName, ed in pairs(eds) do if ((type(edName) == 'string') and (type(ed) == 'table')) then ed.filename = filename ExplosionDefs[edName] = ed end end end end -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/loot/tool/impulse_detector_broken_s3.lua
3
2268
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_loot_tool_impulse_detector_broken_s3 = object_tangible_loot_tool_shared_impulse_detector_broken_s3:new { } ObjectTemplates:addTemplate(object_tangible_loot_tool_impulse_detector_broken_s3, "object/tangible/loot/tool/impulse_detector_broken_s3.iff")
agpl-3.0
DailyShana/ygopro-scripts
c26834022.lua
3
1317
--ディザーム function c26834022.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(c26834022.condition) e1:SetTarget(c26834022.target) e1:SetOperation(c26834022.activate) c:RegisterEffect(e1) end function c26834022.filter(c) return c:IsSetCard(0x19) and c:IsAbleToDeck() end function c26834022.condition(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) end function c26834022.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c26834022.filter,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end end function c26834022.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,c26834022.filter,tp,LOCATION_HAND,0,1,1,nil) if g:GetCount()==0 then return end Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.NegateActivation(ev) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end
gpl-2.0
Whitechaser/darkstar
scripts/zones/Dynamis-Xarcabard/mobs/Vanguard_Eye.lua
5
2494
----------------------------------- -- Area: Dynamis Xarcabard -- NPC: Vanguard_Eye -- Map Position: http://images.wikia.com/ffxi/images/c/cc/Xar.jpg ----------------------------------- require("scripts/globals/status"); require("scripts/globals/dynamis"); ----------------------------------- function onMobInitialize(mob,target) end; function onMobSpawn(mob) mob:setMobMod(MOBMOD_SUPERLINK, mob:getShortID()); end; function onMobEngaged(mob,target) dynamis.spawnGroup(mob, xarcabardList, 1); end; function onMobDeath(mob, player, isKiller) end; function onMobDespawn(mob) local mobID = mob:getID(); -- 035 039: spawn 043 when defeated if (mobID == 17330718 or mobID == 17330756) then local southTE = GetServerVariable("[DynaXarcabard]TE43_Trigger"); local mobOffset = 0; if (mobID == 17330756) then -- since the mobIDs aren't sequential there isn't an easy way to handle them outside of ID checks... mobOffset = 1; end if (bit.band(southTE, bit.lshift(1, mobOffset)) == 0) then southTE = bit.bor(southTE, bit.lshift(1, mobOffset)); if (southTE == 3) then SpawnMob(17330814); -- 43 southTE = 0; end SetServerVariable("[DynaXarcabard]TE43_Trigger", southTE); end -- 057-059: spawn 60 when defeated elseif (mobID >= 17330827 and mobID <= 17330829) then local northTE = GetServerVariable("[DynaXarcabard]TE60_Trigger"); if (bit.band(northTE, bit.lshift(1, (mobID - 17330827))) == 0) then northTE = bit.bor(northTE, bit.lshift(1, (mobID - 17330827))); if (northTE == 7) then SpawnMob(17330830); -- 60 northTE = 0; end SetServerVariable("[DynaXarcabard]TE60_Trigger", northTE); end -- 114: spawn 112 when defeated elseif (mobID == 17326790) then SpawnMob(17326086); -- 144-149: spawn 150 when defeated elseif (mobID >= 17330913 and mobID <= 17330918) then local wallTE = GetServerVariable("[DynaXarcabard]TE150_Trigger"); if (bit.band(wallTE, bit.lshift(1, (mobID - 17330913))) == 0) then wallTE = bit.bor(wallTE, bit.lshift(1, (mobID - 17330913))); if (wallTE == 63) then SpawnMob(17330919); -- 150 wallTE = 0; end SetServerVariable("[DynaXarcabard]TE150_Trigger", wallTE); end end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/lair/npc_theater/dantooine_abandoned_rebel_camp_rebel_small_theater.lua
3
1242
dantooine_abandoned_rebel_camp_rebel_small_theater = Lair:new { mobiles = {{"abandoned_rebel_private",1},{"stranded_rebel_scout",1}}, spawnLimit = 15, buildingsVeryEasy = {"object/building/poi/anywhere_rebel_camp_small_1.iff","object/building/poi/anywhere_rebel_camp_small_2.iff","object/building/poi/anywhere_rebel_camp_small_3.iff"}, buildingsEasy = {"object/building/poi/anywhere_rebel_camp_small_1.iff","object/building/poi/anywhere_rebel_camp_small_2.iff","object/building/poi/anywhere_rebel_camp_small_3.iff"}, buildingsMedium = {"object/building/poi/anywhere_rebel_camp_small_1.iff","object/building/poi/anywhere_rebel_camp_small_2.iff","object/building/poi/anywhere_rebel_camp_small_3.iff"}, buildingsHard = {"object/building/poi/anywhere_rebel_camp_small_1.iff","object/building/poi/anywhere_rebel_camp_small_2.iff","object/building/poi/anywhere_rebel_camp_small_3.iff"}, buildingsVeryHard = {"object/building/poi/anywhere_rebel_camp_small_1.iff","object/building/poi/anywhere_rebel_camp_small_2.iff","object/building/poi/anywhere_rebel_camp_small_3.iff"}, mobType = "npc", buildingType = "theater" } addLairTemplate("dantooine_abandoned_rebel_camp_rebel_small_theater", dantooine_abandoned_rebel_camp_rebel_small_theater)
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/wearables/backpack/backpack_s04.lua
3
3598
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_wearables_backpack_backpack_s04 = object_tangible_wearables_backpack_shared_backpack_s04:new { playerRaces = { "object/creature/player/bothan_male.iff", "object/creature/player/bothan_female.iff", "object/creature/player/human_male.iff", "object/creature/player/human_female.iff", "object/creature/player/ithorian_male.iff", "object/creature/player/ithorian_female.iff", "object/creature/player/moncal_male.iff", "object/creature/player/moncal_female.iff", "object/creature/player/rodian_male.iff", "object/creature/player/rodian_female.iff", "object/creature/player/sullustan_male.iff", "object/creature/player/sullustan_female.iff", "object/creature/player/trandoshan_male.iff", "object/creature/player/trandoshan_female.iff", "object/creature/player/twilek_male.iff", "object/creature/player/twilek_female.iff", "object/creature/player/wookiee_male.iff", "object/creature/player/wookiee_female.iff", "object/creature/player/zabrak_male.iff", "object/creature/player/zabrak_female.iff" }, numberExperimentalProperties = {1, 1, 1}, experimentalProperties = {"XX", "XX", "XX"}, experimentalWeights = {1, 1, 1}, experimentalGroupTitles = {"null", "null", "null"}, experimentalSubGroupTitles = {"null", "null", "hitpoints"}, experimentalMin = {0, 0, 1000}, experimentalMax = {0, 0, 1000}, experimentalPrecision = {0, 0, 0}, experimentalCombineType = {0, 0, 4}, } ObjectTemplates:addTemplate(object_tangible_wearables_backpack_backpack_s04, "object/tangible/wearables/backpack/backpack_s04.iff")
agpl-3.0
pars69/source-en-fa
plugins/plugins.lua
5
6499
do -- Returns the key (index) in the config.enabled_plugins table local function plugin_enabled( name ) for k,v in pairs(_config.enabled_plugins) do if name == v then return k end end -- If not found return false end -- Returns true if file exists in plugins folder local function plugin_exists( name ) for k,v in pairs(plugins_names()) do if name..'.lua' == v then return true end end return false end local function list_all_plugins(only_enabled) local tmp = '\n\n@BeyondTeam' local text = '' local nsum = 0 for k, v in pairs( plugins_names( )) do -- ✔ enabled, ❌ disabled local status = '*|✖️|*>*' nsum = nsum+1 nact = 0 -- Check if is enabled for k2, v2 in pairs(_config.enabled_plugins) do if v == v2..'.lua' then status = '*|✔|>*' end nact = nact+1 end if not only_enabled or status == '*|✔|>*'then -- get the name v = string.match (v, "(.*)%.lua") text = text..nsum..'.'..status..' '..v..' \n' end end local text = text..'\n\n'..nsum..' *📂plugins installed*\n\n'..nact..' _✔️plugins enabled_\n\n'..nsum-nact..' _❌plugins disabled_'..tmp return text end local function list_plugins(only_enabled) local text = '' local nsum = 0 for k, v in pairs( plugins_names( )) do -- ✔ enabled, ❌ disabled local status = '*|✖️|>*' nsum = nsum+1 nact = 0 -- Check if is enabled for k2, v2 in pairs(_config.enabled_plugins) do if v == v2..'.lua' then status = '*|✔|>*' end nact = nact+1 end if not only_enabled or status == '*|✔|>*'then -- get the name v = string.match (v, "(.*)%.lua") -- text = text..v..' '..status..'\n' end end local text = text.."\n_🔃All Plugins Reloaded_\n\n"..nact.." *✔️Plugins Enabled*\n"..nsum.." *📂Plugins Installed*\n\n@BeyondTeam" return text end local function reload_plugins( ) plugins = {} load_plugins() return list_plugins(true) end local function enable_plugin( plugin_name ) print('checking if '..plugin_name..' exists') -- Check if plugin is enabled if plugin_enabled(plugin_name) then return ''..plugin_name..' _is enabled_' end -- Checks if plugin exists if plugin_exists(plugin_name) then -- Add to the config table table.insert(_config.enabled_plugins, plugin_name) print(plugin_name..' added to _config table') save_config() -- Reload the plugins return reload_plugins( ) else return ''..plugin_name..' _does not exists_' end end local function disable_plugin( name, chat ) -- Check if plugins exists if not plugin_exists(name) then return ' '..name..' _does not exists_' end local k = plugin_enabled(name) -- Check if plugin is enabled if not k then return ' '..name..' _not enabled_' end -- Disable and reload table.remove(_config.enabled_plugins, k) save_config( ) return reload_plugins(true) end local function disable_plugin_on_chat(receiver, plugin) if not plugin_exists(plugin) then return "_Plugin doesn't exists_" end if not _config.disabled_plugin_on_chat then _config.disabled_plugin_on_chat = {} end if not _config.disabled_plugin_on_chat[receiver] then _config.disabled_plugin_on_chat[receiver] = {} end _config.disabled_plugin_on_chat[receiver][plugin] = true save_config() return ' '..plugin..' _disabled on this chat_' end local function reenable_plugin_on_chat(receiver, plugin) if not _config.disabled_plugin_on_chat then return 'There aren\'t any disabled plugins' end if not _config.disabled_plugin_on_chat[receiver] then return 'There aren\'t any disabled plugins for this chat' end if not _config.disabled_plugin_on_chat[receiver][plugin] then return '_This plugin is not disabled_' end _config.disabled_plugin_on_chat[receiver][plugin] = false save_config() return ' '..plugin..' is enabled again' end local function run(msg, matches) -- Show the available plugins if is_sudo(msg) then if matches[1]:lower() == '!plist' or matches[1]:lower() == '/plist' or matches[1]:lower() == '#plist' then --after changed to moderator mode, set only sudo return list_all_plugins() end end -- Re-enable a plugin for this chat if matches[1] == 'pl' then if matches[2] == '+' and matches[4] == 'chat' then if is_momod(msg) then local receiver = msg.chat_id_ local plugin = matches[3] print("enable "..plugin..' on this chat') return reenable_plugin_on_chat(receiver, plugin) end end -- Enable a plugin if matches[2] == '+' and is_sudo(msg) then --after changed to moderator mode, set only sudo if is_mod(msg) then local plugin_name = matches[3] print("enable: "..matches[3]) return enable_plugin(plugin_name) end end -- Disable a plugin on a chat if matches[2] == '-' and matches[4] == 'chat' then if is_mod(msg) then local plugin = matches[3] local receiver = msg.chat_id_ print("disable "..plugin..' on this chat') return disable_plugin_on_chat(receiver, plugin) end end -- Disable a plugin if matches[2] == '-' and is_sudo(msg) then --after changed to moderator mode, set only sudo if matches[3] == 'plugins' then return 'This plugin can\'t be disabled' end print("disable: "..matches[3]) return disable_plugin(matches[3]) end end -- Reload all the plugins! if matches[1] == '*' and is_sudo(msg) then --after changed to moderator mode, set only sudo return reload_plugins(true) end if matches[1]:lower() == 'reload' and is_sudo(msg) then --after changed to moderator mode, set only sudo return reload_plugins(true) end end return { description = "Plugin to manage other plugins. Enable, disable or reload.", usage = { moderator = { "!plug disable [plugin] chat : disable plugin only this chat.", "!plug enable [plugin] chat : enable plugin only this chat.", }, sudo = { "!plist : list all plugins.", "!pl + [plugin] : enable plugin.", "!pl - [plugin] : disable plugin.", "!pl * : reloads all plugins." }, }, patterns = { "^[!/#]plist$", "^[!/#](pl) (+) ([%w_%.%-]+)$", "^[!/#](pl) (-) ([%w_%.%-]+)$", "^[!/#](pl) (+) ([%w_%.%-]+) (chat)", "^[!/#](pl) (-) ([%w_%.%-]+) (chat)", "^!pl? (*)$", "^[!/](reload)$" }, run = run } end
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_hooligan_rodian_male_01.lua
3
2240
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_hooligan_rodian_male_01 = object_mobile_shared_dressed_hooligan_rodian_male_01:new { } ObjectTemplates:addTemplate(object_mobile_dressed_hooligan_rodian_male_01, "object/mobile/dressed_hooligan_rodian_male_01.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/terrain/objects.lua
165
2016
--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.
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/container/objects.lua
165
2016
--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.
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/destructible/objects.lua
165
2016
--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.
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/faction_perk/objects.lua
165
2016
--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.
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/objects.lua
165
2016
--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.
agpl-3.0
DailyShana/ygopro-scripts
c52198054.lua
5
4026
--ブレイズ・キャノン・マガジン function c52198054.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c52198054.target1) e1:SetOperation(c52198054.operation) e1:SetHintTiming(0,TIMING_MAIN_END) c:RegisterEffect(e1) --tograve local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,52198054) e2:SetCondition(c52198054.condition) e2:SetCost(c52198054.cost) e2:SetTarget(c52198054.target2) e2:SetOperation(c52198054.operation) e2:SetHintTiming(0,TIMING_MAIN_END) e2:SetLabel(1) c:RegisterEffect(e2) --change local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetCode(EFFECT_CHANGE_CODE) e3:SetRange(LOCATION_SZONE) e3:SetValue(21420702) c:RegisterEffect(e3) --tograve local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(52198054,1)) e4:SetCategory(CATEGORY_TOGRAVE) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_GRAVE) e4:SetCondition(c52198054.condition) e4:SetCost(c52198054.tgcost) e4:SetTarget(c52198054.tgtg) e4:SetOperation(c52198054.tgop) e4:SetHintTiming(0,TIMING_MAIN_END) c:RegisterEffect(e4) end function c52198054.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetFlagEffect(tp,52198054)==0 and Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x32) and Duel.SelectYesNo(tp,aux.Stringid(52198054,0)) then e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) Duel.RegisterFlagEffect(tp,52198054,RESET_PHASE+PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) e:SetLabel(1) e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(52198054,2)) else e:SetCategory(0) e:SetProperty(0) e:SetLabel(0) end end function c52198054.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end function c52198054.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,52198054)==0 end Duel.RegisterFlagEffect(tp,52198054,RESET_PHASE+PHASE_END,0,1) end function c52198054.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x32) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c52198054.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x32) if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,1,REASON_EFFECT) end end function c52198054.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function c52198054.tgfilter(c) return c:IsSetCard(0x32) and c:IsAbleToGrave() end function c52198054.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c52198054.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c52198054.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c52198054.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/bio_engineer/bio_component/bio_component_clothing_field_cover.lua
2
3421
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_bio_engineer_bio_component_bio_component_clothing_field_cover = object_draft_schematic_bio_engineer_bio_component_shared_bio_component_clothing_field_cover:new { templateType = DRAFTSCHEMATIC, customObjectName = "Visual Camouflage", craftingToolTab = 128, -- (See DraftSchemticImplementation.h) complexity = 22, size = 1, xpType = "crafting_bio_engineer_creature", xp = 120, assemblySkill = "bio_engineer_assembly", experimentingSkill = "bio_engineer_experimentation", customizationSkill = "bio_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_tissue_ingredients_n", "craft_tissue_ingredients_n", "craft_tissue_ingredients_n"}, ingredientTitleNames = {"protein_base", "suspension_compound", "light_reactive_chemicals"}, ingredientSlotType = {0, 0, 0}, resourceTypes = {"creature_food", "flora_structural", "meat_reptillian"}, resourceQuantities = {20, 20, 20}, contribution = {100, 100, 100}, targetTemplate = "object/tangible/component/bio/bio_component_clothing_field_cover.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_bio_engineer_bio_component_bio_component_clothing_field_cover, "object/draft_schematic/bio_engineer/bio_component/bio_component_clothing_field_cover.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/components/booster/serverobjects.lua
3
12736
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --Children folder includes -- Server Objects includeFile("tangible/ship/components/booster/booster_test.lua") includeFile("tangible/ship/components/booster/bst_corellian_advanced_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_elite_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_experimental_tjh3.lua") includeFile("tangible/ship/components/booster/bst_corellian_heavy_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_highly_modified_elite_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_performance_advanced_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_promotional_standard_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_standard_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_corellian_tjh3.lua") includeFile("tangible/ship/components/booster/bst_corellian_tuned_heavy_thrust_enhancer.lua") includeFile("tangible/ship/components/booster/bst_cygnus_flashboost3.lua") includeFile("tangible/ship/components/booster/bst_cygnus_flashboost4.lua") includeFile("tangible/ship/components/booster/bst_freitek_outrunner_x1.lua") includeFile("tangible/ship/components/booster/bst_gallofree_light.lua") includeFile("tangible/ship/components/booster/bst_generic.lua") includeFile("tangible/ship/components/booster/bst_incom_deluxe_fynock.lua") includeFile("tangible/ship/components/booster/bst_incom_elite_sls_1.lua") includeFile("tangible/ship/components/booster/bst_incom_enhanced_mynock.lua") includeFile("tangible/ship/components/booster/bst_incom_fynock.lua") includeFile("tangible/ship/components/booster/bst_incom_intimidator_mk1.lua") includeFile("tangible/ship/components/booster/bst_incom_intimidator_mk2.lua") includeFile("tangible/ship/components/booster/bst_incom_intimidator_mk3.lua") includeFile("tangible/ship/components/booster/bst_incom_intimidator_mk4.lua") includeFile("tangible/ship/components/booster/bst_incom_mynock.lua") includeFile("tangible/ship/components/booster/bst_incom_nkj31.lua") includeFile("tangible/ship/components/booster/bst_incom_performance_nkj31.lua") includeFile("tangible/ship/components/booster/bst_incom_sls_1.lua") includeFile("tangible/ship/components/booster/bst_incom_supercharged_vynock.lua") includeFile("tangible/ship/components/booster/bst_incom_vynock.lua") includeFile("tangible/ship/components/booster/bst_kde_br12.lua") includeFile("tangible/ship/components/booster/bst_kessel_imperial_cygnus_hyperthrust.lua") includeFile("tangible/ship/components/booster/bst_kessel_imperial_sds_experimental_b7.lua") includeFile("tangible/ship/components/booster/bst_kessel_imperial_sfs_ultra_thrust.lua") includeFile("tangible/ship/components/booster/bst_kessel_rebel_incom_quicksilver.lua") includeFile("tangible/ship/components/booster/bst_kessel_rebel_incom_windrunner.lua") includeFile("tangible/ship/components/booster/bst_kessel_rebel_mandal_lightning_m1.lua") includeFile("tangible/ship/components/booster/bst_koensayr_advanced.lua") includeFile("tangible/ship/components/booster/bst_koensayr_charged_advanced.lua") includeFile("tangible/ship/components/booster/bst_koensayr_deluxe_elite.lua") includeFile("tangible/ship/components/booster/bst_koensayr_elite.lua") includeFile("tangible/ship/components/booster/bst_koensayr_evh12.lua") includeFile("tangible/ship/components/booster/bst_koensayr_heavy.lua") includeFile("tangible/ship/components/booster/bst_koensayr_improved_standard.lua") includeFile("tangible/ship/components/booster/bst_koensayr_modified_heavy.lua") includeFile("tangible/ship/components/booster/bst_koensayr_racer_mk1.lua") includeFile("tangible/ship/components/booster/bst_koensayr_racer_mk2.lua") includeFile("tangible/ship/components/booster/bst_koensayr_racer_mk3.lua") includeFile("tangible/ship/components/booster/bst_koensayr_racer_mk4.lua") includeFile("tangible/ship/components/booster/bst_koensayr_special_evh12.lua") includeFile("tangible/ship/components/booster/bst_koensayr_standard.lua") includeFile("tangible/ship/components/booster/bst_kse_als_1.lua") includeFile("tangible/ship/components/booster/bst_kse_bti1.lua") includeFile("tangible/ship/components/booster/bst_kse_bti2.lua") includeFile("tangible/ship/components/booster/bst_kse_bti3.lua") includeFile("tangible/ship/components/booster/bst_kse_cb6.lua") includeFile("tangible/ship/components/booster/bst_kse_deluxe_bti3.lua") includeFile("tangible/ship/components/booster/bst_kse_elite_als_1.lua") includeFile("tangible/ship/components/booster/bst_kse_enhanced_bti2.lua") includeFile("tangible/ship/components/booster/bst_kse_performance_bti1.lua") includeFile("tangible/ship/components/booster/bst_kse_performance_cb6.lua") includeFile("tangible/ship/components/booster/bst_kuat_military_mk1.lua") includeFile("tangible/ship/components/booster/bst_kuat_military_mk2.lua") includeFile("tangible/ship/components/booster/bst_kuat_military_mk3.lua") includeFile("tangible/ship/components/booster/bst_kuat_military_mk4.lua") includeFile("tangible/ship/components/booster/bst_mandal_deluxe_jbj_mk4.lua") includeFile("tangible/ship/components/booster/bst_mandal_enhanced_jbj_mk1.lua") includeFile("tangible/ship/components/booster/bst_mandal_improved_jbj_mk3.lua") includeFile("tangible/ship/components/booster/bst_mandal_jbj_mk1.lua") includeFile("tangible/ship/components/booster/bst_mandal_jbj_mk2.lua") includeFile("tangible/ship/components/booster/bst_mandal_jbj_mk3.lua") includeFile("tangible/ship/components/booster/bst_mandal_jbj_mk4.lua") includeFile("tangible/ship/components/booster/bst_mandal_jbj_mk5.lua") includeFile("tangible/ship/components/booster/bst_mandal_limited_jbj_mk5.lua") includeFile("tangible/ship/components/booster/bst_mandal_modified_jbj_mk2.lua") includeFile("tangible/ship/components/booster/bst_mission_reward_imperial_rss_ion_booster.lua") includeFile("tangible/ship/components/booster/bst_mission_reward_neutral_mandal_m_series.lua") includeFile("tangible/ship/components/booster/bst_mission_reward_neutral_mandal_q_series.lua") includeFile("tangible/ship/components/booster/bst_mission_reward_rebel_novaldex_hypernova.lua") includeFile("tangible/ship/components/booster/bst_mission_reward_rebel_qualdex_halcyon.lua") includeFile("tangible/ship/components/booster/bst_moncal_advanced.lua") includeFile("tangible/ship/components/booster/bst_moncal_charged_heavy.lua") includeFile("tangible/ship/components/booster/bst_moncal_deluxe_standard.lua") includeFile("tangible/ship/components/booster/bst_moncal_elite.lua") includeFile("tangible/ship/components/booster/bst_moncal_enhanced_elite.lua") includeFile("tangible/ship/components/booster/bst_moncal_heavy.lua") includeFile("tangible/ship/components/booster/bst_moncal_jlc37.lua") includeFile("tangible/ship/components/booster/bst_moncal_limited_jlc37.lua") includeFile("tangible/ship/components/booster/bst_moncal_rare_advanced.lua") includeFile("tangible/ship/components/booster/bst_moncal_standard.lua") includeFile("tangible/ship/components/booster/bst_novaldex_pulsar.lua") includeFile("tangible/ship/components/booster/bst_novaldex_pulsar_advanced.lua") includeFile("tangible/ship/components/booster/bst_novaldex_quasar.lua") includeFile("tangible/ship/components/booster/bst_novaldex_quasar_advanced.lua") includeFile("tangible/ship/components/booster/bst_qualdex_xboost_mk1.lua") includeFile("tangible/ship/components/booster/bst_qualdex_xboost_mk2.lua") includeFile("tangible/ship/components/booster/bst_qualdex_xboost_mk3.lua") includeFile("tangible/ship/components/booster/bst_qualdex_xboost_mk4.lua") includeFile("tangible/ship/components/booster/bst_reward_incom_elite.lua") includeFile("tangible/ship/components/booster/bst_reward_koensayr_elite.lua") includeFile("tangible/ship/components/booster/bst_reward_kuat_elite.lua") includeFile("tangible/ship/components/booster/bst_reward_novaldex_elite.lua") includeFile("tangible/ship/components/booster/bst_reward_qualdex_elite.lua") includeFile("tangible/ship/components/booster/bst_rss_special.lua") includeFile("tangible/ship/components/booster/bst_sap_imperial_1.lua") includeFile("tangible/ship/components/booster/bst_sap_imperial_2.lua") includeFile("tangible/ship/components/booster/bst_sds_enhanced_imperial_2.lua") includeFile("tangible/ship/components/booster/bst_sfs_imperial_1.lua") includeFile("tangible/ship/components/booster/bst_sfs_imperial_2.lua") includeFile("tangible/ship/components/booster/bst_slayn_ion_booster_mk1.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_enhanced_liberator_mk4.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_improved_liberator_mk2.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_liberator_mk1.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_liberator_mk2.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_liberator_mk3.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_liberator_mk4.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_liberator_mk5.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_prized_liberator_mk1.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_supercharged_liberator_mk3.lua") includeFile("tangible/ship/components/booster/bst_sorosuub_well_tuned_liberator_mk5.lua") includeFile("tangible/ship/components/booster/bst_subpro_accelatron_mk1.lua") includeFile("tangible/ship/components/booster/bst_subpro_accelatron_mk2.lua") includeFile("tangible/ship/components/booster/bst_subpro_accelatron_mk3.lua") includeFile("tangible/ship/components/booster/bst_subpro_accelatron_mk4.lua") includeFile("tangible/ship/components/booster/bst_subpro_accelatron_mk5.lua") includeFile("tangible/ship/components/booster/bst_subpro_deluxe_accelatron_mk3.lua") includeFile("tangible/ship/components/booster/bst_subpro_elite_accelatron_mk5.lua") includeFile("tangible/ship/components/booster/bst_subpro_enhanced_accelatron_mk2.lua") includeFile("tangible/ship/components/booster/bst_subpro_modified_accelatron_mk4.lua") includeFile("tangible/ship/components/booster/bst_subpro_tuned_accelatron_mk1.lua") includeFile("tangible/ship/components/booster/bst_surronian_accelerator_mk1.lua") includeFile("tangible/ship/components/booster/bst_surronian_accelerator_mk2.lua") includeFile("tangible/ship/components/booster/bst_surronian_nomad_x4.lua") includeFile("tangible/ship/components/booster/bst_surronian_nomad_x8.lua") includeFile("tangible/ship/components/booster/bst_tiefighter_basic.lua") includeFile("tangible/ship/components/booster/bst_z95_basic.lua") includeFile("tangible/ship/components/booster/xwing_booster_test.lua")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/item/item_kitchen_pot_style_01.lua
3
2236
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_item_item_kitchen_pot_style_01 = object_static_item_shared_item_kitchen_pot_style_01:new { } ObjectTemplates:addTemplate(object_static_item_item_kitchen_pot_style_01, "object/static/item/item_kitchen_pot_style_01.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Misareaux_Coast/Zone.lua
5
1066
----------------------------------- -- -- Zone: Misareaux_Coast (25) -- ----------------------------------- package.loaded["scripts/zones/Misareaux_Coast/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/zones/Misareaux_Coast/TextIDs"); ----------------------------------- function onInitialize(zone) end; function onConquestUpdate(zone, updatetype) local players = zone:getPlayers(); for name, player in pairs(players) do conquestUpdate(zone, player, updatetype, CONQUEST_BASE); end end; function onZoneIn(player,prevZone) local cs = -1; if (player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0) then player:setPos(567.624,-20,280.775,120); end return cs; end; function onRegionEnter(player,region) end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end;
gpl-3.0
Whitechaser/darkstar
scripts/zones/Port_Jeuno/npcs/Narsha.lua
1
1394
----------------------------------- -- Area: Port Jeuno -- NPC: Narsha -- Type: Chocobo Renter ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/keyitems"); require("scripts/globals/chocobo"); require("scripts/globals/status"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) local level = player:getMainLvl(); local gil = player:getGil(); if (player:hasKeyItem(CHOCOBO_LICENSE) and level >= 20) then local price = getChocoboPrice(player); player:setLocalVar("chocoboPriceOffer",price); player:startEvent(10003,price,gil); else player:startEvent(10006); end end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); local price = player:getLocalVar("chocoboPriceOffer"); if (csid == 10003 and option == 0) then if (player:delGil(price)) then updateChocoboPrice(player, price); local duration = 1800 + (player:getMod(MOD_CHOCOBO_RIDING_TIME) * 60) player:addStatusEffectEx(dsp.effects.MOUNTED,EFFECT_MOUNTED,0,0,duration,true); player:setPos(-574,2,400,0,0x78); end end end;
gpl-3.0
Whitechaser/darkstar
scripts/zones/Mog_Garden/npcs/GreenThumbMo.lua
5
2025
package.loaded["scripts/zones/Mog_Garden/TextIDs"] = nil; ----------------------------------- require("scripts/zones/Mog_Garden/TextIDs"); require("scripts/globals/moghouse") require("scripts/globals/shop"); ----------------------------------- local BRONZE_PIECE_ITEMID = 2184; function onTrade(player, npc, trade) moogleTrade(player, npc, trade) end; function onTrigger(player, npc) player:startEvent(1016); end; function onEventUpdate(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); end; function onEventFinish(player, csid, option) if (csid == 1016 and option == 0xFFF00FF) then -- Show the Mog House menu.. -- Print the expire time for mog locker if exists.. local lockerLease = getMogLockerExpiryTimestamp(player); if (lockerLease ~= nil) then if (lockerLease == -1) then -- Lease expired.. player:messageSpecial(MOGLOCKER_MESSAGE_OFFSET + 2, BRONZE_PIECE_ITEMID); else player:messageSpecial(MOGLOCKER_MESSAGE_OFFSET + 1, lockerLease); end end -- Show the mog house menu.. player:sendMenu(1); elseif (csid == 1016 and option == 0xFFE00FF) then -- Buy/Sell Things local stock = { 573, 280, -- Vegetable Seeds 574, 320, -- Fruit Seeds 575, 280, -- Grain Seeds 572, 280, -- Herb Seeds 1236, 1685, -- Cactus Stems 2235, 320, -- Wildgrass Seeds 3986, 1111, -- Chestnut Tree Sap (11th Anniversary Campaign) 3985, 1111, -- Monarch Beetle Saliva (11th Anniversary Campaign) 3984, 1111, -- Golden Seed Pouch (11th Anniversary Campaign) }; showShop( player, STATIC, stock ); elseif (csid == 1016 and option == 0xFFB00FF) then -- Leave this Mog Garden -> Whence I Came player:warp(); -- Ghetto for now, the last zone seems to get messed up due to mog house issues. end end;
gpl-3.0
DanielSchiavini/cortez-client
DataCortez/lua files/_sources/seekparty/party_booking.lua
1
13402
map_list = { {name = "All Maps", list = {{name = "All Maps"}}, ignore_recruit_window = true }, {name = "Prontera", list = {{name = "Fields"}, {name = "Prontera Culvert F1"}, {name = "Prontera Culvert F2"}, {name = "Prontera Culvert F3"}, {name = "Prontera Culvert F4", colorR = 255, colorG = 0, colorB = 0}, {name = "Labyrinth Forest F1"}, {name = "Labyrinth Forest F2"}, {name = "Labyrinth Forest F3", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Geffen", list = {{name = "Fields"}, {name = "Gypsy Village"}, {name = "Geffen Dungeon F1"}, {name = "Geffen Dungeon F2", colorR = 255, colorG = 0, colorB = 0}, {name = "Geffen Dungeon F3", colorR= 255, colorG = 0, colorB = 0}, {name = "Geffenia"}, {name = "Orc Village", colorR = 255, colorG = 0, colorB = 0}, {name = "Orc Dungeon F1"}, {name = "Orc Dungeon F2"}} }, {name = "Payon", list = {{name = "Forest", colorR = 255, colorG = 0, colorB = 0}, {name = "Payon Cave F1"}, {name = "Payon Cave F2"}, {name = "Payon Cave F3"}, {name = "Payon Cave F4 (Underground Temple)"}, {name = "Payon Cave F5 (Underground Temple)", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Aldebaran", list = {{name = "Mt. Mjolnir North", colorR = 255, colorG = 0, colorB = 0}, {name = "Mt. Mjolnir Foothills North"}, {name = "Mt. Mjolnir South"}, {name = "Mt. Mjolnir Foothills South"}, {name = "Mjolnir Dead Pit F1"}, {name = "Mjolnir Dead Pit F2"}, {name = "Mjolnir Dead Pit F3"}, {name = "Clock Tower F1"}, {name = "Clock Tower F2"}, {name = "Clock Tower F3"}, {name = "Clock Tower F4"}, {name = "Clock Tower B1"}, {name = "Clock Tower B2"}, {name = "Clock Tower B3"}, {name = "Clock Tower B4"}} }, {name = "Alberta", list = {{name = "Sunken Ship F1"}, {name = "Sunken Ship F1", colorR = 255, colorG = 0, colorB = 0}, {name = "Turtle Island"}, {name = "Turtle Island Dungeon"}, {name = "Good Turtles Village"}, {name = "Turtle Palace", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Morocc", list = {{name = "Sograt Desert", colorR = 255, colorG = 0, colorB = 0}, {name = "Morocc Field (Dimensional Gorge)", colorR = 255, colorG = 0, colorB = 0}, {name = "Ant Hell F1"}, {name = "Ant Hell F2", colorR = 255, colorG = 0, colorB = 0}, {name = "Sphinx B1"}, {name = "Sphinx B2"}, {name = "Sphinx B3"}, {name = "Sphinx B4"}, {name = "Sphinx B5", colorR = 255, colorG = 0, colorB = 0}, {name = "Inside Pyramid F1"}, {name = "Inside Pyramid F2"}, {name = "Inside Pyramid F3"}, {name = "Inside Pyramid F4", colorR = 255, colorG = 0, colorB = 0}, {name = "Inside Pyramid B1"}, {name = "Inside Pyramid B2", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Izlude", list = {{name = "Undersea Tunnel F1"}, {name = "Undersea Tunnel F2"}, {name = "Undersea Tunnel F3"}, {name = "Undersea Tunnel F4"}, {name = "Undersea Tunnel F5"}} }, {name = "Comodo", list = {{name = "Papuchicha Forest"}, {name = "Kokomo Beach"}, {name = "Zenhai Marsh"}, {name = "Pharos Beacon Island"}, {name = "Fortress Saint Darmain (East)"}, {name = "Fortress Saint Darmain (South)"}, {name = "Fortress Saint Darmain (West)"}, {name = "Karu, the West Cave", colorR = 255, colorG = 0, colorB = 0}, {name = "Ruande, the North Cave"}, {name = "Mao, the East Cave"}} }, {name = "Lutie", list = {{name = "Fields", colorR = 255, colorG = 0, colorB = 0}, {name = "Toy Factory Warehouse"}, {name = "Toy Monitoring Room", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Yuno", list = {{name = "Border Checkpoint/Post"}, {name = "Kiel Hyre's Cottage"}, {name = "El Mes Plateau"}, {name = "El Mes Gorge (Valley of Abyss)"}, {name = "Kiel Hyre's Academy"}, {name = "Schwarzwald Guards Camp"}, {name = "Fields"}, {name = "Nogg Road F1"}, {name = "Nogg Road F2"}, {name = "External Juperus Ruins"}, {name = "Inside Juperus Ruins"}, {name = "Center of Juperos", colorR = 255, colorG = 0, colorB = 0}, {name = "Robot Factory Level F1"}, {name = "Robot Factory Level F2", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Umbala", list = {{name = "Luluka Forest"}, {name = "Kalala Swamp"}, {name = "Hoomga Forest"}, {name = "Hoomga Jungle"}} }, {name = "Einbech", list = {{name = "Mine Dungeon F1"}, {name = "Mine Dungeon F2", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Lighthalzen", list = {{name = "Field"}, {name = "Lighthalzen Field (Grim Reaper's Valley)"}, {name = "Somatology Laboratory F1"}, {name = "Somatology Laboratory F2", colorR = 255, colorG = 0, colorB = 0}, {name = "Somatology Laboratory F3", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Thanatos Tower", list = {{name = "Hacheungbu Museum Entrance"}, --need translator please :) {name = "Hacheungbu Museum"}, {name = "Hacheungbu Abandoned Space"}, {name = "Upper Level"}, {name = "Upper Room of Angel"}, {name = "Upper Room of Agony"}, {name = "Upper Room of Sorrow"}, {name = "Upper Room of Despair"}, {name = "Upper Room of Hatred"}, {name = "Unknown Area", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Glast Heim", list = {{name = "Glast Heim F1"}, {name = "Glast Heim F2"}, {name = "St. Abbey"}, {name = "Catacombs", colorR = 255, colorG = 0, colorB = 0}, --Churchyard[English official server] {name = "Underground B1"}, --The Lowest Cave in Glast Heim F1[English official server] {name = "Underground B2"}, --The Lowest Cave in Glast Heim F2[English official server] {name = "Inside"}, --Inside Glast Heim[English official server] {name = "Chivalry F1"}, {name = "Chivalry F2"}, {name = "Underprison F1"}, {name = "Underprison F2"}, {name = "Culvert F1"}, {name = "Culvert F2"}, {name = "Culvert F3"}, {name = "Culvert F4"}, {name = "Staircase Dungeon"}} }, {name = "Hugel", list = {{name = "Fields"}, {name = "Odin Temple West"}, {name = "Odin Temple South"}, {name = "Odin Temple North", colorR = 255, colorG = 0, colorB = 0}, {name = "Abyss Lake"}, {name = "Abyss Lake Underground Cave F1"}, {name = "Abyss Lake Underground Cave F2"}, {name = "Abyss Lake Underground Cave F3", colorR = 255, colorG = 0, colorB = 0}, {name = "Infront of Thanatos Tower"}} --What? }, {name = "Rachel", list = {{name = "Audumra Grass Land"}, {name = "Ida Plane", colorR = 255, colorG = 0, colorB = 0}, {name = "Fortu Luna", colorR = 255, colorG = 0, colorB = 0}, {name = "Temple Sanctuary North F1"}, --Freya's Sacred Precinct F1 {name = "Temple Sanctuary West F1"}, --Freya's Sacred Precinct F2 {name = "Temple Sanctuary East F1"}, --Freya's Sacred Precinct F3 {name = "Temple Sanctuary South F1"}, --Freya's Sacred Precinct F4 {name = "Temple Sanctuary Center", colorR = 255, colorG = 0, colorB = 0}, --Freya's Sacred Precinct F5 {name = "Ice Cave F1"}, {name = "Ice Cave F2"}, {name = "Ice Cave F3"}} }, {name = "Veins", list = {{name = "Fields", colorR = 255, colorG = 0, colorB = 0}, {name = "Nameless Island"}, {name = "Cursed Abbey F1"}, {name = "Cursed Abbey B1", colorR = 255, colorG = 0, colorB = 0}, {name = "Cursed Abbey B2", colorR = 255, colorG = 0, colorB = 0}, {name = "Thor's Volcano Dungeon F1"}, {name = "Thor's Volcano Dungeon F2"}, {name = "Thor's Volcano Dungeon F3", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Niflheim", list = {{name = "Skellington Solitary Village"}, {name = "Valley of Gyoll"}, {name = "Niflheim", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Passage", list = {{name = "Manuk Field"}, {name = "Splendide Field"}, {name = "Foot of Kamidal Mountain"}, --El Descates Field Foot Of The Kamidal Mountain {name = "Kamidal Tunnel"}, --Underground Passage Kamidal Tunnel {name = "Scaraba Hole", colorR = 255, colorG = 0, colorB = 0}, --Underground Nest Scaraba Hole {name = "Nidhogg's Dungeon F1"}, {name = "Nidhogg's Dungeon F2"}} }, {name = "Amatsu", list = {{name = "Fields"}, {name = "Tatami Maze"}, {name = "Underground Forest Battle Field"}, {name = "Underground Shrine", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Gonryun", list = {{name = "Fields" }, {name = "Queen's Shrine" }, {name = "Hermit's Checkers" }, {name = "Arcadia", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Louyang", list = {{name = "Fields"}, {name = "Royal Tomb"}, {name = "Inside the Royal Tomb"}, {name = "Suei Long Gon", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Ayothaya", list = {{name = "Fields"}, {name = "Ancient Shrine Maze"}, {name = "Inside Ancient Shrine", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Brasilis", list = {{name = "Fields"}, {name = "Waterfall Cave Entrance"}, --Brasilia's Dungeon F1 {name = "Inside Waterfall Cave", colorR = 255, colorG = 0, colorB = 0}} --Brasilia's Dungeon F2 }, {name = "Moscovia", list = {{name = "Fields"}, --Okrestnosti Of Moscovia {name = "Les Forest"}, {name = "Temny Forest"}, {name = "Dremuci Forest", colorR = 255, colorG = 0, colorB = 0}} }, {name = "Memorial Dungeon", list = {{name = "Endless Tower", colorR = 255, colorG = 0, colorB = 0}, {name = "Sealed Shrine", colorR = 255, colorG = 0, colorB = 0}, {name = "Orc Memories", colorR = 255, colorG = 0, colorB = 0}, {name = "Nidhogg's Nest", colorR = 255, colorG = 0, colorB = 0}} }, } printMapList = function() local regionId = 0 local mapId = 0 local state = "" print("------------------") for key, region in pairs(map_list) do regionId = regionId +1 mapId = 0 if region["ignore_recruit_window"] == true then state = "ÆÄƼ ¸ðÁý (½Åû) â¿¡¼­´Â º¸ÀÌÁö ¾Ê´Â ¸Þ´ºÀÓ" --Party Recruitment (Application) menu is not available? else state = "" end print(regionId,region["name"],state) for key, map in pairs(region["list"]) do mapId = mapId +1 if map["color"] == nil then color = "Primary Colors" else color = "R: " .. map.color.R .. "G:" .. map.color.G .. "B:" .. map.color.B end print("\t" .. mapId .. ":" .. map.name, map.map_file, color) end end print("------------------") end __mapList = {} makeMapList = function() for regionId, region in ipairs(map_list) do __mapList[regionId] = region region["id"] = regionId for mapId, map in ipairs(region["list"]) do __mapList[regionId][mapId] = map map.id = mapId map.ignore_recruit_window = region["ignore_recruit_window"] end end end queryRegionInfo = function(regionId) if __mapList[regionId] == nil then return nil,nil,nil,nil end return regionId, __mapList[regionId]["name"], getMapIterator(regionId), __mapList[regionId]["ignore_recruit_window"] end queryMapInfo = function(regionId, mapId) if __mapList[regionId] == nil then return nil,nil,nil,nil,nil,nil end if __mapList[regionId][mapId] == nil then return nil,nil,nil,nil,nil,nil end return regionId, mapId, __mapList[regionId][mapId]["name"], __mapList[regionId][mapId]["colorR"], __mapList[regionId][mapId]["colorG"], __mapList[regionId][mapId]["colorB"] end getRegionIterator = function() local pos = 1 return { ["hasNext"] = function() return __mapList[pos] end, ["value"] = function() temp_pos = pos pos = pos + 1 return __mapList[temp_pos] end } end getMapIterator = function(regionId) local pos = 1 return { ["hasNext"] = function() if __mapList[regionId] == nil then return nil end return __mapList[regionId][pos] end, ["value"] = function() temp_pos = pos pos = pos +1 return __mapList[regionId][temp_pos] end } end makeMapList() print("[All Output Data Structure]") regionIterator = getRegionIterator() while regionIterator.hasNext() do region = regionIterator.value() print(region["id"],region["name"]) mapIterator = getMapIterator(region["id"]) while mapIterator.hasNext() do map = mapIterator.value() print("\t",queryMapInfo(region.id,map.id)) end end print("\n[Local Data Search]") regionIterator = getRegionIterator() while regionIterator.hasNext() do region = regionIterator.value() print(region.id,region.name) end print("\n[Map Data Search]") mapIterator = getMapIterator(2) while mapIterator.hasNext() do map = mapIterator.value() print(map.id,map.name) end print("\n[Regional Data Information Request]") print(queryRegionInfo(2)) _,_,mapIterator,_ = queryRegionInfo(2) while mapIterator.hasNext() do map = mapIterator.value() print(map.id,map.name) end print("\n[Map Data Information Request]") print(queryMapInfo(2,1)) PartyBookingHelp = { "/recruit: Brings up the Recruitment Party window.", "/booking: Brings up the Party Application List window.", --or Brings up the Party Booking List window "/organize \"Party Name\": Creates a party.", "/invite \"Character Name\": Invite the specific character to the party." } GetPartyBookingHelp = function() local descript = "" local obj = PartyBookingHelp if obj ~= nil then for i,v in pairs(obj) do descript = descript .. v descript = descript .. "\r\n" end end return descript end
gpl-3.0
DailyShana/ygopro-scripts
c11159464.lua
5
1350
--ワーム・ホープ function c11159464.initial_effect(c) --flip local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FLIP+EFFECT_TYPE_SINGLE) e1:SetCategory(CATEGORY_DRAW) e1:SetTarget(c11159464.drtg) e1:SetOperation(c11159464.drop) c:RegisterEffect(e1) --discard local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11159464,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(c11159464.tgcon) e2:SetTarget(c11159464.tgtg) e2:SetOperation(c11159464.tgop) c:RegisterEffect(e2) end function c11159464.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end end function c11159464.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then Duel.Draw(tp,1,REASON_EFFECT) end end function c11159464.tgcon(e,tp,eg,ep,ev,re,r,rp) return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 end function c11159464.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end function c11159464.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT,nil) end
gpl-2.0
Whitechaser/darkstar
scripts/globals/monstertpmoves.lua
1
23153
require("scripts/globals/magicburst") require("scripts/globals/status"); require("scripts/globals/magic"); require("scripts/globals/utils") require("scripts/globals/msg"); -- Foreword: A lot of this is good estimating since the FFXI playerbase has not found all of info for individual moves. -- What is known is that they roughly follow player Weaponskill calculations (pDIF, dMOD, ratio, etc) so this is what -- this set of functions emulates. -- mob types -- used in mob:isMobType() MOBTYPE_NORMAL = 0x00; MOBTYPE_PCSPAWNED = 0x01; MOBTYPE_NOTORIOUS = 0x02; MOBTYPE_FISHED = 0x04; MOBTYPE_CALLED = 0x08; MOBTYPE_BATTLEFIELD = 0x10; MOBTYPE_EVENT = 0x20; --skilltype MOBSKILL_PHYSICAL = 0; MOBSKILL_MAGICAL = 1; MOBSKILL_RANGED = 2; MOBSKILL_BREATH = 4; MOBSKILL_SPECIAL = 3; --skillparam (PHYSICAL) MOBPARAM_NONE = 0; MOBPARAM_BLUNT = 1; MOBPARAM_SLASH = 2; MOBPARAM_PIERCE = 3; MOBPARAM_H2H = 4; MOBDRAIN_HP = 0; MOBDRAIN_MP = 1; MOBDRAIN_TP = 2; --skillparam (MAGICAL) -- this is totally useless and should be removed -- add resistence using ELE_FIRE, see bomb_toss.lua MOBPARAM_FIRE = 6; MOBPARAM_EARTH = 7; MOBPARAM_WATER = 8; MOBPARAM_WIND = 9; MOBPARAM_ICE = 10; MOBPARAM_THUNDER = 11; MOBPARAM_LIGHT = 12; MOBPARAM_DARK = 13; --shadowbehav (number of shadows to take off) MOBPARAM_IGNORE_SHADOWS = 0; MOBPARAM_1_SHADOW = 1; MOBPARAM_2_SHADOW = 2; MOBPARAM_3_SHADOW = 3; MOBPARAM_4_SHADOW = 4; MOBPARAM_WIPE_SHADOWS = 999; TP_ACC_VARIES = 0; TP_ATK_VARIES = 1; TP_DMG_VARIES = 2; TP_CRIT_VARIES = 3; TP_NO_EFFECT = 0; TP_MACC_BONUS = 1; TP_MAB_BONUS = 2; TP_DMG_BONUS = 3; TP_RANGED = 4; BOMB_TOSS_HPP = 1; function MobRangedMove(mob,target,skill,numberofhits,accmod,dmgmod, tpeffect) -- this will eventually contian ranged attack code return MobPhysicalMove(mob,target,skill,numberofhits,accmod,dmgmod, TP_RANGED); end; -- PHYSICAL MOVE FUNCTION -- Call this on every physical move! -- accmod is a linear multiplier for accuracy (1 default) -- dmgmod is a linear multiplier for damage (1 default) -- tpeffect is an enum which can be one of: -- 0 TP_ACC_VARIES -- 1 TP_ATK_VARIES -- 2 TP_DMG_VARIES -- 3 TP_CRIT_VARIES -- mtp100/200/300 are the three values for 100% TP, 200% TP, 300% TP just like weaponskills.lua -- if TP_ACC_VARIES -> three values are acc %s (1.0 is 100% acc, 0.8 is 80% acc, 1.2 is 120% acc) -- if TP_ATK_VARIES -> three values are attack multiplier (1.5x 0.5x etc) -- if TP_DMG_VARIES -> three values are function MobPhysicalMove(mob,target,skill,numberofhits,accmod,dmgmod,tpeffect,mtp000,mtp150,mtp300,offcratiomod) local returninfo = {}; --get dstr (bias to monsters, so no fSTR) local dstr = mob:getStat(MOD_STR) - target:getStat(MOD_VIT); if (dstr < -10) then dstr = -10; end if (dstr > 10) then dstr = 10; end local lvluser = mob:getMainLvl(); local lvltarget = target:getMainLvl(); local acc = mob:getACC(); local eva = target:getEVA(); if (target:hasStatusEffect(dsp.effects.YONIN) and mob:isFacing(target, 23)) then -- Yonin evasion boost if mob is facing target eva = eva + target:getStatusEffect(dsp.effects.YONIN):getPower(); end --apply WSC local base = mob:getWeaponDmg() + dstr; --todo: change to include WSC if (base < 1) then base = 1; end --work out and cap ratio if (offcratiomod == nil) then -- default to attack. Pretty much every physical mobskill will use this, Cannonball being the exception. offcratiomod = mob:getStat(MOD_ATT); -- print ("Nothing passed, defaulting to attack"); end; local ratio = offcratiomod/target:getStat(MOD_DEF); local lvldiff = lvluser - lvltarget; if lvldiff < 0 then lvldiff = 0; end; ratio = ratio + lvldiff * 0.05; ratio = utils.clamp(ratio, 0, 4); --work out hit rate for mobs (bias towards them) local hitrate = (acc*accmod) - eva + (lvldiff*2) + 75; -- printf("acc: %f, eva: %f, hitrate: %f", acc, eva, hitrate); hitrate = utils.clamp(hitrate, 20, 95); --work out the base damage for a single hit local hitdamage = base + lvldiff; if (hitdamage < 1) then hitdamage = 1; end hitdamage = hitdamage * dmgmod; if (tpeffect == TP_DMG_VARIES) then hitdamage = hitdamage * MobTPMod(skill:getTP() / 10); end --work out min and max cRatio local maxRatio = 1; local minRatio = 0; if (ratio < 0.5) then maxRatio = ratio + 0.5; elseif ((0.5 <= ratio) and (ratio <= 0.7)) then maxRatio = 1; elseif ((0.7 < ratio) and (ratio <= 1.2)) then maxRatio = ratio + 0.3; elseif ((1.2 < ratio) and (ratio <= 1.5)) then maxRatio = (ratio * 0.25) + ratio; elseif ((1.5 < ratio) and (ratio <= 2.625)) then maxRatio = ratio + 0.375; elseif ((2.625 < ratio) and (ratio <= 3.25)) then maxRatio = 3; else maxRatio = ratio; end if (ratio < 0.38) then minRatio = 0; elseif ((0.38 <= ratio) and (ratio <= 1.25)) then minRatio = ratio * (1176 / 1024) - (448 / 1024); elseif ((1.25 < ratio) and (ratio <= 1.51)) then minRatio = 1; elseif ((1.51 < ratio) and (ratio <= 2.44)) then minRatio = ratio * (1176 / 1024) - (775 / 1024); else minRatio = ratio - 0.375; end --apply ftp (assumes 1~3 scalar linear mod) if (tpeffect==TP_DMG_BONUS) then hitdamage = hitdamage * fTP(skill:getTP(), mtp000, mtp150, mtp300); end --Applying pDIF local pdif = 0; -- start the hits local hitchance = math.random(); local finaldmg = 0; local hitsdone = 1; local hitslanded = 0; local chance = math.random(); -- first hit has a higher chance to land local firstHitChance = hitrate * 1.5; if (tpeffect==TP_RANGED) then firstHitChance = hitrate * 1.2; end firstHitChance = utils.clamp(firstHitChance, 35, 95); if ((chance*100) <= firstHitChance) then pdif = math.random((minRatio*1000),(maxRatio*1000)) --generate random PDIF pdif = pdif/1000; --multiplier set. finaldmg = finaldmg + hitdamage * pdif; hitslanded = hitslanded + 1; end while (hitsdone < numberofhits) do chance = math.random(); if ((chance*100)<=hitrate) then --it hit pdif = math.random((minRatio*1000),(maxRatio*1000)) --generate random PDIF pdif = pdif/1000; --multiplier set. finaldmg = finaldmg + hitdamage * pdif; hitslanded = hitslanded + 1; end hitsdone = hitsdone + 1; end -- printf("final: %f, hits: %f, acc: %f", finaldmg, hitslanded, hitrate); -- printf("ratio: %f, min: %f, max: %f, pdif, %f hitdmg: %f", ratio, minRatio, maxRatio, pdif, hitdamage); -- if an attack landed it must do at least 1 damage if (hitslanded >= 1 and finaldmg < 1) then finaldmg = 1; end -- all hits missed if (hitslanded == 0 or finaldmg == 0) then finaldmg = 0; hitslanded = 0; skill:setMsg(msgBasic.SKILL_MISS); end returninfo.dmg = finaldmg; returninfo.hitslanded = hitslanded; return returninfo; end -- MAGICAL MOVE -- Call this on every magical move! -- mob/target/skill should be passed from onMobWeaponSkill. -- dmg is the base damage (V value), accmod is a multiplier for accuracy (1 default, more than 1 = higher macc for mob), -- ditto for dmg mod but more damage >1 (equivalent of M value) -- tpeffect is an enum from one of: -- 0 = TP_NO_EFFECT -- 1 = TP_MACC_BONUS -- 2 = TP_MAB_BONUS -- 3 = TP_DMG_BONUS -- tpvalue affects the strength of having more TP along the following lines: -- TP_NO_EFFECT -> tpvalue has no dsp.effects. -- TP_MACC_BONUS -> direct multiplier to macc (1 for default) -- TP_MAB_BONUS -> direct multiplier to mab (1 for default) -- TP_DMG_BONUS -> direct multiplier to damage (V+dINT) (1 for default) --Examples: -- TP_DMG_BONUS and TP=100, tpvalue = 1, assume V=150 --> damage is now 150*(TP*1)/100 = 150 -- TP_DMG_BONUS and TP=200, tpvalue = 1, assume V=150 --> damage is now 150*(TP*1)/100 = 300 -- TP_DMG_BONUS and TP=100, tpvalue = 2, assume V=150 --> damage is now 150*(TP*2)/100 = 300 -- TP_DMG_BONUS and TP=200, tpvalue = 2, assume V=150 --> damage is now 150*(TP*2)/100 = 600 function MobMagicalMove(mob,target,skill,damage,element,dmgmod,tpeffect,tpvalue) returninfo = {}; --get all the stuff we need local resist = 1; local mdefBarBonus = 0; if (element > 0 and element <= 6 and target:hasStatusEffect(barSpells[element])) then -- bar- spell magic defense bonus mdefBarBonus = target:getStatusEffect(barSpells[element]):getSubPower(); end -- plus 100 forces it to be a number mab = (100 + mob:getMod(MOD_MATT)) / (100 + target:getMod(MOD_MDEF) + mdefBarBonus); if (mab > 1.3) then mab = 1.3; end if (mab < 0.7) then mab = 0.7; end if (tpeffect==TP_DMG_BONUS) then damage = damage * (((skill:getTP() / 10)*tpvalue)/100); end -- printf("power: %f, bonus: %f", damage, mab); -- resistence is added last finaldmg = damage * mab * dmgmod; -- get resistence local avatarAccBonus = 0; if (mob:isPet() and mob:getMaster() ~= nil) then local master = mob:getMaster(); if (master:getPetID() >= 0 and master:getPetID() <= 20) then -- check to ensure pet is avatar avatarAccBonus = utils.clamp(master:getSkillLevel(SKILL_SUM) - master:getMaxSkillLevel(mob:getMainLvl(), JOBS.SMN, SUMMONING_SKILL), 0, 200); end end resist = applyPlayerResistance(mob,nil,target,mob:getStat(MOD_INT)-target:getStat(MOD_INT),avatarAccBonus,element); local magicDefense = getElementalDamageReduction(target, element); finaldmg = finaldmg * resist * magicDefense; returninfo.dmg = finaldmg; return returninfo; end -- mob version -- effect = EFFECT_WHATEVER if enfeeble -- statmod = the stat to account for resist (INT,MND,etc) e.g. MOD_INT -- This determines how much the monsters ability resists on the player. function applyPlayerResistance(mob,effect,target,diff,bonus,element) local percentBonus = 0; local magicaccbonus = 0; if (diff > 10) then magicaccbonus = magicaccbonus + 10 + (diff - 10)/2; else magicaccbonus = magicaccbonus + diff; end if (bonus ~= nil) then magicaccbonus = magicaccbonus + bonus; end if (effect ~= nil) then percentBonus = percentBonus - getEffectResistance(target, effect); end local p = getMagicHitRate(mob, target, 0, element, percentBonus, magicaccbonus); return getMagicResist(p); end; function mobAddBonuses(caster, spell, target, dmg, ele) local magicDefense = getElementalDamageReduction(target, ele); dmg = math.floor(dmg * magicDefense); dayWeatherBonus = 1.00; if caster:getWeather() == singleWeatherStrong[ele] then if math.random() < 0.33 then dayWeatherBonus = dayWeatherBonus + 0.10; end elseif caster:getWeather() == singleWeatherWeak[ele] then if math.random() < 0.33 then dayWeatherBonus = dayWeatherBonus - 0.10; end elseif caster:getWeather() == doubleWeatherStrong[ele] then if math.random() < 0.33 then dayWeatherBonus = dayWeatherBonus + 0.25; end elseif caster:getWeather() == doubleWeatherWeak[ele] then if math.random() < 0.33 then dayWeatherBonus = dayWeatherBonus - 0.25; end end if VanadielDayElement() == dayStrong[ele] then if math.random() < 0.33 then dayWeatherBonus = dayWeatherBonus + 0.10; end elseif VanadielDayElement() == dayWeak[ele] then if math.random() < 0.33 then dayWeatherBonus = dayWeatherBonus - 0.10; end end if dayWeatherBonus > 1.35 then dayWeatherBonus = 1.35; end dmg = math.floor(dmg * dayWeatherBonus); burst = calculateMobMagicBurst(caster, ele, target); -- not sure what to do for this yet -- if (burst > 1.0) then -- spell:setMsg(spell:getMagicBurstMessage()); -- "Magic Burst!" -- end dmg = math.floor(dmg * burst); local mdefBarBonus = 0; if (ele > 0 and ele <= 6 and target:hasStatusEffect(barSpells[ele])) then -- bar- spell magic defense bonus mdefBarBonus = target:getStatusEffect(barSpells[ele]):getSubPower(); end mab = (100 + caster:getMod(MOD_MATT)) / (100 + target:getMod(MOD_MDEF) + mdefBarBonus) ; dmg = math.floor(dmg * mab); magicDmgMod = (256 + target:getMod(MOD_DMGMAGIC)) / 256; dmg = math.floor(dmg * magicDmgMod); -- print(affinityBonus); -- print(speciesReduction); -- print(dayWeatherBonus); -- print(burst); -- print(mab); -- print(magicDmgMod); return dmg; end function calculateMobMagicBurst(caster, ele, target) local burst = 1.0; local skillchainTier, skillchainCount = MobFormMagicBurst(ele, target); if (skillchainTier > 0) then if (skillchainCount == 1) then burst = 1.3; elseif (skillchainCount == 2) then burst = 1.35; elseif (skillchainCount == 3) then burst = 1.40; elseif (skillchainCount == 4) then burst = 1.45; elseif (skillchainCount == 5) then burst = 1.50; else -- Something strange is going on if this occurs. burst = 1.0; end end return burst; end; -- Calculates breath damage -- mob is a mob reference to get hp and lvl -- percent is the percentage to take from HP -- base is calculated from main level to create a minimum -- Equation: (HP * percent) + (LVL / base) -- cap is optional, defines a maximum damage function MobBreathMove(mob, target, percent, base, element, cap) local damage = (mob:getHP() * percent) + (mob:getMainLvl() / base); if (cap == nil) then -- cap max damage cap = math.floor(mob:getHP()/5); end -- Deal bonus damage vs mob ecosystem local systemBonus = utils.getSystemStrengthBonus(mob, target); damage = damage + (damage * (systemBonus * 0.25)); -- elemental resistence if (element ~= nil and element > 0) then -- no skill available, pass nil local resist = applyPlayerResistance(mob,nil,target,mob:getStat(MOD_INT)-target:getStat(MOD_INT),0,element); -- get elemental damage reduction local defense = getElementalDamageReduction(target, element) damage = damage * resist * defense; end damage = utils.clamp(damage, 1, cap); return damage; end; function MobFinalAdjustments(dmg,mob,skill,target,skilltype,skillparam,shadowbehav) -- physical attack missed, skip rest if (skill:hasMissMsg()) then return 0; end --handle pd if ((target:hasStatusEffect(dsp.effects.PERFECT_DODGE) or target:hasStatusEffect(dsp.effects.ALL_MISS) ) and skilltype==MOBSKILL_PHYSICAL) then skill:setMsg(msgBasic.SKILL_MISS); return 0; end -- set message to damage -- this is for AoE because its only set once skill:setMsg(msgBasic.DAMAGE); --Handle shadows depending on shadow behaviour / skilltype if (shadowbehav ~= MOBPARAM_WIPE_SHADOWS and shadowbehav ~= MOBPARAM_IGNORE_SHADOWS) then --remove 'shadowbehav' shadows. if (skill:isAoE() or skill:isConal()) then shadowbehav = MobTakeAoEShadow(mob, target, shadowbehav); end dmg = utils.takeShadows(target, dmg, shadowbehav); -- dealt zero damage, so shadows took hit if (dmg == 0) then skill:setMsg(msgBasic.SHADOW_ABSORB); return shadowbehav; end elseif (shadowbehav == MOBPARAM_WIPE_SHADOWS) then --take em all! target:delStatusEffect(dsp.effects.COPY_IMAGE); target:delStatusEffect(dsp.effects.BLINK); target:delStatusEffect(dsp.effects.THIRD_EYE); end if (skilltype == MOBSKILL_PHYSICAL and skill:isSingle() == false) then target:delStatusEffect(dsp.effects.THIRD_EYE); end --handle Third Eye using shadowbehav as a guide if (skilltype == MOBSKILL_PHYSICAL and utils.thirdeye(target)) then skill:setMsg(msgBasic.ANTICIPATE); return 0; end if (skilltype == MOBSKILL_PHYSICAL) then dmg = target:physicalDmgTaken(dmg); elseif (skilltype == MOBSKILL_MAGICAL) then dmg = target:magicDmgTaken(dmg); elseif (skilltype == MOBSKILL_BREATH) then dmg = target:breathDmgTaken(dmg); elseif (skilltype == MOBSKILL_RANGED) then dmg = target:rangedDmgTaken(dmg); end --handling phalanx dmg = dmg - target:getMod(MOD_PHALANX); if (dmg < 0) then return 0; end dmg = utils.stoneskin(target, dmg); if (dmg > 0) then target:wakeUp(); target:updateEnmityFromDamage(mob,dmg); target:handleAfflatusMiseryDamage(dmg); end return dmg; end; -- returns true if mob attack hit -- used to stop tp move status effects function MobPhysicalHit(skill) -- if message is not the default. Then there was a miss, shadow taken etc return skill:hasMissMsg() == false; end; -- function MobHit() -- end; -- function MobAoEHit() -- end; -- function MobMagicHit() -- end; -- function MobMagicAoEHit() -- end; function MobDrainMove(mob, target, drainType, drain) if (target:isUndead() == false) then if (drainType == MOBDRAIN_MP) then -- can't go over limited mp if (target:getMP() < drain) then drain = target:getMP(); end target:delMP(drain); mob:addMP(drain); return msgBasic.SKILL_DRAIN_MP; elseif (drainType == MOBDRAIN_TP) then -- can't go over limited tp if (target:getTP() < drain) then drain = target:getTP(); end target:delTP(drain); mob:addTP(drain); return msgBasic.SKILL_DRAIN_TP; elseif (drainType == MOBDRAIN_HP) then -- can't go over limited hp if (target:getHP() < drain) then drain = target:getHP(); end target:delHP(drain); mob:addHP(drain); return msgBasic.SKILL_DRAIN_HP; end else -- it's undead so just deal damage -- can't go over limited hp if (target:getHP() < drain) then drain = target:getHP(); end target:delHP(drain); return msgBasic.DAMAGE; end return msgBasic.SKILL_NO_EFFECT; end; function MobPhysicalDrainMove(mob, target, skill, drainType, drain) if (MobPhysicalHit(skill)) then return MobDrainMove(mob, target, drainType, drain); end return msgBasic.SKILL_MISS; end; function MobDrainAttribute(mob, target, typeEffect, power, tick, duration) local positive = nil; if (typeEffect == EFFECT_STR_DOWN) then positive = EFFECT_STR_BOOST; elseif (typeEffect == EFFECT_DEX_DOWN) then positive = EFFECT_DEX_BOOST; elseif (typeEffect == EFFECT_AGI_DOWN) then positive = EFFECT_AGI_BOOST; elseif (typeEffect == EFFECT_VIT_DOWN) then positive = EFFECT_VIT_BOOST; elseif (typeEffect == EFFECT_MND_DOWN) then positive = EFFECT_MND_BOOST; elseif (typeEffect == EFFECT_INT_DOWN) then positive = EFFECT_INT_BOOST; elseif (typeEffect == EFFECT_CHR_DOWN) then positive = EFFECT_CHR_BOOST; end if (positive ~= nil) then local results = MobStatusEffectMove(mob, target, typeEffect, power, tick, duration); if (results == msgBasic.SKILL_ENFEEB_IS) then mob:addStatusEffect(positive, power, tick, duration); return msgBasic.ATTR_DRAINED; end return msgBasic.SKILL_MISS; end return msgBasic.SKILL_NO_EFFECT; end; function MobDrainStatusEffectMove(mob, target) -- try to drain buff local effect = mob:stealStatusEffect(target); if (effect ~= 0) then return msgBasic.EFFECT_DRAINED; end return msgBasic.SKILL_NO_EFFECT; end; -- Adds a status effect to a target function MobStatusEffectMove(mob, target, typeEffect, power, tick, duration) if (target:canGainStatusEffect(typeEffect, power)) then local statmod = MOD_INT; local element = mob:getStatusEffectElement(typeEffect); local resist = applyPlayerResistance(mob,typeEffect,target,mob:getStat(statmod)-target:getStat(statmod),0,element); if (resist >= 0.25) then local totalDuration = utils.clamp(duration * resist, 1); target:addStatusEffect(typeEffect, power, tick, totalDuration); return msgBasic.SKILL_ENFEEB_IS; end return msgBasic.SKILL_MISS; -- resist ! end return msgBasic.SKILL_NO_EFFECT; -- no effect end; -- similar to status effect move except, this will not land if the attack missed function MobPhysicalStatusEffectMove(mob, target, skill, typeEffect, power, tick, duration) if (MobPhysicalHit(skill)) then return MobStatusEffectMove(mob, target, typeEffect, power, tick, duration); end return msgBasic.SKILL_MISS; end; -- similar to statuseffect move except it will only take effect if facing function MobGazeMove(mob, target, typeEffect, power, tick, duration) if (target:isFacing(mob)) then return MobStatusEffectMove(mob, target, typeEffect, power, tick, duration); end return msgBasic.SKILL_NO_EFFECT; end; function MobBuffMove(mob, typeEffect, power, tick, duration) if (mob:addStatusEffect(typeEffect,power,tick,duration)) then return msgBasic.SKILL_GAIN_EFFECT; end return msgBasic.SKILL_NO_EFFECT; end; function MobHealMove(target, heal) local mobHP = target:getHP(); local mobMaxHP = target:getMaxHP(); if (mobHP+heal > mobMaxHP) then heal = mobMaxHP - mobHP; end target:wakeUp(); target:addHP(heal); return heal; end function MobTakeAoEShadow(mob, target, max) -- this is completely crap and should be using actual nin skill -- TODO fix this if (target:getMainJob() == JOBS.NIN and math.random() < 0.6) then max = max - 1; if (max < 1) then max = 1; end end return math.random(1, max); end; function MobTPMod(tp) -- increase damage based on tp if (tp >= 3000) then return 2; elseif (tp >= 2000) then return 1.5; end return 1; end; function fTP(tp,ftp1,ftp2,ftp3) if (tp < 1000) then tp = 1000; end if (tp >= 1000 and tp < 1500) then return ftp1 + ( ((ftp2-ftp1)/500) * (tp-1000)); elseif (tp >= 1500 and tp <= 3000) then -- generate a straight line between ftp2 and ftp3 and find point @ tp return ftp2 + ( ((ftp3-ftp2)/1500) * (tp-1500)); end return 1; -- no ftp mod end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/structure/general/all_banner_generic_s01.lua
3
2276
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_structure_general_all_banner_generic_s01 = object_static_structure_general_shared_all_banner_generic_s01:new { } ObjectTemplates:addTemplate(object_static_structure_general_all_banner_generic_s01, "object/static/structure/general/all_banner_generic_s01.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Northern_San_dOria/npcs/Jeanvirgaud.lua
5
1288
----------------------------------- -- Area: Northern San d'Oria -- NPC: Jeanvirgaud -- Outpost Teleporter NPC -- !pos 111 -0.199 -6 231 ----------------------------------- require("scripts/globals/conquest"); function onTrigger(player,npc) local regionsControlled = 1073741823 - getTeleAvailable(NATION_SANDORIA); local regionsSupplied = 1073741823 - player:getNationTeleport(NATION_SANDORIA); if (player:getNation() == NATION_SANDORIA) then player:startEvent(716,0,0,regionsControlled,0,0,514,player:getMainLvl(),regionsSupplied); else player:startEvent(716,0,0,0,0,0,1,0,0); end end; function onEventUpdate(player,csid,option) local region = option - 1073741829; player:updateEvent(player:getGil(),OP_TeleFee(player,region),0,OP_TeleFee(player,region),player:getCP()); end; function onEventFinish(player,csid,option) if (csid == 716 and option >= 5 and option <= 23) then if (player:delGil(OP_TeleFee(player,option-5))) then toOutpost(player,option); end elseif (option >= 1029 and option <= 1047) then local cpCost = OP_TeleFee(player,option-1029); if (player:getCP()>=cpCost) then player:delCP(cpCost); toOutpost(player,option-1024); end end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/crafted/weapon/missile/wpn_spacebomb_missile_mk1.lua
3
3089
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_ship_crafted_weapon_missile_wpn_spacebomb_missile_mk1 = object_tangible_ship_crafted_weapon_missile_shared_wpn_spacebomb_missile_mk1:new { numberExperimentalProperties = {1, 1, 2, 2, 2, 2, 2, 2}, experimentalProperties = {"XX", "XX", "OQ", "PE", "OQ", "PE", "OQ", "PE", "OQ", "PE", "OQ", "PE", "OQ", "PE"}, experimentalWeights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "exp_damage_max", "exp_damage_min", "misc", "misc", "exp_ammo", "exp_fltrefirerate"}, experimentalSubGroupTitles = {"null", "null", "fltmaxdamage", "fltmindamage", "fltshieldeffectiveness", "fltarmoreffectiveness", "fltmaxammo", "fltrefirerate"}, experimentalMin = {0, 0, 6104, 3760, 700, 700, 2, 4760}, experimentalMax = {0, 0, 11337, 6983, 1300, 1300, 4, 8840}, experimentalPrecision = {0, 0, 0, 0, 0, 0, 0, 0}, experimentalCombineType = {0, 0, 1, 1, 1, 1, 1, 1}, } ObjectTemplates:addTemplate(object_tangible_ship_crafted_weapon_missile_wpn_spacebomb_missile_mk1, "object/tangible/ship/crafted/weapon/missile/wpn_spacebomb_missile_mk1.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/droid/component/data_storage_module_4.lua
2
3495
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_droid_component_data_storage_module_4 = object_draft_schematic_droid_component_shared_data_storage_module_4:new { templateType = DRAFTSCHEMATIC, customObjectName = "Level 4 Droid Data Module", craftingToolTab = 32, -- (See DraftSchemticImplementation.h) complexity = 22, size = 8, xpType = "crafting_droid_general", xp = 80, assemblySkill = "droid_assembly", experimentingSkill = "droid_experimentation", customizationSkill = "droid_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n"}, ingredientTitleNames = {"module_frame", "contaminent_neutralization_medium", "thermal_shielding", "circuit_mounting_unit", "memory_circuit"}, ingredientSlotType = {0, 0, 0, 0, 1}, resourceTypes = {"copper", "gas_inert", "ore_extrusive", "fiberplast", "object/tangible/component/item/shared_electronics_memory_module.iff"}, resourceQuantities = {16, 10, 8, 6, 1}, contribution = {100, 100, 100, 100, 100}, targetTemplate = "object/tangible/component/droid/data_storage_module_4.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_droid_component_data_storage_module_4, "object/draft_schematic/droid/component/data_storage_module_4.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/Empyreal_Paradox/npcs/Transcendental.lua
5
1686
----------------------------------- -- Area: Empyreal_Paradox -- NPC: Transcendental ----------------------------------- package.loaded["scripts/zones/Empyreal_Paradox/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/zones/Empyreal_Paradox/TextIDs"); require("scripts/globals/missions"); require("scripts/globals/keyitems"); require("scripts/globals/bcnm"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) if (TradeBCNM(player,player:getZoneID(),trade,npc)) then return; end end; ----------------------------------- -- onTrigger Action ----------------------------------- function onTrigger(player,npc) --player:addMission(COP, DAWN); --player:setVar("PromathiaStatus",3); if (player:getCurrentMission(COP) == DAWN and player:getVar("PromathiaStatus")==1) then player:startEvent(2); elseif (EventTriggerBCNM(player,npc)) then end end; ----------------------------------- -- onEventUpdate ----------------------------------- function onEventUpdate(player,csid,option) -- printf("onUpdate CSID: %u",csid); -- printf("onUpdate RESULT: %u",option); EventUpdateBCNM(player,csid,option) end; ----------------------------------- -- onEventFinish Action ----------------------------------- function onEventFinish(player,csid,option) -- printf("onFinish CSID: %u",csid); -- printf("onFinish RESULT: %u",option); if ( csid == 2) then player:setVar("PromathiaStatus",2); elseif (EventFinishBCNM(player,csid,option)) then return; end end;
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/ship/tiefighter_tier5.lua
3
2172
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_ship_tiefighter_tier5 = object_ship_shared_tiefighter_tier5:new { } ObjectTemplates:addTemplate(object_ship_tiefighter_tier5, "object/ship/tiefighter_tier5.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/tatooine/filler_building_tatt_style01_06.lua
3
2284
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_building_tatooine_filler_building_tatt_style01_06 = object_building_tatooine_shared_filler_building_tatt_style01_06:new { } ObjectTemplates:addTemplate(object_building_tatooine_filler_building_tatt_style01_06, "object/building/tatooine/filler_building_tatt_style01_06.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_sith_shadow_zab_f_02.lua
3
2228
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_sith_shadow_zab_f_02 = object_mobile_shared_dressed_sith_shadow_zab_f_02:new { } ObjectTemplates:addTemplate(object_mobile_dressed_sith_shadow_zab_f_02, "object/mobile/dressed_sith_shadow_zab_f_02.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/bio_engineer/bio_component/bio_component_clothing_casual_charisma.lua
3
2412
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_bio_engineer_bio_component_bio_component_clothing_casual_charisma = object_draft_schematic_bio_engineer_bio_component_shared_bio_component_clothing_casual_charisma:new { } ObjectTemplates:addTemplate(object_draft_schematic_bio_engineer_bio_component_bio_component_clothing_casual_charisma, "object/draft_schematic/bio_engineer/bio_component/bio_component_clothing_casual_charisma.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/space/chassis/tiefighter_body.lua
3
2268
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_space_chassis_tiefighter_body = object_draft_schematic_space_chassis_shared_tiefighter_body:new { } ObjectTemplates:addTemplate(object_draft_schematic_space_chassis_tiefighter_body, "object/draft_schematic/space/chassis/tiefighter_body.iff")
agpl-3.0
KingRaptor/Zero-K
gamedata/modularcomms/dyncomms_predefined.lua
3
5127
return { dyntrainer_strike = { name = "Strike Trainer", chassis = "strike", modules = { {"commweapon_heavymachinegun", "module_radarnet"}, {"module_ablative_armor", "module_autorepair"}, {"commweapon_lightninggun", "module_personal_cloak", "module_ablative_armor"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, }, --decorations = {"banner_overhead"}, --images = {overhead = "184"} }, dyntrainer_recon = { name = "Recon Trainer", chassis = "recon", modules = { {"commweapon_heavymachinegun", "module_radarnet"}, {"module_ablative_armor", "module_autorepair"}, {"commweapon_clusterbomb", "commweapon_personal_shield", "module_ablative_armor"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, }, --decorations = {"skin_recon_dark", "banner_overhead"}, --images = {overhead = "184"} }, dyntrainer_support = { name = "Engineer Trainer", chassis = "support", modules = { {"commweapon_lparticlebeam", "module_radarnet"}, {"module_ablative_armor", "module_autorepair"}, {"commweapon_hparticlebeam", "module_personal_cloak", "module_adv_nano"}, {"module_dmg_booster", "module_adv_targeting", "module_adv_targeting"}, {"module_adv_targeting", "module_adv_nano", "module_resurrect"}, }, --decorations = {"skin_support_hotrod"}, }, dyntrainer_assault = { name = "Guardian Trainer", chassis = "assault", modules = { {"commweapon_heavymachinegun", "module_radarnet"}, {"module_ablative_armor", "module_autorepair"}, {"commweapon_shotgun", "commweapon_personal_shield", "module_heavy_armor"}, {"module_dmg_booster", "module_dmg_booster", "module_heavy_armor"}, {"conversion_disruptor","module_dmg_booster", "module_heavy_armor"}, }, --decorations = {"banner_overhead"}, --images = {overhead = "166"} }, dynhub_strike = { name = "Strike Support", notStarter = true, chassis = "strike", modules = { {"commweapon_shotgun", "module_adv_targeting"}, {"conversion_disruptor", "module_personal_cloak"}, {"commweapon_heavymachinegun", "conversion_disruptor", "module_high_power_servos"}, {"module_high_power_servos", "module_adv_targeting", "module_adv_targeting"}, {"module_high_power_servos", "module_high_power_servos", "module_adv_targeting"}, }, }, dynhub_recon = { name = "Recon Support", notStarter = true, chassis = "recon", modules = { {"commweapon_shotgun", "module_radarnet"}, {"module_ablative_armor", "module_personal_cloak"}, {"commweapon_disruptorbomb", "conversion_disruptor", "module_high_power_servos"}, {"module_high_power_servos", "module_high_power_servos", "module_adv_targeting"}, {"module_high_power_servos", "module_high_power_servos", "module_adv_targeting"}, }, }, dynhub_support = { name = "Engineer Support", notStarter = true, chassis = "support", modules = { {"commweapon_lightninggun", "module_adv_targeting"}, {"module_resurrect", "module_personal_cloak"}, {"commweapon_multistunner", "module_adv_nano", "weaponmod_stun_booster"}, {"module_adv_nano", "module_adv_nano", "module_adv_targeting"}, {"module_adv_nano", "module_adv_nano", "module_adv_targeting"}, }, }, dynhub_assault = { name = "Guardian Support", notStarter = true, chassis = "assault", modules = { {"commweapon_riotcannon", "module_adv_targeting"}, {"module_adv_targeting", "weaponmod_napalm_warhead"}, {"commweapon_hpartillery", "module_adv_targeting", "module_dmg_booster"}, {"module_adv_targeting", "module_adv_targeting", "module_dmg_booster"}, {"module_adv_targeting", "module_adv_targeting", "module_dmg_booster"}, }, }, dynfancy_recon = { name = "Recon Trainer", chassis = "recon", modules = { {"commweapon_beamlaser", "module_ablative_armor"}, {"module_high_power_servos", "commweapon_personal_shield"}, {"commweapon_clusterbomb", "module_dmg_booster", "module_ablative_armor"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, }, decorations = {"skin_recon_dark", "banner_overhead"}, images = {overhead = "184"} }, dynfancy_support = { name = "Engineer Trainer", chassis = "support", modules = { {"commweapon_beamlaser", "module_ablative_armor"}, }, decorations = {"skin_support_zebra", "banner_overhead"}, images = {overhead = "184"} }, dynfancy_strike = { name = "Strike Trainer", chassis = "strike", modules = { {"commweapon_beamlaser", "module_ablative_armor"}, {"module_high_power_servos", "commweapon_personal_shield"}, {"commweapon_clusterbomb", "module_dmg_booster", "module_ablative_armor"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, {"module_high_power_servos", "module_ablative_armor", "module_dmg_booster"}, }, decorations = {"banner_overhead"}, images = {overhead = "184"} }, }
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/corellia/grecks_smuggler.lua
2
1318
grecks_smuggler = Creature:new { objectName = "@mob/creature_names:greck_smuggler", randomNameType = NAME_GENERIC_TAG, socialGroup = "olag_greck", faction = "olag_greck", level = 7, chanceHit = 0.26, damageMin = 55, damageMax = 65, baseXp = 187, baseHAM = 270, baseHAMmax = 330, armor = 0, resists = {5,5,5,-1,-1,-1,-1,-1,-1}, meatType = "", meatAmount = 0, hideType = "", hideAmount = 0, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0, ferocity = 0, pvpBitmask = ATTACKABLE, creatureBitmask = PACK, optionsBitmask = 128, diet = HERBIVORE, templates = { "object/mobile/dressed_crook_zabrak_female_01.iff", "object/mobile/dressed_crook_zabrak_male_01.iff", "object/mobile/dressed_robber_human_female_01.iff", "object/mobile/dressed_robber_human_male_01.iff", "object/mobile/dressed_robber_twk_female_01.iff", "object/mobile/dressed_robber_twk_male_01.iff"}, lootGroups = { { groups = { {group = "junk", chance = 7000000}, {group = "loot_kit_parts", chance = 2000000}, {group = "tailor_components", chance = 1000000} } } }, weapons = {"ranged_weapons"}, conversationTemplate = "", reactionStf = "@npc_reaction/slang", attacks = merge(brawlernovice,marksmannovice) } CreatureTemplates:addCreatureTemplate(grecks_smuggler, "grecks_smuggler")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/components/booster/bst_sorosuub_prized_liberator_mk1.lua
3
2352
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_ship_components_booster_bst_sorosuub_prized_liberator_mk1 = object_tangible_ship_components_booster_shared_bst_sorosuub_prized_liberator_mk1:new { } ObjectTemplates:addTemplate(object_tangible_ship_components_booster_bst_sorosuub_prized_liberator_mk1, "object/tangible/ship/components/booster/bst_sorosuub_prized_liberator_mk1.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/droid/droid_wound_repair_kit_b.lua
2
3585
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_droid_droid_wound_repair_kit_b = object_draft_schematic_droid_shared_droid_wound_repair_kit_b:new { templateType = DRAFTSCHEMATIC, customObjectName = "Droid Reconstruction Kit - B", craftingToolTab = 32, -- (See DraftSchemticImplementation.h) complexity = 24, size = 1, xpType = "crafting_droid_general", xp = 100, assemblySkill = "droid_assembly", experimentingSkill = "droid_experimentation", customizationSkill = "droid_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n", "craft_droid_ingredients_n"}, ingredientTitleNames = {"reconstructive_rigging", "insulated_cement", "diagnostic_circuit", "backup_power_supply", "unit_casing"}, ingredientSlotType = {0, 0, 1, 1, 1}, resourceTypes = {"metal_nonferrous", "ore_extrusive", "object/tangible/component/droid/repair/shared_diagnostic_circuit.iff", "object/tangible/component/droid/repair/shared_power_supply_redundant.iff", "object/tangible/component/droid/repair/shared_repair_unit_casing.iff"}, resourceQuantities = {25, 20, 1, 1, 1}, contribution = {100, 100, 100, 100, 100}, targetTemplate = "object/tangible/medicine/pet/droid_wound_kit_b.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_droid_droid_wound_repair_kit_b, "object/draft_schematic/droid/droid_wound_repair_kit_b.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/weapon/pistol_scatter.lua
2
3553
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_weapon_pistol_scatter = object_draft_schematic_weapon_shared_pistol_scatter:new { templateType = DRAFTSCHEMATIC, customObjectName = "Scatter Pistol", craftingToolTab = 1, -- (See DraftSchemticImplementation.h) complexity = 22, size = 1, xpType = "crafting_weapons_general", xp = 134, assemblySkill = "weapon_assembly", experimentingSkill = "weapon_experimentation", customizationSkill = "weapon_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n"}, ingredientTitleNames = {"frame_assembly", "receiver_assembly", "grip_assembly", "powerhandler", "barrel", "scope"}, ingredientSlotType = {0, 0, 0, 1, 1, 3}, resourceTypes = {"iron_doonium", "metal_ferrous", "metal", "object/tangible/component/weapon/shared_blaster_power_handler.iff", "object/tangible/component/weapon/shared_projectile_pistol_barrel.iff", "object/tangible/component/weapon/shared_scope_weapon.iff"}, resourceQuantities = {33, 22, 10, 1, 1, 1}, contribution = {100, 100, 100, 100, 100, 100}, targetTemplate = "object/weapon/ranged/pistol/pistol_scatter.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_weapon_pistol_scatter, "object/draft_schematic/weapon/pistol_scatter.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/furniture/furniture_lamp_free_s02_on.lua
2
3341
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_furniture_furniture_lamp_free_s02_on = object_draft_schematic_furniture_shared_furniture_lamp_free_s02_on:new { templateType = DRAFTSCHEMATIC, customObjectName = "Free-standing Lamp \'Razorcoil\'", craftingToolTab = 512, -- (See DraftSchemticImplementation.h) complexity = 18, size = 1, xpType = "crafting_structure_general", xp = 250, assemblySkill = "structure_assembly", experimentingSkill = "structure_experimentation", customizationSkill = "structure_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_furniture_ingredients_n", "craft_furniture_ingredients_n", "craft_furniture_ingredients_n", "craft_furniture_ingredients_n"}, ingredientTitleNames = {"lamp_body", "neck", "lamp_assembly", "shade"}, ingredientSlotType = {0, 0, 0, 0}, resourceTypes = {"metal", "metal", "metal", "mineral"}, resourceQuantities = {40, 50, 15, 20}, contribution = {100, 100, 100, 100}, targetTemplate = "object/tangible/furniture/all/frn_all_light_lamp_free_s02.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_furniture_furniture_lamp_free_s02_on, "object/draft_schematic/furniture/furniture_lamp_free_s02_on.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/cll8_binary_load_lifter.lua
3
2208
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_cll8_binary_load_lifter = object_mobile_shared_cll8_binary_load_lifter:new { } ObjectTemplates:addTemplate(object_mobile_cll8_binary_load_lifter, "object/mobile/cll8_binary_load_lifter.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/component/weapon/blaster_barrel_wp_muzzle_m_s04_lg.lua
3
2324
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_component_weapon_blaster_barrel_wp_muzzle_m_s04_lg = object_tangible_component_weapon_shared_blaster_barrel_wp_muzzle_m_s04_lg:new { } ObjectTemplates:addTemplate(object_tangible_component_weapon_blaster_barrel_wp_muzzle_m_s04_lg, "object/tangible/component/weapon/blaster_barrel_wp_muzzle_m_s04_lg.iff")
agpl-3.0
Whitechaser/darkstar
scripts/globals/weaponskills/gate_of_tartarus.lua
2
1942
----------------------------------- -- Gate Of Tartarus -- Staff weapon skill -- Skill Level: N/A -- Lowers target's attack. Additional effect: Refresh -- Refresh effect is 8mp/tick for 20 sec per 100 TP. -- Available only when equipped with the Relic Weapons Thyrus (Dynamis use only) and Claustrum, or the Chthonic Staff once the Latent Effect has been activated. -- These Relic Weapons are only available to Black Mages and Summoners. As such, only these jobs may use this Weapon Skill. -- Aligned with the Aqua Gorget & Snow Gorget. -- Aligned with the Aqua Belt & Snow Belt. -- Element: None -- Modifiers: CHR:60% -- 100%TP 200%TP 300%TP -- 3.00 3.00 3.00 ----------------------------------- require("scripts/globals/status"); require("scripts/globals/settings"); require("scripts/globals/weaponskills"); ----------------------------------- function onUseWeaponSkill(player, target, wsID, tp, primary, action, taChar) local params = {}; params.numHits = 1; params.ftp100 = 3; params.ftp200 = 3; params.ftp300 = 3; params.str_wsc = 0.0; params.dex_wsc = 0.0; params.vit_wsc = 0.0; params.agi_wsc = 0.0; params.int_wsc = 0.0; params.mnd_wsc = 0.0; params.chr_wsc = 0.6; params.crit100 = 0.0; params.crit200 = 0.0; params.crit300 = 0.0; params.canCrit = false; params.acc100 = 0.0; params.acc200= 0.0; params.acc300= 0.0; params.atkmulti = 1; if (USE_ADOULIN_WEAPON_SKILL_CHANGES == true) then params.chr_wsc = 0.8; end local damage, criticalHit, tpHits, extraHits = doPhysicalWeaponskill(player, target, wsID, tp, primary, action, taChar, params); if (damage > 0 and target:hasStatusEffect(dsp.effects.ATTACK_DOWN) == false) then local duration = (tp/1000 * 3) * applyResistanceAddEffect(player,target,ELE_WATER,0); target:addStatusEffect(dsp.effects.ATTACK_DOWN, 20, 0, duration); end return tpHits, extraHits, criticalHit, damage; end
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/item/item_bottle_tall.lua
3
2200
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_item_item_bottle_tall = object_static_item_shared_item_bottle_tall:new { } ObjectTemplates:addTemplate(object_static_item_item_bottle_tall, "object/static/item/item_bottle_tall.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_durgur_pyne.lua
3
2192
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_durgur_pyne = object_mobile_shared_dressed_durgur_pyne:new { } ObjectTemplates:addTemplate(object_mobile_dressed_durgur_pyne, "object/mobile/dressed_durgur_pyne.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/crafting/station/weapon_station.lua
3
3837
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_crafting_station_weapon_station = object_tangible_crafting_station_shared_weapon_station:new { templateType = CRAFTINGSTATION, playerRaces = { "object/creature/player/bothan_male.iff", "object/creature/player/bothan_female.iff", "object/creature/player/human_male.iff", "object/creature/player/human_female.iff", "object/creature/player/ithorian_male.iff", "object/creature/player/ithorian_female.iff", "object/creature/player/moncal_male.iff", "object/creature/player/moncal_female.iff", "object/creature/player/rodian_male.iff", "object/creature/player/rodian_female.iff", "object/creature/player/sullustan_male.iff", "object/creature/player/sullustan_female.iff", "object/creature/player/trandoshan_male.iff", "object/creature/player/trandoshan_female.iff", "object/creature/player/twilek_male.iff", "object/creature/player/twilek_female.iff", "object/creature/player/wookiee_male.iff", "object/creature/player/wookiee_female.iff", "object/creature/player/zabrak_male.iff", "object/creature/player/zabrak_female.iff" }, customizationOptions = {}, customizationDefaults = {}, stationType = 7, complexityLevel = 100, numberExperimentalProperties = {1, 1, 1, 1}, experimentalProperties = {"XX", "XX", "XX", "CD"}, experimentalWeights = {1, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "null", "exp_effectiveness"}, experimentalSubGroupTitles = {"null", "null", "hitpoints", "usemodifier"}, experimentalMin = {0, 0, 1000, -15}, experimentalMax = {0, 0, 1000, 15}, experimentalCombineType = {0, 0, 4, 1}, experimentalPrecision = {0, 0, 0, 0}, experimentalCombineType = {1, 1, 1, 1}, } ObjectTemplates:addTemplate(object_tangible_crafting_station_weapon_station, "object/tangible/crafting/station/weapon_station.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/poi/hq/rebel_sm.lua
3
2184
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_building_poi_hq_rebel_sm = object_building_poi_hq_shared_rebel_sm:new { } ObjectTemplates:addTemplate(object_building_poi_hq_rebel_sm, "object/building/poi/hq/rebel_sm.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_commoner_naboo_human_female_05.lua
3
2268
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_commoner_naboo_human_female_05 = object_mobile_shared_dressed_commoner_naboo_human_female_05:new { } ObjectTemplates:addTemplate(object_mobile_dressed_commoner_naboo_human_female_05, "object/mobile/dressed_commoner_naboo_human_female_05.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_noble_fat_human_female_02.lua
3
2248
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_noble_fat_human_female_02 = object_mobile_shared_dressed_noble_fat_human_female_02:new { } ObjectTemplates:addTemplate(object_mobile_dressed_noble_fat_human_female_02, "object/mobile/dressed_noble_fat_human_female_02.iff")
agpl-3.0
DailyShana/ygopro-scripts
c50277973.lua
3
1661
--鏡像のスワンプマン function c50277973.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c50277973.target) e1:SetOperation(c50277973.activate) c:RegisterEffect(e1) end function c50277973.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local rac=0 local crac=1 for irac=0,23 do local catt=1 for iatt=0,7 do if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,crac,catt) then rac=rac+crac break end catt=catt*2 end crac=crac*2 end e:SetLabel(rac) return rac~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.Hint(HINT_SELECTMSG,tp,563) local crac=Duel.AnnounceRace(tp,1,e:GetLabel()) local att=0 local catt=1 for iatt=0,7 do if Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,crac,catt) then att=att+catt end catt=catt*2 end Duel.Hint(HINT_SELECTMSG,tp,562) catt=Duel.AnnounceAttribute(tp,1,att) e:SetLabel(crac) Duel.SetTargetParam(catt) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c50277973.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local rac=e:GetLabel() local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50277973,0,0x11,1800,1000,4,rac,att) then return end c:AddTrapMonsterAttribute(TYPE_NORMAL,att,rac,4,1800,1000) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) c:TrapMonsterBlock() end
gpl-2.0
DailyShana/ygopro-scripts
c20127343.lua
3
1259
--A・ジェネクス・チェンジャー function c20127343.initial_effect(c) --att change local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(20127343,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(c20127343.costg) e1:SetOperation(c20127343.cosop) c:RegisterEffect(e1) end function c20127343.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,0) local att=Duel.AnnounceAttribute(tp,1,0x7f) e:SetLabel(att) end function c20127343.cosop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(e:GetLabel()) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end end
gpl-2.0
Whitechaser/darkstar
scripts/globals/items/serving_of_karni_yarik_+1.lua
2
1304
----------------------------------------- -- ID: 5589 -- Item: serving_of_karni_yarik_+1 -- Food Effect: 60Min, All Races ----------------------------------------- -- Agility 4 -- Vitality -2 -- Attack % 22 (cap 70) -- Ranged Attack % 22 (cap 70) -- Evasion +7 ----------------------------------------- require("scripts/globals/status"); ----------------------------------------- function onItemCheck(target) local result = 0; if (target:hasStatusEffect(dsp.effects.FOOD) == true or target:hasStatusEffect(dsp.effects.FIELD_SUPPORT_FOOD) == true) then result = 246; end return result; end; function onItemUse(target) target:addStatusEffect(dsp.effects.FOOD,0,0,3600,5589); end; function onEffectGain(target, effect) target:addMod(MOD_AGI, 4); target:addMod(MOD_VIT, -2); target:addMod(MOD_FOOD_ATTP, 22); target:addMod(MOD_FOOD_ATT_CAP, 70); target:addMod(MOD_FOOD_RATTP, 22); target:addMod(MOD_FOOD_RATT_CAP, 70); target:addMod(MOD_EVA, 7); end; function onEffectLose(target, effect) target:delMod(MOD_AGI, 4); target:delMod(MOD_VIT, -2); target:delMod(MOD_FOOD_ATTP, 22); target:delMod(MOD_FOOD_ATT_CAP, 70); target:delMod(MOD_FOOD_RATTP, 22); target:delMod(MOD_FOOD_RATT_CAP, 70); target:delMod(MOD_EVA, 7); end;
gpl-3.0
Whitechaser/darkstar
scripts/zones/Northern_San_dOria/npcs/Taulenne.lua
4
4766
----------------------------------- -- Area: Northern San d'Oria -- NPC: Taulenne -- Armor Storage NPC ----------------------------------- package.loaded["scripts/zones/Northern_San_dOria/TextIDs"] = nil; package.loaded["scripts/globals/armorstorage"] = nil; ----------------------------------- require("scripts/zones/Northern_San_dOria/TextIDs"); require("scripts/globals/armorstorage"); require("scripts/globals/settings"); require("scripts/globals/quests"); local Deposit = 0x0304; local Withdrawl = 0x0305; local ArraySize = #StorageArray; local G1 = 0; local G2 = 0; local G3 = 0; local G4 = 0; local G5 = 0; function onTrade(player,npc,trade) local FlyerForRegine = player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE); if (FlyerForRegine == 1) then local count = trade:getItemCount(); local MagicFlyer = trade:hasItemQty(532,1); if (MagicFlyer == true and count == 1) then player:messageSpecial(FLYER_REFUSED); end end for SetId = 1,ArraySize,11 do local TradeCount = trade:getItemCount(); local T1 = trade:hasItemQty(StorageArray[SetId + 5],1); if (T1 == true) then if (player:hasKeyItem(StorageArray[SetId + 10]) == false) then if (TradeCount == StorageArray[SetId + 3]) then local T2 = trade:hasItemQty(StorageArray[SetId + 4],1); local T3 = trade:hasItemQty(StorageArray[SetId + 6],1); local T4 = trade:hasItemQty(StorageArray[SetId + 7],1); local T5 = trade:hasItemQty(StorageArray[SetId + 8],1); if (StorageArray[SetId + 4] == 0) then T2 = true; end if (StorageArray[SetId + 6] == 0) then T3 = true; end if (StorageArray[SetId + 7] == 0) then T4 = true; end if (StorageArray[SetId + 8] == 0) then T5 = true; end if (T2 == true and T3 == true and T4 == true and T5 == true) then player:startEvent(Deposit,0,0,0,0,0,StorageArray[SetId + 9]); player:addKeyItem(StorageArray[SetId + 10]); player:messageSpecial(KEYITEM_OBTAINED,StorageArray[SetId + 10]); break; end end end end end end; function onTrigger(player,npc) local CurrGil = player:getGil(); for KeyItem = 11,ArraySize,11 do if player:hasKeyItem(StorageArray[KeyItem]) then if StorageArray[KeyItem - 9] == 1 then G1 = G1 + StorageArray[KeyItem - 8]; elseif StorageArray[KeyItem - 9] == 2 then G2 = G2 + StorageArray[KeyItem - 8]; elseif StorageArray[KeyItem - 9] == 3 then G3 = G3 + StorageArray[KeyItem - 8]; elseif StorageArray[KeyItem - 9] == 4 then G4 = G4 + StorageArray[KeyItem - 8]; elseif StorageArray[KeyItem - 9] == 6 then G5 = G5 + StorageArray[KeyItem - 8]; end end end player:startEvent(Withdrawl,G1,G2,G3,G4,CurrGil,G5); end; function onEventUpdate(player,csid,option) if (csid == Withdrawl) then player:updateEvent( StorageArray[option * 11 - 6], StorageArray[option * 11 - 5], StorageArray[option * 11 - 4], StorageArray[option * 11 - 3], StorageArray[option * 11 - 2], StorageArray[option * 11 - 1]); end end; function onEventFinish(player,csid,option) if (csid == Withdrawl) then if (option > 0 and option <= StorageArray[ArraySize] - 10) then if (player:getFreeSlotsCount() >= StorageArray[option * 11 - 7]) then for Item = 2,6,1 do if (StorageArray[option * 11 - Item] > 0) then player:addItem(StorageArray[option * 11 - Item],1); player:messageSpecial(ITEM_OBTAINED,StorageArray[option * 11 - Item]); end end player:delKeyItem(StorageArray[option * 11]); player:setGil(player:getGil() - StorageArray[option * 11 - 1]); else for Item = 2,6,1 do if (StorageArray[option * 11 - Item] > 0) then player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,StorageArray[option * 11 - Item]); end end end end end if (csid == Deposit) then player:tradeComplete(); end end;
gpl-3.0
Zefiros-Software/premake-core
src/base/global.lua
21
2163
--- -- global.lua -- The global container holds workspaces and rules. -- Copyright (c) 2014-2015 Jason Perkins and the Premake project --- local p = premake p.global = p.api.container("global") local global = p.global --- -- Create a new global container instance. --- function global.new(name) return p.container.new(p.global, name) end --- -- Bakes the global scope. --- function global.bake(self) p.container.bakeChildren(self) end --- -- Iterate over the collection of rules in a session. -- -- @returns -- An iterator function. --- function global.eachRule() local root = p.api.rootContainer() return p.container.eachChild(root, p.rule) end --- -- Iterate over the collection of workspaces in a session. -- -- @returns -- A workspace iterator function. --- function global.eachWorkspace() local root = p.api.rootContainer() return p.container.eachChild(root, p.workspace) end p.alias(global, "eachWorkspace", "eachSolution") --- -- Retrieve a rule by name or index. -- -- @param key -- The rule key, either a string name or integer index. -- @returns -- The rule with the provided key. --- function global.getRule(key) local root = p.api.rootContainer() return root.rules[key] end --- -- Retrieve the rule to applies to the provided file name, if any such -- rule exists. -- -- @param fname -- The name of the file. -- @param rules -- A list of rule names to be included in the search. If not specified, -- all rules will be checked. -- @returns -- The rule, is one has been registered, or nil. --- function global.getRuleForFile(fname, rules) for rule in global.eachRule() do if not rules or table.contains(rules, rule.name) then if path.hasextension(fname, rule.fileextension) then return rule end end end end --- -- Retrieve a workspace by name or index. -- -- @param key -- The workspace key, either a string name or integer index. -- @returns -- The workspace with the provided key. --- function global.getWorkspace(key) local root = p.api.rootContainer() return root.workspaces[key] end p.alias(global, "getWorkspace", "getSolution")
bsd-3-clause
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/player/construction/construction_player_house_generic_large_style_02.lua
3
2418
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_building_player_construction_construction_player_house_generic_large_style_02 = object_building_player_construction_shared_construction_player_house_generic_large_style_02:new { gameObjectType = 4096 } ObjectTemplates:addTemplate(object_building_player_construction_construction_player_house_generic_large_style_02, "object/building/player/construction/construction_player_house_generic_large_style_02.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/mobile/dressed_rebel_trooper_twk_female_01.lua
3
2256
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_mobile_dressed_rebel_trooper_twk_female_01 = object_mobile_shared_dressed_rebel_trooper_twk_female_01:new { } ObjectTemplates:addTemplate(object_mobile_dressed_rebel_trooper_twk_female_01, "object/mobile/dressed_rebel_trooper_twk_female_01.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/static/space/asteroid/planetoid_ice_01.lua
3
2240
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_static_space_asteroid_planetoid_ice_01 = object_static_space_asteroid_shared_planetoid_ice_01:new { } ObjectTemplates:addTemplate(object_static_space_asteroid_planetoid_ice_01, "object/static/space/asteroid/planetoid_ice_01.iff")
agpl-3.0
TelebotTG/telebot
plugins/chat.lua
1
1386
local function run(msg)if msg.text == if msg.text == "Pesaram" then return "من پسر تو نیستم مرتیکه" end if msg.text == "pesaram" then return "من پسر تو نیستم مرتیکه" end if msg.text == "ALI" then return "با بابای من چیکار داری" end if msg.text == "ali" then return "با بابای من چیکار داری" end if msg.text == "Ali" then return "با بابای من چیکار داری" end if msg.text == "hi" then return "Hello bb" end if msg.text == "Hi" then return "Hello honey" end if msg.text == "Hello" then return "Hi bb" end if msg.text == "hello" then return "Hi honey" end if msg.text == "Salam" then return "Salam aleykom" end if msg.text == "salam" then return "salam" end if msg.text == "Telewild" then return "Yes?" end if msg.text == "telewild" then return "What?" end if msg.text == "bot" then return "hum?" end if msg.text == "Bot" then return "Hum?" end if msg.text == "?" then return "Hum??" end if msg.text == "Bye" then return "Babay" end if msg.text == "bye" then return "Bye Bye" end end return { description = "Chat With Robot Server", usage = "chat with robot", patterns = { "^[Pp]esaram$", "^[Aa]li$", "^[Hh]i$", "^[Hh]ello$", "^[Bb]ot$", "^[Tt]elewild$", "^[Bb]ye$", "^?$", "^[Ss]alam$", }, run = run, --privileged = true, pre_process = pre_process }
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/bug_jar/serverobjects.lua
3
2455
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --Children folder includes -- Server Objects includeFile("tangible/bug_jar/craftable_bug_habitat.lua") includeFile("tangible/bug_jar/sample_bats.lua") includeFile("tangible/bug_jar/sample_bees.lua") includeFile("tangible/bug_jar/sample_bugs.lua") includeFile("tangible/bug_jar/sample_butterflies.lua") includeFile("tangible/bug_jar/sample_flies.lua") includeFile("tangible/bug_jar/sample_glowzees.lua") includeFile("tangible/bug_jar/sample_moths.lua")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/mobile/misc/nikto.lua
1
1201
nikto = Creature:new { objectName = "@mob/creature_names:patron_nikto", socialGroup = "townsperson", faction = "townsperson", level = 100, chanceHit = 1, damageMin = 645, damageMax = 1000, baseXp = 9429, baseHAM = 24000, baseHAMmax = 30000, armor = 0, resists = {0,0,0,0,0,0,0,0,-1}, meatType = "", meatAmount = 0, hideType = "", hideAmount = 0, boneType = "", boneAmount = 0, milk = 0, tamingChance = 0, ferocity = 0, pvpBitmask = NONE, creatureBitmask = PACK, optionsBitmask = 128, diet = HERBIVORE, templates = {"object/mobile/dressed_commoner_tatooine_nikto_male_01.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_02.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_03.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_04.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_05.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_06.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_07.iff", "object/mobile/dressed_commoner_tatooine_nikto_male_08.iff" }, lootGroups = {}, weapons = {}, conversationTemplate = "", attacks = { } } CreatureTemplates:addCreatureTemplate(nikto, "nikto")
agpl-3.0
DailyShana/ygopro-scripts
c13108445.lua
3
2178
--ジェムナイト・アクアマリナ function c13108445.initial_effect(c) --fusion material c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,27126980,aux.FilterBoolFunction(Card.IsSetCard,0x1047),1,false,false) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCode(EFFECT_SPSUMMON_CONDITION) e2:SetValue(c13108445.splimit) c:RegisterEffect(e2) --to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(13108445,0)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_TO_GRAVE) e3:SetCondition(c13108445.thcon) e3:SetTarget(c13108445.thtg) e3:SetOperation(c13108445.thop) c:RegisterEffect(e3) --to defence local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_PHASE+PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(c13108445.poscon) e4:SetOperation(c13108445.posop) c:RegisterEffect(e4) end function c13108445.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function c13108445.thcon(e,tp,eg,ep,ev,re,r,rp) return bit.band(e:GetHandler():GetPreviousLocation(),LOCATION_ONFIELD)~=0 end function c13108445.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) end function c13108445.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function c13108445.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetAttackedCount()>0 end function c13108445.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENCE) end end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/crafted/repair/repair_kit_armor.lua
3
2673
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_ship_crafted_repair_repair_kit_armor = object_tangible_ship_crafted_repair_shared_repair_kit_armor:new { numberExperimentalProperties = {1, 1, 2}, experimentalProperties = {"XX", "XX", "CD", "OQ"}, experimentalWeights = {1, 1, 1, 3}, experimentalGroupTitles = {"null", "null", "exp_repaircharges"}, experimentalSubGroupTitles = {"null", "null", "repaircharges"}, experimentalMin = {0, 0, 8000}, experimentalMax = {0, 0, 12000}, experimentalPrecision = {0, 0, 0}, experimentalCombineType = {0, 0, 1}, } ObjectTemplates:addTemplate(object_tangible_ship_crafted_repair_repair_kit_armor, "object/tangible/ship/crafted/repair/repair_kit_armor.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/component/chemistry/release_mechanism_duration_advanced.lua
3
2830
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_component_chemistry_release_mechanism_duration_advanced = object_tangible_component_chemistry_shared_release_mechanism_duration_advanced:new { numberExperimentalProperties = {1, 1, 2, 1, 1}, experimentalProperties = {"XX", "XX", "OQ", "PE", "XX", "XX"}, experimentalWeights = {1, 1, 2, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "exp_effectiveness", "null", "null"}, experimentalSubGroupTitles = {"null", "null", "power", "charges", "hitpoints"}, experimentalMin = {0, 0, 10, 0, 1000}, experimentalMax = {0, 0, 75, 0, 1000}, experimentalPrecision = {0, 0, 0, 0, 0}, experimentalCombineType = {0, 0, 1, 1, 4}, } ObjectTemplates:addTemplate(object_tangible_component_chemistry_release_mechanism_duration_advanced, "object/tangible/component/chemistry/release_mechanism_duration_advanced.iff")
agpl-3.0
jacobdufault/OpenRA
lua/stacktraceplus.lua
59
12006
-- tables local _G = _G local string, io, debug, coroutine = string, io, debug, coroutine -- functions local tostring, print, require = tostring, print, require local next, assert = next, assert local pcall, type, pairs, ipairs = pcall, type, pairs, ipairs local error = error assert(debug, "debug table must be available at this point") local io_open = io.open local string_gmatch = string.gmatch local string_sub = string.sub local table_concat = table.concat local _M = { max_tb_output_len = 70 -- controls the maximum length of the 'stringified' table before cutting with ' (more...)' } -- this tables should be weak so the elements in them won't become uncollectable local m_known_tables = { [_G] = "_G (global table)" } local function add_known_module(name, desc) local ok, mod = pcall(require, name) if ok then m_known_tables[mod] = desc end end add_known_module("string", "string module") add_known_module("io", "io module") add_known_module("os", "os module") add_known_module("table", "table module") add_known_module("math", "math module") add_known_module("package", "package module") add_known_module("debug", "debug module") add_known_module("coroutine", "coroutine module") -- lua5.2 add_known_module("bit32", "bit32 module") -- luajit add_known_module("bit", "bit module") add_known_module("jit", "jit module") local m_user_known_tables = {} local m_known_functions = {} for _, name in ipairs{ -- Lua 5.2, 5.1 "assert", "collectgarbage", "dofile", "error", "getmetatable", "ipairs", "load", "loadfile", "next", "pairs", "pcall", "print", "rawequal", "rawget", "rawlen", "rawset", "require", "select", "setmetatable", "tonumber", "tostring", "type", "xpcall", -- Lua 5.1 "gcinfo", "getfenv", "loadstring", "module", "newproxy", "setfenv", "unpack", -- TODO: add table.* etc functions } do if _G[name] then m_known_functions[_G[name]] = name end end local m_user_known_functions = {} local function safe_tostring (value) local ok, err = pcall(tostring, value) if ok then return err else return ("<failed to get printable value>: '%s'"):format(err) end end -- Private: -- Parses a line, looking for possible function definitions (in a very naïve way) -- Returns '(anonymous)' if no function name was found in the line local function ParseLine(line) assert(type(line) == "string") --print(line) local match = line:match("^%s*function%s+(%w+)") if match then --print("+++++++++++++function", match) return match end match = line:match("^%s*local%s+function%s+(%w+)") if match then --print("++++++++++++local", match) return match end match = line:match("^%s*local%s+(%w+)%s+=%s+function") if match then --print("++++++++++++local func", match) return match end match = line:match("%s*function%s*%(") -- this is an anonymous function if match then --print("+++++++++++++function2", match) return "(anonymous)" end return "(anonymous)" end -- Private: -- Tries to guess a function's name when the debug info structure does not have it. -- It parses either the file or the string where the function is defined. -- Returns '?' if the line where the function is defined is not found local function GuessFunctionName(info) --print("guessing function name") if type(info.source) == "string" and info.source:sub(1,1) == "@" then local file, err = io_open(info.source:sub(2), "r") if not file then print("file not found: "..tostring(err)) -- whoops! return "?" end local line for i = 1, info.linedefined do line = file:read("*l") end if not line then print("line not found") -- whoops! return "?" end return ParseLine(line) else local line local lineNumber = 0 for l in string_gmatch(info.source, "([^\n]+)\n-") do lineNumber = lineNumber + 1 if lineNumber == info.linedefined then line = l break end end if not line then print("line not found") -- whoops! return "?" end return ParseLine(line) end end --- -- Dumper instances are used to analyze stacks and collect its information. -- local Dumper = {} Dumper.new = function(thread) local t = { lines = {} } for k,v in pairs(Dumper) do t[k] = v end t.dumping_same_thread = (thread == coroutine.running()) -- if a thread was supplied, bind it to debug.info and debug.get -- we also need to skip this additional level we are introducing in the callstack (only if we are running -- in the same thread we're inspecting) if type(thread) == "thread" then t.getinfo = function(level, what) if t.dumping_same_thread and type(level) == "number" then level = level + 1 end return debug.getinfo(thread, level, what) end t.getlocal = function(level, loc) if t.dumping_same_thread then level = level + 1 end return debug.getlocal(thread, level, loc) end else t.getinfo = debug.getinfo t.getlocal = debug.getlocal end return t end -- helpers for collecting strings to be used when assembling the final trace function Dumper:add (text) self.lines[#self.lines + 1] = text end function Dumper:add_f (fmt, ...) self:add(fmt:format(...)) end function Dumper:concat_lines () return table_concat(self.lines) end --- -- Private: -- Iterates over the local variables of a given function. -- -- @param level The stack level where the function is. -- function Dumper:DumpLocals (level) local prefix = "\t " local i = 1 if self.dumping_same_thread then level = level + 1 end local name, value = self.getlocal(level, i) if not name then return end self:add("\tLocal variables:\r\n") while name do if type(value) == "number" then self:add_f("%s%s = number: %g\r\n", prefix, name, value) elseif type(value) == "boolean" then self:add_f("%s%s = boolean: %s\r\n", prefix, name, tostring(value)) elseif type(value) == "string" then self:add_f("%s%s = string: %q\r\n", prefix, name, value) elseif type(value) == "userdata" then self:add_f("%s%s = %s\r\n", prefix, name, safe_tostring(value)) elseif type(value) == "nil" then self:add_f("%s%s = nil\r\n", prefix, name) elseif type(value) == "table" then if m_known_tables[value] then self:add_f("%s%s = %s\r\n", prefix, name, m_known_tables[value]) elseif m_user_known_tables[value] then self:add_f("%s%s = %s\r\n", prefix, name, m_user_known_tables[value]) else local txt = "{" for k,v in pairs(value) do txt = txt..safe_tostring(k)..":"..safe_tostring(v) if #txt > _M.max_tb_output_len then txt = txt.." (more...)" break end if next(value, k) then txt = txt..", " end end self:add_f("%s%s = %s %s\r\n", prefix, name, safe_tostring(value), txt.."}") end elseif type(value) == "function" then local info = self.getinfo(value, "nS") local fun_name = info.name or m_known_functions[value] or m_user_known_functions[value] if info.what == "C" then self:add_f("%s%s = C %s\r\n", prefix, name, (fun_name and ("function: " .. fun_name) or tostring(value))) else local source = info.short_src if source:sub(2,7) == "string" then source = source:sub(9) end --for k,v in pairs(info) do print(k,v) end fun_name = fun_name or GuessFunctionName(info) self:add_f("%s%s = Lua function '%s' (defined at line %d of chunk %s)\r\n", prefix, name, fun_name, info.linedefined, source) end elseif type(value) == "thread" then self:add_f("%sthread %q = %s\r\n", prefix, name, tostring(value)) end i = i + 1 name, value = self.getlocal(level, i) end end --- -- Public: -- Collects a detailed stack trace, dumping locals, resolving function names when they're not available, etc. -- This function is suitable to be used as an error handler with pcall or xpcall -- -- @param thread An optional thread whose stack is to be inspected (defaul is the current thread) -- @param message An optional error string or object. -- @param level An optional number telling at which level to start the traceback (default is 1) -- -- Returns a string with the stack trace and a string with the original error. -- function _M.stacktrace(thread, message, level) if type(thread) ~= "thread" then -- shift parameters left thread, message, level = nil, thread, message end thread = thread or coroutine.running() level = level or 1 local dumper = Dumper.new(thread) local original_error if type(message) == "table" then dumper:add("an error object {\r\n") local first = true for k,v in pairs(message) do if first then dumper:add(" ") first = false else dumper:add(",\r\n ") end dumper:add(safe_tostring(k)) dumper:add(": ") dumper:add(safe_tostring(v)) end dumper:add("\r\n}") original_error = dumper:concat_lines() elseif type(message) == "string" then dumper:add(message) original_error = message end dumper:add("\r\n") dumper:add[[ Stack Traceback =============== ]] --print(error_message) local level_to_show = level if dumper.dumping_same_thread then level = level + 1 end local info = dumper.getinfo(level, "nSlf") while info do if info.what == "main" then if string_sub(info.source, 1, 1) == "@" then dumper:add_f("(%d) main chunk of file '%s' at line %d\r\n", level_to_show, string_sub(info.source, 2), info.currentline) else dumper:add_f("(%d) main chunk of %s at line %d\r\n", level_to_show, info.short_src, info.currentline) end elseif info.what == "C" then --print(info.namewhat, info.name) --for k,v in pairs(info) do print(k,v, type(v)) end local function_name = m_user_known_functions[info.func] or m_known_functions[info.func] or info.name or tostring(info.func) dumper:add_f("(%d) %s C function '%s'\r\n", level_to_show, info.namewhat, function_name) --dumper:add_f("%s%s = C %s\r\n", prefix, name, (m_known_functions[value] and ("function: " .. m_known_functions[value]) or tostring(value))) elseif info.what == "tail" then --print("tail") --for k,v in pairs(info) do print(k,v, type(v)) end--print(info.namewhat, info.name) dumper:add_f("(%d) tail call\r\n", level_to_show) dumper:DumpLocals(level) elseif info.what == "Lua" then local source = info.short_src local function_name = m_user_known_functions[info.func] or m_known_functions[info.func] or info.name if source:sub(2, 7) == "string" then source = source:sub(9) end local was_guessed = false if not function_name or function_name == "?" then --for k,v in pairs(info) do print(k,v, type(v)) end function_name = GuessFunctionName(info) was_guessed = true end -- test if we have a file name local function_type = (info.namewhat == "") and "function" or info.namewhat if info.source and info.source:sub(1, 1) == "@" then dumper:add_f("(%d) Lua %s '%s' at file '%s:%d'%s\r\n", level_to_show, function_type, function_name, info.source:sub(2), info.currentline, was_guessed and " (best guess)" or "") elseif info.source and info.source:sub(1,1) == '#' then dumper:add_f("(%d) Lua %s '%s' at template '%s:%d'%s\r\n", level_to_show, function_type, function_name, info.source:sub(2), info.currentline, was_guessed and " (best guess)" or "") else dumper:add_f("(%d) Lua %s '%s' at line %d of chunk '%s'\r\n", level_to_show, function_type, function_name, info.currentline, source) end dumper:DumpLocals(level) else dumper:add_f("(%d) unknown frame %s\r\n", level_to_show, info.what) end level = level + 1 level_to_show = level_to_show + 1 info = dumper.getinfo(level, "nSlf") end return dumper:concat_lines(), original_error end -- -- Adds a table to the list of known tables function _M.add_known_table(tab, description) if m_known_tables[tab] then error("Cannot override an already known table") end m_user_known_tables[tab] = description end -- -- Adds a function to the list of known functions function _M.add_known_function(fun, description) if m_known_functions[fun] then error("Cannot override an already known function") end m_user_known_functions[fun] = description end return _M
gpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/component/armor/armor_layer_blast.lua
1
3273
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_component_armor_armor_layer_blast = object_tangible_component_armor_shared_armor_layer_blast:new { numberExperimentalProperties = {1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1}, experimentalProperties = {"XX", "XX", "XX", "OQ", "SR", "OQ", "UT", "MA", "OQ", "MA", "OQ", "MA", "OQ", "XX", "XX", "OQ", "SR", "XX"}, experimentalWeights = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, experimentalGroupTitles = {"null", "null", "exp_durability", "exp_quality", "exp_durability", "exp_durability", "exp_durability", "exp_durability", "null", "null", "exp_resistance", "null"}, experimentalSubGroupTitles = {"null", "null", "hit_points", "armor_effectiveness", "armor_integrity", "armor_health_encumbrance", "armor_action_encumbrance", "armor_mind_encumbrance", "armor_rating", "armor_special_type", "armor_special_effectiveness", "armor_special_integrity"}, experimentalMin = {0, 0, 1000, 1, 100, 8, 8, 8, 1, 4, 1, 20}, experimentalMax = {0, 0, 1000, 5, 1000, 0, 0, 0, 1, 4, 15, 50}, experimentalPrecision = {0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0}, experimentalCombineType = {0, 0, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1}, } ObjectTemplates:addTemplate(object_tangible_component_armor_armor_layer_blast, "object/tangible/component/armor/armor_layer_blast.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/mission/quest_item/fixer_q3_needed.lua
3
2260
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_mission_quest_item_fixer_q3_needed = object_tangible_mission_quest_item_shared_fixer_q3_needed:new { } ObjectTemplates:addTemplate(object_tangible_mission_quest_item_fixer_q3_needed, "object/tangible/mission/quest_item/fixer_q3_needed.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/lair/ronto/lair_ronto.lua
2
2260
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_lair_ronto_lair_ronto = object_tangible_lair_ronto_shared_lair_ronto:new { objectMenuComponent = {"cpp", "LairMenuComponent"}, } ObjectTemplates:addTemplate(object_tangible_lair_ronto_lair_ronto, "object/tangible/lair/ronto/lair_ronto.iff")
agpl-3.0
Whitechaser/darkstar
scripts/globals/effects/light_arts.lua
2
2077
----------------------------------- -- -- -- ----------------------------------- ----------------------------------- -- onEffectGain Action ----------------------------------- function onEffectGain(target,effect) target:recalculateAbilitiesTable(); local bonus = effect:getPower(); local regen = effect:getSubPower(); target:addMod(MOD_WHITE_MAGIC_COST, -bonus); target:addMod(MOD_WHITE_MAGIC_CAST, -bonus); target:addMod(MOD_WHITE_MAGIC_RECAST, -bonus); if not (target:hasStatusEffect(dsp.effects.TABULA_RASA)) then target:addMod(MOD_WHITE_MAGIC_COST, -10); target:addMod(MOD_WHITE_MAGIC_CAST, -10); target:addMod(MOD_WHITE_MAGIC_RECAST, -10); target:addMod(MOD_BLACK_MAGIC_COST, 20); target:addMod(MOD_BLACK_MAGIC_CAST, 20); target:addMod(MOD_BLACK_MAGIC_RECAST, 20); target:addMod(MOD_LIGHT_ARTS_REGEN, regen); target:addMod(MOD_REGEN_DURATION, regen*2); end target:recalculateSkillsTable(); end; ----------------------------------- -- onEffectTick Action ----------------------------------- function onEffectTick(target,effect) end; ----------------------------------- -- onEffectLose Action ----------------------------------- function onEffectLose(target,effect) target:recalculateAbilitiesTable(); local bonus = effect:getPower(); local regen = effect:getSubPower(); target:delMod(MOD_WHITE_MAGIC_COST, -bonus); target:delMod(MOD_WHITE_MAGIC_CAST, -bonus); target:delMod(MOD_WHITE_MAGIC_RECAST, -bonus); if not (target:hasStatusEffect(dsp.effects.TABULA_RASA)) then target:delMod(MOD_WHITE_MAGIC_COST, -10); target:delMod(MOD_WHITE_MAGIC_CAST, -10); target:delMod(MOD_WHITE_MAGIC_RECAST, -10); target:delMod(MOD_BLACK_MAGIC_COST, 20); target:delMod(MOD_BLACK_MAGIC_CAST, 20); target:delMod(MOD_BLACK_MAGIC_RECAST, 20); target:delMod(MOD_LIGHT_ARTS_REGEN, regen); target:delMod(MOD_REGEN_DURATION, regen*2); end target:recalculateSkillsTable(); end;
gpl-3.0
epitech-labfree/vlc-1.1-encre
share/lua/playlist/jamendo.lua
6
3030
--[[ $Id$ Copyright © 2010 VideoLAN and AUTHORS Authors: Fabio Ritrovato <sephiroth87 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. --]] require "simplexml" -- Probe function. function probe() return vlc.access == "http" and string.match( vlc.path, "jamendo.com/get2/" ) and string.match( vlc.path, "/track/xml/" ) end -- Parse function. function parse() local page = "" while true do local line = vlc.readline() if line == nil then break end page = page .. line end local tracks = {} local tree = simplexml.parse_string( page ) for _, track in ipairs( tree.children ) do simplexml.add_name_maps( track ) if track.children_map["id"] == nil and track.children_map["stream"] == nil then vlc.msg.err( "No track id or stream URL, not enough info to add tracks..." ) return {} end local stream_url if track.children_map["id"][1].children[1] then stream_url = "http://api.jamendo.com/get2/stream/track/redirect/?id=" .. track.children_map["id"][1].children[1] else stream_url = track.children_map["stream"][1].children[1] end table.insert( tracks, {path=stream_url, arturl=track.children_map["album_image"] and track.children_map["album_image"][1].children[1] or ( track.children_map["album_id"] and "http://imgjam.com/albums/".. track.children_map["album_id"][1].children[1] .. "/covers/1.500.jpg" or nil ), title=track.children_map["name"] and track.children_map["name"][1].children[1] or nil, artist=track.children_map["artist_name"] and track.children_map["artist_name"][1].children[1] or nil, album=track.children_map["album_name"] and track.children_map["album_name"][1].children[1] or nil, genre=track.children_map["album_genre"] and track.children_map["album_genre"][1].children[1] or nil, duration=track.children_map["duration"] and track.children_map["duration"][1].children[1] or nil, date=track.children_map["album_dates"] and track.children_map["album_dates"][1].children_map["year"][1].children[1] or nil} ) end return tracks end
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/space/reactor/objects.lua
3
26254
--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_draft_schematic_space_reactor_shared_basic_reactor = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_basic_reactor.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 366234772, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_basic_reactor, "object/draft_schematic/space/reactor/shared_basic_reactor.iff") object_draft_schematic_space_reactor_shared_fusion_reactor_mk1 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_fusion_reactor_mk1.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 3664496596, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_fusion_reactor_mk1, "object/draft_schematic/space/reactor/shared_fusion_reactor_mk1.iff") object_draft_schematic_space_reactor_shared_fusion_reactor_mk2 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_fusion_reactor_mk2.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 24932163, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_fusion_reactor_mk2, "object/draft_schematic/space/reactor/shared_fusion_reactor_mk2.iff") object_draft_schematic_space_reactor_shared_fusion_reactor_mk3 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_fusion_reactor_mk3.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 1215367374, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_fusion_reactor_mk3, "object/draft_schematic/space/reactor/shared_fusion_reactor_mk3.iff") object_draft_schematic_space_reactor_shared_fusion_reactor_mk4 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_fusion_reactor_mk4.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 3012699098, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_fusion_reactor_mk4, "object/draft_schematic/space/reactor/shared_fusion_reactor_mk4.iff") object_draft_schematic_space_reactor_shared_fusion_reactor_mk5 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_fusion_reactor_mk5.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 4204741719, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_fusion_reactor_mk5, "object/draft_schematic/space/reactor/shared_fusion_reactor_mk5.iff") object_draft_schematic_space_reactor_shared_reactor_limiter_mk1 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_limiter_mk1.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 3282952808, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_limiter_mk1, "object/draft_schematic/space/reactor/shared_reactor_limiter_mk1.iff") object_draft_schematic_space_reactor_shared_reactor_limiter_mk2 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_limiter_mk2.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 414862079, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_limiter_mk2, "object/draft_schematic/space/reactor/shared_reactor_limiter_mk2.iff") object_draft_schematic_space_reactor_shared_reactor_limiter_mk3 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_limiter_mk3.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 1370959218, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_limiter_mk3, "object/draft_schematic/space/reactor/shared_reactor_limiter_mk3.iff") object_draft_schematic_space_reactor_shared_reactor_limiter_mk4 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_limiter_mk4.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 2857633382, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_limiter_mk4, "object/draft_schematic/space/reactor/shared_reactor_limiter_mk4.iff") object_draft_schematic_space_reactor_shared_reactor_limiter_mk5 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_limiter_mk5.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 3814285803, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_limiter_mk5, "object/draft_schematic/space/reactor/shared_reactor_limiter_mk5.iff") object_draft_schematic_space_reactor_shared_reactor_overcharger_mk1 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk1.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 287048772, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_overcharger_mk1, "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk1.iff") object_draft_schematic_space_reactor_shared_reactor_overcharger_mk2 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk2.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 3389762771, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_overcharger_mk2, "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk2.iff") object_draft_schematic_space_reactor_shared_reactor_overcharger_mk3 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk3.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 2198260574, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_overcharger_mk3, "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk3.iff") object_draft_schematic_space_reactor_shared_reactor_overcharger_mk4 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk4.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 2028331082, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_overcharger_mk4, "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk4.iff") object_draft_schematic_space_reactor_shared_reactor_overcharger_mk5 = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk5.iff" --Data below here is deprecated and loaded from the tres, keeping for easy lookups --[[ appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/arrangement_datapad.iff", clearFloraRadius = 0, clientDataFile = "", clientGameObjectType = 2049, collisionActionBlockFlags = 0, collisionActionFlags = 0, collisionActionPassFlags = 0, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 0, collisionMaterialPassFlags = 0, containerType = 0, containerVolumeLimit = 0, detailedDescription = "string_id_table", gameObjectType = 2049, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "string_id_table", onlyVisibleInTools = 0, portalLayoutFilename = "", scale = 0, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "", snapToTerrain = 0, surfaceType = 0, totalCellNumber = 0, clientObjectCRC = 837322695, derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/intangible/base/shared_base_intangible.iff", "object/draft_schematic/base/shared_base_draft_schematic.iff"} ]] } ObjectTemplates:addClientTemplate(object_draft_schematic_space_reactor_shared_reactor_overcharger_mk5, "object/draft_schematic/space/reactor/shared_reactor_overcharger_mk5.iff")
agpl-3.0
Whitechaser/darkstar
scripts/zones/VeLugannon_Palace/TextIDs.lua
5
1118
-- Variable TextID Description text -- General Texts ITEM_CANNOT_BE_OBTAINED = 6380; -- You cannot obtain the item <item> come back again after sorting your inventory ITEM_OBTAINED = 6386; -- Obtained: <item> GIL_OBTAINED = 6387; -- Obtained <number> gil KEYITEM_OBTAINED = 6389; -- Obtained key item: <keyitem> -- Treasure Coffer/Chest Dialog CHEST_UNLOCKED = 7213; -- You unlock the chest! CHEST_FAIL = 7214; -- Fails to open the chest. CHEST_TRAP = 7215; -- The chest was trapped! CHEST_WEAK = 7216; -- You cannot open the chest when you are in a weakened state. CHEST_MIMIC = 7217; -- The chest was a mimic! CHEST_MOOGLE = 7218; -- You cannot open the chest while participating in the moogle event. CHEST_ILLUSION = 7219; -- The chest was but an illusion... CHEST_LOCKED = 7220; -- The chest appears to be locked. -- Other dialog NOTHING_OUT_OF_ORDINARY = 6400; -- There is nothing out of the ordinary here. -- conquest Base CONQUEST_BASE = 7047; -- Tallying conquest results...
gpl-3.0
alireza1998/power-full
plugins/face.lua
641
3073
local https = require("ssl.https") local ltn12 = require "ltn12" -- Edit data/mashape.lua with your Mashape API key -- http://docs.mashape.com/api-keys local mashape = load_from_file('data/mashape.lua', { api_key = '' }) local function request(imageUrl) local api_key = mashape.api_key if api_key:isempty() then return nil, 'Configure your Mashape API Key' end local api = "https://faceplusplus-faceplusplus.p.mashape.com/detection/detect?" local parameters = "attribute=gender%2Cage%2Crace" parameters = parameters .. "&url="..(URL.escape(imageUrl) or "") local url = api..parameters local headers = { ["X-Mashape-Key"] = api_key, ["Accept"] = "Accept: application/json" } print(url) local respbody = {} local body, code = https.request{ url = url, method = "GET", headers = headers, sink = ltn12.sink.table(respbody), protocol = "tlsv1" } if code ~= 200 then return "", code end local body = table.concat(respbody) return body, code end local function parseData(data) local jsonBody = json:decode(data) local response = "" if jsonBody.error ~= nil then if jsonBody.error == "IMAGE_ERROR_FILE_TOO_LARGE" then response = response .. "The image is too big. Provide a smaller image." elseif jsonBody.error == "IMAGE_ERROR_FAILED_TO_DOWNLOAD" then response = response .. "Is that a valid url for an image?" else response = response .. jsonBody.error end elseif jsonBody.face == nil or #jsonBody.face == 0 then response = response .. "No faces found" else response = response .. #jsonBody.face .." face(s) found:\n\n" for k,face in pairs(jsonBody.face) do local raceP = "" if face.attribute.race.confidence > 85.0 then raceP = face.attribute.race.value:lower() elseif face.attribute.race.confidence > 50.0 then raceP = "(probably "..face.attribute.race.value:lower()..")" else raceP = "(posibly "..face.attribute.race.value:lower()..")" end if face.attribute.gender.confidence > 85.0 then response = response .. "There is a " else response = response .. "There may be a " end response = response .. raceP .. " " .. face.attribute.gender.value:lower() .. " " response = response .. ", " .. face.attribute.age.value .. "(±".. face.attribute.age.range ..") years old \n" end end return response end local function run(msg, matches) --return request('http://www.uni-regensburg.de/Fakultaeten/phil_Fak_II/Psychologie/Psy_II/beautycheck/english/durchschnittsgesichter/m(01-32)_gr.jpg') local data, code = request(matches[1]) if code ~= 200 then return "There was an error. "..code end return parseData(data) end return { description = "Who is in that photo?", usage = { "!face [url]", "!recognise [url]" }, patterns = { "^!face (.*)$", "^!recognise (.*)$" }, run = run }
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/ship/components/reactor/rct_sorosuub_turbine_3.lua
3
2308
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_ship_components_reactor_rct_sorosuub_turbine_3 = object_tangible_ship_components_reactor_shared_rct_sorosuub_turbine_3:new { } ObjectTemplates:addTemplate(object_tangible_ship_components_reactor_rct_sorosuub_turbine_3, "object/tangible/ship/components/reactor/rct_sorosuub_turbine_3.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/draft_schematic/weapon/rifle_light_blaster_imperial_scout_carbine.lua
1
3837
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_draft_schematic_weapon_rifle_light_blaster_imperial_scout_carbine = object_draft_schematic_weapon_shared_rifle_light_blaster_imperial_scout_carbine:new { templateType = DRAFTSCHEMATIC, customObjectName = "Elite Carbine", craftingToolTab = 1, -- (See DraftSchemticImplementation.h) complexity = 24, size = 3, xpType = "crafting_weapons_general", xp = 205, assemblySkill = "weapon_assembly", experimentingSkill = "weapon_experimentation", customizationSkill = "weapon_customization", customizationOptions = {}, customizationStringNames = {}, customizationDefaults = {}, ingredientTemplateNames = {"craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n", "craft_weapon_ingredients_n"}, ingredientTitleNames = {"frame_assembly", "receiver_assembly", "grip_assembly", "powerhandler", "barrel", "scope", "stock"}, ingredientSlotType = {0, 0, 0, 1, 1, 3, 3}, resourceTypes = {"steel_ditanium", "iron_polonium", "metal", "object/tangible/component/weapon/shared_blaster_power_handler.iff", "object/tangible/component/weapon/shared_blaster_rifle_barrel.iff", "object/tangible/component/weapon/shared_scope_weapon.iff", "object/tangible/component/weapon/shared_stock.iff"}, resourceQuantities = {65, 25, 12, 4, 1, 1, 1}, contribution = {100, 100, 100, 100, 100, 100, 100}, ingredientAppearance = {"", "", "", "", "muzzle", "scope", "stock"}, targetTemplate = "object/weapon/ranged/carbine/carbine_elite.iff", additionalTemplates = { } } ObjectTemplates:addTemplate(object_draft_schematic_weapon_rifle_light_blaster_imperial_scout_carbine, "object/draft_schematic/weapon/rifle_light_blaster_imperial_scout_carbine.iff")
agpl-3.0
KingRaptor/Zero-K
lups/ParticleClasses/UnitJitter.lua
3
8500
-- $Id: UnitJitter.lua 4454 2009-04-20 11:45:38Z jk $ ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local UnitJitter = {} UnitJitter.__index = UnitJitter local warpShader, warpShader2 local tex local timerUniform local lastCullFace = GL.FRONT ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- function UnitJitter.GetInfo() return { name = "UnitJitter", backup = "", --// backup class, if this class doesn't work (old cards,ati's,etc.) desc = "", layer = 15, --// extreme simply z-ordering :x --// gfx requirement fbo = true, shader = true, distortion= true, intel = 0, } end UnitJitter.Default = { layer = 15, worldspace = true, inverse = false, life = math.huge, unit = -1, unitDefID = 0, team = -1, allyTeam = -1, repeatEffect = false, dieGameFrame = math.huge } local noiseTexture = 'bitmaps/GPL/Lups/perlin_noise.jpg' ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local GL_BACK = GL.BACK local GL_FRONT = GL.FRONT local glCulling = gl.Culling local glUnit = gl.Unit local glUniform = gl.Uniform local glColor = gl.Color local glMultiTexCoord = gl.MultiTexCoord ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- function UnitJitter:BeginDrawDistortion() gl.UseShader(warpShader) gl.Uniform(timerUniform, Spring.GetGameSeconds()*0.1 - 0.5 ) --gl.PolygonOffset(0,-1) lastCullFace = GL_FRONT gl.Culling(GL_FRONT) gl.Texture(0,noiseTexture) gl.PushAttrib(GL.DEPTH_BUFFER_BIT) gl.DepthTest(true) gl.DepthMask(true) end function UnitJitter:EndDrawDistortion() gl.PopAttrib() gl.UseShader(0) gl.Texture(0,false) gl.PolygonOffset(false) gl.Culling(GL_BACK) gl.Culling(false) end function UnitJitter:DrawDistortion() if (self.inverse) then glMultiTexCoord(2, (thisGameFrame-self.firstGameFrame)/self.life ) else glMultiTexCoord(2, 1-((thisGameFrame-self.firstGameFrame)/self.life) ) end if (self.isS3o) then if (lastCullFace~=GL_BACK) then lastCullFace = GL_BACK glCulling(GL_BACK) end else if (lastCullFace~=GL_FRONT) then lastCullFace = GL_FRONT glCulling(GL_FRONT) end end glUnit(self.unit,true,-1) end function UnitJitter:BeginDraw() gl.UseShader(warpShader2) gl.Blending(GL.ONE,GL.ONE) lastCullFace = GL_FRONT gl.Culling(GL_FRONT) gl.Texture(0,noiseTexture) gl.PushAttrib(GL.DEPTH_BUFFER_BIT) gl.DepthTest(true) gl.DepthMask(true) end function UnitJitter:EndDraw() gl.PopAttrib() gl.UseShader(0) gl.Texture(0,false) gl.Blending(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA) gl.PolygonOffset(false) gl.Culling(GL_BACK) gl.Culling(false) gl.Color(1,1,1,1) end function UnitJitter:Draw() if (self.inverse) then glMultiTexCoord(2, (thisGameFrame-self.firstGameFrame)/self.life ) else glMultiTexCoord(2, 1-((thisGameFrame-self.firstGameFrame)/self.life) ) end if (self.isS3o) then if (lastCullFace~=GL_BACK) then lastCullFace = GL_BACK glCulling(GL_BACK) end else if (lastCullFace~=GL_FRONT) then lastCullFace = GL_FRONT glCulling(GL_FRONT) end end glColor(self.teamColor) glUnit(self.unit,true,-1) end ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- function UnitJitter.Initialize() warpShader = gl.CreateShader({ vertex = [[ uniform float timer; varying vec3 texCoord; const vec4 ObjectPlaneS = vec4(0.005, 0.005, 0.000, 0.0); const vec4 ObjectPlaneT = vec4(0.000, 0.005, 0.005, 0.0); void main() { gl_Position = ftransform(); texCoord.s = dot( gl_Vertex, ObjectPlaneS ) + timer; texCoord.t = dot( gl_Vertex, ObjectPlaneT ) + timer; texCoord.z = gl_MultiTexCoord2.x; //life texCoord.z *= abs( dot(normalize(gl_NormalMatrix * gl_Normal), normalize(vec3(gl_ModelViewMatrix * gl_Vertex))) ); texCoord.z *= 0.015; } ]], fragment = [[ uniform sampler2D noiseMap; varying vec3 texCoord; #define life texCoord.z void main(void) { vec2 noiseVec; noiseVec = texture2D(noiseMap, texCoord.st).rg; noiseVec = (noiseVec - 0.50) * life; gl_FragColor = vec4(noiseVec,0.0,gl_FragCoord.z); } ]], uniformInt = { noiseMap = 0, }, uniformFloat = { timer = 0, } }) if (warpShader == nil) then print(PRIO_MAJOR,"LUPS->UnitJitter: critical shader error: "..gl.GetShaderLog()) return false end timerUniform = gl.GetUniformLocation(warpShader, 'timer') warpShader2 = gl.CreateShader({ vertex = [[ void main() { gl_Position = ftransform(); float opac = 1.0-abs( dot(normalize(gl_NormalMatrix * gl_Normal), normalize(vec3(gl_ModelViewMatrix * gl_Vertex))) ); float life = gl_MultiTexCoord2.x; //life gl_FrontColor = mix( gl_Color * (opac+0.15), vec4( opac*opac ), opac * 0.5) * life * 0.75; } ]], fragment = [[ void main(void) { gl_FragColor = gl_Color; } ]], uniformFloat = { life = 1, } }) if (warpShader2 == nil) then print(PRIO_MAJOR,"LUPS->UnitJitter: critical shader2 error: "..gl.GetShaderLog()) return false end end function UnitJitter.Finalize() if (gl.DeleteShader) then gl.DeleteShader(warpShader) end end ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local spGetTeamColor = Spring.GetTeamColor -- used if repeatEffect=true; function UnitJitter:ReInitialize() self.dieGameFrame = self.dieGameFrame + self.life end function UnitJitter:CreateParticle() local name = (UnitDefs[self.unitDefID].model and UnitDefs[self.unitDefID].model.name) or UnitDefs[self.unitDefID].modelname self.isS3o = ((name:lower():find("s3o") or name:lower():find("obj") or name:lower():find("dae")) and true) self.teamColor = {spGetTeamColor(self.team)} self.firstGameFrame = thisGameFrame self.dieGameFrame = self.firstGameFrame + self.life end function UnitJitter:Visible() if self.allyTeam == LocalAllyTeamID then return Spring.IsUnitVisible(self.unit) end local inLos = true if (self.enemyHit) then local x,y,z = Spring.GetUnitPosition(self.unit) if (x==nil) then return false end inLos = select(2, Spring.GetPositionLosState(x,y,z, LocalAllyTeamID)) else local losState = Spring.GetUnitLosState(self.unit, LocalAllyTeamID) or {} inLos = (inLos)and(not losState.los) end return (inLos)and(Spring.IsUnitVisible(self.unit)) end ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- function UnitJitter.Create(Options) SetUnitLuaDraw(Options.unit,true) local newObject = MergeTable(Options, UnitJitter.Default) setmetatable(newObject,UnitJitter) -- make handle lookup newObject:CreateParticle() return newObject end function UnitJitter:Destroy() SetUnitLuaDraw(self.unit,false) end ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- return UnitJitter
gpl-2.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/tangible/hair/zabrak/hair_zabrak_male_s15.lua
3
2252
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_tangible_hair_zabrak_hair_zabrak_male_s15 = object_tangible_hair_zabrak_shared_hair_zabrak_male_s15:new { } ObjectTemplates:addTemplate(object_tangible_hair_zabrak_hair_zabrak_male_s15, "object/tangible/hair/zabrak/hair_zabrak_male_s15.iff")
agpl-3.0
lasko2112/legend-of-hondo
MMOCoreORB/bin/scripts/object/building/military/military_imperial_strategic_base.lua
3
2288
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version object_building_military_military_imperial_strategic_base = object_building_military_shared_military_imperial_strategic_base:new { } ObjectTemplates:addTemplate(object_building_military_military_imperial_strategic_base, "object/building/military/military_imperial_strategic_base.iff")
agpl-3.0