Script that auto-kicks a "spoofer"
Moderator: Cheaters
-
- Forum Staff
- Posts: 351
- Joined: June 8th, 2008, 3:05 am
- Location: Australia
Script that auto-kicks a "spoofer"
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.
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
Re: Script that auto-kicks a "spoofer"
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
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
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: Script that auto-kicks a "spoofer"
Under globals
Under endglobals
under function main
I didn't test it, but it should work.
Spoiler:
Spoiler:
Code: Select all
call checkSpoof()
-
- Forum Spammer
- Posts: 610
- Joined: March 30th, 2009, 9:02 pm
-
- Forum Staff
- Posts: 351
- Joined: June 8th, 2008, 3:05 am
- Location: Australia
Re: Script that auto-kicks a "spoofer"
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
-
- Forum Staff
- Posts: 762
- Joined: October 27th, 2009, 12:18 pm
- Location: Australia, GMT+8
Re: Script that auto-kicks a "spoofer"
Code: Select all
function Trig_Antispoof1_Func001A takes nothing returns nothing
if ( Trig_Antispoof1_Func001Func001C() ) then
else
endif
endfunction
If you have any questions drop in by chat sometime, chances are there'll be someone who can help you that's afking there, so the next best thing is to click the link on UndeadxAssassin's Sig and ask your question there.
-
- Forum Staff
- Posts: 351
- Joined: June 8th, 2008, 3:05 am
- Location: Australia
Re: Script that auto-kicks a "spoofer"
Something tells me thats missing something. *rubshead*
Oh and I forgot the thing to trigger it. ^_^
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
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: Script that auto-kicks a "spoofer"
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.
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.
-
- Forum Staff
- Posts: 351
- Joined: June 8th, 2008, 3:05 am
- Location: Australia
Re: Script that auto-kicks a "spoofer"
I think I'll just go with your script.
EDIT:
Also, instead of a typical defeat. I was thinking of using the to cause the game to crash, making them alt+f4 but I believe that'd crash everyone and not just the particular player?
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)
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: Script that auto-kicks a "spoofer"
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