-- LUA Script - precede every function and global member with lowercase name of script + '_main' -- Default script - does nothing. local started = {} local nextImageNum = 0 function patching_init( e ) LoadImages( "zomteria\\healing", 0 ) SetImagePosition( 0, 0 ) SetImageAlignment( 1 ) end function patching_main( e ) PlayerDist = GetPlayerDistance( e ) if PlayerDist < 50 then PromptLocal( e, "Hold E to heal" ) if g_KeyPressE == 1 and g_PlayerHealth < 100 then if not started[ e ] then StartTimer( e ) started[ e ] = true nextImageNum = 0 end if GetTimer( e ) < 1000 and nextImageNum == 0 then ShowImage( 0 ) nextImageNum = 1 elseif GetTimer( e ) < 2000 and nextImageNum == 1 then ShowImage( 1 ) nextImageNum = 2 elseif GetTimer( e ) < 3000 and nextImageNum == 2 then ShowImage( 2 ) nextImageNum = 3 elseif GetTimer( e ) >=3000 then AddPlayerHealth( 100 - g_PlayerHealth ) PromptDuration( "Healed", 2000 ) PlaySound( e, 0 ) ActivateIfUsed( e ) started[ e ] = false end return end return end started[ e ] = false end