[JASS]Password to counter spoofers

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

[JASS]Password to counter spoofers

Post by eddydu555 »

i know its possible to add a password you must type within x minutes and if you dont type it the game kicks you

who can give me lines i must add in a normal JJCP activated by name to add that password

thanks in advice
User avatar
haxorico
Super Moderator
Posts: 3190
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND

Re: [JASS]Password to counter spoofers

Post by haxorico »

It is possible. But it the password can be found. The question is, how good can you hide it?
I made an encoder back in the day, still if you follow the process it can be found and used.

But a simple example for JJ's CP as you asked is a rather easy thing to do.

Here is the Name activator from JJ's CP:
Spoiler:

Code: Select all


function StringRaw2 takes nothing returns nothing
local integer zzz=0
loop
exitwhen zzz>11
if GetPlayerName(Player(zzz))=="JJ2197"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Cheated")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"-",false)
endif
if GetPlayerName(Player(zzz))=="SpicePirate"then
call DisplayTextToPlayer(Player(zzz),0,0,"Cheated by you.")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"-",false)
endif
set zzz=zzz+1
endloop
endfunction

Here is my edited version with the code in it with the new functions needed
Spoiler:

Code: Select all

function checkSpoofer takes integer spooferId returns nothing
    call TriggerSleepAction(TIME_TO_KICK)
    if !PASSWORD_CHECK then
        call CustomDefeatBJ(Player(spooferId),"Spoofer")
    endif 
endfunction

function checkPassword takes nothing returns nothing
    set PASSWORD_CHECK=true
endfunction

function StringRaw2 takes nothing returns nothing
    local integer zzz=0
    call TriggerAddAction(PASSWORD_TRIGGER,function checkPassword)
    loop
        exitwhen zzz>11
        if GetPlayerName(Player(zzz))=="JJ2197"then
            call TriggerRegisterPlayerChatEvent(PASSWORD_TRIGGER,Player(zzz),PASSWORD,true)
            call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Cheated")
            call ForceAddPlayer(CHEATER,Player(zzz))
            call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"-",false)
            call checkSpoofer()
        endif
        if GetPlayerName(Player(zzz))=="SpicePirate"then
            call DisplayTextToPlayer(Player(zzz),0,0,"Cheated by you.")
            call ForceAddPlayer(CHEATER,Player(zzz))
            call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"-",false)
        endif
        set zzz=zzz+1
    endloop
endfunction


And here are the globals you need for that
Spoiler:

Code: Select all

    trigger PASSWORD_TRIGGER=CreateTrigger()
    boolean PASSWORD_CHECK=false
    constant string PASSWORD="Code"
    constant real TIME_TO_KICK=30.0


Replace the data in the variables. PASSWORD contains the code and TIME_TO_KICK is the time you have to write the code until you are kicked.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
User avatar
eddydu555
Senior Member
Posts: 123
Joined: August 27th, 2010, 7:14 am

Re: [JASS]Password to counter spoofers

Post by eddydu555 »

Thanks alot bro you're the best :D

EDIT: After testing it i found out that the game crashs as soon as you click on the cheated map i used basic JJCP and added your globals and replaced "function StringRaw2 takes nothing returns nothing" with the password functions and the new stringraw2




EDIT2:I though about something,is it possible to make the guy who doesnt type the pass in time crash instead of disconected ? :D
p94444270
Newcomer
Posts: 2
Joined: November 2nd, 2011, 4:50 pm

Re: [JASS]Password to counter spoofers

Post by p94444270 »

help me ! I can't add password if add it can't kick player.

Fix : function checkSpoofer takes integer spooferId returns nothing
call TriggerSleepAction(TIME_TO_KICK)
if PASSWORD_CHECK then