Page 1 of 3
Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 2:23 am
by risker
Basically, I want particular usernames to be password locked. They have to say the password within ten seconds of the map starting, or they'll be kicked for not authenticating themselves.
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 3:17 am
by naturesfury
make a timer single event at like 10 sec (i'd wait for like 30 or something as some people lag...)
function exampleaction takes nothing returns nothing
local integer i=0
local boolean var=true
loop
exitwhen i>11
if GetPlayerName(Player(i))=="whateverusername" and not var then
call CustomDefeatBJ(Player(i),"Die spoofer!! or whatever")
endif
set i=i+1
endloop
endfunction
copy from if to endif with a diff username/message for every diff username
then another trigger to set that variable. you can set the variable to whatever you want when they authenticate, just used true in the example
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 3:19 am
by haxorico
Under globals
Under endglobals
under function main
I didn't test it, but it should work.
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 3:35 am
by naturesfury
LOL nice,
forget mine, use his xP
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 4:34 am
by risker
I put this together;
Code: Select all
function Trig_Antispoof1_Func001001001001 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Antispoof1_Func001001001002 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Antispoof1_Func001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Antispoof1_Func001001001001(), Trig_Antispoof1_Func001001001002() )
endfunction
function Trig_Antispoof1_Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerName(GetEnumPlayer()) == "risker[MN]" ) ) then
return false
endif
return true
endfunction
function Trig_Antispoof1_Func001A takes nothing returns nothing
if ( Trig_Antispoof1_Func001Func001C() ) then
else
endif
endfunction
function Trig_Antispoof1_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Antispoof1_Func001001001)), function Trig_Antispoof1_Func001A )
endfunction
//===========================================================================
function InitTrig_Antispoof1 takes nothing returns nothing
set gg_trg_Antispoof1 = CreateTrigger( )
call TriggerAddAction( gg_trg_Antispoof1, function Trig_Antispoof1_Actions )
endfunction
function Trig_password_part_2_Func001Func001001001 takes nothing returns boolean
return ( GetPlayerName(GetTriggerPlayer()) == "risker[MN]" )
endfunction
function Trig_password_part_2_Func001C takes nothing returns boolean
if ( not ( GetEventPlayerChatString() == "Hai" ) ) then
return false
endif
return true
endfunction
function Trig_password_part_2_Actions takes nothing returns nothing
if ( Trig_password_part_2_Func001C() ) then
call DisplayTextToForce( GetPlayersMatching(Condition(function Trig_password_part_2_Func001Func001001001)), "TRIGSTR_004" )
else
call QueuedTriggerRemoveBJ( GetTriggeringTrigger() )
call QueuedTriggerAddBJ( GetTriggeringTrigger(), true )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_001" )
endif
endfunction
//===========================================================================
function InitTrig_password_part_2 takes nothing returns nothing
set gg_trg_password_part_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_password_part_2, function Trig_password_part_2_Actions )
endfunction
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 4:43 am
by Kyoshiro
Code: Select all
function Trig_Antispoof1_Func001A takes nothing returns nothing
if ( Trig_Antispoof1_Func001Func001C() ) then
else
endif
endfunction
what?
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 4:49 am
by risker
Something tells me thats missing something. *rubshead*
Oh and I forgot the thing to trigger it. ^_^
Code: Select all
function Trig_trigger_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Antispoof1 )
endfunction
//===========================================================================
function InitTrig_trigger takes nothing returns nothing
set gg_trg_trigger = CreateTrigger( )
call TriggerAddAction( gg_trg_trigger, function Trig_trigger_Actions )
endfunction
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 4:55 am
by haxorico
I think you forgot to add the globals.
gg_trg_trigger=null
gg_trg_Antispoof1=null
gg_trg_password_part_2=null
and all the TRIGSTR_XXX are saved in the war3map.wts file, so that data is missing also.
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 4:56 am
by risker
I think I'll just go with your script.
EDIT:
Also, instead of a typical defeat. I was thinking of using the
Code: Select all
Trigger - Remove (This trigger) from the trigger queue
Trigger - Add (This trigger) to the trigger queue (Checking conditions)
to cause the game to crash, making them alt+f4 but I believe that'd crash everyone and not just the particular player?
Re: Script that auto-kicks a "spoofer"
Posted: April 24th, 2012, 5:08 am
by haxorico
I never checked crushing mechanics because I found one that is just the coolest, but that is kept for me, mainly cause its just funny, but it crashes for everyone :O