content
stringlengths 5
1.05M
|
|---|
return loadfile('mbedtls.lua')(true)
|
local minGangMemberConnected = 0
local QBCore = exports['qb-core']:GetCoreObject()
function checkGroup(table, val)
for k, v in pairs(table) do
if val == v.label then
return true
end
end
return false
end
function removeGroup(tab, val)
for k, v in pairs(tab) do
if v.label == val then
tab[k] = nil
end
end
end
function isContested(tab)
local count = 0
for k, v in pairs(tab) do
count = count + 1
end
if count > 1 then
return "contested"
end
return ""
end
RegisterNetEvent("qb-gangs:server:updateterritories")
AddEventHandler("qb-gangs:server:updateterritories", function(zone, inside)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local Gang = Player.PlayerData.gang
local gangMemberConnected = 0
local Territory = Zones["Territories"][zone]
if Territory ~= nil then
-- If they're not in a gang or they're not a cop just ignore them
if Gang.name ~= "none" then
if inside then
if not checkGroup(Territory.occupants, Gang.label) then
Territory.occupants[Gang.label] = {
label = Gang.label,
score = 0
}
else
for k, v in pairs(QBCore.Functions.GetPlayers()) do
local Player = QBCore.Functions.GetPlayer(v)
if Player ~= nil then
if (Player.PlayerData.gang.name == Territory.occupants[Gang.label]) then
gangMemberConnected = gangMemberConnected + 1
end
end
end
if gangMemberConnected >= minGangMemberConnected then
local score = Territory.occupants[Gang.label].score
if score < Zones["Config"].minScore and Territory.winner ~= Gang.label then
if isContested(Territory.occupants) == "" then
Territory.occupants[Gang.label].score = Territory.occupants[Gang.label].score + 1
TriggerClientEvent('QBCore:Notify',source,"Taking Zone Progress "..Territory.occupants[Gang.label].score.."/"..Zones["Config"].minScore, "success")
end
else
Territory.winner = Gang.label
TriggerClientEvent("qb-gangs:client:updateblips",source, zone, Gang.label)
Wait(1000)
end
else
--TriggerClientEvent('QBCore:Notify',src,Lang:t("error.member_not_connected"),"error")
end
end
else
removeGroup(Territory.occupants, Gang.label)
end
end
end
end)
|
player_manager.AddValidModel( "PMC2_10", "models/player/PMC_2/PMC__10.mdl" ) list.Set( "PlayerOptionsModel", "PMC2_10", "models/player/PMC_2/PMC__10.mdl" )
|
Func = {}
_G.Func = Func
function Func.bind(fn, ...)
local args = { ... }
return function(...)
local args2 = table.combine(args, { ... })
return fn(table.unpack(args2))
end
end
|
---
-- Autoconfiguration.
-- Copyright (c) 2016 Blizzard Entertainment
---
local p = premake
local clang = p.tools.clang
function clang.try_compile(cfg, text)
-- write the text to a temporary file.
local cppFile = path.join(cfg.objdir, "temp.cpp")
if not io.writefile(cppFile, text) then
return nil
end
local outFile = path.join(cfg.objdir, "temp.out")
-- compile that text file.
if os.execute('clang "' .. cppFile .. '" -o "' .. outFile ..'" &> /dev/null') then
return outFile
else
return nil
end
end
|
local GM = GM or GAMEMODE
surface.CreateFont("Font", {font = "Arial",extended = false,size = 40,}) -- Then font named 'Font' compacted on one line
surface.CreateFont("DButton", {font = "Arial",extended = false,size = 20,}) -- Then font named 'Font' compacted on one line
surface.CreateFont("Text", {font = "Arial",extended = false,size = 20,}) -- Then font named 'Font' compacted on one line
local buy = GM.LANG:GetString("efg.sell")
local faded_black = Color(0, 0, 0, 200) -- The color black but with 200 Alpha
function OpenSellerShop()
if IsValid(RUSELLERSCROLL) then return end
local DermaPanel = vgui.Create("DFrame") -- The name DermaPanel to store the value DFrame
RUSELLERSCROLL = vgui.Create("DScrollPanel", DermaPanel)
RUSELLERSCROLL:Dock( FILL )
local List = RUSELLERSCROLL:Add( "DIconLayout" )
List:Dock( FILL )
List:SetSpaceY( 5 )
List:SetSpaceX( 5 )
for _, v in pairs(weapons.GetList()) do
if !(efgmpriceweapons[v.ClassName]) then continue end
local icon = List:Add( "SpawnIcon" )
icon:SetModel( v.WorldModel or "models/props_junk/watermelon01.mdl" )
icon:SetSize(250, 250)
local DermaButton = vgui.Create( "DButton", icon )
DermaButton:SetFont("ChatFont")
DermaButton:SetText(buy)
DermaButton:SizeToContents()
DermaButton:Dock(BOTTOM)
DermaButton:SetMouseInputEnabled(true)
DermaButton.DoClick = function()
local properties = DermaPanel:Add("DMenu")
properties:SetPos(DermaPanel:CursorPos())
properties:AddOption( (efgmpriceweapons[class]["RUB"] or 1000) .. " RUB", function()
net.Start("Sell RUB")
net.WriteString(class)
net.WriteInt((efgmpriceweapons[class]["RUB"] or 1000) / 6, 32)
net.SendToServer()
end)
properties:AddOption( (efgmpriceweapons[class]["DOL"] or 500) .. " USD", function()
net.Start("Sell DOL")
net.WriteString(class)
net.WriteInt((efgmpriceweapons[class]["DOL"] or 500) / 6, 32)
net.SendToServer()
end)
end
end
DermaPanel:SetSize(ScrW() * 0.97, ScrH() * 0.97) // Sets the size to 500x by 300y
DermaPanel:Center() // Centers the panel
DermaPanel:SetTitle("") // Set the title to nothing
DermaPanel:SetDraggable(false) // Makes it so you carnt drag it
DermaPanel:MakePopup() // Makes it so you can move your mouse on it
DermaPanel.Paint = function(self, w, h) // Paint function w, h = how wide and tall it is
draw.RoundedBox(2, 0, 0, w, h, faded_black) // Draws a rounded box with the color faded_black stored abouve
end
end
net.Receive("price_data", function()
efgmpriceweapons = net.ReadTable()
end)
hook.Add( "InitPostEntity", "Ready", function()
net.Start( "client_ready" )
net.SendToServer()
end )
net.Receive( "NPCSELLER", OpenSellerShop)
|
object_ship_kessel_mine_turret_tier1 = object_ship_shared_kessel_mine_turret_tier1:new {
}
ObjectTemplates:addTemplate(object_ship_kessel_mine_turret_tier1, "object/ship/kessel_mine_turret_tier1.iff")
|
---@diagnostic disable: lowercase-global
---↑仮にまじめなもの作るとしたらこのdiagnosticは消す
---@diagnostic disable: undefined-global
---↑fuとかbmdとか認識してくれないからしかたない
--どーせ固定値だからいいと思う
CONFIG_FILE_PATH = [[C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Config\VoiceAutoTool_Config\AutoTool_Config.lua]]
--デフォの値
VOICEFOLDER_PATH=""
AUDIO_INDEX = 1
VOICEBIN_NAME="AutoTool"
FILL_MODE = true
FHT_PATH=[[C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Modules\Lua\Utf8Sjis.tbl]]
config = {
VOICEFOLDER_PATH = [[C:\hogehoge]],
AUDIO_INDEX = 1,
VOICEBIN_NAME = [[VoiceAutoTool]],
FILL_MODE = true,
FHT_PATH = [[C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Modules\Lua\Utf8Sjis.tbl]]
}
--Config設定
config_isexist=io.open(CONFIG_FILE_PATH,"r")
io.close()
if config_isexist~=nil then
--Configファイルから値読み込み、実際は外部の.Lua実行結果の返り値を持ってきてるだけ
config = dofile(CONFIG_FILE_PATH)
end
--uiのうんぬん
ui = fu.UIManager
disp = bmd.UIDispatcher(ui)
local width,height = 600,350
win = disp:AddWindow({
ID = 'MyWin',
WindowTitle = 'My First Window',
Geometry = { 100, 100, width, height },
Spacing = 10,
ui:VGroup{
ID = 'root',
-- Add your GUI elements here:
ui:Label{ ID = 'Label1', Text = 'VOICEFOLDER_PATH(音声ファイルや字幕テキストが入ってるフォルダを指定)'},
ui:LineEdit{ Text = config["VOICEFOLDER_PATH"], ID = "Line1" },
ui:Label{ ID = 'Label2', Text = 'AUDIO_INDEX(エディットページで字幕化したい音声が置かれている位置、A1だと1でA2だと2で…)'},
ui:SpinBox{ Value = config["AUDIO_INDEX"], ID = "Spin1" },
ui:Label{ ID = 'Label3', Text = 'VOICEBIN_NAME(メディアプールに本ツール用に追加されるBinの名前を指定)'},
ui:LineEdit{ Text = config["VOICEBIN_NAME"], ID = "Line2" },
ui:Label{ ID = 'Label4', Text = 'FILL_MODE(字幕化する際に、字幕の長さを音声クリップの開始点→次の音声クリップの開始点にするモード)'},
ui:CheckBox{ID = 'MyCheckbox', Text = '',Checked = config["FILL_MODE"]},
ui:Label{ ID = 'Label5', Text = '-'},
ui:Button { Text = "保存", ID = "ButtonA" },
ui:Button { Text = "終了", ID = "ButtonB" }
},
})
itm = win:GetItems()
function win.On.ButtonA.Clicked(ev)
--AutoTool_Config.luaに保存する
f = io.open(CONFIG_FILE_PATH,"w")
f:write("tbl = { \n")
f:write("VOICEFOLDER_PATH = [[".. itm['Line1'].Text .."]],\n")
f:write("AUDIO_INDEX = ".. itm['Spin1'].Value ..",\n")
f:write("VOICEBIN_NAME = [[" .. itm['Line2'].Text .. "]],\n")
f:write("FILL_MODE = " .. tostring(itm.MyCheckbox.Checked) .. ",\n")
f:write("FHT_PATH = [[".. config["FHT_PATH"] .. "]]\n")
f:write("} \n")
f:write("return tbl")
io.close()
itm["Label5"].Text = "保存完了!!!!"
end
function win.On.ButtonB.Clicked(ev)
disp:ExitLoop()
end
function win.On.MyWin.Close(ev)
disp:ExitLoop()
end
win:Show()
disp:RunLoop()
win:Hide()
--http://www.steakunderwater.com/wesuckless/viewtopic.php?p=36549&t=1411
--↑ui云々のリファレンス探したんだけど、ここにしか情報が見当たらない
|
--[[ Skarvald_Dalronn.lua
This script was written and is protected
by the GPL v2. This script was released
by Azolex of the Blua Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- Azolex, October 26, 2008. ]]
function Skarvald_OnEnterCombat(pUnit,Event)
pUnit:SendChatMessage(14, 0,"Dalronn! See if you can muster the nerve to join my attack!")
pUnit:RegisterEvent("Skarvald_Charge",8000, 0)
pUnit:RegisterEvent("Skarvald_StoneStrike",10000, 0)
end
function Skarvald_Charge(pUnit, Event)
pUnit:FullCastSpellOnTarget(43651,pUnit:GetRandomPlayer(7))
end
function Skarvald_StoneStrike(pUnit, Event)
pUnit:FullCastSpellOnTarget(48583,pUnit:GetClosestPlayer())
end
function Skarvald_OnLeaveCombat(pUnit, Event)
pUnit:RemoveEvents()
end
function Skarvald_OnDied(pUnit, event, player)
pUnit:SendChatMessage(14, 0,"A warrior's death.")
pUnit:RemoveEvents()
end
RegisterUnitEvent(24200, 1, "Skarvald_OnEnterCombat")
RegisterUnitEvent(24200, 2, "Skarvald_OnLeaveCombat")
RegisterUnitEvent(24200, 4, "Skarvald_OnDied")
-- Other Boss :)
function Dalronn_OnEnterCombat(pUnit,Event)
pUnit:RegisterEvent("Dalronn_Reply",5000, 1)
pUnit:RegisterEvent("Dalronn_ShadowBolt",2000, 0)
pUnit:RegisterEvent("Dalronn_Debilitate",8000, 0)
end
function Skarvald_Reply(pUnit, event, player)
pUnit:SendChatMessage(14, 0,"By all means, don't assess the situation, you halfwit! Just jump into the fray!")
end
function Dalronn_ShadowBolt(pUnit, Event)
pUnit:FullCastSpellOnTarget(43649,pUnit:GetRandomPlayer(0))
end
function Dalronn_Debilitate(pUnit, Event)
pUnit:FullCastSpellOnTarget(43650,pUnit:GetRandomPlayer(0))
end
function Dalronn_OnLeaveCombat(pUnit, Event)
pUnit:RemoveEvents()
end
function Dalronn_OnDied(pUnit, event, player)
pUnit:SendChatMessage(14, 0,"See... you... soon.")
pUnit:RemoveEvents()
end
RegisterUnitEvent(24201, 1, "Dalronn_OnEnterCombat")
RegisterUnitEvent(24201, 2, "Dalronn_OnLeaveCombat")
RegisterUnitEvent(24201, 4, "Dalronn_OnDied")
|
-- Flat 6 engines
ACF_DefineEngine( "2.8-B6", {
name = "2.8L Flat 6 Petrol",
desc = "Car sized flat six engine, sporty and light",
model = "models/engines/b6small.mdl",
sound = "acf_base/engines/b6_petrolsmall.wav",
category = "B6",
fuel = "Petrol",
enginetype = "GenericPetrol",
weight = 100,
torque = 136,
flywheelmass = 0.08,
idlerpm = 750,
peakminrpm = 4300,
peakmaxrpm = 6950,
limitrpm = 7250
} )
ACF_DefineEngine( "5.0-B6", {
name = "5.0L Flat 6 Petrol",
desc = "Sports car grade flat six, renown for their smooth operation and light weight",
model = "models/engines/b6med.mdl",
sound = "acf_base/engines/b6_petrolmedium.wav",
category = "B6",
fuel = "Petrol",
enginetype = "GenericPetrol",
weight = 240,
torque = 330,
flywheelmass = 0.11,
idlerpm = 900,
peakminrpm = 3500,
peakmaxrpm = 6000,
limitrpm = 6800
} )
ACF_DefineEngine( "8.3-B6", {
name = "8.3L Flat 6 Multifuel",
desc = "Military-grade multifuel boxer engine. Although heavy, it is compact, durable, and has excellent performance under adverse conditions.",
model = "models/engines/b6med.mdl",
sound = "acf_base/engines/v8_diesel.wav",
category = "B6",
fuel = "Multifuel",
enginetype = "GenericDiesel",
weight = 480,
torque = 565,
flywheelmass = 0.65,
idlerpm = 500,
peakminrpm = 1900,
peakmaxrpm = 3600,
limitrpm = 4200
} )
ACF_DefineEngine( "15.8-B6", {
name = "15.8L Flat 6 Petrol",
desc = "Monstrous aircraft-grade boxer with a high rev range biased powerband",
model = "models/engines/b6large.mdl",
sound = "acf_base/engines/b6_petrollarge.wav",
category = "B6",
fuel = "Petrol",
enginetype = "GenericPetrol",
weight = 725,
torque = 1100,
flywheelmass = 1,
idlerpm = 620,
peakminrpm = 2500,
peakmaxrpm = 4275,
limitrpm = 4900
} )
|
function muteVoice(thePlayer, commandName, targetPlayer, ...)
if exports.mrp_integration:isPlayerTrialAdmin(thePlayer) or exports.mrp_integration:isPlayerSupporter(thePlayer) then
local targetPlayer, targetPlayerName = exports.mrp_global:findPlayerByPartialNick(thePlayer, targetPlayer)
if targetPlayer then
if not getElementData(targetPlayer, "voicemute") then
exports['mrp_admins']:addAdminHistory(targetPlayer, thePlayer, "Susturma Cezası", 8, 1)
setElementData(targetPlayer, "voicemute", true)
exports["mrp_infobox"]:addBox(thePlayer, "success", getPlayerName(targetPlayer).." adlı oyuncuyu susturdunuz.")
exports["mrp_infobox"]:addBox(targetPlayer, "error", getPlayerName(targetPlayer).." isimli yetkili sizi susturdu.")
exports.mrp_global:sendMessageToAdmins("AdmCMD: "..getPlayerName(thePlayer):gsub("_", " ").." isimli yetkili " .. getPlayerName(targetPlayer):gsub("_", " ") .. " isimli oyuncunun mikrofonunu susturdu.")
else
setElementData(targetPlayer, "voicemute", nil)
exports["mrp_infobox"]:addBox(thePlayer, "success", getPlayerName(targetPlayer).." adlı oyuncuyunun susturmasını kaldırdınız.")
exports["mrp_infobox"]:addBox(targetPlayer, "success", getPlayerName(targetPlayer).." isimli yetkili susturma cezanızı kaldırdı. Bir dahakine dikkat edin.")
exports.mrp_global:sendMessageToAdmins("AdmCMD: "..getPlayerName(thePlayer):gsub("_", " ").." isimli yetkili " .. getPlayerName(targetPlayer):gsub("_", " ") .. " isimli oyuncunun mikrofonunun susturmasını kaldırdı.")
end
else
exports["mrp_infobox"]:addBox(thePlayer, "error", "Kullanımı: /voicemute [Karakter Adı & ID]")
end
end
end
addCommandHandler("mical", muteVoice)
|
local LrApplication = import 'LrApplication'
local LrDialogs = import 'LrDialogs'
local LrTasks = import 'LrTasks'
local LrLogger = import 'LrLogger'
LrTasks.startAsyncTask(function ()
local catalog = LrApplication.activeCatalog()
-- This is the string that would come out of the COCO Json file
local fname = "whalesharks256/whalesharks_256x256/775cd014-a56d-41b0-9c97-28849f2a2004.jpg"
local category_id = 8
local category_str = "Port_Full"
local photo = catalog:getTargetPhoto()
if photo == nil then
LrDialogs.message("Hello World", "Please select a photo")
return
end
catalog:withWriteAccessDo('addToPhoto', function(context)
local keyword = catalog:createKeyword(category_str, {}, true, nil, true)
photo:addKeyword(keyword)
end )
end)
|
local lmdb = require('dns.lmdb')
local dns = require('dns')
local ffi = require('ffi')
local tokey = dns.utils.searchkey
local M = {}
-- Storage format in the DB
local entry_t = ffi.typeof('struct { uint16_t count; uint8_t data[?]; }')
local entry_pt = ffi.typeof('struct { uint16_t count; uint8_t data[]; } *')
-- Cached temporary buffers
local key_buf = ffi.new('char [258]')
local val_buf = ffi.new(entry_t, 65535)
local mkey, mval = lmdb.val_t(), lmdb.val_t()
local function tomdb(len, data)
mkey.data, mkey.size = data, len
return mkey
end
local function toshallow(rr, owner, type, v)
-- Initialize RR set with shallow copy of the data
-- that is valid only for duration of the transaction
-- for this purpose, RR set has a different gc to only clear owner
if not rr then
rr = dns.rrset(nil, 0)
ffi.gc(rr, dns.rrset.init)
end
local entry = ffi.cast(entry_pt, v.data)
rr:init(owner, type)
rr.raw_data = ffi.cast('void *', entry.data)
rr.rdcount = entry.count
return rr
end
local function set(txn, rr)
local key, len = tokey(rr:owner(), rr:type(), key_buf)
-- Serialise value and metadata
local rdlen = dns.utils.rdsetlen(rr)
assert(rdlen > 0 and rdlen < 65535)
val_buf.count = rr.rdcount
ffi.copy(val_buf.data, rr.raw_data, rdlen)
local data = lmdb.val_t(ffi.offsetof(entry_t, 'data') + rdlen, val_buf)
-- Insert into storage
local ok, err = txn:put(lmdb.val_t(len, key), data)
if err then return nil, err end
return true, ffi.string(key, len)
end
local function get(txn, name, type, rr)
local key, len = tokey(name, type, key_buf)
local v = txn:get(lmdb.val_t(len, key))
if not v or v.size == 0 then return end
return toshallow(rr, name, type, v)
end
local function del(txn, name, type)
local len
if type then -- Format storage key
name, len = tokey(name, type, key_buf)
end
return txn:del(lmdb.val_t(len or #name, name))
end
local function zone(txn, name, rr)
-- Find SOA for longest prefix of a name
local p = name.bytes
for _ = 1, name:labels() do
local key, len = tokey(dns.todname(p), dns.type.SOA, key_buf)
local v = txn:get(tomdb(len, key), mval)
if v then
return toshallow(rr, dns.dname(p, len - 2), dns.type.SOA, v)
end
p = p + (p[0] + 1)
end
end
local function isprefix(prefix, key, len)
len = len - 2 -- Trim TYPE
if prefix.size < len then return false end
return ffi.C.memcmp(prefix.data, key, len) == 0
end
local function keywildcard(key)
if key.size >= 4 then
-- Ends with ['*', 0x00, TYPE, TYPE]
local bytes, last = ffi.cast('char *', key.data), key.size - 1
return bytes[last - 3] == 0x2a and bytes[last - 2] == 0
end
end
local function keytype(key)
local bytes, last = ffi.cast('char *', key.data), key.size - 1
return bit.bor(bit.lshift(bytes[last - 1], 8), bytes[last])
end
local function scan(txn, name)
local cur = txn:cursor()
local key, len = tokey(name, 0, key_buf)
-- Trim type to get zone prefix
local ok = cur:seek(lmdb.val_t(len - 2, key))
local t = {}
-- If it can't find the prefix, bail
if not ok then
cur:close()
return t
end
-- Find all keys matching given prefix
local ignore
for k,_ in ipairs(cur) do
-- Stop when name doesn't match given prefix
if not isprefix(k, key, len) then
break
end
-- Ignore subset belonging to different zone cut
local key = ffi.string(k.data, k.size)
if #key > len and key:find('\x00\x06', #key - 1, true) then
ignore = key
end
if ignore then
-- Check if current prefix is out of ignored subzone
if not key:find(ignore, 1, true) then
ignore, t[key] = nil, true
end
else
t[key] = true
end
end
cur:close()
return t
end
local function match(txn, soa, name, type, rr)
-- Search name prefixes for name encloser
local p = name.bytes
local encloser, cut, wildcard, rtype
-- Check if a complete match exists first
local key, len = tokey(dns.todname(p), type, key_buf)
local v, found = txn:get(tomdb(len, key), mval)
if found then
encloser = toshallow(rr, name, type, v)
else
-- Check if CNAME for this name exists
key[len - 2], key[len - 1] = 0, dns.type.CNAME
v, found = txn:get(tomdb(len, key), v)
if found then
encloser = toshallow(rr, name, dns.type.CNAME, v)
end
end
-- Scan all prefixes, ending at zone apex
for _ = 1, name:labels() - soa:owner():labels() - 1 do
p = p + (p[0] + 1)
-- Find a possible zone cut
key, len = tokey(dns.todname(p), dns.type.NS, key_buf)
v, found = txn:get(tomdb(len, key), v)
if found then
encloser, cut = nil, toshallow(rr, dns.todname(p), dns.type.NS, v)
break
end
-- Find a covering wildcard by extending search key
if not encloser then
local suffix = ffi.cast('char *', key + len - 2)
suffix[0], suffix[1] = 0x2a, 0x00 -- Wildcard label
suffix[2], suffix[3] = bit.rshift(type, 8), bit.band(type, 0xff)
-- Find wildcard matching searched type
v, found = txn:get(tomdb(len + 2, key), v)
if found then
encloser, wildcard = toshallow(rr, name, type, v), true
else
-- Find wildcard matching CNAME
suffix[2], suffix[3] = 0, dns.type.CNAME
v, found = txn:get(tomdb(len + 2, key), v)
if found then
encloser, wildcard = toshallow(rr, name, dns.type.CNAME, v), true
end
end
-- TODO: find closest encloser to shortcut deep labels
end
end
return encloser, cut, wildcard
end
local function addglue(txn, ns, rr, dst)
for _, rd in ipairs(ns) do
local target = dns.todname(rd:data())
local key, len = tokey(target, dns.type.AAAA, key_buf)
-- Find AAAA glue
local v = txn:get(lmdb.val_t(len, key))
if v then
toshallow(rr, target, dns.type.AAAA, v)
table.insert(dst, rr:copy())
end
--- Find A glue
key[len - 1] = dns.type.A
v = txn:get(lmdb.val_t(len, key))
if v then
toshallow(rr, target, dns.type.A, v)
table.insert(dst, rr:copy())
end
end
end
local meta = {
txn = function (self, rdonly)
return self.env:txn(self.db, rdonly and 'rdonly')
end,
set = function (self, txn, rr)
return set(txn, rr)
end,
get = function (self, txn, name, type, rr)
return get(txn, name, type)
end,
del = function (self, txn, name, type)
return del(txn, name, type)
end,
zone = function (self, txn, name, rr)
return zone(txn, name)
end,
scan = function (self, txn, name)
return scan(txn, name)
end,
match = function (self, txn, soa, name, type, rr)
return match(txn, soa, name, type, rr)
end,
addglue = function (self, txn, ns, rr, dst)
return addglue(txn, ns, rr, dst)
end,
}
function M.open(conf)
conf.path = conf.path or '.'
conf.size = conf.size or 10 * 1024 * 1024 * 1024
conf.flags = conf.flags or 'writemap, mapasync'
-- Open LMDB environment and a single DB
local env, err = lmdb.open(conf.path, conf.flags, conf.size, conf.mode, conf.maxdbs)
if not env then
error(string.format('cannot open lmdb in %s: %s', conf.path, err))
end
local txn, db = assert(env:open())
assert(txn:commit())
return setmetatable({env=env,db=db}, {__index = meta})
end
return M
|
collectibles =
{
{"qe_fireratheart", 1},
{"qe_batblood", 2},
{"qe_bone", 3}
}
markers = {
{
map = "res/map/gandria/gandria.tmx",
position = {3575, 2650},
step = 0
},
{
map = "res/map/gandria/gandria.tmx",
position = {975, 2875},
step = -1
}
}
|
---------------------------------------------------------------------------------------------------
-- func: setplayernation
-- desc: Sets the target players nation.
---------------------------------------------------------------------------------------------------
cmdprops =
{
permission = 1,
parameters = "ss"
};
function error(player, msg)
player:PrintToPlayer(msg);
player:PrintToPlayer("!setplayernation {player} <nation>");
player:PrintToPlayer("Nations: 0=San d'Oria 1=Bastok 2=Windurst");
end;
function onTrigger(player, arg1, arg2)
local targ;
local nation;
-- validate target
if (arg2 ~= nil) then
targ = GetPlayerByName(arg1);
if (targ == nil) then
error(player, string.format( "Player named '%s' not found!", arg1 ));
return;
end
nation = tonumber(arg2);
elseif (arg1 ~= nil) then
targ = player;
nation = tonumber(arg1);
end
-- validate nation
if (nation == nil or nation < 0 or nation > 2) then
error(player, "Invalid nation ID.");
return;
end
local nationByNum = {
[0] = "San d'Oria",
[1] = "Bastok",
[2] = "Windurst"
}
-- set nation
targ:setNation( nation );
player:PrintToPlayer( string.format("Set %s's home nation to %s.", targ:getName(), nationByNum[nation]) );
end;
|
interfaces {
USER =
{
inputs =
{
SEEK = {'s64'}
},
outputs =
{
SET_VID_POS = {'s64'},
TOGGLE_TOGETHERNESS = {'int'}
},
}
}
|
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Lua functions
local _G = _G
local pairs = pairs
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
local function SkinLFGuild()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.lfguild ~= true then return end
local LookingForGuildFrame = _G.LookingForGuildFrame
S:HandlePortraitFrame(LookingForGuildFrame, true)
local checkbox = {
"LookingForGuildPvPButton",
"LookingForGuildWeekendsButton",
"LookingForGuildWeekdaysButton",
"LookingForGuildRPButton",
"LookingForGuildRaidButton",
"LookingForGuildQuestButton",
"LookingForGuildDungeonButton",
}
-- skin checkboxes
for _, v in pairs(checkbox) do
S:HandleCheckBox(_G[v])
end
-- have to skin these checkboxes seperate for some reason o_O
S:HandleCheckBox(_G.LookingForGuildTankButton.checkButton)
S:HandleCheckBox(_G.LookingForGuildHealerButton.checkButton)
S:HandleCheckBox(_G.LookingForGuildDamagerButton.checkButton)
S:HandleScrollBar(_G.LookingForGuildBrowseFrameContainerScrollBar)
S:HandleButton(_G.LookingForGuildBrowseButton)
S:HandleButton(_G.LookingForGuildRequestButton)
_G.LookingForGuildCommentInputFrame:CreateBackdrop()
_G.LookingForGuildCommentInputFrame:StripTextures(false)
-- skin container buttons on browse and request page
for i = 1, 5 do
_G["LookingForGuildBrowseFrameContainerButton"..i]:SetBackdrop(nil)
_G["LookingForGuildAppsFrameContainerButton"..i]:SetBackdrop(nil)
end
-- skin tabs
for i= 1, 3 do
S:HandleTab(_G["LookingForGuildFrameTab"..i])
end
_G.GuildFinderRequestMembershipFrame:StripTextures(true)
_G.GuildFinderRequestMembershipFrame:SetTemplate("Transparent")
S:HandleButton(_G.GuildFinderRequestMembershipFrameAcceptButton)
S:HandleButton(_G.GuildFinderRequestMembershipFrameCancelButton)
_G.GuildFinderRequestMembershipFrameInputFrame:StripTextures()
_G.GuildFinderRequestMembershipFrameInputFrame:SetTemplate()
end
local function LoadSkin()
if _G.LookingForGuildFrame then
--Frame already created
SkinLFGuild()
else
--Frame not created yet, wait until it is
hooksecurefunc("LookingForGuildFrame_CreateUIElements", SkinLFGuild)
end
end
S:AddCallbackForAddon("Blizzard_LookingForGuildUI", "LookingForGuild", LoadSkin)
|
local kStatusTranslationStringMap = debug.getupvaluex(Scoreboard_ReloadPlayerData, "kStatusTranslationStringMap")
kStatusTranslationStringMap[kPlayerStatus.WraithFade]="Wraith"
debug.setupvaluex( Scoreboard_ReloadPlayerData, "kStatusTranslationStringMap", kStatusTranslationStringMap)
|
include "map_builder.lua"
include "trajectory_builder.lua"
options = {
map_builder = MAP_BUILDER,
trajectory_builder = TRAJECTORY_BUILDER,
map_frame = "map",
tracking_frame = "base_link",
published_frame = "base_link",
odom_frame = "odom",
provide_odom_frame = false,
publish_frame_projected_to_2d = true,
use_odometry = false,
use_nav_sat = false,
use_landmarks = false,
num_laser_scans = 1,
num_multi_echo_laser_scans = 0,
num_subdivisions_per_laser_scan = 1,
num_point_clouds = 0,
lookup_transform_timeout_sec = 0.2,
submap_publish_period_sec = 0.3,
pose_publish_period_sec = 5e-3,
trajectory_publish_period_sec = 30e-3,
rangefinder_sampling_ratio = 1.,
odometry_sampling_ratio = 1.,
fixed_frame_pose_sampling_ratio = 1.,
imu_sampling_ratio = 1.,
landmarks_sampling_ratio = 1.,
}
MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.submaps.num_range_data = 35
TRAJECTORY_BUILDER_2D.min_range = 0.3
TRAJECTORY_BUILDER_2D.max_range = 8.
TRAJECTORY_BUILDER_2D.missing_data_ray_length = 1.
TRAJECTORY_BUILDER_2D.use_imu_data = true
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.linear_search_window = 0.1
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.translation_delta_cost_weight = 10.
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.rotation_delta_cost_weight = 1e-1
POSE_GRAPH.optimization_problem.huber_scale = 1e2
POSE_GRAPH.optimize_every_n_nodes = 35
POSE_GRAPH.constraint_builder.min_score = 0.65
return options
|
modifier_vengeful_mobility_displacement = class({})
function modifier_vengeful_mobility_displacement:OnCreated(params)
if IsServer() then
self.original_scale = self:GetParent():GetModelScale()
self:GetParent():SetModelScale(self.original_scale/1.5)
EFX("particles/econ/events/ti10/blink_dagger_start_ti10.vpcf", PATTACH_WORLDORIGIN, self:GetParent(), {
cp0 = self:GetParent():GetAbsOrigin(),
release = true,
})
end
end
function modifier_vengeful_mobility_displacement:OnDestroy()
if IsServer() then
self:GetParent():SetModelScale(self.original_scale)
EFX("particles/econ/events/ti10/blink_dagger_end_ti10.vpcf", PATTACH_WORLDORIGIN, self:GetParent(), {
cp0 = self:GetParent():GetAbsOrigin(),
release = true,
})
end
end
function modifier_vengeful_mobility_displacement:DeclareFunctions()
return {
MODIFIER_PROPERTY_OVERRIDE_ANIMATION,
MODIFIER_PROPERTY_OVERRIDE_ANIMATION_RATE,
}
end
function modifier_vengeful_mobility_displacement:GetOverrideAnimation() return ACT_DOTA_SPAWN end
function modifier_vengeful_mobility_displacement:GetOverrideAnimationRate() return 1.0 end
function modifier_vengeful_mobility_displacement:CheckState()
return {
[MODIFIER_STATE_NO_UNIT_COLLISION] = true,
}
end
if IsClient() then require("wrappers/modifiers") end
Modifiers.Displacement(modifier_vengeful_mobility_displacement)
Modifiers.Animation(modifier_vengeful_mobility_displacement)
|
modifier_phoenix_fire_spirits_nb2017 = class({})
--------------------------------------------------------------------------------
function modifier_phoenix_fire_spirits_nb2017:IsPurgable()
return false
end
--------------------------------------------------------------------------------
function modifier_phoenix_fire_spirits_nb2017:OnCreated( kv )
self.spirit_count = self:GetAbility():GetSpecialValueFor( "spirit_count" )
if IsServer() then
self.nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_phoenix/phoenix_fire_spirits.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControl( self.nFXIndex, 1, Vector( self.spirit_count, 0, 0 ) )
ParticleManager:SetParticleControl( self.nFXIndex, 9, Vector( 1, 0, 0 ) )
ParticleManager:SetParticleControl( self.nFXIndex, 10, Vector( 1, 0, 0 ) )
ParticleManager:SetParticleControl( self.nFXIndex, 11, Vector( 1, 0, 0 ) )
ParticleManager:SetParticleControl( self.nFXIndex, 12, Vector( 1, 0, 0 ) )
self:AddParticle( self.nFXIndex, false, false, -1, false, false )
self:SetStackCount( self.spirit_count )
end
end
--------------------------------------------------------------------------------
function modifier_phoenix_fire_spirits_nb2017:OnRefresh( kv )
self:OnCreated( kv )
end
--------------------------------------------------------------------------------
function modifier_phoenix_fire_spirits_nb2017:OnDestroy()
if IsServer() then
self:GetCaster():SwapAbilities( "phoenix_fire_spirits_nb2017", "phoenix_launch_fire_spirit_nb2017", true, false )
StopSoundOn( "Hero_Phoenix.FireSpirits.Loop", self:GetCaster() )
ParticleManager:DestroyParticle( self.nFXIndex, true )
end
end
--------------------------------------------------------------------------------
function modifier_phoenix_fire_spirits_nb2017:OnStackCountChanged( nOldCount )
if IsServer() then
ParticleManager:SetParticleControl( self.nFXIndex, 1, Vector( self:GetStackCount(), 0, 0 ) )
for i = 0,self.spirit_count do
local bEnabled = self:GetStackCount() > i
if self.nFXIndex ~= nil then
local x = 0
if bEnabled == true then
x = 1
end
ParticleManager:SetParticleControl( self.nFXIndex, i + 9, Vector( x, 0, 0 ) )
end
end
end
end
|
ones = {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", ""}
tens = {"X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC", ""}
hundreds = {"C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM", ""}
array_name = {""}
|
--LUA 1.0.2 for JsMacros 1.2.3
minecraft = jsmacros:getMinecraft()
networkProxy = (minecraft.getNetworkProxy or minecraft.method_1487)(minecraft)
if not hud:getOpenScreen() then
local UUID = luajava.bindClass("java.util.UUID")
local Session = reflection:getClass("net.minecraft.class_320", "net.minecraft.client.util.Session")
--from com.mojang.authlib import Agent
local Agent = luajava.bindClass("com.mojang.authlib.Agent")
--from com.mojang.authlib.yggdrasil import YggdrasilAuthenticationService
local YggAuthService = luajava.bindClass("com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService")
--from com.mojang.util import UUIDTypeAdapter
local UUIDTypeAdapter = luajava.bindClass("com.mojang.util.UUIDTypeAdapter")
local MCAgent = Agent.MINECRAFT
local uuidd = UUID:randomUUID():toString()
local yas = luajava.new(YggAuthService, networkProxy, uuidd)
local yua = yas:createUserAuthentication(MCAgent)
local minecraftSessionService = yas:createMinecraftSessionService()
username = ""
password = ""
loginScreen = hud:createScreen("Login", False)
function setSession(s)
local sessionField = reflection:getDeclaredField(minecraft:getClass(), "session", "field_1726")
sessionField:setAccessible(true)
sessionField:set(minecraft, s)
end
function onSubmit(b,s)
yua:setUsername(username)
yua:setPassword(password)
password = nil
yua:logIn()
local login = UUIDTypeAdapter:fromUUID(yua:getSelectedProfile():getId())
local session = luajava.new(Session, yua:getSelectedProfile():getName(), login, yua:getAuthenticatedToken(), yua:getUserType():getName())
setSession(session)
hud:openScreen(nil)
chat:log("logged in as: " .. yua:getSelectedProfile():getName())
end
function setU(e,s)
username = e
end
function setP(e,s)
password = e
end
function initScreen(screen)
local w = screen:getWidth()
local h = screen:getHeight()
local textX = w / 6
local uname = screen:addText("Login:", textX, h / 4, 0xFFFFFF, True)
local pword = screen:addText("Password:", textX, h / 4 + 25, 0xFFFFFF, True)
local inputX = textX + pword:getWidth() + 15
screen:addTextInput(inputX, h / 4 - 5, 200, 19, "", consumer:toBiConsumer(setU))
screen:addTextInput(inputX, h / 4 + 20, 200, 19, "", consumer:toBiConsumer(setP))
screen:addButton(inputX + 50, h / 4 + 50, 100, 20, "login", consumer:toBiConsumer(onSubmit))
end
loginScreen.onInit = consumer:toConsumer(initScreen)
hud:openScreen(loginScreen)
end
|
function love.conf(cfg)
cfg.window.title = "MonteXO"
end
|
local chitvalue = nil;
local allowdropvalue = false;
local dragging = false;
function onInit()
super.onInit();
if chit then
chitvalue = chit[1];
if User.isHost() or getDatabaseNode().isOwner() then
setHoverCursor("hand");
end
end
if allowdrop then
if string.lower(allowdrop[1]) == "true" then
allowdropvalue = true;
end
end
onValueChanged();
end
function onDragStart(button, x, y, draginfo)
dragging = false;
return onDrag(button, x, y, draginfo);
end
function onDrag(button, x, y, draginfo)
if getDatabaseNode().isOwner() then
if chitvalue then
local value = getValue();
if value > 0 then
if not dragging then
draginfo.setType("chit");
draginfo.setIcon(chitvalue .. "chit");
draginfo.setCustomData(chitvalue);
dragging = true;
setValue(value - 1);
onValueChanged();
return true;
end
end
end
end
return false;
end
function onDragEnd(draginfo)
if dragging then
if chitvalue then
if allowdropvalue then
local x, y = getControlMousePosition();
local w, h = getSize();
if x >= 0 and x <= w and y >= 0 and y <= h then
setValue(getValue() + 1);
onValueChanged();
end
end
end
dragging = false;
end
end
function onDrop(x, y, draginfo)
if chitvalue then
if allowdropvalue then
if draginfo.getType() == "chit" then
if draginfo.getCustomData() == chitvalue then
setValue(getValue() + 1);
onValueChanged();
return true;
end
end
end
end
end
function getControlMousePosition()
local mousex, mousey = Input.getMousePosition();
local windowx, windowy = window.getPosition();
local controlx, controly = getPosition();
local x = mousex - controlx - windowx;
local y = mousey - controly - windowy;
return x, y;
end
|
local dream = require("3DreamEngine")
love.window.setTitle("Lamborghini Example")
--settings
dream:setSky(love.graphics.newImage("examples/Lamborghini/garage.hdr"))
dream.cam.fov = 70
dream:init()
--materials
dream:loadMaterialLibrary("examples/Lamborghini/materials")
--objects
local car = dream:loadObject("examples/Lamborghini/Lamborghini Aventador")
local socket = dream:loadObject("examples/Lamborghini/socket")
--sun object
local sun = dream:newLight("sun")
sun:addShadow()
sun:setDirection(-1, 1, 1)
function love.draw()
dream:prepare()
dream:addLight(sun)
--draw the car
car:reset()
car:scale(0.1)
car:rotateY(love.mouse.isDown(1) and (-2.25-(love.mouse.getX()/love.graphics.getWidth()-0.5)*4.0) or love.timer.getTime()*0.5)
car:translate(0, -1.1225, -3.5)
dream:draw(car)
--draw the socket
dream:draw(socket, 0, -1, -4.5, 4, 0.25, 4)
--render
dream:present()
end
function love.update(dt)
dream:update()
end
function love.keypressed(key)
--screenshots!
if key == "f2" then
dream:takeScreenshot()
end
--fullscreen
if key == "f11" then
love.window.setFullscreen(not love.window.getFullscreen())
dream:init()
end
end
function love.resize()
dream:resize()
end
|
local base = string.gsub(@@LUA_SCRIPT_FILENAME@@, "(.*[/\\])(.*)", "%1").."/.."
local set_timer_timeout, memory, memory2, gui, input, bit, callback = set_timer_timeout, memory, memory2, gui, input, bit, callback
local warn = '========== The ROM must be running before running this script'
io.stderr:write(warn)
print(warn)
local Promise = dofile(base.."/promise.lua")
callback.register('timer', function()
Promise.update()
set_timer_timeout(1)
end)
set_timer_timeout(1)
local util = dofile(base.."/util.lua")(Promise)
local mem = dofile(base.."/mem.lua")
local spritelist = dofile(base.."/spritelist.lua")
local game = dofile(base.."/game.lua")(Promise)
spritelist.InitSpriteList()
spritelist.InitExtSpriteList()
game.registerHandlers()
local CAMERA_MODE = 0x7e054f
local DIDDY_X_VELOCITY = 0x7e0e02
local DIDDY_Y_VELOCITY = 0x7e0e06
local DIXIE_X_VELOCITY = 0x7e0e60
local DIXIE_Y_VELOCITY = 0x7e0e64
local FG_COLOR = 0x00ffffff
local BG_COLOR = 0x99000000
local TILE_RADIUS = 5
local frame = 0
local detailsidx = -1
local jumping = false
local helddown = false
local floatmode = false
local rulers = true
local pokemon = false
local pokecount = 0
local showhelp = false
local locked = false
local lockdata = nil
local incsprite = 0
local questionable_tiles = false
local font = gui.font.load(base.."/font.font")
local function text(x, y, msg, fg, bg)
if fg == nil then
fg = FG_COLOR
end
if bg == nil then
bg = BG_COLOR
end
font(x, y, msg, fg, bg)
end
function on_keyhook (key, state)
if not helddown and state.value == 1 then
if key == "1" and not locked then
helddown = true
detailsidx = detailsidx - 1
if detailsidx < -1 then
detailsidx = 22
end
elseif key == "2" and not locked then
helddown = true
detailsidx = detailsidx + 1
if detailsidx > 22 then
detailsidx = -1
end
elseif key == "3" then
helddown = true
incsprite = -1
elseif key == "4" then
helddown = true
incsprite = 1
elseif key == "5" then
helddown = true
if not locked then
locked = true
else
locked = false
lockdata = nil
end
elseif key == "6" then
helddown = true
pokemon = not pokemon
elseif key == "7" then
helddown = true
floatmode = not floatmode
elseif key == "8" then
helddown = true
rulers = not rulers
elseif key == "9" then
helddown = true
questionable_tiles = not questionable_tiles
elseif key == "0" then
showhelp = true
end
elseif state.value == 0 then
helddown = false
showhelp = false
end
end
function on_input (subframe)
jumping = input.get(0,0) ~= 0
if floatmode then
memory.writebyte(0x7e19ce, 0x16)
memory.writebyte(0x7e0e12, 0x99)
memory.writebyte(0x7e0e70, 0x99)
if input.get(0, 6) == 1 then
memory.writeword(DIDDY_X_VELOCITY, -0x5ff)
memory.writeword(DIXIE_X_VELOCITY, -0x5ff)
memory.writeword(DIDDY_Y_VELOCITY, 0)
memory.writeword(DIXIE_Y_VELOCITY, 0)
elseif input.get(0, 7) == 1 then
memory.writeword(DIDDY_X_VELOCITY, 0x5ff)
memory.writeword(DIXIE_X_VELOCITY, 0x5ff)
memory.writeword(DIDDY_Y_VELOCITY, 0)
memory.writeword(DIXIE_Y_VELOCITY, 0)
end
if input.get(0, 4) == 1 then
memory.writeword(DIDDY_Y_VELOCITY, -0x05ff)
memory.writeword(DIXIE_Y_VELOCITY, -0x05ff)
elseif input.get(0, 5) == 1 then
memory.writeword(DIDDY_Y_VELOCITY, 0x5ff)
memory.writeword(DIXIE_Y_VELOCITY, 0x5ff)
end
end
end
local function get_sprite(baseAddr)
local spriteData = memory.readregion(baseAddr, mem.size.sprite)
local offsets = mem.offset.sprite
local x = util.regionToWord(spriteData, offsets.x)
local y = util.regionToWord(spriteData, offsets.y)
return {
base_addr = string.format("%04x", baseAddr),
screenX = x - game.cameraX,
screenY = y - game.cameraY - mem.size.tile / 3,
control = util.regionToWord(spriteData, offsets.control),
draworder = util.regionToWord(spriteData, 0x02),
x = x,
y = y,
jumpHeight = util.regionToWord(spriteData, offsets.jumpHeight),
style = util.regionToWord(spriteData, offsets.style),
currentframe = util.regionToWord(spriteData, 0x18),
nextframe = util.regionToWord(spriteData, 0x1a),
state = util.regionToWord(spriteData, 0x1e),
velocityX = util.regionToSWord(spriteData, offsets.velocityX),
velocityY = util.regionToSWord(spriteData, offsets.velocityY),
velomaxx = util.regionToSWord(spriteData, 0x26),
velomaxy = util.regionToSWord(spriteData, 0x2a),
motion = util.regionToWord(spriteData, offsets.motion),
attr = util.regionToWord(spriteData, 0x30),
animnum = util.regionToWord(spriteData, 0x36),
remainingframe = util.regionToWord(spriteData, 0x38),
animcontrol = util.regionToWord(spriteData, 0x3a),
animreadpos = util.regionToWord(spriteData, 0x3c),
animcontrol2 = util.regionToWord(spriteData, 0x3e),
animformat = util.regionToWord(spriteData, 0x40),
damage1 = util.regionToWord(spriteData, 0x44),
damage2 = util.regionToWord(spriteData, 0x46),
damage3 = util.regionToWord(spriteData, 0x48),
damage4 = util.regionToWord(spriteData, 0x4a),
damage5 = util.regionToWord(spriteData, 0x4c),
damage6 = util.regionToWord(spriteData, 0x4e),
spriteparam = util.regionToWord(spriteData, 0x58),
}
end
local function sprite_details(idx)
local base_addr = idx * mem.size.sprite + mem.addr.spriteBase
local sprite = get_sprite(base_addr)
if sprite.control == 0 then
text(0, 0, "Sprite "..idx.." (Empty)")
incsprite = 0
locked = false
lockdata = nil
return
end
if incsprite ~= 0 then
memory.writeword(base_addr + 0x36, sprite.animnum + incsprite)
lockdata = nil
incsprite = 0
end
if locked and lockdata == nil then
lockdata = memory.readregion(base_addr, mem.size.sprite)
end
if lockdata ~= nil and locked then
memory.writeregion(base_addr, mem.size.sprite, lockdata)
end
text(0, 0, "Sprite "..idx..(locked and " (Locked)" or "")..":\n\n"..util.table_to_string(sprite))
end
local waypoints = {}
local overlayCtx = nil
local overlay = nil
local function renderOverlay(guiWidth, guiHeight)
overlayCtx:set()
overlayCtx:clear()
if showhelp then
text(0, 0, [[
Keyboard Help
===============
Sprite Details:
[1] Next sprite slot
[2] Previous sprite slot
[3] Change to next sprite animation
[4] Change to previous sprite animation
[5] Lock current sprite
[6] Enable / Disable Pokemon mode (take screenshots of enemies)
[7] Enable / Disable float mode (fly with up/down)
[8] Enable / Disable stage tile rulers
[9] Enable / Disable hidden tiles
]])
overlay = overlayCtx:render()
gui.renderctx.setnull()
return
end
game.getPositions()
local toggles = ""
if pokemon then
toggles = toggles..string.format("Pokemon: %d\n", pokecount)
end
if floatmode then
toggles = toggles.."Float on\n"
end
if questionable_tiles then
toggles = toggles.."All tiles on\n"
end
text(0, guiHeight - 40, toggles)
local directions = {
"Standard",
"Blur",
"Up"
}
local cameraDir = memory.readbyte(CAMERA_MODE)
local direction = directions[cameraDir+1]
local partyTileOffset = game.tileOffsetCalculation(game.partyX, game.partyY, game.vertical)
local stats = string.format([[
%s camera %d,%d
Vertical: %s
Tile offset: %04x
Main area: %04x
Current area: %04x
%s
]], direction, game.cameraX, game.cameraY, game.vertical, partyTileOffset, memory.readword(mem.addr.mainAreaNumber), memory.readword(mem.addr.currentAreaNumber), util.table_to_string(game.getInputs()):gsub("[\\{\\},\n\"]", ""):gsub("-1", "X"):gsub("0", "."):gsub("1", "O"):gsub("(.............)", "%1\n"))
text(guiWidth - 125, guiHeight - 200, stats)
text((game.partyX - game.cameraX) * 2, (game.partyY - game.cameraY) * 2 + 20, "Party")
local sprites = {}
for idx = 0,22,1 do
local base_addr = idx * mem.size.sprite + mem.addr.spriteBase
local sprite = get_sprite(base_addr)
sprites[idx] = sprite
if sprite.control == 0 then
goto continue
end
local sprcolor = BG_COLOR
if detailsidx == idx then
sprcolor = 0x00ff0000
elseif spritelist.Sprites[sprite.control] == -1 then
sprcolor = 0x66990000
elseif spritelist.Sprites[sprite.control] == 1 then
sprcolor = 0x66009900
end
text(sprite.screenX * 2, sprite.screenY * 2, string.format("%04x, %04x, %04x", sprite.control, sprite.animnum, sprite.attr), FG_COLOR, sprcolor)
local filename = os.getenv("HOME").."/neat-donk/catchem/"..sprite.animnum..","..sprite.attr..".png"
if pokemon and sprite.screenX > (guiWidth / 4) and sprite.screenY < (guiWidth / 4) * 3 and sprite.screenY > (guiHeight / 3) and sprite.screenY < guiHeight and not util.file_exists(filename) then
gui.screenshot(filename)
pokecount = pokecount + 1
end
::continue::
end
for i=1,#waypoints,1 do
local screenX = (waypoints[i].x - game.cameraX) * 2
local screenY = (waypoints[i].y - game.cameraY) * 2
if screenX > guiWidth - mem.size.tile * 2 then
screenX = guiWidth - mem.size.tile * 2
end
if screenY > guiHeight then
screenY = guiHeight - 20
end
if screenX < 0 then
screenX = 0
end
if screenY < 0 then
screenY = 0
end
text(screenX, screenY, "WAYPOINT "..i)
end
text(guiWidth / 2, guiHeight - 20, "WAYPOINTS: "..#waypoints)
if rulers and game.cameraX >= 0 then
local halfWidth = math.floor(guiWidth / 2)
local halfHeight = math.floor(guiHeight / 2)
local cameraTileX = math.floor(game.cameraX / mem.size.tile)
gui.line(0, halfHeight, guiWidth, halfHeight, BG_COLOR)
for i = cameraTileX, cameraTileX + guiWidth / mem.size.tile / 2,1 do
text((i * mem.size.tile - game.cameraX) * 2, halfHeight, tostring(i), FG_COLOR, BG_COLOR)
end
local cameraTileY = math.floor(game.cameraY / mem.size.tile)
gui.line(halfWidth, 0, halfWidth, guiHeight, BG_COLOR)
for i = cameraTileY, cameraTileY + guiHeight / mem.size.tile / 2,1 do
text(halfWidth, (i * mem.size.tile - game.cameraY) * 2, tostring(i), FG_COLOR, BG_COLOR)
end
end
local tilePtr = memory.readhword(mem.addr.tiledataPointer)
for x = -TILE_RADIUS, TILE_RADIUS, 1 do
for y = -TILE_RADIUS, TILE_RADIUS, 1 do
local tileX = math.floor((game.partyX + x * mem.size.tile) / mem.size.tile) * mem.size.tile
local tileY = math.floor((game.partyY + y * mem.size.tile) / mem.size.tile) * mem.size.tile
local offset = game.tileOffsetCalculation(tileX, tileY, game.vertical)
local tile = memory.readword(tilePtr + offset)
if not game.tileIsSolid(tileX, tileY, tile, offset) then
goto continue
end
local screenX = (tileX - 256 - game.cameraX) * 2
local screenY = (tileY - 256 - game.cameraY) * 2
if screenX < 0 or screenX > guiWidth or
screenY < 0 or screenY > guiHeight then
--goto continue
end
text(screenX, screenY, string.format("%04x\n%02x", bit.band(offset, 0xffff), tile), FG_COLOR, 0x66888800)
::continue::
end
end
if game.cameraX >= 0 then
local oam = memory2.OAM:readregion(0x00, 0x220)
for idx=0,0x200/4-1,1 do
local twoBits = bit.band(bit.lrshift(oam[0x201 + math.floor(idx / 4)], ((idx % 4) * 2)), 0x03)
local screenSprite = {
x = math.floor(oam[idx * 4 + 1] * ((-1) ^ bit.band(twoBits, 0x01))),
y = oam[idx * 4 + 2],
tile = oam[idx * 4 + 3],
flags = oam[idx * 4 + 4],
}
if screenSprite.x < 0 or screenSprite.y > guiHeight / 2 or screenSprite.y < mem.size.tile then
goto continue
end
for s=1,#sprites,1 do
local sprite = sprites[s]
if sprite.control == 0 then
goto nextsprite
end
if screenSprite.x > sprite.screenX - mem.size.enemy and screenSprite.x < sprite.screenX + mem.size.enemy / 2 and
screenSprite.y > sprite.screenY - mem.size.enemy and screenSprite.y < sprite.screenY then
goto continue
end
::nextsprite::
end
if bit.band(screenSprite.flags, 0x21) ~= 0x00 and screenSprite.tile >= 224 and screenSprite.tile <= 238 then
text(screenSprite.x * 2, screenSprite.y * 2, screenSprite.tile, 0x00000000, 0x00ffff00)
end
::continue::
end
end
if detailsidx ~= -1 then
sprite_details(detailsidx)
else
text(0, 20, "[1] <- Sprite Details Off -> [2]")
end
text(guiWidth - 125, 20, "Help [Hold 0]")
overlay = overlayCtx:render()
gui.renderctx.setnull()
end
function on_paint (not_synth)
frame = frame + 1
local guiWidth, guiHeight = gui.resolution()
if overlayCtx == nil then
overlayCtx = gui.renderctx.new(guiWidth, guiHeight)
end
if frame % 3 == 0 then
renderOverlay(guiWidth, guiHeight)
end
if overlay ~= nil then
overlay:draw(0, 0)
end
end
input.keyhook("1", true)
input.keyhook("2", true)
input.keyhook("3", true)
input.keyhook("4", true)
input.keyhook("5", true)
input.keyhook("6", true)
input.keyhook("7", true)
input.keyhook("8", true)
input.keyhook("9", true)
input.keyhook("0", true)
game.findPreferredExit():next(function(preferredExit)
return game.getWaypoints(preferredExit.x, preferredExit.y)
end):next(function(w)
waypoints = w
end)
-- fe0a58 crate: near bunch and klomp on barrels
-- fe0a58: Crate X position
-- fe0a60: Crate Y position
-- fe0a70 bunch: near crate and klomp on barrels
-- fe0a70: X position
-- fe0a72: Y position
|
--[[
- PLAIN FREAMEWORK ( https://github.com/viticm/plain-simple )
- $Id connect.lua
- @link https://github.com/viticm/plain-simple for the canonical source repository
- @copyright Copyright (c) 2021 viticm( viticm.ti@gmail.com )
- @license
- @user viticm( viticm.ti@gmail.com )
- @date 2021/12/06 13:56
- @uses The billing connect net packet proto define.
--]]
return {
request = {
},
response = {
},
id = 0xa0,
}
|
require "Scripts/Enemies/IEnemy"
require "Scripts/Levels/ILevel"
require "math"
Explosive =
{
_name = "Explosive",
_health = 3,
_damage = 10,
_attackPattern = {},
_speed = 0,
_modifiers = {},
}
setmetatable(Explosive, {__index = IEnemy})
Explosive.__index = Explosive
function Explosive:Create(newID, origX, origY)
local b = {}
setmetatable(b, Explosive)
b.__index = b
b._id = newID
b:Init()
print(self)
return b
end
function Explosive:Init()
self._attackPattern[1] = {0, 0}
self._animPath = "Images/Enemies/Explosive/FireSpinner_Anim.anim"
self._currAnimName = "idle"
self._isAlive = true
end
function Explosive:GetSpeed()
return self._speed;
end
function Explosive:Update()
if(self._modifiers["Fire"] == true) then
print("I'm on fire")
self._parentLevel:KillEnemyAtPos(self:GetPosX(), self:GetPosY());
end
end
function Explosive:Kill()
if(self._parentLevel == "NULL") then
print("Explosive.lua : NO PARENT")
return
end
if (not self:GetIsAlive()) then
print(self._name .. " " .. self:GetID() .. " is already dead")
return
end
print(self:GetID() .. ", " .. "exploded")
self:SetIsAlive(false)
self._parentLevel:KillEnemyAtPos(self._posX, self._posY)
self._parentLevel:KillEnemyAtPos(self._posX, self._posY - 1)
self._parentLevel:KillEnemyAtPos(self._posX - 1, self._posY)
self._parentLevel:KillEnemyAtPos(self._posX + 1, self._posY)
self._parentLevel:KillEnemyAtPos(self._posX, self._posY + 1)
self._modifiers["Fire"] = false
end
function Explosive:ContactWithStatic(other)
if(self._onFire) then
self._onFire = false
end
end
|
include('shared.lua')
function ENT:Initialize()
end
function ENT:Draw()
if IsValid( self.Entity:GetNWEntity( "QuestOwner", nil ) ) and self.Entity:GetNWEntity( "QuestOwner", nil ) != LocalPlayer() then return end
self.Entity:DrawModel()
end
|
local stdnse = require "stdnse"
local shortport = require "shortport"
local stringaux = require "stringaux"
local tn3270 = require "tn3270"
local table = require "table"
description = [[
Using the CICS transaction CEMT, this script attempts to gather information
about the current CICS transaction server region. It gathers OS information,
Datasets (files), transactions and user ids. Based on CICSpwn script by
Ayoub ELAASSAL.
]]
---
-- @args cics-info.commands Command used to access cics. Default is <code>cics</code>
-- @args cics-info.cemt CICS Transaction ID to be used. Default is <code>CEMT</code>
-- @args cics-info.trans Instead of gathering all transaction IDs supplying a name here
-- will make the script only look up one transaction ID
-- @args cics-info.user Username to use if access to CEMT requires authentication
-- @args cics-info.pass Password to use if access to CEMT requires authentication
--
-- @usage
-- nmap --script=cics-info -p 23 <targets>
--
-- nmap --script=cics-info --script-args cics-info.commands='logon applid(coolcics)',
-- cics-info.user=test,cics-info.pass=test,cics-info.cemt='ZEMT',
-- cics-info.trans=CICA -p 23 <targets>
--
-- @output
-- PORT STATE SERVICE VERSION
-- 23/tcp open tn3270 IBM Telnet TN3270 (TN3270E)
-- | cics-info:
-- | Security: Disabled
-- | System:
-- | z/OS Version: 02.01.00
-- | CICS Version: 05.02.00
-- | System ID: CICS
-- | Application ID: CICSFAKE
-- | Default User: USERCICS
-- | Datasets:
-- | CICS.FILEA
-- | HLQ123.CICS.DFHCSD
-- | HLQ123.CICS.DFHLRQ
-- | Libraries:
-- | HLQ123.CICS.SDFHLOAD
-- | Users:
-- | USERCICS
-- | Transaction / Program:
-- | AADD / DFH$AALL
-- | ABRW / DFH$ABRW
-- | AINQ / DFH$AALL
-- | AMNU / DFH$AMNU
-- | AORD / DFH$AREN
-- | AORQ / DFH$ACOM
-- | AREP / DFH$AREP
-- | AUPD / DFH$AALL
-- | CADP / DFHDPLU
-- ...
-- | CEDX / DFHEDFP
-- | CEGN / DFHCEGN
-- | CEHP / DFHCHS
-- | CEHS / DFHCHS
-- | CEJR / DFHEJITL
-- | CEMN / DFHCEMNA
-- | CEMT / DFHEMTP
-- | CEOT / DFHEOTP
-- | CXRT / DFHCRT
-- | DSNC / DFHD2CM1
-- @changelog
-- 2017-01-30 - v0.1 - created by Soldier of Fortran
author = "Philip Young aka Soldier of Fortran"
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
categories = {"discovery", "safe"}
portrule = shortport.port_or_service({23,992}, "tn3270")
--- Gathers CICS transaction server information
--
-- @param host host NSE object
-- @param port port NSE object
-- @param user CICS userID
-- @param pass CICS userID password
-- @param commands optional script-args of commands to use to get to CICS
-- @param cemt transaction ID to use instead of CEMT
-- @param trans transaction ID to check instead of gathering all
-- @return Status boolean true if CICS was detected.
-- @return Table of information or error message
local function cics_info( host, port, commands, user, pass, cemt, trans )
stdnse.debug("Checking for CICS")
local tn = tn3270.Telnet:new()
local status, err = tn:initiate(host,port)
local msg = 'Unable to get to CICS'
local more = true
local count = 1
local results = stdnse.output_table()
if not status then
stdnse.debug("Could not initiate TN3270: %s", err )
return false, msg
end
tn:get_screen_debug(2) -- prints TN3270 screen to debug
stdnse.debug("Getting to CICS")
local run = stringaux.strsplit(";%s*", commands)
for i = 1, #run do
stdnse.debug(1,"Issuing Command (#%s of %s): %s", i, #run ,run[i])
tn:send_cursor(run[i])
tn:get_all_data()
tn:get_screen_debug(2)
end
tn:get_all_data()
tn:get_screen_debug(2) -- for debug purposes
-- we should technically be at CICS. So we send:
-- * F3 to exit the CICS program
-- * CLEAR (a tn3270 command) to clear the screen.
-- (you need to clear before sending a transaction ID)
-- * a known default CICS transaction ID with predictable outcome
-- (CESF with 'Sign-off is complete.' as the result)
-- to confirm that we were in CICS. If so we return true
-- otherwise we return false
local count = 1
while not tn:isClear() and count < 6 do
-- some systems will just kick you off others are slow in responding
-- this loop continues to try getting out of CESL 6 times. If it can't
-- then we probably weren't in CICS to begin with.
if tn:find("Signon") then
stdnse.debug(2,"Found CESL/CESN 'Signon' sending PF3")
tn:send_pf(3)
tn:get_all_data()
end
tn:get_all_data()
stdnse.debug(2,"Clearing the Screen")
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
count = count + 1
end
if count == 6 then
return false, msg
end
stdnse.debug(2,"Sending CESF (CICS Default Sign-off)")
tn:send_cursor('CESF')
tn:get_all_data()
if tn:isClear() then
tn:get_all_data(1000)
end
tn:get_screen_debug(2)
if not tn:find('off is complete.') then
return false, 'Unable to get to CICS. Try --script-args cics-info.commands="logon applid(<applid>)"'
end
if user and pass then -- We're doing authenticated CICS testing now baby!
stdnse.verbose(2,'Logging in with %s / %s for auth testing', user, pass)
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
tn:send_cursor('CESN')
tn:get_all_data()
tn:get_screen_debug(2)
local fields = tn:writeable() -- Get the writeable field areas
local user_loc = {fields[1][1],user} -- This is the 'UserID:' field
local pass_loc = {fields[3][1],pass} -- This is the 'Password:' field ([2] is a group ID)
stdnse.verbose('Trying CICS: %s : %s', user, pass)
tn:send_locations({user_loc,pass_loc})
tn:get_all_data()
stdnse.debug(2,"Screen Received for User ID: %s / %s", user, pass)
tn:get_screen_debug(2)
count = 1
while not tn:find('DFHCE3549') and count < 6 do
tn:get_all_data(1000) -- loop for 6 seconds
tn:get_screen_debug(2)
count = count + 1
end
if not tn:find('DFHCE3549') then
msg = 'Unable to access CICS with User: '..user..' / Pass: '..pass
return false, msg
end
end
-- By now it's time to start trying to gather information
tn:send_clear()
tn:get_all_data()
tn:send_cursor('CESN')
tn:get_all_data()
tn:get_screen_debug(2)
results["Security"] = tn:find('DFHCE3547') and "Enabled" or "Disabled"
stdnse.debug(2,"Sending F3")
tn:send_pf(3)
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.debug(2,"Sending 'Clear Screen'")
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.verbose(2,"Sending 'CEMT INQUIRE SYSTEM'")
tn:send_cursor('CEMT INQUIRE SYSTEM')
tn:get_all_data()
tn:get_screen_debug(2)
if tn:find('DFHAC2002') then
results["Error"] = 'CEMT Access Denied.'
return true, results
elseif tn:find('NOT AUTHORIZED') then
results["System"] = "CEMT 'INQUIRE SYSTEM' Access Denied."
else
local sysresults = stdnse.output_table()
local l1, l2 = tn:find('Oslevel')
local oslevel = tn:get_screen_raw():sub(l2+2,l2+7)
l1, l2 = tn:find('Cicstslevel')
local cicstslevel = tn:get_screen_raw():sub(l2+2,l2+7)
l1, l2 = tn:find('Dfltuser')
local Dfltuser = tn:get_screen_raw():sub(l2+2,l2+10)
local Dfltuser_len = Dfltuser:find(')')
l1, l2 = tn:find('Db2conn')
local Db2conn = tn:get_screen_raw():sub(l2+2,l2+10)
local Db2conn_len = Db2conn:find(')')
l1, l2 = tn:find('Mqconn')
local Mqconn = tn:get_screen_raw():sub(l2+2,l2+10)
local Mqconn_len = Mqconn:find(')')
l1, l2 = tn:find('SYSID')
local SYSID = tn:get_screen_raw():sub(l2+2,l2+10)
local SYSID_len = SYSID:find('\00')
l1, l2 = tn:find('APPLID')
local APPLID = tn:get_screen_raw():sub(l2+2,l2+10)
local APPLID_len = APPLID:find('\00')
sysresults["z/OS Version"] = ("%s.%s.%s"):format( oslevel:sub(1,2),oslevel:sub(3,4),oslevel:sub(5,6) )
sysresults["CICS Version"] = ("%s.%s.%s"):format( cicstslevel:sub(1,2),cicstslevel:sub(3,4),cicstslevel:sub(5,6) )
sysresults["System ID"] = SYSID:sub(1,SYSID_len-1)
sysresults["Application ID"] = APPLID:sub(1,APPLID_len-1)
sysresults["Default User"] = Dfltuser:sub(1,Dfltuser_len-1)
if Db2conn_len > 1 then
sysresults["DB2 Connection"] = Db2conn:sub(1,Db2conn_len-1)
end
if Mqconn_len > 1 then
sysresults["MQ Connection"] = Mqconn:sub(1,Mqconn_len-1)
end
results["System"] = sysresults
end -- Done with INQUIRE SYSTEM
stdnse.debug(2,"Sending F3")
tn:send_pf(3)
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.debug(2,"Sending 'Clear Screen'")
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.verbose(2,"Sending 'CEMT INQUIRE DSNAME'")
tn:send_cursor('CEMT INQUIRE DSNAME')
tn:get_all_data()
tn:get_screen_debug(2)
if tn:find('NOT AUTHORIZED') then
results["Datasets"] = "CEMT 'INQUIRE DSNAME' Access Denied."
else
local datasets = {}
while more do
more = false
for line in tn:get_screen():gmatch("[^\r\n]+") do
if line:find('Dsn') then
table.insert(datasets,line:sub(line:find('%(')+1, line:find(')')-1):match( "(.-)%s*$" ))
if count >= 9 and line:find('+') then
more = true
count = 1
stdnse.debug(2,"Sending F11")
tn:send_pf(11)
tn:get_all_data()
tn:get_screen_debug(2)
else
count = count + 1
end
end
end
end
results["Datasets"] = datasets
end -- Done with DSNAME
stdnse.debug(2,"Sending F3")
tn:send_pf(3)
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.debug(2,"Sending 'Clear Screen'")
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.verbose(2,"Sending 'CEMT INQUIRE LIBRARY'")
tn:send_cursor('CEMT INQUIRE LIBRARY')
tn:get_all_data()
tn:get_screen_debug(2)
if tn:find('NOT AUTHORIZED') then
results["Libraries"] = "CEMT 'INQUIRE LIBRARY' Access Denied."
else
local libraries = {}
for line in tn:get_screen():gmatch("[^\r\n]+") do
if line:find('Dsname') then
table.insert(libraries,line:sub(line:find('%(')+1, line:find(')')-1):match( "(.-)%s*$" ))
end
end
results["Libraries"] = libraries
end -- Done with Library
stdnse.debug(2,"Sending F3")
tn:send_pf(3)
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.debug(2,"Sending 'Clear Screen'")
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.verbose(2,"Sending 'CEMT INQUIRE TASK'")
tn:send_cursor('CEMT INQUIRE TASK')
tn:get_all_data()
tn:get_screen_debug(2)
if tn:find('NOT AUTHORIZED') then
results["Users"] = "CEMT 'INQUIRE TASK' Access Denied."
else
count = 1
more = true
local users = {}
while more do
more = false
for line in tn:get_screen():gmatch("[^\r\n]+") do
if line:find('Use') then
table.insert(users,line:sub(line:find('Use')+4, line:find(')',line:find('Use'))-1):match( "(.-)%s*$" ))
if count >= 9 and line:find('+') then
more = true
count = 1
stdnse.debug(2,"Sending F11")
tn:send_pf(11)
tn:get_all_data()
tn:get_screen_debug(2)
else
count = count + 1
end
end
end
end
results["Users"] = users
end -- End of TASK
stdnse.debug(2,"Sending F3")
tn:send_pf(3)
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.debug(2,"Sending 'Clear Screen'")
tn:send_clear()
tn:get_all_data()
tn:get_screen_debug(2)
stdnse.verbose(2,"Sending 'CEMT INQUIRE TRANSACTION(".. trans ..") en'")
tn:send_cursor('CEMT INQUIRE TRANSACTION('.. trans ..') en')
tn:get_all_data()
tn:get_screen_debug(2)
if tn:find('NOT AUTHORIZED') then
results["Transaction / Program"] = "CEMT 'INQUIRE TRANSACION' Access Denied."
else
local transactions = {}
count = 1
more = true
local tra, pro = ''
while more do
more = false
for line in tn:get_screen():gmatch("[^\r\n]+") do
if line:find('Tra%(') then
tra = line:sub(line:find('%(')+1,line:find(')')-1)
pro = line:sub(line:find('Pro%(')+4,line:find(')',line:find('Pro%('))-1)
table.insert(transactions,tra..' / '..pro)
if count >= 9 and line:find('+') then
more = true
count = 1
stdnse.debug(2,"Sending F11")
tn:send_pf(11)
tn:get_all_data()
tn:get_screen_debug(2)
else
count = count + 1
end
end
end
end
results["Transaction / Program"] = transactions
end -- Done with Transaction IDs
tn:disconnect()
return true, results
end
action = function(host, port)
local commands = stdnse.get_script_args(SCRIPT_NAME .. '.commands') or 'cics'-- VTAM commands/macros to get to CICS
local username = stdnse.get_script_args(SCRIPT_NAME .. '.user') or nil
local password = stdnse.get_script_args(SCRIPT_NAME .. '.pass') or nil
if (username or password) and not (username and password) then
stdnse.verbose1("Both 'user' and 'pass' are required for CICS auth")
end
local CEMT = stdnse.get_script_args(SCRIPT_NAME .. '.cemt') or 'cemt' -- to supply a different transaction ID if they've changed it
local transaction = stdnse.get_script_args(SCRIPT_NAME .. '.trans') or '*'
local status, results = cics_info(host, port, commands, username, password, CEMT, transaction)
-- Report results. Only report an error if
-- script args were set or the service is definitely TN3270
if status or username or password or port.service == "tn3270" then
return results
end
end
|
-- ---------------------------------------------
-- ColladaShape.lua 2014/03/23
-- Copyright (c) 2014 Jun Mizutani,
-- released under the MIT open source license.
-- ---------------------------------------------
package.path = "../LjES/?.lua;" .. package.path
require("Collada")
require("Shape")
ColladaShape = Collada:new()
function ColladaShape.new(self)
local obj = Collada.new(self)
return obj
end
-- ----------------------------
-- setBones called from setShape
-- ----------------------------
function ColladaShape.setBones(self, mesh, shape, verts, newindex)
local joint_names = mesh:getJointNames()
if #joint_names == 0 then return end
self:printf("bone count = %d\n", #joint_names)
local skeleton = shape:getSkeleton()
local skinweights = mesh:getSkinWeights()
local ibp_matrices = mesh:getBindPoseMatrices()
local bind_shape_matrix = mesh:getBindShapeMatrix()
local found = false
local frame = self.rootFrame:findFrame(joint_names[1])
repeat
local count = frame:getNoOfBones(joint_names)
if count < #joint_names then
frame = frame.parent
else
found = true
end
until found or (frame == nil)
self:printf("bone root = %s\n", frame:getName())
frame:copyToBone(joint_names, bind_shape_matrix, skeleton,
nil, 0, self.printflag)
skeleton:setBoneOrder(joint_names)
skeleton:bindRestPose()
shape:shaderParameter("has_bone", 1)
-- register skin weights
-- skinweights = {
-- {bone_idx, weight, bone_idx, weight, .. }
-- {bone_idx, weight, bone_idx, weight, .. }
-- ..
-- }
local vert_count = #verts / 3
for i = 1, vert_count do
for n = 1, #newindex[i] do
local vindex = newindex[i][n]
local sw = skinweights[i]
local weight_count = #sw / 2
local tmp = {}
local min = 1.0
local imin = 0
for j = 0, weight_count - 1 do
local bone = sw[j * 2 + 1]
local weight = sw[j * 2 + 2]
if j < 4 then
if weight < min then min = weight; imin = j+1 end
table.insert(tmp, {bone, weight})
else
if weight > min then
tmp[imin] = {bone, weight}
min = 1.0
imin = 0
for m = 1, #tmp do
if tmp[m][2] < min then
min = tmp[m][2]
imin = m
end
end
end
end
end
-- normalize
local total_weight = 0
for m = 1, #tmp do
total_weight = total_weight + tmp[m][2]
end
for m = 1, #tmp do
shape:addVertexWeight(vindex, tmp[m][1], tmp[m][2] / total_weight)
end
end -- for n = 1, #newindex[i] do
end -- for i = 1, vert_count do
end
-- ----------------------------
-- setShape called from makeShapes
-- ----------------------------
function ColladaShape.setShape(self, nmesh, bone_enable, texture_select)
local mesh = self.meshes[nmesh]
local verts = mesh:getVertices()
local normals = mesh:getNormals()
local tex_table = mesh:getTextureCoord()
local polygons = mesh:getPolygons()
local bind_shape_matrix = mesh:getBindShapeMatrix()
local originx, originy, originz
if bind_shape_matrix ~= nil then
originx, originy, originz = unpack(bind_shape_matrix:getPosition())
else
originx, originy, originz = 0, 0, 0
end
self:printf("[%d]---- %s ----\n",nmesh , self.meshes[nmesh]:getName())
self:printf("vertices = %d\n", #verts/3)
self:printf("normals = %d\n", #normals/3)
local select
if texture_select > #tex_table then
select = #tex_table
else
select = texture_select
end
for m = 1, #tex_table do
local tex = tex_table[m]
self:printf("texture = %d\n", #tex/2)
end
self:printf("polygons = %d\n", #polygons)
local shape = Shape:new()
shape:setAutoCalcNormals(false)
shape:setTextureMappingMode(-1)
local joints = mesh:getJointNames()
if bone_enable and (#joints > 0) then
local skeleton = Skeleton:new()
shape:setSkeleton(skeleton)
end
-- conversion table from pos_index to final-vert-indices for weight
-- ex. newindex[pos_index] = {8, 10, 12}
local newindex = {}
for i = 1, #verts/3 do
table.insert(newindex, {})
end
local pos_index, nrm_index, tex_index
local x, y, z, u, v, nx, ny, nz, h
for i = 1, #polygons do
local indices = {}
for j = 1, #polygons[i] do
pos_index = polygons[i][j][1]
nrm_index = polygons[i][j][2]
tex_index = polygons[i][j][3]
x = verts[pos_index * 3 + 1] + originx
z = -verts[pos_index * 3 + 2] - originy
y = verts[pos_index * 3 + 3] + originz
nx = normals[nrm_index * 3 + 1]
nz = - normals[nrm_index * 3 + 2]
ny = normals[nrm_index * 3 + 3]
if #tex_table > 0 then
if (#tex_table[select] > 0) then
u = tex_table[select][tex_index * 2 + 1]
v = tex_table[select][tex_index * 2 + 2]
h = shape:addVertexPosUV({x, y, z}, {u, v})
end
else
h = shape:addVertex(x, y, z)
end
shape:setVertNormal(h, nx, ny, nz)
table.insert(indices, h - 1)
-- register h to conversion table
table.insert(newindex[pos_index+1], h)
end
shape:addPlane(indices)
end
if bone_enable and (#joints > 0) then
self:setBones(mesh, shape, verts, newindex)
shape:setAnimation(self.anim)
local skeleton = shape:getSkeleton()
self.anim:setData(skeleton, bind_shape_matrix)
end
return shape
end
-- ----------------------------
-- makeShapes
-- ----------------------------
function ColladaShape.makeShapes(self, bone_enable, verbose, tex_select)
self.printflag = verbose
if self.mesh_count == 0 then return nil end
-- if multi-texture, select one of these.
local texture_select = 1
if tex_select then
if tex_select > 1 and tex_select <= 3 then
texture_select = tex_select -- for multi-texture: 1 or 2 or 3
end
end
local shapes = {}
local shape
for k = 1, self.mesh_count do
shape = self:setShape(k, bone_enable, texture_select)
shape:endShape()
table.insert(shapes, shape)
end
return shapes
end
|
local Tunnel = module("_core", "lib/Tunnel")
local Proxy = module("_core", "lib/Proxy")
API = Proxy.getInterface("API")
cAPI = Tunnel.getInterface("API")
---------------------------
-- MEDIC MANAGEMENT API --
---------------------------
-- Variables
RegisterNetEvent('FRP:MEDIC:checkdeath')
AddEventHandler('FRP:MEDIC:checkdeath', function()
local player, distance = GetClosestPlayer()
if distance ~= -1 and distance <= 3.0 then
TriggerServerEvent('FRP:MEDIC:checkcallback', GetPlayerServerId(player))
-- TriggerEvent('chatMessage', 'SISTEMA', {255, 255, 255}, 'Curou o (' .. GetPlayerName(player) .. ')')
else
TriggerEvent('chatMessage', 'SISTEMA', {255, 255, 255}, 'Ninguem por perto')
end
end)
RegisterNetEvent('FRP:MEDIC:TreatmentCheck')
AddEventHandler('FRP:MEDIC:TreatmentCheck', function()
local player, distance = GetClosestPlayer()
if distance ~= -1 and distance <= 3.0 then
TriggerServerEvent('FRP:MEDIC:TreatmentCallback', GetPlayerServerId(player))
-- TriggerEvent('chatMessage', 'SISTEMA', {255, 255, 255}, 'Curou o (' .. GetPlayerName(player) .. ')')
else
TriggerEvent('chatMessage', 'SISTEMA', {255, 255, 255}, 'Ninguem por perto')
end
end)
RegisterNetEvent('FRP:MEDIC:revivecheck')
AddEventHandler('FRP:MEDIC:revivecheck', function()
local player, distance = GetClosestPlayer()
if distance ~= -1 and distance <= 3.0 then
TriggerServerEvent('FRP:MEDIC:revivecallback', GetPlayerServerId(player))
-- TriggerEvent('chatMessage', 'SISTEMA', {255, 255, 255}, 'Curou o (' .. GetPlayerName(player) .. ')')
else
TriggerEvent('chatMessage', 'SISTEMA', {255, 255, 255}, 'Ninguem por perto')
end
end)
-- RegisterNetEvent('FRP:MEDIC:ReceiveStatus')
-- AddEventHandler('FRP:MEDIC:ReceiveStatus', function(data)
-- if data.InstaDeath ~= nil then
-- if data.InstaDeath == true then
-- print('este player está em coma.')
-- end
-- print(data.InstaDeath)
-- end
-- if data.deathCause ~= nil then
-- print(data.deathCause)
-- end
-- if data.VitalPartDamage ~= nil then
-- if data.VitalPartDamage == true then
-- print('está gravemente ferido.')
-- end
-- print(data.VitalPartDamage)
-- end
-- if data.BodyPartDamage ~= nil then
-- print('Foi atingido em ' .. json.encode(data.BodyPartDamage))
-- print(data.BodyPartDamage)
-- end
-- end)
RegisterNetEvent('FRP:MEDIC:revive')
AddEventHandler('FRP:MEDIC:revive', function(data)
-- PUT HERE ANIMATION
print('playanim')
end)
function isNearPlayer()
local player, distance = GetClosestPlayer()
if distance ~= -1 and distance <= 2.0 then
return player, distance
else
return false
end
return false
end
function GetPlayers()
local players = {}
for _,player in ipairs(GetActivePlayers()) do
local ped = GetPlayerPed(player)
if DoesEntityExist(ped) then
table.insert(players, player)
end
end
return players
end
function GetClosestPlayer()
local players, closestDistance, closestPlayer = GetPlayers(), -1, -1
local coords, usePlayerPed = coords, false
local playerPed, playerId = PlayerPedId(), PlayerId()
if coords then
coords = vector3(coords.x, coords.y, coords.z)
else
usePlayerPed = true
coords = GetEntityCoords(playerPed)
end
for i=1, #players, 1 do
local target = GetPlayerPed(players[i])
if not usePlayerPed or (usePlayerPed and players[i] ~= playerId) then
local targetCoords = GetEntityCoords(target)
local distance = #(coords - targetCoords)
if closestDistance == -1 or closestDistance > distance then
closestPlayer = players[i]
closestDistance = distance
end
end
end
return closestPlayer, closestDistance
end
|
-----------------------------------------
-- LOCALIZED GLOBAL VARIABLES
-----------------------------------------
local ZGV = _G.ZGV
local tinsert,tremove,sort,min,max,floor,type,pairs,ipairs = table.insert,table.remove,table.sort,math.min,math.max,math.floor,type,pairs,ipairs
local print = ZGV.print
local L = ZGV.L
local help_string = [[ Options:
reset - Reset Guide Viewer to original position, and settings.
show - Show the Guide Viewer.
hide - Hide the Guide Viewer.
config - Show configuration.
]]
if ZGV.DEV then
help_string = help_string..[[
debug - Toggle debug on and off.
error - Toggle ignore errors. Requires a reload
]]
end
-----------------------------------------
-- FUNCTIONS
-----------------------------------------
function ZGV.SlashCommandHandler(text) --TODO
local self = ZGV
if text == "debug" then
self.sv.profile.debug = not self.sv.profile.debug
ZGV:Print(("Debug is %s"):format(self.sv.profile.debug and "on" or "off"))
elseif text == "error" then
self.sv.profile.ignoreErrors = not self.sv.profile.ignoreErrors
ZGV:Print("Please reload for errors to get handled properly.")
elseif text == "report" or text=="bug" then
if not ZGV.BugReport then
ZGV:Print("BugReport feature not loaded. Sorry!")
return
end
ZGV.BugReport:ShowReport()
elseif text == "reset" then
ZGV.Viewer:ResetAllViewerSettings()
elseif text == "show" then
ZGV.Viewer:Show_GuideViewer()
elseif text == "hide" then
ZGV.Viewer:Hide_GuideViewer()
elseif text == "config" then
ZGV.Settings:OpenSettings()
elseif text == "creator" then
ZGV.Creator = not ZGV.Creator
self.sv.char.creator = not self.sv.char.creator
ZGV:Print(("Creator Mode is now %s"):format(self.sv.char.creator and "on" or "off"))
elseif text == "dev" or text=="developer" then
ZGV.DEV = not ZGV.DEV
self.sv.char.developer = not self.sv.char.developer
ZGV:Print(("Developer Mode is now %s"):format(self.sv.char.developer and "on" or "off"))
else
ZGV:Print(help_string)
end
end
-----------------------------------------
-- LOCAL FUNCTIONS
-----------------------------------------
local function registerSlashCommands()
local SLASH_COMMANDS, zo_loadstring = _G.SLASH_COMMANDS, _G.zo_loadstring
SLASH_COMMANDS["/zgv"] = ZGV.SlashCommandHandler
SLASH_COMMANDS["/zygor"] = SLASH_COMMANDS["/zgv"]
SLASH_COMMANDS["/run"] = SLASH_COMMANDS["/script"]
SLASH_COMMANDS["/re"] = SLASH_COMMANDS["/reloadui"]
SLASH_COMMANDS["/dump"] = function(text)
local f,err = zo_loadstring( ("d(%s)"):format(text) )
if f then
f()
else
local d = _G.d
d("|cffff0000Error:|r "..err)
end
end
end
-----------------------------------------
-- STARTUP
-----------------------------------------
tinsert(ZGV.startups,function(self)
registerSlashCommands()
end)
|
class("SecondSummaryPage5", import(".SummaryAnimationPage")).OnInit = function (slot0)
setText(slot0._tf:Find("window_6/name"), slot0.summaryInfoVO.name)
setText(slot0._tf:Find("window_6/time/Text"), "「" .. slot0.summaryInfoVO.registerTime .. "」")
setText(slot0._tf:Find("window_6/day/Text"), slot0.summaryInfoVO.days)
slot1 = slot0.summaryInfoVO:hasGuild()
setActive(slot0._tf:Find("window_7/has_guild"), slot1)
setActive(slot0._tf:Find("window_7/without"), not slot1)
if slot1 then
setText(slot0._tf:Find("window_7/has_guild/guild_name/Text"), "「" .. slot0.summaryInfoVO.guildName .. "」")
setText(slot0._tf:Find("window_7/has_guild/chapter_name/Text"), "「" .. slot0.summaryInfoVO.chapterName .. "」")
setText(slot0._tf:Find("window_7/has_guild/number/Text"), slot0.summaryInfoVO.proposeCount)
else
setText(slot0._tf:Find("window_7/without/chapter_name/Text"), "「" .. slot0.summaryInfoVO.chapterName .. "」")
setText(slot0._tf:Find("window_7/without/number/Text"), slot0.summaryInfoVO.proposeCount)
end
setText(slot0._tf:Find("window_8/number/Text"), slot0.summaryInfoVO.medalCount)
setText(slot0._tf:Find("window_8/count/Text"), slot0.summaryInfoVO.furnitureCount)
setText(slot0._tf:Find("window_8/coin/Text"), slot0.summaryInfoVO.furnitureWorth)
end
return class("SecondSummaryPage5", import(".SummaryAnimationPage"))
|
local Concord = require "libs.concord"
local Player = Concord.component(function(c)
c.speed = 100
c.jumpForce = 80
end)
return Player
|
-- Copyright (C) 2011-2015 Anton Burdinuk
-- clark15b@gmail.com
-- https://tsdemuxer.googlecode.com/svn/trunk/xupnpd
upnp_type=
{
['video'] = 1,
['audio'] = 2,
['image'] = 3
}
upnp_class=
{
['video'] = 'object.item.videoItem',
['audio'] = 'object.item.audioItem.musicTrack'
}
upnp_proto=
{
['avi'] = 'http-get:*:video/avi:',
['asf'] = 'http-get:*:video/x-ms-asf:',
['wmv'] = 'http-get:*:video/x-ms-wmv:',
['mp4'] = 'http-get:*:video/mp4:',
['mpeg'] = 'http-get:*:video/mpeg:',
['mpeg2'] = 'http-get:*:video/mpeg2:',
['mp2t'] = 'http-get:*:video/mp2t:',
['mp2p'] = 'http-get:*:video/mp2p:',
['mov'] = 'http-get:*:video/quicktime:',
['mkv'] = 'http-get:*:video/x-matroska:',
['mka'] = 'http-get:*:audio/x-matroska:',
['3gp'] = 'http-get:*:video/3gpp:',
['flv'] = 'http-get:*:video/x-flv:',
['aac'] = 'http-get:*:audio/x-aac:',
['ac3'] = 'http-get:*:audio/x-ac3:',
['mp3'] = 'http-get:*:audio/mpeg:',
['ogg'] = 'http-get:*:audio/x-ogg:',
['wma'] = 'http-get:*:audio/x-ms-wma:'
}
-- DLNA.ORG_PN, DLNA.ORG_OP, DLNA.ORG_CI, DLNA.ORG_FLAGS
-- DLNA.ORG_OP=00 - no seek; DLNA.ORG_OP=01 - seek
dlna_org_extras=
{
['none'] = '*',
-- video
['mpeg_ps_pal'] = 'DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ps_pal_ac3'] = 'DLNA.ORG_PN=MPEG_PS_PAL_XAC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ps_ntsc'] = 'DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ps_ntsc_ac3'] = 'DLNA.ORG_PN=MPEG_PS_NTSC_XAC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg1'] = 'DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ts_sd'] = 'DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ts_hd'] = 'DLNA.ORG_PN=MPEG_TS_HD_NA;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['avchd'] = 'DLNA.ORG_PN=AVC_TS_HD_50_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wmv_med_base'] = 'DLNA.ORG_PN=WMVMED_BASE;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wmv_med_full'] = 'DLNA.ORG_PN=WMVMED_FULL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wmv_med_pro'] = 'DLNA.ORG_PN=WMVMED_PRO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wmv_high_full'] = 'DLNA.ORG_PN=WMVHIGH_FULL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wmv_high_pro'] = 'DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['asf_mpeg4_sp'] = 'DLNA.ORG_PN=MPEG4_P2_ASF_SP_G726;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['asf_mpeg4_asp_l4'] = 'DLNA.ORG_PN=MPEG4_P2_ASF_ASP_L4_SO_G726;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['asf_mpeg4_asp_l5'] = 'DLNA.ORG_PN=MPEG4_P2_ASF_ASP_L5_SO_G726;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['asf_vc1_l1'] = 'DLNA.ORG_PN=VC1_ASF_AP_L1_WMA;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mp4_avc_sd_mp3'] = 'DLNA.ORG_PN=AVC_MP4_MP_SD_MPEG1_L3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mp4_avc_sd_ac3'] = 'DLNA.ORG_PN=AVC_MP4_MP_SD_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mp4_avc_hd_ac3'] = 'DLNA.ORG_PN=AVC_MP4_MP_HD_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mp4_avc_sd_aac'] = 'DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ts_hd_mp3'] = 'DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ts_hd_ac3'] = 'DLNA.ORG_PN=AVC_TS_MP_HD_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ts_mpeg4_asp_mp3'] = 'DLNA.ORG_PN=MPEG4_P2_TS_ASP_MPEG1_L3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['mpeg_ts_mpeg4_asp_ac3'] = 'DLNA.ORG_PN=MPEG4_P2_TS_ASP_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['avi'] = 'DLNA.ORG_PN=AVI;DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['divx5'] = 'DLNA.ORG_PN=PV_DIVX_DX50;DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
-- audio
['mp3'] = 'DLNA.ORG_PN=MP3;DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['ac3'] = 'DLNA.ORG_PN=AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wma_base'] = 'DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wma_full'] = 'DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
['wma_pro'] = 'DLNA.ORG_PN=WMAPRO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000'
}
mime=
{
['avi'] = { upnp_type.video, upnp_class.video, 'video/avi', upnp_proto.avi, dlna_org_extras.divx5 },
['asf'] = { upnp_type.video, upnp_class.video, 'video/x-ms-asf', upnp_proto.asf, dlna_org_extras.asf_mpeg4_sp },
['wmv'] = { upnp_type.video, upnp_class.video, 'video/x-ms-wmv', upnp_proto.wmv, dlna_org_extras.wmv_med_full },
['mp4'] = { upnp_type.video, upnp_class.video, 'video/mp4', upnp_proto.mp4, dlna_org_extras.none },
['mpeg'] = { upnp_type.video, upnp_class.video, 'video/mpeg', upnp_proto.mpeg, dlna_org_extras.mpeg_ps_pal }, -- video/x-mpeg
['mpeg_ts']= { upnp_type.video, upnp_class.video, 'video/mpeg', upnp_proto.mpeg, dlna_org_extras.mpeg_ts_sd }, -- for Sharp
['mpeg1'] = { upnp_type.video, upnp_class.video, 'video/mpeg', upnp_proto.mpeg, dlna_org_extras.mpeg1 },
['mpeg2'] = { upnp_type.video, upnp_class.video, 'video/mpeg2', upnp_proto.mpeg2, dlna_org_extras.mpeg_ps_pal },
['ts'] = { upnp_type.video, upnp_class.video, 'video/mp2t', upnp_proto.mp2t, dlna_org_extras.mpeg_ts_hd },
['mp2t'] = { upnp_type.video, upnp_class.video, 'video/mp2t', upnp_proto.mp2t, dlna_org_extras.mpeg_ts_hd },
['mp2p'] = { upnp_type.video, upnp_class.video, 'video/mp2p', upnp_proto.mp2p, dlna_org_extras.mpeg_ps_pal },
['mov'] = { upnp_type.video, upnp_class.video, 'video/quicktime', upnp_proto.mov, dlna_org_extras.none },
['mkv'] = { upnp_type.video, upnp_class.video, 'video/x-mkv', upnp_proto.mkv, dlna_org_extras.none }, -- video/x-matroska
['3gp'] = { upnp_type.video, upnp_class.video, 'video/3gpp', upnp_proto['3gp'],dlna_org_extras.none },
['flv'] = { upnp_type.video, upnp_class.video, 'video/x-flv', upnp_proto.flv, dlna_org_extras.none },
['aac'] = { upnp_type.audio, upnp_class.audio, 'audio/x-aac', upnp_proto.aac, dlna_org_extras.none },
['ac3'] = { upnp_type.audio, upnp_class.audio, 'audio/x-ac3', upnp_proto.ac3, dlna_org_extras.ac3 },
['mp3'] = { upnp_type.audio, upnp_class.audio, 'audio/mpeg', upnp_proto.mp3, dlna_org_extras.mp3 },
['ogg'] = { upnp_type.audio, upnp_class.audio, 'application/ogg', upnp_proto.ogg, dlna_org_extras.none },
['wma'] = { upnp_type.audio, upnp_class.audio, 'audio/x-ms-wma', upnp_proto.wma, dlna_org_extras.wma_full }
}
|
-- MYTHIC MONKEY BOSS --
-- MYTHIC MONKEY ( mythic_monkey )
-- MONKEY MAULER ( monkey_mauler )
-- DIVINE MONKEY ( divine_monkey )
-- MONKEY BASHER ( monkey_basher )
-- SPIRIT MONKEY ( spirit_monkey )
-- MONKEY AVENGER ( monkey_avenger )
-- [ MONKEY 1 KEY BOSS ] --
dummy_mythic_monkey = {
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_mythic.on_attacked(mob, attacker, 0)
end,
move = function(mob, target)
mob_ai_mythic.move(mob, target, 0)
end,
attack = function(mob, target)
mob_ai_mythic.attack(mob, target, 2)
end,
after_death = function(mob)
mob_ai_mythic.after_death(mob)
end
}
-- [ MONKEY 1 ITEM BOSS ] --
dummy_monkey_mauler = {
on_spawn = function(mob)
mob:warp(167, 18, 22)
end,
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_mythic.on_attacked(mob, attacker, 0)
end,
move = function(mob, target)
mob_ai_mythic.move(mob, target, 0)
end,
attack = function(mob, target)
mob_ai_mythic.attack(mob, target, 2)
end,
after_death = function(mob)
mob_ai_mythic.after_death(mob)
end
}
-- [ MONKEY 2 KEY BOSS ] --
dummy_divine_monkey = {
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_mythic.on_attacked(mob, attacker, 1)
end,
move = function(mob, target)
mob_ai_mythic.move(mob, target, 1)
end,
attack = function(mob, target)
mob_ai_mythic.attack(mob, target, 0)
end,
after_death = function(mob)
mob_ai_mythic.after_death(mob)
end
}
-- [ MONKEY 2 ITEM BOSS ] --
dummy_monkey_basher = {
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_mythic.on_attacked(mob, attacker, 1)
end,
move = function(mob, target)
mob_ai_mythic.move(mob, target, 1)
end,
attack = function(mob, target)
mob_ai_mythic.attack(mob, target, 0)
end,
after_death = function(mob)
mob_ai_mythic.after_death(mob)
end
}
-- [ MONKEY 3 KEY BOSS ] --
dummy_spirit_monkey = {
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_mythic.on_attacked(mob, attacker, 2)
end,
move = function(mob, target)
mob_ai_mythic.move(mob, target, 2)
end,
attack = function(mob, target)
mob_ai_mythic.attack(mob, target, 0)
end,
after_death = function(mob)
mob_ai_mythic.after_death(mob)
end
}
-- [ MONKEY 3 ITEM BOSS ] --
dummy_monkey_avenger = {
on_healed = function(mob, healer)
mob_ai_basic.on_healed(mob, healer)
end,
on_attacked = function(mob, attacker)
mob_ai_mythic.on_attacked(mob, attacker, 2)
end,
move = function(mob, target)
mob_ai_mythic.move(mob, target, 2)
end,
attack = function(mob, target)
mob_ai_mythic.attack(mob, target, 0)
end,
after_death = function(mob)
mob_ai_mythic.after_death(mob)
end
}
|
object_tangible_saga_system_rewards_planet_hologram_tatooine_02 = object_tangible_saga_system_rewards_shared_planet_hologram_tatooine_02:new {
}
ObjectTemplates:addTemplate(object_tangible_saga_system_rewards_planet_hologram_tatooine_02, "object/tangible/saga_system/rewards/planet_hologram_tatooine_02.iff")
|
--- Schadensklassen
DamageClasses = {}
DamageClasses.DC_Bullet = nil
DamageClasses.DC_Chaos = nil
DamageClasses.DC_Evil = nil
DamageClasses.DC_Hero = nil
DamageClasses.DC_Pierce = nil
DamageClasses.DC_Siege = nil
DamageClasses.DC_Strike = nil
|
function Teleporting_onUse21 (pUnit, Event, pMisc)
pMisc:Teleport (530,-2541.02,6387.15,201.629)
end
RegisterGameObjectEvent (5000025, 4, "Teleporting_onUse21")
|
local ICON = "__MomosTweak__/graphics/icons/"
local subgroup = data.raw.item["iron-stick"].subgroup
local name = "advanced-plastics"
local expectResult = {"advanced-plastics", 1}
local recipeName = momoTweak.genRecipeNameFromResult(expectResult)
data:extend({
{
type = "item",
name = "advanced-plastics",
icon = ICON .."advanced-plastics.png",
icon_size = 32,
subgroup = subgroup,
order = "f[advanced-plastics]",
stack_size = 200
},
{
type = "recipe",
name = recipeName,
category = "advanced-chemistry",
enabled = false,
energy_required = 20,
ingredients = {
{type="fluid", name="liquid-plastic", amount=25},
{type="fluid", name="liquid-resin", amount=12},
{type="fluid", name="liquid-ferric-chloride-solution", amount=15},
{type="item", name="solid-carbon", amount=3}
},
results = {expectResult},
}
})
bobmods.lib.tech.add_recipe_unlock("plastic-2", recipeName)
bobmods.lib.recipe.add_ingredient("low-density-structure", {"advanced-plastics", 8})
if data.raw.item["habitation"] then
bobmods.lib.recipe.add_ingredient("habitation", {"advanced-plastics", 500})
end
if data.raw.item["command"] then
bobmods.lib.recipe.add_ingredient("command", {"advanced-plastics", 200})
end
|
client_script 'client.lua'
server_script '@mysql-async/lib/MySQL.lua'
server_script 'server.lua'
|
function Command_Build_Mode_Cancel(Client_ID, Command, Text_0, Text_1, Arg_0, Arg_1, Arg_2, Arg_3, Arg_4)
System_Message_Network_Send(Client_ID, Lang_Get("", "Buildmode: Canceled"))
local State = Build_Mode_State_Get(Client_ID)
if State == 2 then
Build_Mode_String_Set(Client_ID, 0, "")
end
CPE_Selection_Cuboid_Delete(Client_ID, 254)
CPE_Selection_Cuboid_Delete(Client_ID, 253)
CPE_Selection_Cuboid_Delete(Client_ID, 252)
CPE_Selection_Cuboid_Delete(Client_ID, 250)
Build_Mode_String_Set(Client_ID, 0, "")
Build_Mode_Set(Client_ID, "Normal")
end
function Command_Build_Mode_Accept(Client_ID, ...)
local State = Build_Mode_State_Get(Client_ID)
if State == 2 and Build_Mode_Get(Client_ID) == "Export Map-Area" then
local X_0, Y_0, Z_0 = Build_Mode_Coordinate_Get(Client_ID, 1)
local X_1, Y_1, Z_1 = Build_Mode_Coordinate_Get(Client_ID, 0)
local Filename = Build_Mode_String_Get(Client_ID, 0)
Map_Export(Client_Get_Map_ID(Client_ID), X_0, Y_0, Z_0, X_1, Y_1, Z_1, Filename)
System_Message_Network_Send(Client_ID, Lang_Get("", "Buildmode: Export: Saved"))
CPE_Selection_Cuboid_Delete(Client_ID, 254)
Build_Mode_Set(Client_ID, "Normal")
elseif State == 2 and Build_Mode_Get(Client_ID) == "Box" then
local Block_Type = Build_Mode_Long_Get(Client_ID, 3)
local X_0, Y_0, Z_0 = Build_Mode_Coordinate_Get(Client_ID, 1)
local X_1, Y_1, Z_1 = Build_Mode_Coordinate_Get(Client_ID, 0)
local Replace_Material = Build_Mode_Long_Get(Client_ID, 0)
local Hollow = Build_Mode_Long_Get(Client_ID, 1)
local Player_Number = Entity_Get_Player(Client_Get_Entity(Client_ID))
local Blocks = math.abs(X_0-X_1)*math.abs(Y_0-Y_1)*math.abs(Z_0-Z_1)
if Hollow == 0 and Blocks < 500000 then
Build_Box_Player(Player_Number, Client_Get_Map_ID(Client_ID), X_0, Y_0, Z_0, X_1, Y_1, Z_1, Block_Type, Replace_Material, Hollow, 2, 1, 0)
System_Message_Network_Send(Client_ID, Lang_Get("", "Buildmode: Box created"))
elseif Hollow == 1 and Blocks < 5000000 then
Build_Box_Player(Player_Number, Client_Get_Map_ID(Client_ID), X_0, Y_0, Z_0, X_1, Y_1, Z_1, Block_Type, Replace_Material, Hollow, 2, 1, 0)
System_Message_Network_Send(Client_ID, Lang_Get("", "Buildmode: Box created"))
else
System_Message_Network_Send(Client_ID, Lang_Get("", "Buildmode: Box too big"))
end
Build_Mode_Set(Client_ID, "Normal")
CPE_Selection_Cuboid_Delete(Client_ID, 250)
Build_Mode_String_Set(Client_ID, 0, "")
end
end
|
-- // Dependencies
--local PlayerManager, Base = loadstring(game:HttpGet("https://raw.githubusercontent.com/Stefanuk12/ROBLOX/master/Universal/ESP/PlayerManager.lua"))()
local PlayerManager, Base = loadstring(game:HttpGet("https://raw.githubusercontent.com/InkognoitoCurry/ROBLOX/master/Universal/ESP/PlayerManager.lua"))()
-- // Create a manager
local Manager = PlayerManager.new()
-- // Configure Base
Base.Box.GlobalLookAtCamera = true
-- // Start the ESP
Manager:Start()
|
----MAXIME
function addPurchaseHistory(thePlayer, perkName, cost)
return true
end
function fetchStations()
dbQuery(
function(qh)
local res, rows, err = dbPoll(qh, 0)
if rows > 0 then
for index, row in ipairs(res) do
if type(row["owner"]) == "string" then
table.insert(donorStations, row )
else
table.insert(defaultStations, row )
end
end
end
end,
mysql:getConnection(), "SELECT `id`, `station_name`, `source`, (SELECT `username` FROM `accounts` WHERE `accounts`.`id`=`owner`) AS `owner`, `register_date`, `expire_date`, `enabled`, `order` FROM `radio_stations` WHERE (`expire_date` IS NULL) OR (`expire_date` > NOW()) ORDER BY `order` ")
return defaultStations, donorStations
end
function openRadioManager()
if source then
client = source
end
local defaultStations, donorStations = fetchStations()
triggerClientEvent(client, "openRadioManager", client, defaultStations, donorStations)
end
addEvent("openRadioManager", true)
addEventHandler("openRadioManager", root, openRadioManager)
function createNewStation(name, ip, donorStation)
if name and ip then
if donorStation then
addPurchaseHistory(client, "Purchased new radio station (Name: '"..name.."', URL: '"..ip.."')", 10)
local smallestID = SmallestID()
dbExec(mysql:getConnection(),"INSERT INTO `radio_stations` SET `id`='"..smallestID.."', `station_name`='"..exports.mrp_global:toSQL(name).."', `source`='"..exports.mrp_global:toSQL(ip).."', `order`='"..smallestID.."', `owner`='"..getElementData(client, "account:id").."', `expire_date`=(NOW() + interval 30 day) ")
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "New radio station has been successfully created! (Name: "..name..", URL: "..ip..")")
setElementData(client, "gui:ViewingRadioManager", true, true)
forceUpdateClientsGUI()
else
local smallestID = SmallestID()
dbExec(mysql:getConnection(),"INSERT INTO `radio_stations` SET `id`='"..smallestID.."', `station_name`='"..exports.mrp_global:toSQL(name).."', `source`='"..exports.mrp_global:toSQL(ip).."', `order`='"..smallestID.."' ")
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "New radio station has been successfully created! (Name: "..name..", URL: "..ip..")")
forceUpdateClientsGUI()
end
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not create new radio station.")
end
end
addEvent("createNewStation", true)
addEventHandler("createNewStation", root, createNewStation)
function editStation(id, name, ip)
if id and name and ip and dbExec(mysql:getConnection(),"UPDATE `radio_stations` SET `station_name`='"..exports.mrp_global:toSQL(name).."', `source`='"..exports.mrp_global:toSQL(ip).."' WHERE `id`='"..id.."' ") then
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Updated radio station #"..id.." successfully!")
forceUpdateClientsGUI()
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not update radio station #"..id)
end
end
addEvent("editStation", true)
addEventHandler("editStation", root, editStation)
function deleteStation(id)
if id and dbExec(mysql:getConnection(),"DELETE FROM `radio_stations` WHERE `id`='"..id.."' ") then
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Deleted radio station #"..id..".")
forceUpdateClientsGUI()
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not delete radio station #"..id..".")
end
end
addEvent("deleteStation", true)
addEventHandler("deleteStation", root, deleteStation)
function togStation(id, state)
if id and state and dbExec(mysql:getConnection(),"UPDATE `radio_stations` SET `enabled`='"..(state == "Activated" and "1" or "0").."' WHERE `id`='"..id.."' ") then
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Radio station #"..id.." has been "..state.."!")
forceUpdateClientsGUI()
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not update radio station #"..id)
end
end
addEvent("togStation", true)
addEventHandler("togStation", root, togStation)
function moveStationPosition(id, name, order, movingUp, donorStation)
if id and tonumber(id) and order and tonumber(order) then
id = tonumber(id)
order = tonumber(order)
if donorStation then
addPurchaseHistory(client, "Moved radio station position (Name: '"..name.."', Direction: '"..(movingUp and "Up" or "Down").."')", 1)
end
if movingUp then
if order < 2 then
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "This radio station is already on top.")
return false
end
if dbExec(mysql:getConnection(),"UPDATE `radio_stations` SET `order`=`order`-1 WHERE `id`='"..(id).."' ") then
forceUpdateClientsGUI()
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Radio station '"..name.."' has been moved up!")
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not move radio station.")
end
else
if dbExec(mysql:getConnection(),"UPDATE `radio_stations` SET `order`=`order`+1 WHERE `id`='"..(id).."' ") then
forceUpdateClientsGUI()
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Radio station '"..name.."' has been moved down!")
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not move radio station.")
end
end
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not move radio station's position.")
end
end
addEvent("moveStationPosition", true)
addEventHandler("moveStationPosition", root, moveStationPosition)
function renewStation(station, duration)
if station and duration and tonumber(duration) then
local id = station[1]
local cost = nil
if duration == 7 then
cost = 3
elseif duration == 30 then
cost = 10
elseif duration == 90 then
cost = 25
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not renew radio station #"..id)
return false
end
addPurchaseHistory(client, "Renewed radio station (ID: '"..id.."', Name: '"..station[2].."', Duration: '"..duration.." days')", cost)
if not dbExec(mysql:getConnection(),"UPDATE `radio_stations` SET `expire_date`=(`expire_date` + interval "..duration.." day) WHERE `id`='"..(id).."' ") then
return false
end
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "You have successfully renewed Radio Station ID#"..id.."!")
forceUpdateClientsGUI()
else
exports.mrp_hud:sendBottomNotification(client, "Radio Station Manager", "Could not renew radio station #"..id)
end
end
addEvent("renewStation", true)
addEventHandler("renewStation", root, renewStation)
function forceUpdateClientsGUI()
local defaultStations, donorStations = fetchStations()
for i, player in pairs(getElementsByType("player")) do
if getElementData(player, "gui:ViewingRadioManager") then
triggerClientEvent(player, "openRadioManager", player, defaultStations, donorStations)
end
end
end
function SmallestID( ) -- finds the smallest ID in the SQL instead of auto increment
local result = dbPoll(dbQuery(mysql:getConnection(), "SELECT MIN(e1.id+1) AS nextID FROM radio_stations AS e1 LEFT JOIN radio_stations AS e2 ON e1.id +1 = e2.id WHERE e2.id IS NULL"), -1)
if result then
local id = tonumber(result["nextID"]) or 1
return id
end
return false
end
|
project "glfw"
kind "StaticLib"
language "c"
includedirs {"glfw/include", "glfw/src"}
targetdir "../libs"
objdir "../tmp/glfw"
files {
"glfw/src/internal.h",
"glfw/include/GLFW/glfw3.h",
"glfw/include/GLFW/glfw3native.h",
"glfw/src/clipboard.c", "glfw/src/context.c", "glfw/src/gamma.c", "glfw/src/init.c",
"glfw/src/input.c", "glfw/src/joystick.c", "glfw/src/monitor.c", "glfw/src/time.c",
"glfw/src/window.c"
};
defines {"_GLFW_USE_OPENGL"}
configuration "windows"
defines {"_GLFW_WIN32", "_GLFW_WGL"}
files { "glfw/src/win32_*" }
files { "glfw/src/wgl_*" }
configuration "linux"
defines {"_GLFW_X11", "_GLFW_GLX"}
files { "glfw/src/x11_*" }
files { "glfw/src/glx_*" }
buildoptions{ "-lGL" }
configuration "osx"
defines {"_GLFW_COCOA", "_GLFW_NSGL"}
files { "glfw/src/cocoa_*" }
files { "glfw/src/nsgl_*" }
buildoptions{ "-framework OpenGL" }
configuration "Debug"
targetsuffix "D"
defines "_DEBUG"
flags "Symbols"
configuration "Release"
defines "NDEBUG"
flags {"OptimizeSpeed", "NoFramePointer", "ExtraWarnings", "NoEditAndContinue"};
|
module(...,package.seeall)
local ffi = require("ffi")
local types = require("pf.types") -- Load FFI declarations.
local pcap -- The pcap library, lazily loaded.
local verbose = os.getenv("PF_VERBOSE");
local MAX_UINT32 = 0xffffffff
ffi.cdef[[
typedef struct pcap pcap_t;
int pcap_datalink_name_to_val(const char *name);
pcap_t *pcap_open_dead(int linktype, int snaplen);
void pcap_perror(pcap_t *p, const char *suffix);
int pcap_compile(pcap_t *p, struct bpf_program *fp, const char *str,
int optimize, uint32_t netmask);
int pcap_offline_filter(const struct bpf_program *fp,
const struct pcap_pkthdr *h, const uint8_t *pkt);
]]
function offline_filter(bpf, hdr, pkt)
return pcap.pcap_offline_filter(bpf, hdr, pkt)
end
-- The dlt_name is a "datalink type name" and specifies the link-level
-- wrapping to expect. E.g., for raw ethernet frames, you would specify
-- "EN10MB" (even though you have a 10G card), which corresponds to the
-- numeric DLT_EN10MB value from pcap/bpf.h. See
-- http://www.tcpdump.org/linktypes.html for more details on possible
-- names.
--
-- You probably want "RAW" for raw IP (v4 or v6) frames. If you don't
-- supply a dlt_name, "RAW" is the default.
function compile(filter_str, dlt_name)
if verbose then print(filter_str) end
if not pcap then pcap = ffi.load("pcap") end
dlt_name = dlt_name or "RAW"
local dlt = pcap.pcap_datalink_name_to_val(dlt_name)
assert(dlt >= 0, "bad datalink type name " .. dlt_name)
local snaplen = 65535 -- Maximum packet size.
local p = pcap.pcap_open_dead(dlt, snaplen)
assert(p, "pcap_open_dead failed")
-- pcap_compile
local bpf = types.bpf_program()
local optimize = true
local netmask = MAX_UINT32
local err = pcap.pcap_compile(p, bpf, filter_str, optimize, netmask)
if err ~= 0 then
pcap.pcap_perror(p, "pcap_compile failed!")
error("pcap_compile failed")
end
return bpf
end
function selftest ()
print("selftest: pf.libpcap")
compile("", "EN10MB")
compile("ip", "EN10MB")
compile("tcp", "EN10MB")
compile("tcp port 80", "EN10MB")
print("OK")
end
|
--- AceConfig-3.0 wrapper library.
-- Provides an API to register an options table with the config registry,
-- as well as associate it with a slash command.
-- @class file
-- @name AceConfig-3.0
-- @release $Id: AceConfig-3.0.lua 969 2010-10-07 02:11:48Z shefki $
--[[
AceConfig-3.0
Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole.
]]
local MAJOR, MINOR = "AceConfig-3.0", 2
local AceConfig = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfig then return end
local cfgreg = LibStub("AceConfigRegistry-3.0", nil, MAJOR)
local cfgcmd = LibStub("AceConfigCmd-3.0", nil, MAJOR)
--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)
-- Lua APIs
local pcall, error, type, pairs = pcall, error, type, pairs
-- -------------------------------------------------------------------
-- :RegisterOptionsTable(appName, options, slashcmd, persist)
--
-- - appName - (string) application name
-- - options - table or function ref, see AceConfigRegistry
-- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command
--- Register a option table with the AceConfig registry.
-- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly.
-- @paramsig appName, options [, slashcmd]
-- @param appName The application name for the config table.
-- @param options The option table (or a function to generate one on demand). http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/
-- @param slashcmd A slash command to register for the option table, or a table of slash commands.
-- @usage
-- local AceConfig = LibStub("AceConfig-3.0")
-- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"})
function AceConfig:RegisterOptionsTable(appName, options, slashcmd)
local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options)
if not ok then error(msg, 2) end
if slashcmd then
if type(slashcmd) == "table" then
for _,cmd in pairs(slashcmd) do
cfgcmd:CreateChatCommand(cmd, appName)
end
else
cfgcmd:CreateChatCommand(slashcmd, appName)
end
end
end
|
-------------------------------------------------------------------------------
-- Spine Runtimes License Agreement
-- Last updated May 1, 2019. Replaces all prior versions.
--
-- Copyright (c) 2013-2019, Esoteric Software LLC
--
-- Integration of the Spine Runtimes into software or otherwise creating
-- derivative works of the Spine Runtimes is permitted under the terms and
-- conditions of Section 2 of the Spine Editor License Agreement:
-- http://esotericsoftware.com/spine-editor-license
--
-- Otherwise, it is permitted to integrate the Spine Runtimes into software
-- or otherwise create derivative works of the Spine Runtimes (collectively,
-- "Products"), provided that each user of the Products must obtain their own
-- Spine Editor license and redistribution of the Products in any form must
-- include this license and copyright notice.
--
-- THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "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 ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
-- INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) 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.
-------------------------------------------------------------------------------
-- FIXME
-- All the indexing in this file is zero based. We use zlen()
-- instead of the # operator. Initialization of number arrays
-- is performed via utils.newNumberArrayZero. This needs
-- to be rewritten using one-based indexing for better performance
local utils = require "spine-lua.utils"
local AttachmentType = require "spine-lua.attachments.AttachmentType"
local math_floor = math.floor
local math_abs = math.abs
local math_signum = utils.signum
local function zlen(array)
return #array + 1
end
local Animation = {}
function Animation.new (name, timelines, duration)
if not timelines then error("timelines cannot be nil", 2) end
local self = {
name = name,
timelines = timelines,
timelineIds = {},
duration = duration
}
for i,timeline in ipairs(self.timelines) do
self.timelineIds[timeline:getPropertyId()] = true
end
function self:hasTimeline(id)
return self.timelineIds[id] == true
end
function self:apply (skeleton, lastTime, time, loop, events, alpha, blend, direction)
if not skeleton then error("skeleton cannot be nil.", 2) end
if loop and duration > 0 then
time = time % self.duration
if lastTime > 0 then lastTime = lastTime % self.duration end
end
for i,timeline in ipairs(self.timelines) do
timeline:apply(skeleton, lastTime, time, events, alpha, blend, direction)
end
end
return self
end
local function binarySearch (values, target, step)
local low = 0
local high = math.floor(zlen(values) / step - 2)
if high == 0 then return step end
local current = math.floor(high / 2)
while true do
if values[(current + 1) * step] <= target then
low = current + 1
else
high = current
end
if low == high then return (low + 1) * step end
current = math.floor((low + high) / 2)
end
end
Animation.binarySearch = binarySearch
local function binarySearch1 (values, target)
local low = 0
local high = math.floor(zlen(values) - 2)
if high == 0 then return 1 end
local current = math.floor(high / 2)
while true do
if values[current + 1] <= target then
low = current + 1
else
high = current
end
if low == high then return low + 1 end
current = math.floor((low + high) / 2)
end
end
local function linearSearch (values, target, step)
local i = 0
local last = zlen(values) - step
while i <= last do
if (values[i] > target) then return i end
i = i + step
end
return -1
end
Animation.MixBlend = {
setup = 0,
first = 1,
replace = 2,
add = 3
}
local MixBlend = Animation.MixBlend
Animation.MixDirection = {
_in = 0, out = 1
}
local MixDirection = Animation.MixDirection
Animation.TimelineType = {
rotate = 0, translate = 1, scale = 2, shear = 3,
attachment = 4, color = 5, deform = 6,
event = 7, drawOrder = 8,
ikConstraint = 9, transformConstraint = 10,
pathConstraintPosition = 11, pathConstraintSpacing = 12, pathConstraintMix = 13,
twoColor = 14
}
local TimelineType = Animation.TimelineType
local SHL_24 = 16777216
local SHL_27 = 134217728
Animation.CurveTimeline = {}
function Animation.CurveTimeline.new (frameCount)
local LINEAR = 0
local STEPPED = 1
local BEZIER = 2
local BEZIER_SIZE = 10 * 2 - 1
local self = {
curves = utils.newNumberArrayZero((frameCount - 1) * BEZIER_SIZE) -- type, x, y, ...
}
function self:getFrameCount ()
return math.floor(zlen(self.curves) / BEZIER_SIZE) + 1
end
function self:setStepped (frameIndex)
self.curves[frameIndex * BEZIER_SIZE] = STEPPED
end
function self:getCurveType (frameIndex)
local index = frameIndex * BEZIER_SIZE
if index == zlen(self.curves) then return LINEAR end
local type = self.curves[index]
if type == LINEAR then return LINEAR end
if type == STEPPED then return STEPPED end
return BEZIER
end
function self:setCurve (frameIndex, cx1, cy1, cx2, cy2)
local tmpx = (-cx1 * 2 + cx2) * 0.03
local tmpy = (-cy1 * 2 + cy2) * 0.03
local dddfx = ((cx1 - cx2) * 3 + 1) * 0.006
local dddfy = ((cy1 - cy2) * 3 + 1) * 0.006
local ddfx = tmpx * 2 + dddfx
local ddfy = tmpy * 2 + dddfy
local dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667
local dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667
local i = frameIndex * BEZIER_SIZE
local curves = self.curves
curves[i] = BEZIER
i = i + 1
local x = dfx
local y = dfy
local n = i + BEZIER_SIZE - 1
while i < n do
curves[i] = x
curves[i + 1] = y
dfx = dfx + ddfx
dfy = dfy + ddfy
ddfx = ddfx + dddfx
ddfy = ddfy + dddfy
x = x + dfx
y = y + dfy
i = i + 2
end
end
function self:getCurvePercent (frameIndex, percent)
percent = utils.clamp(percent, 0, 1)
local curves = self.curves
local i = frameIndex * BEZIER_SIZE
local type = curves[i]
if type == LINEAR then return percent end
if type == STEPPED then return 0 end
i = i + 1
local x
local n = i + BEZIER_SIZE - 1
local start = i
while i < n do
x = curves[i]
if x >= percent then
local prevX, prevY
if i == start then
prevX = 0
prevY = 0
else
prevX = curves[i - 2]
prevY = curves[i - 1]
end
return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX)
end
i = i + 2
end
local y = curves[i - 1]
return y + (1 - y) * (percent - x) / (1 - x) -- Last point is 1,1.
end
return self
end
Animation.RotateTimeline = {}
Animation.RotateTimeline.ENTRIES = 2
Animation.RotateTimeline.PREV_TIME = -2
Animation.RotateTimeline.PREV_ROTATION = -1
Animation.RotateTimeline.ROTATION = 1
function Animation.RotateTimeline.new (frameCount)
local ENTRIES = Animation.RotateTimeline.ENTRIES
local PREV_TIME = Animation.RotateTimeline.PREV_TIME
local PREV_ROTATION = Animation.RotateTimeline.PREV_ROTATION
local ROTATION = Animation.RotateTimeline.ROTATION
local self = Animation.CurveTimeline.new(frameCount)
self.boneIndex = -1
self.frames = utils.newNumberArrayZero(frameCount * 2)
self.type = TimelineType.rotate
function self:getPropertyId ()
return TimelineType.rotate * SHL_24 + self.boneIndex
end
function self:setFrame (frameIndex, time, degrees)
frameIndex = frameIndex * 2
self.frames[frameIndex] = time
self.frames[frameIndex + ROTATION] = degrees
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local bone = skeleton.bones[self.boneIndex]
if not bone.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
bone.rotation = bone.data.rotation
elseif blend == MixBlend.first then
local r = bone.data.rotation - bone.rotation
bone.rotation = bone.rotation + (r - (16384 - math_floor(16384.499999999996 - r / 360)) * 360) * alpha
end
return
end
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
local r = frames[zlen(frames) + PREV_ROTATION]
if blend == MixBlend.setup then
bone.rotation = bone.data.rotation + r * alpha
elseif blend == MixBlend.first or blend == MixBlend.replace then
r = r + bone.data.rotation - bone.rotation
r = r - (16384 - math_floor(16384.499999999996 - r / 360)) * 360 -- Wrap within -180 and 180.
bone.rotation = bone.rotation + r * alpha;
elseif blend == MixBlend.add then
bone.rotation = bone.rotation + r * alpha;
end
return;
end
-- Interpolate between the last frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
local prevRotation = frames[frame + PREV_ROTATION]
local frameTime = frames[frame]
local percent = self:getCurvePercent((math.floor(frame / 2)) - 1, 1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
local r = frames[frame + ROTATION] - prevRotation
r = prevRotation + (r - (16384 - math_floor(16384.499999999996 - r / 360)) * 360) * percent
if blend == MixBlend.setup then
bone.rotation = bone.data.rotation + (r - (16384 - math_floor(16384.499999999996 - r / 360)) * 360) * alpha
elseif blend == MixBlend.first or blend == MixBlend.replace then
r = r + bone.data.rotation - bone.rotation;
bone.rotation = bone.rotation + (r - (16384 - math_floor(16384.499999999996 - r / 360)) * 360) * alpha
elseif blend == MixBlend.add then
bone.rotation = bone.rotation + (r - (16384 - math_floor(16384.499999999996 - r / 360)) * 360) * alpha
end
end
return self
end
Animation.TranslateTimeline = {}
Animation.TranslateTimeline.ENTRIES = 3
function Animation.TranslateTimeline.new (frameCount)
local ENTRIES = Animation.TranslateTimeline.ENTRIES
local PREV_TIME = -3
local PREV_X = -2
local PREV_Y = -1
local X = 1
local Y = 2
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.boneIndex = -1
self.type = TimelineType.translate
function self:getPropertyId ()
return TimelineType.translate * SHL_24 + self.boneIndex
end
function self:setFrame (frameIndex, time, x, y)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + X] = x
self.frames[frameIndex + Y] = y
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local bone = skeleton.bones[self.boneIndex]
if not bone.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
bone.x = bone.data.x
bone.y = bone.data.y
elseif blend == MixBlend.first then
bone.x = bone.x + (bone.data.x - bone.x) * alpha
bone.y = bone.y + (bone.data.y - bone.y) * alpha
end
return
end
local x = 0
local y = 0
if time >= frames[zlen(frames) - ENTRIES] then -- // Time is after last frame.
x = frames[zlen(frames) + PREV_X];
y = frames[zlen(frames) + PREV_Y];
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
x = frames[frame + PREV_X]
y = frames[frame + PREV_Y]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime));
x = x + (frames[frame + X] - x) * percent
y = y + (frames[frame + Y] - y) * percent
end
if blend == MixBlend.setup then
bone.x = bone.data.x + x * alpha
bone.y = bone.data.y + y * alpha
elseif blend == MixBlend.first or blend == MixBlend.replace then
bone.x = bone.x + (bone.data.x + x - bone.x) * alpha
bone.y = bone.y + (bone.data.y + y - bone.y) * alpha
elseif blend == MixBlend.add then
bone.x = bone.x + x * alpha
bone.y = bone.y + y * alpha
end
end
return self
end
Animation.ScaleTimeline = {}
Animation.ScaleTimeline.ENTRIES = Animation.TranslateTimeline.ENTRIES
function Animation.ScaleTimeline.new (frameCount)
local ENTRIES = Animation.ScaleTimeline.ENTRIES
local PREV_TIME = -3
local PREV_X = -2
local PREV_Y = -1
local X = 1
local Y = 2
local self = Animation.TranslateTimeline.new(frameCount)
self.type = TimelineType.scale
function self:getPropertyId ()
return TimelineType.scale * SHL_24 + self.boneIndex
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local bone = skeleton.bones[self.boneIndex]
if not bone.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
bone.scaleX = bone.data.scaleX
bone.scaleY = bone.data.scaleY
elseif blend == MixBlend.first then
bone.scaleX = bone.scaleX + (bone.data.scaleX - bone.scaleX) * alpha
bone.scaleY = bone.scaleY + (bone.data.scaleY - bone.scaleY) * alpha
end
return
end
local x = 0
local y = 0
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
x = frames[zlen(frames) + PREV_X] * bone.data.scaleX
y = frames[zlen(frames) + PREV_Y] * bone.data.scaleY
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
x = frames[frame + PREV_X]
y = frames[frame + PREV_Y]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
x = (x + (frames[frame + X] - x) * percent) * bone.data.scaleX
y = (y + (frames[frame + Y] - y) * percent) * bone.data.scaleY
end
if alpha == 1 then
if blend == MixBlend.add then
bone.scaleX = bone.scaleX + x - bone.data.scaleX
bone.scaleY = bone.scaleY + y - bone.data.scaleY
else
bone.scaleX = x
bone.scaleY = y
end
else
local bx = 0
local by = 0
if direction == MixDirection.out then
if blend == MixBlend.setup then
bx = bone.data.scaleX
by = bone.data.scaleY
bone.scaleX = bx + (math_abs(x) * math_signum(bx) - bx) * alpha
bone.scaleY = by + (math_abs(y) * math_signum(by) - by) * alpha
elseif blend == MixBlend.first or blend == MixBlend.replace then
bx = bone.scaleX
by = bone.scaleY
bone.scaleX = bx + (math_abs(x) * math_signum(bx) - bx) * alpha
bone.scaleY = by + (math_abs(y) * math_signum(by) - by) * alpha
elseif blend == MixBlend.add then
bx = bone.scaleX
by = bone.scaleY
bone.scaleX = bx + (math_abs(x) * math_signum(bx) - bone.data.scaleX) * alpha
bone.scaleY = by + (math_abs(y) * math_signum(by) - bone.data.scaleY) * alpha
end
else
if blend == MixBlend.setup then
bx = math_abs(bone.data.scaleX) * math_signum(x)
by = math_abs(bone.data.scaleY) * math_signum(y)
bone.scaleX = bx + (x - bx) * alpha
bone.scaleY = by + (y - by) * alpha
elseif blend == MixBlend.first or blend == MixBlend.replace then
bx = math_abs(bone.scaleX) * math_signum(x)
by = math_abs(bone.scaleY) * math_signum(y)
bone.scaleX = bx + (x - bx) * alpha
bone.scaleY = by + (y - by) * alpha
elseif blend == MixBlend.add then
bx = math_signum(x)
by = math_signum(y)
bone.scaleX = math_abs(bone.scaleX) * bx + (x - math_abs(bone.data.scaleX) * bx) * alpha
bone.scaleY = math_abs(bone.scaleY) * by + (y - math_abs(bone.data.scaleY) * by) * alpha
end
end
end
end
return self
end
Animation.ShearTimeline = {}
Animation.ShearTimeline.ENTRIES = Animation.TranslateTimeline.ENTRIES
function Animation.ShearTimeline.new (frameCount)
local ENTRIES = Animation.ShearTimeline.ENTRIES
local PREV_TIME = -3
local PREV_X = -2
local PREV_Y = -1
local X = 1
local Y = 2
local self = Animation.TranslateTimeline.new(frameCount)
self.type = TimelineType.shear
function self:getPropertyId ()
return TimelineType.shear * SHL_24 + self.boneIndex
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local bone = skeleton.bones[self.boneIndex]
if not bone.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
bone.shearX = bone.data.shearX
bone.shearY = bone.data.shearY
elseif blend == MixBlend.first then
bone.shearX = bone.shearX + (bone.data.shearX - bone.shearX) * alpha
bone.shearY = bone.shearX + (bone.data.shearY - bone.shearY) * alpha
end
return
end
local x = 0
local y = 0
if time >= frames[zlen(frames) - ENTRIES] then -- // Time is after last frame.
x = frames[zlen(frames) + PREV_X]
y = frames[zlen(frames) + PREV_Y]
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
x = frames[frame + PREV_X]
y = frames[frame + PREV_Y]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
x = x + (frames[frame + X] - x) * percent
y = y + (frames[frame + Y] - y) * percent
end
if blend == MixBlend.setup then
bone.shearX = bone.data.shearX + x * alpha
bone.shearY = bone.data.shearY + y * alpha
elseif blend == MixBlend.first or blend == MixBlend.replace then
bone.shearX = bone.shearX + (bone.data.shearX + x - bone.shearX) * alpha
bone.shearY = bone.shearY + (bone.data.shearY + y - bone.shearY) * alpha
elseif blend == MixBlend.add then
bone.shearX = bone.shearX + x * alpha
bone.shearY = bone.shearY + y * alpha
end
end
return self
end
Animation.ColorTimeline = {}
Animation.ColorTimeline.ENTRIES = 5
function Animation.ColorTimeline.new (frameCount)
local ENTRIES = Animation.ColorTimeline.ENTRIES
local PREV_TIME = -5
local PREV_R = -4
local PREV_G = -3
local PREV_B = -2
local PREV_A = -1
local R = 1
local G = 2
local B = 3
local A = 4
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.slotIndex = -1
self.type = TimelineType.color
function self:getPropertyId ()
return TimelineType.color * SHL_24 + self.slotIndex
end
function self:setFrame (frameIndex, time, r, g, b, a)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + R] = r
self.frames[frameIndex + G] = g
self.frames[frameIndex + B] = b
self.frames[frameIndex + A] = a
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local slot = skeleton.slots[self.slotIndex]
if not slot.bone.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
slot.color:setFrom(slot.data.color)
elseif blend == MixBlend.first then
local color = slot.color
local setup = slot.data.color
color:add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,
(setup.a - color.a) * alpha)
end
return
end
local r, g, b, a
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
local i = zlen(frames)
r = frames[i + PREV_R]
g = frames[i + PREV_G]
b = frames[i + PREV_B]
a = frames[i + PREV_A]
else
-- Interpolate between the last frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
r = frames[frame + PREV_R]
g = frames[frame + PREV_G]
b = frames[frame + PREV_B]
a = frames[frame + PREV_A]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math.floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
r = r + (frames[frame + R] - r) * percent
g = g + (frames[frame + G] - g) * percent
b = b + (frames[frame + B] - b) * percent
a = a + (frames[frame + A] - a) * percent
end
if alpha == 1 then
slot.color:set(r, g, b, a)
else
local color = slot.color
if blend == MixBlend.setup then color:setFrom(slot.data.color) end
color:add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha)
end
end
return self
end
Animation.TwoColorTimeline = {}
Animation.TwoColorTimeline.ENTRIES = 8
function Animation.TwoColorTimeline.new (frameCount)
local ENTRIES = Animation.TwoColorTimeline.ENTRIES
local PREV_TIME = -8
local PREV_R = -7
local PREV_G = -6
local PREV_B = -5
local PREV_A = -4
local PREV_R2 = -3
local PREV_G2 = -2
local PREV_B2 = -1
local R = 1
local G = 2
local B = 3
local A = 4
local R2 = 5
local G2 = 6
local B2 = 7
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.slotIndex = -1
self.type = TimelineType.twoColor
function self:getPropertyId ()
return TimelineType.twoColor * SHL_24 + self.slotIndex
end
function self:setFrame (frameIndex, time, r, g, b, a, r2, g2, b2)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + R] = r
self.frames[frameIndex + G] = g
self.frames[frameIndex + B] = b
self.frames[frameIndex + A] = a
self.frames[frameIndex + R2] = r2
self.frames[frameIndex + G2] = g2
self.frames[frameIndex + B2] = b2
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local slot = skeleton.slots[self.slotIndex]
if not slot.bone.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
slot.color:setFrom(slot.data.color)
slot.darkColor:setFrom(slot.data.darkColor)
elseif blend == MixBlend.first then
local light = slot.color
local dark = slot.darkColor
local setupLight = slot.data.color
local setupDark = slot.data.darkColor
light:add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha,
(setupLight.a - light.a) * alpha)
dark:add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0)
end
return
end
local r, g, b, a, r2, g2, b2
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
local i = zlen(frames)
r = frames[i + PREV_R]
g = frames[i + PREV_G]
b = frames[i + PREV_B]
a = frames[i + PREV_A]
r2 = frames[i + PREV_R2]
g2 = frames[i + PREV_G2]
b2 = frames[i + PREV_B2]
else
-- Interpolate between the last frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
r = frames[frame + PREV_R]
g = frames[frame + PREV_G]
b = frames[frame + PREV_B]
a = frames[frame + PREV_A]
r2 = frames[frame + PREV_R2]
g2 = frames[frame + PREV_G2]
b2 = frames[frame + PREV_B2]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math.floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
r = r + (frames[frame + R] - r) * percent
g = g + (frames[frame + G] - g) * percent
b = b + (frames[frame + B] - b) * percent
a = a + (frames[frame + A] - a) * percent
r2 = r2 + (frames[frame + R2] - r2) * percent
g2 = g2 + (frames[frame + G2] - g2) * percent
b2 = b2 + (frames[frame + B2] - b2) * percent
end
if alpha == 1 then
slot.color:set(r, g, b, a)
slot.darkColor:set(r2, g2, b2, 1)
else
local light = slot.color
local dark = slot.darkColor
if blend == MixBlend.setup then
light:setFrom(slot.data.color)
dark:setFrom(slot.data.darkColor)
end
light:add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha)
dark:add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0)
end
end
return self
end
Animation.AttachmentTimeline = {}
function Animation.AttachmentTimeline.new (frameCount)
local self = {
frames = utils.newNumberArrayZero(frameCount), -- time, ...
attachmentNames = {},
slotIndex = -1,
type = TimelineType.attachment
}
function self:getFrameCount ()
return zlen(self.frames)
end
function self:setFrame (frameIndex, time, attachmentName)
self.frames[frameIndex] = time
self.attachmentNames[frameIndex] = attachmentName
end
function self:getPropertyId ()
return TimelineType.attachment * SHL_24 + self.slotIndex
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local slot = skeleton.slots[self.slotIndex]
if not slot.bone.active then return end
local attachmentName
if direction == MixDirection.out and blend == MixBlend.setup then
attachmentName = slot.data.attachmentName
if not attachmentName then
slot:setAttachment(nil)
else
slot:setAttachment(skeleton:getAttachmentByIndex(self.slotIndex, attachmentName))
end
return;
end
local frames = self.frames
if time < frames[0] then
if blend == MixBlend.setup or blend == MixBlend.first then
attachmentName = slot.data.attachmentName
if not attachmentName then
slot:setAttachment(nil)
else
slot:setAttachment(skeleton:getAttachmentByIndex(self.slotIndex, attachmentName))
end
end
return
end
local frameIndex = 0
if time >= frames[zlen(frames) - 1] then
frameIndex = zlen(frames) - 1
else
frameIndex = binarySearch(frames, time, 1) - 1
end
attachmentName = self.attachmentNames[frameIndex]
if not attachmentName then
slot:setAttachment(nil)
else
slot:setAttachment(skeleton:getAttachmentByIndex(self.slotIndex, attachmentName))
end
end
return self
end
Animation.DeformTimeline = {}
function Animation.DeformTimeline.new (frameCount)
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount)
self.frameVertices = utils.newNumberArrayZero(frameCount)
self.slotIndex = -1
self.attachment = nil
self.type = TimelineType.deform
function self:getPropertyId ()
return TimelineType.deform * SHL_27 + self.attachment.id + self.slotIndex
end
function self:setFrame (frameIndex, time, vertices)
self.frames[frameIndex] = time
self.frameVertices[frameIndex] = vertices
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local slot = skeleton.slots[self.slotIndex]
if not slot.bone.active then return end
local slotAttachment = slot.attachment
if not slotAttachment then return end
if not (slotAttachment.type == AttachmentType.mesh or slotAttachment.type == AttachmentType.linkedmesh or slotAttachment.type == AttachmentType.path or slotAttachment.type == AttachmentType.boundingbox) then return end
if slotAttachment.deformAttachment ~= self.attachment then return end
local frames = self.frames
local deformArray = slot.deform
if #(deformArray) == 0 then blend = MixBlend.setup end
local frameVertices = self.frameVertices
local vertexCount = #(frameVertices[0])
if time < frames[0] then
local vertexAttachment = slotAttachment;
if blend == MixBlend.setup then
slot.deform = {}
return;
elseif blend == MixBlend.first then
if (alpha == 1) then
slot.deform = {}
return;
end
local deform = utils.setArraySize(deformArray, vertexCount)
if (vertexAttachment.bones == nil) then
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + (setupVertices[i] - deform[i]) * alpha
i = i + 1
end
else
alpha = 1 - alpha
local i = 1
while i <= vertexCount do
deform[i] = deform[i] * alpha
i = i + 1
end
end
end
return
end
local deform = utils.setArraySize(deformArray, vertexCount)
if time >= frames[zlen(frames) - 1] then -- Time is after last frame.
local lastVertices = frameVertices[zlen(frames) - 1]
if alpha == 1 then
if blend == MixBlend.add then
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
-- Unweighted vertex positions, with alpha.
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + lastVertices[i] - setupVertices[i]
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + lastVertices[i]
i = i + 1
end
end
else
local i = 1
while i <= vertexCount do
deform[i] = lastVertices[i]
i = i + 1
end
end
else
if blend == MixBlend.setup then
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
-- Unweighted vertex positions, with alpha.
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
local setup = setupVertices[i]
deform[i] = setup + (lastVertices[i] - setup) * alpha
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
deform[i] = lastVertices[i] * alpha
i = i + 1
end
end
elseif blend == MixBlend.first or blend == MixBlend.replace then
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + (lastVertices[i] - deform[i]) * alpha
i = i + 1
end
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + (lastVertices[i] - setupVertices[i]) * alpha
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + lastVertices[i] * alpha
i = i + 1
end
end
elseif blend == MixBlend.add then
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + (lastVertices[i] - setupVertices[i]) * alpha
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
deform[i] = deform[i] + lastVertices[i] * alpha
i = i + 1
end
end
end
end
return;
end
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, 1)
local prevVertices = frameVertices[frame - 1]
local nextVertices = frameVertices[frame]
local frameTime = frames[frame]
local percent = self:getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime))
if alpha == 1 then
if blend == MixBlend.add then
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
-- Unweighted vertex positions, with alpha.
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = deform[i] + prev + (nextVertices[i] - prev) * precent - setupVertices[i]
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = deform[i] + prev + (nextVertices[i] - prev) * percent
i = i + 1
end
end
else
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = prev + (nextVertices[i] - prev) * percent
i = i + 1
end
end
else
if blend == MixBlend.setup then
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
-- Unweighted vertex positions, with alpha.
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
local setup = setupVertices[i]
deform[i] = setup + (prev + (nextVertices[i] - prev) * percent - setup) * alpha
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = (prev + (nextVertices[i] - prev) * percent) * alpha
i = i + 1
end
end
elseif blend == MixBlend.first or blend == MixBlend.replace then
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = deform[i] + (prev + (nextVertices[i] - prev) * percent - deform[i]) * alpha
i = i + 1
end
elseif blend == MixBlend.add then
local vertexAttachment = slotAttachment
if vertexAttachment.bones == nil then
local setupVertices = vertexAttachment.vertices
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = deform[i] + (prev + (nextVertices[i] - prev) * percent - setupVertices[i]) * alpha
i = i + 1
end
else
-- Weighted deform offsets, with alpha.
local i = 1
while i <= vertexCount do
local prev = prevVertices[i]
deform[i] = deform[i] + (prev + (nextVertices[i] - prev) * percent) * alpha
i = i + 1
end
end
end
end
end
return self
end
Animation.EventTimeline = {}
function Animation.EventTimeline.new (frameCount)
local self = {
frames = utils.newNumberArrayZero(frameCount),
events = {},
type = TimelineType.event
}
function self:getPropertyId ()
return TimelineType.event * SHL_24
end
function self:getFrameCount ()
return zlen(self.frames)
end
function self:setFrame (frameIndex, event)
self.frames[frameIndex] = event.time
self.events[frameIndex] = event
end
-- Fires events for frames > lastTime and <= time.
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
if not firedEvents then return end
local frames = self.frames
local frameCount = zlen(frames)
if lastTime > time then -- Fire events after last time for looped animations.
self:apply(skeleton, lastTime, 999999, firedEvents, alpha, blend, direction)
lastTime = -1
elseif lastTime >= frames[frameCount - 1] then -- Last time is after last frame.
return
end
if time < frames[0] then return end -- Time is before first frame.
local frame
if lastTime < frames[0] then
frame = 0
else
frame = binarySearch1(frames, lastTime)
local frame = frames[frame]
while frame > 0 do -- Fire multiple events with the same frame.
if frames[frame - 1] ~= frame then break end
frame = frame - 1
end
end
local events = self.events
while frame < frameCount and time >= frames[frame] do
table.insert(firedEvents, events[frame])
frame = frame + 1
end
end
return self
end
Animation.DrawOrderTimeline = {}
function Animation.DrawOrderTimeline.new (frameCount)
local self = {
frames = utils.newNumberArrayZero(frameCount),
drawOrders = {},
type = TimelineType.drawOrder
}
function self:getPropertyId ()
return TimelineType.drawOrder * SHL_24
end
function self:getFrameCount ()
return zlen(self.frames)
end
function self:setFrame (frameIndex, time, drawOrder)
self.frames[frameIndex] = time
self.drawOrders[frameIndex] = drawOrder
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local drawOrder = skeleton.drawOrder
local slots = skeleton.slots
if direction == MixDirection.out and blend == MixBlend.setup then
for i,slot in ipairs(slots) do
drawOrder[i] = slots[i]
end
return;
end
local frames = self.frames
if time < frames[0] then
if blend == MixBlend.setup or blend == MixBlend.first then
for i,slot in ipairs(slots) do
drawOrder[i] = slots[i]
end
end
return
end
local frame
if time >= frames[zlen(frames) - 1] then -- Time is after last frame.
frame = zlen(frames) - 1
else
frame = binarySearch1(frames, time) - 1
end
local drawOrderToSetupIndex = self.drawOrders[frame]
if not drawOrderToSetupIndex then
for i,slot in ipairs(slots) do
drawOrder[i] = slots[i]
end
else
for i,setupIndex in ipairs(drawOrderToSetupIndex) do
drawOrder[i] = skeleton.slots[setupIndex]
end
end
end
return self
end
Animation.IkConstraintTimeline = {}
Animation.IkConstraintTimeline.ENTRIES = 6
function Animation.IkConstraintTimeline.new (frameCount)
local ENTRIES = Animation.IkConstraintTimeline.ENTRIES
local PREV_TIME = -6
local PREV_MIX = -5
local PREV_SOFTNESS = -4
local PREV_BEND_DIRECTION = -3
local PREV_COMPRESS = -2
local PREV_STRETCH = -1
local MIX = 1
local SOFTNESS = 2
local BEND_DIRECTION = 3
local COMPRESS = 4
local STRETCH = 5
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES) -- time, mix, softness, bendDirection, compress, stretch, ...
self.ikConstraintIndex = -1
self.type = TimelineType.ikConstraint
function self:getPropertyId ()
return TimelineType.ikConstraint * SHL_24 + self.ikConstraintIndex
end
function self:setFrame (frameIndex, time, mix, softness, bendDirection, compress, stretch)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + MIX] = mix
self.frames[frameIndex + SOFTNESS] = softness
self.frames[frameIndex + BEND_DIRECTION] = bendDirection
if (compress) then
self.frames[frameIndex + COMPRESS] = 1
else
self.frames[frameIndex + COMPRESS] = 0
end
if (stretch) then
self.frames[frameIndex + STRETCH] = 1
else
self.frames[frameIndex + STRETCH] = 0
end
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local constraint = skeleton.ikConstraints[self.ikConstraintIndex]
if not constraint.active then return end
if time < frames[0] then
if blend == MixBlend.setup then
constraint.mix = constraint.data.mix
constraint.softness = constraint.data.softness
constraint.bendDirection = constraint.data.bendDirection
constraint.compress = constraint.data.compress
constraint.stretch = constraint.data.stretch
elseif blend == MixBlend.first then
constraint.mix = constraint.mix + (constraint.data.mix - constraint.mix) * alpha
constraint.softness = constraint.softness + (constraint.data.softness - constraint.softness) * alpha
constraint.bendDirection = constraint.data.bendDirection
constraint.compress = constraint.data.compress
constraint.stretch = constraint.data.stretch
end
return
end
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
if blend == MixBlend.setup then
constraint.mix = constraint.data.mix + (frames[zlen(frames) + PREV_MIX] - constraint.data.mix) * alpha
constraint.softness = constraint.data.softness + (frames[zlen(frames) + PREV_SOFTNESS] - constraint.data.softness) * alpha
if direction == MixDirection.out then
constraint.bendDirection = constraint.data.bendDirection
constraint.compress = constraint.data.compress
constraint.stretch = constraint.data.stretch
else
constraint.bendDirection = math_floor(frames[zlen(frames) + PREV_BEND_DIRECTION]);
if (math_floor(frames[zlen(frames) + PREV_COMPRESS]) == 1) then constraint.compress = true else constraint.compress = false end
if (math_floor(frames[zlen(frames) + PREV_STRETCH]) == 1) then constraint.stretch = true else constraint.stretch = false end
end
else
constraint.mix = constraint.mix + (frames[zlen(frames) + PREV_MIX] - constraint.mix) * alpha
constraint.softness = constraint.softness + (frames[zlen(frames) + PREV_SOFTNESS] - constraint.softness) * alpha
if direction == MixDirection._in then
constraint.bendDirection = math_floor(frames[zlen(frames) + PREV_BEND_DIRECTION])
if (math_floor(frames[zlen(frames) + PREV_COMPRESS]) == 1) then constraint.compress = true else constraint.compress = false end
if (math_floor(frames[zlen(frames) + PREV_STRETCH]) == 1) then constraint.stretch = true else constraint.stretch = false end
end
end
return
end
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
local mix = frames[frame + PREV_MIX]
local softness = frames[frame + PREV_SOFTNESS]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math.floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
if blend == MixBlend.setup then
constraint.mix = constraint.data.mix + (mix + (frames[frame + MIX] - mix) * percent - constraint.data.mix) * alpha
constraint.softness = constraint.data.softness + (softness + (frames[frame + SOFTNESS] - softness) * percent - constraint.data.softness) * alpha
if direction == MixDirection.out then
constraint.bendDirection = constraint.data.bendDirection
constraint.compress = constraint.data.compress
constraint.stretch = constraint.data.stretch
else
constraint.bendDirection = math_floor(frames[frame + PREV_BEND_DIRECTION])
if (math_floor(frames[frame + PREV_COMPRESS]) == 1) then constraint.compress = true else constraint.compress = false end
if (math_floor(frames[frame + PREV_STRETCH]) == 1) then constraint.stretch = true else constraint.stretch = false end
end
else
constraint.mix = constraint.mix + (mix + (frames[frame + MIX] - mix) * percent - constraint.mix) * alpha
constraint.softness = constraint.softness + (softness + (frames[frame + SOFTNESS] - softness) * percent - constraint.softness) * alpha
if direction == MixDirection._in then
constraint.bendDirection = math_floor(frames[frame + PREV_BEND_DIRECTION])
if (math_floor(frames[frame + PREV_COMPRESS]) == 1) then constraint.compress = true else constraint.compress = false end
if (math_floor(frames[frame + PREV_STRETCH]) == 1) then constraint.stretch = true else constraint.stretch = false end
end
end
end
return self
end
Animation.TransformConstraintTimeline = {}
Animation.TransformConstraintTimeline.ENTRIES = 5
function Animation.TransformConstraintTimeline.new (frameCount)
local ENTRIES = Animation.TransformConstraintTimeline.ENTRIES
local PREV_TIME = -5
local PREV_ROTATE = -4
local PREV_TRANSLATE = -3
local PREV_SCALE = -2
local PREV_SHEAR = -1
local ROTATE = 1
local TRANSLATE = 2
local SCALE = 3
local SHEAR = 4
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.transformConstraintIndex = -1
self.type = TimelineType.transformConstraint
function self:getPropertyId ()
return TimelineType.transformConstraint * SHL_24 + self.transformConstraintIndex
end
function self:setFrame (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + ROTATE] = rotateMix
self.frames[frameIndex + TRANSLATE] = translateMix
self.frames[frameIndex + SCALE] = scaleMix
self.frames[frameIndex + SHEAR] = shearMix
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local constraint = skeleton.transformConstraints[self.transformConstraintIndex]
if not constraint.active then return end
if time < frames[0] then
local data = constraint.data
if blend == MixBlend.setup then
constraint.rotateMix = data.rotateMix
constraint.translateMix = data.translateMix
constraint.scaleMix = data.scaleMix
constraint.shearMix = data.shearMix
elseif blend == MixBlend.first then
constraint.rotateMix = constraint.rotateMix + (data.rotateMix - constraint.rotateMix) * alpha
constraint.translateMix = constraint.translateMix + (data.translateMix - constraint.translateMix) * alpha
constraint.scaleMix = constraint.scaleMix + (data.scaleMix - constraint.scaleMix) * alpha
constraint.shearMix = constraint.shearMix + (data.shearMix - constraint.shearMix) * alpha
end
return
end
local rotate = 0
local translate = 0
local scale = 0
local shear = 0
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
local i = zlen(frames.length)
rotate = frames[i + PREV_ROTATE]
translate = frames[i + PREV_TRANSLATE]
scale = frames[i + PREV_SCALE]
shear = frames[i + PREV_SHEAR]
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
rotate = frames[frame + PREV_ROTATE]
translate = frames[frame + PREV_TRANSLATE]
scale = frames[frame + PREV_SCALE]
shear = frames[frame + PREV_SHEAR]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime));
rotate = rotate + (frames[frame + ROTATE] - rotate) * percent
translate = translate + (frames[frame + TRANSLATE] - translate) * percent
scale = scale + (frames[frame + SCALE] - scale) * percent
shear = shear + (frames[frame + SHEAR] - shear) * percent
end
if blend == MixBlend.setup then
local data = constraint.data
constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha
constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha
constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha
constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha
else
constraint.rotateMix = constraint.rotateMix + (rotate - constraint.rotateMix) * alpha
constraint.translateMix = constraint.translateMix + (translate - constraint.translateMix) * alpha
constraint.scaleMix = constraint.scaleMix + (scale - constraint.scaleMix) * alpha
constraint.shearMix = constraint.shearMix + (shear - constraint.shearMix) * alpha
end
end
return self
end
Animation.PathConstraintPositionTimeline = {}
Animation.PathConstraintPositionTimeline.ENTRIES = 2
function Animation.PathConstraintPositionTimeline.new (frameCount)
local ENTRIES = Animation.PathConstraintPositionTimeline.ENTRIES
local PREV_TIME = -2
local PREV_VALUE = -1
local VALUE = 1
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.pathConstraintIndex = -1
self.type = TimelineType.pathConstraintPosition
function self:getPropertyId ()
return TimelineType.pathConstraintPosition * SHL_24 + self.pathConstraintIndex
end
function self:setFrame (frameIndex, time, value)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + VALUE] = value
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local constraint = skeleton.pathConstraints[self.pathConstraintIndex]
if not constraint.active then return end
if (time < frames[0]) then
if blend == MixBlend.setup then
constraint.position = constraint.data.position
elseif blend == MixBlend.first then
constraint.position = constraint.position + (constraint.data.position - constraint.position) * alpha
end
return
end
local position = 0
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
position = frames[zlen(frames) + PREV_VALUE]
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
position = frames[frame + PREV_VALUE]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
position = position + (frames[frame + VALUE] - position) * percent
end
if blend == MixBlend.setup then
constraint.position = constraint.data.position + (position - constraint.data.position) * alpha
else
constraint.position = constraint.position + (position - constraint.position) * alpha
end
end
return self
end
Animation.PathConstraintSpacingTimeline = {}
Animation.PathConstraintSpacingTimeline.ENTRIES = 2
function Animation.PathConstraintSpacingTimeline.new (frameCount)
local ENTRIES = Animation.PathConstraintSpacingTimeline.ENTRIES
local PREV_TIME = -2
local PREV_VALUE = -1
local VALUE = 1
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.pathConstraintIndex = -1
self.type = TimelineType.pathConstraintSpacing
function self:getPropertyId ()
return TimelineType.pathConstraintSpacing * SHL_24 + self.pathConstraintIndex
end
function self:setFrame (frameIndex, time, value)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + VALUE] = value
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local constraint = skeleton.pathConstraints[self.pathConstraintIndex]
if not constraint.active then return end
if (time < frames[0]) then
if blend == MixBlend.setup then
constraint.spacing = constraint.data.spacing
elseif blend == MixBlend.first then
constraint.spacing = constraint.spacing + (constraint.data.spacing - constraint.spacing) * alpha
end
return
end
local spacing = 0
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
spacing = frames[zlen(frames) + PREV_VALUE]
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
spacing = frames[frame + PREV_VALUE]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
spacing = spacing + (frames[frame + VALUE] - spacing) * percent
end
if blend == MixBlend.setup then
constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha
else
constraint.spacing = constraint.spacing + (spacing - constraint.spacing) * alpha
end
end
return self
end
Animation.PathConstraintMixTimeline = {}
Animation.PathConstraintMixTimeline.ENTRIES = 3
function Animation.PathConstraintMixTimeline.new (frameCount)
local ENTRIES = Animation.PathConstraintMixTimeline.ENTRIES
local PREV_TIME = -3
local PREV_ROTATE = -2
local PREV_TRANSLATE = -1
local ROTATE = 1
local TRANSLATE = 2
local self = Animation.CurveTimeline.new(frameCount)
self.frames = utils.newNumberArrayZero(frameCount * ENTRIES)
self.pathConstraintIndex = -1
self.type = TimelineType.pathConstraintMix
function self:getPropertyId ()
return TimelineType.pathConstraintMix * SHL_24 + self.pathConstraintIndex
end
function self:setFrame (frameIndex, time, rotateMix, translateMix)
frameIndex = frameIndex * ENTRIES
self.frames[frameIndex] = time
self.frames[frameIndex + ROTATE] = rotateMix
self.frames[frameIndex + TRANSLATE] = translateMix
end
function self:apply (skeleton, lastTime, time, firedEvents, alpha, blend, direction)
local frames = self.frames
local constraint = skeleton.pathConstraints[self.pathConstraintIndex]
if not constraint.active then return end
if (time < frames[0]) then
if blend == MixBlend.setup then
constraint.rotateMix = constraint.data.rotateMix
constraint.translateMix = constraint.data.translateMix
elseif blend == MixBlend.first then
constraint.rotateMix = constraint.rotateMix + (constraint.data.rotateMix - constraint.rotateMix) * alpha
constraint.translateMix = constraint.translateMix + (constraint.data.translateMix - constraint.translateMix) * alpha
end
return
end
local rotate = 0
local translate = 0
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
rotate = frames[zlen(frames) + PREV_ROTATE]
translate = frames[zlen(frames) + PREV_TRANSLATE]
else
-- Interpolate between the previous frame and the current frame.
local frame = binarySearch(frames, time, ENTRIES)
rotate = frames[frame + PREV_ROTATE]
translate = frames[frame + PREV_TRANSLATE]
local frameTime = frames[frame]
local percent = self:getCurvePercent(math_floor(frame / ENTRIES) - 1,
1 - (time - frameTime) / (frames[frame + PREV_TIME] - frameTime))
rotate = rotate + (frames[frame + ROTATE] - rotate) * percent
translate = translate + (frames[frame + TRANSLATE] - translate) * percent
end
if blend == MixBlend.setup then
constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha
constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha
else
constraint.rotateMix = constraint.rotateMix + (rotate - constraint.rotateMix) * alpha
constraint.translateMix = constraint.translateMix + (translate - constraint.translateMix) * alpha
end
end
return self
end
return Animation
|
--[[ Created by Grid2 original authors, modified by Michael ]]--
local Grid2 = Grid2
local Grid2Frame = Grid2Frame
local GetTime = GetTime
local min = min
local AlignPoints = Grid2.AlignPoints
local defaultBackColor = { r=0, g=0, b=0, a=1 }
local function Bar_CreateHH(self, parent)
local bar = self:CreateFrame("StatusBar", parent)
bar.indicator = self
bar:SetStatusBarColor(0,0,0,0)
bar:SetMinMaxValues(0, 1)
bar:SetValue(0)
if self.backColor then
bar.bgTex = bar.bgTex or bar:CreateTexture()
end
end
local function Bar_Layout(self, parent)
local Bar = parent[self.name]
local bgTex = Bar.bgTex
local orient = self.orientation
local points = AlignPoints[orient][not self.reverseFill]
local level = parent:GetFrameLevel() + self.frameLevel
Bar:SetParent(parent)
Bar:ClearAllPoints()
Bar:SetOrientation(orient)
Bar:SetStatusBarTexture(self.texture)
Bar:SetReverseFill(self.reverseFill)
local parentName = self.parentName
if parentName then
local PBar = parent[parentName]
Bar:SetFrameLevel( PBar:GetFrameLevel() )
Bar:SetSize( PBar:GetWidth(), PBar:GetHeight() )
Bar:SetPoint( points[1], PBar:GetStatusBarTexture(), points[2], 0, 0)
Bar:SetPoint( points[3], PBar:GetStatusBarTexture(), points[4], 0, 0)
if bgTex then bgTex:Hide() end
else
local w = self.width or parent.container:GetWidth()
local h = self.height or parent.container:GetHeight()
Bar:SetFrameLevel(level)
Bar:SetSize(w, h)
Bar:SetPoint(self.anchor, parent.container, self.anchorRel, self.offsetx, self.offsety)
local color = self.backColor
if color then
local tex = Bar:GetStatusBarTexture()
local layer, sublayer = tex:GetDrawLayer()
bgTex:SetDrawLayer(layer, sublayer-1)
bgTex:SetTexture(self.texture)
bgTex:ClearAllPoints()
if self.dbx.invertColor then
bgTex:SetAllPoints(Bar)
else
bgTex:SetPoint( points[1], tex, points[2], 0, 0)
bgTex:SetPoint( points[3], tex, points[4], 0, 0)
bgTex:SetPoint( points[2], Bar, points[2], 0, 0)
bgTex:SetPoint( points[4], Bar, points[4], 0, 0)
bgTex:SetVertexColor( color.r, color.g, color.b, color.a )
end
bgTex:Show()
elseif bgTex then
bgTex:Hide()
end
end
Bar:Show()
end
local function Bar_GetBlinkFrame(self, parent)
return parent[self.name]
end
local function Bar_SetValue(self, parent, value)
parent[self.name]:SetValue(value)
end
local function Bar_SetValueParent(self, parent, value)
parent[self.name]:SetValue(value)
local barChild = parent[self.childName]
if value+barChild:GetValue()>1 then barChild:SetValue(1-value) end
end
local function Bar_SetValueChild(self, parent, value)
local v = parent[self.parentName]:GetValue()
if value+v>1 then value = 1-v end
parent[self.name]:SetValue(value)
end
--{{{ Bar OnUpdate
local timers = {}
local function tdestroy(bar)
local timer = timers[bar]
if timer then
timers[bar], timer._bar = nil, nil
Grid2:CancelTimer(timer)
end
end
local function tevent(timer)
local bar = timer._bar
local timeLeft = bar._expiration - GetTime()
if timeLeft>0 then
timeLeft = timeLeft / bar._duration
else
timeLeft = 0; tdestroy(bar)
end
bar.indicator:SetValue( bar:GetParent(), timeLeft )
end
local function tcreate(bar, duration, expiration)
local delay = duration>3 and 0.2 or 0.1
local timer = timers[bar]
if not timer then
timer = Grid2:CreateTimer(tevent, delay)
timer._bar = bar
timers[bar] = timer
elseif duration<=3 then
timer:SetDuration(delay)
end
bar._duration = duration
bar._expiration = expiration
return timer
end
local function Bar_OnUpdateD(self, parent, unit, status)
local bar,value = parent[self.name],0
if status then
local expiration = status:GetExpirationTime(unit)
if expiration then
local timeLeft = expiration - GetTime()
if timeLeft>0 then
local duration = status:GetDuration(unit) or timeLeft
value = timeLeft / duration
tcreate(bar, duration, expiration)
else
tdestroy(bar)
end
end
else
tdestroy(bar)
end
self:SetValue(parent,value)
end
local function Bar_OnUpdateS(self, parent, unit, status)
self:SetValue( parent, status and status:GetCount(unit)/status:GetCountMax(unit) or 0)
end
local function Bar_OnUpdate(self, parent, unit, status)
self:SetValue(parent, status and status:GetPercent(unit) or 0)
end
--}}}
local function Bar_SetOrientation(self, orientation)
self.orientation = orientation
self.dbx.orientation = orientation
end
local function Bar_Disable(self, parent)
local bar = parent[self.name]
bar:Hide()
bar:SetParent(nil)
bar:ClearAllPoints()
end
local function Bar_UpdateDB(self)
local dbx = self.dbx
local theme = Grid2Frame.db.profile
local l = dbx.location
self.texture = Grid2:MediaFetch("statusbar", dbx.texture or theme.barTexture, "Gradient")
self.orientation = dbx.orientation or theme.orientation
self.frameLevel = dbx.level or 1
self.anchor = l.point
self.anchorRel = l.relPoint
self.offsetx = l.x
self.offsety = l.y
self.width = dbx.width
self.height = dbx.height
self.reverseFill = dbx.reverseFill
self.backColor = dbx.backColor or (dbx.invertColor and defaultBackColor) or nil
self.OnUpdate = (dbx.duration and Bar_OnUpdateD) or (dbx.stack and Bar_OnUpdateS) or Bar_OnUpdate
if dbx.anchorTo then
local barParent = Grid2.indicators[dbx.anchorTo]
barParent.childName = self.name
barParent.SetValue = Bar_SetValueParent
self.parentName = dbx.anchorTo
self.SetValue = Bar_SetValueChild
self.reverseFill = barParent.reverseFill
self.orientation = barParent.orientation
else
self.SetValue = Bar_SetValue
self.parentName = nil
end
end
local function BarColor_OnUpdate(self, parent, unit, status)
if status then
self:SetBarColor(parent, status:GetColor(unit))
else
self:SetBarColor(parent, 0, 0, 0, 0)
end
end
local function BarColor_SetBarColor(self, parent, r, g, b, a)
parent[self.parentName]:SetStatusBarColor(r, g, b, min(self.opacity,a or 1) )
end
local function BarColor_SetBarColorInverted(self, parent, r, g, b, a)
local bar = parent[self.parentName]
local color = self.backColor
bar:SetStatusBarColor(color.r, color.g, color.b, min(self.opacity, 0.8))
if not self.dbx.anchorTo then
bar.bgTex:SetVertexColor(r, g, b, (a or 1)*color.a)
end
end
local function BarColor_UpdateDB(self)
if self.dbx.invertColor then
self.backColor = self.dbx.backColor or defaultBackColor
self.SetBarColor = BarColor_SetBarColorInverted
else
self.SetBarColor = BarColor_SetBarColor
end
self.opacity = self.dbx.opacity or 1
end
local function Create(indicatorKey, dbx)
local Bar = Grid2.indicators[indicatorKey] or Grid2.indicatorPrototype:new(indicatorKey)
Bar.dbx = dbx
Bar.Create = Bar_CreateHH
Bar.GetBlinkFrame = Bar_GetBlinkFrame
Bar.OnUpdate = Bar_OnUpdate
Bar.SetOrientation = Bar_SetOrientation
Bar.Disable = Bar_Disable
Bar.Layout = Bar_Layout
Bar.UpdateDB = Bar_UpdateDB
Bar_UpdateDB(Bar,dbx)
Grid2:RegisterIndicator(Bar, { "percent" } )
local colorKey = indicatorKey .. "-color"
local BarColor = Grid2.indicators[colorKey] or Grid2.indicatorPrototype:new(colorKey)
BarColor.dbx = dbx
BarColor.parentName = indicatorKey
BarColor.Create = Grid2.Dummy
BarColor.Layout = Grid2.Dummy
BarColor.OnUpdate = BarColor_OnUpdate
BarColor.UpdateDB = BarColor_UpdateDB
BarColor_UpdateDB(BarColor)
Grid2:RegisterIndicator(BarColor, { "color" })
Bar.sideKick = BarColor
return Bar, BarColor
end
Grid2.setupFunc["bar"] = Create
Grid2.setupFunc["bar-color"] = Grid2.Dummy
|
local cc = cc
cc.FileUtils:getInstance():addSearchPath("src")
cc.FileUtils:getInstance():addSearchPath("res")
cc.FileUtils:getInstance():addSearchPath("res/ui")
cc.FileUtils:getInstance():addSearchPath("res/skill")
cc.FileUtils:getInstance():addSearchPath("res/role")
-- CC_USE_DEPRECATED_API = true
require "cocos.init"
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1,6)))
math.random(); math.random(); math.random()
-- cclog
cclog = function(...)
print(string.format(...))
end
-- for CCLuaEngine traceback
function __G__TRACKBACK__(msg)
cclog("----------------------------------------")
cclog("LUA ERROR: " .. tostring(msg) .. "\n")
cclog(debug.traceback())
cclog("----------------------------------------")
return msg
end
local function main()
collectgarbage("collect")
-- avoid memory leak
collectgarbage("setpause", 100)
collectgarbage("setstepmul", 5000)
-- initialize director
local director = cc.Director:getInstance()
local glview = director:getOpenGLView()
if nil == glview then
glview = cc.GLViewImpl:createWithRect("HelloLua", cc.rect(0,0,1024,768))
director:setOpenGLView(glview)
end
glview:setDesignResolutionSize(1024, 768, cc.ResolutionPolicy.SHOW_ALL)
--turn on display FPS
director:setDisplayStats(false)
--set FPS. the default value is 1.0/60 if you don't call this
director:setAnimationInterval(1.0 / 60)
require "view.WelcomeScene"
local scene = WelcomeScene:create()
if cc.Director:getInstance():getRunningScene() then
cc.Director:getInstance():replaceScene(scene)
else
cc.Director:getInstance():runWithScene(scene)
end
end
local status, msg = xpcall(main, __G__TRACKBACK__)
if not status then
error(msg)
end
|
--Yeahh, idk anymore. Since no one buys scripts anymore, i might aswell just throw this on the internet for all of you to enjoy--
--IF IT DOESN'T WORK, YOU'LL HAVE TO WEAR A SHIRT AND A PANTS, THIS IS A COMMON PROBLEM!--
--Since VengefulExtras showcased my script, i saw a couple of flaws, i will try to fix this.--
--Feel free to edit this however you like, but please, do not turn this into some lame ass edit which pretty much 1 shots anything/everyone--
--WIP(because nothing is perfect)--
--Inspired by the one and only, yes, TheDarkRevenant(KingAbsalom)--
--V is to transform, however, it currently does nothing besides changing the idle animation and outfit, V2 will have this changed--
--RIP Forums 12/4/17--
Player=game:GetService("Players").LocalPlayer
Character=Player.Character
Character.Humanoid.Name = "noneofurbusiness"
hum = Character.noneofurbusiness
LeftArm=Character["Left Arm"]
LeftLeg=Character["Left Leg"]
RightArm=Character["Right Arm"]
RightLeg=Character["Right Leg"]
Root=Character["HumanoidRootPart"]
Head=Character["Head"]
Torso=Character["Torso"]
attacking = false
walking = false
position = "Idle"
local sine = 0
removeuseless = game:GetService("Debris")
local change = 2
debounce = false
tauntdebounce = false
mouse = Player:GetMouse()
sID = rbxassetid
create = Instance.new
local soundtable = {907329532,907330011,907330103,907328384,907328262,907328908,907328689,907332997,907329293,907328516,907329893,907332670,907332856,907333294}
local soundtable2 = {"0&hash=6bed87228104d8c3443be33081b6021c","0&hash=646ef2bf9c3a8b039864711d51d424e5"}
local soundtable3 = {834001797,834001752,834001699,834001828}
rdnm3 = #soundtable3
rdnm = #soundtable
rototota = false
rdnm2 = #soundtable
rototota = false
i = 1
running = false
damagedebounce = false
comingouttoplay = true
transf1 = false
balldebounce = false
donttransform = false
damageall={}
Repeater={}
Repeater2={}
nonmeshRepeater={}
nonmeshRepeater2={}
dmgii={}
DamageAll2={}
SlowlyFade={}
TheEnd={}
TheEnd2={}
TheEnd3={}
Extreme={}
ExtremeM={}
TheEnd4={}
UpMover={}
openshocktable={}
LessSize={}
ForwardMover={}
punchexplosion = Instance.new("Sound", LeftArm)
punchexplosion.SoundId = "rbxassetid://909258891"
punchexplosion.Looped = false
punchexplosion.Volume = 2
punchexplosion2 = Instance.new("Sound", LeftArm)
punchexplosion2.SoundId = "rbxassetid://907528019"
punchexplosion2.Looped = false
punchexplosion2.Volume = 2
punchexplosion3 = Instance.new("Sound", LeftArm)
punchexplosion3.SoundId = "rbxassetid://564533374"
punchexplosion3.Looped = false
punchexplosion3.Volume = 2
punchcharge = Instance.new("Sound", LeftArm)
punchcharge.SoundId = "rbxassetid://909253995"
punchcharge.Looped = false
punchcharge.Volume = 2
punchcharge2 = Instance.new("Sound", LeftArm)
punchcharge2.SoundId = "rbxassetid://907532684"
punchcharge2.Looped = false
punchcharge2.Volume = 2
LSSJ = Instance.new("Sound", Torso)
LSSJ.SoundId = "rbxassetid://1412058990"
LSSJ.Volume = 8
punchcharge3 = Instance.new("Sound", LeftArm)
punchcharge3.SoundId = "rbxassetid://1177784554"
punchcharge3.Looped = false
punchcharge3.Volume = 2
boomswoosh = Instance.new("Sound", Torso)
boomswoosh.SoundId = "rbxassetid://633627961"
boomswoosh.Looped = false
boomswoosh.Volume = 1.5
TheEndSound = Instance.new("Sound", Torso)
TheEndSound.SoundId = "rbxassetid://264358562"
TheEndSound.Looped = false
TheEndSound.Volume = 3
TheEndSound2 = Instance.new("Sound", Torso)
TheEndSound2.SoundId = "rbxassetid://907530407"
TheEndSound2.Looped = true
TheEndSound2.Volume = 3
ROOOAAAAH = Instance.new("Sound", Torso)
ROOOAAAAH.SoundId = "rbxassetid://774733972"
ROOOAAAAH.Looped = false
ROOOAAAAH.Volume = 2
x0412 = Instance.new("Sound", Torso)
x0412.SoundId = "rbxassetid://962379106"
x0412.Looped = false
x0412.Volume = 8
local HEADLERP = Instance.new("ManualWeld")
HEADLERP.Parent = Head
HEADLERP.Part0 = Head
HEADLERP.Part1 = Torso
HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
local TORSOLERP = Instance.new("ManualWeld")
TORSOLERP.Parent = Torso
TORSOLERP.Part0 = Torso
TORSOLERP.Part1 = Torso
TORSOLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
local ROOTLERP = Instance.new("ManualWeld")
ROOTLERP.Parent = Root
ROOTLERP.Part0 = Root
ROOTLERP.Part1 = Torso
ROOTLERP.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
local RIGHTARMLERP = Instance.new("ManualWeld")
RIGHTARMLERP.Parent = RightArm
RIGHTARMLERP.Part0 = RightArm
RIGHTARMLERP.Part1 = Torso
RIGHTARMLERP.C0 = CFrame.new(-1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
local LEFTARMLERP = Instance.new("ManualWeld")
LEFTARMLERP.Parent = LeftArm
LEFTARMLERP.Part0 = LeftArm
LEFTARMLERP.Part1 = Torso
LEFTARMLERP.C0 = CFrame.new(1.5, 0, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
local RIGHTLEGLERP = Instance.new("ManualWeld")
RIGHTLEGLERP.Parent = RightLeg
RIGHTLEGLERP.Part0 = RightLeg
RIGHTLEGLERP.Part1 = Torso
RIGHTLEGLERP.C0 = CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
local LEFTLEGLERP = Instance.new("ManualWeld")
LEFTLEGLERP.Parent = LeftLeg
LEFTLEGLERP.Part0 = LeftLeg
LEFTLEGLERP.Part1 = Torso
LEFTLEGLERP.C0 = CFrame.new(0.42, 2.0, 0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.3) * CFrame.Angles(math.rad(20 + 3*math.cos(sine/18)), math.rad(0), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(20), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0.1, 0.7) * CFrame.Angles(math.rad(-15), math.rad(30), math.rad(0.01)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5, 0.3, 0.8) * CFrame.Angles(math.rad(-30), math.rad(-25), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.42, 2.0, 0.2) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(3)), 0.5)
local function weldBetween(a, b)
local weld = Instance.new("ManualWeld", a)
weld.Part0 = a
weld.Part1 = b
weld.C0 = a.CFrame:inverse() * b.CFrame
return weld
end
godmode = coroutine.wrap(function()
while true do
hum.MaxHealth = math.huge
wait(0.0000001)
hum.Health = math.huge
wait()
end
end)
godmode()
ff = Instance.new("ForceField", Character)
ff.Visible = false
while comingouttoplay do
hum.WalkSpeed = 0
for i = 1, 15 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0,-7.5,0), .8)
wait()
end
Root.Anchored = true
smallrift = Instance.new("Part", Torso)
smallrift.Size = Vector3.new(0.1, 0.1, 0.1)
smallrift.Material = "Neon"
smallrift.Transparency = 1
smallrift.Anchored = true
smallrift.CanCollide = false
smallrift.CFrame = Root.CFrame * CFrame.new(0,-3,0)
smallriftdecal = Instance.new("Decal", smallrift)
smallriftdecal.Face = "Top"
smallriftdecal.Texture = "rbxassetid://702583926"
local sm = weldBetween(smallrift, Root)
sm.C0 = CFrame.new(0, 0, 0)
sound = Instance.new("Sound", smallrift)
sound.Volume = 1
sound.Pitch = 1.2
sound.SoundId = "rbxassetid://344894344"
sound:Play()
local rotete = coroutine.wrap(function()
while comingouttoplay do
smallrift.CFrame = smallrift.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(1 + 5),0)
wait()
end
end)
rotete()
for i = 1, 50 do
smallrift.Size = smallrift.Size + Vector3.new(.4,0,.4)
wait()
end
wait(1)
for _,n in pairs(Character:GetChildren()) do
if n:IsA("Accessory") then n:Remove() end
end
for _,x in pairs(Character:GetChildren()) do
if x:IsA("Decal") then x:Remove() end
end
Torso.BrickColor = BrickColor.new("Really black")
Head.BrickColor = BrickColor.new("Really black")
Character.Shirt:Destroy()
Character.Pants:Destroy()
shirt = Instance.new("Shirt", Character)
shirt.Name = "Shirt"
pants = Instance.new("Pants", Character)
pants.Name = "Pants"
Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=520226382"
Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=520226569"
local DarkReaper = Instance.new("Part",Character)
DarkReaper.Size = Vector3.new(2,2,2)
DarkReaper.CFrame = Head.CFrame
DarkReaper.CanCollide = false
local DarkReaperWeld = Instance.new("Weld",DarkReaper)
DarkReaperWeld.Part0 = DarkReaper
DarkReaperWeld.Part1 = Head
DarkReaperWeld.C0 = DarkReaper.CFrame:inverse() * Head.CFrame
mdark = Instance.new("SpecialMesh", DarkReaper)
mdark.MeshType = "FileMesh"
mdark.Scale = Vector3.new(1.08, 1.08, 1.08)
mdark.MeshId,mdark.TextureId = 'http://www.roblox.com/asset/?id=16150814','http://www.roblox.com/asset/?id=16150799'
mdark.VertexColor = Vector3.new(1,1,1)
local DarkReaperANTLERS = Instance.new("Part",Character)
DarkReaperANTLERS.Size = Vector3.new(2,2,2)
DarkReaperANTLERS.CFrame = Head.CFrame
DarkReaperANTLERS.CanCollide = false
local DarkReaperWeld2 = Instance.new("Weld",DarkReaperANTLERS)
DarkReaperWeld2.Part0 = DarkReaperANTLERS
DarkReaperWeld2.Part1 = Head
DarkReaperWeld2.C0 = DarkReaperANTLERS.CFrame:inverse() * Head.CFrame * CFrame.new(0,-1.2,0)
local mdark2 = Instance.new("SpecialMesh", DarkReaperANTLERS)
mdark2.MeshType = "FileMesh"
mdark2.Scale = Vector3.new(1.08, 1.08, 1.08)
mdark2.MeshId,mdark2.TextureId = 'http://www.roblox.com/asset/?id=1271547','http://www.roblox.com/asset/?id=147540850'
mdark2.VertexColor = Vector3.new(255,0,0)
HandCannonTop1 = Instance.new("Part", LeftArm)
HandCannonTop1.CanCollide = false
HandCannonTop1.Size = Vector3.new(1.1, 0.1, 1.1)
HandCannonTop1.BottomSurface = "SmoothNoOutlines"
HandCannonTop1.TopSurface = "SmoothNoOutlines"
HandCannonTop1.LeftSurface = "SmoothNoOutlines"
HandCannonTop1.RightSurface = "SmoothNoOutlines"
HandCannonTop1.FrontSurface = "SmoothNoOutlines"
HandCannonTop1.BackSurface = "SmoothNoOutlines"
HandCannonTop1.Material = "Metal"
local weld2 = weldBetween(HandCannonTop1, LeftArm)
weld2.C0 = CFrame.new(0, .9, 0)
FixedER = Instance.new("Part", LeftArm)
FixedER.CanCollide = false
FixedER.Size = Vector3.new(1.1, 0.1, 1.1)
FixedER.BottomSurface = "SmoothNoOutlines"
FixedER.TopSurface = "SmoothNoOutlines"
FixedER.LeftSurface = "SmoothNoOutlines"
FixedER.RightSurface = "SmoothNoOutlines"
FixedER.FrontSurface = "SmoothNoOutlines"
FixedER.BackSurface = "SmoothNoOutlines"
FixedER.Material = "Metal"
local weldFixedER = weldBetween(FixedER, LeftArm)
weldFixedER.C0 = CFrame.new(0, .7, 0)
FixedER4 = Instance.new("Part", LeftArm)
FixedER4.CanCollide = false
FixedER4.Size = Vector3.new(1.1, 0.1, 1.1)
FixedER4.BottomSurface = "SmoothNoOutlines"
FixedER4.TopSurface = "SmoothNoOutlines"
FixedER4.LeftSurface = "SmoothNoOutlines"
FixedER4.RightSurface = "SmoothNoOutlines"
FixedER4.FrontSurface = "SmoothNoOutlines"
FixedER4.BackSurface = "SmoothNoOutlines"
FixedER4.Material = "Metal"
local weldFixedER4 = weldBetween(FixedER4, LeftArm)
weldFixedER4.C0 = CFrame.new(0, .5, 0)
FixedER5 = Instance.new("Part", LeftArm)
FixedER5.CanCollide = false
FixedER5.Size = Vector3.new(1.1, 0.1, 1.1)
FixedER5.BottomSurface = "SmoothNoOutlines"
FixedER5.TopSurface = "SmoothNoOutlines"
FixedER5.LeftSurface = "SmoothNoOutlines"
FixedER5.RightSurface = "SmoothNoOutlines"
FixedER5.FrontSurface = "SmoothNoOutlines"
FixedER5.BackSurface = "SmoothNoOutlines"
FixedER5.Material = "Metal"
local weldFixedER5 = weldBetween(FixedER5, LeftArm)
weldFixedER5.C0 = CFrame.new(0, -.5, 0)
FixedER2 = Instance.new("Part", LeftArm)
FixedER2.CanCollide = false
FixedER2.Size = Vector3.new(1.1, 0.1, 1.1)
FixedER2.BottomSurface = "SmoothNoOutlines"
FixedER2.TopSurface = "SmoothNoOutlines"
FixedER2.LeftSurface = "SmoothNoOutlines"
FixedER2.RightSurface = "SmoothNoOutlines"
FixedER2.FrontSurface = "SmoothNoOutlines"
FixedER2.BackSurface = "SmoothNoOutlines"
FixedER2.Material = "Metal"
local weldFixedER2 = weldBetween(FixedER2, LeftArm)
weldFixedER2.C0 = CFrame.new(0, -.7, 0)
FixedER3 = Instance.new("Part", LeftArm)
FixedER3.CanCollide = false
FixedER3.Size = Vector3.new(1.1, 0.1, 1.1)
FixedER3.BottomSurface = "SmoothNoOutlines"
FixedER3.TopSurface = "SmoothNoOutlines"
FixedER3.LeftSurface = "SmoothNoOutlines"
FixedER3.RightSurface = "SmoothNoOutlines"
FixedER3.FrontSurface = "SmoothNoOutlines"
FixedER3.BackSurface = "SmoothNoOutlines"
FixedER3.Material = "Metal"
local weldFixedER3 = weldBetween(FixedER3, LeftArm)
weldFixedER3.C0 = CFrame.new(0, -.9, 0)
HandCannonTop2 = Instance.new("Part", LeftArm)
HandCannonTop2.CanCollide = false
HandCannonTop2.Size = Vector3.new(1.1, 0.3, 1.1)
HandCannonTop2.BottomSurface = "SmoothNoOutlines"
HandCannonTop2.TopSurface = "SmoothNoOutlines"
HandCannonTop2.LeftSurface = "SmoothNoOutlines"
HandCannonTop2.RightSurface = "SmoothNoOutlines"
HandCannonTop2.FrontSurface = "SmoothNoOutlines"
HandCannonTop2.BackSurface = "SmoothNoOutlines"
HandCannonTop2.Material = "Metal"
HandCannonTop2.Transparency = 1
local weld3 = weldBetween(HandCannonTop2, LeftArm)
weld3.C0 = CFrame.new(0, -.8, 0)
HandCannonTop3 = Instance.new("Part", LeftArm)
HandCannonTop3.CanCollide = false
HandCannonTop3.Size = Vector3.new(1.1, 0.3, 1.1)
HandCannonTop3.BottomSurface = "SmoothNoOutlines"
HandCannonTop3.TopSurface = "SmoothNoOutlines"
HandCannonTop3.Material = "Metal"
HandCannonTop3.LeftSurface = "SmoothNoOutlines"
HandCannonTop3.RightSurface = "SmoothNoOutlines"
HandCannonTop3.FrontSurface = "SmoothNoOutlines"
HandCannonTop3.BackSurface = "SmoothNoOutlines"
local weld4 = weldBetween(HandCannonTop3, LeftArm)
weld4.C0 = CFrame.new(0, 0, 0)
secretpart = Instance.new("Part", LeftArm)
secretpart.CanCollide = false
secretpart.Size = Vector3.new(1.15, 0.25, 1.15)
secretpart.BottomSurface = "SmoothNoOutlines"
secretpart.TopSurface = "SmoothNoOutlines"
secretpart.Material = "Metal"
secretpart.BrickColor = BrickColor.new("Really black")
secretpart.LeftSurface = "SmoothNoOutlines"
secretpart.RightSurface = "SmoothNoOutlines"
secretpart.FrontSurface = "SmoothNoOutlines"
secretpart.BackSurface = "SmoothNoOutlines"
local secret = weldBetween(secretpart, LeftArm)
secret.C0 = CFrame.new(0, 0, 0)
HandCannonTop4 = Instance.new("Part", LeftArm)
HandCannonTop4.CanCollide = false
HandCannonTop4.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop4.BottomSurface = "SmoothNoOutlines"
HandCannonTop4.TopSurface = "SmoothNoOutlines"
HandCannonTop4.Material = "Granite"
HandCannonTop4.BrickColor = BrickColor.new("Crimson")
local weld5 = weldBetween(HandCannonTop4, LeftArm)
weld5.C0 = CFrame.new(0, 0, 0)
HandCannonTop5 = Instance.new("Part", LeftArm)
HandCannonTop5.CanCollide = false
HandCannonTop5.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop5.BottomSurface = "SmoothNoOutlines"
HandCannonTop5.TopSurface = "SmoothNoOutlines"
HandCannonTop5.Material = "Granite"
HandCannonTop5.BrickColor = BrickColor.new("Crimson")
local weld6 = weldBetween(HandCannonTop5, LeftArm)
weld6.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), 0)
HandCannonTop6 = Instance.new("Part", LeftArm)
HandCannonTop6.CanCollide = false
HandCannonTop6.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop6.BottomSurface = "SmoothNoOutlines"
HandCannonTop6.TopSurface = "SmoothNoOutlines"
HandCannonTop6.Material = "Granite"
HandCannonTop6.BrickColor = BrickColor.new("Crimson")
local weld7 = weldBetween(HandCannonTop6, LeftArm)
weld7.C0 = CFrame.new(.2, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), 0)
HandCannonTop7 = Instance.new("Part", LeftArm)
HandCannonTop7.CanCollide = false
HandCannonTop7.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop7.BottomSurface = "SmoothNoOutlines"
HandCannonTop7.TopSurface = "SmoothNoOutlines"
HandCannonTop7.Material = "Granite"
HandCannonTop7.BrickColor = BrickColor.new("Crimson")
local weld8 = weldBetween(HandCannonTop7, LeftArm)
weld8.C0 = CFrame.new(.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), 0)
HandCannonTop8 = Instance.new("Part", LeftArm)
HandCannonTop8.CanCollide = false
HandCannonTop8.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop8.BottomSurface = "SmoothNoOutlines"
HandCannonTop8.TopSurface = "SmoothNoOutlines"
HandCannonTop8.Material = "Granite"
HandCannonTop8.BrickColor = BrickColor.new("Crimson")
local weld9 = weldBetween(HandCannonTop8, LeftArm)
weld9.C0 = CFrame.new(-.2, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), 0)
HandCannonTop9 = Instance.new("Part", LeftArm)
HandCannonTop9.CanCollide = false
HandCannonTop9.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop9.BottomSurface = "SmoothNoOutlines"
HandCannonTop9.TopSurface = "SmoothNoOutlines"
HandCannonTop9.Material = "Granite"
HandCannonTop9.BrickColor = BrickColor.new("Crimson")
local weld10 = weldBetween(HandCannonTop9, LeftArm)
weld10.C0 = CFrame.new(-.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), 0)
HandCannonTop10 = Instance.new("Part", LeftArm)
HandCannonTop10.CanCollide = false
HandCannonTop10.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop10.BottomSurface = "SmoothNoOutlines"
HandCannonTop10.TopSurface = "SmoothNoOutlines"
HandCannonTop10.Material = "Granite"
HandCannonTop10.BrickColor = BrickColor.new("Crimson")
local weld11 = weldBetween(HandCannonTop10, LeftArm)
weld11.C0 = CFrame.new(-.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
HandCannonTop11 = Instance.new("Part", LeftArm)
HandCannonTop11.CanCollide = false
HandCannonTop11.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop11.BottomSurface = "SmoothNoOutlines"
HandCannonTop11.TopSurface = "SmoothNoOutlines"
HandCannonTop11.Material = "Granite"
HandCannonTop11.BrickColor = BrickColor.new("Crimson")
local weld12 = weldBetween(HandCannonTop10, LeftArm)
weld12.C0 = CFrame.new(-.2, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
HandCannonTop12 = Instance.new("Part", LeftArm)
HandCannonTop12.CanCollide = false
HandCannonTop12.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop12.BottomSurface = "SmoothNoOutlines"
HandCannonTop12.TopSurface = "SmoothNoOutlines"
HandCannonTop12.Material = "Granite"
HandCannonTop12.BrickColor = BrickColor.new("Crimson")
local weld13 = weldBetween(HandCannonTop12, LeftArm)
weld13.C0 = CFrame.new(.2, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
HandCannonTop13 = Instance.new("Part", LeftArm)
HandCannonTop13.CanCollide = false
HandCannonTop13.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop13.BottomSurface = "SmoothNoOutlines"
HandCannonTop13.TopSurface = "SmoothNoOutlines"
HandCannonTop13.Material = "Granite"
HandCannonTop13.BrickColor = BrickColor.new("Crimson")
local weld14 = weldBetween(HandCannonTop13, LeftArm)
weld14.C0 = CFrame.new(.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
HandCannonTop14 = Instance.new("Part", LeftArm)
HandCannonTop14.CanCollide = false
HandCannonTop14.Size = Vector3.new(0.1, 1.7, 1.03)
HandCannonTop14.BottomSurface = "SmoothNoOutlines"
HandCannonTop14.TopSurface = "SmoothNoOutlines"
HandCannonTop14.Material = "Granite"
HandCannonTop14.BrickColor = BrickColor.new("Crimson")
local weld15 = weldBetween(HandCannonTop14, LeftArm)
weld15.C0 = CFrame.new(-.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
corecircle = Instance.new("Part", LeftArm)
corecircle.CanCollide = false
corecircle.Size = Vector3.new(0,0,0)
corecircle.Material = "Slate"
corecircleMESH = Instance.new("SpecialMesh", corecircle)
corecircleMESH.Scale = Vector3.new(8,17,17)
corecircleMESH.MeshType = "Cylinder"
local weldcore = weldBetween(corecircle, HandCannonTop3)
weldcore.C0 = CFrame.new(.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
corecircle2 = Instance.new("Part", LeftArm)
corecircle2.CanCollide = false
corecircle2.Size = Vector3.new(0,0,0)
corecircle2.Material = "Fabric"
corecircle2.BrickColor = BrickColor.new("Really black")
corecircleMESH2 = Instance.new("SpecialMesh", corecircle2)
corecircleMESH2.Scale = Vector3.new(7,18,18)
corecircleMESH2.MeshType = "Cylinder"
local weldcore2 = weldBetween(corecircle2, HandCannonTop3)
weldcore2.C0 = CFrame.new(.4, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
TheCore = Instance.new("Part", LeftArm)
TheCore.CanCollide = false
TheCore.Size = Vector3.new(0,0,0)
TheCore.Material = "Fabric"
TheCore.BrickColor = BrickColor.new("Crimson")
TheCoreMESH = Instance.new("SpecialMesh", TheCore)
TheCoreMESH.Scale = Vector3.new(.3,.3,.3)
TheCoreMESH.MeshId = "rbxassetid://19251107"
local TheCoreweld = weldBetween(TheCore, HandCannonTop3)
TheCoreweld.C0 = CFrame.new(0, .6, 0) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0))
local fidgetspinner = coroutine.wrap(function()
while true do
TheCoreweld.C0 = TheCoreweld.C0 * CFrame.Angles(math.rad(1), math.rad(0), math.rad(0))
wait()
end
end)
fidgetspinner()
Gear1 = Instance.new("Part", LeftArm)
Gear1.CanCollide = false
Gear1.Size = Vector3.new(1, 1, 1)
Gear1.CFrame = CFrame.new(0, 1, 0)
Gear1.BrickColor = BrickColor.new("Really black")
GearMesh1 = Instance.new("FileMesh", Gear1)
GearMesh1.MeshId = "rbxassetid://156292343"
local weld6 = weldBetween(Gear1, HandCannonTop2)
weld6.C0 = CFrame.new(0, 0, -.2) * CFrame.Angles(math.rad(90), math.rad(0), 0)
Gear2 = Instance.new("Part", LeftArm)
Gear2.CanCollide = false
Gear2.Size = Vector3.new(1, 1, 1)
Gear2.CFrame = CFrame.new(0, -1, 0)
Gear2.BrickColor = BrickColor.new("Really black")
GearMesh2 = Instance.new("FileMesh", Gear2)
GearMesh2.MeshId = "rbxassetid://156292343"
local weld7 = weldBetween(Gear2, HandCannonTop1)
weld7.C0 = CFrame.new(0, 0, .1) * CFrame.Angles(math.rad(90), math.rad(0), 0)
EnergyCorePART = Instance.new("Part", LeftArm)
EnergyCorePART.Size = Vector3.new(0.5, 0.5, 0.5)
EnergyCorePART.Material = "Neon"
EnergyCorePART.BrickColor = BrickColor.new("Crimson")
EnergyCore1 = Instance.new("SpecialMesh", EnergyCorePART)
EnergyCore1.MeshType = "Sphere"
EnergyCore1.Scale = Vector3.new(1,1,1)
local weldENERGY = weldBetween(EnergyCorePART, Gear1)
weldENERGY.C0 = CFrame.new(0, -0.1, -0) * CFrame.Angles(math.rad(90), math.rad(0), 0)
CorruptedArm = Instance.new("Part", LeftArm)
CorruptedArm.CanCollide = false
CorruptedArm.Size = Vector3.new(1.001, 2.001, 1.001)
CorruptedArm.BottomSurface = "SmoothNoOutlines"
CorruptedArm.TopSurface = "SmoothNoOutlines"
CorruptedArm.Material = "Neon"
CorruptedArm.Transparency = 0
CorruptedArm.BrickColor = BrickColor.new("Really red")
local weldcor = weldBetween(CorruptedArm, LeftArm)
weldcor.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
CorruptedArm2 = Instance.new("Part", LeftArm)
CorruptedArm2.CanCollide = false
CorruptedArm2.Size = Vector3.new(1.028, 2.028, 1.028)
CorruptedArm2.BottomSurface = "SmoothNoOutlines"
CorruptedArm2.TopSurface = "SmoothNoOutlines"
CorruptedArm2.Material = "Neon"
CorruptedArm2.Transparency = 1
CorruptedArm2.BrickColor = BrickColor.new("Crimson")
local weldcor2 = weldBetween(CorruptedArm2, LeftArm)
weldcor2.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
ArmorPlating = Instance.new("Part", LeftArm)
ArmorPlating.CanCollide = false
ArmorPlating.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating.BottomSurface = "SmoothNoOutlines"
ArmorPlating.TopSurface = "SmoothNoOutlines"
ArmorPlating.Material = "Neon"
ArmorPlating.BrickColor = BrickColor.new("Crimson")
ArmorPlating.LeftSurface = "SmoothNoOutlines"
ArmorPlating.RightSurface = "SmoothNoOutlines"
ArmorPlating.FrontSurface = "SmoothNoOutlines"
ArmorPlating.BackSurface = "SmoothNoOutlines"
local Armoring = weldBetween(ArmorPlating, HandCannonTop3)
Armoring.C0 = CFrame.new(.4, 0, .53)
ArmorPlating2 = Instance.new("Part", LeftArm)
ArmorPlating2.CanCollide = false
ArmorPlating2.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating2.BottomSurface = "SmoothNoOutlines"
ArmorPlating2.TopSurface = "SmoothNoOutlines"
ArmorPlating2.Material = "Neon"
ArmorPlating2.BrickColor = BrickColor.new("Crimson")
ArmorPlating2.LeftSurface = "SmoothNoOutlines"
ArmorPlating2.RightSurface = "SmoothNoOutlines"
ArmorPlating2.FrontSurface = "SmoothNoOutlines"
ArmorPlating2.BackSurface = "SmoothNoOutlines"
local Armoring2 = weldBetween(ArmorPlating2, HandCannonTop3)
Armoring2.C0 = CFrame.new(.2, 0, .53)
ArmorPlating3 = Instance.new("Part", LeftArm)
ArmorPlating3.CanCollide = false
ArmorPlating3.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating3.BottomSurface = "SmoothNoOutlines"
ArmorPlating3.TopSurface = "SmoothNoOutlines"
ArmorPlating3.Material = "Neon"
ArmorPlating3.BrickColor = BrickColor.new("Crimson")
ArmorPlating3.LeftSurface = "SmoothNoOutlines"
ArmorPlating3.RightSurface = "SmoothNoOutlines"
ArmorPlating3.FrontSurface = "SmoothNoOutlines"
ArmorPlating3.BackSurface = "SmoothNoOutlines"
local Armoring3 = weldBetween(ArmorPlating3, HandCannonTop3)
Armoring3.C0 = CFrame.new(0, 0, .53)
ArmorPlating4 = Instance.new("Part", LeftArm)
ArmorPlating4.CanCollide = false
ArmorPlating4.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating4.BottomSurface = "SmoothNoOutlines"
ArmorPlating4.TopSurface = "SmoothNoOutlines"
ArmorPlating4.Material = "Neon"
ArmorPlating4.BrickColor = BrickColor.new("Crimson")
ArmorPlating4.LeftSurface = "SmoothNoOutlines"
ArmorPlating4.RightSurface = "SmoothNoOutlines"
ArmorPlating4.FrontSurface = "SmoothNoOutlines"
ArmorPlating4.BackSurface = "SmoothNoOutlines"
local Armoring4 = weldBetween(ArmorPlating4, HandCannonTop3)
Armoring4.C0 = CFrame.new(-.2, 0, .53)
ArmorPlating5 = Instance.new("Part", LeftArm)
ArmorPlating5.CanCollide = false
ArmorPlating5.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating5.BottomSurface = "SmoothNoOutlines"
ArmorPlating5.TopSurface = "SmoothNoOutlines"
ArmorPlating5.Material = "Neon"
ArmorPlating5.BrickColor = BrickColor.new("Crimson")
ArmorPlating5.LeftSurface = "SmoothNoOutlines"
ArmorPlating5.RightSurface = "SmoothNoOutlines"
ArmorPlating5.FrontSurface = "SmoothNoOutlines"
ArmorPlating5.BackSurface = "SmoothNoOutlines"
local Armoring5 = weldBetween(ArmorPlating5, HandCannonTop3)
Armoring5.C0 = CFrame.new(-.4, 0, .53)
ArmorPlating6 = Instance.new("Part", LeftArm)
ArmorPlating6.CanCollide = false
ArmorPlating6.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating6.BottomSurface = "SmoothNoOutlines"
ArmorPlating6.TopSurface = "SmoothNoOutlines"
ArmorPlating6.Material = "Neon"
ArmorPlating6.BrickColor = BrickColor.new("Crimson")
ArmorPlating6.LeftSurface = "SmoothNoOutlines"
ArmorPlating6.RightSurface = "SmoothNoOutlines"
ArmorPlating6.FrontSurface = "SmoothNoOutlines"
ArmorPlating6.BackSurface = "SmoothNoOutlines"
local Armoring6 = weldBetween(ArmorPlating6, HandCannonTop3)
Armoring6.C0 = CFrame.new(.4, 0, -.53)
ArmorPlating7 = Instance.new("Part", LeftArm)
ArmorPlating7.CanCollide = false
ArmorPlating7.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating7.BottomSurface = "SmoothNoOutlines"
ArmorPlating7.TopSurface = "SmoothNoOutlines"
ArmorPlating7.Material = "Neon"
ArmorPlating7.BrickColor = BrickColor.new("Crimson")
ArmorPlating7.LeftSurface = "SmoothNoOutlines"
ArmorPlating7.RightSurface = "SmoothNoOutlines"
ArmorPlating7.FrontSurface = "SmoothNoOutlines"
ArmorPlating7.BackSurface = "SmoothNoOutlines"
local Armoring7 = weldBetween(ArmorPlating7, HandCannonTop3)
Armoring7.C0 = CFrame.new(.2, 0, -.53)
ArmorPlating8 = Instance.new("Part", LeftArm)
ArmorPlating8.CanCollide = false
ArmorPlating8.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating8.BottomSurface = "SmoothNoOutlines"
ArmorPlating8.TopSurface = "SmoothNoOutlines"
ArmorPlating8.Material = "Neon"
ArmorPlating8.BrickColor = BrickColor.new("Crimson")
ArmorPlating8.LeftSurface = "SmoothNoOutlines"
ArmorPlating8.RightSurface = "SmoothNoOutlines"
ArmorPlating8.FrontSurface = "SmoothNoOutlines"
ArmorPlating8.BackSurface = "SmoothNoOutlines"
local Armoring8 = weldBetween(ArmorPlating8, HandCannonTop3)
Armoring8.C0 = CFrame.new(0, 0, -.53)
ArmorPlating9 = Instance.new("Part", LeftArm)
ArmorPlating9.CanCollide = false
ArmorPlating9.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating9.BottomSurface = "SmoothNoOutlines"
ArmorPlating9.TopSurface = "SmoothNoOutlines"
ArmorPlating9.Material = "Neon"
ArmorPlating9.BrickColor = BrickColor.new("Crimson")
ArmorPlating9.LeftSurface = "SmoothNoOutlines"
ArmorPlating9.RightSurface = "SmoothNoOutlines"
ArmorPlating9.FrontSurface = "SmoothNoOutlines"
ArmorPlating9.BackSurface = "SmoothNoOutlines"
local Armoring9 = weldBetween(ArmorPlating9, HandCannonTop3)
Armoring9.C0 = CFrame.new(-.2, 0, -.53)
ArmorPlating10 = Instance.new("Part", LeftArm)
ArmorPlating10.CanCollide = false
ArmorPlating10.Size = Vector3.new(0.1, 0.28, 0.1)
ArmorPlating10.BottomSurface = "SmoothNoOutlines"
ArmorPlating10.TopSurface = "SmoothNoOutlines"
ArmorPlating10.Material = "Neon"
ArmorPlating10.BrickColor = BrickColor.new("Crimson")
ArmorPlating10.LeftSurface = "SmoothNoOutlines"
ArmorPlating10.RightSurface = "SmoothNoOutlines"
ArmorPlating10.FrontSurface = "SmoothNoOutlines"
ArmorPlating10.BackSurface = "SmoothNoOutlines"
local Armoring10 = weldBetween(ArmorPlating10, HandCannonTop3)
Armoring10.C0 = CFrame.new(-.4, 0, -.53)
light = Instance.new("PointLight", Torso)
light.Color = Color3.new(255,0,0)
light.Range = 5
light.Brightness = 50
local Switcher = coroutine.wrap(function()
while true do
for i = 1, 50 do
CorruptedArm2.Transparency = CorruptedArm2.Transparency - 0.005
CorruptedArm.Transparency = CorruptedArm.Transparency + 0.02
wait()
end
for i = 1, 50 do
CorruptedArm2.Transparency = CorruptedArm2.Transparency + 0.005
CorruptedArm.Transparency = CorruptedArm.Transparency - 0.02
wait()
end
wait()
end
end)
Switcher()
Root.Anchored = false
Root.CanCollide = false
local removesize = coroutine.wrap(function()
while comingouttoplay do
smallrift.Size = smallrift.Size - Vector3.new(1,1,1)
wait()
end
end)
removesize()
sound2 = Instance.new("Sound", Torso)
sound2.SoundId = "rbxassetid://1292034965"
sound2.Volume = 4
sound2:Play()
for i = 1, 10 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0,7.5,0), .4)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0.3) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,0,-.2) * CFrame.Angles(math.rad(20),math.rad(0),math.rad(0)), 0.8)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,0,-.2) * CFrame.Angles(math.rad(20),math.rad(0),math.rad(0)), 0.8)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.0, .9) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
wait()
end
local shockwefe = coroutine.wrap(function()
shockwave = Instance.new("Part", Torso)
shockwave.Size = Vector3.new(5, 5, 5)
shockwave.Transparency = 0
shockwave.BrickColor = BrickColor.new("Artichoke")
shockwave.Anchored = true
shockwave.CanCollide = false
shockwave.CFrame = Root.CFrame*CFrame.new(0, -2.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
sh1 = Instance.new("SpecialMesh", shockwave)
sh1.MeshId = "http://www.roblox.com/asset/?id=3270017"
sh1.Scale = Vector3.new(0, 0, 0)
removeuseless:AddItem(shockwave,5)
for i = 1, 100 do
sh1.Scale = sh1.Scale + Vector3.new(3,3,0)
shockwave.Transparency = shockwave.Transparency + 0.05
wait()
end
end)
shockwefe()
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.4, 1, 0.501) * CFrame.Angles(math.rad(-80), math.rad(-5), math.rad(0)), 0.3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(-80), math.rad(-10), math.rad(0)), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.2, .8) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0)), 0.3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 1.9, -.34) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(10)), 0.3)
wait()
end
removeuseless:AddItem(smallrift,4)
comingouttoplay = false
wait()
end
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='m' then
if debounce then return end
debounce = true
attacking = true
hum.WalkSpeed = 0
maketransparencysetto = coroutine.wrap(function()
brolycharge = Instance.new("Sound", Torso)
brolycharge.SoundId = "rbxassetid://722133423"
brolycharge.Volume = 4
brolycharge:Play()
Shield = Instance.new("Part", Torso)
Shield.Material = "Neon"
Shield.Anchored = true
Shield.Transparency = 1
Shield.CanCollide = false
Shield.BrickColor = BrickColor.new("Crimson")
Shield.Size = Vector3.new(10,10,10)
ShieldShape = Instance.new("SpecialMesh", Shield)
ShieldShape.MeshType = "Sphere"
ShieldShape.Scale = Vector3.new(50,50,50)
Shield.CFrame = Root.CFrame
while Shield.Transparency > .5 do
Shield.Transparency = Shield.Transparency - 0.03
wait()
end
end)
maketransparencysetto()
quicklerp = coroutine.wrap(function()
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(0)), .3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.7, .35, 0) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(15)), 0.8)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.7, .35, 0) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(-15)), 0.8)
wait()
end
end)
quicklerp()
for i = 1, 100 do
ShieldShape.Scale = ShieldShape.Scale - Vector3.new(.5,.5,.5)
wait()
end
wait(.5)
ShieldShape.Scale = Vector3.new(1,1,1)
Shield.Transparency = .5
wait(.01)
Shield.Transparency = 1
wait(.01)
Shield.Transparency = .5
wait(.01)
Shield.Transparency = 1
wait(.01)
Shield.Transparency = .5
wait(.01)
Shield.Transparency = 1
wait(.01)
Shield.Transparency = .5
wait(.01)
Shield.Transparency = 1
wait(.01)
Shield.Transparency = .5
wait(.01)
Shield.Transparency = 1
wait(.01)
Shield.Transparency = .5
wait(.01)
Shield.Transparency = 1
wait(.01)
Shield.Transparency = .5
huah = Instance.new("Sound", Torso)
huah.Volume = 8
huah.SoundId = "rbxassetid://1502082459"
huah:Play()
explosionsound = Instance.new("Sound", Torso)
explosionsound.SoundId = "rbxassetid://919941001"
explosionsound.Volume = 3
explosionsound:Play()
quicklerp2 = coroutine.wrap(function()
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.7, .45, 0) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(20)), 0.8)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.7, .45, 0) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(-20)), 0.8)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
end)
quicklerp2()
Shield:Remove()
blastwave = Instance.new("Part", Torso)
blastwave.Size = Vector3.new(1, 1, 1)
blastwave.Transparency = 0
blastwave.BrickColor = BrickColor.new("Crimson")
blastwave.Material = "Neon"
blastwave.Anchored = true
blastwave.CanCollide = false
blastwave.CFrame = CFrame.new(Root.Position) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
removeuseless:AddItem(blastwave,5)
DDTblastwave = Instance.new("SpecialMesh", blastwave)
DDTblastwave.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTblastwave.Scale = Vector3.new(1, 1, 1)
blastwave2 = Instance.new("Part", Torso)
blastwave2.Size = Vector3.new(1, 1, 1)
blastwave2.Transparency = 0
blastwave2.BrickColor = BrickColor.new("Crimson")
blastwave2.Material = "Neon"
blastwave2.Anchored = true
blastwave2.CanCollide = false
blastwave2.CFrame = CFrame.new(Root.Position) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
removeuseless:AddItem(blastwave2,5)
DDTblastwave2 = Instance.new("SpecialMesh", blastwave2)
DDTblastwave2.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTblastwave2.Scale = Vector3.new(1, 1, 1)
blastwave3 = Instance.new("Part", Torso)
blastwave3.Size = Vector3.new(1, 1, 1)
blastwave3.Transparency = 0
blastwave3.BrickColor = BrickColor.new("Crimson")
blastwave3.Material = "Neon"
blastwave3.Anchored = true
blastwave3.CanCollide = false
blastwave3.CFrame = CFrame.new(Root.Position) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
removeuseless:AddItem(blastwave3,5)
DDTblastwave3 = Instance.new("SpecialMesh", blastwave3)
DDTblastwave3.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTblastwave3.Scale = Vector3.new(1, 1, 1)
blastwave4 = Instance.new("Part", Torso)
blastwave4.Size = Vector3.new(1, 1, 1)
blastwave4.Transparency = 0
blastwave4.BrickColor = BrickColor.new("Crimson")
blastwave4.Material = "Neon"
blastwave4.Anchored = true
blastwave4.CanCollide = false
blastwave4.CFrame = CFrame.new(Root.Position) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
removeuseless:AddItem(blastwave4,5)
DDTblastwave4 = Instance.new("SpecialMesh", blastwave4)
DDTblastwave4.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTblastwave4.Scale = Vector3.new(1, 1, 1)
blastwave5 = Instance.new("Part", Torso)
blastwave5.Size = Vector3.new(1, 1, 1)
blastwave5.Transparency = 0
blastwave5.BrickColor = BrickColor.new("Crimson")
blastwave5.Material = "Neon"
blastwave5.Anchored = true
blastwave5.CanCollide = false
blastwave5.CFrame = CFrame.new(Root.Position) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
removeuseless:AddItem(blastwave5,5)
DDTblastwave5 = Instance.new("SpecialMesh", blastwave5)
DDTblastwave5.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTblastwave5.Scale = Vector3.new(1, 1, 1)
Blastcircle = Instance.new("Part", Torso)
Blastcircle.Material = "Neon"
Blastcircle.Anchored = true
Blastcircle.Transparency = 0
Blastcircle.CanCollide = false
Blastcircle.BrickColor = BrickColor.new("Really red")
Blastcircle.Size = Vector3.new(10,10,10)
removeuseless:AddItem(Blastcircle,5)
BlastShape = Instance.new("SpecialMesh", Blastcircle)
BlastShape.MeshType = "Sphere"
BlastShape.Scale = Vector3.new(0.1,0.1,0.1)
Blastcircle.CFrame = Root.CFrame
Blastcircle2 = Instance.new("Part", Torso)
Blastcircle2.Material = "Neon"
Blastcircle2.Anchored = true
Blastcircle2.Transparency = 0
Blastcircle2.CanCollide = false
Blastcircle2.BrickColor = BrickColor.new("Crimson")
Blastcircle2.Size = Vector3.new(10,10,10)
removeuseless:AddItem(Blastcircle2,5)
BlastShape2 = Instance.new("SpecialMesh", Blastcircle2)
BlastShape2.MeshType = "Sphere"
BlastShape2.Scale = Vector3.new(0.1,0.1,0.1)
Blastcircle2.CFrame = Root.CFrame
Blastcircle3 = Instance.new("Part", Torso)
Blastcircle3.Material = "Neon"
Blastcircle3.Anchored = true
Blastcircle3.Transparency = 0
Blastcircle3.CanCollide = false
Blastcircle3.BrickColor = BrickColor.new("Crimson")
Blastcircle3.Size = Vector3.new(10,10,10)
removeuseless:AddItem(Blastcircle3,5)
BlastShape3 = Instance.new("SpecialMesh", Blastcircle3)
BlastShape3.MeshType = "Sphere"
BlastShape3.Scale = Vector3.new(0.1,0.1,0.1)
Blastcircle3.CFrame = Root.CFrame
Blastcircle4 = Instance.new("Part", Torso)
Blastcircle4.Material = "Neon"
Blastcircle4.Anchored = true
Blastcircle4.Transparency = 0
Blastcircle4.CanCollide = false
Blastcircle4.BrickColor = BrickColor.new("Really red")
Blastcircle4.Size = Vector3.new(10,10,10)
removeuseless:AddItem(Blastcircle4,5)
BlastShape4 = Instance.new("SpecialMesh", Blastcircle4)
BlastShape4.MeshType = "Sphere"
BlastShape4.Scale = Vector3.new(0.1,0.1,0.1)
Blastcircle4.CFrame = Root.CFrame
Blastcircle5 = Instance.new("Part", Torso)
Blastcircle5.Material = "Neon"
Blastcircle5.Anchored = true
Blastcircle5.Transparency = 0
Blastcircle5.CanCollide = false
Blastcircle5.BrickColor = BrickColor.new("Really red")
Blastcircle5.Size = Vector3.new(10,10,10)
removeuseless:AddItem(Blastcircle5,5)
BlastShape5 = Instance.new("SpecialMesh", Blastcircle5)
BlastShape5.MeshType = "Sphere"
BlastShape5.Scale = Vector3.new(0.1,0.1,0.1)
Blastcircle5.CFrame = Root.CFrame
shockwav = Instance.new("Part", Torso)
shockwav.Size = Vector3.new(1, 1, 1)
shockwav.Transparency = 0
shockwav.BrickColor = BrickColor.new("Crimson")
shockwav.Material = "Neon"
shockwav.Anchored = true
shockwav.CanCollide = false
shockwav.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.random(1, 100), math.random(1, 100), math.random(1, 100))
removeuseless:AddItem(shockwav,5)
dea = Instance.new("SpecialMesh", shockwav)
dea.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea.Scale = Vector3.new(0.1, 0.1, 0.1)
shockwav.CFrame = Root.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(math.rad(90), 0, 0)
shockwav2 = Instance.new("Part", Torso)
shockwav2.Size = Vector3.new(1, 1, 1)
shockwav2.Transparency = 0
shockwav2.BrickColor = BrickColor.new("Really red")
shockwav2.Material = "Neon"
shockwav2.Anchored = true
shockwav2.CanCollide = false
shockwav2.CFrame = Root.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(math.rad(90), 0, 0)
removeuseless:AddItem(shockwav2,5)
dea2 = Instance.new("SpecialMesh", shockwav2)
dea2.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea2.Scale = Vector3.new(0.1, 0.4, 0.1)
shockwav2.CFrame = Root.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(math.rad(90), 0, 0)
local Hit = damagealll(50,Torso.Position)
for _,v in pairs(Hit) do
local velo2 = Instance.new("BodyVelocity", v)
velo2.MaxForce = Vector3.new(999999, 999999, 999999)
velo2.Velocity = v.Torso.CFrame.lookVector * 200
removeuseless:AddItem(velo2,2)
v.Humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
v.Humanoid:TakeDamage(math.random(48,89))
end
opopo = coroutine.wrap(function()
for i = 1, 100 do
dea.Scale = dea.Scale + Vector3.new(5,5,5)
shockwav.Transparency = shockwav.Transparency + 0.02
dea2.Scale = dea2.Scale + Vector3.new(1,1,1)
shockwav2.Transparency = shockwav2.Transparency + 0.010
DDTblastwave.Scale = DDTblastwave.Scale + Vector3.new(1, .5, 1)
DDTblastwave2.Scale = DDTblastwave2.Scale + Vector3.new(6, 6, 6)
DDTblastwave3.Scale = DDTblastwave3.Scale + Vector3.new(2, .5, 2)
DDTblastwave4.Scale = DDTblastwave4.Scale + Vector3.new(3, .5, 3)
DDTblastwave5.Scale = DDTblastwave5.Scale + Vector3.new(.5, .1, .5)
blastwave.Transparency = blastwave.Transparency + .01
blastwave2.Transparency = blastwave2.Transparency + .03
blastwave3.Transparency = blastwave3.Transparency + .02
blastwave4.Transparency = blastwave4.Transparency + .015
blastwave5.Transparency = blastwave5.Transparency + .01
BlastShape.Scale = BlastShape.Scale + Vector3.new(.2,.2,.2)
BlastShape2.Scale = BlastShape2.Scale + Vector3.new(.4,.4,.4)
BlastShape3.Scale = BlastShape3.Scale + Vector3.new(.1,.1,.1)
BlastShape4.Scale = BlastShape4.Scale + Vector3.new(.05,.05,.05)
Blastcircle.Transparency = Blastcircle.Transparency + .01
Blastcircle2.Transparency = Blastcircle2.Transparency + .02
Blastcircle3.Transparency = Blastcircle3.Transparency + .012
Blastcircle4.Transparency = Blastcircle4.Transparency + .015
Blastcircle5.Transparency = Blastcircle5.Transparency + 0.01
BlastShape5.Scale = BlastShape5.Scale + Vector3.new(.5,.5,.5)
wait()
end
end)
opopo()
wait(2)
hum.WalkSpeed = 13
debounce = false
attacking = false
end
end)
EnergyIdle = Instance.new("Sound", Torso)
EnergyIdle.SoundId = "rbxassetid://865160364"
EnergyIdle.Looped = true
EnergyIdle.Volume = .2
EnergyIdle:Play()
doommusucus = Instance.new("Sound", Torso)
doommusucus.SoundId = "rbxassetid://261681311"
doommusucus.Looped = true
doommusucus.Volume = 1.5
doommusucus:Play()
hum.WalkSpeed = 13
function damagealll(Radius,Position)
local Returning = {}
for _,v in pairs(workspace:GetChildren()) do
if v~=Character and v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') then
local Mag = (v.Torso.Position - Position).magnitude
if Mag < Radius then
table.insert(Returning,v)
end
end
end
return Returning
end
function damagealll2(Radius,Position)
local Returning = {}
while wait() do
for _,v in pairs(workspace:GetChildren()) do
if v~=Character and v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') then
local Mag = (v.Torso.Position - Position).magnitude
if Mag < Radius then
table.insert(Returning,v)
end
end
end
end
return Returning
end
footsteps = Instance.new("Sound", Torso)
footsteps.SoundId = "sID://320886417"
footsteps.Looped = true
footsteps.Volume = 5
checks1 = coroutine.wrap(function() -------Checks
while true do
if Root.Velocity.Magnitude > 0.5 and running == false then
position = "Walking"
elseif Root.Velocity.Magnitude < 0.5 and running == false and LSSJn then
position = "Idle2"
elseif Root.Velocity.Magnitude < 0.5 and running == false then
position = "Idle"
elseif Root.Velocity.Magnitude > 15 then
position = "Running"
else
end
wait()
end
end)
checks1()
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='p' then
if debounce == true then return end
debounce = true
walking = false
attacking = true
punchcharge:Play()
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(70), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2, 0, 0.501) * CFrame.Angles(math.rad(-90), math.rad(45), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(0, 2, 0.5) * CFrame.Angles(math.rad(-90), math.rad(90), math.rad(0)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(70), math.rad(0)), 0.5)
wait()
end
punchexplosion:Play()
hitboxpert = Instance.new("Part", LeftArm)
hitboxpert.Size = Vector3.new(2, 2, 2)
hitboxpert.CanCollide = false
hitboxpert.Transparency = 1
local hitboxweld = weldBetween(hitboxpert, LeftArm)
hitboxweld.C0 = CFrame.new(0,2.2,0)
hitboxpert.Touched:connect(function(hit)
if hit.Parent:IsA("Part") then
elseif hit.Parent:IsA("SpecialMesh") then
elseif hit.Parent.Name == game.Players.LocalPlayer.Name then
elseif hit.Parent:findFirstChild("Humanoid") then
if damagedebounce == true then return end
damagedebounce = true
Slachtoffer = hit.Parent:findFirstChild("Humanoid")
Slachtoffer:TakeDamage(32)
end
end)
local punchplosion = coroutine.wrap(function()
plosion = Instance.new("Part", LeftArm)
plosion.Size = Vector3.new(1, 1, 1)
plosion.Transparency = 0.2
plosion.BrickColor = BrickColor.new("Crimson")
plosion.Anchored = true
plosion.CanCollide = false
plosion.CFrame = Root.CFrame * CFrame.new(-1,0,-3)
dea1 = Instance.new("SpecialMesh", plosion)
dea1.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea1.Scale = Vector3.new(0.1, 0.1, 0.1)
for i = 1, 25 do
dea1.Scale = dea1.Scale + Vector3.new(0.8,0.8,0.8)
plosion.Transparency = plosion.Transparency + 0.07
wait()
end
end)
punchplosion()
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1, 1.5, 0.501) * CFrame.Angles(math.rad(-100), math.rad(-20), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.3, 1, 1.5) * CFrame.Angles(math.rad(-45), math.rad(72), math.rad(0)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-10), math.rad(-30), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(15), math.rad(5), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.42, 2.0, 0.2) * CFrame.Angles(math.rad(0), math.rad(10), math.rad(0)), 0.5)
wait()
end
hitboxpert:Destroy()
hitboxweld:Destroy()
plosion:Destroy()
attacking = false
damagedebounce = false
debounce = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='t' then
if tauntdebounce == true then return end
tauntdebounce = true
rdnm = soundtable[math.random(1,#soundtable)]
tauntsound = Instance.new("Sound", Head)
tauntsound.Volume = .8
tauntsound.SoundId = "http://www.roblox.com/asset/?id="..rdnm
tauntsound.Looped = false
tauntsound:Play()
wait(tauntsound.TimeLength)
wait(3)
tauntsound:Remove()
wait(1)
tauntdebounce = false
debounce = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='l' then
if debounce then return end
debounce = true
attacking = true
punchcharge2:Play()
hum.WalkSpeed = 13
for i = 1, 8 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5, 1.5, 0.501) * CFrame.Angles(math.rad(-130), math.rad(-20), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.3, 1, 1.5) * CFrame.Angles(math.rad(-45), math.rad(72), math.rad(0)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 2, 0.2) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.42, 2.0, 0.2) * CFrame.Angles(math.rad(-10), math.rad(0), math.rad(0)), 0.5)
wait()
end
local shockwavv = coroutine.wrap(function()
shockwav = Instance.new("Part", LeftArm)
shockwav.Size = Vector3.new(1, 1, 1)
shockwav.Transparency = 0
shockwav.BrickColor = BrickColor.new("Really black")
shockwav.Anchored = true
shockwav.CanCollide = false
shockwav.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.rad(-90), 0, 0)
dea2 = Instance.new("SpecialMesh", shockwav)
dea2.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea2.Scale = Vector3.new(0.1, 0.1, 0.1)
removeuseless:AddItem(shockwav,5) ---------Just in case it messes up
shockwav2 = Instance.new("Part", LeftArm)
shockwav2.Size = Vector3.new(1, 1, 1)
shockwav2.Transparency = 0
shockwav2.BrickColor = BrickColor.new("Crimson")
shockwav2.Anchored = true
shockwav2.CanCollide = false
shockwav2.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.rad(-90), 0, 0)
dea3 = Instance.new("SpecialMesh", shockwav2)
dea3.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea3.Scale = Vector3.new(0.1, 0.1, 0.1)
removeuseless:AddItem(shockwav2,5)
shockesr = Instance.new("Part", Torso)
shockesr.Size = Vector3.new(0.5, 0.5, 0.5)
shockesr.Material = "Neon"
shockesr.BrickColor = BrickColor.new("Crimson")
shockesr.Transparency = 0
shockesr.Anchored = true
shockesr.CanCollide = false
shockerMESH = Instance.new("SpecialMesh", shockesr)
shockerMESH.MeshType = "Sphere"
shockerMESH.Scale = Vector3.new(1,1,1)
shockesr.CFrame = Root.CFrame * CFrame.new(0,-1,0) * CFrame.Angles(math.rad(0), 0, 0)
removeuseless:AddItem(shockesr,5)
local Hit = damagealll(14,Torso.Position)
for _,v in pairs(Hit) do
local velo2 = Instance.new("BodyVelocity", v)
velo2.MaxForce = Vector3.new(999999, 999999, 999999)
velo2.Velocity = v.Torso.CFrame.lookVector * 200
removeuseless:AddItem(velo2,2)
v.Humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
v.Humanoid:TakeDamage(30)
end
for i = 1, 25 do
dea2.Scale = dea2.Scale + Vector3.new(2,2,2)
shockwav.Transparency = shockwav.Transparency + 0.07
dea3.Scale = dea3.Scale + Vector3.new(1,1,1)
shockwav2.Transparency = shockwav2.Transparency + 0.07
shockesr.Transparency = shockesr.Transparency + 0.07
shockerMESH.Scale = shockerMESH.Scale + Vector3.new(4, 4, 4)
wait()
end
end)
shockwavv()
punchexplosion2:Play()
chunks = Instance.new("Part", workspace)
chunks.BrickColor = BrickColor.new("Really red")
chunks.Size = Vector3.new(2, 2, 2)
chunks.Anchored = true
chunks.Material = "Neon"
chunks.TopSurface = "Smooth"
chunks.BottomSurface = "Smooth"
chunks.CanCollide = false
chunks.CFrame = LeftLeg.CFrame * CFrame.new(math.random(-500,500)/100,0,math.random(-500,500)/100)*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
table.insert(SlowlyFade,chunks)
removeuseless:AddItem(chunks,5)
chunks2 = Instance.new("Part", workspace)
chunks2.BrickColor = BrickColor.new("Crimson")
chunks2.Size = Vector3.new(2, 2, 2)
chunks2.Anchored = true
chunks2.Material = "Neon"
chunks2.TopSurface = "Smooth"
chunks2.BottomSurface = "Smooth"
chunks2.CanCollide = false
chunks2.CFrame = LeftLeg.CFrame * CFrame.new(math.random(-500,500)/100,0,math.random(-500,500)/100)*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
table.insert(SlowlyFade,chunks2)
removeuseless:AddItem(chunks2,5)
chunks3 = Instance.new("Part", workspace)
chunks3.BrickColor = BrickColor.new("Really red")
chunks3.Size = Vector3.new(2, 2, 2)
chunks3.Anchored = true
chunks3.Material = "Neon"
chunks3.CanCollide = false
chunks3.TopSurface = "Smooth"
chunks3.BottomSurface = "Smooth"
chunks3.CFrame = RightLeg.CFrame * CFrame.new(math.random(-500,500)/100,0,math.random(-500,500)/100)*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
table.insert(SlowlyFade,chunks3)
removeuseless:AddItem(chunks3,5)
chunks4 = Instance.new("Part", workspace)
chunks4.BrickColor = BrickColor.new("Crimson")
chunks4.Size = Vector3.new(2, 2, 2)
chunks4.Anchored = true
chunks4.TopSurface = "Smooth"
chunks4.BottomSurface = "Smooth"
chunks4.Material = "Neon"
chunks4.CanCollide = false
chunks4.CFrame = RightLeg.CFrame * CFrame.new(math.random(-500,500)/100,0,math.random(-500,500)/100)*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
table.insert(SlowlyFade,chunks4)
removeuseless:AddItem(chunks4,5)
hum.WalkSpeed = 0
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5, 0.8, 0.501) * CFrame.Angles(math.rad(-70), math.rad(-5), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.3, 1, 1.5) * CFrame.Angles(math.rad(-45), math.rad(72), math.rad(0)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -1.3, 0) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.2, 0.2) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2.0, 0.2) * CFrame.Angles(math.rad(30), math.rad(20), math.rad(0)), 0.5)
wait()
end
hum.WalkSpeed = 13
attacking = false
damagedebounce = false
shockwav:Remove()
shockwav2:Remove()
shockesr:Remove()
debounce = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='k' then
if debounce then return end
debounce = true
attacking = true
punchcharge2:Play()
hum.WalkSpeed = 0
for i = 1, 8 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.1) * CFrame.Angles(math.rad(6), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0.5, 2, 0) * CFrame.Angles(math.rad(14), math.rad(-20), math.rad(90)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-0.5, 2, 0) * CFrame.Angles(math.rad(14), math.rad(20), math.rad(-90)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(5), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
punchexplosion3:Play()
local wtfboomzorz = coroutine.wrap(function()
shockesr = Instance.new("Part", Torso)
shockesr.Size = Vector3.new(0.5, 0.5, 0.5)
shockesr.Material = "Neon"
shockesr.BrickColor = BrickColor.new("Crimson")
shockesr.Transparency = 0
shockesr.Anchored = true
shockesr.CanCollide = false
shockerMESH = Instance.new("SpecialMesh", shockesr)
shockerMESH.MeshType = "Sphere"
shockerMESH.Scale = Vector3.new(1,1,1)
shockesr.CFrame = Root.CFrame * CFrame.new(0,0,-3)
removeuseless:AddItem(shockesr,5)
shockwav = Instance.new("Part", LeftArm)
shockwav.Size = Vector3.new(1, 1, 1)
shockwav.Transparency = 0
shockwav.BrickColor = BrickColor.new("Really red")
shockwav.Anchored = true
shockwav.CanCollide = false
shockwav.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.random(1, 100), math.random(1, 100), math.random(1, 100))
dea2 = Instance.new("SpecialMesh", shockwav)
dea2.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea2.Scale = Vector3.new(0.1, 0.1, 0.1)
shockwav.CFrame = Root.CFrame * CFrame.new(0,0,-3)
removeuseless:AddItem(shockwav,5)
shockwav2 = Instance.new("Part", LeftArm)
shockwav2.Size = Vector3.new(1, 1, 1)
shockwav2.Transparency = 0
shockwav2.BrickColor = BrickColor.new("Crimson")
shockwav2.Anchored = true
shockwav2.CanCollide = false
shockwav2.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.random(1, 100), math.random(1, 100), math.random(1, 100))
dea3 = Instance.new("SpecialMesh", shockwav2)
dea3.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea3.Scale = Vector3.new(0.1, 0.1, 0.1)
shockwav.CFrame = Root.CFrame * CFrame.new(0,0,-3)
removeuseless:AddItem(shockwav2,5)
shockwav3 = Instance.new("Part", LeftArm)
shockwav3.Size = Vector3.new(1, 1, 1)
shockwav3.Transparency = 0
shockwav3.BrickColor = BrickColor.new("Really red")
shockwav3.Anchored = true
shockwav3.CanCollide = false
shockwav3.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.random(1, 100), math.random(1, 100), math.random(1, 100))
dea4 = Instance.new("SpecialMesh", shockwav3)
dea4.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea4.Scale = Vector3.new(0.1, 0.1, 0.1)
shockwav3.CFrame = Root.CFrame * CFrame.new(0,0,-3)
removeuseless:AddItem(shockwav3,5)
local Hit = damagealll(35,Torso.Position)
for _,v in pairs(Hit) do
v:BreakJoints()
end
for i = 1, 25 do
dea2.Scale = dea2.Scale + Vector3.new(2.5,2.5,2.5)
shockwav.Transparency = shockwav.Transparency + 0.07
dea3.Scale = dea3.Scale + Vector3.new(3,3,3)
dea4.Scale = dea4.Scale + Vector3.new(2,2,2)
shockwav2.Transparency = shockwav2.Transparency + 0.07
shockwav3.Transparency = shockwav2.Transparency + 0.07
shockesr.Transparency = shockesr.Transparency + 0.08
shockerMESH.Scale = shockerMESH.Scale + Vector3.new(4, 4, 4)
wait()
end
end)
wtfboomzorz()
for i = 1, 8 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0.5, 1, -1) * CFrame.Angles(math.rad(-110), math.rad(0), math.rad(90)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-0.5, 1, -1) * CFrame.Angles(math.rad(-110), math.rad(0), math.rad(-90)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
for i = 1, 26 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0.5, 1, -1) * CFrame.Angles(math.rad(-50), math.rad(-20), math.rad(90)), 0.06)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-0.5, 1, -1) * CFrame.Angles(math.rad(-50), math.rad(20), math.rad(-90)), 0.06)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
hum.WalkSpeed = 13
debounce = false
attacking = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='o' then
if debounce then return end
debounce = true
attacking = true
hum.WalkSpeed = 0
local theendbegin = coroutine.wrap(function()
shockwav = Instance.new("Part", Torso)
shockwav.Size = Vector3.new(1, 1, 1)
shockwav.Transparency = 0
shockwav.BrickColor = BrickColor.new("Really red")
shockwav.Material = "Neon"
shockwav.Anchored = true
shockwav.CanCollide = false
shockwav.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.random(1, 100), math.random(1, 100), math.random(1, 100))
dea2 = Instance.new("SpecialMesh", shockwav)
dea2.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea2.Scale = Vector3.new(0.1, 0.1, 0.1)
shockwav.CFrame = Root.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(math.rad(90), 0, 0)
removeuseless:AddItem(shockwav,5)
shockwav2 = Instance.new("Part", Torso)
shockwav2.Size = Vector3.new(1, 1, 1)
shockwav2.Transparency = 0
shockwav2.Material = "Neon"
shockwav2.BrickColor = BrickColor.new("Crimson")
shockwav2.Anchored = true
shockwav2.CanCollide = false
shockwav2.CFrame = Root.CFrame * CFrame.new(0,-2.2,0) * CFrame.Angles(math.random(1, 100), math.random(1, 100), math.random(1, 100))
dea3 = Instance.new("SpecialMesh", shockwav2)
dea3.MeshId = "http://www.roblox.com/asset/?id=3270017"
dea3.Scale = Vector3.new(0.1, 0.1, 0.1)
shockwav2.CFrame = Root.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(math.rad(90), 0, 0)
removeuseless:AddItem(shockwav2,5)
for i = 1, 125 do
shockwav.Transparency = shockwav.Transparency + 0.03
dea2.Scale = dea2.Scale + Vector3.new(1, 1, 1)
shockwav2.Transparency = shockwav2.Transparency + 0.02
dea3.Scale = dea3.Scale + Vector3.new(1.5, 1.5, 1.5)
wait()
end
end)
theendbegin()
boomswoosh:Play()
for i = 1, 50 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
wait()
end
EndOfTimes = true
local TheEnd = coroutine.wrap(function()
while EndOfTimes do
TheEndTimeWave = Instance.new("Part", Torso)
TheEndTimeWave.Size = Vector3.new(1, 1, 1)
TheEndTimeWave.Transparency = 1
TheEndTimeWave.BrickColor = BrickColor.new("Really red")
TheEndTimeWave.Material = "Neon"
TheEndTimeWave.Anchored = true
TheEndTimeWave.CanCollide = false
TheEndTimeWave.CFrame = Torso.CFrame * CFrame.Angles(math.random(1, 100),math.random(1, 100),math.random(1, 100))
DDT = Instance.new("SpecialMesh", TheEndTimeWave)
DDT.MeshId = "http://www.roblox.com/asset/?id=3270017"
DDT.Scale = Vector3.new(50, 50, 50)
removeuseless:AddItem(TheEndTimeWave,2)
table.insert(TheEnd,TheEndTimeWave)
table.insert(TheEnd2,DDT)
wait(0.1)
end
end)
TheEnd()
local EndOrb = coroutine.wrap(function()
EnddOrb = Instance.new("Part", Torso)
EnddOrb.Size = Vector3.new(0.5, 0.5, 0.5)
EnddOrb.Material = "Neon"
EnddOrb.BrickColor = BrickColor.new("Crimson")
EnddOrb.Transparency = 1
EnddOrb.Anchored = true
EnddOrb.CanCollide = false
EnddOrbMESH = Instance.new("SpecialMesh", EnddOrb)
EnddOrbMESH.MeshType = "Sphere"
EnddOrbMESH.Scale = Vector3.new(100,100,100)
EnddOrb.CFrame = Torso.CFrame
while EnddOrb.Transparency > 0 do
EnddOrbMESH.Scale = EnddOrbMESH.Scale - Vector3.new(1,1,1)
EnddOrb.Transparency = EnddOrb.Transparency - 0.007
wait()
end
end)
EndOrb()
TheEndSound2:Play()
while EnddOrb.Transparency > 0 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(100)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-100)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
TheEndSound2:Stop()
TheEndSound:Play()
EndOfTimes = false
for i = 1, 100 do
EnddOrb.CFrame = Torso.CFrame
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 20, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.06)
wait()
end
wait(2)
local dissapend = coroutine.wrap(function()
for i = 1, 100 do
EnddOrbMESH.Scale = EnddOrbMESH.Scale - Vector3.new(1, 1, 1)
EnddOrb.Transparency = EnddOrb.Transparency + 0.05
wait()
end
end)
dissapend()
ROOOAAAAH:Play()
local opforr = coroutine.wrap(function()
while true do
if loowki then break end
TheEndTimeWave2 = Instance.new("Part", Torso)
TheEndTimeWave2.Size = Vector3.new(1, 1, 1)
TheEndTimeWave2.Transparency = 0.4
TheEndTimeWave2.BrickColor = BrickColor.new("Crimson")
TheEndTimeWave2.Material = "Neon"
TheEndTimeWave2.Anchored = true
TheEndTimeWave2.CanCollide = false
TheEndTimeWave2.CFrame = Torso.CFrame * CFrame.Angles(math.random(1, 100),math.random(1, 100),math.random(1, 100))
DDT2 = Instance.new("SpecialMesh", TheEndTimeWave2)
DDT2.MeshId = "http://www.roblox.com/asset/?id=3270017"
DDT2.Scale = Vector3.new(1, 1, 1)
removeuseless:AddItem(TheEndTimeWave2,3)
table.insert(TheEnd4,TheEndTimeWave2)
table.insert(TheEnd3,DDT2)
EnddOrb2 = Instance.new("Part", Torso)
EnddOrb2.Size = Vector3.new(0.5, 0.5, 0.5)
EnddOrb2.Material = "Neon"
EnddOrb2.BrickColor = BrickColor.new("Really red")
EnddOrb2.Transparency = 0
EnddOrb2.Anchored = true
EnddOrb2.CanCollide = false
EnddOrbMESH2 = Instance.new("SpecialMesh", EnddOrb2)
EnddOrbMESH2.MeshType = "Sphere"
EnddOrbMESH2.Scale = Vector3.new(2,2,2)
EnddOrb2.CFrame = Root.CFrame * CFrame.new(0, 20, 0)
removeuseless:AddItem(EnddOrb2,2)
table.insert(TheEnd2,EnddOrbMESH2)
table.insert(SlowlyFade,EnddOrb2)
wait(0.1)
end
end)
opforr()
for i = 1, 20 do
local Hit = damagealll(60,Torso.Position)
for _,v in pairs(Hit) do
v.Humanoid:TakeDamage(3)
end
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0.1) * CFrame.Angles(math.rad(-15), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0.4, 2, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(100)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(10), math.rad(0), math.rad(-100)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 20, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0.4) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0.4) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(10)), 0.5)
wait()
end
local damgog = coroutine.wrap(function()
while true do
if loowki then return end
local Hit = damagealll(60,Torso.Position)
for _,v in pairs(Hit) do
v.Humanoid:TakeDamage(1)
end
wait()
end
end)
damgog()
wait(ROOOAAAAH.TimeLength)
loowki = true
wait(.5)
for i = 1, 40 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 20, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
for i = 1, 100 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.05)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.5)
wait()
end
attacking = false
debounce = false
loowki = false
EndOfTimes = false
hum.WalkSpeed = 13
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='j' then
if debounce then return end
debounce = true
attacking = true
zorro = true
local timereft = coroutine.wrap(function()
shockesr = Instance.new("Part", Torso)
shockesr.Size = Vector3.new(0.5, 0.5, 0.5)
shockesr.Material = "Neon"
shockesr.BrickColor = BrickColor.new("Crimson")
shockesr.Transparency = 0
shockesr.Anchored = true
shockesr.CanCollide = false
shockerMESH = Instance.new("SpecialMesh", shockesr)
shockerMESH.MeshType = "Cylinder"
shockerMESH.Scale = Vector3.new(.1,0.01,0.01)
shockesr.CFrame = CFrame.new(mouse.Hit.p) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
riftopen = Instance.new("Sound", shockesr)
riftopen.SoundId = "rbxassetid://93724183"
riftopen.Looped = false
riftopen.Volume = 2
riftopen:Play()
while zorro do
shockesr.Size = shockesr.Size + Vector3.new(0,16,16)
wait()
end
end)
timereft()
for i = 1, 50 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(30), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.35, 1.25, 0.45) * CFrame.Angles(math.rad(-90), math.rad(48), math.rad(0)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
zorro = false
punchcharge3:Play()
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1, 2, 0) * CFrame.Angles(math.rad(-130), math.rad(-48), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-5)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
astral = true
local astralshocks = coroutine.wrap(function()
while astral do
Astralshock = Instance.new("Part", Torso)
Astralshock.Size = Vector3.new(1, 1, 1)
Astralshock.Transparency = 0
Astralshock.BrickColor = BrickColor.new("Really red")
Astralshock.Material = "Neon"
Astralshock.Anchored = true
Astralshock.CanCollide = false
Astralshock.CFrame = shockesr.CFrame * CFrame.Angles(math.rad(90),math.rad(90),math.rad(0))
DDTASTRAL = Instance.new("SpecialMesh", Astralshock)
DDTASTRAL.MeshId = "http://www.roblox.com/asset/?id=3270017"
DDTASTRAL.Scale = Vector3.new(1, 1, 1)
table.insert(TheEnd3,DDTASTRAL)
table.insert(SlowlyFade,Astralshock)
removeuseless:AddItem(Astralshock,2)
wait(0.3)
end
end)
local astralshocks2 = coroutine.wrap(function()
while astral do
Astralshock2 = Instance.new("Part", Torso)
Astralshock2.Size = Vector3.new(1, 1, 1)
Astralshock2.Transparency = 0
Astralshock2.BrickColor = BrickColor.new("Crimson")
Astralshock2.Material = "Neon"
Astralshock2.Anchored = true
Astralshock2.CanCollide = false
Astralshock2.CFrame = shockesr.CFrame * CFrame.Angles(math.rad(90),math.rad(90),math.rad(0))
DDTASTRAL2 = Instance.new("SpecialMesh", Astralshock2)
DDTASTRAL2.MeshId = "http://www.roblox.com/asset/?id=3270017"
DDTASTRAL2.Scale = Vector3.new(15, 15, 15)
table.insert(UpMover,Astralshock2)
table.insert(SlowlyFade,Astralshock2)
removeuseless:AddItem(Astralshock2,2)
wait(0.2)
end
end)
astralshocks2()
astralshocks()
riftopen2 = Instance.new("Sound", shockesr)
riftopen2.SoundId = "rbxassetid://907527750"
riftopen2.Looped = false
riftopen2.Volume = 2
riftopen2:Play()
local fofp = coroutine.wrap(function()
riftopen3 = Instance.new("Sound", shockesr)
riftopen3.SoundId = "rbxassetid://1190833720"
riftopen3.Looped = false
riftopen3.Volume = 0
removeuseless:AddItem(riftopen3,10)
removeuseless:AddItem(shockesr,6)
riftopen3:Play()
while riftopen3.Volume < 3 do
riftopen3.Volume = riftopen3.Volume + 0.2
wait()
end
while astral do
wait()
end
while riftopen3.Volume > 0 do
riftopen3.Volume = riftopen3.Volume - 0.1
wait()
end
end)
fofp()
local astraldmg = coroutine.wrap(function()
for i = 1, 5 do
local Hit = damagealll(20,shockesr.Position)
for _,v in pairs(Hit) do
v.Humanoid:TakeDamage(25)
end
wait(1)
end
end)
astraldmg()
while shockesr.Transparency < 1 do
shockesr.Size = shockesr.Size + Vector3.new(80,0,0)
shockesr.Transparency = shockesr.Transparency + 0.02
wait()
end
astral = false
debounce = false
attacking = false
riftopen:Remove()
riftopen2:Remove()
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='r' then
if debounce then return end
debounce = true
attacking = true
borb = true
hum.WalkSpeed = 0
punchcharge:Play()
for i = 1, 8 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-40), math.rad(-15)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(-1.5, 1.5, 0) * CFrame.Angles(math.rad(-5), math.rad(10), math.rad(180)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0.6, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(-20)), 0.5)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-.2, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-15)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.5)
wait()
end
BlackPowerBall = Instance.new("Part", Torso)
BlackPowerBall.BrickColor = BrickColor.new("Crimson")
BlackPowerBall.Anchored = true
BlackPowerBall.Shape = 0
BlackPowerBall.Material = "Neon"
BlackPowerBall.Size = Vector3.new(0.1,0.1,0.1)
BlackPowerBall.CanCollide = false
BlackPowerBall.CFrame = Root.CFrame * CFrame.new(-1.3,3,-2)
local increasesizeball = coroutine.wrap(function()
for i = 1, 20 do
BlackPowerBall.Size = BlackPowerBall.Size + Vector3.new(0.15,0.15,.15)
wait()
end
end)
increasesizeball()
OMEGABLASTER = Instance.new("Sound", RightArm)
OMEGABLASTER.SoundId = "rbxassetid://876800936"
OMEGABLASTER.Pitch = 1.5
OMEGABLASTER.Volume = 2
OMEGABLASTER:Play()
for i = 1, 25 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-40), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2, 1.5, .5) * CFrame.Angles(math.rad(-85), math.rad(-40), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-5)), 0.5)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
for i = 1, 8 do
BlackPowerBall.CFrame = BlackPowerBall.CFrame:lerp(Root.CFrame * CFrame.new(-.6,3.5,2), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(-.6, 1.9, 0.2) * CFrame.Angles(math.rad(-85), math.rad(-120), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-5)), 0.5)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
local shootthemballs = coroutine.wrap(function()
BlackPowerBall.Anchored = false
local PB2 = Instance.new("BodyVelocity", BlackPowerBall)
PB2.MaxForce = Vector3.new(999999, 999999, 999999)
BlackPowerBall.CFrame = CFrame.new(BlackPowerBall.Position,mouse.Hit.p)
PB2.Velocity = BlackPowerBall.CFrame.lookVector * 80
wait()
end)
shootthemballs()
for i = 1, 12 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-10), math.rad(-50), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(-1, 0, -.1) * CFrame.Angles(math.rad(85), math.rad(-120), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.2, 0) * CFrame.Angles(math.rad(0), math.rad(5), math.rad(-12)), 0.5)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-35), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(-10), math.rad(-15), math.rad(10)), 0.5)
wait()
end
BlackPowerBall.Touched:connect(function(OnHit)
if hitters == true then return end
hitters = true
BlackPowerBall.Anchored = true
BlackPowerBall.Transparency = 1
local Hit = damagealll(32,BlackPowerBall.Position)
for _,v in pairs(Hit) do
v.Humanoid:TakeDamage(40)
end
explosivesound = Instance.new("Sound", BlackPowerBall)
explosivesound.SoundId = "rbxassetid://400765078"
explosivesound.Looped = false
explosivesound.Volume = 2
explosivesound.Pitch = 2
explosivesound:Play()
for i = 1, 3 do
ExplosionBall = Instance.new("Part", Torso)
ExplosionBall.BrickColor = BrickColor.new("Crimson")
ExplosionBall.Anchored = true
ExplosionBall.Shape = 0
ExplosionBall.Material = "Neon"
ExplosionBall.CFrame = BlackPowerBall.CFrame
ExplosionBall.CanCollide = false
ExplosionBall.Size = BlackPowerBall.Size
ExplosionBallshock = Instance.new("Part", Torso)
ExplosionBallshock.Size = Vector3.new(1, 1, 1)
ExplosionBallshock.Transparency = 0
ExplosionBallshock.BrickColor = BrickColor.new("Really red")
ExplosionBallshock.Material = "Neon"
ExplosionBallshock.Anchored = true
ExplosionBallshock.CanCollide = false
ExplosionBallshock.CFrame = BlackPowerBall.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
ExplosionBallshockDDT = Instance.new("SpecialMesh", ExplosionBallshock)
ExplosionBallshockDDT.MeshId = "http://www.roblox.com/asset/?id=3270017"
ExplosionBallshockDDT.Scale = Vector3.new(3,3,3)
table.insert(Extreme,ExplosionBall)
table.insert(SlowlyFade,ExplosionBall)
table.insert(SlowlyFade,ExplosionBallshock)
table.insert(ExtremeM,ExplosionBallshockDDT)
removeuseless:AddItem(ExplosionBall,2)
removeuseless:AddItem(ExplosionBallshock,2)
wait(0.1)
end
borb = false
hitters = false
end)
hum.WalkSpeed = 13
local time = coroutine.wrap(function()
for i = 1, 100 do
if borb == false then break end
wait()
end
BlackPowerBall:Remove()
debounce = false
balldebounce = false
hitters = false
end)
time()
attacking = false
while wait() do
if borb == false then break end
wait()
end
balldebounce = false
debounce = false
hitters = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='h' then
if debounce == true then return end
debounce = true
walking = false
hit = false
attacking = true
punchcharge:Play()
bbm = Instance.new("Sound", Torso)
bbm.SoundId = "rbxassetid://1412100204"
bbm.Volume = 6
bbm:Play()
hum.WalkSpeed = 0
local createnergyblast = coroutine.wrap(function()
BlastWave = Instance.new("Part", Torso)
BlastWave.Material = "Neon"
BlastWave.Anchored = true
BlastWave.CanCollide = false
BlastWave.BrickColor = BrickColor.new("Crimson")
BlastWave.Size = Vector3.new(.1,.1,.1)
BlastShape = Instance.new("SpecialMesh", BlastWave)
BlastShape.MeshType = "Sphere"
BlastShape.Scale = Vector3.new(0.1,.1,.1)
BlastWave.CFrame = Root.CFrame * CFrame.new(0, .4, -5.2)
end)
createnergyblast()
local sizeincrease = coroutine.wrap(function()
for i = 1, 45 do
BlastWave.Size = BlastWave.Size + Vector3.new(1,1,1)
wait()
end
end)
sizeincrease()
local RetrEnergy2 = coroutine.wrap(function()
for i = 1, 10 do
circlescircles = Instance.new("Part", Torso)
circlescircles.Size = Vector3.new(1, 1, 1)
circlescircles.Transparency = 0.2
circlescircles.BrickColor = BrickColor.new("Really red")
circlescircles.Material = "Neon"
circlescircles.Anchored = true
circlescircles.CanCollide = false
circlescircles.CFrame = BlastWave.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
circlescirclesmesh = Instance.new("SpecialMesh", circlescircles)
circlescirclesmesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
circlescirclesmesh.Scale = Vector3.new(15, 15, 15)
removeuseless:AddItem(circlescircles,1)
table.insert(nonmeshRepeater2,circlescircles)
table.insert(TheEnd2,circlescirclesmesh)
wait(.1)
end
end)
RetrEnergy2()
local RetrEnergy = coroutine.wrap(function()
for i = 1, 7 do
RetrEnergy1 = Instance.new("Part", Torso)
RetrEnergy1.Material = "Neon"
RetrEnergy1.Anchored = true
RetrEnergy1.CanCollide = false
RetrEnergy1.BrickColor = BrickColor.new("Really red")
RetrEnergy1.Transparency = 0.5
RetrEnergy1.Size = Vector3.new(10,10,10)
RetrEnergy1Shape = Instance.new("SpecialMesh", RetrEnergy1)
RetrEnergy1Shape.MeshType = "Sphere"
RetrEnergy1Shape.Scale = Vector3.new(1,1,1)
RetrEnergy1.CFrame = BlastWave.CFrame
table.insert(LessSize,RetrEnergy1)
table.insert(Repeater2,RetrEnergy1)
removeuseless:AddItem(RetrEnergy1,2)
wait(0.2)
end
end)
RetrEnergy()
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0, 2, 0.5) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(90)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-5)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
wait(1)
local shocks = coroutine.wrap(function()
while BlastWave.Transparency < 1 do
shockoftheblast = Instance.new("Part", Torso)
shockoftheblast.Size = Vector3.new(1, 1, 1)
shockoftheblast.Transparency = 0
shockoftheblast.BrickColor = BrickColor.new("Really red")
shockoftheblast.Material = "Neon"
shockoftheblast.Anchored = true
shockoftheblast.CanCollide = false
shockoftheblast.CFrame = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
shockoftheblast.CFrame = LeftArm.CFrame * CFrame.new(0, -2.4 -(i/.4), 0) * CFrame.Angles(math.rad(90), 0, math.rad(0))
sotbmesh = Instance.new("SpecialMesh", shockoftheblast)
sotbmesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
sotbmesh.Scale = Vector3.new(15, 15, 15)
removeuseless:AddItem(shockoftheblast,.5)
table.insert(ForwardMover,shockoftheblast)
table.insert(nonmeshRepeater2,shockoftheblast)
wait(.1)
end
end)
shocks()
x0412:Play()
ReaperLaunch = Instance.new("Sound", LeftArm)
ReaperLaunch.Volume = 3
ReaperLaunch.SoundId = "rbxassetid://138677306"
ReaperLaunch:Play()
hum.WalkSpeed = 2
TheBeam = Instance.new("Part", LeftArm)
TheBeam.CanCollide = false
TheBeam.Size = Vector3.new(1,3,3)
TheBeam.Material = "Neon"
TheBeam.Anchored = true
TheBeam.BrickColor = BrickColor.new("Crimson")
TheBeamMESH = Instance.new("SpecialMesh", TheBeam)
TheBeamMESH.Scale = Vector3.new(1,1,1)
TheBeamMESH.MeshType = "Cylinder"
TheBeam.CFrame = BlastWave.CFrame * CFrame.new(0,2,0) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
TheBeam.Touched:connect(function(hit)
if hit.Parent:IsA("Part") then
elseif hit.Parent:IsA("SpecialMesh") then
elseif hit.Parent.Name == game.Players.LocalPlayer.Name then
elseif hit.Parent:findFirstChild("Humanoid") then
Slachtoffer = hit.Parent:findFirstChild("Humanoid")
Slachtoffer:TakeDamage(30)
wait(.6)
end
end)
for i = 1, 100 do
TheBeam.Size = TheBeam.Size + Vector3.new(5, 0, 0)
TheBeam.CFrame = LeftArm.CFrame * CFrame.new(0, -2.4 -(i/.4), 0) * CFrame.Angles(0, 0, math.rad(90))
BlastWave.CFrame = LeftArm.CFrame * CFrame.new(0, -3, 0) * CFrame.Angles(0, 0, math.rad(0))
wait()
end
while TheBeam.Transparency < 1 and BlastWave.Transparency < 1 do
TheBeam.Transparency = TheBeam.Transparency + 0.1
BlastWave.Transparency = BlastWave.Transparency + 0.1
wait()
end
debounce = false
attacking = false
TheBeam:Remove()
BlastWave:Remove()
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='q' then
if debounce then return end
debounce = true
attacking = true
open = true
nepo = true
hum.WalkSpeed = 0
bigrift = Instance.new("Part", Torso)
bigrift.Size = Vector3.new(0.1, 0.1, 0.1)
bigrift.Material = "Neon"
bigrift.Transparency = 1
bigrift.Anchored = true
bigrift.CanCollide = false
bigriftdecal = Instance.new("Decal", bigrift)
bigriftdecal.Face = "Top"
bigriftdecal.Texture = "rbxassetid://702583926"
local bigriftopen = coroutine.wrap(function()
bigrift.CFrame = CFrame.new(mouse.Hit.p) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
while open do
bigrift.Size = bigrift.Size + Vector3.new(2,0,2)
wait()
end
end)
bigriftopen()
local rotate = coroutine.wrap(function()
while nepo do
bigrift.CFrame = bigrift.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(1 + 5),0)
wait()
end
end)
rotate()
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1, 0.7, 1) * CFrame.Angles(math.rad(-40), math.rad(-48), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-5)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
open = false
for i = 1, 8 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1, 2, 0) * CFrame.Angles(math.rad(-130), math.rad(-48), math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(4), math.rad(-10)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
local openshocks = coroutine.wrap(function()
for i = 1, 2 do
openshock2 = Instance.new("Part", Torso)
openshock2.Size = Vector3.new(1, 1, 1)
openshock2.Transparency = 0
openshock2.BrickColor = BrickColor.new("Really red")
openshock2.Material = "Neon"
openshock2.Anchored = true
openshock2.CanCollide = false
openshock2.CFrame = CFrame.new(bigrift.Position) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
DDTopenshock2 = Instance.new("SpecialMesh", openshock2)
DDTopenshock2.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTopenshock2.Scale = Vector3.new(1, 2, 1)
removeuseless:AddItem(openshock2,2)
table.insert(TheEnd3,DDTopenshock2)
table.insert(SlowlyFade,openshock2)
openshock = Instance.new("Part", Torso)
openshock.Size = Vector3.new(1, 1, 1)
openshock.Transparency = 0
openshock.BrickColor = BrickColor.new("Really red")
openshock.Material = "Neon"
openshock.Anchored = true
openshock.CanCollide = false
openshock.CFrame = CFrame.new(bigrift.Position) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))
DDTopenshock = Instance.new("SpecialMesh", openshock)
DDTopenshock.MeshId = "http://www.roblox.com/asset/?id=3270017"
DDTopenshock.Scale = Vector3.new(1, 2, 1)
removeuseless:AddItem(openshock,2)
table.insert(TheEnd3,DDTopenshock)
table.insert(SlowlyFade,openshock)
wait(.2)
end
end)
openshocks()
wreckingbrick = Instance.new("Part", Torso)
wreckingbrick.Size = Vector3.new(10, 10, 10)
wreckingbrick.Material = "Neon"
wreckingbrick.Transparency = 0
wreckingbrick.Anchored = true
wreckingbrick.BrickColor = BrickColor.new("Crimson")
wreckingbrick.CanCollide = false
wreckingbrick.CFrame = bigrift.CFrame * CFrame.new(0,1,0)
iffalsedontspin = true
local rotq = coroutine.wrap(function()
while iffalsedontspin do
wreckingbrick.CFrame = wreckingbrick.CFrame * CFrame.Angles(math.rad(1 + 2),math.rad(1),math.rad(1 + 3))
wait()
end
end)
rotq()
swooshsound = Instance.new("Sound", wreckingbrick)
swooshsound.Volume = 1
swooshsound.SoundId = "rbxassetid://148894535"
swooshsound.Looped = false
swooshsound:Play()
removeuseless:AddItem(swooshsound,2)
for i = 1, 10 do
wreckingbrick.CFrame = wreckingbrick.CFrame:lerp(CFrame.new(bigrift.Position) * CFrame.new(0,13,0) * CFrame.Angles(math.rad(25),math.rad(34),math.rad(50)), 0.5)
wait()
end
for i = 1, 8 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(-.6, 1.9, 0.2) * CFrame.Angles(math.rad(-85), math.rad(-120), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-5)), 0.5)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(50), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
local removeportal = coroutine.wrap(function()
for i = 1, 20 do
bigrift.Size = bigrift.Size - Vector3.new(2,0,2)
wait()
end
nepo = false
bigrift:Remove()
end)
removeportal()
wait(.5)
iffalsedontspin = false
wreckingbrick.Anchored = false
local velo = Instance.new("BodyVelocity", wreckingbrick)
velo.MaxForce = Vector3.new(999999, 999999, 999999)
wreckingbrick.CFrame = CFrame.new(wreckingbrick.Position,mouse.Hit.p)
velo.Velocity = wreckingbrick.CFrame.lookVector * 200
removeuseless:AddItem(wreckingbrick,5)
function onTouchedBrick(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil and game.Players:GetPlayerFromCharacter(h.Parent)~=game.Players.LocalPlayer then
if hit then return end
hit = true
h:ChangeState(Enum.HumanoidStateType.Ragdoll)
heavyhitimpact = Instance.new("Sound", wreckingbrick)
heavyhitimpact.Volume = 1
heavyhitimpact.SoundId = "rbxassetid://541909913"
heavyhitimpact.Looped = false
heavyhitimpact:Play()
removeuseless:AddItem(heavyhitimpact,2)
h.Health = h.Health - 35
wait(1)
hit = false
end
end
wreckingbrick.Touched:connect(onTouchedBrick)
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0, 2, 0.5) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(95)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(5), math.rad(-8)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-85), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
for i = 1, 2 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(0, 2, 0.5) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(85)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(0), math.rad(1), math.rad(-2)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-85), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.5)
wait()
end
attacking = false
hum.WalkSpeed = 13
wait(0.3)
debounce = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='x' then
if debounce then return end
debounce = true
attacking = true
notbreakeffect = true
hum.WalkSpeed = 0
step = Instance.new("Sound", Torso)
step.SoundId = "rbxassetid://337064700"
step.Volume = 2
step:Play()
for i = 1, 12 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5, 0.8, 0.501) * CFrame.Angles(math.rad(-70), math.rad(-5), math.rad(0)), 0.3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.3, 1, 1.5) * CFrame.Angles(math.rad(-45), math.rad(72), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -1.3, 0) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(0)), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.2, 0.2) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 2.0, 0.2) * CFrame.Angles(math.rad(30), math.rad(20), math.rad(0)), 0.3)
wait()
end
knockbackhitbox = Instance.new("Part", Torso)
knockbackhitbox.Size = Vector3.new(5,5,3)
knockbackhitbox.Transparency = 1
local knockbackhitboxweld = weldBetween(knockbackhitbox, Torso)
local flyposition = coroutine.wrap(function()
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -0.3, 1.2) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.55, 0.1, 0) * CFrame.Angles(math.rad(5), math.rad(1), math.rad(8)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(5), math.rad(1), math.rad(-8)), 0.5)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-86.13379001), math.rad(-0), math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, .2) * CFrame.Angles(math.rad(10), math.rad(8), math.rad(-3)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, .2) * CFrame.Angles(math.rad(10), math.rad(-8), math.rad(3)), 0.5)
wait()
end
end)
local aftereffect = coroutine.wrap(function()
while notbreakeffect do
leftarmeffect = Instance.new("Part", Torso)
leftarmeffect.BrickColor = BrickColor.new("Really red")
leftarmeffect.Size = Vector3.new(1.001, 2.001, 1.001)
leftarmeffect.Material = "Neon"
leftarmeffect.Anchored = true
leftarmeffect.CanCollide = false
leftarmeffect.CFrame = Torso.CFrame * CFrame.new(1.55, 0.1, 0) * CFrame.Angles(math.rad(5), math.rad(1), math.rad(8))
table.insert(SlowlyFade,leftarmeffect)
removeuseless:AddItem(leftarmeffect,2)
rightarmeffect = Instance.new("Part", Torso)
rightarmeffect.BrickColor = BrickColor.new("Really red")
rightarmeffect.Size = Vector3.new(1.001, 2.001, 1.001)
rightarmeffect.Material = "Neon"
rightarmeffect.Anchored = true
rightarmeffect.CanCollide = false
rightarmeffect.CFrame = Torso.CFrame * CFrame.new(-1.55, 0.1, 0) * CFrame.Angles(math.rad(5), math.rad(1), math.rad(-8))
table.insert(SlowlyFade,rightarmeffect)
removeuseless:AddItem(rightarmeffect,2)
leftlegeffect = Instance.new("Part", Torso)
leftlegeffect.BrickColor = BrickColor.new("Really red")
leftlegeffect.Size = Vector3.new(1.001, 2.001, 1.001)
leftlegeffect.Material = "Neon"
leftlegeffect.Anchored = true
leftlegeffect.CanCollide = false
leftlegeffect.CFrame = Torso.CFrame * CFrame.new(0.4, 2.0, .2) * CFrame.Angles(math.rad(10), math.rad(-8), math.rad(3))
table.insert(SlowlyFade,leftlegeffect)
removeuseless:AddItem(leftlegeffect,2)
rightlegeffect = Instance.new("Part", Torso)
rightlegeffect.BrickColor = BrickColor.new("Really red")
rightlegeffect.Size = Vector3.new(1.001, 2.001, 1.001)
rightlegeffect.Material = "Neon"
rightlegeffect.Anchored = true
rightlegeffect.CanCollide = false
rightlegeffect.CFrame = Torso.CFrame * CFrame.new(-0.4, 2.0, .2) * CFrame.Angles(math.rad(10), math.rad(8), math.rad(-3))
table.insert(SlowlyFade,rightlegeffect)
removeuseless:AddItem(rightlegeffect,2)
wait()
end
end)
local sawnicboomzor = coroutine.wrap(function()
while notbreakeffect do
openshock2 = Instance.new("Part", Torso)
openshock2.Size = Vector3.new(1, 1, 1)
openshock2.Transparency = 0
openshock2.BrickColor = BrickColor.new("Really red")
openshock2.Material = "Neon"
openshock2.Anchored = true
openshock2.CanCollide = false
openshock2.CFrame = Root.CFrame * CFrame.Angles(math.rad(90),math.rad(90),math.rad(0))
DDTopenshock2 = Instance.new("SpecialMesh", openshock2)
DDTopenshock2.MeshId = "http://www.roblox.com/asset/?id=20329976"
DDTopenshock2.Scale = Vector3.new(1, 2, 1)
removeuseless:AddItem(openshock2,2)
table.insert(TheEnd3,DDTopenshock2)
table.insert(SlowlyFade,openshock2)
wait(0.1)
end
end)
local knockback = coroutine.wrap(function()
knockbackhitbox.Touched:connect(function(hit)
if hit.Parent:IsA("Part") then
elseif hit.Parent:IsA("SpecialMesh") then
elseif hit.Parent.Name == game.Players.LocalPlayer.Name then
elseif hit.Parent:findFirstChild("Humanoid") then
if damagedebounce == true then return end
damagedebounce = true
knockbacktarget = hit.Parent:findFirstChild("Humanoid")
dmgsound = Instance.new("Sound", knockbacktarget.Torso)
dmgsound.SoundId = "rbxassetid://553324113"
dmgsound.Volume = 2
dmgsound:Play()
removeuseless:AddItem(dmgsound,2)
knockbacktarget:TakeDamage(10)
end
end)
end)
knockback()
aftereffect()
flyposition()
sawnicboomzor()
energy = Instance.new("Sound", Torso)
energy.Volume = 2
energy.SoundId = "rbxassetid://601621838"
energy:Play()
removeuseless:AddItem(energy,3)
energy2 = Instance.new("Sound", Torso)
energy2.Volume = 2
energy2.SoundId = "rbxassetid://303858412"
energy2:Play()
removeuseless:AddItem(energy2,3)
local fly = Instance.new("BodyVelocity", Torso)
fly.MaxForce = Vector3.new(999999, 999999, 999999)
fly.Velocity = Root.CFrame.lookVector * 90
Torso.CFrame = Root.CFrame * CFrame.new(0,0,-1)
wait(.7)
hum.WalkSpeed = 13
notbreakeffect = false
fly:Remove()
attacking = false
debounce = false
knockbackhitbox:Remove()
damagedebounce = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='c' then
if debounce == true then return end
debounce = true
attacking = true
hum.WalkSpeed = 0
coercion = Instance.new("Part", Torso)
coercion.BrickColor = BrickColor.new("Crimson")
coercion.Anchored = true
coercion.Shape = 0
coercion.Material = "Neon"
coercion.Size = Vector3.new(25,25,25)
coercion.CanCollide = false
coercion.Transparency = 1
coercion.CFrame = Root.CFrame * CFrame.new(0,0,0)
local coercion1 = coroutine.wrap(function()
for i = 1, 5 do
coercion.Size = coercion.Size - Vector3.new(5,5,5)
coercion.Transparency = coercion.Transparency - 0.25
wait()
end
end)
punchcharge:Play()
coercion1()
for i = 1, 8 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.5, -.5) * CFrame.Angles(math.rad(-50), math.rad(0), math.rad(0)), 0.4)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2,0,.5) * CFrame.Angles(math.rad(-90),math.rad(40),math.rad(0)), 0.4)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.2,0,.5) * CFrame.Angles(math.rad(-90),math.rad(-40),math.rad(0)), 0.4)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 1.5, -.8) * CFrame.Angles(math.rad(-50), math.rad(0), math.rad(-3)), 0.4)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 1.5, -.8) * CFrame.Angles(math.rad(-50), math.rad(0), math.rad(3)), 0.4)
wait()
end
local coercion2 = coroutine.wrap(function()
for i = 1, 12 do
coercion.Size = coercion.Size + Vector3.new(5,5,5)
coercion.Transparency = coercion.Transparency + 0.1
wait()
end
end)
coercion2()
xboom = Instance.new("Sound", Torso)
xboom.SoundId = "rbxassetid://400765078"
xboom.Volume = 2
xboom:Play()
rdnm2 = soundtable2[math.random(1,#soundtable2)]
sound23 = Instance.new("Sound", Torso)
sound23.SoundId = "http://www.roblox.com/asset/?id="..rdnm2
sound23.Volume = 4
sound23:Play()
local Hit = damagealll(20,Torso.Position)
for _,v in pairs(Hit) do
v.Humanoid:TakeDamage(15)
end
for i = 1, 12 do
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .5, .5) * CFrame.Angles(math.rad(50), math.rad(0), math.rad(0)), 0.8)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.5,.9,-.5) * CFrame.Angles(math.rad(90),math.rad(20),math.rad(0)), 0.8)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5,.9,-.5) * CFrame.Angles(math.rad(90),math.rad(-20),math.rad(0)), 0.8)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 1.5, .8) * CFrame.Angles(math.rad(60), math.rad(10), math.rad(-9)), 0.8)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 1.5, .8) * CFrame.Angles(math.rad(60), math.rad(-10), math.rad(9)), 0.8)
wait()
end
debounce = false
attacking = false
coercion:Remove()
hum.WalkSpeed = 13
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='v' then
if debounce then return end
if transf1 == false then
print("You are not ready to transform!")
elseif transf1 and donttransform == false then
debounce = true
attacking = true
hum.WalkSpeed = 0
local timechange = coroutine.wrap(function()
game.Lighting.Brightness = -1
game.Lighting.Ambient = Color3.new(2.5,2.5,2.5)
wait(.1)
game.Lighting.Ambient = Color3.new(2.5,2.5,2.5)
wait(0.1)
game.Lighting.Ambient = Color3.new(2,2,2)
wait(0.1)
game.Lighting.Ambient = Color3.new(1.5,1.5,1.5)
wait(0.1)
game.Lighting.Ambient = Color3.new(1,1,1)
wait(0.1)
game.Lighting.Ambient = Color3.new(.5,.5,.5)
wait(0.1)
game.Lighting.Ambient = Color3.new(0,0,0)
wait(10)
game.Lighting.Ambient = Color3.new(-.5,-.5,-.5)
wait(0.1)
game.Lighting.Ambient = Color3.new(-.6,-.6,-.6)
wait(0.1)
game.Lighting.Ambient = Color3.new(-.7,-.7,-.7)
end)
local timechange2 = coroutine.wrap(function()
minutesAfterMidnight = -400
for i = 1, 100 do
minutesAfterMidnight = minutesAfterMidnight + 5
game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight)
wait()
end
end)
timechange2()
local lri = coroutine.wrap(function()
light:Remove()
light = Instance.new("PointLight", Torso)
light.Color = Color3.new(0,255,0)
light.Range = 5
light.Brightness = 50
for i = 1, 150 do
light.Range = light.Range + 0.02
light.Brightness = light.Brightness + 0.05
wait()
end
end)
lri()
CorruptedArm3 = Instance.new("Part", LeftArm)
CorruptedArm3.CanCollide = false
CorruptedArm3.Size = Vector3.new(1.011, 2.011, 1.011)
CorruptedArm3.BottomSurface = "SmoothNoOutlines"
CorruptedArm3.TopSurface = "SmoothNoOutlines"
CorruptedArm3.Material = "Neon"
CorruptedArm3.Transparency = 1
CorruptedArm3.BrickColor = BrickColor.new("Lime green")
local weldcor = weldBetween(CorruptedArm3, LeftArm)
weldcor.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), 0)
sao = coroutine.wrap(function()
for i = 1, 100 do
CorruptedArm3.Transparency = CorruptedArm3.Transparency - 0.04
wait()
end
end)
sao()
for i = 1, 100 do
doommusucus.Volume = doommusucus.Volume - 0.02
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 15, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.003)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0.2) * CFrame.Angles(math.rad(-15), math.rad(0), math.rad(0)), 0.03)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(20)), 0.03)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20)), 0.03)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.03)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.03)
wait()
end
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2,0,.5) * CFrame.Angles(math.rad(-90),math.rad(40),math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.2,0,.5) * CFrame.Angles(math.rad(-90),math.rad(-40),math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1., .9) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.0, .9) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
wait()
end
lssj = true
LSSJ:Play()
for i = 1, 40 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0.2) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(-20)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0.1) * CFrame.Angles(math.rad(5), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.30, 2.0, 0.1) * CFrame.Angles(math.rad(5), math.rad(0), math.rad(10)), 0.5)
wait()
end
rjjj = coroutine.wrap(function()
for i = 1, 62 do
unleashingpower = Instance.new("Part", Torso)
unleashingpower.Size = Vector3.new(1, 1, 1)
unleashingpower.Transparency = 0.5
unleashingpower.BrickColor = BrickColor.Random()
unleashingpower.Material = "Neon"
unleashingpower.Anchored = true
unleashingpower.CanCollide = false
unleashingpower.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
unleashingpowermesh = Instance.new("SpecialMesh", unleashingpower)
unleashingpowermesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
unleashingpowermesh.Scale = Vector3.new(15, 15, 15)
removeuseless:AddItem(unleashingpower,2)
table.insert(Extreme,unleashingpower)
table.insert(nonmeshRepeater2,unleashingpower)
table.insert(ExtremeM,unleashingpowermesh)
unleashingpower2 = Instance.new("Part", Torso)
unleashingpower2.Size = Vector3.new(1, 1, 1)
unleashingpower2.Transparency = 0.5
unleashingpower2.Shape = 0
unleashingpower2.BrickColor = BrickColor.Random()
unleashingpower2.Material = "Neon"
unleashingpower2.Anchored = true
unleashingpower2.CanCollide = false
unleashingpower2.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
removeuseless:AddItem(unleashingpower2,2)
table.insert(Extreme,unleashingpower2)
table.insert(nonmeshRepeater2,unleashingpower2)
wait()
end
end)
rjjj()
mcs = coroutine.wrap(function()
while lssj do
light.Range = light.Range + 5
light.Brightness = light.Brightness + 5
light.Color = Color3.new(math.random(1,255)/255,math.random(1,255)/255,math.random(1,255)/255)
sine = sine + change
change = 4
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0.4) * CFrame.Angles(math.rad(-30 + 8 * math.cos(sine/4)), math.rad(0 + 10 * math.cos(sine/4)), math.rad(0 + 5 * math.cos(sine/4))), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(25 + 5 * math.cos(sine/4)), math.rad(0 - 2 * math.cos(sine/4)), math.rad(20 + 20 * math.cos(sine/4))), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(25 - 7 * math.cos(sine/4)), math.rad(0 + 2 * math.cos(sine/4)), math.rad(-20 + 20 * math.cos(sine/4))), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0.2) * CFrame.Angles(math.rad(10), math.rad(0 + 9 * math.cos(sine/4)), math.rad(-10 + 5 * math.cos(sine/4))), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.30, 2.0, 0.2) * CFrame.Angles(math.rad(10), math.rad(0 - 9 * math.cos(sine/4)), math.rad(10 - 5 * math.cos(sine/4))), 0.5)
wait()
end
end)
mcs()
wait(4)
lssj = false
light.Range = 50
light.Brightness = 9001
light.Color = Color3.new(255,0,0)
unleashingpower3 = Instance.new("Part", Torso)
unleashingpower3.Size = Vector3.new(1, 1, 1)
unleashingpower3.Transparency = 0
unleashingpower3.Shape = 0
unleashingpower3.BrickColor = BrickColor.New("Lime green")
unleashingpower3.Material = "Neon"
unleashingpower3.Anchored = true
unleashingpower3.CanCollide = false
unleashingpower3.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
table.insert(Extreme,unleashingpower3)
wait(1)
HandCannonTop1:Remove()
FixedER:Remove()
FixedER4:Remove()
FixedER5:Remove()
FixedER2:Remove()
FixedER3:Remove()
HandCannonTop2:Remove()
HandCannonTop3:Remove()
secretpart:Remove()
HandCannonTop4:Remove()
HandCannonTop5:Remove()
HandCannonTop6:Remove()
HandCannonTop7:Remove()
HandCannonTop8:Remove()
HandCannonTop9:Remove()
HandCannonTop10:Remove()
HandCannonTop11:Remove()
HandCannonTop12:Remove()
HandCannonTop13:Remove()
HandCannonTop14:Remove()
corecircle:Remove()
corecircle2:Remove()
TheCore:Remove()
Gear1:Remove()
Gear2:Remove()
EnergyCorePART:Remove()
CorruptedArm:Remove()
CorruptedArm2:Remove()
ArmorPlating:Remove()
ArmorPlating2:Remove()
ArmorPlating3:Remove()
ArmorPlating4:Remove()
ArmorPlating5:Remove()
ArmorPlating6:Remove()
ArmorPlating7:Remove()
ArmorPlating8:Remove()
ArmorPlating9:Remove()
ArmorPlating10:Remove()
CorruptedArm3:Remove()
unleashingpower5 = Instance.new("Part", Torso)
unleashingpower5.Size = Vector3.new(20, 20, 20)
unleashingpower5.Transparency = 0.5
unleashingpower5.BrickColor = BrickColor.New("Really red")
unleashingpower5.Material = "Neon"
unleashingpower5.Anchored = true
unleashingpower5.CanCollide = false
unleashingpower5.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
unleashingpowermesh5 = Instance.new("SpecialMesh", unleashingpower5)
unleashingpowermesh5.MeshId = "http://www.roblox.com/asset/?id=3270017"
unleashingpowermesh5.Scale = Vector3.new(15, 15, 15)
unleashingpower6 = Instance.new("Part", Torso)
unleashingpower6.Size = Vector3.new(20, 20, 20)
unleashingpower6.Transparency = 0.5
unleashingpower6.BrickColor = BrickColor.New("Really red")
unleashingpower6.Material = "Neon"
unleashingpower6.Anchored = true
unleashingpower6.CanCollide = false
unleashingpower6.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
unleashingpowermesh6 = Instance.new("SpecialMesh", unleashingpower6)
unleashingpowermesh6.MeshId = "http://www.roblox.com/asset/?id=3270017"
unleashingpowermesh6.Scale = Vector3.new(15, 15, 15)
quickcour = coroutine.wrap(function()
while wait() do
unleashingpower5.CFrame = unleashingpower5.CFrame * CFrame.Angles(math.rad(1+6),math.rad(1+4),math.rad(1-2))
unleashingpower6.CFrame = unleashingpower6.CFrame * CFrame.Angles(math.rad(1-6),math.rad(1-4),math.rad(1+2))
end
end)
quickcour()
light.Range = 10
light.Brightness = 25
light.Color = Color3.new(255,0,0)
unleashingpower4 = Instance.new("Part", Torso)
unleashingpower4.Size = Vector3.new(15, 15, 15)
unleashingpower4.Transparency = 0
unleashingpower4.Shape = 0
unleashingpower4.BrickColor = BrickColor.New("Really red")
unleashingpower4.Material = "Neon"
unleashingpower4.Anchored = true
unleashingpower4.CanCollide = false
unleashingpower4.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
mdark.MeshId,mdark.TextureId = 'http://www.roblox.com/asset/?id=21057410','http://www.roblox.com/asset/?id=73404388'
wait(1)
table.insert(nonmeshRepeater2,unleashingpower3)
removeuseless:AddItem(unleashingpower3,3)
wait(1)
unleashingpower7 = Instance.new("Part", Torso)
unleashingpower7.Size = Vector3.new(1, 1, 1)
unleashingpower7.Transparency = 0
unleashingpower7.Shape = 0
unleashingpower7.BrickColor = BrickColor.New("Really red")
unleashingpower7.Material = "Neon"
unleashingpower7.Anchored = true
unleashingpower7.CanCollide = false
unleashingpower7.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
table.insert(Extreme,unleashingpower7)
table.insert(nonmeshRepeater2,unleashingpower7)
removeuseless:AddItem(unleashingpower7,3)
wait(2)
unleashingpower8 = Instance.new("Part", Torso)
unleashingpower8.Size = Vector3.new(1, 1, 1)
unleashingpower8.Transparency = 0
unleashingpower8.Shape = 0
unleashingpower8.BrickColor = BrickColor.New("Really red")
unleashingpower8.Material = "Neon"
unleashingpower8.Anchored = true
unleashingpower8.CanCollide = false
unleashingpower8.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
table.insert(Extreme,unleashingpower8)
table.insert(nonmeshRepeater2,unleashingpower8)
removeuseless:AddItem(unleashingpower8,3)
wait(2)
unleashingpower9 = Instance.new("Part", Torso)
unleashingpower9.Size = Vector3.new(1, 1, 1)
unleashingpower9.Transparency = 0
unleashingpower9.Shape = 0
unleashingpower9.BrickColor = BrickColor.New("Really red")
unleashingpower9.Material = "Neon"
unleashingpower9.Anchored = true
unleashingpower9.CanCollide = false
unleashingpower9.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
table.insert(Extreme,unleashingpower9)
table.insert(nonmeshRepeater2,unleashingpower9)
removeuseless:AddItem(unleashingpower9,3)
wait(2)
table.insert(Extreme,unleashingpower4)
table.insert(nonmeshRepeater2,unleashingpower4)
removeuseless:AddItem(unleashingpower4,3)
wait(.1)
arti = coroutine.wrap(function()
for i = 1, 10 do
unleashingpower10 = Instance.new("Part", Torso)
unleashingpower10.Size = Vector3.new(1, 1, 1)
unleashingpower10.Transparency = 0.5
unleashingpower10.BrickColor = BrickColor.New("Crimson")
unleashingpower10.Material = "Neon"
unleashingpower10.Anchored = true
unleashingpower10.CanCollide = false
unleashingpower10.CFrame = Torso.CFrame * CFrame.Angles(math.random(1,100),math.random(1,100),math.random(1,100))
un = Instance.new("SpecialMesh", unleashingpower10)
un.MeshId = "http://www.roblox.com/asset/?id=3270017"
un.Scale = Vector3.new(15, 15, 15)
removeuseless:AddItem(unleashingpower10,2)
table.insert(Extreme,unleashingpower10)
table.insert(nonmeshRepeater2,unleashingpower10)
table.insert(ExtremeM,un)
wait()
end
end)
arti()
dso = coroutine.wrap(function()
for i = 1, 100 do
LSSJ.Volume = LSSJ.Volume - 0.4
wait()
end
end)
dso()
removeuseless:AddItem(unleashingpower6,2)
table.insert(Extreme,unleashingpower6)
table.insert(nonmeshRepeater2,unleashingpower6)
removeuseless:AddItem(unleashingpower5,2)
table.insert(Extreme,unleashingpower5)
table.insert(nonmeshRepeater2,unleashingpower5)
doommusucus.SoundId = "rbxassetid://296414388"
laugh = Instance.new("Sound", Torso)
laugh.SoundId = "rbxassetid://179774173"
laugh.Volume = 2.5
laugh:Play()
for i = 1, 10 do
doommusucus.Volume = doommusucus.Volume + 0.11
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.2,0,.5) * CFrame.Angles(math.rad(-90),math.rad(40),math.rad(0)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.2,0,.5) * CFrame.Angles(math.rad(-90),math.rad(-40),math.rad(0)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1., .9) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.0, .9) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), 0.5)
wait()
end
for i = 1, 10 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, 0.2) * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), 0.5)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.5, 0) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(20)), 0.5)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.5, 0) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(-20)), 0.5)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.3, 2, 0.1) * CFrame.Angles(math.rad(5), math.rad(0), math.rad(-10)), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.30, 2.0, 0.1) * CFrame.Angles(math.rad(5), math.rad(0), math.rad(10)), 0.5)
wait()
end
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.6)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.4, 1, 0.501) * CFrame.Angles(math.rad(-80), math.rad(-5), math.rad(0)), 0.3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(-80), math.rad(-10), math.rad(0)), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.2, .8) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0)), 0.3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 1.9, -.34) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(10)), 0.3)
wait()
end
wait(1)
hum.WalkSpeed = 13
LSSJn = true
donttransform = true
attacking = false
debounce = false
end
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='b' then
if debounce == true then return end
debounce = true
walking = false
attacking = true
fpg = false
gpf = true
for i = 1, 5 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.6)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(90)), 0.6)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.5, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), 0.6)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.6)
wait()
end
wind = Instance.new("Part", Torso)
wind.BrickColor = BrickColor.new("Crimson")
wind.Size = Vector3.new(5,5,5)
wind.CanCollide = false
wind.Transparency = 1
wind.Material = "Neon"
windmesh = Instance.new("SpecialMesh", wind)
windmesh.Scale = Vector3.new(2,2,2)
windmesh.MeshId = "rbxassetid://168892432"
windweld = weldBetween(wind, Torso)
wind2 = Instance.new("Part", Torso)
wind2.BrickColor = BrickColor.new("Crimson")
wind2.Size = Vector3.new(5,5,5)
wind2.CanCollide = false
wind2.Transparency = 1
wind2.Material = "Neon"
windmesh2 = Instance.new("SpecialMesh", wind2)
windmesh2.Scale = Vector3.new(4,4,4)
windmesh2.MeshId = "rbxassetid://168892432"
windweld2 = weldBetween(wind2, wind)
quickcourou = coroutine.wrap(function()
m = 1
for i = 1, 5 do
wind.Transparency = wind.Transparency - 0.1
wind2.Transparency = wind2.Transparency - 0.04
wait()
end
end)
quickcourou()
eORBleft = Instance.new("Part", Torso)
eORBleft.Size = Vector3.new(1, 1, 1)
eORBleft.Transparency = 0
eORBleft.Shape = 0
eORBleft.BrickColor = BrickColor.New("Really red")
eORBleft.Material = "Neon"
eORBleft.Anchored = false
eORBleft.CanCollide = false
eORBleft.CFrame = Root.CFrame * CFrame.new(4,0,0)
eorbweld1 = weldBetween(eORBleft, LeftArm)
eorbweld1.C0 = CFrame.new(0,1.3,0)
eORBright = Instance.new("Part", Torso)
eORBright.Size = Vector3.new(1, 1, 1)
eORBright.Transparency = 0
eORBright.Shape = 0
eORBright.BrickColor = BrickColor.New("Really red")
eORBright.Material = "Neon"
eORBright.Anchored = false
eORBright.CanCollide = false
eORBright.CFrame = Root.CFrame * CFrame.new(4,0,0)
eorbweld2 = weldBetween(eORBright, RightArm)
eorbweld2.C0 = CFrame.new(0,1.3,0)
hev = Instance.new("Part", Torso)
hev.Size = Vector3.new(15, 15, 15)
hev.Transparency = 0
hev.Shape = 0
hev.BrickColor = BrickColor.New("Really red")
hev.Material = "Neon"
hev.Anchored = true
hev.CanCollide = false
hev2 = Instance.new("Part", Torso)
hev2.Size = Vector3.new(15, 15, 15)
hev2.Transparency = 0
hev2.Shape = 0
hev2.BrickColor = BrickColor.New("Really red")
hev2.Material = "Neon"
hev2.Anchored = true
hev2.CanCollide = false
quickcour2 = coroutine.wrap(function()
while gpf do
local Hit = damagealll(8,Torso.Position)
for _,v in pairs(Hit) do
local velo2 = Instance.new("BodyVelocity", v)
velo2.MaxForce = Vector3.new(999999, 999999, 999999)
velo2.Velocity = v.Torso.CFrame.lookVector * 200
removeuseless:AddItem(velo2,2)
v.Humanoid:ChangeState(Enum.HumanoidStateType.FallingDown)
v.Humanoid:TakeDamage(10)
wait(.5)
end
wait()
end
end)
quickcour2()
quickcour = coroutine.wrap(function()
removeuseless:AddItem(hev,2)
removeuseless:AddItem(hev2,2)
for i = 1, 50 do
hev.Size = hev.Size - Vector3.new(1,1,1)
hev2.Size = hev2.Size - Vector3.new(1,1,1)
hev.CFrame = eORBleft.CFrame
hev2.CFrame = eORBright.CFrame
wait()
end
end)
quickcour()
particlemiter1 = Instance.new("ParticleEmitter", eORBleft)
particlemiter1.Enabled = true
particlemiter1.Texture = "rbxassetid://1415728949"
particlemiter1.Lifetime = NumberRange.new(2.5)
particlemiter1.Size = NumberSequence.new(1,0)
particlemiter1.Rate = 20
particlemiter1.RotSpeed = NumberRange.new(70)
particlemiter1.Speed = NumberRange.new(0)
particlemiter2 = Instance.new("ParticleEmitter", eORBright)
particlemiter2.Enabled = true
particlemiter2.Texture = "rbxassetid://1415728949"
particlemiter2.Lifetime = NumberRange.new(2.5)
particlemiter2.Size = NumberSequence.new(1,0)
particlemiter2.Rate = 20
particlemiter2.RotSpeed = NumberRange.new(70)
particlemiter2.Speed = NumberRange.new(0)
t = 1
for i = 1, 5 do
t = t + 1
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
sound = Instance.new("Sound", Torso)
sound.SoundId = "rbxassetid://730531499"
sound.Volume = 3
sound.Pitch = math.random(.8,1)
sound:Play()
for i = 1, 5 do
hum.WalkSpeed = 15
t = t + 2
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
sound2 = Instance.new("Sound", Torso)
sound2.SoundId = "rbxassetid://93186995"
sound2.Volume = 3
sound2.Pitch = math.random(.8,1)
sound2:Play()
for i = 1, 5 do
hum.WalkSpeed = 16
t = t + 3
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
sound3 = Instance.new("Sound", Torso)
sound3.SoundId = "rbxassetid://178090362"
sound3.Volume = 3
sound3.Pitch = math.random(.8,1)
sound3:Play()
for i = 1, 5 do
hum.WalkSpeed = 18
t = t + 4
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
sound4 = Instance.new("Sound", Torso)
sound4.SoundId = "rbxassetid://152091992"
sound4.Volume = 3
sound4.Pitch = 1
sound4.Looped = true
sound4:Play()
for i = 1, 5 do
hum.WalkSpeed = 20
t = t + 5
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
for i = 1, 5 do
hum.WalkSpeed = 25
t = t + 10
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
for i = 1, 5 do
hum.WalkSpeed = 30
t = t + 20
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
for i = 1, 5 do
hum.WalkSpeed = 35
t = t + 30
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
for i = 1, 150 do
hum.WalkSpeed = 40
t = t + 40
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, .4, 0) * CFrame.Angles(math.rad(0), math.rad(t), math.rad(0)), 0.6)
wait()
end
fpg = true
gpf = false
removeuseless:AddItem(sound4,5)
removeuseless:AddItem(eORBright,1)
removeuseless:AddItem(eORBleft,1)
removeuseless:AddItem(wind,1)
removeuseless:AddItem(wind2,1)
attacking = false
debounce = false
quikcour = coroutine.wrap(function()
while fpg do
wind.Transparency = wind.Transparency + 0.06
wind2.Transparency = wind2.Transparency + .06
eORBright.Size = eORBright.Size + Vector3.new(1,1,1)
eORBright.Transparency = eORBright.Transparency + 0.07
eORBleft.Size = eORBleft.Size + Vector3.new(1,1,1)
eORBleft.Transparency = eORBleft.Transparency + 0.07
sound4.Volume = sound4.Volume - 0.05
eORBright.Anchored = true
eORBleft.Anchored = true
wait()
end
end)
quikcour()
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='n' then
if debounce == true then return end
debounce = true
attacking = true
damageallow2 = true
combowombo = true
hum.WalkSpeed = 10
hitbox1 = Instance.new("Part", RightArm)
hitbox1.Size = Vector3.new(2,2,1)
hitbox1.Transparency = 1
hitbox1.CanCollide = false
local hitbox1w = weldBetween(hitbox1, RightArm)
hitbox1w.C0 = CFrame.new(0,2,0)
hitbox2 = Instance.new("Part", LeftArm)
hitbox2.Size = Vector3.new(2,2,1)
hitbox2.Transparency = 1
hitbox2.CanCollide = false
local hitbox2w = weldBetween(hitbox2, LeftArm)
hitbox2w.C0 = CFrame.new(0,2,0)
impactsound = Instance.new("Sound", nil)
impactsound.Volume = 3
impactsound.SoundId = "rbxassetid://281156569"
impactsound2 = Instance.new("Sound", nil)
impactsound2.Volume = 3
impactsound2.SoundId = "rbxassetid://281156569"
hitbox1.Touched:connect(function(hit1)
if hit1.Parent:IsA("Part") then
elseif hit1.Parent:IsA("SpecialMesh") then
elseif hit1.Parent.Name == game.Players.LocalPlayer.Name then
elseif hit1.Parent:findFirstChild("Humanoid") then
if damageallow1 then return end
damageallow1 = true
Slachtoffer = hit1.Parent:findFirstChild("Humanoid")
impactsound.Parent = Slachtoffer.Torso
impactsound:Play()
Slachtoffer:TakeDamage(5)
end
end)
hitbox2.Touched:connect(function(hit2)
if hit2.Parent:IsA("Part") then
elseif hit2.Parent:IsA("SpecialMesh") then
elseif hit2.Parent.Name == game.Players.LocalPlayer.Name then
elseif hit2.Parent:findFirstChild("Humanoid") then
if damageallow2 then return end
damageallow2 = true
impactsound2.Parent = Slachtoffer.Torso
impactsound2:Play()
Slachtoffer = hit2.Parent:findFirstChild("Humanoid")
Slachtoffer:TakeDamage(5)
end
end)
punchsound = Instance.new("Sound", Torso)
punchsound.Volume = 3
punchsound.SoundId = "rbxassetid://515339961"
punchsound2 = Instance.new("Sound", Torso)
punchsound2.Volume = 3
punchsound2.SoundId = "rbxassetid://515339961"
punchsound2.Pitch = .9
while combowombo do
damageallow1 = false
punchsound:Play()
for i = 1, 3 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(70), math.rad(0)), 0.4)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.5, 0, -.9) * CFrame.Angles(math.rad(-140), math.rad(0), math.rad(90)), 0.8)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.5, 1.85, -.26) * CFrame.Angles(math.rad(-19), math.rad(0), math.rad(-90)), 0.8)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(70), math.rad(0)), 0.8)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.8)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.8)
wait()
end
damageallow2 = false
punchsound2:Play()
for i = 1, 3 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(-70), math.rad(0)), 0.4)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(.5, 1.85, -.26) * CFrame.Angles(math.rad(-19), math.rad(0), math.rad(90)), 0.8)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.5, 0, -.9) * CFrame.Angles(math.rad(-140), math.rad(0), math.rad(-90)), 0.8)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-70), math.rad(0)), 0.8)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.4, 2, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-3)), 0.8)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.4, 2.0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(3)), 0.8)
wait()
end
wait()
end
hitbox1:Remove()
hitbox2:Remove()
attacking = false
debounce = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='e' then
if debounce == true then return end
debounce = true
walking = false
attacking = true
ll = false
bigrift = Instance.new("Part", Torso)
bigrift.Size = Vector3.new(0.1, 0.1, 0.1)
bigrift.Material = "Neon"
bigrift.Transparency = 1
bigrift.Anchored = true
bigrift.CanCollide = false
bigriftdecal = Instance.new("Decal", bigrift)
bigriftdecal.Face = "Top"
bigriftdecal.Texture = "rbxassetid://702583926"
bigrift2 = Instance.new("Part", Torso)
bigrift2.Size = Vector3.new(0.1, 0.1, 0.1)
bigrift2.Material = "Neon"
bigrift2.Transparency = 1
bigrift2.Anchored = true
bigrift2.CanCollide = false
bigriftdecal2 = Instance.new("Decal", bigrift2)
bigriftdecal2.Face = "Top"
bigriftdecal2.Texture = "rbxassetid://702583926"
rdnm3 = soundtable3[math.random(1,#soundtable3)]
luagh = Instance.new("Sound", Torso)
luagh.SoundId = "rbxassetid://"..rdnm3
luagh.Looped = false
luagh.Volume = 2
luagh:Play()
removeuseless:AddItem(luagh,10)
poop1 = coroutine.wrap(function()
for i = 1, 25 do
bigrift.Size = bigrift.Size + Vector3.new(1,0,1)
bigrift.CFrame = bigrift.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(1 + 5),0)
wait()
end
bigrift2.CFrame = CFrame.new(mouse.Hit.p)
for i = 1, 25 do
bigrift.Size = bigrift.Size - Vector3.new(1,0,1)
bigrift.CFrame = bigrift.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(1 - 5),0)
bigrift2.Size = bigrift2.Size + Vector3.new(1,0,1)
bigrift2.CFrame = bigrift2.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(1 + 5),0)
wait()
end
for i = 1, 25 do
ll = true
bigrift2.Size = bigrift2.Size - Vector3.new(1,0,1)
bigrift2.CFrame = bigrift2.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(1 - 5),0)
wait()
end
end)
poop1()
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.4, 1, 0.501) * CFrame.Angles(math.rad(-80), math.rad(-5), math.rad(0)), 0.3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(-80), math.rad(-10), math.rad(0)), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.2, .8) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0)), 0.3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 1.9, -.34) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(10)), 0.3)
wait()
end
wait(1)
LeftLeg.CFrame = CFrame.new(bigrift2.Position) * CFrame.new(0,1,0)
for i = 1, 15 do
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.4, 1, 0.501) * CFrame.Angles(math.rad(-80), math.rad(-5), math.rad(0)), 0.3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-80), math.rad(-10), math.rad(0)), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.2, .8) * CFrame.Angles(math.rad(-80), math.rad(0), math.rad(0)), 0.3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.3, 1.9, -.34) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(10)), 0.3)
wait()
end
debounce = false
attacking = false
ll = false
end
end)
mouse.KeyUp:connect(function(Press)
Press=Press:lower()
if Press=='n' then
combowombo = false
end
end)
mouse.KeyDown:connect(function(Press)
Press=Press:lower()
if Press=='0' then
if debounce then return end
debounce = true
running = true
hum.WalkSpeed = 28
end
end)
mouse.KeyUp:connect(function(Press)
Press=Press:lower()
if Press=='0' then
debounce = false
running = false
hum.WalkSpeed = 13
end
end)
doit = coroutine.wrap(function()
while wait() do
for _,v in pairs(Repeater) do
v.Scale = v.Scale + Vector3.new(1, 1, 1)
end
for _,v in pairs(openshocktable) do
v.Scale = v.Scale + Vector3.new(3, 3, 3)
end
for _,v in pairs(nonmeshRepeater) do
v.Size = v.Size + Vector3.new(2, 2, 2)
end
for _,v in pairs(Extreme) do
v.Size = v.Size + Vector3.new(6, 6, 6)
end
for _,v in pairs(LessSize) do
v.Size = v.Size - Vector3.new(1, 1, 1)
end
for _,v in pairs(nonmeshRepeater2) do
v.Transparency = v.Transparency + 0.05
end
for _,v in pairs(Repeater2) do
v.Transparency = v.Transparency + 0.01
end
for _,v in pairs(TheEnd) do
v.Transparency = v.Transparency - 0.008
end
for _,v in pairs(TheEnd2) do
v.Scale = v.Scale - Vector3.new(1, 1, 1)
end
for _,v in pairs(TheEnd3) do
v.Scale = v.Scale + Vector3.new(2, 2, 2)
end
for _,v in pairs(ExtremeM) do
v.Scale = v.Scale + Vector3.new(8, 8, 8)
end
for _,v in pairs(TheEnd4) do
v.Transparency = v.Transparency + 0.009
v.Rotation = v.Rotation + Vector3.new(3,0,0)
end
for _,v in pairs(SlowlyFade) do
v.Transparency = v.Transparency + 0.05
end
for _,v in pairs(UpMover) do
v.Position = v.Position + Vector3.new(0, 3, 0)
end
for _,v in pairs(ForwardMover) do
v.CFrame = v.CFrame * CFrame.new(0, 0, 2.4 +(i/.1)) * CFrame.Angles(0, 0, math.rad(0))
end
for _,v in pairs(DamageAll2) do
if attackdebounce then return end
Slachtoffer = hit.Parent:findFirstChild("Humanoid")
Slachtoffer:TakeDamage(20)
end
end
end)
doit()
vcoroutine = coroutine.wrap(function()
wait(1)
transf1 = true
end)
vcoroutine()
local anims = coroutine.wrap(function()
while true do
settime = 0.05
sine = sine + change
if position == "Walking" and attacking == false and running == false then
change = 2.2
walking = true
hum.WalkSpeed = 13
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.6, 0.1, 0) * CFrame.Angles(math.rad(-48 * math.sin(sine/8)), math.rad(-20 * math.sin(sine/8)), math.rad(-8)), 0.6)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.6, 0.1, 0) * CFrame.Angles(math.rad(48 * math.sin(sine/8)), math.rad(-20 * math.sin(sine/8)), math.rad(8)), 0.6)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(5 * math.cos(sine/8)), math.rad(0) + Root.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.3)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.3) * CFrame.Angles(math.rad(20), math.rad(0 - 50 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10))), math.rad(0 - 20 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10)))), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.92 - 0.35 * math.cos(sine/6)/2.8, 0.2 - math.sin(sine/6)/3.4) * CFrame.Angles(math.rad(10) + -math.sin(sine/6)/2.3, math.rad(0)*math.cos(sine/1), math.rad(0) + RightLeg.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.5)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.92 + 0.35 * math.cos(sine/6)/2.8, 0.2 + math.sin(sine/6)/3.4) * CFrame.Angles(math.rad(10) - -math.sin(sine/6)/2.3, math.rad(0)*math.cos(sine/1), math.rad(0) + LeftLeg.RotVelocity.Y / 30, math.cos(25 * math.cos(sine/10))), 0.5)
elseif position == "Idle" and attacking == false and running == false then
walking = false
change = .9
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0.2) * CFrame.Angles(math.rad(15 + 2 * math.sin(sine/12)), math.rad(0), math.rad(0)), .3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.1+ .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(0 * math.cos(sine/8)), math.rad(0)), .3)
TORSOLERP.C0 = TORSOLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.58, 0.1 + 0.05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(2 + 1 * math.sin(sine/8)), math.rad(2 - 2 * math.sin(sine/8)), math.rad(-8 - 3 * math.sin(sine/8))), .3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.58, 0.1 + 0.05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(2 + 1 * math.sin(sine/8)), math.rad(2 + 2 * math.sin(sine/8)), math.rad(8 + 3 * math.sin(sine/8))), .3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0 * math.sin(sine/8)), math.rad(1 - 2 * math.sin(sine/8)), math.rad(-2 - .5 * math.sin(sine/8))), .3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(2 + .5 * math.sin(sine/8))), .3)
elseif position == "Idle2" and attacking == false and running == false then
change = .7
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0 + 2 * math.sin(sine/12)), math.rad(40), math.rad(0)), .3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.1+ .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(40), math.rad(0)), .3)
TORSOLERP.C0 = TORSOLERP.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1,-.2,.4) * CFrame.Angles(math.rad(-87),math.rad(80 - 1 * math.sin(sine/8)),math.rad(0)), 0.3)
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-.7,-.2,.4) * CFrame.Angles(math.rad(-87),math.rad(-88 + .7 * math.sin(sine/8)),math.rad(0)), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0 * math.sin(sine/8)), math.rad(1 - 2 * math.sin(sine/8)), math.rad(-2 - .5 * math.sin(sine/8))), .3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.45, 1.9 + .05 * math.sin(sine/8), 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(2 + .5 * math.sin(sine/8))), .3)
elseif position == "Running" and attacking == false then
change = 2
hum.WalkSpeed = 26
RIGHTARMLERP.C0 = RIGHTARMLERP.C0:lerp(CFrame.new(-1.45+0.50*math.cos(sine/5),0.2-0.25*math.cos(sine/5),-0.2-0.5*math.cos(sine/5))*CFrame.Angles(math.rad(-20+120*math.cos(sine/5)),math.rad(0),math.rad(-4+30*math.cos(sine/5))),.3)
LEFTARMLERP.C0 = LEFTARMLERP.C0:lerp(CFrame.new(1.45+0.50*math.cos(sine/5),0.2-0.25*math.cos(sine/5),-0.2+0.5*math.cos(sine/5))*CFrame.Angles(math.rad(-20-120*math.cos(sine/5)),math.rad(0),math.rad(4+30*math.cos(sine/5))),.3)
ROOTLERP.C0 = ROOTLERP.C0:lerp(CFrame.new(0, -.05, 0) * CFrame.Angles(math.rad(-20 - 4 * math.cos(sine/4)), math.rad(0 + 0 * math.cos(sine/8)), math.rad(0) + Root.RotVelocity.Y / 30, math.cos(10 * math.cos(sine/10))), 0.3)
HEADLERP.C0 = HEADLERP.C0:lerp(CFrame.new(0, -1.5, .2) * CFrame.Angles(math.rad(-10), math.rad(0 + 20 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10))), math.rad(0 - 20 * Head.RotVelocity.Y / 30, math.cos(15 * math.cos(sine/10)))), 0.3)
RIGHTLEGLERP.C0 = RIGHTLEGLERP.C0:lerp(CFrame.new(-0.5, 1.8 - 0.45 * math.cos(sine/4)/2.8, -0.05) * CFrame.Angles(math.rad(-35)*math.sin(sine/4), math.rad(1)*math.cos(sine/1), math.rad(0) + RightLeg.RotVelocity.Y / 90, math.cos(25 * math.cos(sine/6))), 0.3)
LEFTLEGLERP.C0 = LEFTLEGLERP.C0:lerp(CFrame.new(0.5, 1.8 + 0.45 * math.cos(sine/4)/2.8, -0.05) * CFrame.Angles(math.rad(35)*math.sin(sine/4), math.rad(-1)*math.cos(sine/1), math.rad(0) + LeftLeg.RotVelocity.Y / 90, math.cos(25 * math.cos(sine/6))), 0.3)
end
wait()
end
end)
anims()
print("Project 44033514 loaded, made by Supr14.")
|
nut.command.Register({
adminOnly = true,
syntax = nut.lang.Get("syntax_bool"),
onRun = function(client, arguments)
local dat = {}
dat.start = client:GetShootPos()
dat.endpos = dat.start + client:GetAimVector() * 96
dat.filter = client
local trace = util.TraceLine(dat)
local entity = trace.Entity
if (entity and entity:IsValid()) then
if (entity:GetClass() == "nut_container") then
if (arguments[1]) then
if (arguments[1] == "true" or arguments[1] == "false") then
if (arguments[1] == "true") then
entity.world = true
else
entity.world = false
end
else
nut.util.Notify(nut.lang.Get("missing_arg", 1), client)
return
end
else
entity.world = !entity.world
end
if entity.world then
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_world_container"), client)
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_user_container"), client)
end
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_notstorage"), client)
end
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_notstorage"), client)
end
end
}, "setworldcontainer")
nut.command.Register({
adminOnly = true,
syntax = nut.lang.Get("syntax_password"),
onRun = function(client, arguments)
local dat = {}
dat.start = client:GetShootPos()
dat.endpos = dat.start + client:GetAimVector() * 96
dat.filter = client
local trace = util.TraceLine(dat)
local entity = trace.Entity
if (entity and entity:IsValid()) then
if (entity:GetClass() == "nut_container") then
if (arguments[1]) then
entity.classic = false
entity.lock = arguments[1]
entity:SetNetVar( "locked", true )
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_set_password", entity.lock), client)
else
entity.classic = nil
entity.lock = nil
entity:SetNetVar( "locked", false )
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_lock_unlocked"), client)
end
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_lock_itsworld"), client)
end
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_notstorage"), client)
end
end
}, "setcontainerlock")
nut.command.Register({
adminOnly = true,
syntax = "",
onRun = function(client, arguments)
local dat = {}
dat.start = client:GetShootPos()
dat.endpos = dat.start + client:GetAimVector() * 96
dat.filter = client
local trace = util.TraceLine(dat)
local entity = trace.Entity
if (entity and entity:IsValid()) then
if (entity:GetClass() == "nut_container") then
if entity.world then
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_world_container"), client)
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_user_container"), client)
end
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_notstorage"), client)
end
else
nut.util.Notify(PLUGIN:GetPluginLanguage("sr_notstorage"), client)
end
end
}, "isworldcontainer")
|
local skynet = require "skynet"
local mode = ...
local function dump(t, prefix)
for k,v in pairs(t) do
print(prefix, k, v)
if type(v) == "table" then
dump(v, prefix .. "." .. k)
end
end
end
if mode == "child" then
local datasheet = require "skynet.datasheet"
skynet.start(function()
local t = datasheet.query("foobar")
dump(t, "[CHILD]")
skynet.sleep(100)
skynet.exit()
end)
else
local builder = require "skynet.datasheet.builder"
local datasheet = require "skynet.datasheet"
skynet.start(function()
builder.new("foobar", {a = 1, b = 2 , c = {3} })
skynet.newservice(SERVICE_NAME, "child")
local t = datasheet.query "foobar"
local c = t.c
dump(t, "[1]")
builder.update("foobar", { b = 4, c = { 5 } })
print("sleep")
skynet.sleep(100)
dump(t, "[2]")
dump(c, "[2.c]")
builder.update("foobar", { a = 6, c = 7, d = 8 })
print("sleep")
skynet.sleep(100)
dump(t, "[3]")
end)
end
|
require('modules.revised') -- Modulo de OOP
require('maptile') -- Modulo que carrega os tiles
require('modules.comand') -- Modulo que le e executa os comandos
local graphics = require('modules.gra') -- Modulo dis graficos e a UI
local font = require('modules.font') -- Modulo da fonte
Button = require('modules.button')
Buttons = require('modules.buttons')
local Balls = require('modules.balls')
local Heroes = require('modules.heroes')
local Enemies = require('modules.enemies')
--local Comand = require('modules.Comand')
suit = require('suit') -- Modulo de layout grafica simples
local Timer = require('modules/hump.timer') -- Modulo com funçöes temporais
Gamestate = require('modules/hump.gamestate') -- Modulo com funções de estados para love
menu = require('modules/gamestates.menu')
static = require('modules/gamestates.static')
options = require('modules/gamestates.options')
game = require('modules/gamestates.game')
ui = require('modules/gamestates.ui')
--comand = require('modules/gamestates.comand')
function love.load(arg)
if arg[#arg] == "-debug" then require("mobdebug").start() end
Gamestate.registerEvents()
width, height = love.graphics.getDimensions()
halfwidth, halfheight = width/2, height/2
loadMap('maps/board1.lua') -- Carregando os tiles do tabuleiro
--comand = Comand:new() -- Criando uma instancia da analise de comandos
--comando1 = ""
command = {
"",
"",
""
}
Heroes.Iustitia:modifyAllCharacterStats{40,40,40,40,40,40,40,40}
--Heroes.Iustitia:modifyAxisPosition(4, 4)
Gamestate.switch(game)
end
function love.update(dt)
Timer.update(dt)
Gamestate.update(dt)
end
function love.quit()
end
|
-- EventHandler, made by Tocutoeltuco#0000
local initializingModule = true
local onEvent
local GAME_PAUSED = false
local CYCLE_DURATION = 3100
local RUNTIME_LIMIT = 45
local SCHEDULE = {
["PlayerBonusGrabbed"] = true,
["PlayerDataLoaded"] = true,
["PlayerRespawn"] = true,
["PlayerLeft"] = true,
["PlayerDied"] = true,
}
do
-- Runtime breaker
local cycleId = 0
local usedRuntime = 0
local stopingAt = 0
local checkingRuntime = false
local scheduled = {_count = 0, _pointer = 1}
local lastErrorLog = ''
-- Listeners
local events = {}
local function errorHandler(name, msg)
translatedMessage("emergencyMode_able")
chatMessage(name ..' - '.. msg)
setPlayerLimit(1)
room.requiredPlayers = 1000
genLobby()
for _, event in next, events do
event._count = 0
end
end
local function callListeners(evt, a, b, c, d, e, offset)
for index = offset, evt._count do
evt[index](a, b, c, d, e)
if not initializingModule and os_time() >= stopingAt then
if index < evt._count then
-- If this event didn't end, we need to resume from
-- where it has been left!
scheduled._count = scheduled._count + 1
scheduled[ scheduled._count ] = {evt, a, b, c, d, e, index + 1}
end
GAME_PAUSED = true
cycleId = cycleId + 2
if room.dayCounter > 0 then
translatedMessage("emergencyMode_pause")
else
translatedMessage("syncingGame")
end
setPlayerLimit(1)
for player in next, ROOM.playerList do
freezePlayer(player, true)
end
break
end
end
end
local function resumeModule()
local count = scheduled._count
local event
for index = scheduled._pointer, count do
event = scheduled[index]
callListeners(event[1], event[2], event[3], event[4], event[5], event[6], event[7])
if GAME_PAUSED then
if scheduled._count > count then
-- If a new event has been scheduled, it is this one.
-- It should be the first one to run on the next attempt to resume.
event[7] = scheduled[ scheduled._count ][7]
-- So we set it to start from here
scheduled._pointer = index
-- and remove the last item, since we don't want it to
-- execute twice!
scheduled._count = scheduled._count - 1
else
-- If no event has been scheduled, this one has successfully ended.
-- We just tell the next attempt to resume to start from the next one.
scheduled._pointer = index + 1
end
return
end
end
-- delete all the scheduled tables since they just use ram!
scheduled = {_count = 0, _pointer = 1}
translatedMessage("emergencyMode_resume")
setPlayerLimit(room.maxPlayers)
for player in next, ROOM.playerList do
freezePlayer(player, false)
end
end
local function registerEvent(name)
local evt = events[name]
local schedule = SCHEDULE[name]
local event
event = function(a, b, c, d, e)
if initializingModule then
local done, result = pcall(callListeners, evt, a, b, c, d, e, 1)
if not done and lastErrorLog ~= result then
chatMessage(name.. ' - '..result)
lastErrorLog = result
--return errorHandler(name, result)
end
end
if checkingRuntime then
if GAME_PAUSED then
if schedule then
scheduled._count = scheduled._count + 1
scheduled[ scheduled._count ] = {evt, a, b, c, d, e, 1}
end
return
end
-- Directly call callListeners since there's no need of
-- two error handlers
callListeners(evt, a, b, c, d, e, 1)
return
end
-- If we call any event inside this one, we don't need to
-- perform all the runtime breaker checks.
checkingRuntime = true
local start = os_time()
local thisCycle = floor(start / CYCLE_DURATION)
if thisCycle > cycleId then
-- new runtime cycle
cycleId = thisCycle
usedRuntime = 0
stopingAt = start + RUNTIME_LIMIT
-- if this was GAME_PAUSED, we need to resume!
if GAME_PAUSED then
GAME_PAUSED = false
checkingRuntime = false
local done, result = pcall(resumeModule)
if not done then
errorHandler("resuming", result)
return
end
usedRuntime = usedRuntime + os_time() - start
-- if resuming took a lot of runtime, we have to
-- pause again
if GAME_PAUSED then
if schedule then
scheduled._count = scheduled._count + 1
scheduled[ scheduled._count ] = {evt, a, b, c, d, e, 1}
end
return
end
end
else
stopingAt = start + RUNTIME_LIMIT - usedRuntime
end
if GAME_PAUSED then
if schedule then
scheduled._count = scheduled._count + 1
scheduled[ scheduled._count ] = {evt, a, b, c, d, e, 1}
end
checkingRuntime = false
return
end
local done, result = pcall(callListeners, evt, a, b, c, d, e, 1)
if not done and lastErrorLog ~= result then
chatMessage(name.. ' - '..result)
lastErrorLog = result
table_insert(room.errorLogs, 1, '<ch>['..os_date("%X")..']</ch> <v>'..name .. '</v> <j>-</j> <g>'.. result:gsub('Fofinhoppp#0000.lua', 'main'))
if #table_concat(room.errorLogs, '\n') >= 1900 then
room.errorLogs[#room.errorLogs] = nil
end
--return errorHandler(name, result)
end
checkingRuntime = false
usedRuntime = usedRuntime + os_time() - start
end
return event
end
function onEvent(name, callback)
local evt = events[name]
if not evt then
-- Unregistered event
evt = {_count = 0}
events[name] = evt
_G["event" .. name] = registerEvent(name)
end
-- Register callback
evt._count = evt._count + 1
evt[ evt._count ] = callback
end
end
|
function plugindef()
finaleplugin.Author = "Robert Patterson"
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Version = "1.0"
finaleplugin.Date = "June 18, 2021"
finaleplugin.CategoryTags = "Layout"
return "Load SMuFL Engraving Defaults", "Load SMuFL Engraving Defaults", "Loads engraving defaults for the current SMuFL Default Music Font."
end
local path = finale.FCString()
path:SetRunningLuaFolderPath()
package.path = package.path .. ";" .. path.LuaString .. "?.lua"
local luna = require("lunajson.lunajson")
local library = require("library.general_library")
function smufl_load_engraving_defaults()
local font_info = finale.FCFontInfo()
font_info:LoadFontPrefs(finale.FONTPREF_MUSIC)
local font_json_file = library.get_smufl_metadata_file(font_info)
if nil == font_json_file then
finenv.UI():AlertError("The current Default Music Font (" .. font_info.Name .. ") is not a SMuFL font, or else the json file with its engraving defaults is not installed.", "Default Music Font is not SMuFL")
return
end
local json = font_json_file:read("*all")
io.close(font_json_file)
local font_metadata = luna.decode(json)
local evpuPerSpace = 24.0
local efixPerEvpu = 64.0
local efixPerSpace = evpuPerSpace * efixPerEvpu
-- read our current doc options
local music_char_prefs = finale.FCMusicCharacterPrefs()
music_char_prefs:Load(1)
local distance_prefs = finale.FCDistancePrefs()
distance_prefs:Load(1)
local size_prefs = finale.FCSizePrefs()
size_prefs:Load(1)
local lyrics_prefs = finale.FCLyricsPrefs()
lyrics_prefs:Load(1)
local smart_shape_prefs = finale.FCSmartShapePrefs()
smart_shape_prefs:Load(1)
local repeat_prefs = finale.FCRepeatPrefs()
repeat_prefs:Load(1)
local tie_prefs = finale.FCTiePrefs()
tie_prefs:Load(1)
local tuplet_prefs = finale.FCTupletPrefs()
tuplet_prefs:Load(1)
-- Beam spacing has to be calculated in terms of beam thickness, because the json spec
-- calls for inner distance whereas Finale is top edge to top edge. So hold the value
local beamSpacingFound = 0
local beamWidthFound = math.floor(size_prefs.BeamThickness/efixPerEvpu + 0.5)
-- define actions for each of the fields of font_info.engravingDefaults
local action = {
staffLineThickness = function(v) size_prefs.StaffLineThickness = math.floor(efixPerSpace*v + 0.5) end,
stemThickness = function(v) size_prefs.StemLineThickness = math.floor(efixPerSpace*v + 0.5) end,
beamThickness = function(v)
size_prefs.BeamThickness = math.floor(efixPerSpace*v + 0.5)
beamWidthFound = math.floor(evpuPerSpace*v + 0.5)
end,
beamSpacing = function(v) beamSpacingFound = math.floor(evpuPerSpace*v + 0.5) end,
legerLineThickness = function(v) size_prefs.LedgerLineThickness = math.floor(efixPerSpace*v + 0.5) end,
legerLineExtension = function(v)
size_prefs.LedgerLeftHalf = math.floor(evpuPerSpace*v + 0.5)
size_prefs.LedgerRightHalf = size_prefs.LedgerLeftHalf
size_prefs.LedgerLeftRestHalf = size_prefs.LedgerLeftHalf
size_prefs.LedgerRightRestHalf = size_prefs.LedgerLeftHalf
end,
slurEndpointThickness = function(v)
size_prefs.ShapeSlurTipWidth = math.floor(evpuPerSpace*v*10000.0 +0.5)
smart_shape_prefs.SlurTipWidth = math.floor(evpuPerSpace*v*10000.0 +0.5)
end,
slurMidpointThickness = function(v)
smart_shape_prefs.SlurThicknessVerticalLeft = math.floor(evpuPerSpace*v +0.5)
smart_shape_prefs.SlurThicknessVerticalRight = math.floor(evpuPerSpace*v +0.5)
end,
tieEndpointThickness = function(v) tie_prefs.TipWidth = math.floor(evpuPerSpace*v*10000.0 +0.5) end,
tieMidpointThickness = function(v)
tie_prefs.ThicknessLeft = math.floor(evpuPerSpace*v +0.5)
tie_prefs.ThicknessRight = math.floor(evpuPerSpace*v +0.5)
end,
thinBarlineThickness = function(v)
size_prefs.ThinBarlineThickness = math.floor(efixPerSpace*v + 0.5)
repeat_prefs.ThinLineThickness = math.floor(efixPerSpace*v + 0.5)
end,
thickBarlineThickness = function(v)
size_prefs.HeavyBarlineThickness = math.floor(efixPerSpace*v + 0.5)
repeat_prefs.HeavyLineThickness = math.floor(efixPerSpace*v + 0.5)
end,
dashedBarlineThickness = function(v) size_prefs.ThinBarlineThickness = math.floor(efixPerSpace*v + 0.5) end,
dashedBarlineDashLength = function(v) size_prefs.BarlineDashLength = math.floor(evpuPerSpace*v + 0.5) end,
dashedBarlineGapLength = function(v) distance_prefs.BarlineDashSpace = math.floor(evpuPerSpace*v + 0.5)end,
barlineSeparation = function(v) distance_prefs.BarlineDoubleSpace = math.floor(efixPerSpace*v + 0.5) end,
thinThickBarlineSeparation = function(v)
distance_prefs.BarlineFinalSpace = math.floor(efixPerSpace*v + 0.5)
repeat_prefs.SpaceBetweenLines = math.floor(efixPerSpace*v + 0.5)
end,
repeatBarlineDotSeparation = function(v)
local text_met = finale.FCTextMetrics()
text_met:LoadSymbol(music_char_prefs.SymbolForwardRepeatDot, font_info, 100)
local newVal = evpuPerSpace*v + text_met:CalcWidthEVPUs()
repeat_prefs:SetForwardSpace(math.floor(newVal + 0.5))
repeat_prefs:SetBackwardSpace(math.floor(newVal + 0.5))
end,
bracketThickness = function(v) end, -- Not supported. (Finale doesn't seem to have this pref setting.)
subBracketThickness = function(v) end, -- Not supported. (Finale doesn't seem to have this pref setting.)
hairpinThickness = function(v) smart_shape_prefs.HairpinLineWidth = math.floor(efixPerSpace*v + 0.5) end,
octaveLineThickness = function(v) smart_shape_prefs.LineWidth = math.floor(efixPerSpace*v + 0.5) end,
pedalLineThickness = function(v) end, -- To Do: requires finding and editing Custom Lines
repeatEndingLineThickness = function(v) repeat_prefs.EndingLineThickness = math.floor(efixPerSpace*v + 0.5) end,
arrowShaftThickness = function(v) end, -- To Do: requires finding and editing Custom Lines
lyricLineThickness = function(v) lyrics_prefs.WordExtLineThickness = math.floor(efixPerSpace*v + 0.5) end,
textEnclosureThickness = function(v)
size_prefs.EnclosureThickness = math.floor(efixPerSpace*v + 0.5)
local expression_defs = finale.FCTextExpressionDefs()
expression_defs:LoadAll()
for def in each(expression_defs) do
if def.UseEnclosure then
local enclosure = def:CreateEnclosure()
if ( nil ~= enclosure) then
enclosure.LineWidth = size_prefs.EnclosureThickness
enclosure:Save()
end
end
end
local numbering_regions = finale.FCMeasureNumberRegions()
numbering_regions:LoadAll()
for region in each(numbering_regions) do
local got1 = false
for _, for_parts in pairs({false, true}) do
if region:GetUseEnclosureStart(for_parts) then
local enc_start = region:GetEnclosureStart(for_parts)
if nil ~= enc_start then
enc_start.LineWidth = size_prefs.EnclosureThickness
got1 = true
end
end
if region:GetUseEnclosureMultiple(for_parts) then
local enc_multiple = region:GetEnclosureMultiple(for_parts)
if nil ~= enc_multiple then
enc_multiple.LineWidth = size_prefs.EnclosureThickness
got1 = true
end
end
end
if got1 then
region:Save()
end
end
local separate_numbers = finale.FCSeparateMeasureNumbers()
separate_numbers:LoadAll()
for sepnum in each(separate_numbers) do
if sepnum.UseEnclosure then
local enc_sep = sepnum:GetEnclosure()
if nil ~= enc_sep then
enc_sep.LineWidth = size_prefs.EnclosureThickness
end
sepnum:Save()
end
end
end,
tupletBracketThickness = function(v)
tuplet_prefs.BracketThickness = math.floor(efixPerSpace*v + 0.5)
end,
hBarThickness = function(v) end -- Not supported. (Can't edit FCShape in Lua. Hard even in PDK.)
}
-- apply each action from the json file
for k, v in pairs(font_metadata.engravingDefaults) do
local action_function = action[k]
if nil ~= action_function then
action_function(tonumber(v))
end
end
if 0 ~= beamSpacingFound then
distance_prefs.SecondaryBeamSpace = beamSpacingFound + beamWidthFound
-- Currently, the json files for Finale measure beam separation from top edge to top edge
-- whereas the spec specifies that it be only the distance between the inner edges. This will
-- probably be corrected at some point, but for now hard-code around it. Hopefully this code will
-- get a Finale version check at some point.
local finale_prefix = "Finale "
if finale_prefix == font_info.Name:sub(1, #finale_prefix) then
distance_prefs.SecondaryBeamSpace = beamSpacingFound
end
end
-- save new preferences
distance_prefs:Save()
size_prefs:Save()
lyrics_prefs:Save()
smart_shape_prefs:Save()
repeat_prefs:Save()
tie_prefs:Save()
tuplet_prefs:Save()
end
smufl_load_engraving_defaults()
|
--[[
Copyright (c) 2015 深圳市辉游科技有限公司.
--]]
local SignUpType = require('consts').SignUpType
local SignUpPlugin = {}
local AccountInfo = require('AccountInfo')
function SignUpPlugin.bind(theClass)
local function handleSignUpResponse(gameConn, signUpParams, respData, callback)
local this = gameConn
dump(respData, '[handleSignUpResponse][auth.userHandler.signUp] response')
if respData.err then
-- sign in failed
callback(false, respData)
return
end
local userInfo = respData.user
local serverInfo = respData.server
--ddz.updateUserSession(respData)
AccountInfo.setCurrentUser(respData)
-- ddz.GlobalSettings.userInfo = userInfo
-- ddz.GlobalSettings.session.userId = userInfo.userId
-- ddz.GlobalSettings.session.authToken = userInfo.authToken
-- ddz.GlobalSettings.session.sessionToken = respData.sessionToken
-- ddz.GlobalSettings.serverInfo = table.dup(respData.server)
-- userInfo.sessionToken = respData.sessionToken
-- ddz.saveSessionInfo(userInfo)
callback(true, userInfo, serverInfo)
if not serverInfo then
this:emit('connected')
this:emit('connectionReady', this, this.pomeloClient, respData)
this:emit('selfConnectionOk')
end
end
function theClass:signUp(callback)
local this = self
local signUpParams = {}
signUpParams.appVersion = ddz.GlobalSettings.appInfo.appVersion
signUpParams.resVersion = ddz.GlobalSettings.appInfo.resVersion
signUpParams.appid = ddz.GlobalSettings.appInfo.appid
signUpParams.handsetInfo = ddz.GlobalSettings.handsetInfo
this:request('auth.userHandler.signUp', signUpParams, function(data)
handleSignUpResponse(this, signUpParams, data, callback)
end)
end
end
return SignUpPlugin
|
local Com = include("com", ...)
local ComBody = class("ComBody", Com)
function ComBody:ctor()
end
function ComBody:match(req, res)
local content_type = req.headers['content-type']
if type(content_type) ~= 'string' then
return
end
local ret = content_type:find('application/x%-www%-form%-urlencoded')
if ret and type(req.rawbody) == 'string' then
local tmp = req.rawbody:urldecode()
local items = tmp:split("&")
local body = {}
for _,item in ipairs(items) do
tmp = item:split("=")
body[tmp[1]] = tmp[2] or ""
end
req.body = body
end
end
return ComBody
|
-----------------------------------
-- Area: Waughroon Shrine
-- Mob: Metsanneitsyt
-- BCNM: Grove Guardians
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onMobInitialize(mob)
mob:setMod(tpz.mod.SLEEPRES, 50)
end
function onMobDeath(mob, player, isKiller)
end
|
local a=require("cc.expect")local b=require("am.ui.base").BaseObject;local c=require("am.core")local d=require("am.log")local e=require("am.event")local f=require("am.peripheral")local g=require("am.progress")local h={}local i=b:extend("am.c.CollectJob")h.CollectJob=i;function i:init(j,k,l)a.expect(1,j,"string")a.expect(2,k,"string")a.expect(3,l,"number","nil")self.from=j;self.to=k;self.interval=l or 60;return self end;local m={}m.job={name="collect.job",default=nil}h.s=c.makeSettingWrapper(m)local n=e.c.RunType.Running;local o=true;local p=nil;local q=300;local r=""local function s()e.CollectProgressEvent(r,f.getRates()):send()end;local function t(u)r=u;s()end;local function v()local w=h.s.job.get()local j=peripheral.wrap(w.from)if j==nil then error("Could not locate from inventory")end;local k=peripheral.wrap(w.to)if k==nil then error("Could not locate to inventory")end;return j,k end;local function x()f.setStartTime()e.TurtleStartedEvent():send()local w=h.s.job.get()local j,y=v()while n==e.c.RunType.Running or n==e.c.RunType.Paused do t("")local z=5;local A=10;if n==e.c.RunType.Running then local B={}for C,D in pairs(j.list())do D=j.getItemDetail(C)if not f.pullItem(w.from,w.to,D.count,nil,C)then e.ErrorEvent("Could not move item"):send()break end;B[#B+1]=D end;if#B>0 then f.addItems(B)s()z=w.interval;A=10 end end;local E=n;while z>0 and n==E do z=z-0.5;A=A-0.5;if A<=0 then e.PingEvent():send()A=10 end;sleep(0.5)end;if E==e.c.RunType.Running and n==e.c.RunType.Paused then e.TurtlePausedEvent():send()end end;e.TurtleExitEvent(true):send()sleep(5)o=false end;local function F()p=os.startTimer(q)while o do local G=os.startTimer(3)local H,I=c.cleanEventArgs(os.pullEvent())if H=="timer"then if I[1]==p then f.calculateRates()s()p=os.startTimer(q)end elseif H==e.c.Event.Common.error then t(string.format("error:%s",I[1].error))elseif H==e.c.Event.Turtle.exited then t("error:Stopped")n=e.c.RunType.Halted elseif H==e.c.Event.Turtle.request_pause then n=e.c.RunType.Paused;d.info("Pausing...")elseif H==e.c.Event.Turtle.request_halt then n=e.c.RunType.Halted;d.info("Halting...")elseif H==e.c.Event.Turtle.request_continue then n=e.c.RunType.Running;d.info("Unpausing...")e.TurtleStartedEvent():send()elseif H==e.c.Event.Turtle.paused then t("warning:Paused")elseif H==e.c.Event.Progress.collect then g.print(e.getComputer(),I[1])end;g.handle(e.getComputer(),H,I)os.cancelTimer(G)end end;local function J()e.initNetwork()if not e.online then return end;while o do local K=e.receive()if K~=nil then local L=os.getComputerID()if K.name==e.c.Event.Turtle.request_halt and K.event.id==L then n=e.c.RunType.Halted;d.info("Halting...")elseif K.name==e.c.Event.Turtle.request_pause and K.event.id==L then n=e.c.RunType.Paused;d.info("Pausing...")elseif K.name==e.c.Event.Turtle.request_continue and K.event.id==L then n=e.c.RunType.Running;d.info("Unpausing...")e.TurtleStartedEvent():send()end end end end;local function M()d.s.print.set(false)parallel.waitForAll(x,F,J)d.s.print.set(true)h.s.job.set(nil)term.clear()end;h.CollectJob=i;h.collect=M;return h
|
local gamepaused = {}
local game_objects = {}
bungee_font = love.graphics.newFont(
"/fonts/Bungee_Inline/BungeeInline-Regular.ttf", 40 )
function gamepaused.enter( prev_state, ... )
game_objects = ...
end
function gamepaused.update( dt )
end
function gamepaused.draw()
for _, obj in pairs( game_objects ) do
if type(obj) == "table" and obj.draw then
obj.draw()
end
end
gamepaused.cast_shadow()
local oldfont = love.graphics.getFont()
love.graphics.setFont( bungee_font )
love.graphics.printf( "Game Paused...",
108, 110, 400, "center" )
love.graphics.setFont( oldfont )
end
function gamepaused.cast_shadow()
local r, g, b, a = love.graphics.getColor( )
love.graphics.setColor( 0.04, 0.04, 0.04, 0.4 )
love.graphics.rectangle("fill",
0,
0,
love.graphics.getWidth(),
love.graphics.getHeight() )
love.graphics.setColor( r, g, b, a )
end
function gamepaused.keyreleased( key, code )
if key == "return" then
gamestates.set_state( "game" )
elseif key == 'escape' then
love.event.quit()
end
end
function gamepaused.mousereleased( x, y, button, istouch )
if button == 'l' or button == 1 then
gamestates.set_state( "game" )
elseif button == 'r' or button == 2 then
love.event.quit()
end
end
function gamepaused.exit()
game_objects = nil
end
return gamepaused
|
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
--
-- This file is compatible with Lua 5.3
local class = require("class")
require("kaitaistruct")
local str_decode = require("string_decode")
local enum = require("enum")
local stringstream = require("string_stream")
DoomWad = class.class(KaitaiStruct)
function DoomWad:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad:_read()
self.magic = str_decode.decode(self._io:read_bytes(4), "ASCII")
self.num_index_entries = self._io:read_s4le()
self.index_offset = self._io:read_s4le()
end
DoomWad.property.index = {}
function DoomWad.property.index:get()
if self._m_index ~= nil then
return self._m_index
end
local _pos = self._io:pos()
self._io:seek(self.index_offset)
self._m_index = {}
for i = 0, self.num_index_entries - 1 do
self._m_index[i + 1] = DoomWad.IndexEntry(self._io, self, self._root)
end
self._io:seek(_pos)
return self._m_index
end
--
-- Number of entries in the lump index.
--
-- Offset to the start of the index.
DoomWad.Sectors = class.class(KaitaiStruct)
function DoomWad.Sectors:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Sectors:_read()
self.entries = {}
local i = 0
while not self._io:is_eof() do
self.entries[i + 1] = DoomWad.Sector(self._io, self, self._root)
i = i + 1
end
end
DoomWad.Vertex = class.class(KaitaiStruct)
function DoomWad.Vertex:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Vertex:_read()
self.x = self._io:read_s2le()
self.y = self._io:read_s2le()
end
--
-- Used for TEXTURE1 and TEXTURE2 lumps, which designate how to
-- combine wall patches to make wall textures. This essentially
-- provides a very simple form of image compression, allowing
-- certain elements ("patches") to be reused / recombined on
-- different textures for more variety in the game.
-- See also: Source (http://doom.wikia.com/wiki/TEXTURE1)
DoomWad.Texture12 = class.class(KaitaiStruct)
function DoomWad.Texture12:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Texture12:_read()
self.num_textures = self._io:read_s4le()
self.textures = {}
for i = 0, self.num_textures - 1 do
self.textures[i + 1] = DoomWad.Texture12.TextureIndex(self._io, self, self._root)
end
end
--
-- Number of wall textures.
DoomWad.Texture12.TextureIndex = class.class(KaitaiStruct)
function DoomWad.Texture12.TextureIndex:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Texture12.TextureIndex:_read()
self.offset = self._io:read_s4le()
end
DoomWad.Texture12.TextureIndex.property.body = {}
function DoomWad.Texture12.TextureIndex.property.body:get()
if self._m_body ~= nil then
return self._m_body
end
local _pos = self._io:pos()
self._io:seek(self.offset)
self._m_body = DoomWad.Texture12.TextureBody(self._io, self, self._root)
self._io:seek(_pos)
return self._m_body
end
DoomWad.Texture12.TextureBody = class.class(KaitaiStruct)
function DoomWad.Texture12.TextureBody:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Texture12.TextureBody:_read()
self.name = str_decode.decode(KaitaiStream.bytes_strip_right(self._io:read_bytes(8), 0), "ASCII")
self.masked = self._io:read_u4le()
self.width = self._io:read_u2le()
self.height = self._io:read_u2le()
self.column_directory = self._io:read_u4le()
self.num_patches = self._io:read_u2le()
self.patches = {}
for i = 0, self.num_patches - 1 do
self.patches[i + 1] = DoomWad.Texture12.Patch(self._io, self, self._root)
end
end
--
-- Name of a texture, only `A-Z`, `0-9`, `[]_-` are valid.
--
-- Obsolete, ignored by all DOOM versions.
--
-- Number of patches that are used in a texture.
DoomWad.Texture12.Patch = class.class(KaitaiStruct)
function DoomWad.Texture12.Patch:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Texture12.Patch:_read()
self.origin_x = self._io:read_s2le()
self.origin_y = self._io:read_s2le()
self.patch_id = self._io:read_u2le()
self.step_dir = self._io:read_u2le()
self.colormap = self._io:read_u2le()
end
--
-- X offset to draw a patch at (pixels from left boundary of a texture).
--
-- Y offset to draw a patch at (pixels from upper boundary of a texture).
--
-- Identifier of a patch (as listed in PNAMES lump) to draw.
DoomWad.Linedef = class.class(KaitaiStruct)
function DoomWad.Linedef:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Linedef:_read()
self.vertex_start_idx = self._io:read_u2le()
self.vertex_end_idx = self._io:read_u2le()
self.flags = self._io:read_u2le()
self.line_type = self._io:read_u2le()
self.sector_tag = self._io:read_u2le()
self.sidedef_right_idx = self._io:read_u2le()
self.sidedef_left_idx = self._io:read_u2le()
end
--
-- See also: Source (http://doom.wikia.com/wiki/PNAMES)
DoomWad.Pnames = class.class(KaitaiStruct)
function DoomWad.Pnames:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Pnames:_read()
self.num_patches = self._io:read_u4le()
self.names = {}
for i = 0, self.num_patches - 1 do
self.names[i + 1] = str_decode.decode(KaitaiStream.bytes_strip_right(self._io:read_bytes(8), 0), "ASCII")
end
end
--
-- Number of patches registered in this global game directory.
DoomWad.Thing = class.class(KaitaiStruct)
function DoomWad.Thing:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Thing:_read()
self.x = self._io:read_s2le()
self.y = self._io:read_s2le()
self.angle = self._io:read_u2le()
self.type = self._io:read_u2le()
self.flags = self._io:read_u2le()
end
DoomWad.Sector = class.class(KaitaiStruct)
DoomWad.Sector.SpecialSector = enum.Enum {
normal = 0,
d_light_flicker = 1,
d_light_strobe_fast = 2,
d_light_strobe_slow = 3,
d_light_strobe_hurt = 4,
d_damage_hellslime = 5,
d_damage_nukage = 7,
d_light_glow = 8,
secret = 9,
d_sector_door_close_in_30 = 10,
d_damage_end = 11,
d_light_strobe_slow_sync = 12,
d_light_strobe_fast_sync = 13,
d_sector_door_raise_in_5_mins = 14,
d_friction_low = 15,
d_damage_super_hellslime = 16,
d_light_fire_flicker = 17,
d_damage_lava_wimpy = 18,
d_damage_lava_hefty = 19,
d_scroll_east_lava_damage = 20,
light_phased = 21,
light_sequence_start = 22,
light_sequence_special1 = 23,
light_sequence_special2 = 24,
}
function DoomWad.Sector:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Sector:_read()
self.floor_z = self._io:read_s2le()
self.ceil_z = self._io:read_s2le()
self.floor_flat = str_decode.decode(self._io:read_bytes(8), "ASCII")
self.ceil_flat = str_decode.decode(self._io:read_bytes(8), "ASCII")
self.light = self._io:read_s2le()
self.special_type = DoomWad.Sector.SpecialSector(self._io:read_u2le())
self.tag = self._io:read_u2le()
end
--
-- Light level of the sector [0..255]. Original engine uses
-- COLORMAP to render lighting, so only 32 actual levels are
-- available (i.e. 0..7, 8..15, etc).
--
-- Tag number. When the linedef with the same tag number is
-- activated, some effect will be triggered in this sector.
DoomWad.Vertexes = class.class(KaitaiStruct)
function DoomWad.Vertexes:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Vertexes:_read()
self.entries = {}
local i = 0
while not self._io:is_eof() do
self.entries[i + 1] = DoomWad.Vertex(self._io, self, self._root)
i = i + 1
end
end
DoomWad.Sidedef = class.class(KaitaiStruct)
function DoomWad.Sidedef:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Sidedef:_read()
self.offset_x = self._io:read_s2le()
self.offset_y = self._io:read_s2le()
self.upper_texture_name = str_decode.decode(self._io:read_bytes(8), "ASCII")
self.lower_texture_name = str_decode.decode(self._io:read_bytes(8), "ASCII")
self.normal_texture_name = str_decode.decode(self._io:read_bytes(8), "ASCII")
self.sector_id = self._io:read_s2le()
end
DoomWad.Things = class.class(KaitaiStruct)
function DoomWad.Things:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Things:_read()
self.entries = {}
local i = 0
while not self._io:is_eof() do
self.entries[i + 1] = DoomWad.Thing(self._io, self, self._root)
i = i + 1
end
end
DoomWad.Linedefs = class.class(KaitaiStruct)
function DoomWad.Linedefs:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Linedefs:_read()
self.entries = {}
local i = 0
while not self._io:is_eof() do
self.entries[i + 1] = DoomWad.Linedef(self._io, self, self._root)
i = i + 1
end
end
DoomWad.IndexEntry = class.class(KaitaiStruct)
function DoomWad.IndexEntry:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.IndexEntry:_read()
self.offset = self._io:read_s4le()
self.size = self._io:read_s4le()
self.name = str_decode.decode(KaitaiStream.bytes_strip_right(self._io:read_bytes(8), 0), "ASCII")
end
DoomWad.IndexEntry.property.contents = {}
function DoomWad.IndexEntry.property.contents:get()
if self._m_contents ~= nil then
return self._m_contents
end
local _io = self._root._io
local _pos = _io:pos()
_io:seek(self.offset)
local _on = self.name
if _on == "SECTORS" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Sectors(_io, self, self._root)
elseif _on == "TEXTURE1" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Texture12(_io, self, self._root)
elseif _on == "VERTEXES" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Vertexes(_io, self, self._root)
elseif _on == "BLOCKMAP" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Blockmap(_io, self, self._root)
elseif _on == "PNAMES" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Pnames(_io, self, self._root)
elseif _on == "TEXTURE2" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Texture12(_io, self, self._root)
elseif _on == "THINGS" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Things(_io, self, self._root)
elseif _on == "LINEDEFS" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Linedefs(_io, self, self._root)
elseif _on == "SIDEDEFS" then
self._raw__m_contents = _io:read_bytes(self.size)
local _io = KaitaiStream(stringstream(self._raw__m_contents))
self._m_contents = DoomWad.Sidedefs(_io, self, self._root)
else
self._m_contents = _io:read_bytes(self.size)
end
_io:seek(_pos)
return self._m_contents
end
DoomWad.Sidedefs = class.class(KaitaiStruct)
function DoomWad.Sidedefs:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Sidedefs:_read()
self.entries = {}
local i = 0
while not self._io:is_eof() do
self.entries[i + 1] = DoomWad.Sidedef(self._io, self, self._root)
i = i + 1
end
end
DoomWad.Blockmap = class.class(KaitaiStruct)
function DoomWad.Blockmap:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Blockmap:_read()
self.origin_x = self._io:read_s2le()
self.origin_y = self._io:read_s2le()
self.num_cols = self._io:read_s2le()
self.num_rows = self._io:read_s2le()
self.linedefs_in_block = {}
for i = 0, (self.num_cols * self.num_rows) - 1 do
self.linedefs_in_block[i + 1] = DoomWad.Blockmap.Blocklist(self._io, self, self._root)
end
end
--
-- Grid origin, X coord.
--
-- Grid origin, Y coord.
--
-- Number of columns.
--
-- Number of rows.
--
-- Lists of linedefs for every block.
DoomWad.Blockmap.Blocklist = class.class(KaitaiStruct)
function DoomWad.Blockmap.Blocklist:_init(io, parent, root)
KaitaiStruct._init(self, io)
self._parent = parent
self._root = root or self
self:_read()
end
function DoomWad.Blockmap.Blocklist:_read()
self.offset = self._io:read_u2le()
end
--
-- List of linedefs found in this block.
DoomWad.Blockmap.Blocklist.property.linedefs = {}
function DoomWad.Blockmap.Blocklist.property.linedefs:get()
if self._m_linedefs ~= nil then
return self._m_linedefs
end
local _pos = self._io:pos()
self._io:seek((self.offset * 2))
self._m_linedefs = {}
local i = 0
while true do
_ = self._io:read_s2le()
self._m_linedefs[i + 1] = _
if _ == -1 then
break
end
i = i + 1
end
self._io:seek(_pos)
return self._m_linedefs
end
--
-- Offset to the list of linedefs.
|
local NetLib = {}
local socket = require "socket"
local HOST = "208.67.222.222"
local PORT = 53
local TIMEOUT = 1
function NetLib.hasConnection()
local hasConnection = true
local tcp = assert(socket.tcp())
tcp:settimeout(TIMEOUT, 't')
local receive, errorMessage = tcp:connect(HOST, PORT)
if not receive then
hasConnection = false
end
tcp:close()
tcp = nil
return hasConnection
end
return NetLib
|
local table = require("__flib__.table")
local constants = {}
constants.marker_entry = {
[0] = 0,
[1] = 1,
[4] = 2,
[5] = 3,
[16] = 4,
[17] = 5,
[20] = 6,
[21] = 7,
[64] = 8,
[65] = 9,
[68] = 10,
[69] = 11,
[80] = 12,
[81] = 13,
[84] = 14,
[85] = 15,
}
constants.selection_types = table.invert{
"transport-belt",
"underground-belt",
"splitter",
"loader",
"loader-1x1",
"linked-belt",
}
return constants
|
RecipeCategoryEnum = RecipeCategoryEnum or {}
RecipeCategoryEnum.advancedCrafting = "advanced-crafting"
RecipeCategoryEnum.basicCrafting = "basic-crafting"
RecipeCategoryEnum.centrifuging = "centrifuging"
RecipeCategoryEnum.chemistry = "chemistry"
RecipeCategoryEnum.crafting = "crafting"
RecipeCategoryEnum.craftingWithFluid = "crafting-with-fluid"
RecipeCategoryEnum.oilProcessing = "oil-processing"
RecipeCategoryEnum.rocketBuilding = "rocket-building"
RecipeCategoryEnum.smelting = "smelting"
|
------------------------------------------------------------
-- Account utils is a util namespace for wrapping account --
-- specific actions into clean and easilly read funcs. --
------------------------------------------------------------
local A = {}
function A.setupNewAccount( account, dm )
account:setInterp( ACCOUNT_INTERP )
dm:AASData( d.account )
dm:setupInterp( d.account )
account:save()
end;
function A.connectAccount( account, dm )
dm:AASData( account )
dm:setupInterp( account )
end;
function A.handleTakeOver( account, d, dm, old_dm )
if( not old_dm.socket ) then
dm.socket.connection:send( "Reconnecting...\r\n" )
old_dm.socket = dm.socket;
-- essentially, now we just need to "cleanUpNewConnect" ...
dm:remData( d ) -- DM will delete itself if it has no data, and it should
d:delete()
else
-- replace the old socket and close
DataManager.by_socket[old_dm.socket] = nil
old_dm.socket.connection:send( "Your account is being taken over by someone else logging into it...\r\n" )
old_dm.socket:close()
--swap in the new socket
old_dm.socket = dm.socket
DataManager.by_socket[dm.socket] = old_dm
dm.socket.connection:send( "Taking over an already logged in account!\r\n" )
-- essentially, now we just need to "cleanUpNewConnect" ...
dm:remData( d ) -- DM will delete itself if it has no data, and it should
d:delete()
end
end;
return A
|
CaveBot.Extensions.Supply = {}
local ui
-- first function called, here you should setup your UI
CaveBot.Extensions.Supply.setup = function()
--ui = UI.createWidget('SupplyItemList')
--local widget = UI.createWidget('SupplyItem', ui.list)
--widget.item.onItemChange = function(newItem)
--widget.fields.min.onTextChange = function(newText)
-- make it similar to UI.Container, so if there are no free slots, add another one, keep min 4 slots, check if value min/max is number after edit
end
-- called when cavebot config changes, configData is a table but it can be nil
CaveBot.Extensions.Supply.onConfigChange = function(configName, isEnabled, configData)
if not configData then return end
end
-- called when cavebot is saving config, should return table or nil
CaveBot.Extensions.Supply.onSave = function()
return {}
end
-- bellow add you custom functions
-- this function can be used in cavebot function waypoint as: return Supply.run(retries, prev)
-- there are 2 useful parameters - retries (number) and prev (true/false), check actions.lua to learn more
CaveBot.Extensions.Supply.run = function(retries, prev)
return true
end
|
--[[
h[t] = tanh(W[x->h]x[t] + W[hr->h]h[t-1] + b[1->h]) (1)
]]
function srnn.units.getRNNUnit(inputSize, outputSize, layers, dropout)
local input -- the input of a step
local inputs = {} -- real input to this step
local init_outs = {} -- previous output for each layer
local outputs = {} -- outputs generated for each layer
-- start build step module
local isize = inputSize -- for the first layer, the dimension of input is inputSize, otherwise it is outputSize
for i = 1, layers do
-- set up input for layer i
if i == 1 then
if dropout and dropout > 0 and dropout < 1 then
input = nn.Dropout(dropout)()
else
input = nn.Identity()()
end
table.insert(inputs, input)
elseif dropout and dropout > 0 and dropout < 1 then
input = nn.Dropout(dropout)(input)
end
-- set up previous output and cell for layer i
local prev_output = nn.Identity()()
table.insert(init_outs, prev_output)
-- concat input and previous output
local io_concat = nn.JoinTable(2, 2)({input, prev_output})
-- generate a new output
local next_out = nn.Tanh()(nn.Linear(isize + outputSize, outputSize)(io_concat))
table.insert(outputs, next_out)
-- update input for the next layer
input = next_out
isize = outputSize
end
-- update inputs and outputs to generate a step module
-- order: (input, )(init_)outputs and (init_)cells
for _, unit in ipairs(init_outs) do
table.insert(inputs, unit)
end
-- generate a step module
return nn.gModule(inputs, outputs)
end
|
local conf = {}
-- 总开关,关闭之后就无法使用自己配置的牌
conf.isUserMake = true
-- 庄家
conf.iMianPlayer = 0
-- 是否开启个人配牌
conf.isOpen1 = true
conf.isOpen2 = true
conf.isOpen3 = true
-- {
-- 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 120,
-- 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 220,
-- 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 320,
-- 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 420,
-- 124, 125
-- }
-- 牌数组
conf.card1 = {103, 103, 103, 103, 104, 104,104, 104, 105, 105, 105, 105}
conf.card2 = {}
conf.card3 = {}
-- 底牌
conf.cardMain = {}
print("---------------", conf)
dump(conf)
return conf
|
local __ENV_COUNT = 0; -- Remove local for weird bug
__ENVIRONMENTS = {};
function LuaCore.CreateNewEnv(env)
local ENV = env or {};
if env == nil then
ENV["__ENV_ID"] = __ENV_COUNT;
ENV["__ENV_ENABLED"] = true;
ENV["__TRIGGERS"] = {};
setmetatable(ENV, {__index=_G});
__ENVIRONMENTS[__ENV_COUNT] = ENV;
__ENV_COUNT = __ENV_COUNT + 1;
end
return __ENV_COUNT - 1;
end
function LuaCore.ExecuteFileOnEnv(file, envIndex)
assert(loadfile(file, "t", __ENVIRONMENTS[envIndex]))();
--print("CALL RESULT : ", f, err);
--print("Call file : ", file, " is over");
end
function LuaCore.ExecuteStringOnEnv(code, envIndex)
assert(load(code, nil, "t", __ENVIRONMENTS[envIndex]))();
end
function LuaCore.EnvFuncInjector(env, triggerName)
_ENV = __ENVIRONMENTS[env];
local func = _ENV["__TRIGGERS"][triggerName].callback;
if type(func) == "string" then
_ENV["__TRIGGERS"][triggerName].callback = assert(load("return " .. func, nil, "t", _ENV))();
func = _ENV["__TRIGGERS"][triggerName].callback;
end
LuaCore.FuncInjector(_ENV, func, triggerName);
_ENV = _G;
end
|
-- game constants
local gameConst =
{
---- buildings
Wall = {toughness=50, materialCost = 1, workCost = 3 , repairRequestLimitMultip = 0.75},
Gun = {toughness=1, materialCost = 10, workCost = 10, firePeriod = 7000, misilesDamage = 5, chargingWorkCost = 10},
Keep = { materialCost = 0, workCost = 0 },
HomeKeep = {toughness=50, materialCost = 0, workCost = 0 },
EnemyKeep = { materialCost = 0, workCost = 0, firePeriod = 5000, misilesDamage = 1 },
DestroyedKeep = {toughness=1, conversionWorkCost = 20, regenerationTime = 45000},
BuildingSite = {toughness=1 },
---- cluster power categories
-- some properties are characterized by normal distribution where:
-- mean - mean value
-- sigma - standart deviation, follows 68-95-99.7 rule also called the 3-sigma rule
clustersPowerCategories = {
{damage = 1, keepToughness = {mean=15, sigma =1}, firePeriod = 8000 }, -- 1
{damage = 2, keepToughness = {mean=20, sigma =2}, firePeriod = 6000 }, -- 2
{damage = {mean=3, sigma =0.5, min =2, max =4}, keepToughness = {mean=30, sigma =3}, firePeriod = {mean = 6000, sigma = 500} }, -- 3
{damage = {mean=3, sigma =1 , min =3, max =6}, keepToughness = {mean=40, sigma =4}, firePeriod = {mean = 5000, sigma = 500}}, -- 4
{damage = {mean=4, sigma =1 , min =3, max =8}, keepToughness = {mean=50, sigma =5}, firePeriod = {mean = 4000, sigma = 500}}, -- 5
},
--- treasure categories
treasures = {
empty= { workCost = 20, minPowerCategory = 1, params = {}},
movementBoost= { workCost = 40, minPowerCategory = 3, params = {multiplier = 1.3}},
wallBoost = { workCost = 30, minPowerCategory = 2, params = {multiplier = 1.5}},
workBoost = { workCost = 30, minPowerCategory = 2, params = {multiplier = 0.75}},
gunBoost = { workCost = 30, minPowerCategory = 2, params = {multiplier = 1.6}},
newMinions = { workCost = 40, minPowerCategory = 2, params = {amount = 1}},
newMaterial= { workCost = 30, minPowerCategory = 1, params = {amount = 50}},
},
---- units
-- minions
minionWorkUnitDelay = 700, -- in ms
minionRepairDelay = 400, -- in ms
minionMovementSpeed = 3, -- in tiles per second
minionWorkTypes = {"repair","work", "transport", "idle"},
-- player missiles
missile = {
movementSpeed = 2, -- in tiles per second
--movementSpeed = 1, -- in tiles per second
},
-- AI parameters
AIParams = {
enemyMissileMovementSpeed = 4, -- in tiles per second
--enemyMissileMovementSpeed = 2,
--[[
-- bombardment
startBombardingPeriod = 600000, -- in ms
bombardingPeriodShortening = 0.95, -- dimension less
minBonbardmentPeriod = 10000, -- in ms
startBombardingDamage = 5,
bombardingDamageGrowt = 1.3,
maxBombardingDamage = 10,
bombardingAreaSize = 3,
]]
},
---- other constants
deconstructMaterialReturnRatio = 0.75,
}
return gameConst;
|
local function call_with_file(f, path, mode)
local ____id = {io.open(path, mode)}
local __h = ____id[1]
local __e = ____id[2]
if not __h then
error(__e)
end
local __x1 = f(__h)
__h.close(__h)
return __x1
end
local function read_file(path)
return call_with_file(function (f)
return f.read(f, "*a")
end, path)
end
local function write_file(path, data)
return call_with_file(function (f)
return f.write(f, data)
end, path, "w")
end
local function file_exists63(path)
local __f = io.open(path)
local __id2 = is63(__f)
local __e1 = nil
if __id2 then
local __r6 = is63(__f.read(__f, 0)) or 0 == __f.seek(__f, "end")
__f.close(__f)
__e1 = __r6
else
__e1 = __id2
end
return __e1
end
local function directory_exists63(path)
local __f1 = io.open(path)
local __id3 = is63(__f1)
local __e2 = nil
if __id3 then
local __r8 = not __f1.read(__f1, 0) and not( 0 == __f1.seek(__f1, "end"))
__f1.close(__f1)
__e2 = __r8
else
__e2 = __id3
end
return __e2
end
local path_separator = char(_G.package.config, 0)
local function path_join(a, ...)
return reduce(function (x, y)
return x .. path_separator .. y
end, {...}, a)
end
local function get_environment_variable(name)
return os.getenv(name)
end
local function stdout()
return (process or io).stdout
end
local function stderr()
return (process or io).stderr
end
local function write(x, out)
return (out or stdout()):write(x)
end
local function exit(code)
return os.exit(code)
end
local argv = nil
function _G.set_argv(l)
argv = l
return argv
end
function _G.get_argv()
if nil63(argv) then
set_argv(_G.arg or _G.args or {})
end
return argv
end
local function opt63(x)
return string63(x) and char(x, 0) == "-" and not( x == "-")
end
function _G.parse_positional(args, pos)
return cut(args, either(pos, 0), first(opt63, args, pos))
end
function _G.parse_option(args)
if opt63(hd(args)) then
return {hd(args), parse_positional(args, 1)}
end
end
function _G.parse_arguments(aliases, argv)
local __l = argv or get_argv()
local __a = aliases or {}
local __r22 = parse_positional(__l)
__l = cut(__l, _35(__r22))
while true do
local __p = parse_option(__l)
if not __p then
break
end
local ____y = __p
if yes(____y) then
local ____id1 = ____y
local __op = ____id1[1]
local __args = ____id1[2]
if __op == "--" then
__l = cut(__l, 1)
break
end
__l = cut(__l, 1 + _35(__args))
local __e3 = nil
if clip(__op, 0, 2) == "--" then
__e3 = clip(__op, 2)
else
__e3 = clip(__op, 1)
end
local __k = __e3
local __k1 = __a[__k] or __k
local __e4 = nil
if none63(__args) then
__e4 = true
else
__e4 = __args
end
local __v = __e4
__r22[__k1] = __v
add(__r22, {__k1, __v})
end
end
__r22.rest = __l
set_argv(__r22.rest)
return __r22
end
function _G.arguments(aliases, argv)
local __argv = argv or get_argv()
local __r24 = parse_arguments(__argv, aliases)
set_argv(__r24.rest)
__r24.rest = nil
if not empty63(__r24) then
return __r24
end
end
local function reload(module)
package.loaded[module] = nil
return require(module)
end
local function run(command)
local __f2 = io.popen(command)
local __x5 = __f2.read(__f2, "*all")
__f2.close(__f2)
return __x5
end
local __e5 = nil
if exports == nil then
__e5 = {}
else
__e5 = exports
end
local __exports = __e5
__exports.readFile = read_file
__exports.writeFile = write_file
__exports.fileExists63 = file_exists63
__exports.directoryExists63 = directory_exists63
__exports.pathSeparator = path_separator
__exports.pathJoin = path_join
__exports.getEnvironmentVariable = get_environment_variable
__exports.stdout = stdout
__exports.stderr = stderr
__exports.write = write
__exports.exit = exit
__exports.getArgv = get_argv
__exports.setArgv = set_argv
__exports.arguments = arguments
__exports.reload = reload
__exports.run = run
return __exports
|
--[[
clarkewanglei@gmail.com
--]]
require("fileopt")
require("commonutils")
function buildimage(releasepath,releasefile,port,imagename,entrypointsh,telnetrpm)
local centos7jdk8 = 'hljiangtao/centos7jdk8'
local dpct = 'docker inspect --type=image '.. centos7jdk8
local tt = io.popen(dpct)
print(dpct)
local at = tt:read("*all")
print(at)
--if(true == string.contains(at, 'No such image:') or true == string.contains(at, '[]')) then
if(string.contains(at, 'No such image:') or string.contains(at, '[]')) then
dpct = 'docker pull '.. centos7jdk8
tt = io.popen(dpct)
print(dpct)
at = tt:read("*all")
print(at)
else
print('docker image:'..centos7jdk8..' have existed locally.')
end
local ct ='FROM '..centos7jdk8..'\n'
--将本地文件夹挂载到当前容器,指定/tmp目录并持久化到Docker数据文件夹,因为Spring Boot使用的内嵌Tomcat容器默认使用/tmp作为工作目录
ct =ct..'VOLUME /tmp\n'
--添加自己的项目到 app.jar中 这里我是取了app.jar的名字,这个名字可以随便取的,只要后面几行名字和这个统一就好了
print('add to image releasefile:',releasefile)
ct =ct..'ADD '..releasefile..' /app.jar\n'
--运行过程中创建一个app.jar文件
--ct=ct.."RUN bash -c 'touch /app.jar'\n"
--########centos---
--ct=ct..'RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup\n'
--ct=ct..'RUN curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo\n'
--ct=ct..'RUN yum install -y telnet\n'
--本地安装telnet
ct=ct..'ADD telnet-0.17-65.el7_8.x86_64.rpm /telnet-0.17-65.el7_8.x86_64.rpm\n'
ct=ct..'RUN rpm --force -ivh /telnet-0.17-65.el7_8.x86_64.rpm\n'
ct =ct..'COPY entrypoint.sh /usr/bin/\n'
--开放$port端口
ct=ct..'EXPOSE '..port..'\n'
--ENTRYPOINT指定容器运行后默认执行的命令
--ct=ct..'ENTRYPOINT ["java","-jar","-Dspring.profiles.active=local","/app.jar"]'
writefile(releasepath..'Dockerfile',ct)
local dpc = 'rm -rf '..releasepath..'/entrypoint.sh&&cp '..entrypointsh..' '..releasepath..'entrypoint.sh&&chmod 777 '..releasepath..'/entrypoint.sh'
local t = io.popen(dpc)
print(dpc)
local a = t:read("*all")
print(a)
dpc = 'rm -rf '..releasepath..'/telnet-0.17-65.el7_8.x86_64.rpm&&cp '..telnetrpm..' '..releasepath..'telnet-0.17-65.el7_8.x86_64.rpm&&chmod 777 '..releasepath..'/telnet-0.17-65.el7_8.x86_64.rpm'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
--docker build $releasepath -t $imagename .
dpc = 'docker build --no-cache -t '..imagename..' '..releasepath
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
end
function buildimageft(releasepath,port,imagename,entrypointsh,nginxconf,telnetrpm)
local centos7nginx = 'xiobe/centos7nginx-main'
local dpct = 'docker inspect --type=image '.. centos7nginx
local tt = io.popen(dpct)
print(dpct)
local at = tt:read("*all")
print(at)
--if(true == string.contains(at, 'No such image:') or true == string.contains(at, '[]')) then
if(string.contains(at, 'No such image:') or string.contains(at, '[]')) then
dpct = 'docker pull '.. centos7nginx
tt = io.popen(dpct)
print(dpct)
at = tt:read("*all")
print(at)
else
print('docker image:'..centos7nginx..' have existed locally.')
end
local ct ='FROM '..centos7nginx..'\n'
ct = ct..'EXPOSE '..port..'\n'
ct = ct..'COPY entrypoint.sh /usr/bin/\n'
ct = ct..'RUN rm -rf /etc/nginx/conf.d/default.conf\n'
ct = ct..'COPY nginx_default_conf /etc/nginx/conf.d/default.conf\n'
ct = ct..'COPY /dist /var/www/html\n'
--#####centos-----
--ct=ct..'RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup\n'
--ct=ct..'RUN curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo\n'
--ct=ct..'RUN yum install -y telnet\n'
--本地安装telnet
ct=ct..'ADD telnet-0.17-65.el7_8.x86_64.rpm /telnet-0.17-65.el7_8.x86_64.rpm\n'
ct=ct..'RUN rpm --force -ivh /telnet-0.17-65.el7_8.x86_64.rpm\n'
ct = ct..'ENTRYPOINT nginx -g "daemon off;"'
writefile(releasepath..'Dockerfile',ct)
local dpc = 'rm -rf '..releasepath..'/entrypoint.sh&&cp '..entrypointsh..' '..releasepath..'/entrypoint.sh&&chmod 777 '..releasepath..'/entrypoint.sh'
local t = io.popen(dpc)
print(dpc)
local a = t:read("*all")
print(a)
dpc = 'rm -rf '..releasepath..'/nginx_default_conf&&cp '..nginxconf..' '..releasepath..'nginx_default_conf&&chmod 777 '..releasepath..'/nginx_default_conf'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
dpc = 'rm -rf '..releasepath..'/telnet-0.17-65.el7_8.x86_64.rpm&&cp '..telnetrpm..' '..releasepath..'telnet-0.17-65.el7_8.x86_64.rpm&&chmod 777 '..releasepath..'/telnet-0.17-65.el7_8.x86_64.rpm'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
dpc = 'docker build --no-cache -t '..imagename..' '..releasepath
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
end
function buildimagemini(releasepath,releasefile,port,imagename,entrypointsh,telnet)
local jdk = 'openjdk:11'
local dpct = 'docker inspect --type=image '.. jdk
local tt = io.popen(dpct)
print(dpct)
local at = tt:read("*all")
--print(at)
--if(true == string.contains(at, 'No such image:') or true == string.contains(at, '[]')) then
if(string.contains(at, 'No such image:') or string.contains(at, '[]')) then
dpct = 'docker pull '.. jdk
tt = io.popen(dpct)
print(dpct)
at = tt:read("*all")
print(at)
else
print('docker image:'..jdk..' have existed locally.')
end
local ct ='FROM '..jdk..'\n'
--将本地文件夹挂载到当前容器,指定/tmp目录并持久化到Docker数据文件夹,因为Spring Boot使用的内嵌Tomcat容器默认使用/tmp作为工作目录
ct =ct..'VOLUME /tmp\n'
--添加自己的项目到 app.jar中 这里我是取了app.jar的名字,这个名字可以随便取的,只要后面几行名字和这个统一就好了
ct =ct..'ADD '..releasefile..' /app.jar\n'
--运行过程中创建一个app.jar文件
ct =ct.."RUN bash -c 'touch /app.jar'\n"
ct =ct..'ENTRYPOINT ["java","-Dspring.profiles.active=docker", "-jar","/app.jar"]\n'
--开放$port端口
ct=ct..'EXPOSE '..port..'\n'
--ct=ct..'RUN apt-get update\n'
--ct=ct..'RUN apt-get install telnet -y\n'
ct =ct..'COPY entrypoint.sh /usr/bin/\n'
--离线安装telnet
ct=ct..'ADD telnet_0.17-42_amd64.deb /telnet_0.17-42_amd64.deb\n'
ct=ct..'ADD netbase_6.3_all.deb /netbase_6.3_all.deb\n'
ct=ct..'ADD xxd_8.2.2434-3_amd64.deb /xxd_8.2.2434-3_amd64.deb\n'
ct=ct..'ADD vim-common_8.2.2434-3_all.deb /vim-common_8.2.2434-3_all.deb\n'
ct=ct..'ADD libgpm2_1.20.7-8_amd64.deb /libgpm2_1.20.7-8_amd64.deb\n'
ct=ct..'ADD vim-runtime_8.2.2434-3_all.deb /vim-runtime_8.2.2434-3_all.deb\n'
ct=ct..'ADD vim_8.2.2434-3_amd64.deb /vim_8.2.2434-3_amd64.deb\n'
ct=ct..'ADD libc6_2.31-13_amd64.deb /libc6_2.31-13_amd64.deb\n'
ct=ct..'ADD libselinux1_3.1-3_amd64.deb /libselinux1_3.1-3_amd64.deb\n'
ct=ct..'ADD libcrypt1_4.4.18-4_amd64.deb /libcrypt1_4.4.18-4_amd64.deb\n'
ct=ct..'ADD libgcc-s1_10.2.1-6_amd64.deb /libgcc-s1_10.2.1-6_amd64.deb\n'
ct=ct..'ADD gcc-10-base_10.2.1-6_amd64.deb /gcc-10-base_10.2.1-6_amd64.deb\n'
ct=ct..'RUN dpkg -i netbase_6.3_all.deb\n'
ct=ct..'RUN dpkg -i telnet_0.17-42_amd64.deb\n'
ct=ct..'RUN dpkg -i xxd_8.2.2434-3_amd64.deb\n'
ct=ct..'RUN dpkg -i vim-common_8.2.2434-3_all.deb\n'
ct=ct..'RUN dpkg -i libgpm2_1.20.7-8_amd64.deb\n'
ct=ct..'RUN dpkg -i vim-runtime_8.2.2434-3_all.deb\n'
ct=ct..'RUN dpkg -i libcrypt1_4.4.18-4_amd64.deb\n'
ct=ct..'RUN dpkg -i gcc-10-base_10.2.1-6_amd64.deb\n'
ct=ct..'RUN dpkg -i libgcc-s1_10.2.1-6_amd64.deb\n'
ct=ct..'RUN dpkg -i libc6_2.31-13_amd64.deb\n'
ct=ct..'RUN dpkg -i libselinux1_3.1-3_amd64.deb\n'
ct=ct..'RUN dpkg -i vim_8.2.2434-3_amd64.deb\n'
local dpc = 'rm -rf '..releasepath..'/entrypoint.sh&&cp '..entrypointsh..' '..releasepath..'/entrypoint.sh&&chmod 777 '..releasepath..'/entrypoint.sh'
local t = io.popen(dpc)
print(dpc)
local a = t:read("*all")
print(a)
dpc = 'rm -rf '..releasepath..'/telnet_0.17-42_amd64.deb&&cp '..telnet..' '..releasepath..'/telnet_0.17-42_amd64.deb&&chmod 777 '..releasepath..'/telnet_0.17-42_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local netbase = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','netbase_6.3_all.deb')
dpc = 'rm -rf '..releasepath..'/netbase_6.3_all.deb&&cp '..netbase..' '..releasepath..'/netbase_6.3_all.deb&&chmod 777 '..releasepath..'/netbase_6.3_all.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local xdd = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','xxd_8.2.2434-3_amd64.deb')
dpc = 'rm -rf '..releasepath..'/xxd_8.2.2434-3_amd64.deb&&cp '..xdd..' '..releasepath..'/xxd_8.2.2434-3_amd64.deb&&chmod 777 '..releasepath..'/xxd_8.2.2434-3_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local vimcommon = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','vim-common_8.2.2434-3_all.deb')
dpc = 'rm -rf '..releasepath..'/vim-common_8.2.2434-3_all.deb&&cp '..vimcommon..' '..releasepath..'/vim-common_8.2.2434-3_all.deb&&chmod 777 '..releasepath..'/vim-common_8.2.2434-3_all.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libgbpm2 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libgpm2_1.20.7-8_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libgpm2_1.20.7-8_amd64.deb&&cp '..libgbpm2..' '..releasepath..'/libgpm2_1.20.7-8_amd64.deb&&chmod 777 '..releasepath..'/libgpm2_1.20.7-8_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local vimruntime = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','vim-runtime_8.2.2434-3_all.deb')
dpc = 'rm -rf '..releasepath..'/vim-runtime_8.2.2434-3_all.deb&&cp '..vimruntime..' '..releasepath..'/vim-runtime_8.2.2434-3_all.deb&&chmod 777 '..releasepath..'/vim-runtime_8.2.2434-3_all.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local vim = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','vim_8.2.2434-3_amd64.deb')
dpc = 'rm -rf '..releasepath..'/vim_8.2.2434-3_amd64.deb&&cp '..vim..' '..releasepath..'/vim_8.2.2434-3_amd64.deb&&chmod 777 '..releasepath..'/vim_8.2.2434-3_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libc6 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libc6_2.31-13_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libc6_2.31-13_amd64.deb&&cp '..libc6..' '..releasepath..'/libc6_2.31-13_amd64.deb&&chmod 777 '..releasepath..'/libc6_2.31-13_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libselinux = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libselinux1_3.1-3_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libselinux1_3.1-3_amd64.deb&&cp '..libselinux..' '..releasepath..'/libselinux1_3.1-3_amd64.deb&&chmod 777 '..releasepath..'/libselinux1_3.1-3_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libcrypt = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libcrypt1_4.4.18-4_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libcrypt1_4.4.18-4_amd64.deb&&cp '..libcrypt..' '..releasepath..'/libcrypt1_4.4.18-4_amd64.deb&&chmod 777 '..releasepath..'/libcrypt1_4.4.18-4_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libgcc_s1 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libgcc-s1_10.2.1-6_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libgcc_s1_10.2.1-6_amd64.deb&&cp '..libgcc_s1..' '..releasepath..'/libgcc-s1_10.2.1-6_amd64.deb&&chmod 777 '..releasepath..'/libgcc-s1_10.2.1-6_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local gcc_10_base = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','gcc-10-base_10.2.1-6_amd64.deb')
dpc = 'rm -rf '..releasepath..'/gcc-10-base_10.2.1-6_amd64.deb&&cp '..gcc_10_base..' '..releasepath..'/gcc-10-base_10.2.1-6_amd64.deb&&chmod 777 '..releasepath..'/gcc-10-base_10.2.1-6_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
writefile(releasepath..'Dockerfile',ct)
--docker build $releasepath -t $imagename .
dpc = 'docker build --no-cache -t '..imagename..' '..releasepath
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
end
function buildimageftmini(releasepath,tdir,port,imagename,entrypointsh,nginxconf,telnet)
local nginx = 'nginx:1.21.1'
local dpct = 'docker inspect --type=image '.. nginx
local tt = io.popen(dpct)
print(dpct)
local at = tt:read("*all")
--print(at)
--if(true == string.contains(at, 'No such image:') or true == string.contains(at, '[]')) then
if(string.contains(at, 'No such image:') or string.contains(at, '[]')) then
dpct = 'docker pull '.. nginx
tt = io.popen(dpct)
print(dpct)
at = tt:read("*all")
print(at)
else
print('docker image:'..nginx..' have existed locally.')
end
local ct ='FROM '..nginx..'\n'
ct = ct..'EXPOSE '..port..'\n'
ct = ct..'RUN rm -rf /etc/nginx/conf.d/default.conf\n'
ct = ct..'COPY nginx_config_router /etc/nginx/conf.d/default.conf\n'
ct = ct..'COPY '..tdir..' /usr/share/nginx/html\n'
--ct = ct..'ENTRYPOINT nginx -g "daemon off;"\n'
ct =ct..'COPY entrypoint.sh /usr/bin/\n'
--离线安装telnet
ct=ct..'ADD telnet_0.17-42_amd64.deb /telnet_0.17-42_amd64.deb\n'
ct=ct..'ADD netbase_6.3_all.deb /netbase_6.3_all.deb\n'
ct=ct..'ADD xxd_8.2.2434-3_amd64.deb /xxd_8.2.2434-3_amd64.deb\n'
ct=ct..'ADD vim-common_8.2.2434-3_all.deb /vim-common_8.2.2434-3_all.deb\n'
ct=ct..'ADD libgpm2_1.20.7-8_amd64.deb /libgpm2_1.20.7-8_amd64.deb\n'
ct=ct..'ADD vim-runtime_8.2.2434-3_all.deb /vim-runtime_8.2.2434-3_all.deb\n'
ct=ct..'ADD vim_8.2.2434-3_amd64.deb /vim_8.2.2434-3_amd64.deb\n'
ct=ct..'ADD libc6_2.31-13_amd64.deb /libc6_2.31-13_amd64.deb\n'
ct=ct..'ADD libselinux1_3.1-3_amd64.deb /libselinux1_3.1-3_amd64.deb\n'
ct=ct..'ADD libcrypt1_4.4.18-4_amd64.deb /libcrypt1_4.4.18-4_amd64.deb\n'
ct=ct..'ADD libgcc-s1_10.2.1-6_amd64.deb /libgcc-s1_10.2.1-6_amd64.deb\n'
ct=ct..'ADD gcc-10-base_10.2.1-6_amd64.deb /gcc-10-base_10.2.1-6_amd64.deb\n'
ct=ct..'ADD libpcre2-8-0_10.36-2_amd64.deb /libpcre2-8-0_10.36-2_amd64.deb\n'
ct=ct..'RUN dpkg -i netbase_6.3_all.deb\n'
ct=ct..'RUN dpkg -i telnet_0.17-42_amd64.deb\n'
ct=ct..'RUN dpkg -i xxd_8.2.2434-3_amd64.deb\n'
ct=ct..'RUN dpkg -i vim-common_8.2.2434-3_all.deb\n'
ct=ct..'RUN dpkg -i libgpm2_1.20.7-8_amd64.deb\n'
ct=ct..'RUN dpkg -i vim-runtime_8.2.2434-3_all.deb\n'
ct=ct..'RUN dpkg -i libcrypt1_4.4.18-4_amd64.deb\n'
ct=ct..'RUN dpkg -i gcc-10-base_10.2.1-6_amd64.deb\n'
ct=ct..'RUN dpkg -i libgcc-s1_10.2.1-6_amd64.deb\n'
ct=ct..'RUN dpkg -i libc6_2.31-13_amd64.deb\n'
ct=ct..'RUN dpkg -i libpcre2-8-0_10.36-2_amd64.deb\n'
ct=ct..'RUN dpkg -i libselinux1_3.1-3_amd64.deb\n'
ct=ct..'RUN dpkg -i vim_8.2.2434-3_amd64.deb\n'
local dpc = 'rm -rf '..releasepath..'/entrypoint.sh&&cp '..entrypointsh..' '..releasepath..'/entrypoint.sh&&chmod 777 '..releasepath..'/entrypoint.sh'
local t = io.popen(dpc)
print(dpc)
local a = t:read("*all")
print(a)
dpc = 'rm -rf '..releasepath..'/nginx_config_router&&cp '..nginxconf..' '..releasepath..'/nginx_config_router&&chmod 777 '..releasepath..'/nginx_config_router'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
dpc = 'rm -rf '..releasepath..'/telnet_0.17-42_amd64.deb&&cp '..telnet..' '..releasepath..'/telnet_0.17-42_amd64.deb&&chmod 777 '..releasepath..'/telnet_0.17-42_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local netbase = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','netbase_6.3_all.deb')
dpc = 'rm -rf '..releasepath..'/netbase_6.3_all.deb&&cp '..netbase..' '..releasepath..'/netbase_6.3_all.deb&&chmod 777 '..releasepath..'/netbase_6.3_all.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local xdd = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','xxd_8.2.2434-3_amd64.deb')
dpc = 'rm -rf '..releasepath..'/xxd_8.2.2434-3_amd64.deb&&cp '..xdd..' '..releasepath..'/xxd_8.2.2434-3_amd64.deb&&chmod 777 '..releasepath..'/xxd_8.2.2434-3_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local vimcommon = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','vim-common_8.2.2434-3_all.deb')
dpc = 'rm -rf '..releasepath..'/vim-common_8.2.2434-3_all.deb&&cp '..vimcommon..' '..releasepath..'/vim-common_8.2.2434-3_all.deb&&chmod 777 '..releasepath..'/vim-common_8.2.2434-3_all.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libgbpm2 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libgpm2_1.20.7-8_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libgpm2_1.20.7-8_amd64.deb&&cp '..libgbpm2..' '..releasepath..'/libgpm2_1.20.7-8_amd64.deb&&chmod 777 '..releasepath..'/libgpm2_1.20.7-8_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local vimruntime = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','vim-runtime_8.2.2434-3_all.deb')
dpc = 'rm -rf '..releasepath..'/vim-runtime_8.2.2434-3_all.deb&&cp '..vimruntime..' '..releasepath..'/vim-runtime_8.2.2434-3_all.deb&&chmod 777 '..releasepath..'/vim-runtime_8.2.2434-3_all.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local vim = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','vim_8.2.2434-3_amd64.deb')
dpc = 'rm -rf '..releasepath..'/vim_8.2.2434-3_amd64.deb&&cp '..vim..' '..releasepath..'/vim_8.2.2434-3_amd64.deb&&chmod 777 '..releasepath..'/vim_8.2.2434-3_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libc6 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libc6_2.31-13_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libc6_2.31-13_amd64.deb&&cp '..libc6..' '..releasepath..'/libc6_2.31-13_amd64.deb&&chmod 777 '..releasepath..'/libc6_2.31-13_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libselinux = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libselinux1_3.1-3_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libselinux1_3.1-3_amd64.deb&&cp '..libselinux..' '..releasepath..'/libselinux1_3.1-3_amd64.deb&&chmod 777 '..releasepath..'/libselinux1_3.1-3_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libcrypt = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libcrypt1_4.4.18-4_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libcrypt1_4.4.18-4_amd64.deb&&cp '..libcrypt..' '..releasepath..'/libcrypt1_4.4.18-4_amd64.deb&&chmod 777 '..releasepath..'/libcrypt1_4.4.18-4_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libgcc_s1 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libgcc-s1_10.2.1-6_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libgcc-s1_10.2.1-6_amd64.deb&&cp '..libgcc_s1..' '..releasepath..'/libgcc-s1_10.2.1-6_amd64.deb&&chmod 777 '..releasepath..'/libgcc-s1_10.2.1-6_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local gcc_10_base = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','gcc-10-base_10.2.1-6_amd64.deb')
dpc = 'rm -rf '..releasepath..'/gcc-10-base_10.2.1-6_amd64.deb&&cp '..gcc_10_base..' '..releasepath..'/gcc-10-base_10.2.1-6_amd64.deb&&chmod 777 '..releasepath..'/gcc-10-base_10.2.1-6_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
local libpcre2 = string.gsub(telnet,'telnet_0%.17%-42_amd64%.deb','libpcre2-8-0_10.36-2_amd64.deb')
dpc = 'rm -rf '..releasepath..'/libpcre2-8-0_10.36-2_amd64.deb&&cp '..libpcre2..' '..releasepath..'/libpcre2-8-0_10.36-2_amd64.deb&&chmod 777 '..releasepath..'/libpcre2-8-0_10.36-2_amd64.deb'
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
writefile(releasepath..'Dockerfile',ct)
dpc = 'docker build --no-cache -t '..imagename..' '..releasepath
t = io.popen(dpc)
print(dpc)
a = t:read("*all")
print(a)
end
|
local wildcard_pattern = require 'wildcard_pattern'
local patterns = {
wildcard_pattern.from_wildcard("*.lua"),
wildcard_pattern.from_wildcard("spec/*.lua"),
}
local function should_match(path)
assert.are.same(path, wildcard_pattern.any_match(patterns, path))
end
local function should_not_match(path)
assert.is_falsy(wildcard_pattern.any_match(patterns, path))
end
describe("Calling `any_match` with a table of patterns", function()
it("returns truthy if any pattern matches", function()
should_match("wildcard_pattern.lua")
should_match("spec/wildcard_pattern_spec.lua")
should_match("spec/wildcard_pattern_any_match_spec.lua")
end)
it("returns falsy if none of the patterns match", function()
should_not_match("examples/simple_wildcards.lua")
should_not_match("UNLICENSE")
should_not_match("README.md")
should_not_match(".gitignore")
should_not_match(".travis.yml")
end)
end)
|
-- Specifies set of pictures and animations used by more entities, to avoid duplication.
-- The standard set of transport belt pictures (vertical/horizontal + endigns + startings)
-- are used in transport belt, transport belt to ground and splitter.
ending_patch_prototype =
{
--[[
sheet =
{
filename = "__base__/graphics/entity/transport-belt/start-end-integration-patches.png",
width = 40,
height = 40,
priority = "extra-high"
}
]]
}
--vacumatic tube gray
ye_basic_belt_horizontal =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16, shift = {0,0},
}
ye_basic_belt_vertical =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16, shift = {0,0},
y = 40
}
ye_basic_belt_ending_top =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 80
}
ye_basic_belt_ending_bottom =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 120
}
ye_basic_belt_ending_side =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 160,
}
ye_basic_belt_starting_top =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 200,
}
ye_basic_belt_starting_bottom =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 240,
}
ye_basic_belt_starting_side =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 280,
}
--vacumatic tube green
ye_green_belt_horizontal =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16, shift = {0,0},
}
ye_green_belt_vertical =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16, shift = {0,0},
y = 40
}
ye_green_belt_ending_top =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 80
}
ye_green_belt_ending_bottom =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 120
}
ye_green_belt_ending_side =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 160
}
ye_green_belt_starting_top =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 200
}
ye_green_belt_starting_bottom =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 240
}
ye_green_belt_starting_side =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
y = 280
}
data:extend(
{
{
type = "transport-belt",
name = "ye_tranport_tube_orange",
icon_size = 32, icon = "__yi_engines__/graphics/icons/ye_transport_orange_icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.5, mining_time = 0.1, result = "ye_tranport_tube_orange"},
max_health = 100,
corpse = "small-remnants",
resistances ={{type = "physical",percent = 60}},
collision_box = {{-0.4, -0.4}, {0.4, 0.4}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
working_sound =
{
sound =
{
filename = "__base__/sound/transport-belt.ogg",
volume = 0.17
},
max_sounds_per_type = 3
},
animation_speed_coefficient = 8,
animations =
{
filename = "__yi_engines__/graphics/entity/ye_transport_orange.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
direction_count = 12
},
belt_horizontal = ye_basic_belt_horizontal,
belt_vertical = ye_basic_belt_vertical,
ending_top = ye_basic_belt_ending_top,
ending_bottom = ye_basic_belt_ending_bottom,
ending_side = ye_basic_belt_ending_side,
starting_top = ye_basic_belt_starting_top,
starting_bottom = ye_basic_belt_starting_bottom,
starting_side = ye_basic_belt_starting_side,
--ending_patch = ending_patch_prototype,
fast_replaceable_group = "transport-belt",
related_underground_belt = "ye_tranport_tube_orange_underground",
next_upgrade = "ye_tranport_tube_green",
speed = 0.046875,
connector_frame_sprites = transport_belt_connector_frame_sprites,
circuit_connector_sprites = transport_belt_circuit_connector_sprites,
circuit_wire_connection_point = transport_belt_circuit_wire_connection_point,
circuit_wire_max_distance = transport_belt_circuit_wire_max_distance
},
{
type = "transport-belt",
name = "ye_tranport_tube_green",
icon_size = 32, icon = "__yi_engines__/graphics/icons/ye_transport_green_icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.5, mining_time = 0.1, result = "ye_tranport_tube_green"},
max_health = 100,
corpse = "small-remnants",
resistances ={{type = "physical",percent = 60}},
collision_box = {{-0.4, -0.4}, {0.4, 0.4}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
working_sound =
{
sound =
{
filename = "__base__/sound/transport-belt.ogg",
volume = 0.4
},
max_sounds_per_type = 3
},
animation_speed_coefficient = 4,
animations =
{
filename = "__yi_engines__/graphics/entity/ye_transport_green.png",
priority = "extra-high",
width = 40,
height = 40,
frame_count = 16,
direction_count = 12
},
belt_horizontal = ye_green_belt_horizontal,
belt_vertical = ye_green_belt_vertical,
ending_top = ye_green_belt_ending_top,
ending_bottom = ye_green_belt_ending_bottom,
ending_side = ye_green_belt_ending_side,
starting_top = ye_green_belt_starting_top,
starting_bottom = ye_green_belt_starting_bottom,
starting_side = ye_green_belt_starting_side,
--ending_patch = ending_patch_prototype,
fast_replaceable_group = "transport-belt",
related_underground_belt = "ye_tranport_tube_green_underground",
speed = 0.15,
connector_frame_sprites = transport_belt_connector_frame_sprites,
circuit_connector_sprites = transport_belt_circuit_connector_sprites,
circuit_wire_connection_point = transport_belt_circuit_wire_connection_point,
circuit_wire_max_distance = transport_belt_circuit_wire_max_distance
},
{
type = "underground-belt",
name = "ye_tranport_tube_orange_underground",
icon_size = 32, icon = "__yi_engines__/graphics/icons/ubo_icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.1, result = "ye_tranport_tube_orange_underground"},
max_health = 60,
corpse = "small-remnants",
max_distance = 20,
underground_sprite =
{
filename = "__yi_engines__/graphics/icons/underground-lines.png",
priority = "high",
width = 64,
height = 64,
x = 64,
scale = 0.5
},
underground_remove_belts_sprite =
{
filename = "__core__/graphics/arrows/underground-lines-remove.png",
priority = "high",
width = 64,
height = 64,
x = 64,
scale = 0.5
},
resistances ={{type = "physical",percent = 60}},
collision_box = {{-0.4, -0.4}, {0.4, 0.4}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
animation_speed_coefficient = 16,
belt_horizontal = ye_basic_belt_horizontal,
belt_vertical = ye_basic_belt_vertical,
ending_top = ye_basic_belt_ending_top,
ending_bottom = ye_basic_belt_ending_bottom,
ending_side = ye_basic_belt_ending_side,
starting_top = ye_basic_belt_starting_top,
starting_bottom = ye_basic_belt_starting_bottom,
starting_side = ye_basic_belt_starting_side,
fast_replaceable_group = "transport-belt",
next_upgrade = "ye_tranport_tube_green_underground",
speed = 0.046875,
structure =
{
direction_in =
{
sheet =
{
filename = "__yi_engines__/graphics/entity/ubo_l2.png",
priority = "extra-high",
shift = {0, 0.125},
width = 48,
height = 48,
}
},
direction_out =
{
sheet =
{
filename = "__yi_engines__/graphics/entity/ubo_l1.png",
priority = "extra-high",
shift = {0, 0.125},
width = 48,
height = 48,
}
}
},
--ending_patch = ending_patch_prototype
},
{
type = "underground-belt",
name = "ye_tranport_tube_green_underground",
icon_size = 32, icon = "__yi_engines__/graphics/icons/ubg_icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.1, result = "ye_tranport_tube_green_underground"},
max_health = 60,
corpse = "small-remnants",
max_distance = 20,
underground_sprite =
{
filename = "__yi_engines__/graphics/icons/underground-lines.png",
priority = "high",
width = 64,
height = 64,
x = 64,
scale = 0.5
},
underground_remove_belts_sprite =
{
filename = "__core__/graphics/arrows/underground-lines-remove.png",
priority = "high",
width = 64,
height = 64,
x = 64,
scale = 0.5
},
resistances ={{type = "physical",percent = 60}},
collision_box = {{-0.4, -0.4}, {0.4, 0.4}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
animation_speed_coefficient = 4,
belt_horizontal = ye_green_belt_horizontal,
belt_vertical = ye_green_belt_vertical,
ending_top = ye_green_belt_ending_top,
ending_bottom = ye_green_belt_ending_bottom,
ending_side = ye_green_belt_ending_side,
starting_top = ye_green_belt_starting_top,
starting_bottom = ye_green_belt_starting_bottom,
starting_side = ye_green_belt_starting_side,
fast_replaceable_group = "transport-belt",
speed = 0.15,
structure =
{
direction_in =
{
sheet =
{
filename = "__yi_engines__/graphics/entity/ubg_l2.png",
priority = "extra-high",
shift = {0, 0.125},
width = 48,
height = 48,
}
},
direction_out =
{
sheet =
{
filename = "__yi_engines__/graphics/entity/ubg_l1.png",
priority = "extra-high",
shift = {0, 0.125},
width = 48,
height = 48,
}
}
},
--ending_patch = ending_patch_prototype
},
-- splitter
{
type = "splitter",
name = "ye_tranport_tube_orange_splitter",
icon_size = 32, icon = "__yi_engines__/graphics/icons/orange_splitter_icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.1, result = "ye_tranport_tube_orange_splitter"},
max_health = 100,
corpse = "medium-remnants",
resistances = {{type = "fire",percent = 60}},
collision_box = {{-0.9, -0.4}, {0.9, 0.4}},
selection_box = {{-0.9, -0.5}, {0.9, 0.5}},
animation_speed_coefficient = 8,
structure_animation_speed_coefficient = 0.7,
structure_animation_movement_cooldown = 10,
belt_horizontal = ye_basic_belt_horizontal,
belt_vertical = ye_basic_belt_vertical,
ending_top = ye_basic_belt_ending_top,
ending_bottom = ye_basic_belt_ending_bottom,
ending_side = ye_basic_belt_ending_side,
starting_top = ye_basic_belt_starting_top,
starting_bottom = ye_basic_belt_starting_bottom,
starting_side = ye_basic_belt_starting_side,
--ending_patch = ending_patch_prototype,
fast_replaceable_group = "transport-belt",
next_upgrade = "ye_tranport_tube_green_splitter",
speed = 0.046875,
structure =
{
north = { filename = "__yi_engines__/graphics/entity/orange_splitter0004.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
east = { filename = "__yi_engines__/graphics/entity/orange_splitter0001.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
south = { filename = "__yi_engines__/graphics/entity/orange_splitter0002.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
west = { filename = "__yi_engines__/graphics/entity/orange_splitter0003.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
},
},
{
type = "splitter",
name = "ye_tranport_tube_green_splitter",
icon_size = 32, icon = "__yi_engines__/graphics/icons/orange_splitter_icon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.1, result = "ye_tranport_tube_green_splitter"},
max_health = 100,
corpse = "medium-remnants",
resistances = {{type = "fire",percent = 60}},
collision_box = {{-0.9, -0.4}, {0.9, 0.4}},
selection_box = {{-0.9, -0.5}, {0.9, 0.5}},
animation_speed_coefficient = 4,
structure_animation_speed_coefficient = 0.7,
structure_animation_movement_cooldown = 10,
belt_horizontal = ye_green_belt_horizontal,
belt_vertical = ye_green_belt_vertical,
ending_top = ye_green_belt_ending_top,
ending_bottom = ye_green_belt_ending_bottom,
ending_side = ye_green_belt_ending_side,
starting_top = ye_green_belt_starting_top,
starting_bottom = ye_green_belt_starting_bottom,
starting_side = ye_green_belt_starting_side,
--ending_patch = ending_patch_prototype,
fast_replaceable_group = "transport-belt",
speed = 0.15,
structure =
{
north = { filename = "__yi_engines__/graphics/entity/green_splitter0004.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
east = { filename = "__yi_engines__/graphics/entity/green_splitter0001.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
south = { filename = "__yi_engines__/graphics/entity/green_splitter0002.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
west = { filename = "__yi_engines__/graphics/entity/green_splitter0003.png", frame_count = 1, line_length = 1, priority = "extra-high", width = 128, height = 128, shift = {0, 0} },
},
},
})
|
local Prop = {}
Prop.Name = "Beach House 1"
Prop.Cat = "House"
Prop.Price = 1500
Prop.Doors = {
Vector( 12158, -8944, 404.25 ),
Vector( 12158, -8848, 404.25 ),
Vector( 11518, -9006, 404 ),
Vector( 11630, -9018, 404 ),
Vector( 11454, -8806, 404 ),
Vector( 11266, -8658, 404 ),
Vector( 11534, -8902, 540 ),
Vector( 11326, -8902, 540 ),
}
GM.Property:Register( Prop )
|
Atlas = {}
Atlas.__index = Atlas
function Atlas:new(image, tw, th)
local o = {}
setmetatable(o, self)
self = o
self.image = image
self.quads = {}
self.spritesize = { tw, th }
nh = image:getWidth() / tw
nv = image:getHeight() / th
n = nh * nv
for i = 0, n - 1 do
x = (i % nh) * tw
y = math.floor(i * tw / image:getWidth()) * th
quad = love.graphics.newQuad(x, y, tw, th, image:getDimensions())
table.insert(self.quads, quad)
end
return self
end
function Atlas:draw(index, x, y)
love.graphics.draw(self.image, self.quads[index], x, y)
end
return Atlas
|
--------------------------------------------------
------- FREECAM FOR FIVEM MADE BY KIMINAZE -------
--------------------------------------------------
Cfg = {}
-- specify, if menu should be accessible via button press
Cfg.useButton = false
-- default: 178 (DELETE)
Cfg.button = 178
-- specify, if menu should be accessible via chat command
Cfg.useCommand = false
-- specify command string
Cfg.command = "freecam"
-- Show an extra option to have a completely free to move camera
Cfg.detachOption = true
-- value in meters
-- default: 5.0
-- used to prevent e.g. Meta-Gaming and Bug-Abuse (looking through walls etc.)
-- with 10,000 you can basically fly above the whole map from the middle but keep in mind, that LoD-states (Level of Detail) won't change as your character stays at its position
Cfg.maxDistance = 5.0
-- min and max FoV settings (should always be in between 1.0f and 130.0f!)
Cfg.minFov = 1.0
Cfg.maxFov = 130.0
Cfg.useRot = false
-- all strings
Cfg.strings = {
noAccessError = "[ERROR] FreeCam: At least one of the following values must be true! Cfg.useButton, Cfg.useCommand",
menuTitle = "Freecam",
menuSubtitle = "Control freecam",
toggleCam = "Camera active",
toggleCamDesc = "Toggle camera on/off",
precision = "Camera Precision",
precisionDesc = "Change camera precision movement",
camFov = "Camera Field of View",
camFovDesc = "Change camera Field of View",
filter = "Filter",
filterDesc = "Change camera Filter",
filterInten = "Filter Intensity",
filterIntenDesc = "Change camera Filter Intensity",
delFilter = "Reset Filter",
delFilterDesc = "Remove filter and reset values",
showMap = "Show Minimap",
showMapDesc = "Toggle minimap on/off",
attachCam = "Camera attached to player",
attachCamDesc = "Should the camera be attached to the player?",
ctrlHelpRoll = "Roll Left/Right",
ctrlHelpMove = "Movement",
ctrlHelpRotate = "Rotate"
}
-- list of available filters ( https://pastebin.com/kVPwMemE )
Cfg.filterList = {
"None",
"AmbientPUSH",
"AP1_01_B_IntRefRange",
"AP1_01_C_NoFog",
"Bank_HLWD",
"Barry1_Stoned",
"BarryFadeOut",
"baseTONEMAPPING",
"BeastIntro01",
"BeastIntro02",
"BeastLaunch01",
"BeastLaunch02",
"BikerFilter",
"BikerForm01",
"BikerFormFlash",
"Bikers",
"BikersSPLASH",
"blackNwhite",
"BlackOut",
"BleepYellow01",
"BleepYellow02",
"Bloom",
"BloomLight",
"BloomMid",
"buggy_shack",
"buildingTOP",
"BulletTimeDark",
"BulletTimeLight",
"CAMERA_BW",
"CAMERA_secuirity",
"CAMERA_secuirity_FUZZ",
"canyon_mission",
"carMOD_underpass",
"carpark",
"carpark_dt1_02",
"carpark_dt1_03",
"Carpark_MP_exit",
"cashdepot",
"cashdepotEMERGENCY",
"cBank_back",
"cBank_front",
"ch2_tunnel_whitelight",
"CH3_06_water",
"CHOP",
"cinema",
"cinema_001",
"cops",
"CopsSPLASH",
"crane_cam",
"crane_cam_cinematic",
"CrossLine01",
"CrossLine02",
"CS1_railwayB_tunnel",
"CS3_rail_tunnel",
"CUSTOM_streetlight",
"damage",
"DeadlineNeon01",
"default",
"DefaultColorCode",
"DONT_overide_sunpos",
"Dont_tazeme_bro",
"dont_tazeme_bro_b",
"downtown_FIB_cascades_opt",
"DrivingFocusDark",
"DrivingFocusLight",
"DRUG_2_drive",
"Drug_deadman",
"Drug_deadman_blend",
"drug_drive_blend01",
"drug_drive_blend02",
"drug_flying_01",
"drug_flying_02",
"drug_flying_base",
"DRUG_gas_huffin",
"drug_wobbly",
"Drunk",
"dying",
"eatra_bouncelight_beach",
"epsilion",
"exile1_exit",
"exile1_plane",
"ExplosionJosh",
"EXT_FULLAmbientmult_art",
"ext_int_extlight_large",
"EXTRA_bouncelight",
"eyeINtheSKY",
"Facebook_NEW",
"facebook_serveroom",
"FIB_5",
"FIB_6",
"FIB_A",
"FIB_B",
"FIB_interview",
"FIB_interview_optimise",
"FinaleBank",
"FinaleBankexit",
"FinaleBankMid",
"fireDEPT",
"FORdoron_delete",
"Forest",
"fp_vig_black",
"fp_vig_blue",
"fp_vig_brown",
"fp_vig_gray",
"fp_vig_green",
"fp_vig_red",
"FrankilinsHOUSEhills",
"frankilnsAUNTS_new",
"frankilnsAUNTS_SUNdir",
"FRANKLIN",
"FranklinColorCode",
"FranklinColorCodeBasic",
"FranklinColorCodeBright",
"FullAmbientmult_interior",
"gallery_refmod",
"garage",
"gen_bank",
"glasses_black",
"Glasses_BlackOut",
"glasses_blue",
"glasses_brown",
"glasses_Darkblue",
"glasses_green",
"glasses_orange",
"glasses_pink",
"glasses_purple",
"glasses_red",
"glasses_Scuba",
"glasses_VISOR",
"glasses_yellow",
"gorge_reflection_gpu",
"gorge_reflectionoffset",
"gorge_reflectionoffset2",
"graveyard_shootout",
"gunclub",
"gunclubrange",
"gunshop",
"gunstore",
"half_direct",
"hangar_lightsmod",
"Hanger_INTmods",
"heathaze",
"heist_boat",
"heist_boat_engineRoom",
"heist_boat_norain",
"helicamfirst",
"heliGunCam",
"Hicksbar",
"HicksbarNEW",
"hillstunnel",
"Hint_cam",
"hitped",
"hud_def_blur",
"hud_def_blur_switch",
"hud_def_colorgrade",
"hud_def_desat_cold",
"hud_def_desat_cold_kill",
"hud_def_desat_Franklin",
"hud_def_desat_Michael",
"hud_def_desat_Neutral",
"hud_def_desat_switch",
"hud_def_desat_Trevor",
"hud_def_desatcrunch",
"hud_def_flash",
"hud_def_focus",
"hud_def_Franklin",
"hud_def_lensdistortion",
"hud_def_lensdistortion_subtle",
"hud_def_Michael",
"hud_def_Trevor",
"id1_11_tunnel",
"ImpExp_Interior_01",
"impexp_interior_01_lift",
"IMpExt_Interior_02",
"IMpExt_Interior_02_stair_cage",
"InchOrange01",
"InchOrange02",
"InchPickup01",
"InchPickup02",
"InchPurple01",
"InchPurple02",
"int_amb_mult_large",
"int_Barber1",
"int_carmod_small",
"int_carrier_control",
"int_carrier_control_2",
"int_carrier_hanger",
"int_carrier_rear",
"int_carrier_stair",
"int_carshowroom",
"int_chopshop",
"int_clean_extlight_large",
"int_clean_extlight_none",
"int_clean_extlight_small",
"int_ClothesHi",
"int_clotheslow_large",
"int_cluckinfactory_none",
"int_cluckinfactory_small",
"int_ControlTower_none",
"int_ControlTower_small",
"int_dockcontrol_small",
"int_extlght_sm_cntrst",
"int_extlight_large",
"int_extlight_large_fog",
"int_extlight_none",
"int_extlight_none_dark",
"int_extlight_none_dark_fog",
"int_extlight_none_fog",
"int_extlight_small",
"int_extlight_small_clipped",
"int_extlight_small_fog",
"int_Farmhouse_none",
"int_Farmhouse_small",
"int_FranklinAunt_small",
"INT_FullAmbientmult",
"INT_FULLAmbientmult_art",
"INT_FULLAmbientmult_both",
"INT_garage",
"int_GasStation",
"int_hanger_none",
"int_hanger_small",
"int_Hospital2_DM",
"int_Hospital_Blue",
"int_Hospital_BlueB",
"int_hospital_dark",
"int_Hospital_DM",
"int_hospital_small",
"int_lesters",
"int_Lost_none",
"int_Lost_small",
"INT_mall",
"int_methlab_small",
"int_motelroom",
"INT_NO_fogALPHA",
"INT_NoAmbientmult",
"INT_NoAmbientmult_art",
"INT_NoAmbientmult_both",
"INT_NOdirectLight",
"INT_nowaterREF",
"int_office_Lobby",
"int_office_LobbyHall",
"INT_posh_hairdresser",
"INT_smshop",
"INT_smshop_indoor_bloom",
"INT_smshop_inMOD",
"INT_smshop_outdoor_bloom",
"INT_streetlighting",
"int_tattoo",
"int_tattoo_B",
"INT_trailer_cinema",
"int_tunnel_none_dark",
"interior_WATER_lighting",
"introblue",
"jewel_gas",
"jewel_optim",
"jewelry_entrance",
"jewelry_entrance_INT",
"jewelry_entrance_INT_fog",
"Kifflom",
"KT_underpass",
"lab_none",
"lab_none_dark",
"lab_none_dark_fog",
"lab_none_dark_OVR",
"lab_none_exit",
"lab_none_exit_OVR",
"LectroDark",
"LectroLight",
"li",
"LifeInvaderLOD",
"lightning",
"lightning_cloud",
"lightning_strong",
"lightning_weak",
"LightPollutionHills",
"lightpolution",
"LIGHTSreduceFALLOFF",
"LODmult_global_reduce",
"LODmult_global_reduce_NOHD",
"LODmult_HD_orphan_LOD_reduce",
"LODmult_HD_orphan_reduce",
"LODmult_LOD_reduce",
"LODmult_SLOD1_reduce",
"LODmult_SLOD2_reduce",
"LODmult_SLOD3_reduce",
"lodscaler",
"LostTimeDark",
"LostTimeFlash",
"LostTimeLight",
"maxlodscaler",
"metro",
"METRO_platform",
"METRO_Tunnels",
"METRO_Tunnels_entrance",
"MichaelColorCode",
"MichaelColorCodeBasic",
"MichaelColorCodeBright",
"MichaelsDarkroom",
"MichaelsDirectional",
"MichaelsNODirectional",
"micheal",
"micheals_lightsOFF",
"michealspliff",
"michealspliff_blend",
"michealspliff_blend02",
"militarybase_nightlight",
"mineshaft",
"morebloom",
"morgue_dark",
"morgue_dark_ovr",
"Mp_apart_mid",
"mp_bkr_int01_garage",
"mp_bkr_int01_small_rooms",
"mp_bkr_int01_transition",
"mp_bkr_int02_garage",
"mp_bkr_int02_hangout",
"mp_bkr_int02_small_rooms",
"mp_bkr_ware01",
"mp_bkr_ware02_dry",
"mp_bkr_ware02_standard",
"mp_bkr_ware02_upgrade",
"mp_bkr_ware03_basic",
"mp_bkr_ware03_upgrade",
"mp_bkr_ware04",
"mp_bkr_ware05",
"MP_Bull_tost",
"MP_Bull_tost_blend",
"MP_corona_heist",
"MP_corona_heist_blend",
"MP_corona_heist_BW",
"MP_corona_heist_BW_night",
"MP_corona_heist_DOF",
"MP_corona_heist_night",
"MP_corona_heist_night_blend",
"MP_corona_selection",
"MP_corona_switch",
"MP_corona_tournament",
"MP_corona_tournament_DOF",
"MP_death_grade",
"MP_death_grade_blend01",
"MP_death_grade_blend02",
"MP_deathfail_night",
"mp_exec_office_01",
"mp_exec_office_02",
"mp_exec_office_03",
"mp_exec_office_03_blue",
"mp_exec_office_03C",
"mp_exec_office_04",
"mp_exec_office_05",
"mp_exec_office_06",
"mp_exec_warehouse_01",
"MP_Garage_L",
"MP_H_01_Bathroom",
"MP_H_01_Bedroom",
"MP_H_01_New",
"MP_H_01_New_Bathroom",
"MP_H_01_New_Bedroom",
"MP_H_01_New_Study",
"MP_H_01_Study",
"MP_H_02",
"MP_H_04",
"mp_h_05",
"MP_H_06",
"mp_h_07",
"mp_h_08",
"MP_heli_cam",
"mp_imx_intwaremed",
"mp_imx_intwaremed_office",
"mp_imx_mod_int_01",
"MP_intro_logo",
"MP_job_end_night",
"MP_job_load",
"MP_job_load_01",
"MP_job_load_02",
"MP_job_lose",
"MP_job_preload",
"MP_job_preload_blend",
"MP_job_preload_night",
"MP_job_win",
"MP_Killstreak",
"MP_Killstreak_blend",
"mp_lad_day",
"mp_lad_judgment",
"mp_lad_night",
"MP_Loser",
"MP_Loser_blend",
"MP_lowgarage",
"MP_MedGarage",
"MP_Powerplay",
"MP_Powerplay_blend",
"MP_race_finish",
"MP_select",
"Mp_Stilts",
"Mp_Stilts2",
"Mp_Stilts2_bath",
"Mp_Stilts_gym",
"Mp_Stilts_gym2",
"MP_Studio_Lo",
"MPApart_H_01",
"MPApart_H_01_gym",
"MPApartHigh",
"MPApartHigh_palnning",
"mugShot",
"mugShot_lineup",
"Multipayer_spectatorCam",
"multiplayer_ped_fight",
"nervousRON_fog",
"NeutralColorCode",
"NeutralColorCodeBasic",
"NeutralColorCodeBright",
"NeutralColorCodeLight",
"NEW_abattoir",
"new_bank",
"NEW_jewel",
"NEW_jewel_EXIT",
"NEW_lesters",
"new_MP_Garage_L",
"NEW_ornate_bank",
"NEW_ornate_bank_entrance",
"NEW_ornate_bank_office",
"NEW_ornate_bank_safe",
"New_sewers",
"NEW_shrinksOffice",
"NEW_station_unfinished",
"new_stripper_changing",
"NEW_trevorstrailer",
"NEW_tunnels",
"NEW_tunnels_ditch",
"new_tunnels_entrance",
"NEW_tunnels_hole",
"NEW_yellowtunnels",
"NewMicheal",
"NewMicheal_night",
"NewMicheal_upstairs",
"NewMichealgirly",
"NewMichealstoilet",
"NewMichealupstairs",
"nextgen",
"NG_blackout",
"NG_deathfail_BW_base",
"NG_deathfail_BW_blend01",
"NG_deathfail_BW_blend02",
"NG_filmic01",
"NG_filmic02",
"NG_filmic03",
"NG_filmic04",
"NG_filmic05",
"NG_filmic06",
"NG_filmic07",
"NG_filmic08",
"NG_filmic09",
"NG_filmic10",
"NG_filmic11",
"NG_filmic12",
"NG_filmic13",
"NG_filmic14",
"NG_filmic15",
"NG_filmic16",
"NG_filmic17",
"NG_filmic18",
"NG_filmic19",
"NG_filmic20",
"NG_filmic21",
"NG_filmic22",
"NG_filmic23",
"NG_filmic24",
"NG_filmic25",
"NG_filmnoir_BW01",
"NG_filmnoir_BW02",
"NG_first",
"nightvision",
"NO_coronas",
"NO_fog_alpha",
"NO_streetAmbient",
"NO_weather",
"NoAmbientmult",
"NoAmbientmult_interior",
"NOdirectLight",
"NoPedLight",
"NOrain",
"overwater",
"Paleto",
"paleto_nightlight",
"paleto_opt",
"PennedInDark",
"PennedInLight",
"PERSHING_water_reflect",
"phone_cam",
"phone_cam1",
"phone_cam10",
"phone_cam11",
"phone_cam12",
"phone_cam13",
"phone_cam2",
"phone_cam3",
"phone_cam3_REMOVED",
"phone_cam4",
"phone_cam5",
"phone_cam6",
"phone_cam7",
"phone_cam8",
"phone_cam8_REMOVED",
"phone_cam9",
"plane_inside_mode",
"player_transition",
"player_transition_no_scanlines",
"player_transition_scanlines",
"PlayerSwitchNeutralFlash",
"PlayerSwitchPulse",
"plaza_carpark",
"PoliceStation",
"PoliceStationDark",
"polluted",
"poolsidewaterreflection2",
"PORT_heist_underwater",
"powerplant_nightlight",
"powerstation",
"PPFilter",
"PPGreen01",
"PPGreen02",
"PPOrange01",
"PPOrange02",
"PPPink01",
"PPPink02",
"PPPurple01",
"PPPurple02",
"prison_nightlight",
"projector",
"prologue",
"prologue_ending_fog",
"prologue_ext_art_amb",
"prologue_reflection_opt",
"prologue_shootout",
"Prologue_shootout_opt",
"pulse",
"RaceTurboDark",
"RaceTurboFlash",
"RaceTurboLight",
"ranch",
"REDMIST",
"REDMIST_blend",
"ReduceDrawDistance",
"ReduceDrawDistanceMAP",
"ReduceDrawDistanceMission",
"reducelightingcost",
"ReduceSSAO",
"reducewaterREF",
"refit",
"reflection_correct_ambient",
"RemoteSniper",
"resvoire_reflection",
"rply_brightness",
"rply_brightness_neg",
"rply_contrast",
"rply_contrast_neg",
"rply_motionblur",
"rply_saturation",
"rply_saturation_neg",
"rply_vignette",
"rply_vignette_neg",
"SALTONSEA",
"sandyshore_nightlight",
"SAWMILL",
"scanline_cam",
"scanline_cam_cheap",
"scope_zoom_in",
"scope_zoom_out",
"secret_camera",
"services_nightlight",
"shades_pink",
"shades_yellow",
"SheriffStation",
"ship_explosion_underwater",
"ship_lighting",
"Shop247",
"Shop247_none",
"sleeping",
"Sniper",
"SP1_03_drawDistance",
"spectator1",
"spectator10",
"spectator2",
"spectator3",
"spectator4",
"spectator5",
"spectator6",
"spectator7",
"spectator8",
"spectator9",
"StadLobby",
"stc_coroners",
"stc_deviant_bedroom",
"stc_deviant_lounge",
"stc_franklinsHouse",
"stc_trevors",
"stoned",
"stoned_aliens",
"stoned_cutscene",
"stoned_monkeys",
"StreetLighting",
"StreetLightingJunction",
"StreetLightingtraffic",
"STRIP_changing",
"STRIP_nofog",
"STRIP_office",
"STRIP_stage",
"StuntFastDark",
"StuntFastLight",
"StuntSlowDark",
"StuntSlowLight",
"subBASE_water_ref",
"sunglasses",
"superDARK",
"switch_cam_1",
"switch_cam_2",
"telescope",
"TinyGreen01",
"TinyGreen02",
"TinyPink01",
"TinyPink02",
"TinyRacerMoBlur",
"torpedo",
"traffic_skycam",
"trailer_explosion_optimise",
"TREVOR",
"TrevorColorCode",
"TrevorColorCodeBasic",
"TrevorColorCodeBright",
"Trevors_room",
"trevorspliff",
"trevorspliff_blend",
"trevorspliff_blend02",
"Tunnel",
"tunnel_entrance",
"tunnel_entrance_INT",
"TUNNEL_green",
"Tunnel_green1",
"TUNNEL_green_ext",
"tunnel_id1_11",
"TUNNEL_orange",
"TUNNEL_orange_exterior",
"TUNNEL_white",
"TUNNEL_yellow",
"TUNNEL_yellow_ext",
"ufo",
"ufo_deathray",
"underwater",
"underwater_deep",
"underwater_deep_clear",
"v_abattoir",
"V_Abattoir_Cold",
"v_bahama",
"v_cashdepot",
"V_CIA_Facility",
"v_dark",
"V_FIB_IT3",
"V_FIB_IT3_alt",
"V_FIB_IT3_alt5",
"V_FIB_stairs",
"v_foundry",
"v_janitor",
"v_jewel2",
"v_metro",
"V_Metro2",
"V_Metro_station",
"v_michael",
"v_michael_lounge",
"V_Office_smoke",
"V_Office_smoke_ext",
"V_Office_smoke_Fire",
"v_recycle",
"V_recycle_dark",
"V_recycle_light",
"V_recycle_mainroom",
"v_rockclub",
"V_Solomons",
"v_strip3",
"V_strip_nofog",
"V_strip_office",
"v_strpchangerm",
"v_sweat",
"v_sweat_entrance",
"v_sweat_NoDirLight",
"v_torture",
"Vagos",
"vagos_extlight_small",
"VAGOS_new_garage",
"VAGOS_new_hangout",
"VagosSPLASH",
"VC_tunnel_entrance",
"vehicle_subint",
"venice_canal_tunnel",
"vespucci_garage",
"VolticBlur",
"VolticFlash",
"VolticGold",
"WAREHOUSE",
"WATER _lab_cooling",
"WATER_CH2_06_01_03",
"WATER_CH2_06_02",
"WATER_CH2_06_04",
"WATER_cove",
"WATER_hills",
"WATER_ID2_21",
"WATER_lab",
"WATER_militaryPOOP",
"WATER_muddy",
"WATER_port",
"WATER_REF_malibu",
"WATER_refmap_high",
"WATER_refmap_hollywoodlake",
"WATER_refmap_low",
"WATER_refmap_med",
"WATER_refmap_off",
"WATER_refmap_poolside",
"WATER_refmap_silverlake",
"WATER_refmap_venice",
"WATER_refmap_verylow",
"WATER_resevoir",
"WATER_RichmanStuntJump",
"WATER_river",
"WATER_salton",
"WATER_salton_bottom",
"WATER_shore",
"WATER_silty",
"WATER_silverlake",
"whitenightlighting",
"WhiteOut",
"winning_room",
"yacht_DLC",
"yell_tunnel_nodirect",
}
-- disables character/vehicle controls when using camera movements
Cfg.disabledControls = {
30, -- A and D (Character Movement)
31, -- W and S (Character Movement)
21, -- LEFT SHIFT
36, -- LEFT CTRL
44, -- Q
38, -- E
71, -- W (Vehicle Movement)
72, -- S (Vehicle Movement)
59, -- A and D (Vehicle Movement)
60, -- LEFT SHIFT and LEFT CTRL (Vehicle Movement)
85, -- Q (Radio Wheel)
86, -- E (Vehicle Horn)
}
|
project "spdlog"
kind "StaticLib"
language "C"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("build/" .. outputdir .. "/%{prj.name}")
files {
"src/**.cpp",
"include/**.h"
}
filter "system:linux"
systemversion "latest"
staticruntime "On"
defines "SPDLOG_COMPILED_LIB"
|
local S = farming_craft.intllib
local modlist=minetest.get_modnames()
-- code from tenplus1 farming mod
-- cutting board
minetest.register_craftitem(":farming:cutting_board", {
description = S("Cutting Board"),
inventory_image = "farming_cutting_board.png",
groups = {food_cutting_board = 1, flammable = 2},
})
minetest.register_craft({
output = "farming:cutting_board",
recipe = {
{"default:steel_ingot", "", ""},
{"", "group:stick", ""},
{"", "", "group:wood"},
}
})
-- juicer
minetest.register_craftitem(":farming:juicer", {
description = S("Juicer"),
inventory_image = "farming_juicer.png",
groups = {food_juicer = 1, flammable = 2},
})
minetest.register_craft({
output = "farming:juicer",
recipe = {
{"", "default:stone", ""},
{"default:stone", "", "default:stone"},
}
})
-- saucepan
minetest.register_craftitem(":farming:saucepan", {
description = S("Saucepan"),
inventory_image = "farming_saucepan.png",
groups = {food_saucepan = 1, flammable = 2},
})
minetest.register_craft({
output = "farming:saucepan",
recipe = {
{"default:steel_ingot", "", ""},
{"", "group:stick", ""},
}
})
-- cooking pot
minetest.register_craftitem(":farming:pot", {
description = S("Cooking Pot"),
inventory_image = "farming_pot.png",
groups = {food_pot = 1, flammable = 2},
})
minetest.register_craft({
output = "farming:pot",
recipe = {
{"group:stick", "default:steel_ingot", "default:steel_ingot"},
{"", "default:steel_ingot", "default:steel_ingot"},
}
})
|
local addonName, addonTable = ...
AutoInvite = addonTable
AutoInvite.autoInviteFrame = CreateFrame("Frame", "AutoInvite", UIParent)
AutoInvite.autoInviteFrame:RegisterEvent("PLAYER_LOGIN")
AutoInvite.autoInviteFrame:RegisterEvent("CHAT_MSG_WHISPER")
AutoInvite.autoInviteFrame:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_LOGIN" then
AutoInvite:Initialize()
end
if event == "CHAT_MSG_WHISPER" then
AutoInvite:ProcessWhisper(...)
end
end)
function AutoInvite:Initialize()
if AutoInviteSettings == nil then
AutoInvite:LoadDefaults()
else
AutoInvite:ApplySavedVariables()
end
end
function AutoInvite:ApplySavedVariables()
AutoInvite:SetEnableDisable(AutoInviteSettings.AutoInviteEnabled)
AutoInvite:SetInviteKeyword(AutoInviteSettings.AutoInviteKeyword, 0)
AutoInvite:SetInviteChannel(AutoInviteSettings.AutoInviteChannel, 0)
end
function AutoInvite:ProcessWhisper(text, playerName)
if not AutoInviteSettings.AutoInviteEnabled then
return
end
if text:gsub("^%s*(.-)%s*$", "%1") == AutoInviteSettings.AutoInviteKeyword then
InviteUnit(playerName)
end
end
SLASH_AUTOINVITE1 = "/autoinvite"
SLASH_AUTOINVITE2 = "/autoinvite help"
SLASH_AUTOINVITE3 = "/autoinvite enable"
SLASH_AUTOINVITE4 = "/autoinvite disable"
SLASH_AUTOINVITE5 = "/autoinvite toggle"
SLASH_AUTOINVITE6 = "/autoinvite b"
SLASH_AUTOINVITE7 = "/autoinvite broadcast"
SLASH_AUTOINVITE8 = "/autoinvite k"
SLASH_AUTOINVITE9 = "/autoinvite keyword"
SLASH_AUTOINVITE10 = "/autoinvite c"
SLASH_AUTOINVITE11 = "/autoinvite channel"
SlashCmdList["AUTOINVITE"] = function(msg)
if AutoInvite:StringIsNullOrEmpty(msg) then
AutoInvite:PrintHelpInformation()
end
local slashCommandMsg = AutoInvite:SplitString(msg, " ")
local subCommand = slashCommandMsg[1]
local subCommandMsg = nil
if table.getn(slashCommandMsg) > 1 then
subCommandMsg = slashCommandMsg[2]
end
if subCommand == "help" then
AutoInvite:PrintHelpInformation()
end
if subCommand == "toggle" then
if AutoInviteSettings.AutoInviteEnabled then
subCommand = "disable"
else
subCommand = "enable"
end
end
if subCommand == "enable" then
AutoInvite:SetEnableDisable(true)
print("AutoInvite enabled.")
end
if subCommand == "disable" then
AutoInvite:SetEnableDisable(false)
print("AutoInvite disabled.")
end
if subCommand == "broadcast" or subCommand == "b" then
AutoInvite:ProcessBroadcast(subCommandMsg, AutoInviteSettings.AutoInviteChannel)
end
if subCommand == "keyword" or subCommand == "k" then
AutoInvite:ProcessKeyword(subCommandMsg)
end
if subCommand == "channel" or subCommand == "c" then
AutoInvite:ProcessChannel(subCommandMsg)
end
end
function AutoInvite:PrintHelpInformation()
print("AutoInvite Help Information")
print("/autoinvite, /autoinvite help -- Displays help information for AutoInvite addon.")
print("/autoinvite enable -- Turns on the AutoInvite functionality.")
print("/autoinvite disable -- Turns off the AutoInvite functionality.")
print("/autoinvite toggle -- Toggles AutoInvite functionality.")
print("/autoinvite broadcast [keyword], /autoinvite b [keyword] -- Broadcasts the invite keyword to the guild channel and enables addon if it is disabled.")
print("/autoinvite keyword [keyword], /autoinvite k [keyword] -- Changes the invite keyword.")
print("/autoinvite channel [channel], /autoinvite c [channel] -- Changes the invite channel. Possible examples: 'SAY', 'YELL', 'PARTY', 'GUILD', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'")
end
function AutoInvite:ProcessBroadcast(subCommandMsg, chatChannel)
AutoInvite:SetEnableDisable(true)
if not AutoInvite:StringIsNullOrEmpty(subCommandMsg) then
AutoInvite:SetInviteKeyword(subCommandMsg, 0)
end
if AutoInvite:StringIsNullOrEmpty(AutoInviteSettings.AutoInviteKeyword) then
print("AutoInvite keyword is not set.")
return
end
if AutoInvite:StringIsNullOrEmpty(AutoInviteSettings.AutoInviteChannel) then
print("AutoInvite channel is not set.")
return
end
SendChatMessage("Whisper me '" .. AutoInviteSettings.AutoInviteKeyword .. "' for invite.", chatChannel)
end
function AutoInvite:ProcessKeyword(keyword)
if not AutoInvite:StringIsNullOrEmpty(keyword) then
AutoInvite:SetInviteKeyword(keyword, 0)
end
if AutoInvite:StringIsNullOrEmpty(AutoInviteSettings.AutoInviteKeyword) then
print("AutoInvite keyword is not set.")
else
print("AutoInvite keyword is set to '" .. AutoInviteSettings.AutoInviteKeyword .. "'.")
end
end
function AutoInvite:ProcessChannel(channel)
if not AutoInvite:StringIsNullOrEmpty(channel) then
AutoInvite:SetInviteChannel(channel, 0)
end
if AutoInvite:StringIsNullOrEmpty(AutoInviteSettings.AutoInviteChannel) then
print("AutoInvite channel is not set.")
else
print("AutoInvite channel is set to '" .. AutoInviteSettings.AutoInviteChannel .. "'.")
end
end
function AutoInvite:StringIsNullOrEmpty(s)
if s == nil or s == '' then
return true
end
end
function AutoInvite:SplitString(slashCommand, delimiter)
result = {}
for match in (slashCommand .. delimiter):gmatch("(.-)" .. delimiter) do
table.insert(result, match)
end
return result
end
|
-----------------------------------
-- Area: Southern SandOria [S]
-- NPC: Door:Lion Springs
-- !pos 96 0 106 80
-----------------------------------
require("scripts/globals/quests");
require("scripts/globals/missions");
require("scripts/globals/settings");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
if (player:getCurrentMission(WOTG) == tpz.mission.id.wotg.THE_QUEEN_OF_THE_DANCE) then
if (player:getCharVar("QueenOfTheDance") == 0) then
player:startEvent(68);
elseif (player:getCharVar("QueenOfTheDance") == 2) then
player:startEvent(70);
end
end
end;
function onEventUpdate(player,csid,option)
end;
function onEventFinish(player,csid,option)
if (csid == 68) then
player:setCharVar("QueenOfTheDance",1);
elseif (csid == 70) then
player:startEvent(152);
elseif (csid == 152) then
player:startEvent(153);
elseif (csid == 153) then
player:completeMission(WOTG, tpz.mission.id.wotg.THE_QUEEN_OF_THE_DANCE);
player:addMission(WOTG, tpz.mission.id.wotg.WHILE_THE_CAT_IS_AWAY);
player:delKeyItem(tpz.ki.MAYAKOV_SHOW_TICKET);
player:setCharVar("QueenOfTheDance",0);
end
end;
|
local SettingsData = Classes.ModSettingsClasses.SettingsData
---@class ProfileSettings
local ProfileSettings = {
Type = "ProfileSettings",
ID = "",
---@type SettingsData
Settings = nll
}
ProfileSettings.__index = ProfileSettings
---@param id string
---@param settings SettingsData|nil
function ProfileSettings:Create(id, settings)
local this =
{
ID = id,
Settings = settings or SettingsData:Create()
}
setmetatable(this, self)
return this
end
Classes.ModSettingsClasses.ProfileSettings = ProfileSettings
|
SB.Include(SB_VIEW_DIR .. "editor.lua")
PlayersWindow = Editor:extends{}
PlayersWindow:Register({
name = "playersWindow",
tab = "Misc",
caption = "Teams",
tooltip = "Edit teams",
image = SB_IMG_DIR .. "person.png",
order = 1,
})
function PlayersWindow:init()
self:super("init")
self.teamsPanel = StackPanel:New {
itemMargin = {0, 0, 0, 0},
x = 1,
y = 1,
right = 1,
autosize = true,
resizeItems = false,
}
SB.model.teamManager:addListener(self)
self:Populate()
self.btnAddPlayer = TabbedPanelButton({
x = 0,
y = 0,
tooltip = "Add team",
children = {
TabbedPanelImage({ file = SB_IMG_DIR .. "team-add.png" }),
TabbedPanelLabel({ caption = "Add" }),
},
OnClick = {
function()
local name = "New team: " .. tostring(#SB.model.teamManager:getAllTeams())
local color = { r=math.random(), g=math.random(), b=math.random(), a=1}
local allyTeam = 1
local side = Spring.GetSideData(1)
local cmd = AddTeamCommand(name, color, allyTeam, side)
SB.commandManager:execute(cmd)
end
},
})
self:AddDefaultKeybinding({
self.btnAddPlayer
})
local children = {
ScrollPanel:New {
x = 0,
y = 80,
bottom = 30,
right = 0,
borderColor = {0,0,0,0},
horizontalScrollbar = false,
children = {
self.teamsPanel
},
},
self.btnAddPlayer,
}
self:Finalize(children)
end
function PlayersWindow:Populate()
self.teamsPanel:ClearChildren()
--titles
local titlesPanel = MakeComponentPanel(self.teamsPanel)
local lblTeams = Label:New {
caption = "Teams",
x = 1,
width = 150,
parent = titlesPanel,
}
--teams
for _, team in pairs(SB.model.teamManager:getAllTeams()) do
local stackTeamPanel = MakeComponentPanel(self.teamsPanel)
local fontColor = SB.glToFontColor(team.color or {r=1, g=1, b=1})
local aiPrefix = "(Player) "
if team.gaia then
aiPrefix = "(Gaia)"
elseif team.ai then
aiPrefix = "(AI) "
end
local lblTeam = Label:New {
caption = aiPrefix .. fontColor .. "Team: " .. team.name .. "\b",
x = 1,
width = 150,
parent = stackTeamPanel,
}
if not team.gaia then
local btnEditTeam = Button:New {
caption = 'Edit',
x = 190,
width = 80,
height = SB.conf.B_HEIGHT,
parent = stackTeamPanel,
OnClick = {
function()
local playerWindow = PlayerWindow(team)
playerWindow.window.x = self.window.x + self.window.width
playerWindow.window.y = self.window.y
end
},
}
local btnRemoveTeam = Button:New {
caption = "",
x = 280,
width = SB.conf.B_HEIGHT,
height = SB.conf.B_HEIGHT,
parent = stackTeamPanel,
padding = {2, 2, 2, 2},
tooltip = "Remove team",
classname = "negative_button",
children = {
Image:New {
file = SB_IMG_DIR .. "cancel.png",
height = "100%",
width = "100%",
},
},
OnClick = {
function()
local cmd = RemoveTeamCommand(team.id)
SB.commandManager:execute(cmd)
end
}
}
end
end
end
function PlayersWindow:onTeamAdded(teamID)
self:Populate()
end
function PlayersWindow:onTeamRemoved(teamID)
self:Populate()
end
function PlayersWindow:onTeamChange(teamID, team)
self:Populate()
end
|
local new = require 'class'
local geo = require 'geo'
local Morsel = require 'food'
local World = new.class()
function World:init(state)
self.state = state
self.food = {}
end
function World:eat(i)
self.state:point(1)
table.remove(self.food, i)
end
function World:draw()
for _, m in ipairs(self.food) do
m:draw()
end
end
World.Random = new.class(World)
function World.Random:init(...)
World.init(self, ...)
self:genfood(1)
end
function World.Random:genfood(n)
for i = 1, n do
local pos = geo.vec2(math.random(50), math.random(50))
table.insert(self.food, new(Morsel, pos))
end
end
function World.Random:eat(i)
World.eat(self, i)
self:genfood(1)
end
return World
|
local M = {}
M.config = function()
local gps = require 'nvim-gps'
require('lualine').setup {
options = {
globalstatus = true,
},
sections = {
lualine_b = {
'branch',
'diff',
{
'diagnostics',
sources = { 'nvim_diagnostic' },
symbols = { error = '', warn = '', info = '', hint = '' },
update_in_insert = true,
},
},
lualine_c = { 'filename', 'lsp_progress', { gps.get_location, cond = gps.is_available } },
lualine_x = { 'filesize', 'encoding', 'fileformat', 'filetype' },
},
extensions = { 'nvim-tree', 'fugitive', 'symbols-outline' },
}
end
return M
|
-----------------------------------
-- Author : Reyn
-- Date : 2016-06-29
-- Comment : 日志记录
-----------------------------------
local Log = {}
local level_tab = {'LOG_DEBUG', 'LOG_INFO', 'LOG_WARNING', 'LOG_ERROR'}
Log.LEVEL = table.readOnly(table.enum(1, table.unpack(level_tab)))
local LOG_HEARDER = '@@@@@ LOG HEADER @@@@@'
local LOG_FOOTER = '@@@@@ LOG FOOTER @@@@@'
local LOG_TEXT = {
[Log.LEVEL.LOG_DEBUG ] = 'DEBUG',
[Log.LEVEL.LOG_INFO ] = 'INFO',
[Log.LEVEL.LOG_WARNING] = 'WARNING',
[Log.LEVEL.LOG_ERROR ] = 'ERROR',
}
local function checkLevel(log_level)
local LOG_LEVEL = Log.LEVEL
log_level = math.max(log_level, LOG_LEVEL.LOG_DEBUG)
log_level = math.min(log_level, LOG_LEVEL.LOG_ERROR)
return log_level
end
function Log:setLogPath(log_path)
self.log_path = log_path or cc.FileUtils:getInstance():getWritablePath()
end
function Log:setLogLevel(log_level)
self.log_level = checkLevel(log_level)
end
function Log:writeLog(text, log_level)
log_level = log_level or self.log_level
-- organize content
local LOG_DATE = Date.ymd()
local LOG_TIME = Date.hms()
local FULLPATH = self.log_path .. LOG_DATE .. '.log'
local LOG_FORMAT = {
{'HEADER', LOG_HEARDER},
{'LEVEL', LOG_TEXT[log_level] or tostring(log_level)},
{'DATE', LOG_DATE},
{'TIME', LOG_TIME},
{'MSG', text},
{'FOOTER', LOG_FOOTER},
}
local LOG_CONTENT = {}
for i=1, #LOG_FORMAT do
local item = LOG_FORMAT[i]
local str = string.format('[%-6s] : %s ', item[1], item[2])
LOG_CONTENT[#LOG_CONTENT+1] = str
end
local content = table.concat(LOG_CONTENT, '\n') .. '\n\n\n'
-- write content
local fp = io.open(FULLPATH, 'a+')
fp:write(content)
fp:flush()
fp:close()
end
function Log:info(text)
self:writeLog(text, Log.LEVEL.LOG_INFO)
end
function Log:debug(text)
self:writeLog(text, Log.LEVEL.LOG_DEBUG)
end
function Log:warning(text)
self:writeLog(text, Log.LEVEL.LOG_WARNING)
end
function Log:error(text)
self:writeLog(text, Log.LEVEL.LOG_ERROR)
end
return Log
|
TOOL.Category = 'Flux'
TOOL.Name = 'Text Tool'
TOOL.Command = nil
TOOL.ConfigName = ''
TOOL.permission = 'texts'
TOOL.ClientConVar['text'] = 'Sample Text'
TOOL.ClientConVar['style'] = '1'
TOOL.ClientConVar['scale'] = '1'
TOOL.ClientConVar['fade'] = '0'
TOOL.ClientConVar['r'] = 255
TOOL.ClientConVar['g'] = 255
TOOL.ClientConVar['b'] = 255
TOOL.ClientConVar['a'] = 255
TOOL.ClientConVar['r2'] = 255
TOOL.ClientConVar['g2'] = 0
TOOL.ClientConVar['b2'] = 0
TOOL.ClientConVar['a2'] = 100
function TOOL:LeftClick(trace)
if CLIENT then return true end
local player = self:GetOwner()
if !IsValid(player) or !player:can('textadd') then return end
local text = self:GetClientInfo('text')
local style = self:GetClientNumber('style')
local scale = self:GetClientNumber('scale')
local color = Color(self:GetClientNumber('r', 0), self:GetClientNumber('g', 0), self:GetClientNumber('b', 0), self:GetClientNumber('a', 0))
local extra_color = Color(self:GetClientNumber('r2', 0), self:GetClientNumber('g2', 0), self:GetClientNumber('b2', 0), self:GetClientNumber('a2', 0))
local fade_offset = self:GetClientNumber('fade')
if !text or text == '' then return false end
local angle = trace.HitNormal:Angle()
angle:RotateAroundAxis(angle:Forward(), 90)
angle:RotateAroundAxis(angle:Right(), 270)
local data = {
text = text,
style = style,
color = color,
extra_color = extra_color,
angle = angle,
pos = trace.HitPos,
normal = trace.HitNormal,
scale = scale,
fade_offset = fade_offset
}
SurfaceText:add_text(data)
player:notify('notification.3d_text.text_added')
return true
end
function TOOL:RightClick(trace)
if CLIENT then return true end
SurfaceText:remove_text(self:GetOwner())
return true
end
local text_styles = {
['tool.texts.opt1'] = 1,
['tool.texts.opt2'] = 2,
['tool.texts.opt3'] = 3,
['tool.texts.opt4'] = 4,
['tool.texts.opt5'] = 5,
['tool.texts.opt6'] = 6,
['tool.texts.opt7'] = 7,
['tool.texts.opt8'] = 8,
['tool.texts.opt9'] = 9,
['tool.texts.opt91'] = 10
}
function TOOL.BuildCPanel(CPanel)
local options = {}
for k, v in pairs(text_styles) do
options[t(k)] = { ['texts_style'] = v }
end
CPanel:AddControl('Header', { Description = t'tool.texts.desc' })
local control_resets = CPanel:AddControl('ComboBox', { MenuButton = 1, Folder = 'textstyle', Options = options, CVars = { 'texts_style' } })
control_resets.Button:SetVisible(false)
control_resets.DropDown:SetValue('Please Choose')
CPanel:AddControl('TextBox', { Label = t'tool.texts.text', Command = 'texts_text', MaxLenth = '128' })
CPanel:AddControl('Color', { Label = t'tool.texts.color', Red = 'texts_r', Green = 'texts_g', Blue = 'texts_b', Alpha = 'texts_a' })
CPanel:AddControl('Color', { Label = t'tool.texts.extra_color', Red = 'texts_r2', Green = 'texts_g2', Blue = 'texts_b2', Alpha = 'texts_a2' })
CPanel:AddControl('Slider', { Label = t'tool.texts.scale', Command = 'texts_scale', Type = 'Float', Min = 0.01, Max = 10 })
CPanel:AddControl('Slider', { Label = t'tool.texts.fade', Command = 'texts_fade', Type = 'Integer', Min = -1024, Max = 10000 })
end
|
local api = vim.api
Buffer = require("sql.ui.buffer")
Utils = require("sql.utils")
function OPEN()
vim.cmd('tabnew')
buffer = Buffer:new(vim.api.nvim_get_current_buf())
buffer:set_filetype('sql')
buffer:set_name('testname')
end
|
local word = request('^.words.word')
local name = request('^.words.name')
return
{
name = 'goto_statement',
word('goto'),
name,
}
|
--[[
© 2021 FedeIlLeone
EditStats - EditStats client side module
Functions:
EditStats.Init()
EditStats.Submit() --> [Table]
--]]
local EditStats = {}
local Players = game:GetService("Players")
local Frames = script.Parent.Parent.Frames
local EditStatsFrame = Frames.Pages.EditStatsFrame
local recentPlayers = { unpack(Players:GetPlayers()) }
Players.PlayerAdded:Connect(function(player)
if not table.find(recentPlayers, player) then
table.insert(recentPlayers, player)
end
end)
function EditStats:Init()
local PlayerTextBox = EditStatsFrame.PlayerTextBox
local ValueTextBox = EditStatsFrame.ValueTextBox
PlayerTextBox.TextBox.FocusLost:Connect(function()
if PlayerTextBox.TextBox.Text ~= "" then
for _, player in pairs(recentPlayers) do
if string.sub(string.lower(player.Name), 1, #PlayerTextBox.TextBox.Text) == string.lower(PlayerTextBox.TextBox.Text) or string.sub(string.lower(player.DisplayName), 1, #PlayerTextBox.TextBox.Text) == string.lower(PlayerTextBox.TextBox.Text) then
PlayerTextBox.TextBox.Text = player.Name
end
end
end
end)
ValueTextBox.TextBox:GetPropertyChangedSignal("Text"):Connect(function()
ValueTextBox.TextBox.Text = string.gsub(ValueTextBox.TextBox.Text, "[^%d]", "")
end)
end
function EditStats:Submit()
local PlayerTextBox = EditStatsFrame.PlayerTextBox
local ReasonTextBox = EditStatsFrame.ReasonTextBox
local ValueTextBox = EditStatsFrame.ValueTextBox
local request = {
EventType = "EditStats",
Additional = {
Player = PlayerTextBox.TextBox.Text,
Reason = ReasonTextBox.TextBox.Text,
Value = ValueTextBox.TextBox.Text
}
}
PlayerTextBox.TextBox.Text = ""
ReasonTextBox.TextBox.Text = ""
ValueTextBox.TextBox.Text = ""
return request
end
return EditStats
|
list.Set( "PlayerOptionsModel", "MedicMarine", "models/player/samzanemesis/MarineMedic.mdl" )
list.Set( "PlayerOptionsModel", "SpecialMarine", "models/player/samzanemesis/MarineSpecial.mdl" )
list.Set( "PlayerOptionsModel", "OfficerMarine", "models/player/samzanemesis/MarineOfficer.mdl" )
list.Set( "PlayerOptionsModel", "TechMarine", "models/player/samzanemesis/MarineTech.mdl" )
local SB = {}
local status = false
--Local functions
-- used for sun effects
local stars = {}
-- Used for planet effects
local planets = {} --Clients hasn't been updated yet
-- enabled?
local Color_Enabled = false;
local Bloom_Enabled = false;
-- Color Variables.
local ColorModify = {
[ "$pp_colour_addr" ] = 0,
[ "$pp_colour_addg" ] = 0,
[ "$pp_colour_addb" ] = 0,
[ "$pp_colour_brightness" ] = 0,
[ "$pp_colour_contrast" ] = 0,
[ "$pp_colour_colour" ] = 0,
[ "$pp_colour_mulr" ] = 0,
[ "$pp_colour_mulg" ] = 0,
[ "$pp_colour_mulb" ] = 0,
};
-- Bloom Variables
local Bloom = {
darken = 0,
multiply = 0,
sizex = 0,
sizey = 0,
passes = 0,
color = 0,
col = {
r = 0,
g = 0,
b = 0,
},
};
-- Color receive message
local function SetColor(planet)
-- don't support colormod?
if( not render.SupportsPixelShaders_2_0() ) then return; end
-- enabled?
Color_Enabled = planet.color
if( not Color_Enabled ) then return; end
-- read attributes
ColorModify[ "$pp_colour_addr" ] = planet.AddColor_r
ColorModify[ "$pp_colour_addg" ] = planet.AddColor_g
ColorModify[ "$pp_colour_addb" ] = planet.AddColor_b
ColorModify[ "$pp_colour_brightness" ] = planet.Brightness
ColorModify[ "$pp_colour_contrast" ] = planet.Contrast
ColorModify[ "$pp_colour_colour" ] = planet.CColor
ColorModify[ "$pp_colour_mulr" ] = planet.AddColor_r
ColorModify[ "$pp_colour_mulg" ] = planet.AddColor_g
ColorModify[ "$pp_colour_mulb" ] = planet.AddColor_b
end
-- Bloom receive message
local function SetBloom(planet)
-- don't support bloom?
if( not render.SupportsPixelShaders_2_0() ) then return; end
-- enabled?
Bloom_Enabled = planet.bloom
if( not Bloom_Enabled ) then return; end
-- read attributes
Bloom.darken = planet.Darken
Bloom.multiply = planet.Multiply
Bloom.sizex = planet.SizeX
Bloom.sizey = planet.SizeY
Bloom.passes = planet.Passes
Bloom.color = planet.BColor
Bloom.col.r = planet.Col_r
Bloom.col.g = planet.Col_g
Bloom.col.b = planet.Col_b
end
-- render.
local function Render( )
if( Color_Enabled ) then
-- draw colormod.
DrawColorModify( ColorModify );
end
if( Bloom_Enabled ) then
-- draw bloom.
--DrawBloom( darken, multiply, sizex, sizey, passes, color, colr, colg, colb )
DrawBloom(
Bloom.darken,
Bloom.multiply,
Bloom.sizex,
Bloom.sizey,
Bloom.passes,
Bloom.color,
Bloom.col.r,
Bloom.col.g,
Bloom.col.b
);
end
end
local function DrawSunEffects( )
-- no pixel shaders? no sun effects!
if( not render.SupportsPixelShaders_2_0() ) then return; end
-- render each star.
for ent, Sun in pairs( stars ) do
-- calculate brightness.
local entpos = Sun.Position --Sun.ent:LocalToWorld( Vector(0,0,0) )
local normVec = Vector( entpos - EyePos() )
normVec:Normalize()
local dot = math.Clamp( EyeAngles():Forward():DotProduct( normVec ), -1, 1 );
dot = math.abs(dot)
--local dist = Vector( entpos - EyePos() ):Length();
local dist = entpos:Distance(EyePos())/1.5
-- draw sunbeams.
local sunpos = EyePos() + normVec * ( dist * 0.5 );
local scrpos = sunpos:ToScreen();
if( dist <= Sun.BeamRadius and dot > 0 ) then
local frac = ( 1 - ( ( 1 / ( Sun.BeamRadius ) ) * dist ) ) * dot;
-- draw sun.
--DrawSunbeams( darken, multiply, sunsize, sunx, suny )
DrawSunbeams(
0.95,
frac,
0.255,
scrpos.x / ScrW(),
scrpos.y / ScrH()
);
end
-- can the sun see us?
local trace = {
start = entpos,
endpos = EyePos(),
filter = LocalPlayer(),
};
local tr = util.TraceLine( trace );
-- draw!
if( dist <= Sun.Radius and dot > 0 and tr.Fraction >= 1 ) then
-- calculate brightness.
local frac = ( 1 - ( ( 1 / Sun.Radius ) * dist ) ) * dot;
-- draw bloom.
DrawBloom(
0.428,
3 * frac,
15 * frac, 15 * frac,
5,
0,
1,
1,
1
);
--[[DrawBloom(
0,
0.75 * frac,
3 * frac, 3 * frac,
2,
3,
1,
1,
1
);]]
-- draw color.
local tab = {
['$pp_colour_addr'] = 0.35 * frac,
['$pp_colour_addg'] = 0.15 * frac,
['$pp_colour_addb'] = 0.05 * frac,
['$pp_colour_brightness'] = 0.8 * frac,
['$pp_colour_contrast'] = 1 + ( 0.15 * frac ),
['$pp_colour_colour'] = 1,
['$pp_colour_mulr'] = 0,
['$pp_colour_mulg'] = 0,
['$pp_colour_mulb'] = 0,
};
-- draw colormod.
DrawColorModify( tab );
end
end
end
local function recPlanet( msg )
local ent = msg:ReadShort()
local hash = {}
hash.ent = ents.GetByIndex(ent)
hash.name = msg:ReadString()
hash.position = msg:ReadVector()
hash.radius = msg:ReadFloat()
if msg:ReadBool() then
hash.color = true
hash.AddColor_r = msg:ReadShort()
hash.AddColor_g = msg:ReadShort()
hash.AddColor_b = msg:ReadShort()
hash.MulColor_r = msg:ReadShort()
hash.MulColor_g = msg:ReadShort()
hash.MulColor_b = msg:ReadShort()
hash.Brightness = msg:ReadFloat()
hash.Contrast = msg:ReadFloat()
hash.CColor = msg:ReadFloat()
else
hash.color = false
end
if msg:ReadBool() then
hash.bloom = true
hash.Col_r = msg:ReadShort()
hash.Col_g = msg:ReadShort()
hash.Col_b = msg:ReadShort()
hash.SizeX = msg:ReadFloat()
hash.SizeY = msg:ReadFloat()
hash.Passes = msg:ReadFloat()
hash.Darken = msg:ReadFloat()
hash.Multiply = msg:ReadFloat()
hash.BColor = msg:ReadFloat()
else
hash.bloom = false
end
planets[ent] = hash
end
usermessage.Hook( "AddPlanet", recPlanet );
-- receive sun information
local function recvSun( msg )
local ent = msg:ReadShort()
local tmpname = msg:ReadString()
local position = msg:ReadVector()
local radius = msg:ReadFloat()
stars[ ent] = {
Ent = ents.GetByIndex(ent),
name = tmpname,
Position = position,
Radius = radius, -- * 2
BeamRadius = radius * 1.5, --*3
}
end
usermessage.Hook( "AddStar", recvSun );
--End Local Functions
--The Class
--[[
The Constructor for this Custom Addon Class
]]
function SB.__Construct()
hook.Add( "RenderScreenspaceEffects", "VFX_Render", Render );
hook.Add( "RenderScreenspaceEffects", "SunEffects", DrawSunEffects );
CAF.AddHook("think2", SB.Space_Affect_Cl)
status = true;
return true
end
--[[
The Destructor for this Custom Addon Class
]]
function SB.__Destruct()
hook.Remove( "RenderScreenspaceEffects", "VFX_Render");
hook.Remove( "RenderScreenspaceEffects", "SunEffects");
CAF.RemoveHook("think2", SB.Space_Affect_Cl)
status = false;
return true
end
--Custom Functions
function SB.Space_Affect_Cl()
if table.Count(planets) <= 0 then return end
local ply = LocalPlayer()
if not (ply and ply:IsValid() and ply:Alive()) then return end
local plypos = ply:LocalToWorld( Vector(0,0,0) )
for ent, p in pairs( planets ) do
local ppos = p.position --:LocalToWorld( Vector(0,0,0) )
if plypos:Distance(ppos) < p.radius then
if not ply.planet or ply.planet ~= ent then
ply:ChatPrint("Entering "..tostring(p.name))
SetBloom(p)
SetColor(p)
ply.planet = ent
end
return
end
end
if (ply.planet ~= nil) then
Color_Enabled = false
Bloom_Enabled = false
ply.planet = nil
end
end
--End
--[[
Get the Boolean Status from this Addon Class
]]
function SB.GetStatus()
return status
end
--[[
Get the Version of this Custom Addon Class
]]
function SB.GetVersion()
return 3.1, CAF.GetLangVar("Beta")
end
--[[
Get any custom options this Custom Addon Class might have
]]
function SB.GetExtraOptions()
return {}
end
--[[
Gets a menu from this Custom Addon Class
]]
function SB.GetMenu(menutype, menuname) --Name is nil for main menu, String for others
local data = {}
return data
end
--[[
Get the Custom String Status from this Addon Class
]]
function SB.GetCustomStatus()
return
end
--[[
Returns a table containing the Description of this addon
]]
function SB.GetDescription()
return {
"Spacebuild Addon",
"",
"Prviously a Gamemode",
""
}
end
CAF.RegisterAddon("Spacebuild", SB, "1")
|
local Linq = require "linq";
require "list";
--- @type List|ReadOnlyCollection|OrderedEnumerable|Enumerable
local List = Linq.List;
--- @type Enumerable
local Enumerable = Linq.Enumerable;
describe("List:Add", function()
it("adds an item", function()
local list = List.New({"a", 12, false, {}});
assert.equal(4, list.Length);
list:Add(1);
list:Add(1);
list:Add(2);
list:Add("a");
list:Add(3);
list:Add(4);
list:Add({});
list:Add({});
list:Add(true);
list:Add(false);
assert.equal(14, list.Length);
end);
it("add nil values", function()
local list = List.New({"a", 12, false, nil, {}});
assert.equal(4, list.Length);
list:Add(nil);
assert.equal(5, list.Length);
list:Add("b");
assert.equal(6, list.Length);
assert.same({"a", 12, false, {}, "b"}, list:ToArray());
assert.same({"a", 12, false, {}, [6] = "b"}, list:ToTable());
end);
end);
describe("List:AddRange", function()
it("adds items", function()
local list = List.New({"a", 12, false, {}});
assert.equal(4, list.Length);
list:AddRange({1, 12, "a", 3, 4, {}, {}, true, false});
assert.equal(13, list.Length);
end);
it("adds items from an enumerable", function()
local list = List.New({"a", 12, false, {}});
assert.equal(4, list.Length);
list:AddRange(Enumerable.From({1, 12, "a", 3, 4, {}, {}, true, false}));
assert.equal(13, list.Length);
end);
it("doesn't add nil values", function()
local list = List.New({"a", 12, false, nil, {}});
assert.equal(4, list.Length);
list:AddRange({nil, 1});
assert.equal(5, list.Length);
end);
it("doesn't change when the list is empty", function()
local list = List.New({"a", 12, false, nil, {}});
assert.equal(4, list.Length);
list:AddRange({});
assert.equal(4, list.Length);
end);
end);
describe("List:Clear", function()
it("clears all items from the list", function()
local list = List.New({"a", 12, false, {}});
list:Add(1);
list:Add(2);
list:Add(3);
list:Add(4);
list:Add({});
list:Add({});
list:Add(true);
list:Add(false);
assert.is_true(list:Contains("a"));
assert.is_true(list:Contains(1));
assert.equal(12, list.Length);
list:Clear();
assert.is_false(list:Contains("a"));
assert.is_false(list:Contains(1));
assert.equal(0, list.Length);
assert.same({}, list:ToArray());
end);
end);
describe("List.New", function()
it("creates an list using the given array as source", function()
local list = List.New({1, 2, 3, 4});
assert.same({1, 2, 3, 4}, list:ToArray());
end);
it("creates an list using the given enumerable as source", function()
local list = List.New(Linq.Enumerable.From({1, 2, 3, 4}));
assert.same({1, 2, 3, 4}, list:ToArray());
end);
it("creates an list that can be used with operations", function()
local list = List.New({1, 2, a = 3, b = 4});
assert.same({2, 4, 6, 8}, list:Select(function(n) return n * 2; end):ToTable());
end);
end);
describe("List:RemoveAt", function()
it("removes an item at the specified index", function()
local list = List.New({"a", 12, false, {}});
assert.equal(4, list.Length);
list:RemoveAt(4);
assert.equal(3, list.Length);
assert.same({"a", 12, false}, list:ToArray());
list:RemoveAt(1);
assert.equal(2, list.Length);
assert.same({12, false}, list:ToArray());
end);
it("raises an error when the index is out of range", function()
local list = List.New({"a", 12, false, nil, {}});
assert.has_error(function() list:RemoveAt(5); end, "index is equal to or greater than Length.");
assert.has_error(function() list:RemoveAt(10); end, "index is equal to or greater than Length.");
assert.same({"a", 12, false, {}}, list:ToArray());
end);
it("raises an error when the index is equal or less than 0", function()
local list = List.New({"a", 12, false, nil, {}});
assert.has_error(function() list:RemoveAt(0); end, "index is less than 1.");
assert.has_error(function() list:RemoveAt(-1); end, "index is less than 1.");
assert.has_error(function() list:RemoveAt(-10); end, "index is less than 1.");
assert.same({"a", 12, false, {}}, list:ToArray());
end);
end);
|
-------------------------------------------------------------------------------
-- Spine Runtimes License Agreement
-- Last updated January 1, 2020. Replaces all prior versions.
--
-- Copyright (c) 2013-2020, Esoteric Software LLC
--
-- Integration of the Spine Runtimes into software or otherwise creating
-- derivative works of the Spine Runtimes is permitted under the terms and
-- conditions of Section 2 of the Spine Editor License Agreement:
-- http://esotericsoftware.com/spine-editor-license
--
-- Otherwise, it is permitted to integrate the Spine Runtimes into software
-- or otherwise create derivative works of the Spine Runtimes (collectively,
-- "Products"), provided that each user of the Products must obtain their own
-- Spine Editor license and redistribution of the Products in any form must
-- include this license and copyright notice.
--
-- THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "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 ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
-- BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) 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
-- THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
local AttachmentType = {
region = 0,
boundingbox = 1,
mesh = 2,
skinnedmesh = 3
}
return AttachmentType
|
return function(showNames)
return {
type = script.Name,
showNames = showNames,
}
end
|
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local ATTRIBUTEINFO_PB = require("AttributeInfo_pb")
module('ItemForge_pb')
ITEMFORGE = protobuf.Descriptor();
local ITEMFORGE_ATTRS_FIELD = protobuf.FieldDescriptor();
local ITEMFORGE_UNREPLACEDATTR_FIELD = protobuf.FieldDescriptor();
local ITEMFORGE_HAVEATTRS_FIELD = protobuf.FieldDescriptor();
ITEMFORGE_ATTRS_FIELD.name = "attrs"
ITEMFORGE_ATTRS_FIELD.full_name = ".KKSG.ItemForge.attrs"
ITEMFORGE_ATTRS_FIELD.number = 1
ITEMFORGE_ATTRS_FIELD.index = 0
ITEMFORGE_ATTRS_FIELD.label = 3
ITEMFORGE_ATTRS_FIELD.has_default_value = false
ITEMFORGE_ATTRS_FIELD.default_value = {}
ITEMFORGE_ATTRS_FIELD.message_type = ATTRIBUTEINFO_PB.ATTRIBUTEINFO
ITEMFORGE_ATTRS_FIELD.type = 11
ITEMFORGE_ATTRS_FIELD.cpp_type = 10
ITEMFORGE_UNREPLACEDATTR_FIELD.name = "unReplacedAttr"
ITEMFORGE_UNREPLACEDATTR_FIELD.full_name = ".KKSG.ItemForge.unReplacedAttr"
ITEMFORGE_UNREPLACEDATTR_FIELD.number = 2
ITEMFORGE_UNREPLACEDATTR_FIELD.index = 1
ITEMFORGE_UNREPLACEDATTR_FIELD.label = 1
ITEMFORGE_UNREPLACEDATTR_FIELD.has_default_value = false
ITEMFORGE_UNREPLACEDATTR_FIELD.default_value = nil
ITEMFORGE_UNREPLACEDATTR_FIELD.message_type = ATTRIBUTEINFO_PB.ATTRIBUTEINFO
ITEMFORGE_UNREPLACEDATTR_FIELD.type = 11
ITEMFORGE_UNREPLACEDATTR_FIELD.cpp_type = 10
ITEMFORGE_HAVEATTRS_FIELD.name = "haveAttrs"
ITEMFORGE_HAVEATTRS_FIELD.full_name = ".KKSG.ItemForge.haveAttrs"
ITEMFORGE_HAVEATTRS_FIELD.number = 3
ITEMFORGE_HAVEATTRS_FIELD.index = 2
ITEMFORGE_HAVEATTRS_FIELD.label = 3
ITEMFORGE_HAVEATTRS_FIELD.has_default_value = false
ITEMFORGE_HAVEATTRS_FIELD.default_value = {}
ITEMFORGE_HAVEATTRS_FIELD.type = 13
ITEMFORGE_HAVEATTRS_FIELD.cpp_type = 3
ITEMFORGE.name = "ItemForge"
ITEMFORGE.full_name = ".KKSG.ItemForge"
ITEMFORGE.nested_types = {}
ITEMFORGE.enum_types = {}
ITEMFORGE.fields = {ITEMFORGE_ATTRS_FIELD, ITEMFORGE_UNREPLACEDATTR_FIELD, ITEMFORGE_HAVEATTRS_FIELD}
ITEMFORGE.is_extendable = false
ITEMFORGE.extensions = {}
ItemForge = protobuf.Message(ITEMFORGE)
|
return {
Properties = {
["Name"] = "Original Light";
["ImageId"] = "rbxassetid://2919688393";
},
Settings = {
["Background Color"] = Color3.fromRGB(255, 255, 255);
["Built-in Function Color"] = Color3.fromRGB(0, 0, 127);
["Comment Color"] = Color3.fromRGB(0, 127, 0);
["Error Color"] = Color3.fromRGB(255, 0, 0);
["Find Selection Background Color"] = Color3.fromRGB(246, 185, 63);
["Keyword Color"] = Color3.fromRGB(0, 0, 127);
["Matching Word Background Color"] = Color3.fromRGB(226, 230, 214);
["Number Color"] = Color3.fromRGB(0, 127, 127);
["Operator Color"] = Color3.fromRGB(127, 127, 195);
["Preprocessor Color"] = Color3.fromRGB(127, 0, 0);
["Selection Background Color"] = Color3.fromRGB(110, 161, 241);
["Selection Color"] = Color3.fromRGB(225, 225, 225);
["String Color"] = Color3.fromRGB(127, 0, 127);
["Text Color"] = Color3.fromRGB(0, 0, 0);
["Warning Color"] = Color3.fromRGB(0, 0, 255);
}
}
|
local loader = {}
local log = require("log")
local notification = require("notification")
local configdir = love.filesystem.getSaveDirectory()
function loader.loadFile(file, clonesTbl)
if file and love.filesystem.getInfo(file, "file") then
log.info("[CLONES] Load: %s/%s", configdir, file)
local status, chunk = pcall(love.filesystem.load, file)
if not status then
-- Failed loading chunk, chunk is an error string
log.error(chunk)
notification.error(chunk)
elseif chunk then
-- Create a sandboxed lua environment
local env = {}
env._G = env
-- Set the loaded chunk inside the sandbox
setfenv(chunk, env)
local status, custom_clones = pcall(chunk)
if not status then
-- Failed calling the chunk, custom_clones is an error string
log.error(custom_clones)
notification.error(custom_clones)
else
local num_clones = 0
for clone_id, clones in pairs(custom_clones) do
if type(clones) == "table" then
clonesTbl[clone_id] = {}
for version, info in pairs(clones) do
if info.id and info.version then
num_clones = num_clones + 1
log.debug("[CLONES] %s[%d] = %s[%d]", clone_id, version, info.id, info.version)
clonesTbl[clone_id][version] = info
end
end
end
end
log.info("[CLONES] Loaded %d clones from %s", num_clones, file)
notification.coloredMessage(("Loaded %d clones from %s"):format(num_clones, file))
end
end
end
end
return loader
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.