wc3edit.net

United Warcraft 3 map hacking!
It is currently March 28th, 2024, 12:24 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: April 24th, 2012, 2:23 am 
Offline
Forum Staff
User avatar

Joined: June 8th, 2008, 3:05 am
Posts: 370
Location: Australia
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.

_________________
www.missingninja.com


Top
 Profile  
 
PostPosted: April 24th, 2012, 3:17 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
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


Top
 Profile  
 
PostPosted: April 24th, 2012, 3:19 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
Under globals
Spoiler:
Code:
constant string PASSWORD="i am not a spoofer"
constant real TIME_TO_WAIT=10.0
trigger trgChat=CreateTrigger()
boolean array users

Under endglobals
Spoiler:
Code:
function kickSpoofers takes nothing returns nothing
local integer i=0
loop
exitwhen i>11
if users[i] then
call CustomDefeatBJ(Player(i),"Don't spoof my name.")
endif
set i=i+1
endloop
call DisableTrigger(trgChat)
call DestroyTrigger(trgChat)
endfunction

function authorizeUser takes nothing returns nothing
set users[GetPlayerId(GetTriggerPlayer())]=false
endfunction

function isUserNameSaved takes integer playerNumber returns boolean
local string s=StringCase(GetPlayerName(Player(playerNumber)),false)
if (s=="admin1") or (s=="admin2") or (s=="admin3") then
set s=""
return true
endif
set s=""
return false
endfunction

function checkSpoof takes nothing returns nothing
local integer i=0
loop
exitwhen i>11
call TriggerRegisterPlayerChatEvent(trgChat,Player(i),PASSWORD,false)
set users[i]=isUserNameSaved(i)
set i=i+1
endloop
call TriggerAddAction(trgChat,function authorizeUser)
call TriggerSleepAction(TIME_TO_WAIT)
call kickSpoofers()
endfunction


under function main
Code:
call checkSpoof()


I didn't test it, but it should work.

_________________
Image
Spoiler:
(02:24:09)
Code:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: April 24th, 2012, 3:35 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
LOL nice,
forget mine, use his xP


Top
 Profile  
 
PostPosted: April 24th, 2012, 4:34 am 
Offline
Forum Staff
User avatar

Joined: June 8th, 2008, 3:05 am
Posts: 370
Location: Australia
I put this together;

Code:

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

_________________
www.missingninja.com


Top
 Profile  
 
PostPosted: April 24th, 2012, 4:43 am 
Offline
Forum Staff

Joined: October 27th, 2009, 12:18 pm
Posts: 1108
Location: Australia, GMT+8
Code:
function Trig_Antispoof1_Func001A takes nothing returns nothing
    if ( Trig_Antispoof1_Func001Func001C() ) then
    else
    endif
endfunction

what?

_________________
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.


Top
 Profile  
 
PostPosted: April 24th, 2012, 4:49 am 
Offline
Forum Staff
User avatar

Joined: June 8th, 2008, 3:05 am
Posts: 370
Location: Australia
Something tells me thats missing something. *rubshead*

Oh and I forgot the thing to trigger it. ^_^

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

_________________
www.missingninja.com


Top
 Profile  
 
PostPosted: April 24th, 2012, 4:55 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
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.

_________________
Image
Spoiler:
(02:24:09)
Code:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
PostPosted: April 24th, 2012, 4:56 am 
Offline
Forum Staff
User avatar

Joined: June 8th, 2008, 3:05 am
Posts: 370
Location: Australia
I think I'll just go with your script. :P

EDIT:

Also, instead of a typical defeat. I was thinking of using the
Code:
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?

_________________
www.missingninja.com


Top
 Profile  
 
PostPosted: April 24th, 2012, 5:08 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3815
Location: JEW LAND
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

_________________
Image
Spoiler:
(02:24:09)
Code:
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:

(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:
(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:
(15:42:51) Lanaya: can i suck , . . .

Code:
(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:
GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code:
(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:
(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 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)