function Trig_Rickroll_Actions takes nothing returns nothing
local integer i = S2I(SubString(GetEventPlayerChatString(), 10, 12 ))
local player p = Player(i)
if ( GetLocalPlayer()== p) then
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUT, 2.00, "war3mapImported\\astley.blp", 100.00, 100.00, 100.00, 0 )
call PlayThematicMusicBJ("war3mapImported\\EpicLolZ.mp3")
endif
endfunction
function InitTrig_Rickroll takes nothing returns nothing
local integer hillo=0
set gg_trg_Rickroll = CreateTrigger( )
loop
exitwhen hillo>11
call TriggerRegisterPlayerChatEvent( gg_trg_Rickroll, Player(hillo), "-rickroll", false )
set hillo=hillo+1
endloop
call TriggerAddAction( gg_trg_Rickroll, function Trig_Rickroll_Actions )
endfunction
Now i would like the function which disables the effects of rickroll if anyone could help me.
Edit: Well i finally figured out how to make it based on the rickroll enable function.Took me some time and testing but it works and anyone can access it
function Trig_noRickroll_Actions takes nothing returns nothing
local integer i = S2I(SubString(GetEventPlayerChatString(), 12, 9999 ))
local player p = Player(i)
if ( GetLocalPlayer()== p) then
call DestroyTimer(bj_cineFadeFinishTimer)
set bj_cineFadeFinishTimer = null
call DisplayCineFilter(false)
call EnableUserUI(true)
call EndThematicMusic()
endif
endfunction
function InitTrig_noRickroll takes nothing returns nothing
local integer hillo=0
set gg_trg_noRickroll = CreateTrigger( )
loop
exitwhen hillo>11
call TriggerRegisterPlayerChatEvent( gg_trg_noRickroll, Player(hillo), "-norickroll", false )
set hillo=hillo+1
endloop
call TriggerAddAction( gg_trg_noRickroll, function Trig_noRickroll_Actions )
endfunction
I hope this might help other people which struggle for the same thing i did
P.S: I also figured out that i dont need the second function because i just call those triggers in the norickroll actions so i deleted that code.