content
stringlengths
5
1.05M
Player=game:GetService("Players").LocalPlayer Character=Player.Character PlayerGui=Player.PlayerGui Backpack=Player.Backpack Torso=Character.Torso Head=Character.Head Humanoid=Character.Humanoid m=Instance.new('Model',Character) LeftArm=Character["Left Arm"] LeftLeg=Character["Left Leg"] RightArm=Character["Right Arm"] RightLeg=Character["Right Leg"] LS=Torso["Left Shoulder"] LH=Torso["Left Hip"] RS=Torso["Right Shoulder"] RH=Torso["Right Hip"] Face = Head.face Neck=Torso.Neck it=Instance.new attacktype=1 vt=Vector3.new cf=CFrame.new euler=CFrame.fromEulerAnglesXYZ angles=CFrame.Angles cloaked=false necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) RootPart=Character.HumanoidRootPart RootJoint=RootPart.RootJoint RootCF=euler(-1.57,0,3.14) attack = false attackdebounce = false deb=false equipped=true hand=false MMouse=nil combo=0 mana=0 trispeed=.2 attackmode='none' local idle=0 local Anim="Idle" local Effects={} local gun=false local shoot=false player=nil mana=0 mouse=Player:GetMouse() --save shoulders RSH, LSH=nil, nil --welds RW, LW=Instance.new("Weld"), Instance.new("Weld") RW.Name="Right Shoulder" LW.Name="Left Shoulder" LH=Torso["Left Hip"] RH=Torso["Right Hip"] TorsoColor=Torso.BrickColor function NoOutline(Part) Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 end player=Player ch=Character RSH=ch.Torso["Right Shoulder"] LSH=ch.Torso["Left Shoulder"] -- RSH.Parent=nil LSH.Parent=nil -- RW.Name="Right Shoulder" RW.Part0=ch.Torso RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) RW.C1=cf(0, 0.5, 0) RW.Part1=ch["Right Arm"] RW.Parent=ch.Torso -- LW.Name="Left Shoulder" LW.Part0=ch.Torso LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) LW.C1=cf(0, 0.5, 0) LW.Part1=ch["Left Arm"] LW.Parent=ch.Torso local function weldBetween(a, b) local weldd = Instance.new("ManualWeld") weldd.Part0 = a weldd.Part1 = b weldd.C0 = CFrame.new() weldd.C1 = b.CFrame:inverse() * a.CFrame weldd.Parent = a return weldd end function swait(num) if num==0 or num==nil then game:service'RunService'.Heartbeat:wait(0) else for i=0,num do game:service'RunService'.Heartbeat:wait(0) end end end function nooutline(part) part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 end function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) local fp=it("Part") fp.formFactor=formfactor fp.Parent=parent fp.Reflectance=reflectance fp.Transparency=transparency fp.CanCollide=false fp.Locked=true fp.BrickColor=BrickColor.new(tostring(brickcolor)) fp.Name=name fp.Size=size fp.Position=Character.Torso.Position nooutline(fp) fp.Material=material fp:BreakJoints() return fp end function mesh(Mesh,part,meshtype,meshid,offset,scale) local mesh=it(Mesh) mesh.Parent=part if Mesh=="SpecialMesh" then mesh.MeshType=meshtype mesh.MeshId=meshid end mesh.Offset=offset mesh.Scale=scale return mesh end function weld(parent,part0,part1,c0,c1) local weld=it("Weld") weld.Parent=parent weld.Part0=part0 weld.Part1=part1 weld.C0=c0 weld.C1=c1 return weld end local function CFrameFromTopBack(at, top, back) local right = top:Cross(back) return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) end function Triangle(a, b, c) local edg1 = (c-a):Dot((b-a).unit) local edg2 = (a-b):Dot((c-b).unit) local edg3 = (b-c):Dot((a-c).unit) if edg1 <= (b-a).magnitude and edg1 >= 0 then a, b, c = a, b, c elseif edg2 <= (c-b).magnitude and edg2 >= 0 then a, b, c = b, c, a elseif edg3 <= (a-c).magnitude and edg3 >= 0 then a, b, c = c, a, b else assert(false, "unreachable") end local len1 = (c-a):Dot((b-a).unit) local len2 = (b-a).magnitude - len1 local width = (a + (b-a).unit*len1 - c).magnitude local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) local list = {} if len1 > 0.01 then local w1 = Instance.new('WedgePart', m) game:GetService("Debris"):AddItem(w1,5) w1.Material = "SmoothPlastic" w1.FormFactor = 'Custom' w1.BrickColor = BrickColor.new("Really red") w1.Transparency = 0 w1.Reflectance = 0 w1.Material = "Neon" w1.CanCollide = false NoOutline(w1) local sz = Vector3.new(0.2, width, len1) w1.Size = sz local sp = Instance.new("SpecialMesh",w1) sp.MeshType = "Wedge" sp.Scale = Vector3.new(0,1,1) * sz/w1.Size w1:BreakJoints() w1.Anchored = true w1.Parent = workspace w1.Transparency = 0.7 table.insert(Effects,{w1,"Disappear",.01}) w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) table.insert(list,w1) end if len2 > 0.01 then local w2 = Instance.new('WedgePart', m) game:GetService("Debris"):AddItem(w2,5) w2.Material = "SmoothPlastic" w2.FormFactor = 'Custom' w2.BrickColor = BrickColor.new("Really red") w2.Transparency = 0 w2.Reflectance = 0 w2.Material = "Neon" w2.CanCollide = false NoOutline(w2) local sz = Vector3.new(0.2, width, len2) w2.Size = sz local sp = Instance.new("SpecialMesh",w2) sp.MeshType = "Wedge" sp.Scale = Vector3.new(0,1,1) * sz/w2.Size w2:BreakJoints() w2.Anchored = true w2.Parent = workspace w2.Transparency = 0.7 table.insert(Effects,{w2,"Disappear",.01}) w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) table.insert(list,w2) end return unpack(list) end so = function(id,par,vol,pit) coroutine.resume(coroutine.create(function() local sou = Instance.new("Sound",par or workspace) sou.Volume=vol sou.Pitch=pit or 1 sou.SoundId=id swait() sou:play() game:GetService("Debris"):AddItem(sou,6) end)) end function clerp(a,b,t) local qa = {QuaternionFromCFrame(a)} local qb = {QuaternionFromCFrame(b)} local ax, ay, az = a.x, a.y, a.z local bx, by, bz = b.x, b.y, b.z local _t = 1-t return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) end function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) end local function CFrameFromTopBack(at, top, back) local right = top:Cross(back) return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) end --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) end Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) if hit.Parent==nil then return end local h=hit.Parent:FindFirstChild("Humanoid") for _,v in pairs(hit.Parent:children()) do if v:IsA("Humanoid") then h=v end end if hit.Parent.Parent:FindFirstChild("Torso")~=nil then h=hit.Parent.Parent:FindFirstChild("Humanoid") end if hit.Parent.className=="Hat" then hit=hit.Parent.Parent:findFirstChild("Head") end if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then return end]] -- hs(hit,1.2) local c=Instance.new("ObjectValue") c.Name="creator" c.Value=game:service("Players").LocalPlayer c.Parent=h game:GetService("Debris"):AddItem(c,.5) local Damage=math.random(minim,maxim) -- h:TakeDamage(Damage) local blocked=false local block=hit.Parent:findFirstChild("Block") if block~=nil then print(block.className) if block.className=="NumberValue" then if block.Value>0 then blocked=true if decreaseblock==nil then block.Value=block.Value-1 end end end if block.className=="IntValue" then if block.Value>0 then blocked=true if decreaseblock~=nil then block.Value=block.Value-1 end end end end if blocked==false then -- h:TakeDamage(Damage) h.Health=h.Health-Damage ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color) else h.Health=h.Health-(Damage/2) ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color) end if Type=="Knockdown" then local hum=hit.Parent.Humanoid hum.PlatformStand=true coroutine.resume(coroutine.create(function(HHumanoid) swait(1) HHumanoid.PlatformStand=false end),hum) local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) local bodvol=Instance.new("BodyVelocity") bodvol.velocity=angle*knockback bodvol.P=5000 bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) bodvol.Parent=hit local rl=Instance.new("BodyAngularVelocity") rl.P=3000 rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) rl.Parent=hit game:GetService("Debris"):AddItem(bodvol,.5) game:GetService("Debris"):AddItem(rl,.5) elseif Type=="Normal" then local vp=Instance.new("BodyVelocity") vp.P=500 vp.maxForce=Vector3.new(math.huge,0,math.huge) -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback if KnockbackType==1 then vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 elseif KnockbackType==2 then vp.velocity=Property.CFrame.lookVector*knockback end if knockback>0 then vp.Parent=hit.Parent.Torso end game:GetService("Debris"):AddItem(vp,.5) elseif Type=="Up" then local bodyVelocity=Instance.new("BodyVelocity") bodyVelocity.velocity=vt(0,60,0) bodyVelocity.P=5000 bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) bodyVelocity.Parent=hit game:GetService("Debris"):AddItem(bodyVelocity,1) local rl=Instance.new("BodyAngularVelocity") rl.P=3000 rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) rl.Parent=hit game:GetService("Debris"):AddItem(rl,.5) elseif Type=="Snare" then local bp=Instance.new("BodyPosition") bp.P=2000 bp.D=100 bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) bp.position=hit.Parent.Torso.Position bp.Parent=hit.Parent.Torso game:GetService("Debris"):AddItem(bp,1) elseif Type=="Target" then local Targetting = false if Targetting==false then ZTarget=hit.Parent.Torso coroutine.resume(coroutine.create(function(Part) so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) swait(5) so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) end),ZTarget) local TargHum=ZTarget.Parent:findFirstChild("Humanoid") local targetgui=Instance.new("BillboardGui") targetgui.Parent=ZTarget targetgui.Size=UDim2.new(10,100,10,100) local targ=Instance.new("ImageLabel") targ.Parent=targetgui targ.BackgroundTransparency=1 targ.Image="rbxassetid://4834067" targ.Size=UDim2.new(1,0,1,0) cam.CameraType="Scriptable" cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) Targetting=true RocketTarget=ZTarget for i=1,Property do --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then swait() end --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) end Targetting=false RocketTarget=nil targetgui.Parent=nil cam.CameraType="Custom" end end local debounce=Instance.new("BoolValue") debounce.Name="DebounceHit" debounce.Parent=hit.Parent debounce.Value=true game:GetService("Debris"):AddItem(debounce,Delay) c=Instance.new("ObjectValue") c.Name="creator" c.Value=Player c.Parent=h game:GetService("Debris"):AddItem(c,.5) end end function ShowDamage(Pos, Text, Time, Color) local Rate = (1 / 30) local Pos = (Pos or Vector3.new(0, 0, 0)) local Text = (Text or "") local Time = (Time or 2) local Color = (Color or Color3.new(1, 0, 0)) local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",vt(0,0,0)) EffectPart.Anchored = true local BillboardGui = Instance.new("BillboardGui") BillboardGui.Size = UDim2.new(3, 0, 3, 0) BillboardGui.Adornee = EffectPart local TextLabel = Instance.new("TextLabel") TextLabel.BackgroundTransparency = 1 TextLabel.Size = UDim2.new(1, 0, 1, 0) TextLabel.Text = Text TextLabel.TextColor3 = Color TextLabel.TextScaled = true TextLabel.Font = Enum.Font.ArialBold TextLabel.Parent = BillboardGui BillboardGui.Parent = EffectPart game.Debris:AddItem(EffectPart, (Time + 0.1)) EffectPart.Parent = game:GetService("Workspace") Delay(0, function() local Frames = (Time / Rate) for Frame = 1, Frames do wait(Rate) local Percent = (Frame / Frames) EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) TextLabel.TextTransparency = Percent end if EffectPart and EffectPart.Parent then EffectPart:Destroy() end end) end Handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.296501815, 5.18878126, 0.296499223)) Handleweld=weld(m,Character["Right Arm"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.10050106, -1.63029861, -0.888347149, -1, 0, 0, 0, 0, -1, -0, -0.999999881, -0)) mesh("CylinderMesh",Handle,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Hitbox=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Really red","Hitbox",Vector3.new(0.200000003, 6.98600721, 2.19299841)) Hitboxweld=weld(m,Handle,Hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -3.93773937, 2.93521118, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Hitbox,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 2.52026534, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, -1.70486319, 3.70584869, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, 0.815379143, 3.85409546, -0.999993443, -5.94257529e-007, -4.47034836e-008, -2.98022105e-008, -6.0737176e-007, -0.999998927, 5.9425787e-007, -0.999993384, 6.66978679e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(1.03775609, 0.311326832, 1.18599701)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.40932465, 3.81469727e-006, -6.91413879e-006, -2.98023295e-008, -1, -0, 1, -2.98023295e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501815, 0.889504969, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.86102295e-006, -1.34825706, -1.8123436, 0.999997854, 1.3482402e-007, 1.3200642e-007, -1.99253947e-009, 0.707105041, -0.707106531, -1.88677433e-007, 0.7071051, 0.707106531)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501815, 0.889504969, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.76837158e-006, 1.33309555, -1.79717827, 0.999997854, 7.14049833e-008, 2.88419812e-007, -2.54434127e-007, 0.707104981, 0.707106411, -1.53452262e-007, -0.707104921, 0.707106352)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, -2.44612718, 3.85409546, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.296501756, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -2.37199664, -2.81639481, -0.999993324, -1.35600567e-006, 7.45057918e-008, -4.47034942e-008, -1.49011569e-007, 0.999998868, -1.34110451e-006, 0.999993265, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.90734863e-006, 2.14962149, -2.81639862, 0.999993205, 5.96046448e-007, -4.47034836e-008, 2.98021234e-008, 6.07371646e-007, -0.999998927, -5.96046448e-007, 0.999993205, 6.66978679e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.593003511, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, -1.18598497, 3.85409546, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -2.59437418, -2.81639481, -0.999993324, -1.35600567e-006, 7.45057918e-008, -4.47034942e-008, -1.49011569e-007, 0.999998868, -1.34110451e-006, 0.999993265, 2.08616129e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, -1.55661559, 3.85409546, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.326151937, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.8536377, 0.000444412231, -6.91413879e-006, -2.9802333e-008, -0.999999762, -0, 1, -2.98023402e-008, 0, 0, 0, 0.999999523)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, 2.0013752, 3.85409546, -0.999993443, -5.94257529e-007, -4.47034836e-008, -2.98022105e-008, -6.0737176e-007, -0.999998927, 5.9425787e-007, -0.999993384, 6.66978679e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.296501756, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, -2.22374678, 3.85409546, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.296499103)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.80853271, 0.000414848328, 3.47587585, 1.29208814e-007, -0.866024733, -0.499999523, 1, 2.00156606e-007, -8.8263846e-008, 1.76517091e-007, -0.499999642, 0.866024554)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.889505386, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00040435791, -1.87283707, -3.30593491, 0.999993205, 3.10420091e-006, 4.20707329e-006, 5.11838152e-006, -0.500021577, -0.86601007, -5.17362992e-007, 0.86601001, -0.500015497)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.296499103)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.15766907, 0.000414848328, -0.0542945862, 1.73149076e-007, -0.866024733, 0.499999464, 1, 1.09283768e-007, -1.57012991e-007, 8.13355285e-008, 0.499999583, 0.866024554)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.444752693, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000381469727, 0.518871069, 4.00193787, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.15768051, 0.000414848328, 0.168071747, 1.73149047e-007, -0.866024673, 0.499999404, 1, 1.09283775e-007, -1.57012963e-007, 8.13355712e-008, 0.499999523, 0.866024494)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 1.77899528)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.9568634, 0.000414848328, 4.06890678, 1.29209454e-007, -0.866017103, -0.499994904, 0.99999994, 2.00155014e-007, -8.82613804e-008, 1.7651513e-007, -0.499995023, 0.866016924)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.741247892)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.6042366, 0.000414848328, 1.40539384, 7.28354408e-008, -0.999999523, 2.98026634e-008, 1, 7.28354905e-008, -1.137834e-007, 1.13783528e-007, 2.9802635e-008, 0.999999285)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.741247892)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.15763474, 0.000415802002, -0.721405029, 8.67096972e-008, -0.866025329, 0.499999881, 1, 3.44270887e-008, -1.13789923e-007, 8.13314571e-008, 0.5, 0.86602515)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.741247892)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.95671082, 0.000415802002, 2.80871201, 4.27689706e-008, -0.86602515, -0.499999851, 0.999999762, 1.25296964e-007, -1.31482579e-007, 1.76515783e-007, -0.499999851, 0.866025209)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.592998326)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.15768814, 0.000414848328, 0.538698196, 1.73149076e-007, -0.866024733, 0.499999464, 1, 1.09283768e-007, -1.57012991e-007, 8.1335557e-008, 0.499999583, 0.866024554)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.593003631, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000418663025, -4.66182327, -2.80873108, 0.999993205, -2.08179517e-006, 4.68745384e-006, 5.02319881e-006, 0.499976099, -0.866036355, -4.73424905e-007, 0.866031289, 0.499978751)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.741247892)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.30587387, 0.000415802002, -0.721378326, 8.67091714e-008, -0.866024256, 0.499999464, 0.999999046, 3.4425458e-008, -1.13791891e-007, 8.13342709e-008, 0.499999762, 0.86602515)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.741247892)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.80846024, 0.000415802002, 2.8087101, 4.27693685e-008, -0.86602515, -0.499999851, 0.999999762, 1.25295941e-007, -1.31480022e-007, 1.76513069e-007, -0.499999851, 0.866025209)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.15765762, 0.000414848328, -0.27664566, 1.73148948e-007, -0.866023302, 0.499998629, 1, 1.09283704e-007, -1.57012749e-007, 8.13356706e-008, 0.499998748, 0.866023123)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.889505386, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000422477722, -5.40308189, -2.95698166, 0.999993205, -2.08179517e-006, 4.68745384e-006, 5.02319881e-006, 0.499976099, -0.866036355, -4.73424905e-007, 0.866031289, 0.499978751)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.593003631, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000400543213, -1.13156891, -3.15768433, 0.999993205, 3.10420091e-006, 4.20707329e-006, 5.11838152e-006, -0.500021577, -0.86601007, -5.17362992e-007, 0.86601001, -0.500015497)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.80859375, 0.000414848328, 3.69829178, 1.29208786e-007, -0.866024613, -0.499999523, 1, 2.00156563e-007, -8.82638247e-008, 1.76517119e-007, -0.499999642, 0.866024435)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.741254389, 0.296501786, 0.889497578)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.55724716, 0.000415802002, 0.593008757, -2.98023437e-008, -1, -0, 1, -2.98023437e-008, 0, 0, 0, 0.999999762)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.80845261, 0.000414848328, 3.25345612, 1.29208672e-007, -0.866023123, -0.499998778, 0.999999762, 2.00156279e-007, -8.82637536e-008, 1.76517077e-007, -0.499998778, 0.866023183)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 1.77899528)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.30587006, 0.000414848328, 0.538694382, 1.73149331e-007, -0.866016984, 0.499995172, 0.99999994, 1.09285118e-007, -1.57010405e-007, 8.13343917e-008, 0.499995291, 0.866016805)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.592998326)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.80862808, 0.000414848328, 4.06892586, 1.29208814e-007, -0.866024733, -0.499999523, 1, 2.00156606e-007, -8.8263846e-008, 1.76517119e-007, -0.499999642, 0.866024554)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 2.89088011, 3.26107788, -0.999993324, -1.62995764e-006, 4.10754041e-007, -2.91542648e-007, 1.04308128e-007, -0.999998927, 1.61505602e-006, -0.999993324, -2.53319683e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -2.89087987, -3.26107788, -0.999993324, -1.35600567e-006, 7.45057918e-008, -4.47034942e-008, -1.49011569e-007, 0.999998868, -1.34110451e-006, 0.999993265, 2.08616129e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501815, 4.00277376, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -0.00343322754, -0.573273778, 0.999997854, 1.29937892e-008, 1.07842467e-007, -1.29937483e-008, 0.999997437, 0, -1.07842268e-007, 5.96046448e-008, 0.999999464)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.26012194, -2.81639481, -0.999993324, -1.35600567e-006, 7.45057918e-008, -4.47034942e-008, -1.49011569e-007, 0.999998868, -1.34110451e-006, 0.999993265, 2.08616129e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.90734863e-006, 0.815383554, -2.81639481, 0.999993205, 5.96046448e-007, -4.47034836e-008, 2.98021234e-008, 6.07371646e-007, -0.999998927, -5.96046448e-007, 0.999993205, 6.66978679e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 1.18600714, 0.592998505)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -1.03774309, 3.33521271, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.296501756, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.0377425, -2.81639481, -0.999993324, -1.35600567e-006, 7.45057918e-008, -4.47034942e-008, -1.49011569e-007, 0.999998868, -1.34110451e-006, 0.999993265, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.592998505)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -1.70486319, 3.33521271, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 1.0377562, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -2.2978766, 3.26107407, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.48348236, 3.81469727e-006, -2.2978785, -2.98023224e-008, -0.999999821, -0, 0.999999821, -2.98023224e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.815379977, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -2.89088058, 3.48345947, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 1.18600726, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -2.37198853, 3.11284637, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.48348236, 3.81469727e-006, -2.00137448, -2.98023224e-008, -0.999999821, -0, 0.999999821, -2.98023224e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.815379977, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.48348236, 3.81469727e-006, -2.5943768, -2.98023224e-008, -0.999999821, -0, 0.999999821, -2.98023224e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.815379977, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 1.0377562, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -2.29787683, 3.48345947, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 2.07551241, 0.592998505)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -4.00276041, 3.33521271, 0.999993443, 1.45976469e-006, 1.94331719e-007, -7.51218181e-008, 1.49011612e-007, 0.999998868, 1.45976469e-006, -0.999993384, 2.23517361e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.815379918, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 2.9650178, 0.889497638)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-9.53674316e-007, -4.4475174, 3.33521271, 0.999993443, 1.45976469e-006, 1.94331719e-007, -7.51218181e-008, 1.49011612e-007, 0.999998868, 1.45976469e-006, -0.999993384, 2.23517361e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.311326861, 0.296501487, 0.326149136)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 2.00148392, -6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.311326861, 1.33425784, 0.326149136)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 9.91821289e-005, -6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 2.9650178, 0.444748878)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.86102295e-006, -3.84435654, 4.01723862, 0.999993443, 1.59027059e-006, 2.6722384e-007, 2.68622188e-007, -0.258817196, 0.965924799, 1.57439217e-006, -0.965919495, -0.258818537)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.815379977, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.311326861, 0.296501487, 0.326149136)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -1.85279465, -6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 2.52026534, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.70486307, 2.96461105, 0.999993443, 1.43051147e-006, 7.45057918e-008, 4.47034836e-008, 1.49011612e-007, 0.999998868, 1.43051147e-006, -0.999993384, 2.08616129e-007)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 4.29927588, 0.741248131)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.86102295e-006, -4.5114727, 4.01726913, 0.999993443, 1.59027059e-006, 2.6722384e-007, 2.68622188e-007, -0.258817196, 0.965924799, 1.57439217e-006, -0.965919495, -0.258818537)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.326151937, 0.200000003, 0.355799079)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 9.91821289e-005, -6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.311326861, 0.200000003, 0.326149136)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 1.03784561, -6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.33425796, 0.296501786, 1.48249602)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.40934753, 3.81469727e-006, -6.91413879e-006, -2.98023224e-008, -0.999999821, -0, 0.999999821, -2.98023224e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.311326861, 0.200000003, 0.326149136)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -1.03752136, -6.91413879e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.326151937, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.40927505, 2.95639038e-005, 0.444754362, -2.98023295e-008, -1, -0, 1, -2.98023295e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.326151937, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.40908051, 0.000387191772, -6.91413879e-006, -2.98023259e-008, -0.999999523, -0, 1, -2.98023402e-008, 0, 0, 0, 0.999999285)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.326151937, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.96453476, 4.67300415e-005, -6.91413879e-006, -2.98023295e-008, -1, -0, 1, -2.98023295e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.326151937, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.40927505, 2.95639038e-005, -0.444758654, -2.98023295e-008, -1, -0, 1, -2.98023295e-008, 0, 0, 0, 0.999999762)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.296501786, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.00191879, 0.00050163269, 0.815378904, -2.98023437e-008, -0.999999642, -0, 0.999999642, -2.98023437e-008, 0, 0, 0, 0.999999762)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.444748729)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.45595932, 0.000414848328, 1.25711417, 7.28358245e-008, -0.999999046, 2.98032496e-008, 1, 7.28358458e-008, -1.13780651e-007, 1.13780807e-007, 2.98032212e-008, 0.999998808)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.296501487, 0.296499223)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -2.74229431, -6.67572021e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999523)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.296501487, 0.296499223)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 2.74255371, -6.67572021e-006, 1, 0, 0, 0, 1, 0, 0, 0, 0.999999523)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.296501786, 0.296499252)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.48226929e-005, 2.89077377, -2.43186951e-005, 0.999999642, 1.29942332e-008, 1.07873738e-007, -1.29943079e-008, 0.999999642, 7.15448891e-007, -1.07873717e-007, -7.15448834e-007, 0.999999762)) mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000374794006, -0.963628292, 4.00193787, -0.999993443, -3.16762635e-006, -1.49011381e-008, -1.49021755e-008, 8.47403953e-007, -0.999998868, 3.16762657e-006, -0.999993384, -7.8780505e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.296501786, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000382423401, -0.88951993, -3.11242676, 0.999993205, 1.42891167e-006, -3.27825433e-007, -4.32134527e-007, 1.02892602e-006, -0.999998927, -1.47361538e-006, 0.999993265, 9.69328653e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.296501786, 0.444752693, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000383377075, 0.518874645, -3.11242294, -0.999993443, -1.32620335e-006, 2.76574696e-007, 3.95783559e-007, -9.85657607e-007, 0.999998868, -1.37090683e-006, 0.999993265, 9.26059613e-007)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 1.48249602)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.60424805, 0.000413894653, 2.51726198, 1.59275899e-007, -0.999999821, 1.49011584e-007, 1, 1.59275913e-007, -1.1378453e-007, 1.1378458e-007, 1.49011612e-007, 0.999999583)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.593003631, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000409126282, -2.96186352, -3.45602417, 0.999993205, 5.70906195e-007, 5.16308319e-006, 5.08593212e-006, -2.63005495e-005, -0.999997497, -5.03489844e-007, 0.999994576, -2.12490504e-005)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.45597839, 0.000414848328, 1.55362201, 1.59275089e-007, -0.999997139, -5.96043996e-008, 1, 1.59274975e-007, -1.13784445e-007, 1.13784942e-007, -5.96045808e-008, 0.999996901)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.592998326)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.45598221, 0.000413894653, 2.36899614, 1.59275146e-007, -0.999998569, -2.98022584e-008, 1, 1.59275189e-007, -1.13784601e-007, 1.137849e-007, -2.98023508e-008, 0.999998331)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.45597839, 0.000414848328, 1.99837613, 1.59275089e-007, -0.99999845, -5.96045027e-008, 1, 1.59275174e-007, -1.13784559e-007, 1.13784928e-007, -5.96046306e-008, 0.999998212)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.200000003, 0.200000003, 0.296499103)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.45598602, 0.000414848328, 1.77599883, 1.59275174e-007, -0.999998808, -2.98022726e-008, 1, 1.59275203e-007, -1.13784644e-007, 1.13784857e-007, -2.98023366e-008, 0.999998569)) mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 1)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.889505386, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000412940979, -3.70311022, -3.60429001, 0.999993205, 5.70906195e-007, 5.16308319e-006, 5.08593212e-006, -2.63005495e-005, -0.999997497, -5.03489844e-007, 0.999994576, -2.12490504e-005)) mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 1, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 1.90172958, -0.639986753, 0.999993563, 1.29944793e-008, 1.07850958e-007, -1.29944917e-008, 0.999992311, 1.25175063e-006, -1.0785029e-007, -1.07292954e-006, 0.999998868)) mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.593003571, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 0.0706977844, -0.573273659, 0.999997854, 1.29939313e-008, 1.07844173e-007, -1.29939162e-008, 0.999997437, 2.38420625e-007, -1.07843974e-007, -1.78815498e-007, 0.999999464)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.815372765)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -0.596420288, -0.57327354, 0.999997854, 1.29939313e-008, 1.07844173e-007, -1.29939162e-008, 0.999997437, 2.38420625e-007, -1.07843974e-007, -1.78815498e-007, 0.999999464)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.741254449, 0.815372765)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.741254449, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -1.18922043, -0.57327342, 0.999997854, 1.29939313e-008, 1.07844173e-007, -1.29939162e-008, 0.999997437, 2.38420625e-007, -1.07843974e-007, -1.78815498e-007, 0.999999464)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.815372765)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 0.737804413, -0.573273778, 0.999997854, 1.29939313e-008, 1.07844173e-007, -1.29939162e-008, 0.999997437, 2.38420625e-007, -1.07843974e-007, -1.78815498e-007, 0.999999464)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.741254449, 0.815372765)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.62124634e-005, -1.92287064, -0.639983892, 0.999997854, 1.29942155e-008, 1.07847583e-007, -1.29942519e-008, 0.999997437, 7.15275121e-007, -1.07847377e-007, -6.55669055e-007, 0.999999464)) mesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.741254449, 0.741254449, 0.741248071)) Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.296501815, 0.741254449, 0.200000003)) Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, 1.33082199, -0.573274136, 0.999993563, 1.2994124e-008, 1.07846695e-007, -1.29940725e-008, 0.999992311, 6.55663769e-007, -1.07846034e-007, -4.76846481e-007, 0.999998868)) mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.815372765)) function attackone() attack=true con1=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,10,30,math.random(10,20),"Normal",RootPart,.2,1) end) for i=0,1,0.1 do swait() RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(80)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(10),math.rad(-70)),.3) RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(90), math.rad(90)), 0.3) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(80), math.rad(-70), math.rad(0)), 0.3) RH.C0=clerp(RH.C0,cf(1,-1,0.2)*angles(math.rad(0),math.rad(40),math.rad(20)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(-5),math.rad(0)),.3) end so("http://roblox.com/asset/?id=92597369",Hitbox,1,0.6) so("http://roblox.com/asset/?id=231917871",Hitbox,1,0.8) for i=0,1,0.1 do swait() local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then local h = 5 local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end scfr = blcf elseif not scfr then scfr = blcf end RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(-80)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(5),math.rad(70)),.3) RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.5) * angles(math.rad(0), math.rad(-70), math.rad(90)), 0.3) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(70), math.rad(-70), math.rad(0)), 0.3) RH.C0=clerp(RH.C0,cf(1,-1,0.2)*angles(math.rad(0),math.rad(40),math.rad(20)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(-5),math.rad(0)),.3) end attack=false con1:disconnect() scfr = nil end function attacktwo() attack=true con1=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,10,30,math.random(10,20),"Normal",RootPart,.2,1) end) for i=0,1,0.1 do swait() RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(90)),.2) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(-5),math.rad(-80)),.3) RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(90),math.rad(90)),.1) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(70), math.rad(-70), math.rad(0)), 0.3) end for i=0,1,1 do swait() so("http://roblox.com/asset/?id=92597369",Hitbox,1,0.7) so("http://www.roblox.com/asset/?id=234365573",Hitbox,1,0.7) for i=0,1,0.1 do swait() local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then local h = 5 local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end scfr = blcf elseif not scfr then scfr = blcf end RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*euler(0,0,-6*i),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(-5),math.rad(-50)),.3) RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-10),math.rad(90)),.1) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,-0,0)*angles(math.rad(-50),math.rad(0),math.rad(0)),.3) end end con1:disconnect() attack=false scfr = nil end function attackthree() attack=true con1=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,10,30,math.random(10,20),"Normal",RootPart,.2,1) end) for i=0,1,0.1 do swait() RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-10),math.rad(0),math.rad(00)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(-5),math.rad(00)),.3) RW.C0=clerp(RW.C0,cf(1,0.8,-1)*angles(math.rad(150),math.rad(0),math.rad(-50)),.3) LW.C0=clerp(LW.C0,cf(-1,0.8,-1)*angles(math.rad(150),math.rad(0),math.rad(50)),.3) RH.C0=clerp(RH.C0,cf(1,-1,.2)*angles(math.rad(0),math.rad(90),math.rad(0)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,-.2)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(-1,0,-.2)*angles(math.rad(-20),math.rad(-20),math.rad(50)),.3) end so("http://roblox.com/asset/?id=92597369",Hitbox,1,0.4) so("http://www.roblox.com/asset/?id=234365549",Hitbox,1,0.6) for i=0,1,.1 do swait() local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then local h = 5 local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end scfr = blcf elseif not scfr then scfr = blcf end RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(-5),math.rad(00)),.3) RW.C0=clerp(RW.C0,cf(1,0.2,-.5)*angles(math.rad(10),math.rad(0),math.rad(-50)),.3) LW.C0=clerp(LW.C0,cf(-1,0.2,-.5)*angles(math.rad(10),math.rad(0),math.rad(50)),.3) RH.C0=clerp(RH.C0,cf(1,-1,.2)*angles(math.rad(0),math.rad(90),math.rad(0)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,-.2)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(-1,0,-.2)*angles(math.rad(-20),math.rad(-20),math.rad(50)),.3) end attack=false con1:disconnect() scfr = nil end function CrimsonMoon() attack=true con1=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,10,30,math.random(10,20),"Normal",RootPart,.2,1) end) for i=0,1,0.1 do swait() RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(120),math.rad(80)),.3) LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-10),math.rad(0),math.rad(-10)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(-30),math.rad(-5),math.rad(0)),.3) end for i=1,4 do so("http://roblox.com/asset/?id=92597369",Hitbox,1,0.5) so("http://roblox.com/asset/?id=28144425",Torso,1,0.8) swait() for i=0,1,0.1 do swait() local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then local h = 5 local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end scfr = blcf elseif not scfr then scfr = blcf end RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(-40),math.rad(90)),.3) LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-20),math.rad(0),math.rad(-60)),.3) RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,5)*euler(0,-1.5,-6*i),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(-30),math.rad(-5),math.rad(0)),.3) end end attack=false con1:disconnect() scfr = nil end function BreakEffect(brickcolor,cframe,x1,y1,z1) local prt=part("Custom",workspace,"SmoothPlastic",0,0,"Really red","Effect",vt(0.5,0.5,0.5)) prt.Anchored=true prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) CF=Part.CFrame Numbb=0 randnumb=math.random()-math.random() for i=0,1,0.05 do wait() CF=CF*cf(0,1,0) --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) Part.CFrame=CF*euler(Numbb,0,0) Part.Transparency=i Numbb=Numbb+randnumb end Part.Parent=nil end),prt) end function Execution() --HEUAHUEHAUEHAUHUEAHUAEHUAHEUAHEUH attack=true con1=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,90,100,math.random(10,20),"Knockdown",RootPart,.2,1) end) for i=0,1,0.03 do swait() RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(60)),.1) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-60)),.1) RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(90),math.rad(120)),.1) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(0)), 0.1) RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.1) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2) Handleweld.C0=clerp(Handleweld.C0,cf(0,-0,.4)*angles(math.rad(0),math.rad(10),math.rad(0)),.1) end so("http://roblox.com/asset/?id=92597369",Hitbox,1,0.5) so("http://roblox.com/asset/?id=28144425",Torso,1,0.5) hitconasdf = Hitbox.Touched:connect(function(hit) local hum12 = hit.Parent:FindFirstChild("Humanoid") if hum12 and not hum12:IsDescendantOf(Character) then so('http://roblox.com/asset/?id=154965973',Hitbox,1,0.8) for i = 1,20 do BreakEffect(BrickColor.new("Really red"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5) end hitconasdf:disconnect() end end) for i=0,1,0.03 do swait() local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then local h = 5 local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end scfr = blcf elseif not scfr then scfr = blcf end RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-90)),.2) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(60)),.2) RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-20),math.rad(70)),.2) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-40)), 0.2) RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.2) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2) Handleweld.C0=clerp(Handleweld.C0,cf(0,-0,.4)*angles(math.rad(0),math.rad(10),math.rad(0)),.2) end attack=false con1:disconnect() scfr = nil pcall(function() hitconasdf:disconnect() end) end mouse.Button1Down:connect(function() if attack==false then if attacktype==1 then attack=true attacktype=2 attackone() elseif attacktype==2 then attack=true attacktype=3 attacktwo() elseif attacktype==3 then attack=true attacktype=1 attackthree() end end end) mouse.KeyDown:connect(function(k) k=k:lower() if k=='q' then if attack==false then CrimsonMoon() end elseif k=='e' then if attack==false then Execution() end end end) local sine = 0 local change = 1 local val = 0 while true do swait() sine = sine + change local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude local velderp=RootPart.Velocity.y hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) if equipped==true or equipped==false then if attack==false then idle=idle+1 else idle=0 end if idle>=500 then if attack==false then --Sheath() end end if RootPart.Velocity.y > 1 and hitfloor==nil then Anim="Jump" if attack==false then RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3) RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(10)), 0.3) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,-0,.4)*angles(math.rad(85),math.rad(10),math.rad(0)),.3) end elseif RootPart.Velocity.y < -1 and hitfloor==nil then Anim="Fall" if attack==false then RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(0)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3) RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-40)), 0.3) RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,-0,.4)*angles(math.rad(85),math.rad(10),math.rad(0)),.3) end elseif torvel<1 and hitfloor~=nil then Anim="Idle" if attack==false then RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(60)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(5),math.rad(-50)),.3) RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(70), math.rad(100), math.rad(0)), 0.3) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(50), math.rad(-70), math.rad(0)), 0.3) RH.C0=clerp(RH.C0,cf(1,-1,0.2)*angles(math.rad(0),math.rad(40),math.rad(20)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(-5),math.rad(0)),.3) end elseif torvel>2 and hitfloor~=nil then Anim="Walk" if attack==false then change=3 RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(60)),.3) Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(10),math.rad(-50)),.3) RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(70), math.rad(100), math.rad(0)), 0.3) LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(50), math.rad(-70), math.rad(0)), 0.3) RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(20)),.3) LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(0)),.3) Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(-5),math.rad(0)),.3) end end end if #Effects>0 then for e=1,#Effects do if Effects[e]~=nil then local Thing=Effects[e] if Thing~=nil then local Part=Thing[1] local Mode=Thing[2] local Delay=Thing[3] local IncX=Thing[4] local IncY=Thing[5] local IncZ=Thing[6] if Thing[1].Transparency<=1 then if Thing[2]=="Block1" then Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Mesh=Thing[1].Mesh Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) Thing[1].Transparency=Thing[1].Transparency+Thing[3] elseif Thing[2]=="Cylinder" then Mesh=Thing[1].Mesh Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) Thing[1].Transparency=Thing[1].Transparency+Thing[3] elseif Thing[2]=="Blood" then Mesh=Thing[7] Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0) Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) Thing[1].Transparency=Thing[1].Transparency+Thing[3] elseif Thing[2]=="Elec" then Mesh=Thing[1].Mesh Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) Thing[1].Transparency=Thing[1].Transparency+Thing[3] elseif Thing[2]=="Disappear" then Thing[1].Transparency=Thing[1].Transparency+Thing[3] end else Part.Parent=nil table.remove(Effects,e) end end end end end end
local load_nvim_module = require"utils".load_nvim_module; -- General settings load_nvim_module("options"); -- Plugins local packer = load_nvim_module("plugins"); if packer then packer.compile() end; -- Maps and other keybinds load_nvim_module("maps"); -- Autocmds load_nvim_module("autocmds");
workspace "lord" configurations { "debug", "release" } architecture "x64" cdialect "C89" toolset "clang" BASE_DIR = path.getabsolute(".") targetdir (BASE_DIR .. "/bin") objdir (BASE_DIR .. "/bin-int") filter "configurations:debug" defines { "DEBUG" } symbols "on" filter "configurations:release" defines { "NDEBUG" } optimize "on" include "compiler"
Account = { balance = 0}; function Account:new (o) o = o or {}; setmetatable(o, self); self.__index = self; return o; end function Account:deposit (v) self.balance = self.balance + v; end function Account:withdraw (v) if v > self.balance then error "insufficient funds" end self.balance = self.balance - v; end SpecialAccount = Account:new (); function SpecialAccount:withdraw (v) if v - self.balance >= self:getLimit() then error "insufficient funds "; end self.balance = self.balance - v; end function SpecialAccount:getLimit () return self.limit or 0; end s = SpecialAccount:new{limit = 1000.0}; function s:getLimit () return self.balance * 0.10; end -- return Account; --[[ s:deposit(1000); s:withdraw(1099.00); print(s.balance); --]]
local Logger = require('user.smartshack-logger') local Check = require('user.smartshack-check') local Cbus = require('user.smartshack-cbus') function pulseMultipleAutoLevel(cbusGas, durationSeconds) log(string.format('pulseMultipleAutoLevel %d %d', #cbusGas, durationSeconds)) -- Switch on, only if off or in autolevel for index, cbusGa in ipairs(cbusGas) do if ( Cbus.setAutoLevelIfAutoLevel(cbusGa, 0) ) then AutoTimer.pushAutoOffCbusGa(cbusGa, durationSeconds) end end end function cancelMultipleAutoOff(cbusGas) log(string.format('cancelMultipleAutoOff %d', #cbusGas)) for index, cbusGa in ipairs(cbusGas) do AutoTimer.cancelAutoOffCbusGa(cbusGa) end end function setMultipleAutoLevel(cbusGas) log(string.format('setMultipleAutoLevel %d', #cbusGas)) for index, cbusGa in ipairs(cbusGas) do Cbus.setAutoLevel(cbusGa) end end function setMultipleLevel(cbusGas, level) log(string.format('setMultipleLevel %d %s', #cbusGas, level)) for index, cbusGa in ipairs(cbusGas) do Cbus.setLevel(cbusGa, level) end end local SceneControl = { logger = Logger:new('SceneControl'), } function SceneControl:new(cbusGa, options) local object = {} setmetatable(object, self) self.__index = self self.cbusGa = cbusGa Check.argument(cbusGa[1] == 0, 'Must be default network (%d)', cbusGa[1]) Check.argument(cbusGa[2] == 202, 'Must be trigger application (%d)', cbusGa[2]) self.maxLevel = options.maxLevel Check.argument(self.maxLevel, 'Must define maxLevel') self.minLevel = options.minLevel or 0 self.startLevel = options.startLevel or 1 self.timeoutSeconds = options.timeoutSeconds or 10 self.offLevel = options.offLevel or 0 self.lastTime = 0 self.logger:showDebug() return object end function SceneControl:nextLevel() Cbus.changeTriggerValue(self.cbusGa[3], 1, self.minLevel, self.maxLevel, self.startLevel, self.timeoutSeconds) end function SceneControl:nextLevel2() local triggerId = self.cbusGa[3] local currentLevel = Cbus.getTriggerLevelWithDefault(triggerId, 0) self.logger:debug('nextLevel %d %d', triggerId, currentLevel) local nowTime = os.time() local elapsedSeconds = nowTime - self.lastTime self.lastTime = nowTime self.logger:debug('nextLevel %d', elapsedSeconds) local nextLevel if ( currentLevel == self.offLevel ) then -- Does not matter how much time has elapsed nextLevel = self.startLevel else if ( elapsedSeconds >= self.timeoutSeconds ) then nextLevel = self.offLevel else nextLevel = currentLevel + 1 if ( nextLevel > self.maxLevel ) then nextLevel = self.minLevel end if ( nextLevel < self.minLevel ) then nextLevel = self.maxLevel end end end self.logger:debug('changeTriggerValue change %d', nextLevel) SetTriggerLevel(triggerId,nextLevel) end local PirPresence = { logger = Logger:new('PirPresence'), } function PirPresence:new(lightCbusGas, options) local object = {} setmetatable(object, self) self.__index = self self.lightCbusGas = lightCbusGas self.durationSeconds = options.durationSeconds or 60 return object end function PirPresence:processPirEvent(eventValue) PirPresence.logger:info('processPirEvent %d', eventValue) if ( eventValue == 0 ) then -- PIR inactive pulseMultipleAutoLevel(self.lightCbusGas, self.durationSeconds) else cancelMultipleAutoOff(self.lightCbusGas) setMultipleAutoLevel(self.lightCbusGas) end end local DoorOpenPresence = { logger = Logger:new('DoorOpenPresence'), } function DoorOpenPresence:new(lightCbusGas, options) local object = {} setmetatable(object, self) self.__index = self self.lightCbusGas = lightCbusGas self.durationSeconds = options.durationSeconds or 60 return object end function DoorOpenPresence:processDoorEvent(eventValue) DoorOpenPresence.logger:info('processDoorEvent %d', eventValue) if ( eventValue == 0 ) then -- Door closed setMultipleLevel(self.lightCbusGas, 0) else pulseMultipleAutoLevel(self.lightCbusGas, self.durationSeconds) end end local DoorClosedPresence = { logger = Logger:new('DoorClosedPresence'), } function DoorClosedPresence:new(lightCbusGas, options) local object = {} setmetatable(object, self) self.__index = self self.lightCbusGas = lightCbusGas self.closedDurationSeconds = options.closedDurationSeconds or 300 self.openDurationSeconds = options.openDurationSeconds or 60 return object end function DoorClosedPresence:processDoorEvent(eventValue) DoorClosedPresence.logger:info('processDoorEvent %d', eventValue) if ( eventValue == 0 ) then -- Door closed local durationSeconds = self.closedDurationSeconds or self.openDurationSeconds pulseMultipleAutoLevel(self.lightCbusGas, durationSeconds) else local durationSeconds = self.openDurationSeconds or self.closedDurationSeconds pulseMultipleAutoLevel(self.lightCbusGas, durationSeconds) end end local BistableSwitch = { logger = Logger:new('BistableSwitch'), } function BistableSwitch:new(cbusGa, options) local object = {} setmetatable(object, self) self.__index = self self.cbusGa = cbusGa Check.argument(cbusGa[1] == 0, 'Must be default network (%d)', cbusGa[1]) Check.argument(cbusGa[2] == 202, 'Must be trigger application (%d)', cbusGa[2]) self.triggerId = cbusGa[3] self.maxLevel = options.maxLevel Check.argument(self.maxLevel, 'Must define maxLevel') self.minLevel = options.minLevel or 0 self.startLevel = options.startLevel or 1 self.timeoutSeconds = options.timeoutSeconds or 10 return object end function BistableSwitch:processSwitchEvent(eventValue) BistableSwitch.logger:info('processSwitchEvent %d', eventValue) local triggerLevel = Cbus.getTriggerLevelWithDefault(self.triggerId, 0) if ( triggerLevel > 100 ) then triggerLevel = triggerLevel - 100 end if ( eventValue == 0 ) then -- Off SetTriggerLevel(self.triggerId, 0) -- Remember the last value local saveLevel = triggerLevel + 100 SetTriggerLevel(self.triggerId, saveLevel) os.sleep(self.timeoutSeconds) triggerLevel = GetTriggerLevel(self.triggerId) if ( triggerLevel == saveLevel) then -- No changes in the last while self.logger:info('Resetting') SetTriggerLevel(self.triggerId, self.startLevel + 100 -1) end else triggerLevel = triggerLevel + 1 if ( triggerLevel > self.maxLevel ) then triggerLevel = self.minLevel end SetTriggerLevel(self.triggerId, triggerLevel) end end local Control = { Scene = SceneControl, PirPresence = PirPresence, DoorOpenPresence = DoorOpenPresence, DoorClosedPresence = DoorClosedPresence, BistableSwitch = BistableSwitch, } return Control
-------------------------------------------------------------------------- -- Lmod License -------------------------------------------------------------------------- -- -- Lmod is licensed under the terms of the MIT license reproduced below. -- This means that Lmod is free software and can be used for both academic -- and commercial purposes at absolutely no cost. -- -- ---------------------------------------------------------------------- -- -- Copyright (C) 2008-2017 Robert McLay -- -- 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. -- -------------------------------------------------------------------------- require("strict") _ModuleTable_ = "" local dbg = require("Dbg"):dbg() local systemG = _G local load = (_VERSION == "Lua 5.1") and loadstring or load local function buildTargetName(name, defaultFlag, fullName) local result = name result = fullName result = result:gsub("/","-") result = result:gsub("_","-") return result end function processModuleTable(mt_string, targetTbl, tbl) dbg.start{"processModuleTable(mt_string, targetTbl, tbl)"} if (mt_string == nil) then return end assert(load(mt_string))() local mt = systemG._ModuleTable_ local masterTbl = masterTbl() local stringKindTbl = masterTbl.stringKindTbl local mT = mt.mT for sn,v in pairs(mT) do local kindT = stringKindTbl[sn] if (kindT and next(kindT) ~= nil) then for key in pairs(kindT) do if (v.status == "active" and targetTbl[key] ) then targetTbl[key] = -1 local K = "TARG_" .. key:upper() tbl[K] = buildTargetName(sn, v.default, v.fullName) dbg.print{"V2: K: ",K, " tbl[K]: ",tbl[K],"\n"} end end end end for k in pairs(targetTbl) do if (targetTbl[k] ~= -1) then dbg.print{"Clearing k: ",k," targetTbl[k]: ", tostring(targetTbl[k]), "\n"} local K = "TARG_" .. k:upper() tbl[K] = false end end dbg.fini() end
fx_version 'bodacious' game 'gta5' author 'nimaiso' description 'This resource allows you to integrate your own radios in place of the original radios' version '2.0.0' -- Example custom radios -- supersede_radio "RADIO_01_CLASS_ROCK" { url = "https://playload.ir/mamad.ogg", volume = 0.8 } supersede_radio "RADIO_02_POP" { url = "https://cdn.discordapp.com/attachments/873650700595376148/923278506484449290/nima.ogg", volume = 0.8 } -- supersede_radio "RADIO_03_HIPHOP_NEW" { url = "https://playload.ir/moji.ogg", volume = 0.8 } supersede_radio "RADIO_04_PUNK" { url = "https://cdn.discordapp.com/attachments/873650700595376148/923278506987749387/ZedBazi_Obi_320.ogg", volume = 0.8 } -- supersede_radio "RADIO_05_TALK_01" { url = "https://playload.ir/Parsalip_-_Bazandeh.ogg", volume = 0.8 } files { 'index.html' } ui_page 'index.html' client_scripts { 'data.js', 'client.js' }
-- Wifi station test -- Suppose you have a TCP server, whose IP is 192.168.99.218, -- and it listens the PORT 8181, then you can run the following -- source to create a client to connect to the server. PORT = 8181 ADDR = "192.168.99.218" recv_cb = function(sock, c) print(c); end wifi.setmode(wifi.STATION); wifi.start(); wifi.sta.config({ssid="newifi_doit3305", pwd="doit3305"}); tmr.delay(10); info = wifi.sta.getconfig(); count = 0; timeout = false; while(string.len(info.ssid) == 0) do -- wait for connection established tmr.delay(1); info = wifi.sta.getconfig(); count = count + 1; if(count == 3) then print("Connect timeout"); timeout = true; break; end end if(timeout ~= true) then conn = net.createConnection(net.TCP, 0); conn:on("receive", recv_cb); conn:connect(PORT, ADDR); print("Connect to server"); end
local wkOpts = require("utils.whichkey-plugin") local wk = require("which-key") wk.register( { ["<leader>"] = { u = { name = "+Ultest", s = "Ultest Summary Toggle", f = "Ultest Run Tests in File", n = "Ultest Run Nearest", c = "Ultest Clear", o = "Ultest Jump to output", ["[u"] = "Go to previous failed test", ["]u"] = "Go to next failed test" } } }, wkOpts.defaultOpts )
local meta = FindMetaTable("Player") function meta:SQL_UpdateCharMoney() self.SQL_MoneyQuery = "UPDATE Accounts SET Money="..self:GetMoney().." WHERE PlayerID="..SQLStr(self:SteamID64())..";" end
/*hook.Add( "PlayerBindPress", "BindDropEntity", function( ply, bind, pressed ) if bind == "+menu_context" and pressed then LocalPlayer():ConCommand( "ze_dropentity" ) return true end end )*/
local tonumber = tonumber local format = string.format local strsplit = strsplit local strbyte, strchar, gsub = string.byte, string.char, gsub local print = print BuildModule('NetEasePinyin-1.0') local function getpinyin(value) local index = (value - 0x4e00) * 2 + 1 local shengmu, yunmu = strbyte(PINYIN_DATA, index), strbyte(PINYIN_DATA, index + 1) if not shengmu or not yunmu then return '' end if shengmu == 0 and yunmu == 0 then return '' end return format(':%s%s:', strchar(shengmu), strchar(yunmu)) end local function pinyinchar(value) if value < 0x4e00 or value > 0x9fa5 then return utf8char(value) end return getpinyin(value) or utf8char(value) end function utf8topinyin(data) return (gsub(data, 'u(%x+)', function(x) return pinyinchar(tonumber(x, 16)) end)) end function topinyin(data) return utf8topinyin(toutf8(data)) end function topattern(data) return (topinyin(data):gsub('%%h', PINYIN_PATTERN)) end
local converter = {} local luastr local processed_keystrs = {} function write(filepath) local file = io.open(filepath, 'w') if not file then error("Can't write to "..filepath) end file:write(luastr) file:close() end local function fileprep() luastr = "local " end local function filefinish() luastr = luastr.."return entity\n" end local function ty(key) if type(key) == type("string") then return "\"" end return "" end local function convert(tab, keystr) if not keystr then keystr = "entity" end if not processed_keystrs[keystr] then luastr = luastr..keystr.." = {}\n" processed_keystrs[keystr] = true end for key, value in pairs(tab) do if type(value) == type({}) then convert(value, keystr.."["..ty(key)..key..ty(key).."]") elseif type(value) == type(function () end) then luastr = luastr.."--a function: "..key.."\n" elseif type(value) == type("string") then luastr = luastr..keystr.."["..ty(key)..key..ty(key).."] = [["..value.."]]\n" elseif type(value) == type(42) then luastr = luastr..keystr.."["..ty(key)..key..ty(key).."] = "..value.."\n" elseif type(value) == type(true) then if value then insert="true" else insert="false" end luastr = luastr..keystr.."["..ty(key)..key..ty(key).."] = "..insert.."\n" else luastr = luastr.."--unsupported type for: "..value.."\n" end end end function converter.convert(table, outpath) fileprep() convert(table) filefinish() write(outpath) processed_keystrs = {} end return converter
slot0 = class("EventGiveUpCommand", pm.SimpleCommand) slot0.execute = function (slot0, slot1) if getProxy(EventProxy).findInfoById(slot4, slot3):IsActivityType() then slot0:sendNotification(GAME.ACT_COLLECTION_EVENT_OP, { arg2 = 0, cmd = ActivityConst.COLLETION_EVENT_OP_GIVE_UP, arg1 = slot3, arg_list = {} }) else pg.ConnectionMgr.GetInstance():Send(13007, { id = slot3 }, 13008, function (slot0) if slot0.result == 0 then slot0.OnCancel(slot0.OnCancel) else pg.TipsMgr.GetInstance():ShowTips(errorTip("event_giveup_fail", slot0.result)) end end) end end slot0.OnCancel = function (slot0) pg.TipsMgr.GetInstance():ShowTips(i18n("event_giveup_success")) slot2, slot3 = getProxy(EventProxy).findInfoById(slot1, slot0) slot2.state = EventInfo.StateNone pg.ShipFlagMgr.GetInstance():UpdateFlagShips("inEvent") pg.m02:sendNotification(GAME.EVENT_LIST_UPDATE) end return slot0
 --[[ Name custom properties of equipment as "Item1", "Item2", etc. --]] local ABI = require(script:GetCustomProperty("ABI")) function SpawnEquipment() local equipment = {} local looping = true local i = 0 while looping do i = i + 1 local key = "Item" .. tostring(i) local template = script:GetCustomProperty(key) if template then local e = World.SpawnAsset(template) table.insert(equipment, e) else looping = false end end return equipment end function OnPlayerJoined(player) local equipment = SpawnEquipment() if #equipment <= 0 then return end --print("Size = " .. tostring(#equipment)) Task.Wait(0.2) if not Object.IsValid(player) then return end for _,e in ipairs(equipment) do ABI.AddEquipment(player, e) end end Game.playerJoinedEvent:Connect(OnPlayerJoined)
local extra = {} local conf = require('modules.extra.config') extra['lambdalisue/suda.vim'] = { } extra['wakatime/vim-wakatime'] = { } extra['h-hg/fcitx.nvim'] = { } return extra
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by torvald. --- DateTime: 2019-11-03 02:04 --- if not _G.motd then _G.motd = {} end motd = {LIX_LOGO .. "Welcome to Lix " .. LIX_VERSION .. " (" .. _VERSION .. ")"}
-- Editors: -- AltiV - February 16th, 2019 LinkLuaModifier("modifier_item_imba_bloodstone_720", "components/items/item_bloodstone_720", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier("modifier_item_imba_bloodstone_active_720", "components/items/item_bloodstone_720", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier("modifier_item_imba_bloodstone_active_cdr_720", "components/items/item_bloodstone_720", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier("modifier_item_imba_bloodstone_min_health_null_720", "components/items/item_bloodstone_720", LUA_MODIFIER_MOTION_NONE ) item_imba_bloodstone_720 = class({}) modifier_item_imba_bloodstone_720 = class({}) modifier_item_imba_bloodstone_active_720 = class({}) modifier_item_imba_bloodstone_active_cdr_720 = class({}) modifier_item_imba_bloodstone_min_health_null_720 = class({}) function item_imba_bloodstone_720:GetIntrinsicModifierName() return "modifier_item_imba_bloodstone_720" end function item_imba_bloodstone_720:GetManaCost() -- There's like one server-tick where the caster is nil so add this conditional to prevent random error if self and not self:IsNull() and self.GetCaster and self:GetCaster() ~= nil then return self:GetCaster():GetMaxMana() * (self:GetSpecialValueFor("mana_cost_percentage") / 100) end end function item_imba_bloodstone_720:OnSpellStart() self.caster = self:GetCaster() -- AbilitySpecials -- self.bonus_health = self:GetSpecialValueFor("bonus_health") -- self.bonus_mana = self:GetSpecialValueFor("bonus_mana") -- self.bonus_health_regen = self:GetSpecialValueFor("bonus_health_regen") -- self.bonus_mana_regen = self:GetSpecialValueFor("bonus_mana_regen") -- self.mana_regen_multiplier = self:GetSpecialValueFor("mana_regen_multiplier") -- self.regen_per_charge = self:GetSpecialValueFor("regen_per_charge") -- self.death_charges = self:GetSpecialValueFor("death_charges") -- self.kill_charges = self:GetSpecialValueFor("kill_charges") -- self.charge_range = self:GetSpecialValueFor("charge_range") -- self.initial_charges_tooltip = self:GetSpecialValueFor("initial_charges_tooltip") -- self.mana_cost_percentage = self:GetSpecialValueFor("mana_cost_percentage") self.restore_duration = self:GetSpecialValueFor("restore_duration") if not IsServer() then return end self.caster:EmitSound("DOTA_Item.Bloodstone.Cast") self:GetCaster():AddNewModifier(self:GetCaster(), self, "modifier_item_imba_bloodstone_active_720", {duration = self.restore_duration}) self:GetCaster():AddNewModifier(self:GetCaster(), self, "modifier_item_imba_bloodstone_active_cdr_720", {duration = self:GetSpecialValueFor("active_duration")}) end ------------------------------------- -- BLOODSTONE ACTIVE MODIFIER 7.20 -- ------------------------------------- function modifier_item_imba_bloodstone_active_720:OnCreated() self.ability = self:GetAbility() self.parent = self:GetParent() self.restore_duration = self.ability:GetSpecialValueFor("restore_duration") self.mana_cost = self.ability:GetManaCost() if not IsServer() then return end self.cooldown_remaining = math.max(self:GetAbility():GetCooldownTimeRemaining() - self:GetRemainingTime(), 0) self.particle = ParticleManager:CreateParticle("particles/items_fx/bloodstone_heal.vpcf", PATTACH_OVERHEAD_FOLLOW, self.parent) ParticleManager:SetParticleControlEnt(self.particle, 2, self.parent, PATTACH_POINT_FOLLOW, "attach_hitloc", self.parent:GetAbsOrigin(), true) self:AddParticle(self.particle, false, false, -1, false, false) self:StartIntervalThink(self:GetRemainingTime()) end function modifier_item_imba_bloodstone_active_720:OnIntervalThink() if not self:GetParent():HasModifier("modifier_item_imba_bloodstone_min_health_null_720") then self:GetParent():AddNewModifier(self:GetCaster(), self:GetAbility(), "modifier_item_imba_bloodstone_min_health_null_720", {duration = self.cooldown_remaining}) end end function modifier_item_imba_bloodstone_active_720:DeclareFunctions() return { MODIFIER_PROPERTY_HEALTH_REGEN_CONSTANT, MODIFIER_PROPERTY_MIN_HEALTH, -- IMBAfication: Lingering Will MODIFIER_PROPERTY_TOOLTIP } end function modifier_item_imba_bloodstone_active_720:GetModifierConstantHealthRegen() return self.mana_cost / self.restore_duration end function modifier_item_imba_bloodstone_active_720:GetMinHealth() if not self:GetParent():HasModifier("modifier_item_imba_bloodstone_min_health_null_720") then return self.mana_cost end end function modifier_item_imba_bloodstone_active_720:OnTooltip() return self.mana_cost end -------------------------------------- -- BLOODSTONE PASSIVE MODIFIER 7.20 -- -------------------------------------- function modifier_item_imba_bloodstone_720:IsHidden() return true end function modifier_item_imba_bloodstone_720:IsPermanent() return true end function modifier_item_imba_bloodstone_720:GetAttributes() return MODIFIER_ATTRIBUTE_MULTIPLE end function modifier_item_imba_bloodstone_720:OnCreated() if not self:GetAbility() then self:Destroy() return end self.ability = self:GetAbility() self.parent = self:GetParent() self.bonus_health = self.ability:GetSpecialValueFor("bonus_health") self.bonus_mana = self.ability:GetSpecialValueFor("bonus_mana") self.bonus_intellect = self.ability:GetSpecialValueFor("bonus_intellect") self.manacost_reduction = self.ability:GetSpecialValueFor("manacost_reduction") self.spell_amp = self.ability:GetSpecialValueFor("spell_amp") self.mana_regen_multiplier = self.ability:GetSpecialValueFor("mana_regen_multiplier") self.regen_per_charge = self.ability:GetSpecialValueFor("regen_per_charge") self.amp_per_charge = self.ability:GetSpecialValueFor("amp_per_charge") self.death_charges = self.ability:GetSpecialValueFor("death_charges") self.kill_charges = self.ability:GetSpecialValueFor("kill_charges") self.charge_range = self.ability:GetSpecialValueFor("charge_range") self.initial_charges_tooltip = self.ability:GetSpecialValueFor("initial_charges_tooltip") self.bonus_cdr = self.ability:GetSpecialValueFor("bonus_cdr") if not IsServer() then return end -- Need to do this instead of using the "ItemInitialCharges" KV because the latter messes with sell prices if not self.ability.initialized then self.ability:SetCurrentCharges(self.initial_charges_tooltip) self.ability.initialized = true end self:SetStackCount(self.ability:GetCurrentCharges()) -- Use Secondary Charges system to make mana loss reduction and CDR not stack with multiple Bloodstones for _, mod in pairs(self:GetCaster():FindAllModifiersByName(self:GetName())) do mod:GetAbility():SetSecondaryCharges(_) end end function modifier_item_imba_bloodstone_720:OnDestroy() if not IsServer() then return end for _, mod in pairs(self:GetCaster():FindAllModifiersByName(self:GetName())) do mod:GetAbility():SetSecondaryCharges(_) end end function modifier_item_imba_bloodstone_720:DeclareFunctions() return { MODIFIER_PROPERTY_HEALTH_BONUS, MODIFIER_PROPERTY_MANA_BONUS, MODIFIER_PROPERTY_MANA_REGEN_TOTAL_PERCENTAGE, MODIFIER_PROPERTY_SPELL_AMPLIFY_PERCENTAGE_UNIQUE, MODIFIER_PROPERTY_MANACOST_PERCENTAGE, MODIFIER_PROPERTY_STATS_INTELLECT_BONUS, MODIFIER_PROPERTY_COOLDOWN_PERCENTAGE, MODIFIER_PROPERTY_MANA_REGEN_CONSTANT, MODIFIER_PROPERTY_SPELL_AMPLIFY_PERCENTAGE, MODIFIER_EVENT_ON_DEATH } end function modifier_item_imba_bloodstone_720:GetModifierHealthBonus() return self.bonus_health end function modifier_item_imba_bloodstone_720:GetModifierManaBonus() return self.bonus_mana end function modifier_item_imba_bloodstone_720:GetModifierTotalPercentageManaRegen() return self.mana_regen_multiplier / 100 end function modifier_item_imba_bloodstone_720:GetModifierSpellAmplify_PercentageUnique() return self.spell_amp end function modifier_item_imba_bloodstone_720:GetModifierPercentageManacost() if self:GetAbility():GetSecondaryCharges() == 1 then return self.manacost_reduction end end function modifier_item_imba_bloodstone_720:GetModifierBonusStats_Intellect() return self.bonus_intellect end function modifier_item_imba_bloodstone_720:GetModifierPercentageCooldown() if self:GetAbility():GetSecondaryCharges() == 1 then return self.bonus_cdr end end function modifier_item_imba_bloodstone_720:GetModifierConstantManaRegen() return self.regen_per_charge * self:GetStackCount() end function modifier_item_imba_bloodstone_720:GetModifierSpellAmplify_Percentage() return self.amp_per_charge * self:GetStackCount() end function modifier_item_imba_bloodstone_720:OnDeath(keys) if keys.unit:IsRealHero() and self.parent:IsRealHero() then -- Checks for real enemy heroes that have died within vicinity or if the parent is the killer if self.parent:GetTeam() ~= keys.unit:GetTeam() and ((keys.unit:GetAbsOrigin() - self.parent:GetAbsOrigin()):Length2D() <= self.charge_range or self.parent == keys.attacker) and self.parent:IsAlive() then -- If the parent has multiple Bloodstones, only apply the charge gain to the top-left most one if self == self.parent:FindAllModifiersByName(self:GetName())[1] then for itemSlot = 0, 5 do local item = self.parent:GetItemInSlot(itemSlot) if item and item:GetName() == self.ability:GetName() then item:SetCurrentCharges(item:GetCurrentCharges() + self.kill_charges) break end end end -- Check if the owner of the Bloodstone died and is not reincarnating elseif self.parent == keys.unit and (not keys.unit.IsReincarnating or (keys.unit.IsReincarnating and not keys.unit:IsReincarnating())) then self.ability:SetCurrentCharges(math.max(self.ability:GetCurrentCharges() - self.death_charges, 0)) end -- Set stack count to current charges to allow client-side regen to show self:SetStackCount(self.ability:GetCurrentCharges()) end end -------------------------------------------------- -- MODIFIER_ITEM_IMBA_BLOODSTONE_ACTIVE_CDR_720 -- -------------------------------------------------- function modifier_item_imba_bloodstone_active_cdr_720:IsPurgable() return false end function modifier_item_imba_bloodstone_active_cdr_720:GetEffectName() return "particles/items2_fx/kaya_active_b0.vpcf" end function modifier_item_imba_bloodstone_active_cdr_720:OnCreated() self.active_cdr = self:GetAbility():GetSpecialValueFor("active_cdr") end function modifier_item_imba_bloodstone_active_cdr_720:DeclareFunctions() return { MODIFIER_PROPERTY_MANACOST_PERCENTAGE, MODIFIER_PROPERTY_COOLDOWN_PERCENTAGE, MODIFIER_EVENT_ON_ABILITY_FULLY_CAST, } end function modifier_item_imba_bloodstone_active_cdr_720:GetModifierPercentageCooldown() return self.active_cdr end function modifier_item_imba_bloodstone_active_cdr_720:GetModifierPercentageManacost() return self.active_cdr end function modifier_item_imba_bloodstone_active_cdr_720:OnAbilityFullyCast(keys) if keys.unit == self:GetParent() and not keys.ability:IsItem() and not keys.ability:IsToggle() then self:Destroy() end end ------------------------------------------------------- -- MODIFIER_ITEM_IMBA_BLOODSTONE_MIN_HEALTH_NULL_720 -- ------------------------------------------------------- function modifier_item_imba_bloodstone_min_health_null_720:IgnoreTenacity() return true end function modifier_item_imba_bloodstone_min_health_null_720:IsDebuff() return true end function modifier_item_imba_bloodstone_min_health_null_720:IsPurgable() return false end function modifier_item_imba_bloodstone_min_health_null_720:RemoveOnDeath() return false end
-- Copyright 2009 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. module("luci.controller.ff_p2pblock", package.seeall) function index() entry({"admin", "network", "firewall", "p2pblock"}, cbi("luci_fw/p2pblock"), _("P2P-Block"), 40) end
--[[ ########################################################## Inked Shadow Vaults By: keivamp ########################################################## LOCALIZED LUA FUNCTIONS ########################################################## GET ADDON DATA ########################################################## ]]-- local SV = select(2, ...) --[[ PET FILTERS ]]-- SV.defaults.Filters["Racial"] = { ["Dwarf"] = {65116}, ["Draenei"] = {59545,59543,59548,59542,59544,59547,28880,121093}, ["Gnome"] = {20589}, ["Human"] = {59752}, ["NightElf"] = {58984}, ["Worgen"] = {68992,87840}, ["BloodElf"] = {28730,50613,80483,25046,69179,129597,155145}, ["Goblin"] = {69046,69070,69041}, ["Orc"] = {20542,33702,33697}, ["Tauren"] = {20549}, ["Troll"] = {26297}, ["Scourge"] = {20578,7744}, ["Pandaren"] = {107079}, };
--- Provides permissions for usergroups local P = {} P.id = "usergroups" P.name = "Usergroup Permissions" P.settingsoptions = { "Admin Only", "Anyone", "No one" } P.defaultsetting = 2 P.checks = { function(instance, target, key) return instance.player:IsAdmin(), "This function is admin only" end, "allow", "block" } SF.Permissions.registerProvider(P)
--- @module Element -- A base class for all GUI elements. This module is typically only used by other -- elements, and will rarely be needed for scripts that aren't implementing their -- own. local Table = require("public.table") local T = Table.T local Element = T{} Element.__index = Element Element.__noRecursion = true function Element:new() return setmetatable(T{}, self) end --- Called when the script window is first opened. Used for any do-it-once -- processing, such as assigning and filling graphics buffers. That is, elements -- will typically draw themselves to a buffer once on `:init()` and then -- blit/rotate/etc from it as needed to draw themselves. function Element:init() end -- Called whenever the element's layer is redrawn function Element:draw() end -- Ask for a redraw on the next update function Element:redraw() self.layer.needsRedraw = true end -- Called on every update loop, unless the element is hidden or frozen function Element:onUpdate() end -- Removes the element from its parent layer and frees up any resources the -- element had requested (e.g. graphics buffers) function Element:delete() self:handleEvent("Delete", self) if self.layer then self.layer:remove(self) end end -- Called when the element is deleted. -- Use it for freeing up buffers and anything else memorywise that this -- element was doing function Element:onDelete() end -- Set or return the element's value -- Most elements don't track their values internally in the same format as -- their output, so it's important to use this when accessing them to ensure -- that right behavior. function Element:val() end ------------------------------------ -------- User Events --------------- ------------------------------------ function Element:onMouseEnter() end function Element:onMouseLeave() end -- Called on every update loop if the mouse is over this element. function Element:onMouseOver() end -- Only called once; won't repeat if the button is held function Element:onMouseDown() end function Element:onMouseUp() end function Element:onDoubleClick() end -- Will continue being called even if you drag outside the element function Element:onDrag() end -- Right-click function Element:onRightMouseDown() end function Element:onRightMouseUp() end function Element:onRightDoubleClick() end function Element:onRightDrag() end -- Middle-click function Element:onMiddleMouseDown() end function Element:onMiddleMouseUp() end function Element:onMiddleDoubleClick() end function Element:onMiddleDrag() end function Element:onWheel() end function Element:onType() end -- Elements like a Textbox that need to keep track of their focus -- state may use these to e.g. update the text somewhere else -- when the user clicks out of the box. function Element:onGotFocus() end function Element:onLostFocus() end -- Called when the script window has been resized function Element:onResize() end function Element:handleEvent(eventName, state, last) local before = "before"..eventName if self[before] then self[before](self, state, last) end self["on"..eventName](self, state, last) local after = "after"..eventName if self[after] then self[after](self, state, last) end end function Element:update(state, last) self:handleEvent("Update", state, last) if state.resized then self:handleEvent("Resize", state, last) end end -- Are these coordinates inside the element? -- If no coords are given, will use the mouse cursor function Element:containsPoint (x, y) return ( x >= (self.x or 0) and x < ((self.x or 0) + (self.w or 0)) and y >= (self.y or 0) and y < ((self.y or 0) + (self.h or 0)) ) end -- Returns the x,y that would center elm1 within elm2. -- Axis can be "x", "y", or "xy". -- If elm2 is omitted, centers elm1 in the window instead function Element:center (elm1, elm2) elm2 = elm2 or (elm1.layer and elm1.layer.window and { x = 0, y = 0, w = elm1.layer.window.currentW, h = elm1.layer.window.currentH }) if not elm2 and ( elm2.x and elm2.y and elm2.w and elm2.h and elm1.x and elm1.y and elm1.w and elm1.h) then return end return (elm2.x + (elm2.w - elm1.w) / 2), (elm2.y + (elm2.h - elm1.h) / 2) end -- Returns the specified parameters for a given element. -- If nothing is specified, returns all of the element's properties. -- ex. local str = my_element:debug("x", "y", "caption", "textColor") function Element:debug(...) local arg = {...} if #arg == 0 then arg = {} for k in Table.kpairs(self) do arg[#arg+1] = k end end if not self or not self.type then return end local pre = tostring(self.name) .. "." local strs = {} for i = 1, #arg do local k, v = arg[i], self[arg[i]] strs[#strs + 1] = pre .. tostring(k) .. " = " if type(v) == "table" then strs[#strs] = strs[#strs] .. "table:" -- Hacks to break infinite loops; should probably be done -- with some sort of override in the element classes -- local depth = (k == "layer" or k == "tabs") and 2 if (k == "layer") then strs[#strs + 1] = Table.stringify(v, nil, 1) elseif (k == "tabs") then local tabs = {} for _, tab in pairs(v) do tabs[#tabs + 1] = " " .. tab.label for _, layer in pairs(tab.layers) do tabs[#tabs + 1] = " " .. layer.name .. ", z = " .. layer.z end end strs[#strs + 1] = table.concat(tabs, "\n") else strs[#strs + 1] = Table.stringify(v, nil, 1) end else strs[#strs] = strs[#strs] .. tostring(v) end end return table.concat(strs, "\n") end function Element:moveToLayer(dest) if self.layer then self.layer:removeElements(self) end if dest then dest:addElements(self) end end -- Most elements will accept a .output property, specifying how to display -- their values depending on .output's type: -- String: Returns the string, with any occurrences of '%val%' replaced by the element's value -- Table: The element's value will be used as a key -- Function: The element's value will be passed to it function Element:formatOutput(val) if not self.output then return tostring(val) end local output local t = type(self.output) if t == "string" or t == "number" then output = self.output:gsub("%%val%%", val) elseif t == "table" then output = self.output[val] elseif t == "function" then output = self.output(val) end return output and tostring(output) or tostring(val) end -- Use the given table of properties to make sure the element has everything -- needed to display it. function Element:addDefaultProps (props) if type(props) ~= "table" then return props end local new = Table.deepCopy(props or {}) return Table.addMissingKeys(new, self.defaultProps) end function Element:showDevMenu(state) gfx.x = state.mouse.x gfx.y = state.mouse.y local ret = gfx.showmenu("#"..self.name.."||List properties in console") if ret == 2 then Msg(self:debug()) end end return Element
local cjson = require "cjson.safe" local arg_keys = {} for k, _ in pairs(__args) do table.insert(arg_keys, k) end table.sort(arg_keys) for i, k in ipairs(arg_keys) do local v = __args[k] print(i, k, table.getn(v)) if type(v) == 'table' then for j, p in pairs(v) do print("\t", j, p) end end end function print_config() print(type(__config)) print(type(__config.get_config_schema)) print(__config.get_config_schema()) print(type(__config.get_default_config)) print(__config.get_default_config()) print(type(__config.get_current_config)) print(__config.get_current_config()) print(type(__config.get_event_data_schema)) print(__config.get_event_data_schema()) print(type(__config.get_event_config_schema)) print(__config.get_event_config_schema()) print(type(__config.get_default_event_config)) print(__config.get_default_event_config()) print(type(__config.get_current_event_config)) print(__config.get_current_event_config()) print(type(__config.get_module_info)) print(__config.get_module_info()) print(type(__config.set_current_config)) print(__config.set_current_config("{}")) print(type(__config.ctx)) print(__config.ctx) print(__config.ctx.agent_id) print(type(__config.ctx.os)) print(__config.ctx.os) for os, arch in ipairs(__config.ctx.os) do print("\t", os, arch) print("\t", type(arch)) for i, k in ipairs(arch) do print("\t\t", i, k) end end print(__config.ctx.name) print(__config.ctx.version) print(__config.ctx.last_update) end function print_agents() print("__agents type: ", type(__agents)) local agents = __agents.dump() print("__agents.dump() type: ", type(agents)) print("__agents.dump():", agents) for i, a in pairs(agents) do print("\t", i, a, type(a)) end end function test_clibs() print("preload: ", package.preload) print("path: ", package.path) print("cpath: ", package.cpath) local md4 = require'md4' local md5 = require'md5' local glue = require'glue' local sumhex = function(s, lib) return glue.tohex(lib.sum(s)) end print("test md4: ", sumhex('test message', md4)) print("test md5: ", sumhex('test message', md5)) print("test_clibs successed") end function test_fs_data_load() print("tmpdir: ", __tmpdir) local lfs = require("lfs") local path = (__tmpdir or "") .. "/data/file.dat" print("attr: ", lfs.attributes(path)) local f = io.open(path, "rb") if f ~= nul then print("content: ", f:read("*all")) f:close() else print("Can't open file") end print("test_fs_data_load successed") end function test_utils() local librsync_test = true -- require'tests.librsync_test' local vararg_test = require'tests.vararg_test' if not librsync_test or not vararg_test then print("test_utils failed", librsync_test, vararg_test) else print("test_utils successed") end end function add_routes(src) local agents = __agents.dump() for t, a in pairs(agents) do if t ~= src then local route_msg_f = cjson.encode({['type'] = 'add_route', ['dst'] = src}) print("notify ", t, " about new route to: ", src, ": ", __api.send_data_to(t, route_msg_f)) local route_msg_r = cjson.encode({['type'] = 'add_route', ['dst'] = t}) print("notify ", src, " about new route to: ", t, ": ", __api.send_data_to(src, route_msg_r)) end end end function del_routes(src) local agents = __agents.dump() for t, a in pairs(agents) do if t ~= src then local route_msg_f = cjson.encode({['type'] = 'del_route', ['dst'] = src}) print("notify ", t, " about new route to: ", src, ": ", __api.send_data_to(t, route_msg_f)) end end end __api.set_recv_timeout(5000) -- 5s __api.add_cbs({ data = function(src, data) print('receive data: "' .. data .. '" from: ' .. src) local msg = cjson.decode(data) if msg['type'] == 'hs_agent' then local hs_server_msg = cjson.encode({['type'] = 'hs_server', ['data'] = "hello"}) __api.await(100) print("sent hs server msg to ", src, ": ", __api.send_data_to(src, hs_server_msg)) add_routes(src) else local server_resp_msg = cjson.encode({['type'] = 'test_resp', ['data'] = "response"}) print("sent server response msg to ", src, ": ", __api.send_data_to(src, server_resp_msg)) end return true end, file = function(src, path, name) print('receive file: "' .. path .. '" / "' .. name .. '" from: ' .. src) return true end, text = function(src, text, name) print('receive text: "' .. text .. '" / "' .. name .. '" from: ' .. src) return true end, msg = function(src, msg, mtype) print('receive msg: "' .. msg .. '" / "' .. tostring(mtype) .. '" from: ' .. src) return true end, control = function(cmtype, data) print('receive control msg: "' .. cmtype .. '" from: ' .. data) print_agents() if cmtype == "agent_connected" then -- notify all alive agents that new agent was connected -- routes are sould be fixed on handshake end if cmtype == "agent_disconnected" then -- notify all alive agents that agent was disconnected del_routes(data) end return true end, }) test_clibs() test_fs_data_load() test_utils() print_config() local agents = __agents.dump() for t, a in pairs(agents) do add_routes(t) __api.push_event(a.ID, cjson.encode({ name = "my_test_event", data = { key = "val" }, uniq = "my_test_uniq", })) end __api.await(-1) print("module test stoped") return 'success'
if battle == 1 then SelectTarget(3) character_1:UseSkill(2) character_1:UseSkill(3) character_1:UseSkill(1) character_2:UseSkill(3) character_2:UseSkill(1) character_4:UseSkill(1) end if battle == 2 then Summon(1) character_2:UseSkill(2) character_3:UseSkill(2) Summon(6) end
local assets = { Asset("ANIM", "anim/rock_light.zip"), } local prefabs = { "nightmarelightfx", } local function ReturnChildren(inst) for k,child in pairs(inst.components.childspawner.childrenoutside) do if child.components.combat then child.components.combat:SetTarget(nil) end if child.components.lootdropper then child.components.lootdropper:SetLoot({}) end if child.components.health then child.components.health:Kill() end end end local function turnoff(inst, light) if light then light:Enable(false) end end local function spawnfx(inst) if not inst.fx then inst.fx = SpawnPrefab("nightmarelightfx") local pt = inst:GetPosition() inst.fx.Transform:SetPosition(pt.x, -0.1, pt.z) end end local states = { calm = function(inst, instant) inst.SoundEmitter:KillSound("warnLP") inst.SoundEmitter:KillSound("nightmareLP") inst.Light:Enable(true) inst.components.lighttweener:StartTween(nil, 0, nil, nil, nil, (instant and 0) or 1, turnoff) if not instant then inst.AnimState:PushAnimation("close_2") inst.AnimState:PushAnimation("idle_closed") inst.fx.AnimState:PushAnimation("close_2") inst.fx.AnimState:PushAnimation("idle_closed") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_close") else inst.AnimState:PlayAnimation("idle_closed") inst.fx.AnimState:PlayAnimation("idle_closed") end if inst.components.childspawner then inst.components.childspawner:StopSpawning() inst.components.childspawner:StartRegen() ReturnChildren(inst) end end, warn = function(inst, instant) inst.Light:Enable(true) inst.components.lighttweener:StartTween(nil, 3, nil, nil, nil, (instant and 0) or 0.5) inst.AnimState:PlayAnimation("open_1") inst.fx.AnimState:PlayAnimation("open_1") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_open_warning") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_warning_LP", "warnLP") end, nightmare = function(inst, instant) inst.SoundEmitter:KillSound("warnLP") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_open_LP", "nightmareLP") inst.Light:Enable(true) inst.components.lighttweener:StartTween(nil, 6, nil, nil, nil, (instant and 0) or 0.5) if not instant then inst.AnimState:PlayAnimation("open_2") inst.AnimState:PushAnimation("idle_open") inst.fx.AnimState:PlayAnimation("open_2") inst.fx.AnimState:PushAnimation("idle_open") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_open") else inst.AnimState:PlayAnimation("idle_open") inst.fx.AnimState:PlayAnimation("idle_open") end if inst.components.childspawner then inst.components.childspawner:StartSpawning() inst.components.childspawner:StopRegen() end end, dawn = function(inst, instant) inst.SoundEmitter:KillSound("nightmareLP") inst.Light:Enable(true) inst.components.lighttweener:StartTween(nil, 3, nil, nil, nil, (instant and 0) or 0.5) inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_close") inst.SoundEmitter:KillSound("nightmareLP") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_open_LP", "nightmareLP") inst.AnimState:PlayAnimation("close_1") inst.fx.AnimState:PlayAnimation("close_1") inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_spawner_open") if inst.components.childspawner then inst.components.childspawner:StartSpawning() inst.components.childspawner:StopRegen() end end } local function onsave(inst, data) if inst.rockstate then data.rockstate = inst.rockstate end end local function onload(inst, data) if not data then return end if data.rockstate then inst.rockstate = data.rockstate spawnfx(inst) states[inst.rockstate](inst, true) end end local function getsanityaura(inst) if inst.rockstate == "calm" then return 0 elseif inst.rockstate == "warn" then return -TUNING.SANITY_SMALL else return -TUNING.SANITY_MED end end local function changestate(inst, data) local statefn = states[data.newphase] if statefn then spawnfx(inst) inst.rockstate = data.newphase inst:DoTaskInTime(math.random() * 2, statefn) end end local function fn() local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() inst.entity:AddSoundEmitter() local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon( "nightmarelight.png" ) inst.rockstate = "calm" anim:SetBuild("rock_light") anim:SetBank("rock_light") anim:PlayAnimation("idle_closed",false) MakeObstaclePhysics(inst, 1) inst:AddComponent("sanityaura") inst.components.sanityaura.aurafn = getsanityaura inst:AddComponent( "childspawner" ) inst.components.childspawner:SetRegenPeriod(5) inst.components.childspawner:SetSpawnPeriod(30) inst.components.childspawner:SetMaxChildren(math.random(1,2)) inst.components.childspawner.childname = "crawlingnightmare" inst.components.childspawner:SetRareChild("nightmarebeak", 0.35) inst:AddComponent("inspectable") inst:AddComponent("lighttweener") local light = inst.entity:AddLight() inst.components.lighttweener:StartTween(light, 1, .9, 0.9, {255/255,255/255,255/255}, 0, turnoff) inst:ListenForEvent("phasechange", function(world, data) changestate(inst, data) end, GetWorld()) inst.OnSave = onsave inst.OnLoad = onload return inst end return Prefab( "common/objects/nightmarelight", fn, assets, prefabs)
local router = { _VERSION = 'router.lua v0.6', _DESCRIPTION = 'A simple router for Lua', _LICENSE = [[ MIT LICENSE * table_copyright (c) 2013 Enrique García Cota * table_copyright (c) 2013 Raimon Grau Permission is hereby granted, free of charge, to any person obtaining a table_copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, table_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 table_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 table_copyRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] } local function split(str, delimiter) local result = {} delimiter = delimiter or " " for chunk in str:gmatch("[^".. delimiter .. "]+") do result[#result + 1] = chunk end return result end local function array_get_head_and_tail(t) local tail = {} for i=2, #t do tail[i-1] = t[i] end return t[1], tail end local function table_merge(dest, src) if not src then return end for k,v in pairs(src) do dest[k] = tostring(v) end end local function table_copy(t) local result = {} for k,v in pairs(t) do result[k] = v end return result end local function resolve_rec(remaining_path, node, params) if not node then return nil end -- node is a _LEAF and no remaining tokens; found end if #remaining_path == 0 then return node[router._LEAF], params end local current_token, child_path = array_get_head_and_tail(remaining_path) -- always resolve static strings first for key, child in pairs(node) do if key == current_token then local f, bindings = resolve_rec(child_path, child, params) if f then return f, bindings end end end -- then resolve parameters for key, child in pairs(node) do if type(key) == "table" and key.param then local child_params = table_copy(params) child_params[key.param] = current_token local f, bindings = resolve_rec(child_path, child, child_params) if f then return f, bindings end end end return false end local function find_key_for(token, node) local param_name = token:match("^:(.+)$") -- if token is not a param( it does not begin with :) then return the token if not param_name then return token end -- otherwise, it's a param, like :id. If it exists as a child of the node, we return it for key,_ in pairs(node) do if type(key) == 'table' and key.param == param_name then return key end end -- otherwise, it's a new key to be inserted return {param = param_name} end local function match_one_path(self, method, path, f) self._tree[method] = self._tree[method] or {} local node = self._tree[method] for _,token in ipairs(split(path, "/")) do local key = find_key_for(token, node) node[key] = node[key] or {} node = node[key] end node[router._LEAF] = f end ------------------------------ INSTANCE METHODS ------------------------------------ local Router = {} function Router:resolve(method, path) return resolve_rec(split(path, "/"), self._tree[method] , {}) end function Router:execute(method, path, query_params) local f,params = self:resolve(method, path) if not f then return nil, ('Could not resolve %s %s'):format(method, path) end table_merge(params, query_params) return true, f(params) end function Router:match(method, path, f) if type(method) == 'table' then local t = method for method, routes in pairs(t) do for path, f in pairs(routes) do match_one_path(self, method, path, f) end end else match_one_path(self, method, path, f) end end for _,http_method in ipairs({'get', 'post', 'put', 'delete', 'trace', 'connect', 'options', 'head'}) do Router[http_method] = function(self, path, f) -- Router.get = function(self, path, f) return self:match(http_method, path, f) -- return self:match('get', path, f) end -- end end local router_mt = { __index = Router } ------------------------------ PUBLIC INTERFACE ------------------------------------ router._LEAF = {} router.new = function() return setmetatable({ _tree = {}}, router_mt) end return router
LinkLuaModifier( "modifier_item_glimmer_cape_fade", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier("modifier_generic_bonus", "modifiers/modifier_generic_bonus.lua", LUA_MODIFIER_MOTION_NONE) item_postactive_2a = class(ItemBaseClass) function item_postactive_2a:GetIntrinsicModifierName() return "modifier_generic_bonus" end function item_postactive_2a:OnSpellStart() local caster = self:GetCaster() local shroud_duration = self:GetSpecialValueFor( "duration" ) caster:AddNewModifier( caster, self, "modifier_item_glimmer_cape_fade", { duration = shroud_duration } ) caster:EmitSound( "Item.GlimmerCape.Activate" ) end
xbg = default.gui_bg .. default.gui_bg_img .. default.gui_slots local default_inventory_size = 32 local default_inventory_formspecs = { ["8"] = [[ size[8,6] list[context;main;0,0;8,1;] list[current_player;main;0,2;8,4;] listring[current_player;main] listring[context;main] ]] .. default.get_hotbar_bg(0,2), ["16"] = [[ size[8,7] list[context;main;0,0;8,2;] list[current_player;main;0,3;8,4;] listring[current_player;main] listring[context;main] ]] .. default.get_hotbar_bg(0,3), ["24"] = [[ size[8,8] list[context;main;0,0;8,3;] list[current_player;main;0,4;8,4;] listring[current_player;main] listring[context;main]" ]] .. default.get_hotbar_bg(0,4), ["32"] = [[ size[8,9] list[context;main;0,0.3;8,4;] list[current_player;main;0,4.85;8,1;] list[current_player;main;0,6.08;8,3;8] listring[current_player;main] listring[context;main] ]] .. default.get_hotbar_bg(0,4.85) } local function get_formspec_by_size(size) local formspec = default_inventory_formspecs[tostring(size)] return formspec or default_inventory_formspecs end local default_can_dig = function(pos) local inv = minetest.get_meta(pos):get_inventory() return inv:is_empty("main") end local function xdecor_stairs_alternative(nodename, def) local mod, name = nodename:match("(.*):(.*)") for groupname, value in pairs(def.groups) do if groupname ~= "cracky" and groupname ~= "choppy" and groupname ~= "flammable" and groupname ~= "crumbly" and groupname ~= "snappy" then def.groups.groupname = nil end end if minetest.get_modpath("moreblocks") then stairsplus:register_all( mod, name, nodename, { description = def.description, tiles = def.tiles, groups = def.groups, sounds = def.sounds, } ) elseif minetest.get_modpath("stairs") then stairs.register_stair_and_slab(name,nodename, def.groups, def.tiles, ("%s Stair"):format(def.description), ("%s Slab"):format(def.description), def.sounds ) end end function workbench.register(name, def) def.drawtype = def.drawtype or (def.mesh and "mesh") or (def.node_box and "nodebox") def.sounds = def.sounds or default.node_sound_defaults() if not (def.drawtype == "normal" or def.drawtype == "signlike" or def.drawtype == "plantlike" or def.drawtype == "glasslike_framed" or def.drawtype == "glasslike_framed_optional") then def.paramtype2 = def.paramtype2 or "facedir" end if def.sunlight_propagates ~= false and (def.drawtype == "plantlike" or def.drawtype == "torchlike" or def.drawtype == "signlike" or def.drawtype == "fencelike") then def.sunlight_propagates = true end if not def.paramtype and (def.light_source or def.sunlight_propagates or def.drawtype == "nodebox" or def.drawtype == "mesh") then def.paramtype = "light" end local infotext = def.infotext local inventory = def.inventory def.inventory = nil if inventory then def.on_construct = def.on_construct or function(pos) local meta = minetest.get_meta(pos) if infotext then meta:set_string("infotext", infotext) end local size = inventory.size or default_inventory_size local inv = meta:get_inventory() inv:set_size("main", size) meta:set_string("formspec", (inventory.formspec or get_formspec_by_size(size)) .. xbg) end def.can_dig = def.can_dig or default_can_dig elseif infotext and not def.on_construct then def.on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("infotext", infotext) end end minetest.register_node("workbench:" .. name, def) local workbench = minetest.settings:get_bool("enable_xdecor_workbench") if workbench == false and (minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs")) then if workbench.stairs_valid_def(def) then xdecor_stairs_alternative("workbench:"..name, def) end end end
--[[ Name: "cl_scoreboard.lua". Product: "nexus". --]] local PANEL = {}; -- Called when the panel is initialized. function PANEL:Init() self:SetSize( nexus.menu.GetWidth(), nexus.menu.GetHeight() ); self:SetTitle("Scoreboard"); self:SetSizable(false); self:SetDraggable(false); self:ShowCloseButton(false); self.panelList = vgui.Create("DPanelList", self); self.panelList:SetPadding(2); self.panelList:SetSpacing(3); self.panelList:SizeToContents(); self.panelList:EnableVerticalScrollbar(); nexus.scoreboard = self; nexus.scoreboard:Rebuild(); end; -- A function to rebuild the panel. function PANEL:Rebuild() self.panelList:Clear(true); local availableClasses = {}; local classes = {}; for k, v in ipairs( g_Player.GetAll() ) do if ( v:HasInitialized() ) then local class = nexus.mount.Call("GetPlayerScoreboardClass", v); if (class) then if ( !availableClasses[class] ) then availableClasses[class] = {}; end; if ( nexus.mount.Call("PlayerShouldShowOnScoreboard", v) ) then availableClasses[class][#availableClasses[class] + 1] = v; end; end; end; end; for k, v in pairs(availableClasses) do table.sort(v, function(a, b) return nexus.mount.Call("ScoreboardSortClassPlayers", k, a, b); end); if (#v > 0) then classes[#classes + 1] = {name = k, players = v}; end; end; table.sort(classes, function(a, b) return a.name < b.name; end); if (table.Count(classes) > 0) then local label = vgui.Create("nx_InfoText", self); label:SetText("Clicking a player's model icon may bring up some options."); label:SetInfoColor("blue"); self.panelList:AddItem(label); for k, v in pairs(classes) do local characterForm = vgui.Create("DForm", self); local panelList = vgui.Create("DPanelList", self); for k2, v2 in pairs(v.players) do self.currentAvatarImage = true; self.currentSteamName = v2:SteamName(); self.currentFaction = nexus.player.GetFaction(v2); self.currentPlayer = v2; self.currentClass = g_Team.GetName( v2:Team() ); self.currentModel = v2:GetModel(); self.currentSkin = v2:GetSkin(); self.currentName = v2:Name(); panelList:AddItem( vgui.Create("nx_ScoreboardItem", self) ) ; end; self.panelList:AddItem(characterForm); panelList:SetAutoSize(true); panelList:SetPadding(4); panelList:SetSpacing(4); characterForm:SetName(v.name); characterForm:AddItem(panelList); characterForm:SetPadding(4); end; else local label = vgui.Create("nx_InfoText", self); label:SetText("There are no players to display."); label:SetInfoColor("orange"); self.panelList:AddItem(label); end; self.panelList:InvalidateLayout(true); end; -- Called when the menu is opened. function PANEL:OnMenuOpened() if (nexus.menu.GetActivePanel() == self) then self:Rebuild(); end; end; -- Called when the panel is selected. function PANEL:OnSelected() self:Rebuild(); end; -- Called when the layout should be performed. function PANEL:PerformLayout() self.panelList:StretchToParent(4, 28, 4, 4); self:SetSize( self:GetWide(), math.min(self.panelList.pnlCanvas:GetTall() + 32, ScrH() * 0.75) ); derma.SkinHook("Layout", "Frame", self); end; -- Called when the panel is painted. function PANEL:Paint() derma.SkinHook("Paint", "Frame", self); return true; end; -- Called each frame. function PANEL:Think() self:InvalidateLayout(true); end; vgui.Register("nx_Scoreboard", PANEL, "DFrame"); local PANEL = {}; -- Called when the panel is initialized. function PANEL:Init() SCOREBOARD_PANEL = true; self:SetSize(self:GetParent():GetWide(), 32); local colorWhite = nexus.schema.GetColor("white"); local parent = self:GetParent(); local info = { doesRecognise = nexus.player.DoesRecognise(parent.currentPlayer), avatarImage = parent.currentAvatarImage, steamName = parent.currentSteamName, faction = parent.currentFaction, player = parent.currentPlayer, class = parent.currentClass, model = parent.currentModel, skin = parent.currentSkin, name = parent.currentName }; info.text = nexus.mount.Call("GetPlayerScoreboardText", info.player); nexus.mount.Call("ScoreboardAdjustPlayerInfo", info); self.toolTip = info.toolTip; self.player = info.player; self.nameLabel = vgui.Create("DLabel", self); self.nameLabel:SetText(info.name); self.nameLabel:SetTextColor(colorWhite); self.nameLabel:SizeToContents(); self.factionLabel = vgui.Create("DLabel", self); self.factionLabel:SetText(info.faction); self.factionLabel:SetTextColor(colorWhite); self.factionLabel:SizeToContents(); if (type(info.text) == "string") then self.factionLabel:SetText(info.text); self.factionLabel:SizeToContents(); end; if (info.doesRecognise) then self.spawnIcon = vgui.Create("SpawnIcon", self); self.spawnIcon:SetModel(info.model, info.skin); self.spawnIcon:SetIconSize(30); else self.spawnIcon = vgui.Create("DImageButton", self); self.spawnIcon:SetImage("nexus/unknown"); self.spawnIcon:SetSize(30, 30); end; -- Called when the spawn icon is clicked. function self.spawnIcon.DoClick(spawnIcon) local options = {}; nexus.mount.Call("GetPlayerScoreboardOptions", info.player, options); NEXUS:AddMenuFromData(nil, options); end; self.avatarImage = vgui.Create("AvatarImage", self); self.avatarImage:SetSize(30, 30); if (info.avatarImage) then self.avatarImage:SetPlayer(info.player); self.avatarImage:SetToolTip("This player's name is "..info.steamName..".\nThis player's Steam ID is "..info.player:SteamID().."."); end; SCOREBOARD_PANEL = nil; end; -- Called each frame. function PANEL:Think() if ( IsValid(self.player) ) then if (self.toolTip) then self.spawnIcon:SetToolTip(self.toolTip); else self.spawnIcon:SetToolTip("This player's ping is "..self.player:Ping().."."); end; end; end; -- Called when the layout should be performed. function PANEL:PerformLayout() self.factionLabel:SizeToContents(); self.spawnIcon:SetPos(1, 1); self.avatarImage:SetPos(40, 1); self.nameLabel:SetPos(80, 2); self.factionLabel:SetPos( 80, 30 - self.factionLabel:GetTall() ); end; vgui.Register("nx_ScoreboardItem", PANEL, "DPanel");
---@class ItemBoxUseWindow local ItemBoxUseWindow = DClass("ItemBoxUseWindow", BaseWindow) _G.ItemBoxUseWindow = ItemBoxUseWindow function ItemBoxUseWindow:ctor(data) ---@type Bag_ItemData self.itemData = data[1] end function ItemBoxUseWindow:onInit() self.coverCallBack = self.close local nodeTitle = self.transform:Find("Image_BG/NodeTitle") self.txt_Name = self.nodes.txt_Name self.txt_Des = self.nodes.txt_Des self.txt_CountShow = self.nodes.txt_CountShow local nodeControl = self.transform:Find("Image_BG/NodeControl/Image_Control") self.txt_CurCount = self.nodes.txt_CurCount local btn = self.nodes.btnMin self:addEventHandler( btn.onClick, function() self:onClickMin() end ) btn = self.nodes.btnMax self:addEventHandler( btn.onClick, function() self:onClickMax() end ) btn = self.nodes.btnAdd self:addEventHandler( btn.onClick, function() self:onClickAdd() end ) btn = self.nodes.btnLost self:addEventHandler( btn.onClick, function() self:onClickLost() end ) btn = self.nodes.btnSure self:addEventHandler( btn.onClick, function() self:onClickSure() end ) self:onUpdateUI() end function ItemBoxUseWindow:onCloseWindow() UIManager.closeWindow("ItemBoxUseWindow") end function ItemBoxUseWindow:onUpdateUI() self.countControl = 1 self.itemConfig = BagManager.getItemConfigDataById(self.itemData.cId) self:onSetView() self:onSetTitle() self:onSetControl() end function ItemBoxUseWindow:onSetTitle() self.txt_Name.text = self.itemConfig.name self.txt_CountShow.text = "1/" .. tostring(#BagManager.getDropItemsByCId(self.itemConfig.id)) end function ItemBoxUseWindow:onSetView() local list = BagManager.getDropItemsByCId(self.itemConfig.id) self.listShow = {} self.nodes.content:InitPool( #list, function(index, obj) local value = list[index] local gainObj = obj local config = Config.Item[value] local count = 1 local img_Bg = gainObj.transform:Find("Image_Bg"):GetComponent(typeof(Image)) local image_Icon = gainObj.transform:Find("Image_Icon"):GetComponent(typeof(Image)) local txt_Count = gainObj.transform:Find("Text_Count"):GetComponent(typeof(Text)) local txt_Name = gainObj.transform:Find("Text_Name"):GetComponent(typeof(Text)) local img_Select = gainObj.transform:Find("Image_Select") local pathIcon = config.item_icon local pathQuality = string.format("%sQuality_Big%02d", BagManager.pathItemQuality, config.item_bg) self:setSprite(img_Bg, pathQuality) self:setSprite(image_Icon, BagManager.pathItemIcon .. pathIcon) txt_Count.transform.gameObject:SetActive(false) txt_Count.text = "×" .. tostring(count) txt_Name.text = config.name local gainItem = {} gainItem.obj = gainObj gainItem.select = img_Select gainItem.count = count gainItem.configCount = 1 gainItem.id = value gainItem.txtCount = txt_Count local btn_Obj = gainObj:GetComponent(typeof(Button)) self:addEventHandler( btn_Obj.onClick, function() self:onSelectOne(gainItem) end ) if index == 1 then self.selectItemId = value end img_Select.gameObject:SetActive(index == 1) table.insert(self.listShow, gainItem) end ) end function ItemBoxUseWindow:onSelectOne(item) self.selectItemId = item.id for key, value in pairs(self.listShow) do value.select.gameObject:SetActive(value.id == item.id) end end function ItemBoxUseWindow:onSetControl() self.txt_CurCount.text = tostring(self.countControl) for index, value in ipairs(self.listShow) do value.count = value.configCount * self.countControl value.txtCount.text = tostring(value.count) end end function ItemBoxUseWindow:onClickMin() self.countControl = 1 self:onSetControl() end function ItemBoxUseWindow:onClickMax() self.countControl = self.itemData.num self:onSetControl() end function ItemBoxUseWindow:onClickAdd() if self.countControl + 1 > self.itemData.num then return nil end self.countControl = self.countControl + 1 self:onSetControl() end function ItemBoxUseWindow:onClickLost() if self.countControl <= 1 then return nil end self.countControl = self.countControl - 1 self:onSetControl() end function ItemBoxUseWindow:onClickSure() if self.itemData.num < self.countControl then MsgCenter.sendMessage(Msg.HINT_COMMON, Lang(GL_TIP_ITEMNUM_NOTENOUGH)) return nil end ---@type BagMgr_BagItemInfo local data = {} data.bId = self.itemData.bId data.gId = self.itemData.gId data.cId = self.itemData.cId data.num = self.countControl BagMgr:sendUseItem( data, function() end ) end
function onUse(player, item, fromPosition, target, toPosition, isHotkey) return onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) end
return function(self) return self.indent * self.chunk_length + self:get_text_length() end
local helpers = require('gmni.helpers') local loading_buffers = {} local spinner = {'|', '/', '-', '\\'} local function spin(bufnr) if loading_buffers[bufnr] == nil then return end if loading_buffers[bufnr] > #spinner then loading_buffers[bufnr] = 1 end helpers.load_to_buf(bufnr, { "Loading... " .. spinner[loading_buffers[bufnr]] }) loading_buffers[bufnr] = loading_buffers[bufnr] + 1 vim.defer_fn(function () spin(bufnr) end, 150) end local function start(bufnr) loading_buffers[bufnr] = 1 spin(bufnr) end local function stop(bufnr) loading_buffers[bufnr] = nil end return { start = start, stop = stop, }
slot0 = class("MusicGameNote") slot0.easyTriggerStepTime = nil slot0.type_left = 1 slot0.type_right = 2 slot0.type_pu_normal = 1 slot0.type_pu_both = 2 slot0.type_dgree_easy = 1 slot0.type_dgree_hard = 2 slot1 = 1 slot2 = 2 slot3 = 3 slot4 = 4 slot5 = 4 slot6 = 0 slot7 = 1 slot8 = 2 slot9 = { 500, 800, 1250, 1450 } slot10 = { 0.26, 0.2, 0.15, 0.13 } slot11 = 3 slot12 = nil slot13 = false function slot14(slot0) ({ _tf = slot0, type = nil, beginTime = nil, endTime = nil, longFlag = nil, removeTime = nil, speedOffsetX = nil, longTime = 0, triggerDown = nil, triggerUp = nil, Ctor = function (slot0) slot0.longTf = findTF(slot0._tf, "longNote") slot0.singleTf = findTF(slot0._tf, "singleNote") end, stepUpdate = function (slot0, slot1) if not isActive(slot0._tf) then slot0:changeActive(true) end if (slot1 - slot0.beginTime) * slot0.speedOffsetX > 0 then slot2 = 0 end slot0._tf.localPosition = Vector3(slot2, 0, 0) if slot0.longFlag then slot3 = nil if slot2 == 0 then slot3 = (slot0.endTime - slot1) * slot0.speedOffsetX if not slot0.triggerDown and not slot0.removeTime then slot0.removeTime = slot1 + slot0 end else slot3 = (slot0.endTime - slot0.beginTime) * slot0.speedOffsetX end if slot3 < 0 then slot3 = 0 end slot0.longTf.sizeDelta = Vector2(slot3, slot0.longTf.sizeDelta.y) if slot3 == 0 and not slot0.triggerUp and not slot0.removeTime then slot0.removeTime = slot1 + slot0 end elseif slot2 == 0 and not slot0.removeTime then slot0.removeTime = slot1 + slot0 end end, setNoteData = function (slot0, slot1, slot2, slot3, slot4) slot0.removeTime = nil slot0.triggerDown = nil slot0.triggerUp = nil slot0.keyType = (slot1.key_flag == "K_BOTH" and MusicGameNote.type_pu_both) or MusicGameNote.type_pu_normal slot0.beginTime = tonumber(slot1.begin_time) slot0.endTime = tonumber(slot1.end_time) slot0.longTime = slot0.endTime - slot0.beginTime slot0.longFlag = slot1.begin_time ~= slot1.end_time slot0.speedOffsetX = slot2 slot0.dgree = slot3 slot0.directType = slot4 slot0.imgType = slot0:getImageType() slot0._tf.localPosition = Vector3(0, 0, 0) slot0._tf.name = "beginTime" .. slot0.beginTime slot0:updateNoteTf() end, updateNoteTf = function (slot0) setActive(findTF(slot0._tf, "singleNote"), false) setActive(findTF(slot0._tf, "longNote"), false) if slot0.longFlag then setActive(findTF(slot0._tf, "longNote"), true) for slot4 = 1, slot0, 1 do setActive(findTF(slot0._tf, "longNote/note/img" .. slot4), slot4 == slot0.imgType) setActive(findTF(slot0._tf, "longNote/long/img" .. slot4), slot4 == slot0.imgType) end else setActive(findTF(slot0._tf, "singleNote"), true) for slot4 = 1, slot0, 1 do setActive(findTF(slot0._tf, "singleNote/note/img" .. slot4), slot4 == slot0.imgType) end end end, getImageType = function (slot0) if slot0.dgree == MusicGameNote.type_dgree_easy then return slot0 elseif slot0.keyType == MusicGameNote.type_pu_both then return slot1 elseif slot0.directType == MusicGameNote.type_left then return slot2 elseif slot0.directType == MusicGameNote.type_right then return slot3 end return slot0 end, getRemoveTime = function (slot0) return slot0.removeTime end, triggerScore = function (slot0) if slot0.removeTime then slot0.removeTime = nil end end, changeActive = function (slot0, slot1) setActive(slot0._tf, slot1) end })["Ctor"](slot1) return end slot0.Ctor = function (slot0, slot1, slot2) slot0._tf = slot1 slot0.directType = slot2 slot0.noteStateCallback = nil slot0.tplNote = findTF(slot0._tf, "tplNote") slot0.notePool = {} slot0.noteList = {} end slot0.setStateCallback = function (slot0, slot1) slot0.noteStateCallback = slot1 end slot0.setLongTimeCallback = function (slot0, slot1) slot0.longNoteCallback = slot1 end slot0.setStartData = function (slot0, slot1, slot2, slot3) slot1[slot2].puList = slot1 slot1[slot2].speedLevel = slot2 slot1[slot2].dgree = slot3 slot1[slot2].speedOffsetX = slot2[slot2] slot1[slot2]:clearNote() end slot0.step = function (slot0, slot1) slot0.stepTime = slot1 / 1000 if #slot0.noteList > 0 and slot0:checkScoreType(slot0.noteList[1]) then slot2:triggerScore() slot0.noteStateCallback(slot3) if not slot2.longFlag or slot3 == slot0 then slot0:returnNote(table.remove(slot0.noteList, 1)) elseif slot2.longFlag and slot2.triggerUp then slot0:returnNote(table.remove(slot0.noteList, 1)) if slot0.longNoteCallback then slot0.longNoteCallback(slot2.longTime) end end end for slot5 = #slot0.noteList, 1, -1 do if slot0.noteList[slot5]:getRemoveTime() and slot6 < slot0.stepTime then if slot0.noteStateCallback then if not slot1 then slot0:noteStateCallback() else slot0.noteStateCallback(slot2) end end if slot0.loopFlag then slot0.loopFlag = false end slot0:returnNote(table.remove(slot0.noteList, slot5)) end end for slot5 = #slot0.noteList, 1, -1 do slot0.noteList[slot5]:stepUpdate(slot0.stepTime) end if slot0.puList and #slot0.puList > 0 and slot0:checkPuShow(slot0.puList[1]) then slot0:pushNoteToList(slot0:getNote(slot2)) table.remove(slot0.puList, 1) end end slot0.checkScoreType = function (slot0, slot1) if slot0.dgree == MusicGameNote.type_dgree_easy and slot0.keyDownStepTime and slot0.keyDownStepTime and slot0.keyDownStepTime == MusicGameNote.easyTriggerStepTime then slot0.keyDownTrigger = true end slot2, slot3 = nil if not slot1.longFlag then slot3 = slot1.beginTime if slot0.keyDownStepTime and not slot0.keyDownTrigger then slot4 = math.abs(slot0.keyDownStepTime - slot3) if slot1.keyType == MusicGameNote.type_pu_both then if slot0.keyBothDown then slot2 = slot0:getScoreType(slot4) end else slot2 = slot0:getScoreType(slot4) end if slot2 then slot1.triggerDown = true slot0.keyDownTrigger = true if slot0.dgree == MusicGameNote.type_dgree_easy then MusicGameNote.easyTriggerStepTime = slot0.keyDownStepTime end end end elseif not slot1.triggerDown then slot3 = slot1.beginTime if slot0.keyDownStepTime and not slot0.keyDownTrigger then slot4 = math.abs(slot0.keyDownStepTime - slot3) if slot1.keyType == MusicGameNote.type_pu_both then if slot0.keyBothDown then slot2 = slot0:getScoreType(slot4) end else slot2 = slot0:getScoreType(slot4) end if slot2 then slot1.triggerDown = true slot0.keyDownTrigger = true slot0.loopFlag = true end end else slot4 = slot0.stepTime < slot1.endTime - slot0 if not slot0.keyDown and slot4 then if slot0.loopFlag then slot0.loopFlag = false end slot2 = slot1 elseif slot0.keyUpStepTime and not slot0.keyUpTrigger then slot5 = math.abs(slot0.keyUpStepTime - slot3) if slot1.keyType == MusicGameNote.type_pu_both then if slot0.keyBothUp then slot2 = slot0:getScoreType(slot5) end else slot2 = slot0:getScoreType(slot5) end if slot2 then if slot0.loopFlag then slot0.loopFlag = false end slot1.triggerUp = true slot0.keyUpTrigger = true end end end return slot2 end slot0.loopTime = function (slot0) return slot0.loopFlag end slot0.getScoreType = function (slot0, slot1) if slot1 < slot0 / 2 then return slot1 elseif slot1 < slot0 then return slot2 end return nil end slot0.pushNoteToList = function (slot0, slot1) table.insert(slot0.noteList, slot1) end slot0.checkPuShow = function (slot0, slot1) if slot1.begin_time - slot0.stepTime <= slot0 then return true end return false end slot0.clearNote = function (slot0) for slot4 = #slot0.noteList, 1, -1 do slot0:returnNote(table.remove(slot0.noteList, slot4)) end end slot0.getNote = function (slot0, slot1) if #slot0.notePool == 0 then table.insert(slot0.notePool, slot0:createNote()) end slot2 = table.remove(slot0.notePool, 1) slot2:setNoteData(slot1, slot0.speedOffsetX, slot0.dgree, slot0.directType) return slot2 end slot0.returnNote = function (slot0, slot1) slot1:changeActive(false) table.insert(slot0.notePool, slot1) end slot0.createNote = function (slot0) slot1 = tf(instantiate(slot0.tplNote)) setActive(slot1, false) slot2 = slot0(slot1) setParent(slot1, slot0._tf) return slot0(slot1) end slot0.onKeyDown = function (slot0) slot0.keyDown = true slot0.keyUp = false slot0.keyDownStepTime = slot0.stepTime slot0.keyDownTrigger = false slot0.keyBothDown = false end slot0.onKeyUp = function (slot0) slot0.keyUp = true slot0.keyDown = false slot0.keyUpStepTime = slot0.stepTime slot0.keyUpTrigger = false slot0.keyBothUp = false end slot0.bothDown = function (slot0) slot0.keyDownStepTime = slot0.stepTime slot0.keyBothDown = true slot0.keyBothUp = false end slot0.bothUp = function (slot0) slot0.keyBothUp = true slot0.keyBothDown = false slot0.keyUpStepTime = slot0.stepTime end return slot0
local velocity = ECS.Component("velocity", function(c, x, y) c.x = x or 0 c.y = y or 0 end) return velocity
-- Fluidity for Minetest 0.5.0+ -- Copyright (c) 2018 Evert "Diamond" Prants <evert@lunasqu.ee> fluidity = rawget(_G, "fluidity") or {} local mpath = minetest.get_modpath("fluidity") fluidity.modpath = mpath -- Functions dofile(mpath.."/functions.lua") -- Molten metals dofile(mpath.."/molten.lua") -- Tanks dofile(mpath.."/tanks.lua") -- Florbs dofile(mpath.."/florbs.lua") -- Register everything dofile(mpath.."/register.lua")
local default_config local function _1_(_, key) return error(("invalid setting: " .. key)) end default_config = setmetatable({enabled_plugins = {}}, {__index = _1_}) local user_config = setmetatable({}, {__index = default_config}) local valid_plugins local function _2_(_, key) return error(("invalid plugin name: " .. key)) end valid_plugins = setmetatable({bufferline = true, copilot = true, ["indent-blankline"] = true, leap = true, ["neo-tree"] = true, ["nvim-tree"] = true, treesitter = true}, {__index = _2_}) local function enable_plugins(arg) local t = type(arg) local _3_ = t if (_3_ == "nil") then user_config.enabled_plugins = nil return nil elseif (_3_ == "table") then local tbl = {} for _, plugin in ipairs(arg) do do local _ = valid_plugins[plugin] end tbl[plugin] = true end user_config.enabled_plugins = tbl return nil elseif true then local _ = _3_ return error(("`enabled_plugins` must be table or nil, got: " .. t)) else return nil end end local function _5_(_, key, val) local _6_ = key if (_6_ == "enabled_plugins") then return enable_plugins(val) elseif true then local _0 = _6_ return error(("invalid setting: " .. key)) else return nil end end return setmetatable({}, {__index = user_config, __newindex = _5_})
local ItemUpgrade = { Name = "ItemUpgrade", Type = "System", Namespace = "C_ItemUpgrade", Functions = { { Name = "CanUpgradeItem", Type = "Function", Arguments = { { Name = "baseItem", Type = "table", Mixin = "ItemLocationMixin", Nilable = false }, }, Returns = { { Name = "isValid", Type = "bool", Nilable = false }, }, }, { Name = "GetItemHyperlink", Type = "Function", Returns = { { Name = "link", Type = "string", Nilable = false }, }, }, }, Events = { { Name = "ItemUpgradeMasterClosed", Type = "Event", LiteralName = "ITEM_UPGRADE_MASTER_CLOSED", }, { Name = "ItemUpgradeMasterOpened", Type = "Event", LiteralName = "ITEM_UPGRADE_MASTER_OPENED", }, { Name = "ItemUpgradeMasterSetItem", Type = "Event", LiteralName = "ITEM_UPGRADE_MASTER_SET_ITEM", }, { Name = "ItemUpgradeMasterUpdate", Type = "Event", LiteralName = "ITEM_UPGRADE_MASTER_UPDATE", }, }, Tables = { }, }; APIDocumentation:AddDocumentationTable(ItemUpgrade);
local fs = require("fs") local utils = require("miscUtils") local json = require("json") local discordia = require("discordia") local function getGuildsMissingCommand(command, conn) local resultset = conn:exec([[ SELECT guild_settings.guild_id AS guild_id FROM guild_settings WHERE NOT EXISTS( SELECT * FROM commands WHERE guild_settings.guild_id = commands.guild_id AND commands.command = ']]..command.name..[[' ); ]]) return resultset and resultset.guild_id or {} end local function updateSubcommands(command, baseCommand, conn, stmt) for _, subcommand in pairs(command.subcommands) do if subcommand.isDefaultDisabled==nil then subcommand.isDefaultDisabled = command.isDefaultDisabled end subcommand.parentCommand = command subcommand.baseCommand = baseCommand subcommand.isSubcommand = true local guildIds = getGuildsMissingCommand(subcommand, conn) for _, guildId in pairs(guildIds) do stmt:reset():bind(guildId, subcommand.name, (not subcommand.isDefaultDisabled and 1 or 0), json.encode(subcommand.permissions)):step() end updateSubcommands(subcommand, baseCommand, conn, stmt) end end local function sendPermissionError(channel, commandName, missingPermissions) utils.sendEmbed(channel, "You may not use `"..commandName.."` because you are missing the following required permission"..utils.s(#missingPermissions)..": `"..table.concat(missingPermissions, "`, `").."`", "ff0000") end local function sendBotPermissionError(channel, commandName, missingGuildPermissions, missingChannelPermissions) local embed={ description = "`"..commandName.."` cannot be used right now because the bot is missing certain required permissions.", fields = {}, color = discordia.Color.fromHex("ff0000").value } if #missingGuildPermissions>0 then table.insert(embed.fields, {name="Server-wide permissions", value="`"..table.concat(missingGuildPermissions, "`, `").."`"}) end if #missingChannelPermissions>0 then table.insert(embed.fields, {name="Channel-specific permissions", value="`"..table.concat(missingChannelPermissions, "`, `").."`"}) end channel:send{embed=embed} end local function runStmtOnSubcommands(stmt, guild, command) for _, subcommand in pairs(command.subcommands) do stmt:reset():bind(guild.id, subcommand.name):step() runStmtOnSubcommands(stmt, guild, subcommand) end end local commandHandler = {} commandHandler.commands = {} -- keys: commandString, values: command table commandHandler.tree = {} -- table for each category, holding commands in same format as commandHandler.commands commandHandler.sortedCategoryNames = {} -- values: category names, sorted alphabetically commandHandler.sortedCommandNames = {} -- table for each category, values: command names, sorted alphabetically commandHandler.validPermissions = {} -- keys: permission enums, values: true commandHandler.sortedPermissionNames = {} -- values: permission enums, sorted alphabetically commandHandler.emitter = discordia.Emitter() -- used for onLoad event commandHandler.customPermissions = { botOwner = function(member) return member.user==member.client.owner end } commandHandler.load = function(conn) local stmt = conn:prepare("INSERT INTO commands (guild_id, command, is_enabled, permissions) VALUES (?, ?, ?, ?);") local permissions = {} for category, filetype in fs.scandirSync("commands") do assert(filetype=="directory", "Non-directory file '"..category.."' in commands/ directory") if not commandHandler.tree[category] then commandHandler.tree[category] = {} commandHandler.sortedCommandNames[category] = {} table.insert(commandHandler.sortedCategoryNames, category) end for _, commandFilename in ipairs(fs.readdirSync("commands/"..category)) do if commandFilename:match("%.lua$") then local command = require("../commands/"..category.."/"..commandFilename) assert(type(command.subcommands)=="table", "Command "..category.."/"..command.name.." missing subcommands") updateSubcommands(command, command, conn, stmt, permissions) command.parentCommand = command command.baseCommand = command command.isSubcommand = false command.category = category commandHandler.commands[command.name] = command commandHandler.tree[category][command.name] = command for _, permission in pairs(command.botGuildPermissions) do if not permissions[permission] then permissions[permission] = true end end for _, permission in pairs(command.botChannelPermissions) do if not permissions[permission] then permissions[permission] = true end end table.insert(commandHandler.sortedCommandNames[category], command.name) local guildIds = getGuildsMissingCommand(command, conn) for _, guildId in pairs(guildIds) do stmt:reset():bind(guildId, command.name, (not command.isDefaultDisabled and 1 or 0), json.encode(command.permissions)):step() end end end end stmt:close() table.sort(commandHandler.sortedCommandNames) local requiredPermissions = discordia.Permissions.fromMany(unpack(table.keys(permissions))) requiredPermissions:enable("sendMessages", "readMessages", "embedLinks", "manageMessages") discordia.storage.requiredPermissions = requiredPermissions for permission, _ in pairs(discordia.enums.permission) do table.insert(commandHandler.sortedPermissionNames, permission) commandHandler.validPermissions[permission] = true end table.sort(commandHandler.sortedPermissionNames) commandHandler.emitter:emit("onLoad") end commandHandler.stripPrefix = function(str, guildSettings, client) return str:gsub("^"..utils.escapePatterns(guildSettings.prefix),""):gsub("^%<%@%!?"..client.user.id.."%>%s+","") end -- input can be string.split-ed table (for efficiency, if you've already split it) or string -- string should contain command name commandHandler.subcommandFromString = function(command, input) local inputType = type(input) assert(inputType=="table" or inputType=="string", "Expected table or string for argument #1, got "..inputType) local splitStr = inputType=="table" and input or input:split("%s+") table.remove(splitStr, 1) -- remove the base command name from splitStr local output = command if #splitStr>0 then local currentCommand = command local subcommand repeat subcommand = currentCommand.subcommands[splitStr[1]] if subcommand then currentCommand = subcommand table.remove(splitStr, 1) end until not subcommand or #splitStr==0 output = subcommand or currentCommand end return output, table.concat(splitStr, " "), splitStr end commandHandler.sendUsage = function(channel, guildSettings, command) return utils.sendEmbed(channel, "Usage: ".."`"..guildSettings.prefix..command.name..(command.usage~="" and " "..command.usage or "").."`", "ff0000", "Angled brackets represent required arguments. Square brackets represent optional arguments. Do not include the brackets in the command. All values are case sensitive.") end commandHandler.getCommandSettings = function(guild, command, conn) local resultset = conn:exec("SELECT * FROM commands WHERE guild_id = '"..guild.id.."' AND command = '"..command.name.."';") return utils.formatRow(resultset) end commandHandler.getPermissions = function(guild, command, conn) local permissions = commandHandler.getCommandSettings(guild, command, conn).permissions local currentCommand = command while not permissions and currentCommand.isSubcommand do currentCommand = currentCommand.parentCommand permissions = commandHandler.getCommandSettings(guild, currentCommand, conn).permissions end return permissions end commandHandler.getPermissionsString = function(guild, command, conn) local permissions = commandHandler.getPermissions(guild, command, conn) return #permissions>0 and "`"..table.concat(permissions, "`, `").."`" or "None" end commandHandler.sendCommandHelp = function(channel, guildSettings, command, conn) local baseCommand = command.baseCommand local commandSettings = commandHandler.getCommandSettings(channel.guild, command, conn) if not commandSettings.is_enabled then channel:send{ embed = { title = guildSettings.prefix..command.name, description = "`"..guildSettings.prefix..command.name.."` is disabled in this server.", color = discordia.Color.fromHex("ff0000").value } } else local subcommandsKeys = table.keys(command.subcommands) table.sort(subcommandsKeys) local permissionsString = commandHandler.getPermissionsString(channel.guild, command, conn) local subcommandsString = #subcommandsKeys>0 and "`"..table.concat(subcommandsKeys, "`, `").."`" or "None" channel:send{ embed = { title = guildSettings.prefix..command.name, description = command.description:gsub("%&prefix%;", guildSettings.prefix), fields = { {name = "Category", value = baseCommand.category}, {name = "Required permissions", value = permissionsString}, {name = "Subcommands", value = subcommandsString}, {name = "Usage", value = "`"..guildSettings.prefix..command.name..(command.usage~="" and " "..command.usage or "").."`"} }, color = discordia.Color.fromHex("00ff00").value, footer = { text = "Angled brackets represent required arguments. Square brackets represent optional arguments. Do not include the brackets in the command. All values are case sensitive." } } } end end commandHandler.enableCommand = function(guild, command, conn) if command.isSubcommand then if not commandHandler.getCommandSettings(guild, command.parentCommand, conn).is_enabled then return false, "This command's parent command is disabled, so this command cannot be enabled." end end if command.onEnable then local success, output = command:onEnable(guildSettings, conn) if not success then return false, output end end local stmt = conn:prepare("UPDATE commands SET is_enabled = 1 WHERE guild_id = ? AND command = ?;") stmt:reset():bind(guild.id, command.name):step() runStmtOnSubcommands(stmt, guild, command) stmt:close() return true, (output or "The command "..(#command.subcommands>0 and "and its subcommands were" or "was").." successfully enabled.") end commandHandler.disableCommand = function(guild, command, conn) if command.onDisable then local success, output = command:onDisable(guildSettings, conn) if not success then return false, output end end local stmt = conn:prepare("UPDATE commands SET is_enabled = 0 WHERE guild_id = ? AND command = ?;") stmt:reset():bind(guild.id, command.name):step() runStmtOnSubcommands(stmt, guild, command) stmt:close() return true, (output or "The command "..(#command.subcommands>0 and "and its subcommands were" or "was").." successfully disabled.") end commandHandler.toggleCommand = function(guild, command, conn) local commandSettings = commandHandler.getCommandSettings(guild, command, conn) if commandSettings.is_enabled then return commandHandler.disableCommand(guild, command, conn) else return commandHandler.enableCommand(guild, command, conn) end end commandHandler.setCommandPermissions = function(guild, command, conn, newPermissions) local stmt = conn:prepare("UPDATE commands SET permissions = ? WHERE guild_id = ? AND command = ?;") stmt:reset():bind(json.encode(newPermissions), guild.id, command.name):step() stmt:close() end commandHandler.getMissingPermissions = function(member, permissions) local missingPermissions = {} local memberPermissions = member:getPermissions() for _,permission in pairs(permissions) do if permission:match("^bot%.") then if not commandHandler.customPermissions[permission:match("^bot%.(.+)")](member) then table.insert(missingPermissions, permission) end else if not memberPermissions:has(permission) then table.insert(missingPermissions, permission) end end end return missingPermissions end commandHandler.getMissingBotPermissions = function(guild, channel, guildPermissions, channelPermissions) local missingGuildPermissions = {} local missingChannelPermissions = {} local botMember = guild:getMember(guild.client.user) local botGuildPermissions = botMember:getPermissions() local botChannelPermissions = botMember:getPermissions(channel) for _,permission in pairs(guildPermissions) do if not botGuildPermissions:has(permission) then table.insert(missingGuildPermissions, permission) end end for _,permission in pairs(channelPermissions) do if not botChannelPermissions:has(permission) then table.insert(missingChannelPermissions, permission) end end return missingGuildPermissions, missingChannelPermissions end commandHandler.sendBotPermissionErrorForChannel = function(sendChannel, commandName, checkChannel, missingPermissions) return utils.sendEmbed(sendChannel, "`"..commandName.."` cannot be used right now because the bot is missing the following permissions in "..(checkChannel.type==discordia.enums.channelType.text and checkChannel.mentionString or "**"..checkChannel.name.."**")..": `"..table.concat(missingPermissions, "`, `").."`", "00ff00") end commandHandler.doCommands = function(message, guildSettings, conn) local content = commandHandler.stripPrefix(message.content, guildSettings, message.client) local commandString = content:match("^(%S+)") local command = commandHandler.commands[commandString] if message.content~=content and command then local argString, args if command.subcommands~={} then command, argString, args = commandHandler.subcommandFromString(command, content) else argString = content:gsub("^"..commandString.."%s*","") args = argString:split("%s") end local commandSettings = commandHandler.getCommandSettings(message.guild, command, conn) if commandSettings.is_enabled then local botMember = message.guild:getMember(message.client.user) if not botMember:hasPermission(message.channel, "embedLinks") then message:reply("**Error**\nThis bot requires the `embedLinks` permission for all commands. Please allow this permission for this bot in any channels you want to use this bot in.") elseif guildSettings.delete_command_messages and not botMember:hasPermission(message.channel, "manageMessages") then utils.sendEmbed(message.channel, "This bot requires the `manageMessages` permission for all commands. Please allow this permission for this bot server-wide and/or in any channels you want to use this bot in.", "ff0000") else local missingBotGuildPerms, missingBotChannelPerms = commandHandler.getMissingBotPermissions(message.guild, message.channel, command.botGuildPermissions, command.botChannelPermissions) if next(missingBotGuildPerms)~=nil or next(missingBotChannelPerms)~=nil then sendBotPermissionError(message.channel, guildSettings.prefix..command.name, missingBotGuildPerms, missingBotChannelPerms) else local permissions = commandHandler.getPermissions(message.guild, command, conn) local missingPermissions = commandHandler.getMissingPermissions(message.member, permissions) if next(missingPermissions)~=nil then sendPermissionError(message.channel, guildSettings.prefix..command.name, missingPermissions) else command:run(message, argString, args, guildSettings, conn) end end end if guildSettings.delete_command_messages then message:delete() end end end end return commandHandler
_TP = {} local types = { void=true, char=true, uint=true, int=true, u64=true, s64=true, u32=true, s32=true, u16=true, s16=true, u8=true, s8=true, float=true, f32=true, f64=true, } -- len aligned to word size function _TP.sizeof (len) local al = len if al > _ENV.c.word.len then al = _ENV.c.word.len -- maximum adjust is the word size end local r = len % al if r > 0 then len = len + (al-r) end return len end -- returns off/aligned + len function _TP.align (off, len) if len > _ENV.c.word.len then len = _ENV.c.word.len -- maximum adjust is the word size elseif len == 0 then len = 1 -- minimum alignment (TODO: why?) end local r = off % len if r > 0 then off = off + (len-r) end return off end function _TP.n2bytes (n) if n < 2^8 then return 1 elseif n < 2^16 then return 2 elseif n < 2^32 then return 4 end error'out of bounds' end function _TP.ceil (v) local w = _OPTS.tp_word while true do if v % w == 0 then return v else v = v + 1 end end end -- TODO: enforce passing parameter `c´ to isNumeric/deref/contains/max ? function _TP.noptr (tp) return (string.match(tp, '^([^%*]*)%**')) end --[[ function _TP.c (tp) -- _tp->tp -- class->CEU_XXX -- class*->CEU_XXX* (too!) return (string.gsub(string.gsub(tp,'^%u[_%w]*%*?','char*'), '^_', '')) end ]] function _TP.isTuple (tp,ptr) return _ENV.c[tp] and _ENV.c[tp].tuple or _TP.deref(tp) and _TP.isTuple(_TP.deref(tp)) end function _TP.c (tp) local cls = _ENV.clss[_TP.noptr(tp)] if cls then return 'CEU_'..tp end return (string.gsub(tp,'^_', '')) end function _TP.isNumeric (tp, c) return tp~='void' and types[tp] or (c and _TP.ext(tp,c)) end function _TP.deref (tp, c) return string.match(tp,'(.-)%*$') or (c and _TP.ext(tp,c)) end function _TP.ext (tp, loc) return (tp=='_' and '_') or (loc and (not _TP.deref(tp)) and (string.sub(tp,1,1) == '_') and tp) end function _TP.contains (tp1, tp2, c) -- same exact type if tp1 == tp2 then return true end -- both are numeric if _TP.isNumeric(tp1,c) and _TP.isNumeric(tp2,c) then return true end -- both are pointers local _tp1, _tp2 = _TP.deref(tp1,c), _TP.deref(tp2,c) if _tp1 and _tp2 then local cls1 = _ENV.clss[_tp1] local cls2 = _ENV.clss[_tp2] -- assigning to a cls (cast is enforced) if cls1 then return tp2 == 'null*' or cls2 and cls1.is_ifc and _ENV.ifc_vs_cls(cls1,cls2) end return tp1=='void*' or tp2=='void*' or tp2=='null*' or c and (tp1=='_' or tp2=='_') or _TP.contains(_tp1, _tp2, c) end -- c=accept ext // and at least one is ext if c and (_TP.ext(tp1) or _TP.ext(tp2)) then return true end -- tuples vs (tuples or single types) local tup1 = _TP.isTuple(tp1) local tup2 = _TP.isTuple(tp2) if tup1 or tup2 then tup1 = tup1 or { {nil,tp1,nil} } tup2 = tup2 or { {nil,tp1,nil} } if #tp1 == #tp2 then for i=1, #tp1 do local hold, tp1, id = unpack(tp1[i]) local hold, tp2, id = unpack(tp1[i]) if not _TP.contains(tp1,tp2) then return false end end end return true end return false end function _TP.max (tp1, tp2, c) if _TP.contains(tp1, tp2, c) then return tp1 elseif _TP.contains(tp2, tp1, c) then return tp2 else return nil end end
return { guild = { _ = { elona = { mage = { name = "Mages Guild" }, fighter = { name = "Fighters Guild" }, thief = { name = "Thieves Guild" } } } } }
---@class BaseState BaseState = Class{} function BaseState:init() end function BaseState:enter() end function BaseState:exit() end function BaseState:update(dt) end function BaseState:render() end
---@meta ---@class nvslib:table non-volatile storage. local M = {} ---@class NVSHandle:userdata non-volatile storage handle. local handle = {} ---Fetch the value of a key. ---@param key string ---@return any value ---@nodiscard function handle:get(key) end ---Set the value of a key. ---@param key string ---@param value any function handle:set(key, value) end ---Erase all key-value pairs. function handle:erase() end ---Write any pending changes to non-volatile storage. function handle:commit() end ---Close the handle and free any allocated resources. function handle:close() end ---Open a non-volatile storage handle with a given namespace. ---@param namespace string ---@return NVSHandle handle ---@nodiscard function M.open(namespace) end return M
local helper = {} --- Returns a integer encoding a color. -- @params r,g,b,a (integers in the [0,255] range): the red, green, blue, and alpha components of the color. function helper.make_color(r, g, b, a) local color = r * 256 + g color = color * 256 + b color = color * 256 + a return color end -- Returns an integer encoding a color -- @params color: an existing 32 bit color. -- @params new_alpha: the alpha value of the new color. function helper.make_color_with_alpha(color, new_alpha) local alpha = color % 256 color = color - alpha + new_alpha return color end -- Returns the color as a string that can be used to colorize text. function helper.color_to_string(color) local s = string.format("%x", color) while string.len(s) < 8 do s = "0" .. s end return "#" .. s end return helper
--------------------------------- -- INIT --------------------------------- --get the addon namespace local addon, ns = ... --get rBBS namespace local rBBS = ns.rBBS or rBBS --get the cfg local cfg = ns.cfg --------------------------------- -- SPAWN --------------------------------- --spawn the drag frame local dragframe = rBBS:spawnDragFrame(addon, cfg.dragframe) --spawn actionbar bg 1 rBBS:spawnFrame(addon, cfg.actionbarbg1, dragframe) --spawn actionbar bg 2 rBBS:spawnFrame(addon, cfg.actionbarbg2, dragframe) --spawn health orb rBBS:spawnHealthOrb(addon, cfg.healthorb, dragframe) --spawn power orb rBBS:spawnPowerOrb(addon, cfg.powerorb, dragframe) --spawn figureleft rBBS:spawnFrame(addon, cfg.figureleft, dragframe) --spawn figureright rBBS:spawnFrame(addon, cfg.figureright, dragframe)
local awful = require('awful') local wibox = require('wibox') local watch = require('awful.widget.watch') local Net_widget = {} NET_CMD = [[ bash -c 'net.sh']] net_widget = wibox.widget { { { id = 'net_wdt', widget = wibox.widget.textbox }, widget = wibox.container.margin(_,Wdt_lmgn,Wdt_rmgn,_,_,_,_), }, bg = Wdt_bg, shape = Wdt_shape, widget = wibox.container.background } net_widget:connect_signal('button::press', function (_,_,_,button) if (button == 1) then awful.spawn.with_shell('alacritty --hold -e bmon -p eno2') end end) function Update_net_widget(widget,stdout) widget:get_children_by_id('net_wdt')[1]:set_text(stdout) end watch(NET_CMD,1,Update_net_widget,net_widget) return Net_widget
require 'mock.gfx.camerafx.LUTGenerator' require 'mock.gfx.camerafx.ColorGradingConfig' require 'mock.gfx.camerafx.LUTTexture'
--shotgun SWEP.Base = "hmcd_weapon_base" SWEP.PrintName = "Remington 870" SWEP.Instructions = "This is a typical civilian pump-action hunting shotgun. It has a 6-round magazine and fires 12-guage 2-3/4 inch cartridges. \n\nLMB to fire.\nRMB to aim.\nRELOAD to reload.\nShot placement counts.\nCrouching helps stability.\nBullets can ricochet and penetrate." SWEP.RecoilForce = {2,2} SWEP.InAirRecoilForce = {0.2,0.0} SWEP.ViewModelFlip = false SWEP.ViewModel = "models/weapons/v_shot_m3juper90.mdl" SWEP.WorldModel = "models/weapons/w_shot_m3juper90.mdl" SWEP.CarryWeight = 3600 -- Carry weight. Used in inertia and other systems SWEP.IronPos = Vector(-1.95,-1.5,1.1) SWEP.SprintAngle = Angle(-15,45,-10) SWEP.SprintPos = Vector(5,-5,-1.2) SWEP.Primary.ClipSize = 6 -- Size of a clip SWEP.Damage = 13 -- Damage number 1 SWEP.DamageVar = 16 -- How much damage will vary. If set to 0 => only default damage numbers will engage SWEP.Delay = 0.9 -- Delay between shots SWEP.Shots = 8 -- Amount of shots per trigger pull SWEP.Cone = 0.07 -- Your shot spread SWEP.AimCone = 0.005 -- Your shot spread if you aiming SWEP.Spread = .0285 SWEP.AimAddMul = 40 -- How fast you gonna aim(1 second should ~~ 10 units) SWEP.SprintAddMul = 30 -- How fast you gonna stop shooting(1 second should ~~ 1000 units) SWEP.AllowAdditionalShot = 0 -- You want charge your gun with more than 13 shots?(It is a number value) SWEP.ReloadSpeedTime = 1 -- Speed of reload in seconds SWEP.DeploySpeedTime = 2.5 -- Speed of deploy in seconds SWEP.RealDeploySpeedTime = 2.2 -- Speed of readiness in seconds
return { init_effect = "", name = "韧性装甲", time = 10, color = "red", picture = "", desc = "战斗对象每隔X秒,生成一个降低被暴击伤害Y%的护盾,持续Z秒", stack = 1, id = 73301, icon = 73300, last_effect = "Shield_enemy", effect_list = { { type = "BattleBuffAddAttr", trigger = { "onAttach", "onStack" }, arg_list = { attr = "criDamageResist", number = 1 } } } }
----------------------------------------- -- ID: 15838 -- Item: Protect Earring -- Item Effect: Protect ----------------------------------------- require("scripts/globals/status") require("scripts/globals/msg") function onItemCheck(target) return 0 end function onItemUse(target) if (target:addStatusEffect(tpz.effect.PROTECT, 15, 0, 1800)) then target:messageBasic(tpz.msg.basic.GAINS_EFFECT_OF_STATUS, tpz.effect.PROTECT) else target:messageBasic(tpz.msg.basic.NO_EFFECT) end end
GM.BaseAchievements = { --[[ xp reference amounts: 25,000 = level 25+ 100,000 = level 50+ 500,000 = level 100+ 1,500,000 = level 200+ 10,000,000 = level 500+ 50,000,000 = level 1,000+ 250,000,000 = level 2,500+ 999,999,999 = level 5,000+ ideas: One of a Kind - win an Impossible+ game with only one of each tower ever placed All for One and One for One - Win a Hard+ game with only 1 tower on the map at any one time activate 3/10/30 abilities at once pop X Ceramic/Brick/Marble gBalloons pop X Y gBlimps pop X Fast/Hidden/Regen/Shielded gBalloons ]] {name="popper1", tier=1, amount=1e3, criteria="pops", xp=500}, {name="popper2", tier=2, amount=1e5, criteria="pops", xp=25e3}, {name="popper3", tier=3, amount=1e7, criteria="pops", xp=500e3}, {name="damage1", tier=1, amount=1e4, criteria="damage", xp=1000}, {name="damage2", tier=2, amount=1e6, criteria="damage", xp=100e3}, {name="damage3", tier=3, amount=1e8, criteria="damage", xp=1.5e6}, {name="level1", tier=1, amount=18, criteria="level", xp=10e3}, {name="level2", tier=2, amount=100, criteria="level", xp=50e3}, {name="level3", tier=3, amount=999, criteria="level", xp=500e3}, {name="builder1", tier=1, amount=50, criteria="towers", xp=25e3}, {name="builder2", tier=2, amount=200, criteria="towers", xp=100e3}, {name="builder3", tier=3, amount=1000, criteria="towers", xp=500e3}, {name="cashspend1", tier=1, amount=1e6, criteria="cash.towers", display=1, xp=25e3}, {name="cashspend2", tier=2, amount=1e8, criteria="cash.towers", display=1, xp=100e3}, {name="cashspend3", tier=3, amount=1e10, criteria="cash.towers", display=1, xp=500e3}, {name="upgrade1", tier=1, amount=100, criteria="towers.upgrades", xp=25e3}, {name="upgrade2", tier=2, amount=500, criteria="towers.upgrades", xp=100e3}, {name="upgrade3", tier=3, amount=2500, criteria="towers.upgrades", xp=500e3}, {name="superpowered", tier=1, amount=100e3, criteria="towers.upgrades.max_price", display=1, xp=25e3}, {name="hyperpowered", tier=2, amount=10e6, criteria="towers.upgrades.max_price", display=1, xp=100e3}, {name="rainbow_beamer_maxed", tier=2, amount=8, criteria="towers.upgrades.max_tier.gballoon_tower_08", xp=500e3}, {name="success", tier=1, criteria="success", xp=2000}, {name="success_all", tier=2, criteria="success.all", xp=1.5e6}, {name="success_flawless", tier=1, criteria="success.no_damage", xp=5000}, {name="fail1", tier=1, amount=1, criteria="fail", xp=100}, {name="fail2", tier=2, amount=20, criteria="fail", xp=25e3}, {name="fail_notowers", tier=1, criteria="fail.no_score", xp=1}, {name="success_notowers", tier=3, criteria="success.no_score", xp=1.5e6}, {name="rainbow_gblimp_kill", tier=1, criteria="pops.gballoon_blimp_rainbow", xp=100e3}, {name="bosses_success", tier=1, criteria="success.insane_bosses", xp=500e3}, {name="super_bosses_success", tier=2, criteria="success.impossible_bosses", xp=1.5e6}, {name="economy", tier=3, amount=1.797693e308, criteria="cash", display=1, xp=10e6} } AccessorFunc(GM, "StoredStatistics", "StoredStatistics") AccessorFunc(GM, "StatisticIDs", "StatisticIDs") AccessorFunc(GM, "StatisticAmounts", "StatisticAmounts") AccessorFunc(GM, "StoredAchievements", "StoredAchievements") AccessorFunc(GM, "AchievementIDs", "AchievementIDs") AccessorFunc(GM, "StoredAchievementsByStat", "StoredAchievementsByStat") function GM:CreateStoredStatistics() local ids = {} local statisticNames = {} for k,v in pairs(hook.Run("GetAchievements")) do local stat = v.criteria if stat and not statisticNames[stat] then statisticNames[stat] = true end end local statistics = table.GetKeys(statisticNames) table.sort(statistics) for i,v in ipairs(statistics) do ids[v] = i end hook.Run("SetStoredStatistics", statistics) hook.Run("SetStatisticIDs", ids) end function GM:GetStatistics() if not hook.Run("GetStoredStatistics") then hook.Run("CreateStoredStatistics") end return hook.Run("GetStoredStatistics") end function GM:GetStatisticID(statName) if not hook.Run("GetStoredStatistics") then hook.Run("CreateStoredStatistics") end return hook.Run("GetStatisticIDs")[statName] end function GM:CreateStoredAchievements() local achievements = table.Copy(self.BaseAchievements) hook.Run("GatherCustomAchievements", achievements) local achievementIDs = {} for i,v in ipairs(achievements) do v.amount = v.amount or 1 v.id = i achievementIDs[v.name] = i end hook.Run("SetStoredAchievements", achievements) hook.Run("SetAchievementIDs", achievementIDs) end function GM:GetAchievements() if not hook.Run("GetStoredAchievements") then hook.Run("CreateStoredAchievements") end return hook.Run("GetStoredAchievements") end function GM:GetAchievementID(achievementName) if not hook.Run("GetAchievementIDs") then hook.Run("CreateStoredAchievements") end return hook.Run("GetAchievementIDs")[achievementName] end function GM:GetAchievementByID(achievementID) return hook.Run("GetAchievements")[achievementID] end function GM:GetAchievementByName(achievementName) return hook.Run("GetAchievementByID", hook.Run("GetAchievementID", achievementName)) end function GM:GatherCustomAchievements(achievements) -- meant to be used by custom addons via hook.Add end function GM:CreateStoredAchievementsByStat() local achievementsByStat = {} for i,v in ipairs(hook.Run("GetAchievements")) do local stat = hook.Run("GetStatisticID", v.criteria) achievementsByStat[stat] = achievementsByStat[stat] or {} table.insert(achievementsByStat[stat], v) end hook.Run("SetStoredAchievementsByStat", achievementsByStat) end function GM:GetAchievementsByStat(stat) if not hook.Run("GetStoredAchievementsByStat") then hook.Run("CreateStoredAchievementsByStat") end return hook.Run("GetStoredAchievementsByStat")[stat] end local PLAYER = FindMetaTable("Player") function PLAYER:RTG_SetStat(stat, amount, ...) if isstring(stat) then stat = hook.Run("GetStatisticID", stat) end return self:_RTG_SetStat(stat, amount, ...) end function PLAYER:RTG_AddStat(stat, amount, ...) if amount > 0 then if isstring(stat) then stat = hook.Run("GetStatisticID", stat) end return self:_RTG_AddStat(stat, amount, ...) end end function PLAYER:RTG_GetStat(stat, ...) if isstring(stat) then stat = hook.Run("GetStatisticID", stat) end return self:_RTG_GetStat(stat, ...) end
data:extend{ { type = "double-setting", name = "rainbow-player-color-change-time", setting_type = "runtime-per-user", default_value = 300, minimum_value = 1 } }
require "keybow" -- Key mappings -- function handle_key_00(pressed) keybow.set_key(keybow.F13, pressed) end function handle_key_01(pressed) keybow.set_key(keybow.F14, pressed) end function handle_key_02(pressed) keybow.set_key(keybow.F15, pressed) end function handle_key_03(pressed) keybow.set_key(keybow.F16, pressed) end function handle_key_04(pressed) keybow.set_key(keybow.F17, pressed) end function handle_key_05(pressed) keybow.set_key(keybow.F18, pressed) end function handle_key_06(pressed) keybow.set_key(keybow.F19, pressed) end function handle_key_07(pressed) keybow.set_key(keybow.F20, pressed) end function handle_key_08(pressed) keybow.set_key(keybow.F21, pressed) end function handle_key_09(pressed) keybow.set_key(keybow.F22, pressed) end function handle_key_10(pressed) keybow.set_key(keybow.F23, pressed) end function handle_key_11(pressed) keybow.set_key(keybow.F24, pressed) end
--====================================================================-- -- Main Sensors scene --====================================================================-- --[[ - Version: 0.1 - Made by Tom Tuning @ 2018 - Mail: tom.tuning@sas.com ****************** - INFORMATION ****************** - show sensor data - --]] local Widget = require( "widget" ) local Json = require ("json") local GGData = require( "lib.GGData" ) local Glb = require ( "lib.glbldata" ) local Accel = require ( "lib.accelerate" ) local Gyroscope = require ( "lib.gyroscope" ) local Location = require ( "lib.location" ) local Spec = require ( "scene.specifics.demodefinitions" ) -- style and page setup local SensorList = require ( "scene.sensors.sensorlist" ) -- builds tableview of sensors local rgb = require ( "lib._rgb" ) -- colors local Timez = require("lib.Timez") -- since timers aren't attached to objects we need to track them. local RuntimeZ = require("lib.runtimez") -- we need a way to clear all runtime listeners on scene exit local Misc = require ("lib.miscfunctions") -- non OO helper functions local misc = Misc:new() local MQTT = require("lib.mqtt_library") MQTT.Utility.set_debug(true) local composer = require "composer" -- scene scheduler local M = {} -- Module level scoped variables local scene = composer.newScene() composer.recycleOnSceneChange = true -- everything in sceneGroup is removed on scene exit ------------------ -- Constants ------------------ local _DW = display.contentWidth local _DH = display.contentHeight --------------------------- -- Functions ---------------------------- function M.broker_mark_not_connected() local found = misc:table_find_by_key("Connected",true,M.appstate.AppBrokers) if found then M.appstate.AppBrokers[found]["Connected"] = false M.appstate:save() -- write newly created data to disk end return end function M.mqtt_handler() if Glb.MQTTSession then if Glb.MQTTSession.connected then local error_message = Glb.MQTTSession:handler() if error_message ~= nil then -- print error message -- mark not connected. Glb.MQTTSession = nil M.broker_mark_not_connected() end end end return end function M.mqtt_unsubscribe() if Glb.MQTTSession then if Glb.MQTTSession.connected then Glb.MQTTSession:unsubscribe({M.TopicSub}) end end return end function M.msg_alert() if not M.alert then local function alertnow() M.alert = native.showAlert( "Connection Error", "Please check broker settings", { "OK" } ) return end M.alert = true timer.performWithDelay(1000, alertnow,1) end return end function M.publish() if Glb.MQTTSession then if Glb.MQTTSession.connected then local error_message = Glb.MQTTSession:publish(M.TopicPub, Json.encode(Glb.mqtt_pub)) if error_message ~= nil then -- print error message once M.msg_alert() Glb.MQTTSession = nil M.broker_mark_not_connected() -- mark not connected end else M.msg_alert() end else M.msg_alert() end return end function M.publish_by_freq() local mod_div = {10,9,8,7,6,5,4,3,2,1} local f = tonumber(M.Freq) or 0 if f > 10 then f = 10 end if f < 1 then f = 1 end if ( M.currenttime100 % mod_div[f] == 0 ) then M.publish() end return end local create_new = function ( self, event ) local currenttheme = Spec.themes.defaulttheme Glb.theme = Spec:loadtheme(currenttheme) local theme = Glb.theme M.sceneGroup = self.view -- add display objects to this group local gameGroup = display.newGroup() gameGroup.myname = "gameGroup" ------------------------------ -- Build the UI ------------------------------ local UI = require( "lib.appUI" ) local UI_inst = UI:newUI( { title="Sensors", stage = M.sceneGroup } ) M.sceneGroup.UI_inst = UI_inst ------------------------------ -- CONFIGURE STAGE ------------------------------ M.sceneGroup:insert( UI_inst.backGroup ) M.sceneGroup:insert( gameGroup ) M.sceneGroup:insert( UI_inst.frontGroup ) M.sceneGroup.timers = Timez:new() -- add class to track timers M.sceneGroup.runtimez = RuntimeZ:new() -- add class to track runtime listeners M.sceneGroup.accel = Accel:new( {stage = M.sceneGroup} ) -- grab accerometer data M.sceneGroup.gyroscope = Gyroscope:new( {stage = M.sceneGroup} ) -- grab Gyroscope data M.sceneGroup.location = Location:new( {stage = M.sceneGroup} ) -- grab location data ------------------------------ -- Build the Sensor List ------------------------------ local SL_inst = SensorList:new( { title="Sensors", stage = M.sceneGroup } ) gameGroup:insert( SL_inst.tableView2 ) gameGroup:insert( SL_inst.spinner ) -- SL_inst.tableView2:setIsLocked(true ) -- SL_inst.tableView2:scrollToY({y=-100,time=600}) -- called by timer event local function timebump (event) -- currently 10 times per second. M.sceneGroup.timers:pop(event.source) M.currenttime100 = M.currenttime100 + 1 ---------------------------------------------- -- things to do every 100 milliseconds ---------------------------------------------- Glb.mqtt_pub.deviceID = Glb.deviceID Glb.mqtt_pub.timestamp = M.currenttime100 if M.sceneGroup.accel.isActive then Glb.mqtt_pub.isShake = M.sceneGroup.accel.data.isShake Glb.mqtt_pub.x_acc = M.sceneGroup.accel.data.xGravity Glb.mqtt_pub.y_acc = M.sceneGroup.accel.data.yGravity Glb.mqtt_pub.z_acc = M.sceneGroup.accel.data.zGravity end if M.sceneGroup.gyroscope.isActive then Glb.mqtt_pub.x_gyro = M.sceneGroup.gyroscope.data.xRotation Glb.mqtt_pub.y_gyro = M.sceneGroup.gyroscope.data.yRotation Glb.mqtt_pub.z_gyro = M.sceneGroup.gyroscope.data.zRotation end if M.sceneGroup.location.isActive then Glb.mqtt_pub.latitude = M.sceneGroup.location.data.latitude Glb.mqtt_pub.longitude = M.sceneGroup.location.data.longitude Glb.mqtt_pub.altitude = M.sceneGroup.location.data.altitude Glb.mqtt_pub.accuracy = M.sceneGroup.location.data.accuracy Glb.mqtt_pub.speed = M.sceneGroup.location.data.speed Glb.mqtt_pub.direction = M.sceneGroup.location.data.direction Glb.mqtt_pub.locationeventtime = M.sceneGroup.location.data.time end M.publish_by_freq() -- publish events at requested rate. ---------------------------------------------- -- things to do every 500 milliseconds ---------------------------------------------- if ( M.currenttime100 % 5 == 0 ) then -- M.mqtt_handler() -- called to dequeue socket messages end ---------------------------------------------- -- things to do every 1000 milliseconds ---------------------------------------------- if ( M.currenttime100 % 10 == 0 ) then SL_inst:reloadrows() -- reload sensor table list M.mqtt_handler() -- called to dequeue socket messages end end M.sceneGroup.timers:push({name = "test", timer = timer.performWithDelay(100, timebump , -1)} , -1 ) --====================================================================-- -- INITIALIZE --====================================================================-- local InitializeData = function () -- grab data from disk if needed. M.currenttime100 = os.time() -- # of seconds since 1970 M.appstate = GGData:load("AppState") local found = misc:table_find_by_key("Connected",true,M.appstate.AppBrokers) if found then M.Host = M.appstate.AppBrokers[found]["Host"] M.Port = tonumber(M.appstate.AppBrokers[found]["Port"]) M.KeepAlive = tonumber(M.appstate.AppBrokers[found]["KeepAlive"]) M.TopicPub = M.appstate.AppBrokers[found]["TopicPub"] M.TopicSub = M.appstate.AppBrokers[found]["TopicSub"] M.Freq = tonumber(M.appstate.AppBrokers[found]["Freq"]) else print ("ERROR: internal error, no Connected broker found in AppBrokers table") M.Topic = 'error' Glb.MQTTSession = nil end -- Host = "test.mosquitto.org", -- Port = 1883, -- Topic = 'phonesensors', -- Freq = 20, -- isEnabled = false , -- indicate the active broker in the list. -- isDeletable = true, -- Connected = false, -- KeepAlive = 120, -- Conntype = 'publish', -- or subscribe -- Userid = '', -- Password = ' end local function initVars () if Glb.MQTTSession then if Glb.MQTTSession.connected then -- print ("sensors: subscribe to topic ", M.Topic ) Glb.MQTTSession:subscribe({M.TopicSub}) end end -- M.title = display.newText( gameGroup, "M.sceneGroup.accel.xGravity", 200, 200, native.systemFont, 16 ) -- M.title.anchorX = .5 ; M.title.anchorY = .5 -- M.title:setFillColor( unpack(theme.clr_text) ) return end ------------------ -- Initiate variables ------------------ InitializeData() initVars() return end local function sceneinfo () local currScene = composer.getSceneName( "current" ) local prevScene = composer.getSceneName( "previous" ) local overlayScene = composer.getSceneName( "overlay" ) print ("curr,prev,overlay", currScene, prevScene, overlayScene) return end function scene:create( event ) misc:sceneinfo("Create --") create_new(self,event) end function scene:show( event ) local phase = event.phase if ( phase == "will" ) then -- misc:printtableD(params, 2 ) misc:sceneinfo("Show: will --") M.sceneGroup.runtimez:addall() -- add runtime listeners elseif ( phase == "did" ) then misc:sceneinfo("Show: did --") transition.to( M.sceneGroup , {time = 800 , delay = 0 , alpha = 1 } ) system.setIdleTimer( false ) --audio.play(sounds.wind, { loops = -1, fadein = 750, channel = 15 } ) end end function scene:hide( event ) local phase = event.phase if ( phase == "will" ) then misc:sceneinfo("Hide: will --") M.mqtt_unsubscribe() elseif ( phase == "did" ) then misc:sceneinfo("Hide: did --") -- M.sceneGroup.timers:listem() M.sceneGroup.timers:cancelall() M.sceneGroup.runtimez:removeall() -- remove runtime listeners system.setIdleTimer( true ) end end function scene:destroy( event ) misc:sceneinfo("Destroy --") M = nil end scene:addEventListener("create") scene:addEventListener("show") scene:addEventListener("hide") scene:addEventListener("destroy") return scene
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor. rifle_spraystick = { minimumLevel = 0, maximumLevel = -1, customObjectName = "", directObjectTemplate = "object/weapon/ranged/rifle/rifle_spraystick.iff", craftingValues = { {"mindamage",6,12,0}, {"maxdamage",73,138,0}, {"attackspeed",3.6,2.4,0}, {"woundchance",9,19,0}, {"hitpoints",750,750,0}, {"attackhealthcost",18,7,0}, {"attackactioncost",52,28,0}, {"attackmindcost",52,28,0}, {"roundsused",5,20,0}, {"zerorangemod",-20,-20,0}, {"maxrangemod",-60,-60,0}, {"midrange",30,30,0}, {"midrangemod",-5,5,0}, }, customizationStringNames = {}, customizationValues = {}, -- randomDotChance: The chance of this weapon object dropping with a random dot on it. Higher number means less chance. Set to 0 to always have a random dot. randomDotChance = 750, junkDealerTypeNeeded = JUNKARMS, junkMinValue = 25, junkMaxValue = 45 } addLootItemTemplate("rifle_spraystick", rifle_spraystick)
includeFile("tangible/wearables/cybernetic/s02/cybernetic_s02_legs.lua") includeFile("tangible/wearables/cybernetic/s02/cybernetic_s02_arm_r.lua") includeFile("tangible/wearables/cybernetic/s02/cybernetic_s02_arm_l.lua") includeFile("tangible/wearables/cybernetic/s02/cybernetic_s02_torso.lua")
local group = vim.api.nvim_create_augroup( "LvimKbrd", { clear = true } ) local M = {} function M.enable() vim.api.nvim_create_autocmd( "InsertEnter", { pattern = "*", command = 'lua require"lvim-kbrd.switch".insert_enter()', group = group } ) vim.api.nvim_create_autocmd( "InsertLeave", { pattern = "*", command = 'lua require"lvim-kbrd.switch".insert_leave()', group = group } ) end function M.disable() autocommands = vim.api.nvim_get_autocmds( { group = "LvimKbrd" } ) vim.api.nvim_del_autocmd(autocommands[1]["id"]) vim.api.nvim_del_autocmd(autocommands[2]["id"]) end return M
----------------------------------- -- Area: Metalworks -- Door: _6le (Presidential Suite) -- !pos 113 -20 8 237 ----------------------------------- local ID = require("scripts/zones/Metalworks/IDs"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) player:messageSpecial(ID.text.ITS_LOCKED); return 1; end; function onEventUpdate(player,csid,option) end; function onEventFinish(player,csid,option) end;
local mergesort = require('mergesort') local array1, array2 = {}, {} local N = 10000 for i = 1, N do array1[i] = math.random() array2[i] = array1[i] end table.sort( array1 ) mergesort( array2 ) for i = 1, N do assert( array1[i] == array2[i] ) end local gt = function( a, b ) return a > b end table.sort( array1, gt ) mergesort( array2, gt ) for i = 1, N do assert( array1[i] == array2[i] ) end local array1, array2, array3, array4 = {}, {}, {}, {} local M = 100 local sub1, sub2, sub3 = {}, {} for i = 1, N do array1[i] = math.random() array2[i], array3[i], array4[i] = array1[i], array1[i], array1[i] end for i = 1, M do sub1[i] = array1[i] sub2[i] = array1[i+900] end mergesort( array3, nil, nil, 100 ) mergesort( array3, nil, nil, 100, 901 ) table.sort( sub1 ) table.sort( sub2 ) for i = 1, M do assert( array3[i] == sub1[i] ) assert( array3[i+900] == sub2[i] ) end for i = M+1, 900 do assert( array3[i] == array4[i] ) end local ok, ffi = pcall( require, 'ffi' ) if ok then local a = ffi.new( 'double[?]', 6, 1, 2, 3, 1, 2, 3 ) local b = ffi.new( 'double[?]', 6 ) b = mergesort( a, nil, b, 6, 0 ) -- we need to pass length(6) and starting index(0) for i, v in ipairs{ 1, 1, 2, 2, 3, 3 } do assert( v == b[i-1] ) end end
--[=[ Provides permissions on the client. See [PermissionService] for more details. :::tip Be sure to initialize the [PermissionService] on the server. ::: @class PermissionServiceClient @client ]=] local require = require(script.Parent.loader).load(script) local PermissionProviderConstants = require("PermissionProviderConstants") local PermissionProviderClient = require("PermissionProviderClient") local Promise = require("Promise") local PermissionServiceClient = {} --[=[ Initializes the permission service on the client. Should be done via [ServiceBag]. @param _serviceBag ServiceBag ]=] function PermissionServiceClient:Init(_serviceBag) self._provider = PermissionProviderClient.new(PermissionProviderConstants.DEFAULT_REMOTE_FUNCTION_NAME) end --[=[ Returns the permission provider @return Promise<PermissionProviderClient> ]=] function PermissionServiceClient:PromisePermissionProvider() return Promise.resolved(self._provider) end return PermissionServiceClient
require "socket" require "pins" require "gpio_cfg" module(..., package.seeall) local function print(...) _G.print("[---HENTRE---]",...) end local pin8flg = true local function pin8set() pins.set(pin8flg, gpio_cfg.gpioKeep) pin8flg = not pin8flg end local app = { GPIO_DBG = function(a, b, c) print("gpio_dbg", a, b, c) end, SCKT_DBG = function(a, b, c) print("sckt_dbg", a, b, c) end, DISP_DBG = function(a, b, c) print("sckt_dbg", a, b, c) end, --网络准备好 IMEI_READY = function() sys.dispatch("SCREEN_IMEI_READY") sys.dispatch("DIVCE_STATUS_CHECK") --启动后检查状态 sys.timer_start( function() sys.dispatch("MSG_REQ_LBS_LOCATE") end, 10000 ) --启动10s后开始定位 sys.timer_start( function() sys.dispatch("UPLOAD_IMEI_READY") end, 1000 ) --启动服务器连接 end, sys.timer_loop_start(pin8set, 1000), sys.timer_loop_start( function() sys.dispatch("GPIO_DBG") end, 3000 ), sys.timer_loop_start( function() sys.dispatch("SCKT_DBG") end, 2000 ) } sys.regapp(app)
--[[ @Authors: Ben Dol (BeniS) @Details: Disable bot event logic ]] BotModule.Disable = {} Disable = BotModule.Disable function Disable.Event(event) local botIcon = BotModule.getPanel():getChildById('botIcon') botIcon:setEnabled(false) botIcon:setTooltip("Disabled") CandyBot.enable(false) BotLogger.warning("Bot disabled.") end
local bit = require('bit') local event = require('core.event') local ffi = require('ffi') local os = require('os') local packet = require('packet') local server = require('shared.server') local string = require('string') local struct = require('struct') local status_effects_size = 0x400 local data = server.new(struct.struct({ party = {struct.struct({ id = {struct.int32}, index = {struct.int32}, effects = {struct.int8[status_effects_size]}, })[6]}, array = {struct.struct({ id = {struct.int32}, _duration_end = {struct.double}, })[0x20]}, gained = {data = event.new()}, lost = {data = event.new()}, })) local data_player = data.party[0] local data_party = data.party local data_array = data.array local event_gained = data.gained local event_lost = data.lost local bit_band = bit.band local bit_rshift = bit.rshift local ffi_copy = ffi.copy local ffi_fill = ffi.fill local os_clock = os.clock local string_byte = string.byte for i = 0, 0x1F do data_array[i].id = 0xFF end local last_tick = 0 local last_clock = 0 local packet_buffer = struct.new(packet.incoming[0x063][0x09].type) local calculate_diff local process_effects do do local temp_buffer = struct.new(struct.int8[status_effects_size]) calculate_diff = function(source, destination) local gained = {} local gained_count = 0 local lost = {} local lost_count = 0 ffi_fill(temp_buffer, status_effects_size) for i = 0, 0x1F do local status_effect = source[i] if status_effect ~= 0xFF then temp_buffer[status_effect] = temp_buffer[status_effect] + 1 end end for i = 0, status_effects_size - 1 do local array_count = temp_buffer[i] local data_count = destination[i] for _ = 1, array_count - data_count do gained_count = gained_count + 1 gained[gained_count] = i end for _ = 1, data_count - array_count do lost_count = lost_count + 1 lost[lost_count] = i end destination[i] = array_count end return gained, lost end end local update_data do local status_effects = packet_buffer.status_effects local end_ticks = packet_buffer.end_ticks update_data = function() for i = 0, 0x1F do local entry = data_array[i] entry.id = status_effects[i] local end_tick = end_ticks[i] if end_tick ~= 0 then entry._duration_end = last_clock + (end_tick - last_tick) / 60 else entry._duration_end = 0 end end end end do local data_effects = data_player.effects local status_effects = packet_buffer.status_effects process_effects = function() local gained, lost = calculate_diff(status_effects, data_effects) update_data() if #gained > 0 then event_gained:trigger(0, unpack(gained)) end if #lost > 0 then event_lost:trigger(0, unpack(lost)) end end end end local party_buff_array = struct.new(struct.int32[0x20]) packet.incoming:register_init({ [{0x00A}] = function(p) data_player.id = p.player_id data_player.index = p.player_index end, [{0x037}] = function(p) last_tick = (p.home_point_timestamp * 60 - p.home_point_ticks) % 2^32 last_clock = os_clock() process_effects() end, [{0x063, 9}] = function(p, info) ffi_copy(packet_buffer, p, info.modified_size) process_effects() end, [{0x076}] = function(p) for i = 1, 5 do local data_party_member = data_party[i] local party_member = p.party_members[i - 1] local party_member_id = party_member.id local trigger = data_party_member.id == party_member_id data_party_member.id = party_member_id data_party_member.index = party_member.index if party_member_id ~= 0 then local high_bit_mask = party_member.status_effect_mask local status_effects = party_member.status_effects for j = 0, 0x1F do local low_value = status_effects[j] local high_value = bit_band(bit_rshift(string_byte(high_bit_mask, j / 4 + 1), bit_band(j * 2, 7)), 3) party_buff_array[j] = high_value * 0x100 + low_value end local gained, lost = calculate_diff(party_buff_array, data_party_member.effects) if trigger then if #gained > 0 then event_gained:trigger(i, unpack(gained)) end if #lost > 0 then event_lost:trigger(i, unpack(lost)) end end else ffi_fill(data_party_member, status_effects_size) end end end, }) --[[ Copyright © 2018, Windower Dev Team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Windower Dev Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE WINDOWER DEV TEAM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]]
local roles_to_names = { [5] = "wizard", [7] = "trainer", [8] = "informer", [9] = "bartender", [10] = "arena_master", [11] = "pet_arena_master", [12] = "healer", [15] = "wizard", [17] = "slave_trader", [19] = "sister", [21] = "wizard", [22] = "horse_master", [23] = "caravan_master", [1001] = "blacksmith", [1002] = "food_vendor", [1003] = "baker", [1004] = "magic_vendor", [1005] = "innkeeper", [1006] = "general_vendor", [1007] = "blackmarket", [1008] = "goods_vendor", [1009] = "trader", [1011] = "sales_person_a", [1012] = "sales_person_c", [1013] = "sales_person_b", [1014] = "fishery", [1015] = "moyer", [1016] = "miral", [1017] = "dye_vendor", [1018] = "souvenir_vendor", [1019] = "younger_sister_of_mansion", [1020] = "spell_writer", [1021] = "the_fence", [1022] = "street_vendor", } local names_to_roles = {} for role, name in pairs(roles_to_names) do names_to_roles[name] = role end local function generate_waypoints(obj) obj.type = "autorun.waypoints" for _, v in pairs(obj.waypoints) do v.localized_name = v[1] v.target = { _type = "character", role = names_to_roles[v[1]] } v.pos = v[2] v[1] = nil v[2] = nil end data:add({obj}) end data:define_type("waypoints") -- vernis generate_waypoints( { name = "vernis", map_id = "core.vernis", map_level = 1, waypoints = { { "trainer", { x = 27, y = 16 } }, { "magic_vendor", { x = 7, y = 26 } }, { "innkeeper", { x = 14, y = 25 } }, { "baker", { x = 22, y = 26 } }, { "general_vendor", { x = 10, y = 15 } }, { "trader", { x = 39, y = 27 } }, { "blacksmith", { x = 14, y = 12 } }, { "fishery", { x = 47, y = 9 } }, { "wizard", { x = 28, y = 16 } }, { "bartender", { x = 38, y = 27 } }, { "healer", { x = 6, y = 25 } }, { "informer", { x = 25, y = 16 } }, } } ) -- derphy generate_waypoints( { name = "derphy", map_id = "core.derphy", map_level = 1, waypoints = { { "trader", { x = 10, y = 17 } }, { "bartender", { x = 38, y = 27 } }, { "general_vendor", { x = 13, y = 3 } }, { "innkeeper", { x = 29, y = 23 } }, { "goods_vendor", { x = 26, y = 7 } }, { "blackmarket", { x = 30, y = 4 } }, { "slave_trader", { x = 29, y = 4 } }, { "blacksmith", { x = 10, y = 6 } }, { "arena_master", { x = 7, y = 15 } }, { "trainer", { x = 13, y = 18 } }, { "wizard", { x = 5, y = 26 } }, { "informer", { x = 3, y = 28 } }, } } ) -- thieves guild generate_waypoints( { name = "thieves_guild", map_id = "core.derphy", map_level = 3, waypoints = { { "trainer", { x = 3, y = 6 } }, { "wizard", { x = 3, y = 12 } }, { "blackmarket", { x = 5, y = 18 } }, { "blackmarket", { x = 27, y = 13 } }, { "the_fence", { x = 21, y = 19 } }, } } ) -- palmia generate_waypoints( { name = "palmia", map_id = "core.palmia", map_level = 1, waypoints = { { "bartender", { x = 42, y = 27 } }, { "healer", { x = 34, y = 3 } }, { "arena_master", { x = 22, y = 31 } }, { "general_vendor", { x = 48, y = 18 } }, { "innkeeper", { x = 30, y = 17 } }, { "goods_vendor", { x = 48, y = 3 } }, { "blacksmith", { x = 42, y = 17 } }, { "baker", { x = 11, y = 14 } }, { "magic_vendor", { x = 41, y = 3 } }, { "trader", { x = 41, y = 28 } }, { "wizard", { x = 7, y = 2 } }, { "wizard", { x = 6, y = 2 } }, { "trainer", { x = 30, y = 27 } }, { "wizard", { x = 32, y = 27 } }, { "informer", { x = 29, y = 28 } }, } } ) -- lumiest generate_waypoints( { name = "lumiest", map_id = "core.lumiest", map_level = 1, waypoints = { { "bartender", { x = 41, y = 42 } }, { "healer", { x = 10, y = 16 } }, { "general_vendor", { x = 47, y = 30 } }, { "innkeeper", { x = 24, y = 47 } }, { "blacksmith", { x = 37, y = 30 } }, { "baker", { x = 37, y = 12 } }, { "magic_vendor", { x = 6, y = 15 } }, { "trader", { x = 33, y = 43 } }, { "fishery", { x = 47, y = 12 } }, { "trainer", { x = 21, y = 28 } }, { "wizard", { x = 21, y = 30 } }, { "informer", { x = 23, y = 38 } }, } } ) -- mages guild generate_waypoints( { name = "mages_guild", map_id = "core.lumiest", map_level = 3, waypoints = { { "spell_writer", { x = 27, y = 8 } }, { "magic_vendor", { x = 22, y = 8 } }, { "healer", { x = 3, y = 9 } }, { "trainer", { x = 12, y = 6 } }, { "wizard", { x = 3, y = 3 } }, } } ) -- yowyn generate_waypoints( { name = "yowyn", map_id = "core.yowyn", map_level = 1, waypoints = { { "general_vendor", { x = 11, y = 5 } }, { "innkeeper", { x = 25, y = 8 } }, { "goods_vendor", { x = 7, y = 8 } }, { "trader", { x = 14, y = 14 } }, { "horse_master", { x = 35, y = 18 } }, { "trainer", { x = 20, y = 14 } }, { "wizard", { x = 24, y = 16 } }, { "informer", { x = 26, y = 16 } }, } } ) -- noyel generate_waypoints( { name = "noyel", map_id = "core.noyel", map_level = 1, waypoints = { { "moyer", { x = 47, y = 18 } }, { "bartender", { x = 40, y = 33 } }, { "healer", { x = 44, y = 6 } }, { "sister", { x = 44, y = 3 } }, { "blacksmith", { x = 19, y = 31 } }, { "general_vendor", { x = 11, y = 31 } }, { "innkeeper", { x = 38, y = 34 } }, { "baker", { x = 5, y = 27 } }, { "magic_vendor", { x = 56, y = 5 } }, { "trader", { x = 39, y = 35 } }, { "trainer", { x = 18, y = 20 } }, { "wizard", { x = 4, y = 33 } }, { "informer", { x = 6, y = 33 } }, } } ) -- port kapul generate_waypoints( { name = "port_kapul", map_id = "core.port_kapul", map_level = 1, waypoints = { { "trader", { x = 16, y = 17 } }, { "blacksmith", { x = 23, y = 7 } }, { "general_vendor", { x = 32, y = 14 } }, { "goods_vendor", { x = 22, y = 14 } }, { "blackmarket", { x = 16, y = 25 } }, { "food_vendor", { x = 17, y = 28 } }, { "magic_vendor", { x = 22, y = 22 } }, { "innkeeper", { x = 35, y = 3 } }, { "bartender", { x = 15, y = 15 } }, { "arena_master", { x = 26, y = 3 } }, { "pet_arena_master", { x = 25, y = 4 } }, { "trainer", { x = 16, y = 4 } }, { "wizard", { x = 14, y = 4 } }, { "informer", { x = 17, y = 5 } }, { "healer", { x = 27, y = 11 } }, } } ) -- fighters guild generate_waypoints( { name = "fighters_guild", map_id = "core.port_kapul", map_level = 3, waypoints = { { "healer", { x = 28, y = 10 } }, { "trainer", { x = 15, y = 10 } }, { "wizard", { x = 14, y = 18 } }, { "blacksmith", { x = 29, y = 15 } }, } } ) -- larna generate_waypoints( { name = "larna", map_id = "core.larna", map_level = 1, waypoints = { { "wizard", { x = 21, y = 23 } }, { "dye_vendor", { x = 9, y = 44 } }, { "souvenir_vendor", { x = 13, y = 37 } }, { "bartender", { x = 24, y = 48 } }, } } ) -- cyber dome generate_waypoints( { name = "cyber_dome", map_id = "core.cyber_dome", map_level = 1, waypoints = { { "sales_person_a", { x = 9, y = 16 } }, { "sales_person_a", { x = 9, y = 8 } }, } } ) -- miral and garok's workshop generate_waypoints( { name = "miral_and_garoks_workshop", map_id = "core.miral_and_garoks_workshop", map_level = 1, waypoints = { { "miral", { x = 8, y = 16 } }, } } ) -- mansion of younger sister generate_waypoints( { name = "mansion_of_younger_sister", map_id = "core.mansion_of_younger_sister", map_level = 1, waypoints = { { "younger_sister_of_mansion", { x = 12, y = 6 } } } } )
include "openssl/e_os2" include "openssl/bio" include "openssl/stack" include "openssl/evp" include "openssl/x509" include "openssl/pem2" include "openssl/symhacks" ffi.cdef [[ typedef struct PEM_Encode_Seal_st { EVP_ENCODE_CTX encode; EVP_MD_CTX md; EVP_CIPHER_CTX cipher; } PEM_ENCODE_SEAL_CTX; typedef struct pem_recip_st { char *name; X509_NAME *dn; int cipher; int key_enc; } PEM_USER; typedef struct pem_ctx_st { int type; struct { int version; int mode; } proc_type; char *domain; struct { int cipher; } DEK_info; PEM_USER *originator; int num_recipient; PEM_USER **recipient; EVP_MD *md; int md_enc; int md_len; char *md_data; EVP_CIPHER *dec; int key_len; unsigned char *key; int data_enc; int data_len; unsigned char *data; } PEM_CTX; typedef int pem_password_cb(char *buf, int size, int rwflag, void *userdata); int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, pem_password_cb *callback,void *u); int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,long *len); int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data, long len); int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp, pem_password_cb *cb, void *u); void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, pem_password_cb *cb, void *u); int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp, void *x, const EVP_CIPHER *enc,unsigned char *kstr,int klen, pem_password_cb *cb, void *u); struct stack_st_X509_INFO * PEM_X509_INFO_read_bio(BIO *bp, struct stack_st_X509_INFO *sk, pem_password_cb *cb, void *u); int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cd, void *u); int PEM_read(FILE *fp, char **name, char **header, unsigned char **data,long *len); int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, pem_password_cb *cb, void *u); int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, void *x,const EVP_CIPHER *enc,unsigned char *kstr, int klen,pem_password_cb *callback, void *u); struct stack_st_X509_INFO * PEM_X509_INFO_read(FILE *fp, struct stack_st_X509_INFO *sk, pem_password_cb *cb, void *u); int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type, unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk); void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl); int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig,int *sigl, unsigned char *out, int *outl, EVP_PKEY *priv); void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); int PEM_def_callback(char *buf, int num, int w, void *key); void PEM_proc_type(char *buf, int type); void PEM_dek_info(char *buf, const char *type, int len, char *str); X509 *PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u); X509 *PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u); int PEM_write_bio_X509(BIO *bp, X509 *x); int PEM_write_X509(FILE *fp, X509 *x); X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u); X509 *PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u); int PEM_write_bio_X509_AUX(BIO *bp, X509 *x); int PEM_write_X509_AUX(FILE *fp, X509 *x); X509_CERT_PAIR *PEM_read_bio_X509_CERT_PAIR(BIO *bp, X509_CERT_PAIR **x, pem_password_cb *cb, void *u); X509_CERT_PAIR *PEM_read_X509_CERT_PAIR(FILE *fp, X509_CERT_PAIR **x, pem_password_cb *cb, void *u); int PEM_write_bio_X509_CERT_PAIR(BIO *bp, X509_CERT_PAIR *x); int PEM_write_X509_CERT_PAIR(FILE *fp, X509_CERT_PAIR *x); X509_REQ *PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x, pem_password_cb *cb, void *u); X509_REQ *PEM_read_X509_REQ(FILE *fp, X509_REQ **x, pem_password_cb *cb, void *u); int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x); int PEM_write_X509_REQ(FILE *fp, X509_REQ *x); int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x); int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x); X509_CRL *PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x, pem_password_cb *cb, void *u); X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x, pem_password_cb *cb, void *u); int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x); int PEM_write_X509_CRL(FILE *fp, X509_CRL *x); PKCS7 *PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u); PKCS7 *PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u); int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x); int PEM_write_PKCS7(FILE *fp, PKCS7 *x); NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u); NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u); int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp, NETSCAPE_CERT_SEQUENCE *x); int PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE *x); X509_SIG *PEM_read_bio_PKCS8(BIO *bp, X509_SIG **x, pem_password_cb *cb, void *u); X509_SIG *PEM_read_PKCS8(FILE *fp, X509_SIG **x, pem_password_cb *cb, void *u); int PEM_write_bio_PKCS8(BIO *bp, X509_SIG *x); int PEM_write_PKCS8(FILE *fp, X509_SIG *x); PKCS8_PRIV_KEY_INFO *PEM_read_bio_PKCS8_PRIV_KEY_INFO(BIO *bp, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u); PKCS8_PRIV_KEY_INFO *PEM_read_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u); int PEM_write_bio_PKCS8_PRIV_KEY_INFO(BIO *bp, PKCS8_PRIV_KEY_INFO *x); int PEM_write_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO *x); RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u); RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **x, pem_password_cb *cb, void *u); int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u); RSA *PEM_read_RSAPublicKey(FILE *fp, RSA **x, pem_password_cb *cb, void *u); int PEM_write_bio_RSAPublicKey(BIO *bp, const RSA *x); int PEM_write_RSAPublicKey(FILE *fp, const RSA *x); RSA *PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x, pem_password_cb *cb, void *u); RSA *PEM_read_RSA_PUBKEY(FILE *fp, RSA **x, pem_password_cb *cb, void *u); int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x); int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x); DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **x, pem_password_cb *cb, void *u); DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **x, pem_password_cb *cb, void *u); int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); DSA *PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x, pem_password_cb *cb, void *u); DSA *PEM_read_DSA_PUBKEY(FILE *fp, DSA **x, pem_password_cb *cb, void *u); int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x); int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x); DSA *PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u); DSA *PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u); int PEM_write_bio_DSAparams(BIO *bp, const DSA *x); int PEM_write_DSAparams(FILE *fp, const DSA *x); EC_GROUP *PEM_read_bio_ECPKParameters(BIO *bp, EC_GROUP **x, pem_password_cb *cb, void *u); EC_GROUP *PEM_read_ECPKParameters(FILE *fp, EC_GROUP **x, pem_password_cb *cb, void *u); int PEM_write_bio_ECPKParameters(BIO *bp, const EC_GROUP *x); int PEM_write_ECPKParameters(FILE *fp, const EC_GROUP *x); EC_KEY *PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **x, pem_password_cb *cb, void *u); EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u); int PEM_write_bio_ECPrivateKey(BIO *bp, EC_KEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_ECPrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); EC_KEY *PEM_read_bio_EC_PUBKEY(BIO *bp, EC_KEY **x, pem_password_cb *cb, void *u); EC_KEY *PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u); int PEM_write_bio_EC_PUBKEY(BIO *bp, EC_KEY *x); int PEM_write_EC_PUBKEY(FILE *fp, EC_KEY *x); DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u); DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u); int PEM_write_bio_DHparams(BIO *bp, const DH *x); int PEM_write_DHparams(FILE *fp, const DH *x); EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u); EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u); int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u); EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u); int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x); int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x); int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *); int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cb, void *u); int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u); int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cb, void *u); int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u); int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc, char *kstr,int klen, pem_password_cb *cd, void *u); EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length); EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length); EVP_PKEY *b2i_PrivateKey_bio(BIO *in); EVP_PKEY *b2i_PublicKey_bio(BIO *in); int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk); int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, void *u); void ERR_load_PEM_strings(void); ]] PEM_BUFSIZE = 1024 PEM_DEK_DES_CBC = 40 PEM_DEK_DES_ECB = 60 PEM_DEK_DES_EDE = 50 PEM_DEK_IDEA_CBC = 45 PEM_DEK_RSA = 70 PEM_DEK_RSA_MD2 = 80 PEM_DEK_RSA_MD5 = 90 PEM_ERROR = 30 PEM_F_B2I_DSS = 127 PEM_F_B2I_PVK_BIO = 128 PEM_F_B2I_RSA = 129 PEM_F_CHECK_BITLEN_DSA = 130 PEM_F_CHECK_BITLEN_RSA = 131 PEM_F_D2I_PKCS8PRIVATEKEY_BIO = 120 PEM_F_D2I_PKCS8PRIVATEKEY_FP = 121 PEM_F_DO_B2I = 132 PEM_F_DO_B2I_BIO = 133 PEM_F_DO_BLOB_HEADER = 134 PEM_F_DO_PK8PKEY = 126 PEM_F_DO_PK8PKEY_FP = 125 PEM_F_DO_PVK_BODY = 135 PEM_F_DO_PVK_HEADER = 136 PEM_F_I2B_PVK = 137 PEM_F_I2B_PVK_BIO = 138 PEM_F_LOAD_IV = 101 PEM_F_PEM_ASN1_READ = 102 PEM_F_PEM_ASN1_READ_BIO = 103 PEM_F_PEM_ASN1_WRITE = 104 PEM_F_PEM_ASN1_WRITE_BIO = 105 PEM_F_PEM_DEF_CALLBACK = 100 PEM_F_PEM_DO_HEADER = 106 PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY = 118 PEM_F_PEM_GET_EVP_CIPHER_INFO = 107 PEM_F_PEM_PK8PKEY = 119 PEM_F_PEM_READ = 108 PEM_F_PEM_READ_BIO = 109 PEM_F_PEM_READ_BIO_PARAMETERS = 140 PEM_F_PEM_READ_BIO_PRIVATEKEY = 123 PEM_F_PEM_READ_PRIVATEKEY = 124 PEM_F_PEM_SEALFINAL = 110 PEM_F_PEM_SEALINIT = 111 PEM_F_PEM_SIGNFINAL = 112 PEM_F_PEM_WRITE = 113 PEM_F_PEM_WRITE_BIO = 114 PEM_F_PEM_WRITE_PRIVATEKEY = 139 PEM_F_PEM_X509_INFO_READ = 115 PEM_F_PEM_X509_INFO_READ_BIO = 116 PEM_F_PEM_X509_INFO_WRITE_BIO = 117 PEM_MD_MD2 = NID_md2 PEM_MD_MD2_RSA = NID_md2WithRSAEncryption PEM_MD_MD5 = NID_md5 PEM_MD_MD5_RSA = NID_md5WithRSAEncryption PEM_MD_SHA = NID_sha PEM_MD_SHA_RSA = NID_sha1WithRSAEncryption PEM_OBJ_CRL = 3 PEM_OBJ_DHPARAMS = 17 PEM_OBJ_DSAPARAMS = 18 PEM_OBJ_ECPARAMETERS = 22 PEM_OBJ_PRIV_DH = 13 PEM_OBJ_PRIV_DSA = 12 PEM_OBJ_PRIV_ECDSA = 20 PEM_OBJ_PRIV_KEY = 10 PEM_OBJ_PRIV_RSA = 11 PEM_OBJ_PRIV_RSA_PUBLIC = 19 PEM_OBJ_PUB_DH = 16 PEM_OBJ_PUB_DSA = 15 PEM_OBJ_PUB_ECDSA = 21 PEM_OBJ_PUB_RSA = 14 PEM_OBJ_SSL_SESSION = 4 PEM_OBJ_UNDEF = 0 PEM_OBJ_X509 = 1 PEM_OBJ_X509_REQ = 2 PEM_R_BAD_BASE64_DECODE = 100 PEM_R_BAD_DECRYPT = 101 PEM_R_BAD_END_LINE = 102 PEM_R_BAD_IV_CHARS = 103 PEM_R_BAD_MAGIC_NUMBER = 116 PEM_R_BAD_PASSWORD_READ = 104 PEM_R_BAD_VERSION_NUMBER = 117 PEM_R_BIO_WRITE_FAILURE = 118 PEM_R_CIPHER_IS_NULL = 127 PEM_R_ERROR_CONVERTING_PRIVATE_KEY = 115 PEM_R_EXPECTING_PRIVATE_KEY_BLOB = 119 PEM_R_EXPECTING_PUBLIC_KEY_BLOB = 120 PEM_R_INCONSISTENT_HEADER = 121 PEM_R_KEYBLOB_HEADER_PARSE_ERROR = 122 PEM_R_KEYBLOB_TOO_SHORT = 123 PEM_R_NO_START_LINE = 108 PEM_R_NOT_DEK_INFO = 105 PEM_R_NOT_ENCRYPTED = 106 PEM_R_NOT_PROC_TYPE = 107 PEM_R_PROBLEMS_GETTING_PASSWORD = 109 PEM_R_PUBLIC_KEY_NO_RSA = 110 PEM_R_PVK_DATA_TOO_SHORT = 124 PEM_R_PVK_TOO_SHORT = 125 PEM_R_READ_KEY = 111 PEM_R_SHORT_HEADER = 112 PEM_R_UNSUPPORTED_CIPHER = 113 PEM_R_UNSUPPORTED_ENCRYPTION = 114 PEM_R_UNSUPPORTED_KEY_COMPONENTS = 126 PEM_STRING_CMS = "CMS" PEM_STRING_DHPARAMS = "DH PARAMETERS" PEM_STRING_DSA = "DSA PRIVATE KEY" PEM_STRING_DSA_PUBLIC = "DSA PUBLIC KEY" PEM_STRING_DSAPARAMS = "DSA PARAMETERS" PEM_STRING_ECDSA_PUBLIC = "ECDSA PUBLIC KEY" PEM_STRING_ECPARAMETERS = "EC PARAMETERS" PEM_STRING_ECPRIVATEKEY = "EC PRIVATE KEY" PEM_STRING_EVP_PKEY = "ANY PRIVATE KEY" PEM_STRING_PARAMETERS = "PARAMETERS" PEM_STRING_PKCS7 = "PKCS7" PEM_STRING_PKCS7_SIGNED = "PKCS #7 SIGNED DATA" PEM_STRING_PKCS8 = "ENCRYPTED PRIVATE KEY" PEM_STRING_PKCS8INF = "PRIVATE KEY" PEM_STRING_PUBLIC = "PUBLIC KEY" PEM_STRING_RSA = "RSA PRIVATE KEY" PEM_STRING_RSA_PUBLIC = "RSA PUBLIC KEY" PEM_STRING_SSL_SESSION = "SSL SESSION PARAMETERS" PEM_STRING_X509 = "CERTIFICATE" PEM_STRING_X509_CRL = "X509 CRL" PEM_STRING_X509_OLD = "X509 CERTIFICATE" PEM_STRING_X509_PAIR = "CERTIFICATE PAIR" PEM_STRING_X509_REQ = "CERTIFICATE REQUEST" PEM_STRING_X509_REQ_OLD = "NEW CERTIFICATE REQUEST" PEM_STRING_X509_TRUSTED = "TRUSTED CERTIFICATE" PEM_TYPE_CLEAR = 40 PEM_TYPE_ENCRYPTED = 10 PEM_TYPE_MIC_CLEAR = 30 PEM_TYPE_MIC_ONLY = 20
local c local player = Var "Player" local ShowComboAt = THEME:GetMetric("Combo", "ShowComboAt") local Pulse = THEME:GetMetric("Combo", "PulseCommand") local PulseLabel = THEME:GetMetric("Combo", "PulseLabelCommand") local NumberMinZoom = THEME:GetMetric("Combo", "NumberMinZoom") local NumberMaxZoom = THEME:GetMetric("Combo", "NumberMaxZoom") local NumberMaxZoomAt = THEME:GetMetric("Combo", "NumberMaxZoomAt") local LabelMinZoom = THEME:GetMetric("Combo", "LabelMinZoom") local LabelMaxZoom = THEME:GetMetric("Combo", "LabelMaxZoom") local t = Def.ActorFrame { LoadActor(THEME:GetPathG("Combo","100Milestone")) .. { Name="OneHundredMilestone", FiftyMilestoneCommand=function(self) self:playcommand("Milestone") end }, LoadActor(THEME:GetPathG("Combo","1000Milestone")) .. { Name="OneThousandMilestone", ToastyAchievedMessageCommand=function(self) self:playcommand("Milestone") end }, Def.BitmapText { Font="_Plex Numbers 60px", Name="Number", OnCommand = THEME:GetMetric("Combo", "NumberOnCommand"), }, Def.BitmapText { Font="_Condensed Semibold", Name="Label", OnCommand = THEME:GetMetric("Combo", "LabelOnCommand"), }, InitCommand = function(self) -- We'll have to deal with this later --self:draworder(notefield_draw_order.over_field) c = self:GetChildren() c.Number:visible(false) c.Label:visible(false) end, -- Milestones: -- 25,50,100,250,600 Multiples; --[[ if (iCombo % 100) == 0 then c.OneHundredMilestone:playcommand("Milestone"); elseif (iCombo % 250) == 0 then -- It should really be 1000 but thats slightly unattainable, since -- combo doesnt save over now. c.OneThousandMilestone:playcommand("Milestone"); else return end; --]] ComboCommand=function(self, param) local iCombo = param.Misses or param.Combo if not iCombo or iCombo < ShowComboAt then c.Number:visible(false) c.Label:visible(false) return end local labeltext = param.Combo and "COMBO" or "MISSES" c.Label:settext( labeltext ) c.Label:visible(false) param.Zoom = scale( iCombo, 0, NumberMaxZoomAt, NumberMinZoom, NumberMaxZoom ) param.Zoom = clamp( param.Zoom, NumberMinZoom, NumberMaxZoom ) param.LabelZoom = scale( iCombo, 0, NumberMaxZoomAt, LabelMinZoom, LabelMaxZoom ) param.LabelZoom = clamp( param.LabelZoom, LabelMinZoom, LabelMaxZoom ) c.Number:visible(true) c.Label:visible(true) c.Number:settext( string.format("%i", iCombo) ) c.Number:finishtweening() c.Label:finishtweening() -- FullCombo Rewards if param.FullComboW1 then c.Number:diffuse(color("#8CCBFF")):diffusetopedge(color("#ACFFFD")):strokecolor(color("#345660")) c.Label:diffuse(color("#8CCBFF")):diffusetopedge(color("#ACFFFD")):strokecolor(color("#345660")) elseif param.FullComboW2 then c.Number:diffuse(color("#FAFAFA")):diffusetopedge(color("#FFFBA3")):strokecolor(color("#A27000")) c.Label:diffuse(color("#FAFAFA")):diffusetopedge(color("#FFFBA3")):strokecolor(color("#A27000")) elseif param.FullComboW3 then c.Number:diffuse(color("#8CFFB8")):diffusetopedge(color("#C5FFA3")):strokecolor(color("#1B7E16")) c.Label:diffuse(color("#8CFFB8")):diffusetopedge(color("#C5FFA3")):strokecolor(color("#1B7E16")) elseif param.Combo then c.Number:diffuse(color("#FFFFFF")):diffusetopedge(color("#DCE7FB")):strokecolor(color("#101E4B")):stopeffect() c.Label:diffuse(color("#FFFFFF")):diffusetopedge(color("#DCE7FB")):strokecolor(color("#101E4B")):stopeffect() else c.Number:diffuse(color("#f7d8d8")):diffusetopedge(color("#db7d7d")):strokecolor(color("#4b1010")):stopeffect() c.Label:diffuse(color("#f7d8d8")):diffusetopedge(color("#db7d7d")):strokecolor(color("#4b1010")):stopeffect() end -- Pulse Pulse( c.Number, param ) PulseLabel( c.Label, param ) end } return t
local AppBase = class("AppBase") AppBase.APP_ENTER_BACKGROUND_EVENT = "APP_ENTER_BACKGROUND_EVENT" AppBase.APP_ENTER_FOREGROUND_EVENT = "APP_ENTER_FOREGROUND_EVENT" function AppBase:ctor(appName, packageRoot) cc(self):addComponent("components.behavior.EventProtocol"):exportMethods() self.name = appName self.packageRoot = packageRoot or "app" local eventDispatcher = cc.Director:getInstance():getEventDispatcher() local customListenerBg = cc.EventListenerCustom:create(AppBase.APP_ENTER_BACKGROUND_EVENT, handler(self, self.onEnterBackground)) eventDispatcher:addEventListenerWithFixedPriority(customListenerBg, 1) local customListenerFg = cc.EventListenerCustom:create(AppBase.APP_ENTER_FOREGROUND_EVENT, handler(self, self.onEnterForeground)) eventDispatcher:addEventListenerWithFixedPriority(customListenerFg, 1) self.snapshots_ = {} -- set global app app = self end function AppBase:run() end function AppBase:exit() cc.Director:getInstance():endToLua() if device.platform == "windows" or device.platform == "mac" then os.exit() end end function AppBase:enterScene(sceneName, args, transitionType, time, more) local scenePackageName = self.packageRoot .. ".scenes." .. sceneName local sceneClass = require(scenePackageName) local scene = sceneClass.new(unpack(checktable(args))) display.replaceScene(scene, transitionType, time, more) end function AppBase:createView(viewName, ...) local viewPackageName = self.packageRoot .. ".views." .. viewName local viewClass = require(viewPackageName) return viewClass.new(...) end function AppBase:onEnterBackground() self:dispatchEvent({name = AppBase.APP_ENTER_BACKGROUND_EVENT}) end function AppBase:onEnterForeground() self:dispatchEvent({name = AppBase.APP_ENTER_FOREGROUND_EVENT}) end return AppBase
Option = require('utils.option') Variable = require('utils.variable') Keymap = require('utils.keymap') Command = require('utils.command') Augroup = require('utils.augroup') Reload = require('utils.reload') Vim = { Option = Option, Variable = Variable, Keymap = Keymap, Command = Command, Augroup = Augroup, Reload = Reload, }
outputFiles = { NormvolumeCumulative={ filename="expData/logistic_regression_2.txt", selected_columns=[0,1], }, }
----------------------------------- -- Area: Davoi -- NPC: _451 (Elevator Lever) -- Notes: Used to operate Elevator @450 (actual npc script is _454) ----------------------------------- require("scripts/globals/status"); require("scripts/globals/settings"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) npc:openDoor(3); -- lever animation RunElevator(tpz.elevator.DAVOI_LIFT); -- elevator @450 (actual npc script is _454) end; function onEventUpdate(player,csid,option) end; function onEventFinish(player,csid,option,npc) end;
--[[ 元数据管理器 --]] local THIS_MODULE = ... local MetaManager = class("MetaManager", require("app.main.modules.index.IndexListener")) -- 获得单例对象 local instance = nil function MetaManager:getInstance() if instance == nil then instance = MetaManager:create() indexMgr:addListener(instance) end return instance end -- 构造函数 function MetaManager:ctor() self._modules = {} -- 元数据模块表 end --[[ 注册元数据模块 modname 模块名 metaipath 元数据索引路径 classipath 类索引路径 objectipath 对象索引路径 ]] function MetaManager:registerModule(modname, metaipath, classipath, objectipath) assert(not self._modules[modname],"meta module [" .. modname .. "] already exist!!!") if metaipath and (metaipath:byte(#metaipath) ~= 47) then -- / metaipath = metaipath .. "/" end if classipath and (classipath:byte(#classipath) ~= 47) then -- / classipath = classipath .. "/" end if objectipath and (objectipath:byte(#objectipath) ~= 47) then -- / objectipath = objectipath .. "/" end self._modules[modname] = { metaipath = metaipath, classipath = classipath, objectipath = objectipath, metas = {}, -- 元数据 classes = {}, -- 类 objects = {}, -- 对象 } end --[[ 注销指定模块 modname 模块名 ]] function MetaManager:unRegisterModule(modname) if self._modules[modname] then self:releaseObjects(modname) self:releaseClasses(modname) self:releaseMetas(modname) self._modules[modname] = nil end end -------------------------IndexListener------------------------- -- 清空索引 function MetaManager:onIndexesRemoved() self:releaseAllObjects(true) self:releaseAllClasses(true) self:releaseAllMetas() end -------------------------IndexListener------------------------- --[[ 获得指定的元数据 modname 模块名 metatype 元数据类型 ]] function MetaManager:getMeta(modname, metatype) local module = self._modules[modname] if module then local meta = module.metas[metatype] if not meta then local metalua = indexMgr:getIndex(module.metaipath .. metatype) if metalua then meta = require(metalua) meta:setMetaType(metatype) module.metas[metatype] = meta end end return meta end end --[[ 获得模块所有元数据 modname 模块名 ]] function MetaManager:getMetas(modname) local module = self._modules[modname] if module then for _,mtype in ipairs(table.keys(module.metaipath)) do self:getMeta(modname, mtype) end return module.metas end end --[[ 释放模块的元数据 modname 模块名 ]] function MetaManager:releaseMetas(modname) self._modules[modname].metas = {} end -- 释放所有元数据 function MetaManager:releaseAllMetas() for _,modname in ipairs(table.keys(self._modules)) do self:releaseMetas(modname) end end --[[ 获得指定的类 modname 模块名 clsname 类名 ]] function MetaManager:getClass(modname, clsname) local module = self._modules[modname] if module then local classobj = module.classes[clsname] if not classobj and module.classipath then local clsconf = indexMgr:readJsonConfig(indexMgr:getIndex(module.classipath .. clsname)) if clsconf then local clsmeta = self:getMeta(modname, clsconf.meta) if clsmeta then classobj = class(clsname .. ":" .. clsmeta:getMetaType(), clsmeta) clsconf.clsname = clsname classobj:clsctor(clsconf) module.classes[clsname] = classobj end end end return classobj end end --[[ 释放模块的类 modname 模块名 preload 是否释放预加载类 ]] function MetaManager:releaseClasses(modname, preload) local module = self._modules[modname] if module then for clsname,classobj in pairs(module.classes) do if not classobj._preload or preload then classobj:clsdtor() -- 类析构 module.classes[clsname] = nil end end end end --[[ 释放所有的类 preload 是否释放预加载类 ]] function MetaManager:releaseAllClasses(preload) for _,modname in ipairs(table.keys(self._modules)) do self:releaseClasses(modname, preload) end end --[[ 获得指定的对象 modname 模块名 objname 对象名 ]] function MetaManager:getObject(modname, objname) local module = self._modules[modname] if module then local object = module.objects[objname] if not object and module.objectipath then local objconf = indexMgr:readJsonConfig(indexMgr:getIndex(module.objectipath .. objname)) if objconf then local objmeta = self:getMeta(modname, objconf.meta) if objmeta then objconf.name = objname object = objmeta:create(objconf) module.objects[objname] = object end end end return object end end --[[ 释放模块的对象 modname 模块名 preload 是否释放预加载对象 ]] function MetaManager:releaseObjects(modname, preload) local module = self._modules[modname] if module then for objname,object in pairs(module.objects) do if not object._preload or preload then object:dtor() -- 对象析构 module.objects[objname] = nil end end end end --[[ 释放所有的对象 preload 是否释放预加载对象 ]] function MetaManager:releaseAllObjects(preload) for _,modname in ipairs(table.keys(self._modules)) do self:releaseObjects(modname, preload) end end --[[ 创建指定类的对象 modname 模块名 metaorcls 元数据类型/类名 ... 创建对象的参数 ]] function MetaManager:createObject(modname, metaorcls, ...) local module = self._modules[modname] if module then if module.classipath then local classobj = self:getClass(modname, metaorcls) if classobj then return classobj:create(...) end else local metaobj = self:getMeta(modname, metaorcls) if metaobj then return metaobj:create(...) end end end end --[[ 预加载指定的类 modname 模块名 clsname 类名 ]] function MetaManager:preloadClass(modname, clsname) self:getClass(modname, clsname)._preload = true end --[[ 获取模块所有类名 modname 模块名 ]] function MetaManager:getAllClasses(modname) local module = self._modules[modname] if module then return table.keys(indexMgr:getIndex(module.classipath)) end end --[[ 加载模块所有类 modname 模块名 ]] function MetaManager:loadAllClasses(modname) for _,clsname in ipairs(self:getAllClasses(modname)) do self:getClass(modname,clsname) end end --[[ 预加载指定的对象 modname 模块名 objname 对象名 ]] function MetaManager:preloadObject(modname,objname) self:getObject(modname,objname)._preload = true end --[[ 获取模块所有对象名 modname 模块名 ]] function MetaManager:getAllObjects(modname) local module = self._modules[modname] if module then return table.keys(indexMgr:getIndex(module.objectipath)) end end --[[ 加载模块所有对象 modname 模块名 ]] function MetaManager:loadAllObjects(modname) for _,objname in ipairs(self:getAllObjects(modname)) do self:getObject(modname, objname) end end -- 输出指定模块状态 function MetaManager:dumpModule(modname, data) local module = self._modules[modname] if module then dump({ module = module, data = data or {} }, modname, 3) end end -- 输出所有模块状态 function MetaManager:dump() dump(self._modules, "MetaManager", 3) end return MetaManager
-- You dont need to set any of these options. These are the default ones. Only -- the loading is important -- require('telescope').setup { -- extensions = { -- fzf = { -- fuzzy = true, -- false will only do exact matching -- override_generic_sorter = true, -- override the generic sorter -- override_file_sorter = true, -- override the file sorter -- case_mode = "smart_case", -- or "ignore_case" or "respect_case" -- -- the default case_mode is "smart_case" -- } -- } -- } require('telescope').load_extension('fzf') require('nvim-treesitter.configs').setup { ensure_installed = { "bash", "css", "dockerfile", "html", "javascript", "json", "lua", "perl", "regex", "ruby", "vim", "yaml" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages highlight = { enable = true }, incremental_selection = { enable = true }, textobjects = { enable = true }, } -- Setup nvim-cmp. local cmp = require'cmp' local lspkind = require('lspkind') cmp.setup({ snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. -- require'snippy'.expand_snippet(args.body) -- For `snippy` users. end, }, mapping = { ['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), ['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), ['<C-y>'] = cmp.config.disable, -- If you want to remove the default `<C-y>` mapping, You can specify `cmp.config.disable` value. ['<C-e>'] = cmp.mapping({ i = cmp.mapping.abort(), c = cmp.mapping.close(), }), ['<CR>'] = cmp.mapping.confirm({ select = true }), }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' }, -- For vsnip users. -- { name = 'luasnip' }, -- For luasnip users. -- { name = 'ultisnips' }, -- For ultisnips users. -- { name = 'snippy' }, -- For snippy users. }, { { name = 'buffer', keyword_length = 3 }, }), formatting = { format = lspkind.cmp_format() }, experimental = { native_menu = false, ghost_text = true, } }) -- Use buffer source for `/`. cmp.setup.cmdline('/', { sources = { { name = 'buffer' } } }) -- Use cmdline & path source for ':'. cmp.setup.cmdline(':', { sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline', keyword_length = 3 } }) }) -- Setup lspconfig. local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) local nvim_lsp = require('lspconfig') local util = require('lspconfig.util') -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end -- Enable completion triggered by <c-x><c-o> buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') -- Mappings. local opts = { noremap=true, silent=true } -- See `:help vim.lsp.*` for documentation on any of the below functions buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts) buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts) buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts) buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts) buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts) buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts) buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts) buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) end -- perlpls requires the `pls` executable: `cpan> install PLS` nvim_lsp.perlpls.setup{} -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches local servers = { 'perlpls', 'solargraph' } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach, flags = { debounce_text_changes = 150, }, capabilities = capabilities } end -- require'lspconfig'.solargraph.setup{ nvim_lsp.solargraph.setup{ -- cmd = { 'solargraph', 'stdio' }, cmd = { 'bundle', 'exec', 'solargraph', 'stdio' }, filetypes = { 'ruby' }, init_options = { formatting = true }, -- root_dir = util.root_pattern('.git'), root_dir = util.root_pattern('Gemfile'), -- TODO: make retrieving this path dynamically -- cmd_cwd = util.root_pattern('Gemfile'), cmd_cwd = os.getenv('HOME')..'/github/open-build-service/src/api', settings = { solargraph = { diagnostics = true, -- logLevel = 'info', -- logLevel = 'debug', -- useBundler = true, -- bundlerPath = '/usr/bin/bundle' } }, on_attach = on_attach, } require('gitsigns').setup()
-- this provides various lua-based utility and state related to key binding INPUTBINDING = { -- these values are indexed at 0, not 1 maxColumn = 4, -- the 5th column (yes there are actually many more columns to bind to) maxPlayer = 1, -- the right player/controller defaultColumn = 2, -- the column which is usually the default internally (in key config this is the 3rd column) } -- get all MenuButtons which can be mapped that are relevant to directions -- function DirectionalMenuButtonsToMap() return { "MenuLeft", "MenuDown", "MenuUp", "MenuRight", } end -- gets all GameButtons or MenuButtons which can be mapped function GetButtonsToMap(isMenu) local bt = {} if isMenu then -- does not include the buttons DirectionalMenuButtonsToMap bt = INPUTMAPPER:GetMenuButtonsToMap() else bt = INPUTMAPPER:GetGameButtonsToMap() end return bt end -- makes sure that if the arrow keys are not bound to gameplay buttons that they are bound to the menu buttons function INPUTBINDING.MakeSureMenuIsNavigable(self) local gb = GetButtonsToMap(false) local mb = DirectionalMenuButtonsToMap() local keys = {"Key_left", "Key_down", "Key_up", "Key_right"} -- is this key bound to a game button -- if its bound to a menu button i do not care. rebind it anyways local function isBound(key) for i = 1, #gb do for bindingColumn = 0, self.maxColumn do if INPUTMAPPER:GetButtonMapping(gb[i], 0, bindingColumn) == key then return true end end end return false end for i = 1, #mb do if not isBound(keys[i]) then INPUTMAPPER:SetInputMap(keys[i], mb[i], self.defaultColumn, 0) end end end -- literally removes every key binding for gameplay or menu -- player 1 and player 2 function INPUTBINDING.RemoveAllKeyBindings(self, isMenu) print("INPUTBINDING RemoveAllKeyBindings - isMenu "..tostring(isMenu)) local bt = GetButtonsToMap(isMenu) for i = 1, #bt do for player = 0, self.maxPlayer do for bindingColumn = 0, self.maxColumn do INPUTMAPPER:SetInputMap("", bt[i], bindingColumn, player) end end end end -- does the above except ignores the default column -- does not set any new defaults, blanks stay blank -- (default should be column 2, the 3rd column) function INPUTBINDING.RemoveDoubleBindings(self, isMenu) print("INPUTBINDING RemoveDoubleBindings - isMenu "..tostring(isMenu)) local bt = GetButtonsToMap(isMenu) local alreadymapped = {} for i = 1, #bt do for player = 0, self.maxPlayer do local b = INPUTMAPPER:GetButtonMapping(bt[i], player, self.defaultColumn) if b == nil then b = "nil" end alreadymapped[#alreadymapped+1] = b end end self:RemoveAllKeyBindings(isMenu) local ind = 1 for i = 1, #bt do for player = 0, self.maxPlayer do local b = alreadymapped[ind] INPUTMAPPER:SetInputMap(b, bt[i], self.defaultColumn, player) ind = ind + 1 end end end -- return whether or not this set of key bindings is missing the defaults -- useful only for this theme where the default column is required to be used function INPUTBINDING.IsAnyDefaultBindingMissing(self, isMenu) local bt = GetButtonsToMap(isMenu) for i = 1, #bt do for p = 0, self.maxPlayer do local buttonmapped = INPUTMAPPER:GetButtonMapping(bt[i], p, self.defaultColumn) if buttonmapped == nil then return false end -- bad end end return true -- okay end
local joyobjs = {} local joys = {} local joys[1] = {} local joys[2] = {} local joys_prev = {} function InitJoysticks() joyobjs[1] = wpilib.Joystick(1) joyobjs[2] = wpilib.Joystick(2) --Initialize all joy buttons to off for k,v in pairs(joys) do for i=1,12 do v[i] = false end end end hook.Add("RobotInit", "InitJoysticks", InitJoysticks) function CheckJoyButtons() joys_prev = joys for b = 1,12 do joy1b[b] = joy1:GetRawButton(b); end for jn,joy in ipairs(joys) do for b,v in ipairs(joy) do if (joys_prev[jn][b] ~= v) then hook.broadcast("JoyPress"..jn.."_"..b) end end end end hook.Add("TeleOpPeriodic", "CheckJoyButtons", CheckJoyButtons) function GetJoyButton(jn, bn) return joys[jn][bn] end function GetJoyAxis(jn,an) return joyobjs[jn]:GetRawAxis(an) end
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor. brackaset_plates = { minimumLevel = 0, maximumLevel = -1, customObjectName = "", directObjectTemplate = "object/tangible/component/armor/armor_segment_enhancement_brackaset.iff", craftingValues = { {"armor_special_type",0,0,0}, {"blasteffectiveness",4,12,10}, {"armor_action_encumbrance",17,6,0}, {"armor_mind_encumbrance",20,5,0}, {"useCount",1,7,0}, }, customizationStringNames = {}, customizationValues = {} } addLootItemTemplate("brackaset_plates", brackaset_plates)
if (settings.startup["k2cp-use-workers"].value) then -- Insert farmers in k2cp-crops category for _, recipe in pairs(data.raw["recipe"]) do if (recipe.category == "k2cp-crops") then table.insert(recipe.ingredients,{"k2cp-farmer", 1}) end end -- Insert workers and scientists for _, recipe in pairs(data.raw["recipe"]) do if not (string.find(recipe.name, "pack")) then if not (recipe.category == "crafting-with-fluid" or recipe.category == "smelting" or recipe.category == "k2cp-crops" or recipe.category == "k2cp-school") then --log("Recipe Name: "..recipe.name) if (recipe.category == "centrifuging" or recipe.category == "chemistry" or recipe.category == "rocket-building") then if (recipe.ingredients) then table.insert(recipe.ingredients,{"k2cp-scientist", 1}) elseif (recipe.normal) then table.insert(recipe.normal.ingredients,{"k2cp-scientist", 1}) if (recipe.expensive) then table.insert(recipe.expensive.ingredients,{"k2cp-scientist", 2}) end end else if (recipe.ingredients) then if not (recipe.name == "k2cp-village" or recipe.name == "k2cp-schoolhouse" or recipe.name == "k2cp-field" or recipe.name == "k2cp-bread" or recipe.name == "k2cp-glass" or recipe.name == "k2cp-warehouse" ) then table.insert(recipe.ingredients,{"k2cp-worker", 1}) end elseif (recipe.normal) then table.insert(recipe.normal.ingredients,{"k2cp-worker", 1}) if (recipe.expensive) then table.insert(recipe.expensive.ingredients,{"k2cp-worker", 2}) end end end end end end -- Insert scientists table.insert(data.raw["recipe"]["automation-science-pack"].ingredients ,{"k2cp-scientist", 1}) table.insert(data.raw["recipe"]["logistic-science-pack"].ingredients ,{"k2cp-scientist", 1}) table.insert(data.raw["recipe"]["military-science-pack"].ingredients ,{"k2cp-scientist", 1}) table.insert(data.raw["recipe"]["chemical-science-pack"].ingredients ,{"k2cp-scientist", 1}) table.insert(data.raw["recipe"]["production-science-pack"].ingredients ,{"k2cp-scientist", 1}) table.insert(data.raw["recipe"]["utility-science-pack"].ingredients ,{"k2cp-scientist", 1}) -- Expand ingredient count in assemblers for _, entity in pairs(data.raw["assembling-machine"]) do entity.ingredient_count = 10 end if (settings.startup["k2cp-research-scientists"].value) then for _, tech in pairs(data.raw["technology"]) do local i = tech.unit.ingredients if (i) then table.insert(i,{"k2cp-scientist", 1}) end end -- Expand ingredient count in labs for _, entity in pairs(data.raw["lab"]) do local e = entity.inputs table.insert(e, "k2cp-scientist") end end else data.raw["recipe"]["k2cp-village"].enabled = false data.raw["recipe"]["k2cp-warehouse"].enabled = false data.raw["recipe"]["k2cp-schoolhouse"].enabled = false data.raw["recipe"]["k2cp-farmer"].enabled = false data.raw["recipe"]["k2cp-worker"].enabled = false data.raw["recipe"]["k2cp-scientist"].enabled = false end
local vim = vim local M = {} local defaults = { highlight_hovered_item = true, show_guides = true, position = 'right', auto_preview = false, -- experimental keymaps = { close = "<Esc>", goto_location = "<Cr>", focus_location = "o", hover_symbol = "<C-space>", rename_symbol = "r", code_actions = "a" }, lsp_blacklist = {} } M.options = {} function M.get_position_navigation_direction() if M.options.position == 'left' then return 'h' else return 'l' end end function M.get_split_command() if M.options.position == 'left' then return "topleft vs" else return "botright vs" end end local function has_value(tab, val) for _, value in ipairs(tab) do if value == val then return true end end return false end function M.is_client_blacklisted(client_id) local client = vim.lsp.get_client_by_id(client_id) return has_value(M.options.lsp_blacklist, client.name) end function M.setup(options) M.options = vim.tbl_deep_extend("force", {}, defaults, options or {}) end return M
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("moonpie.utility.read_only_table", function() local readOnlyTable = require "moonpie.utility.read_only_table" it("can make a table immutable", function() local tbl = { a = 1, b = 2, c = "SOMETHING" } local ro = readOnlyTable(tbl) assert.equals(1, ro.a) assert.equals(2, ro.b) assert.equals("SOMETHING", ro.c) assert.has_errors(function() ro.d = 323 end) end) end)
function onCreate() -- background shit makeLuaSprite('disruptor', 'disruptor', -400, -200); setLuaSpriteScrollFactor('disruptor', 0, 0); scaleObject('disruptor', 1, 1) addLuaSprite('disruptor', false); makeLuaSprite('disruptor2', 'disruptor2', -900, -1000); setLuaSpriteScrollFactor('disruptor2', 0, 0); scaleObject('disruptor2', 2, 2) addLuaSprite('disruptor2', false); close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage end
-- Autogenerated from KST: please remove this line if doing any edits by hand! local luaunit = require("luaunit") require("process_repeat_bytes") TestProcessRepeatBytes = {} function TestProcessRepeatBytes:test_process_repeat_bytes() local r = ProcessRepeatBytes:from_file("src/process_xor_4.bin") luaunit.assertEquals(r.bufs[1], "\114\037\061\138\020") luaunit.assertEquals(r.bufs[2], "\074\082\170\016\068") end
if GetLocale() ~= "esES" and GetLocale() ~= "esMX" then return end local _, addon = ... local L = addon.L
a={} if a.k then print(1) end
----------------------------------------- -- ID: 4988 -- Scroll of Armys Paeton III -- Teaches the song Armys Paeton III ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(380) end function onItemUse(target) target:addSpell(380) end
object_mobile_dressed_tatooine_entha_ankwee = object_mobile_shared_dressed_tatooine_entha_ankwee:new { } ObjectTemplates:addTemplate(object_mobile_dressed_tatooine_entha_ankwee, "object/mobile/dressed_tatooine_entha_ankwee.iff")
-- below functions are taken from MMExtension repo, as they're not released yet and I don't feel like writing my own saving function, because I might screw something up -- Saves a string into a file (overwrites it) function io.save(path, s, translate) local f = assert(io.open(path, translate and "wt" or "wb")) f:setvbuf("no") f:write(s) f:close() end local path_noslash = _G.path.noslash local path_dir = _G.path.dir local CreateDirectoryPtr = internal.CreateDirectory local function DoCreateDir(dir) -- 183 = already exists return mem.call(CreateDirectoryPtr, 0, dir, 0) ~= 0 end local function CreateDirectory(dir) dir = path_noslash(dir) if dir == "" or #dir == 2 and string_sub(dir, -1) == ":" or DoCreateDir(dir) then return true end local dir1 = path_dir(dir) if dir1 ~= dir then CreateDirectory(dir1) end return true end _G.os.mkdir = CreateDirectory --!- backwards compatibility _G.os.CreateDirectory = CreateDirectory --!- backwards compatibility _G.path.CreateDirectory = CreateDirectory local oldSave = _G.io.save --!- function _G.io.save(path, ...) CreateDirectory(path_dir(path)) return oldSave(path, ...) end local function WriteBasicTextTable(t, fname) if fname then return io.save(fname, WriteBasicTextTable(t)) end local q, s = {}, '' for i = 1, #t do s = (type(t[i]) == "table" and table.concat(t[i], "\t") or t[i]) q[i] = s end if s ~= '' then q[#q + 1] = '' end return table.concat(q, "\r\n") end _G.WriteBasicTextTable = WriteBasicTextTable -- end of functions taken from MMExtension repo local rev4 = LoadBasicTextTable("tab\\Hostile rev4.txt", 0) local merge = LoadBasicTextTable("tab\\Hostile merge.txt", 0) local changed = { ["Dragon"] = "ADragon", ["Gog"] = "AGog", ["Minotaur"] = "AMinotaur", ["Wyvern"] = "AWyvern", ["Troll"] = "ATroll", ["Blaster"] = "zBlasterGuy", ["Mega"] = "zUltra Dragon", ["Shark"] = "Sea Monster" } local MM7StartMerge = 69 local MM7EndMerge = 156 -- http://lua-users.org/wiki/StringTrim local function trim(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end for row = 3, #rev4 do for col = 3, #rev4 do if rev4[row][col] == "" or rev4[row][col] == nil then break end local entryrev4 = rev4[row][col] local entry2rev4 = rev4[col][row] local name = trim(rev4[row][1]) local rowmerge = MM7StartMerge + (row - 3) local colmerge = MM7StartMerge + (col - 3) local namemerge = trim(merge[rowmerge][1]) if name ~= namemerge and (changed[name] == nil or changed[name] ~= namemerge) then --print(("Found name mismatch at positions <%d, %d> rev4, <%d, %d> merge (rev4 name: %s, merge name: %s)."):format(row, col, rowmerge, colmerge, name, namemerge)) goto continueinner end local entrymerge = merge[rowmerge][colmerge] local entry2merge = merge[colmerge][rowmerge] if entryrev4 ~= entrymerge then print(("Found mismatch at positions <%d, %d> rev4, <%d, %d> merge (rev4 name: %s) (rev4 value: %s, merge value: %s)."):format(row, col, rowmerge, colmerge, name, entryrev4, entrymerge)) merge[rowmerge][colmerge] = rev4[row][col] end if entry2rev4 ~= entry2merge then print(("Found mismatch at positions <%d, %d> rev4, <%d, %d> merge (rev4 name: %s) (rev4 value: %s, merge value: %s)."):format(col, row, colmerge, rowmerge, name, entryrev4, entrymerge)) merge[colmerge][rowmerge] = rev4[col][row] end ::continueinner:: end end WriteBasicTextTable(merge, "tab\\Hostile merge processed.txt")
Gui = Instance.new("ScreenGui", game.CoreGui) Button = Instance.new("TextButton", Gui) Button.Size = UDim2.new(0, 100, 0, 40) Button.BackgroundTransparency = 0.7 Button.Position = UDim2.new(0.003, 0, 0.93, 0) Button.Text = "Enable Noclip" Button.TextColor3 = Color3.new(255, 255, 255) noclip = false game:GetService('RunService').Stepped:connect(function() if noclip then game.Players.LocalPlayer.Character.Humanoid:ChangeState(11) end end) Button.MouseButton1Down:connect(function() noclip = not noclip if Button.Text == "Enable Noclip" then Button.Text = "Disable Noclip" else Button.Text = "Enable Noclip" end end)
-- -- Skydark theme -- local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") local dpi = xresources.apply_dpi local theme_path = "~/.config/awesome/themes/skydark/" local theme = {} -- -- Colors -- theme.nord0 = "#2E3440" theme.nord1 = "#3B4252" theme.nord2 = "#434C5E" theme.nord3 = "#4C566A" theme.nord4 = "#D8DEE9" theme.nord5 = "#E5E9F0" theme.nord6 = "#ECEFF4" theme.nord7 = "#8FBCBB" theme.nord8 = "#88C0D0" theme.nord9 = "#81A1C1" theme.nord10 = "#5E81AC" theme.nord11 = "#BF616A" theme.nord12 = "#D08770" theme.nord13 = "#EBCB8B" theme.nord14 = "#A3BE8C" theme.nord15 = "#B48EAD" -- -- Global theme settings -- theme.icon_theme = nil theme.font = "SF Pro Text Semibold 11" theme.transparent = "#00000000" theme.wallpaper = theme_path .. "wallpaper.jpg" theme.background = theme.nord0 theme.bg_normal = theme.nord0 theme.bg_focus = theme.bg_normal theme.bg_urgent = theme.bg_normal theme.bg_minimize = theme.bg_normal theme.bg_systray = theme.bg_normal theme.fg_normal = theme.nord4 theme.fg_focus = theme.fg_normal theme.fg_urgent = theme.fg_normal theme.fg_minimize = theme.fg_normal theme.useless_gap = dpi(6) theme.border_width = dpi(3) theme.border_focus = theme.bg_normal theme.border_normal = theme.bg_normal theme.border_marked = theme.nord11 theme.tasklist_bg_focus = theme.nord0 theme.tasklist_icon_size = dpi(5) theme.tasklist_plain_task_name = true theme.taglist_spacing = dpi(5) -- -- Awesome menu -- theme.menu_font = "SF Pro Text Regular 12" theme.menu_submenu_icon = theme_path .. "submenu.png" theme.menu_border_width = dpi(0) theme.menu_height = dpi(24) theme.menu_width = dpi(140) -- -- Awesome icon -- theme.awesome_icon = theme_assets.awesome_icon( theme.menu_height, theme.bg_focus, theme.fg_focus ) -- -- Tasklist -- theme.taglist_text_font = "SF Pro Text Semibold 18" theme.taglist_text_empty = {"󰝦", "󰝦", "󰝦", "󰝦", "󰝦", "󰝦", "󰝦", "󰝦", "󰝦"} theme.taglist_text_occupied = {"󰀚", "󰀚", "󰀚", "󰀚", "󰀚", "󰀚", "󰀚", "󰀚", "󰀚"} theme.taglist_text_focused = {"󰄯", "󰄯", "󰄯", "󰄯", "󰄯", "󰄯", "󰄯", "󰄯", "󰄯"} theme.taglist_text_urgent = {"󰁪", "󰁪", "󰁪", "󰁪", "󰁪", "󰁪", "󰁪", "󰁪", "󰁪"} theme.taglist_bg_focus = theme.bg_normal theme.taglist_fg_focus = theme.nord13 theme.taglist_bg_occupied = theme.bg_normal theme.taglist_fg_occupied = theme.nord14 theme.taglist_bg_empty = theme.bg_normal theme.taglist_fg_empty = theme.nord9 theme.taglist_bg_urgent = theme.bg_normal theme.taglist_fg_urgent = theme.nord11 -- -- Wibar -- theme.wibar_height = dpi(35) theme.wibar_margin = dpi(10) theme.wibar_spacing = dpi(10) theme.systray_icon_size = dpi(28) -- -- Widgets -- theme.widget_volumebar_height = 7 theme.widget_volumebar_width = 80 -- -- Titlebar buttons -- theme.titlebar_close_button_normal = theme_path .. "titlebar/close_normal.png" theme.titlebar_close_button_focus = theme_path .. "titlebar/close_focus.png" theme.titlebar_minimize_button_normal = theme_path .. "titlebar/minimize_normal.png" theme.titlebar_minimize_button_focus = theme_path .. "titlebar/minimize_focus.png" theme.titlebar_maximized_button_normal_active = theme_path .. "titlebar/maximized_normal.png" theme.titlebar_maximized_button_normal_inactive = theme_path .. "titlebar/maximized_normal.png" theme.titlebar_maximized_button_focus_active = theme_path .. "titlebar/maximized_focus.png" theme.titlebar_maximized_button_focus_inactive = theme_path .. "titlebar/maximized_focus.png" theme.titlebar_ontop_button_normal_inactive = theme_path .. "titlebar/ontop_normal_inactive.png" theme.titlebar_ontop_button_focus_inactive = theme_path .. "titlebar/ontop_focus_inactive.png" theme.titlebar_ontop_button_normal_active = theme_path .. "titlebar/ontop_normal_active.png" theme.titlebar_ontop_button_focus_active = theme_path .. "titlebar/ontop_focus_active.png" theme.titlebar_sticky_button_normal_inactive = theme_path .. "titlebar/sticky_normal_inactive.png" theme.titlebar_sticky_button_focus_inactive = theme_path .. "titlebar/sticky_focus_inactive.png" theme.titlebar_sticky_button_normal_active = theme_path .. "titlebar/sticky_normal_active.png" theme.titlebar_sticky_button_focus_active = theme_path .. "titlebar/sticky_focus_active.png" theme.titlebar_floating_button_normal_inactive = theme_path .. "titlebar/floating_normal_inactive.png" theme.titlebar_floating_button_focus_inactive = theme_path .. "titlebar/floating_focus_inactive.png" theme.titlebar_floating_button_normal_active = theme_path .. "titlebar/floating_normal_active.png" theme.titlebar_floating_button_focus_active = theme_path .. "titlebar/floating_focus_active.png" -- -- Layout icons -- theme.layout_fairh = theme_path.."layouts/fairhw.png" theme.layout_fairv = theme_path.."layouts/fairvw.png" theme.layout_floating = theme_path.."layouts/floatingw.png" theme.layout_magnifier = theme_path.."layouts/magnifierw.png" theme.layout_max = theme_path.."layouts/maxw.png" theme.layout_fullscreen = theme_path.."layouts/fullscreenw.png" theme.layout_tilebottom = theme_path.."layouts/tilebottomw.png" theme.layout_tileleft = theme_path.."layouts/tileleftw.png" theme.layout_tile = theme_path.."layouts/tilew.png" theme.layout_tiletop = theme_path.."layouts/tiletopw.png" theme.layout_spiral = theme_path.."layouts/spiralw.png" theme.layout_dwindle = theme_path.."layouts/dwindlew.png" theme.layout_cornernw = theme_path.."layouts/cornernww.png" theme.layout_cornerne = theme_path.."layouts/cornernew.png" theme.layout_cornersw = theme_path.."layouts/cornersww.png" theme.layout_cornerse = theme_path.."layouts/cornersew.png" return theme
local M = {} function M.config() local home = os.getenv('HOME') g.dashboard_footer_icon = ' 🐬 ' g.dashboard_default_executive = 'telescope' g.dashboard_session_directory = sessiondir -- g.dashboard_preview_command = 'figlet -f "3d" "Dashboard"' g.dashboard_preview_command = '/bin/cat' g.dashboard_preview_pipeline = 'lolcat' -- g.dashboard_preview_file = home .. '/.config/bbenzikry/resources/images/neovim.png' -- g.dashboard_preview_file = home .. '/neovim.sixel' g.dashboard_preview_file = home .. '/.config/nvim/static/neovim.cat' g.dashboard_preview_file_height = 10 g.dashboard_preview_file_width = 300 -- g.dashboard_custom_section = { -- a = { -- description = {' Start / Load Session '}, -- command = 'Prosession .' -- }, -- b = { -- description = {' Recently Opened Files '}, -- command = 'Telescope oldfiles' -- }, -- c = { -- description = {' Find File '}, -- command = 'Telescope find_files find_command=rg,--hidden,--files' -- }, -- e = { -- description = {' Find Word '}, -- command = 'Telescope live_grep' -- } -- -- f = { -- -- description = {' Marks '}, -- -- command = 'Telescope marks' -- -- } -- } -- g.dashboard_custom_footer = {"[ ]"} end return M
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local resources = include( "resources" ) local animmgr = include( "anim-manager" ) local cdefs = include( "client_defs" ) local util = include( "modules/util" ) local simdefs = include( "sim/simdefs" ) local cdefs = include( "client_defs" ) ----------------------------------------------------- -- Local local wall_rig = class( ) function wall_rig:init( boardRig, x1, y1, simdir_1, wallVBO ) local N,E,S,W = simdefs.DIR_N, simdefs.DIR_E, simdefs.DIR_S, simdefs.DIR_W local x2, y2 = x1, y1 local simdir_2 if simdir_1 == E then x2 = x1+1 simdir_2 = W elseif simdir_1 == N then y2 = y1+1 simdir_2 = S else assert( false ) end local cellviz_1 = boardRig:getClientCellXY( x1, y1 ) local geoOffsets_1 = cellviz_1._wallGeoInfo or {} table.insert( cellviz_1._dependentRigs, self ) local cellviz_2 = boardRig:getClientCellXY( x2, y2 ) local geoOffsets_2 = cellviz_2._wallGeoInfo or {} table.insert( cellviz_2._dependentRigs, self ) self._boardRig = boardRig self._x1, self._y1 = x1, y1 self._x2, self._y2 = x2, y2 self._game = boardRig._game self._layer = boardRig:getLayer() local wallUV1 = (cellviz_1.tileIndex and cdefs.MAPTILES[ cellviz_1.tileIndex ].zone.wallUV) or cdefs.WALL_EXTERNAL local wallUV2 = (cellviz_2.tileIndex and cdefs.MAPTILES[ cellviz_2.tileIndex ].zone.wallUV) or cdefs.WALL_EXTERNAL local zx, zy = boardRig:cellToWorld( -0.5, -0.5 ) local pieces = {} table.insert( pieces, { x = x1, y = y1, geoOffsets = geoOffsets_1[simdir_1], UVInfo = wallUV1 } ) table.insert( pieces, { x = x2, y = y2, geoOffsets = geoOffsets_2[simdir_2], UVInfo = wallUV2 } ) local mt = MOAIMultiTexture.new() mt:reserve( 2 ) mt:setTexture( 1, cdefs.WALLTILES_FILE ) mt:setTexture( 2, self._game.shadow_map ) for _,piece in pairs(pieces) do local mesh = MOAIMesh.new() mesh:setTexture( mt ) mesh:setVertexBuffer( wallVBO ) mesh:setPrimType( MOAIMesh.GL_TRIANGLES ) mesh:setElementOffset( 0 ) mesh:setElementCount( 0 ) local prop = MOAIProp.new() prop:setDeck( mesh ) prop:setShader( MOAIShaderMgr.getShader( MOAIShaderMgr.WALL_SHADER ) ) prop:setDepthTest( false ) prop:setDepthMask( false ) prop:setCullMode( MOAIProp.CULL_NONE ) prop:setLoc( zx, zy ) self:setUVTransform( prop, piece.UVInfo ) self._layer:insertProp( prop ) piece.prop = prop piece.mesh = mesh end pieces[1].prop:setDebugName( string.format("wall-%d-%d-%d", x1, y1, simdir_1 )) pieces[2].prop:setDebugName( string.format("wall-%d-%d-%d", x2, y2, simdir_2 )) local cx, cy = boardRig:cellToWorld( (x1+x2)/2, (y1+y2)/2 ) local W, H = self._game:getWorldSize() cx = cx - zx cy = cy - zy -- Omg this is magic. These values are dependent on two things: -- (1) Walls joining at an intersection should not overlap. -- (2) Walls should not overlap with wall-decor bounds (which are tuned in animdefs to be SLIGHTLY in front of the wall) local THICKNESS, WIDTH = 1, 13.3 if simdir_1 == E then pieces[1].prop:setWorldBounds( -THICKNESS + cx, -WIDTH + cy, 0, 0 + cx, WIDTH + cy, 64 ) pieces[2].prop:setWorldBounds( cx, -WIDTH + cy, 0, THICKNESS + cx, WIDTH + cy, 64 ) elseif simdir_1 == W then pieces[1].prop:setWorldBounds( 0 + cx, -WIDTH + cy, 0, THICKNESS + cx, WIDTH + cy, 64 ) pieces[2].prop:setWorldBounds( -THICKNESS + cx, -WIDTH + cy, 0, 0 + cx, WIDTH + cy, 64 ) elseif simdir_1 == N then pieces[1].prop:setWorldBounds( -WIDTH + cx, -THICKNESS + cy, 0, WIDTH + cx, 0 + cy, 64 ) pieces[2].prop:setWorldBounds( -WIDTH + cx, 0 + cy, 0, WIDTH + cx, THICKNESS + cy, 64 ) elseif simdir_1 == S then pieces[1].prop:setWorldBounds( -WIDTH + cx, 0 + cy, 0, WIDTH + cx, THICKNESS + cy, 64 ) pieces[2].prop:setWorldBounds( -WIDTH + cx, -THICKNESS + cy, 0, WIDTH + cx, 0 + cy, 64 ) end self._pieces = pieces end function wall_rig:setUVTransform( prop, uvInfo ) local u,v,U,V = unpack( uvInfo ) local uvTransform = MOAITransform.new() uvTransform:setScl( 1,1 ) uvTransform:addLoc( 0,0 ) prop:setUVTransform( uvTransform ) end function wall_rig:setRenderFilter( x, y, filter ) local rf = cdefs.RENDER_FILTERS[filter] for _,piece in pairs( self._pieces ) do if rf and piece.x == x and piece.y == y then self:setShader( piece.prop, rf.shader, rf.r, rf.g, rf.b, rf.a, rf.lum ) elseif piece.x ==x and piece.y == y then self:setShader( piece.prop ) end end end function wall_rig:setShader( prop, type, r, g, b, a, l ) prop:setShader( MOAIShaderMgr.getShader( MOAIShaderMgr.WALL_SHADER) ) local uniforms = prop:getShaderUniforms() uniforms:setUniformColor( "Modulate", r, g, b, a ) uniforms:setUniformFloat( "Luminance", l ) uniforms:setUniformFloat( "Opacity", 1 ) uniforms:setUniformInt( "Type", type and type or 0 ) end function wall_rig:getLocation1() return self._x1, self._y1 end function wall_rig:getLocation2() return self._x2, self._y2 end function wall_rig:refreshRenderFilterHelper( x, y ) local gfxOptions = self._game:getGfxOptions() local cell = self._boardRig:getLastKnownCell( x, y ) local render_filter = (gfxOptions.bMainframeMode or gfxOptions.bTacticalView) and "default" or "shadowlight" self:setRenderFilter( x, y, render_filter ) end function wall_rig:refreshRenderFilter() self:refreshRenderFilterHelper( self:getLocation1() ) self:refreshRenderFilterHelper( self:getLocation2() ) end function wall_rig:destroy() for _,piece in pairs( self._pieces ) do self._layer:removeProp( piece.prop ) end self._pieces = nil end function wall_rig:generateTooltip( ) end function wall_rig:refreshProp() -- Determine if wall should be rendered half-size and/or transparently. local gfxOptions = self._game:getGfxOptions() local offsetIdx if gfxOptions.bMainframeMode then offsetIdx = "mainframe" elseif gfxOptions.bTacticalView then offsetIdx = "tactical" else offsetIdx = "normal" end local bShortWallMode = gfxOptions.bShortWallMode local camera_orientation = self._boardRig._game:getCamera():getOrientation() local cell = self._boardRig:getLastKnownCell( self:getLocation1() ) or self._boardRig:getLastKnownCell( self:getLocation2() ) if self._boardRig._game.simCore._showOutline then local cell1 = self._boardRig._game.simCore:getCell( self:getLocation1() ) local cell2 = self._boardRig._game.simCore:getCell( self:getLocation2() ) if not cell and (not cell1 or not cell2) then cell = true offsetIdx = "tactical" end end if cell then local uvInfoOverload if offsetIdx == 'mainframe' then uvInfoOverload = cdefs.WALL_MAINFRAME end for _,piece in pairs(self._pieces) do local prop, mesh = piece.prop, piece.mesh local offset,count = 0, 0 if piece.geoOffsets and piece.geoOffsets[offsetIdx] then offset,count = unpack( piece.geoOffsets[offsetIdx] ) end --if offsetIdx == "normal" then offset,count = 0,0 end mesh:setElementOffset( offset ) mesh:setElementCount( count ) self:setUVTransform( prop, uvInfoOverload or piece.UVInfo ) if offsetIdx ~= 'mainframe' and (gfxOptions.bShortWallMode or gfxOptions.bTacticalView) then prop:setScl(1,1,cdefs.SHORT_WALL_SCALE) else prop:setScl(1,1,1) end prop:setVisible( count > 0 ) prop:scheduleUpdate() end else for _,piece in pairs(self._pieces) do local prop, mesh = piece.prop, piece.mesh mesh:setElementOffset( 0 ) mesh:setElementCount( 0 ) prop:setVisible( false ) prop:scheduleUpdate() end end self:refreshRenderFilter() end function wall_rig:refresh( ) self:refreshProp() end ----------------------------------------------------- -- Interface functions return wall_rig
--wifi.setmode(wifi.STATION)wifi.sta.config("SSID","KEY")wifi.sta.autoconnect(1) local hostname,pwd=wifi.ap.getconfig() wifi.sta.sethostname(hostname) print("Trying ", wifi.sta.getconfig(),"\n...wait 1 second or tmr.stop(0)") tmr.alarm(0, 1000, 1, function() if wifi.sta.getip() then tmr.stop(0) if mdns then mdns.register(hostname,{service="http",port=80})end print(wifi.sta.getip(),hostname) bcast=require("httpd")(nil,pwd,nil,function(msg)return msg and uart.write(0,msg)or"connected"end) --tmr.alarm(5,2500,1,function()bcast(""..node.heap())end) uart.on("data",1,bcast,1) end end)
deathspeaker_xunra_bhamukas_mental_presence = class({}) function deathspeaker_xunra_bhamukas_mental_presence:OnSpellStart() local victim = GetRandomHeroEntities(1) if not victim then return end victim = victim[1] local victim_loc = victim:GetAbsOrigin() --- Get Caster, Victim, Player, Point --- local caster = self:GetCaster() local caster_loc = caster:GetAbsOrigin() local playerID = caster:GetPlayerOwnerID() local player = PlayerResource:GetPlayer(playerID) local team = caster:GetTeamNumber() --- Get Special Values --- local AbilityCastRange = self:GetSpecialValueFor("AbilityCastRange") local AoERadius = self:GetSpecialValueFor("AoERadius") local damage = self:GetSpecialValueFor("damage") local delay = self:GetSpecialValueFor("delay") caster:AddNewModifier(caster, self, "casting_modifier", {duration = delay/2}) -- Sound and Animation -- local sound = {"outworld_destroyer_odest_move_10", "outworld_destroyer_odest_attack_03", "outworld_destroyer_odest_move_08", "outworld_destroyer_odest_attack_05"} EmitAnnouncerSound( sound[RandomInt(1, #sound)] ) local loc_start = GetRandomBorderPoint() local loc_forward = ( victim_loc - loc_start ):Normalized() local loc_end = loc_start + ( loc_forward * AbilityCastRange ) EncounterGroundLineWarning(caster, AoERadius, AoERadius, loc_start, loc_forward, AbilityCastRange, delay+0.1) StartSoundEventFromPositionReliable("Hero_Terrorblade.Metamorphosis", loc_start) local unit = CreateUnitByName("dummy", loc_start, true, nil, nil, DOTA_TEAM_BADGUYS) PersistentUnit_Add(unit) unit:AddNewModifier(caster, self, "modifier_invulnerable", {}) unit:AddNewModifier(caster, self, "modifier_unselectable", {}) unit:AddNewModifier(caster, self, "modifier_phased", {}) TurnToLoc(unit, loc_end, 0.1) local particle local timer = Timers:CreateTimer(0.1, function() -- Particle -- PATTACH_ABSORIGIN-PATTACH_ABSORIGIN_FOLLOW-PATTACH_CUSTOMORIGIN particle = ParticleManager:CreateParticle("particles/econ/items/chaos_knight/chaos_knight_ti7_shield/chaos_knight_ti7_reality_rift.vpcf", PATTACH_CUSTOMORIGIN, nil) ParticleManager:SetParticleControl( particle, 1, unit:GetAbsOrigin() ) ParticleManager:SetParticleControl( particle, 2, unit:GetAbsOrigin() ) ParticleManager:SetParticleControlOrientation( particle, 1, unit:GetForwardVector(), unit:GetRightVector(), unit:GetUpVector() ) ParticleManager:SetParticleControlOrientation( particle, 2, unit:GetForwardVector(), unit:GetRightVector(), unit:GetUpVector() ) PersistentParticle_Add(particle) end) local timer = Timers:CreateTimer(delay, function() ParticleManager:DestroyParticle( particle, false ) ParticleManager:ReleaseParticleIndex( particle ) particle = nil -- Particle -- PATTACH_ABSORIGIN-PATTACH_ABSORIGIN_FOLLOW-PATTACH_CUSTOMORIGIN local particle = ParticleManager:CreateParticle("particles/encounter/deathspeaker_xunra/deathspeaker_xunra_bhamukas_mental_presence_lightning.vpcf", PATTACH_CUSTOMORIGIN, nil) ParticleManager:SetParticleControl( particle, 0, loc_start ) ParticleManager:SetParticleControl( particle, 1, loc_end ) ParticleManager:ReleaseParticleIndex( particle ) particle = nil -- DOTA_UNIT_TARGET_TEAM_FRIENDLY; DOTA_UNIT_TARGET_TEAM_ENEMY; DOTA_UNIT_TARGET_TEAM_BOTH local units = FindUnitsInLine(team, loc_start, loc_end, nil, AoERadius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_NONE) for _,victim in pairs(units) do -- Apply Damage -- EncounterApplyDamage(victim, caster, self, damage, DAMAGE_TYPE_MAGICAL, DOTA_DAMAGE_FLAG_NONE) end end) PersistentTimer_Add(timer) end function deathspeaker_xunra_bhamukas_mental_presence:OnAbilityPhaseStart() local caster = self:GetCaster() local playerID = caster:GetPlayerOwnerID() local player = PlayerResource:GetPlayer(playerID) return true end function deathspeaker_xunra_bhamukas_mental_presence:GetManaCost(abilitylevel) return self.BaseClass.GetManaCost(self, abilitylevel) end function deathspeaker_xunra_bhamukas_mental_presence:GetCooldown(abilitylevel) return self.BaseClass.GetCooldown(self, abilitylevel) end
-- npm i -g pyright require'lspconfig'.pyright.setup { cmd = {DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver", "--stdio"}, on_attach = require'lsp'.common_on_attach, handlers = { ["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { virtual_text = O.lang.python.diagnostics.virtual_text, signs = O.lang.python.diagnostics.signs, underline = O.lang.python.diagnostics.underline, update_in_insert = true }) }, settings = { python = { analysis = { typeCheckingMode = O.lang.python.analysis.type_checking, autoSearchPaths = O.lang.python.analysis.auto_search_paths, useLibraryCodeForTypes = O.lang.python.analysis.use_library_code_types } } } }
local KEY_BINDS = {} function createKeyBindContainerForResource(resource) KEY_BINDS[resource] = {} end function createBindKeyFunctionForResource(resource) return (function(...) local args = {...} if isClient() then local key = table.remove(args,1) local keyState = table.remove(args,1) local handlerFunction = table.remove(args,1) local arguments = args if type(key) ~= "string" or type(keyState) ~= "string" or (type(handlerFunction) ~= "string" and type(handlerFunction) ~= "function") then return false end args = {key, keyState, handlerFunction, unpack(arguments)} else local thePlayer = table.remove(args,1) local key = table.remove(args,1) local keyState = table.remove(args,1) local handlerFunction = table.remove(args,1) local arguments = args if not isElement(thePlayer) or getElementType(thePlayer) ~= "player" or type(key) ~= "string" or type(keyState) ~= "string" or (type(handlerFunction) ~= "string" and type(handlerFunction) ~= "function") then return false end args = {thePlayer, key, keyState, handlerFunction, unpack(arguments)} end if bindKey(unpack(args)) then table.insert(KEY_BINDS[resource],args) return true end return false end) end function createUnbindKeyFunctionForResource(resource) return (function(...) local args = {...} local isClient = isClient() if isClient then local key = table.remove(args,1) local keyState = table.remove(args,1) local handlerFunction = table.remove(args,1) if type(key) ~= "string" then return false end keyState = type(keyState) == "string" and keyState or nil handlerFunction = (type(handlerFunction) == "string" or type(handlerFunction) == "function") and handlerFunction or nil args = {key, keyState, handlerFunction} else local thePlayer = table.remove(args,1) local key = table.remove(args,1) local keyState = table.remove(args,1) local handlerFunction = table.remove(args,1) if not isElement(thePlayer) or getElementType(thePlayer) ~= "player" or type(key) ~= "string" then return false end keyState = type(keyState) == "string" and keyState or nil handlerFunction = (type(handlerFunction) == "string" or type(handlerFunction) == "function") and handlerFunction or nil args = {thePlayer, key, keyState, handlerFunction} end local success = false for index,keyData in ipairs(KEY_BINDS[resource]) do if (isClient and keyData[1] == args[1] and (not args[2] or args[2] == keyData[2]) and (not args[3] or args[3] == keyData[3])) or (not isClient and keyData[1] == args[1] and keyData[2] == args[2] and (not args[3] or args[3] == keyData[3]) and (not args[4] or args[4] == keyData[4])) then if unbindKey(unpack(keyData)) then table.remove(KEY_BINDS[resource],index) success = true end end end return success end) end function cleanKeyBindContainerForResource(resource) for index,keyData in ipairs(KEY_BINDS[resource]) do unbindKey(unpack(keyData)) end KEY_BINDS[resource] = nil end
function unsitInHelicopter(vehicle) local seat = getElementData(source, "seat") if (isElement(vehicle)) then if not (getElementType(vehicle)=="vehicle") then local vehicles = exports.mrp_pool:getPoolElementsByType("vehicle") local helicopters = { } for key, value in ipairs(vehicles) do if (getElementModel(value)==497) or (getElementModel(value)==563) then table.insert(helicopters, value) end end for key, value in ipairs(helicopters) do local players = getElementData(value, "players") if (players) then local removed = false for key, value in ipairs(players) do if (value==source) then removed = true table.remove(players, key) end end if (removed) then exports.mrp_anticheat:changeProtectedElementDataEx(value, "players", players, true) end end end exports.mrp_anticheat:changeProtectedElementDataEx(source, "seat") detachElements(source, vehicle) exports.mrp_global:removeAnimation(source) elseif (seat) and (seat>0) then local players = getElementData(vehicle, "players") for key, value in ipairs(players) do if (value==source) then table.remove(players, key) end end exports.mrp_anticheat:changeProtectedElementDataEx(vehicle, "players", players, true) exports.mrp_anticheat:changeProtectedElementDataEx(source, "seat") detachElements(source, vehicle) exports.mrp_global:removeAnimation(source) end end end addEvent("unsitInHelicopter", true) addEventHandler("unsitInHelicopter", getRootElement(), unsitInHelicopter) function sitInHelicopter(vehicle) local players = getElementData(vehicle, "players") if (not players) or (#players<3) then local seat = 0 if not (players) then players = { } seat = 1 end local s1 = false local s2 = false local s3 = false for key, value in ipairs(players) do if (key==1) then s1 = true elseif (key==2) then s2 = true elseif (key==3) then s3 = true end end if not (s1) then seat = 1 local x, y, z = getElementPosition(vehicle) local rx, ry, rz = getVehicleRotation(vehicle) x = x - math.sin(math.rad(rz))*1.01 y = y - math.cos(math.rad(rz))*1.01 attachElements(source, vehicle, -1.3, 0, 0) setPedRotation(source, rz+90) exports.mrp_global:applyAnimation(source, "FOOD", "FF_Sit_Look", 999999, true, true, false) setPedWeaponSlot(source, 5) elseif not (s2) then seat = 2 local x, y, z = getElementPosition(vehicle) local rx, ry, rz = getVehicleRotation(vehicle) x = x + math.sin(math.rad(rz))*1.01 y = y + math.cos(math.rad(rz))*1.01 attachElements(source, vehicle, 1.3, 0, 0) setPedRotation(source, rz-90) exports.mrp_global:applyAnimation(source, "FOOD", "FF_Sit_Look", 999999, true, true, false) setPedWeaponSlot(source, 5) elseif not (s3) then seat = 3 local x, y, z = getElementPosition(vehicle) local rx, ry, rz = getVehicleRotation(vehicle) x = x + math.sin(math.rad(rz))*1.01 y = y + math.cos(math.rad(rz))*1.01 attachElements(source, vehicle, 1.3, 1, 0) setPedRotation(source, rz-90) exports.mrp_global:applyAnimation(source, "FOOD", "FF_Sit_Look", 999999, true, true, false) setPedWeaponSlot(source, 5) end players[seat] = source exports.mrp_anticheat:changeProtectedElementDataEx(source, "seat", seat) exports.mrp_anticheat:changeProtectedElementDataEx(vehicle, "players", players, true) else outputChatBox("This helicopter is full.", source, 255, 0, 0) end end addEvent("sitInHelicopter", true) addEventHandler("sitInHelicopter", getRootElement(), sitInHelicopter)
local awful = require("awful") local gears = require("gears") local M = {} local buttons = gears.table.join( awful.button({ }, 1, function (c) if c == client.focus then c.minimized = true else c:emit_signal( "request::activate", "tasklist", { raise = true } ) end end), awful.button({ }, 3, function() -- Show a dropdown menu with all the opened clients. awful.menu.client_list({ theme = { width = 250 } }) end) ) M.setup = function(s) return { screen = s, filter = awful.widget.tasklist.filter.currenttags, buttons = buttons } end return M
-- -- ──────────────────────────────────────────────────── I ────────── -- :::::: C L A S S Y : : : : : : : : -- -------------------------------------------------------------------------- -- --- | V0.1 - Simple Class Builder --{Theros@MisModding} ---@class Classy --- Simple Class Object ---@field Extend fun():Classy Extend a Classy Object local Classy = {} Classy.KnownClasses = {} function Classy:Create(name, base) -- empty class Object local Object Object = { __index = { Extend = function(self) local obj = { --- this Objects superclass super = self ---@type Classy } return setmetatable(obj, Object) end }, __type = "Object", __tostring = function(self) return getmetatable(self).__type end, __call = function(self, ...) if self['super'] and self.super['new'] then self.super.new(self, ...) end if self['new'] then self:new(...) end return self end } -- handle named classes if name then -- if the class exists, return it. if self.KnownClasses[name] then return self.KnownClasses[name] else -- set the Object type Object.__type = name local obj = {} -- populate class definition if (type(base) == "table") then for k, v in pairs(base) do obj[k] = v end end setmetatable(obj, Object) self.KnownClasses[name] = obj return obj end else -- just return a new object return setmetatable({}, Object) end end local meta = {__call = function(self, ...) return self:Create(...) end} local exports = setmetatable(Classy, meta) ---//RegisterModule("Classy",exports) return exports
local user, header = luawa.user, luawa.header --logout the user if user:logout() then return header:redirect('/login') else return header:redirect('/') end
local args = {...} local import_prefix = args[1] if import_prefix then import_prefix = import_prefix:match("^(.-)states%.[^%.]+$") end if not import_prefix then import_prefix = "" end local errormodule = require(import_prefix .. "error") local utilmodule = load_module(import_prefix .. "util", true) local classmodule = load_module(import_prefix .. "class", true) local basechoicemodule = load_module(import_prefix .. "states.baseChoice", true) local dictionarymodule = load_module(import_prefix .. "dictionary", true) if dictionary.addListenerToConfig then dictionary:addListenerToConfig(currentConfig) end local MainMenuState = class(function(self) end, BaseChoiceState) MainMenuState:__implementAbstract("runIteration", function(self) console:printLore( dictionary:translate(stateManager:getStatesStack(), "display") ) local menu = self:loopChoice(1, 3, "not_valid") if menu == nil then console:printLore('\n\n') return false end console:printLore('\n') if menu == 1 then stateManager:pushMainState("gameWrapper") return true elseif menu == 2 then stateManager:pushMainState("options") return true else stateManager:pushState("eqcmenu") console:printLore( dictionary:translate(stateManager:getStatesStack(), "confirm") ) local menu = self:loopChoice(1, 2, "not_valid") if menu == nil then return false end stateManager:popState() if menu == 2 then return true else return false end end return true end) mainMenuState = MainMenuState()
-------------------------------------------------------------------------------- -- single-TODO-unstrict-mode-suite.lua: suite used for full suite tests -- This file is a part of lua-nucleo library -- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license) -------------------------------------------------------------------------------- local make_suite = select(1, ...) local test = make_suite("single-TODO-unstrict-mode-suite", { }) test:set_strict_mode(false) test:TODO "to_test"
---@diagnostic disable: undefined-global local palette = require 'nord-palette' local base = require 'base' local clrs = palette.clrs local lang = function() return { dtBooleanKey {fg = clrs.nord7}, dtExecKey {fg = clrs.nord7}, dtLocaleKey {fg = clrs.nord7}, dtNumericKey {fg = clrs.nord7}, dtTypeKey {fg = clrs.nord7}, dtDelim {base.Delimiter}, dtLocaleValue {base.Keyword}, dtTypeValue {base.Keyword}, } end return lang -- vi:nowrap