wc3edit.net

United Warcraft 3 map hacking!
It is currently April 16th, 2024, 8:03 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: August 1st, 2012, 12:40 pm 
Hello again, this time i would like to know the following thing:

First of all i have the rickroll function which works:

Spoiler:
Code:
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 ;)

Spoiler:
Code:
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.

Best regards,
Chayner


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)