Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- freeslot(
- "MT_SPECIALRING",
- "S_SRING",
- "S_SRING2",
- "S_SRING3",
- "S_SRING4",
- "S_SRING5",
- "S_SRING6",
- "S_SRING7"
- )
- // goal thinker to spawn special stage token !!!!!
- addHook("MobjThinker", function(sign)
- if not sign.lock then
- sign.lock = true
- mapsign = sign.lock
- end
- end, MT_SIGN)
- addHook("MobjThinker", function(sign)
- if sign.canspawn == nil
- sign.canspawn = true
- end
- if (modeattacking) return end // buuh, record attack and chaos emeralds!
- if not sign.target // poor sign, it doesn't have a target : <
- or (sign.target.health < 51 // the target has less than 50 rings, we don't give a fuck about it, then!
- and sign.target.player.health < 51) // the target has less than 50 rings, we don't give a fuck about it, then!
- and not token
- and not warped == true
- P_SupermanLook4Players(sign) // look for player, anywhere in the map!
- sign.canspawn = true // sign can spawn token again, then
- end
- if sign.target
- and sign.target.valid
- if not All7Emeralds(emeralds)
- if sign.target.player.health >= 51
- and sign.target.health >= 51
- and R_PointToDist2(sign.target.x, sign.target.y, sign.x, sign.y) < 5000*FRACUNIT
- if mapsign == false
- mapsign = true
- //if (netgame)
- //S_StartSound(sign.target, sfx_s3k74, sign.target.player)
- //end
- end
- if sign.canspawn == true
- and sign.target.the_sign == false
- local token = P_SpawnMobj(sign.x, sign.y, sign.z + 80*FRACUNIT, MT_EMMY)
- token.dvdss = true
- token.scale = 4*FRACUNIT
- local p = sign.target
- token.target = p
- p.the_sign = true
- sign.canspawn = false
- token.disapear = 0
- end
- else
- sign.target.the_sign = false
- sign.canspawn = true
- mapsign = false
- end
- end
- end
- end, MT_SIGN)
- /*local function hud_ring(v, stplyr)
- //Cache 10 ring sprite frames
- local p_ring0 = v.cachePatch("NHUD1")
- local p_ring1 = v.cachePatch("NHUD2")
- local p_ring2 = v.cachePatch("NHUD3")
- local p_ring3 = v.cachePatch("NHUD4")
- local p_ring4 = v.cachePatch("NHUD5")
- local p_ring5 = v.cachePatch("NHUD6")
- local p_ring6 = v.cachePatch("NHUD7")
- local p_ring7 = v.cachePatch("NHUD8")
- local p_ring8 = v.cachePatch("NHUD9")
- local p_ring9 = v.cachePatch("NHUD10")
- local p_ring10 = v.cachePatch("NHUD11")
- local p_ring11 = v.cachePatch("NHUD12")
- if mapsign == true
- and not warped == true
- and (netgame)
- //convert the leveltime from tics to double centisecond digits
- local time=G_TicsToCentiseconds(leveltime)
- local STime //The Centiseconds # as s string
- //if time is a single digit (<10), append a 0 to string
- if (time<10)
- STime="0"+tostring(time)
- else
- //else just grab the string
- STime=tostring(time)
- end
- STime=string.sub(STime,1) //Get the 10's digits as a string
- local frame=tonumber(STime)/10 //Get the frame # (Convert 10's digit to #, divide by 10)
- local patch //Ring sprite patch to draw
- //Fixed 16,176 coordinates
- local x=16
- local y=160
- //@Optimize this later as a select case or table!
- //Draw the appropriate sprite frame
- if (frame==0)
- v.draw(x,y,p_ring0)
- end
- if (frame==1)
- v.draw(x,y,p_ring1)
- end
- if (frame==2)
- v.draw(x,y,p_ring2)
- end
- if (frame==3)
- v.draw(x,y,p_ring3)
- end
- if (frame==4)
- v.draw(x,y,p_ring4)
- end
- if (frame==5)
- v.draw(x,y,p_ring5)
- end
- if (frame==6)
- v.draw(x,y,p_ring6)
- end
- if (frame==7)
- v.draw(x,y,p_ring7)
- end
- if (frame==8)
- v.draw(x,y,p_ring8)
- end
- if (frame==9)
- v.draw(x,y,p_ring9)
- end
- if (frame==10)
- v.draw(x,y,p_ring10)
- end
- if (frame==11)
- v.draw(x,y,p_ring11)
- end
- else
- return
- end
- end
- //Add the hud_ring function to HUD coroutine
- hud.add(hud_ring)*/
- // Giant ring
- addHook("TouchSpecial", function(ring, inflictor, source)
- if inflictor.type == MT_PLAYER
- if inflictor.player.bot then return false end
- ring.touched = false
- inflictor.flags = $1 | MF_NOGRAVITY
- P_InstaThrust(inflictor, inflictor.angle, 0*FRACUNIT)
- P_DoPlayerExit(inflictor.player)
- P_SetObjectMomZ(inflictor, 0)
- for d=1,16 do
- P_SpawnParaloop(ring.x, ring.y, ring.z+ring.height,192*FRACUNIT, 16, MT_NIGHTSPARKLE, d*(ANGLE_22h), S_NULL, true)
- end
- local flash = P_SpawnMobj(ring.x, ring.y, ring.z-(ring.height/2), MT_THOK)
- flash.scale = 4*FRACUNIT
- inflictor.player.pflags = $1 & ~PF_JUMPED
- inflictor.player.pflags = $1 & ~PF_THOKKED
- //inflictor.state = S_PLAY_STND
- inflictor.state = S_SSNULL
- inflictor.flags2 = $1|MF2_DONTDRAW
- inflictor.player.powers[pw_shield] = SH_NONE
- if (netgame)
- print(inflictor.player.name.." is also warping to a special stage!")
- end
- end
- end, MT_EMMY)
- addHook("TouchSpecial", function(ring, inflictor, source)
- if inflictor.type == MT_PLAYER
- inflictor.health = $1 + 50
- inflictor.player.health = $1 + 50
- end
- end, MT_SPECIALRING)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement