PWADÚ-- Freeslot. freeslot("MT_EMERALDDISPLAY", "S_EMERALDDISPLAY", "S_EMERALDDISPLAY_HIDE", "S_EMERALDDISPLAY_TOKEN", "MT_EMERALDSPARKLE","S_EMERALDSPARKLE1", "S_EMERALDSPARKLE2", "SPR_ESPK") -- Key thing local display = 0 addHook("KeyDown", function(keyevent) if keyevent.repeated then return end local aa, ab = input.gameControlToKeyNum(GC_SCORES) local ba, bb = input.gameControl2ToKeyNum(GC_SCORES) if keyevent.num == aa or keyevent.num == ab then display = $|1 end if keyevent.num == ba or keyevent.num == bb then display = $|2 end end) addHook("KeyUp", function(keyevent) if keyevent.repeated then return end local aa, ab = input.gameControlToKeyNum(GC_SCORES) local ba, bb = input.gameControl2ToKeyNum(GC_SCORES) if keyevent.num == aa or keyevent.num == ab then display = $ & ~1 end if keyevent.num == ba or keyevent.num == bb then display = $ & ~2 end end) -- The hooks addHook("PlayerThink", function(player) if player == consoleplayer and display&1 or player == secondarydisplayplayer and display&2 then player.gamestatus = true else player.gamestatus = false end if not player.mo or not player.mo.valid then return end if player.gamestatus then hud.disable("coopemeralds") if not player.displayemeralds or not player.displayemeralds[1] or not player.displayemeralds[1].valid then player.displayemeralds = {} for i = 1, 7 do local a = P_SpawnMobjFromMobj(player.mo, 0,0,player.height/2, MT_EMERALDDISPLAY) a.angle = FixedAngle(360*FRACUNIT/7 * i) player.displayemeralds[i] = a a.scale = player.mo.scale a.target = player.mo a.emeralddisplay = i end end end end) local coltable = { SKINCOLOR_EMERALD, SKINCOLOR_MAGENTA, SKINCOLOR_BLUE, SKINCOLOR_SKY, SKINCOLOR_YELLOW, SKINCOLOR_RED, SKINCOLOR_GREY } local function firstNotTaken(e) for i = 0, 6 do if not (e&(2^i)) then return i+1 end end return 0 end addHook("MobjThinker", function(mo) if not mo.target or not mo.target.valid or not mo.target.player or not mo.target.player.gamestatus then -- kys mo.target.player.displayemeralds[mo.emeralddisplay] = nil P_RemoveMobj(mo) return end -- Update position and scale local a = ANG1+4900000 if mo.target.player.powers[pw_super] then a = $*4 elseif P_SuperReady(mo.target.player) then a = $*2 end mo.angle = $+a mo.scale = mo.target.scale P_TeleportMove(mo, mo.target.x+FixedMul(32*mo.scale, cos(mo.angle)), mo.target.y+FixedMul(32*mo.scale, sin(mo.angle)), mo.target.z+(mo.target.height/2)+FixedMul(10*mo.scale, cos(mo.angle-mo.target.angle+ANG60))) -- Sprite local e = emeralds if mo.target.player.powers[pw_emeralds] then e = mo.target.player.powers[pw_emeralds] end if e & 2^(mo.emeralddisplay-1) then mo.state = S_EMERALDDISPLAY; mo.frame = FF_FULLBRIGHT|(mo.emeralddisplay-1) else mo.state = S_EMERALDDISPLAY_HIDE end if token and mo.emeralddisplay == firstNotTaken(e) then mo.state = S_EMERALDDISPLAY_TOKEN end -- Sparkle if mo.state != S_EMERALDDISPLAY_HIDE and leveltime&1 then local g = P_SpawnMobjFromMobj(mo, 0,0,8*FRACUNIT, MT_EMERALDSPARKLE) g.color = coltable[mo.emeralddisplay] end end, MT_EMERALDDISPLAY)# States State S_EMERALDDISPLAY SpriteName = CEMG SpriteFrame = FF_FULLBRIGHT|A Duration = -1 Next = S_EMERALDDISPLAY State S_EMERALDDISPLAY_HIDE SpriteName = NULL SpriteFrame = A Duration = -1 Next = S_EMERALDDISPLAY State S_EMERALDDISPLAY_TOKEN SpriteName = CEMG SpriteFrame = FF_FULLBRIGHT|H Duration = -1 Next = S_EMERALDDISPLAY State S_EMERALDSPARKLE1 SpriteName = ESPK SpriteFrame = FF_FULLBRIGHT|A Duration = 15 Next = S_EMERALDSPARKLE2 State S_EMERALDSPARKLE2 SpriteName = ESPK SpriteFrame = FF_FULLBRIGHT|FF_ANIMATE|B Duration = 15 Var1 = 2 Var2 = 5 Next = S_NULL #Objects Object MT_EMERALDDISPLAY MapThingNum = -1 SpawnState = S_EMERALDDISPLAY SpawnHealth = 1 ReactionTime = 0 Speed = 1 Radius = 16*FRACUNIT Height = 16*FRACUNIT Mass = 1000 DispOffset = -1 Flags = MF_SCENERY|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT Object MT_EMERALDSPARKLE MapThingNum = -1 SpawnState = S_EMERALDSPARKLE1 SpawnHealth = 1 ReactionTime = 0 Speed = 1 Radius = 16*FRACUNIT Height = 16*FRACUNIT Mass = 1000 DispOffset = -1 Flags = MF_SCENERY|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT ,28>FT\bheeeÿ```ÿÿ````ÿ ee``eeÿ````ÿÿ```ÿeeeÿ$*08DLReeeÿ```ÿeeeeÿee``eeÿeeeeÿ```ÿeeeÿ"(28eeeÿ```ÿee``eeÿ```ÿeeeÿ"```ÿ````ÿ```ÿ 8LUA_HUDDjSOC_OBJC®S_START®nESPKA0XESPKB0t>ESPKC0²(ESPKD0ÚS_END