Kick Trigger to host in dota

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

pyshing
Junior Member
Posts: 43
Joined: June 25th, 2007, 6:13 pm

Kick Trigger to host in dota

Post by pyshing »

I need this trigger for blue player in dota.I creating a real AMH but need and kick ,becouse no everyone have custom kick and others ...
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Kick Trigger to host in dota

Post by initialD »

//globals
trigger kt7=CreateTrigger()

//function main
//use Player(0) instead if the player red is host.
call TriggerRegisterPlayerChatEvent(kt7,Player(1)," -kick ",false)
call TriggerAddAction(kt7,function kickit)

1st option
//endglobals >crashes the player<
function kickit takes nothing returns nothing
local player p7=GetTriggerPlayer()
local string s7=GetEventPlayerChatString()
local integer z7=S2I(SubString(s7,5,8))
if(z7<1)or(z7>13)then
set p7=null
return
elseif z7-1==GetPlayerId(p7)then
call DisplayTextToPlayer(p7,0,0,"You don't want to kick yourself, dumbass.")
set p7=null
return
endif
if Player(z7-1)==GetLocalPlayer()then
call Player(17)
endif
set p7=null
endfunction

2nd option
//endglobals >kick the player silently, without noticed by anyone else.<
function kickit takes nothing returns nothing
local player p7=GetTriggerPlayer()
local string s7=GetEventPlayerChatString()
local integer z7=S2I(SubString(s7,5,8))
if(z7<1)or(z7>13)then
set p7=null
return
elseif z7-1==GetPlayerId(p7)then
call DisplayTextToPlayer(p7,0,0,"You don't want to kick yourself, dumbass.")
set p7=null
return
endif
call RemovePlayer(Player(z7-1),PLAYER_GAME_RESULT_VICTORY)
set p7=null
endfunction

3rd option
//endglobals >Popping out a quit mission menu, with a message in it.<
//exp: -kick 8 You are damned
function kickit takes nothing returns nothing
local player p7=GetTriggerPlayer()
local string s7=GetEventPlayerChatString()
local integer z7=S2I(SubString(s7,5,8))
if(z7<1)or(z7>13)then
set p7=null
return
elseif z7-1==GetPlayerId(p7)then
call DisplayTextToPlayer(p7,0,0,"You don't want to kick yourself, dumbass.")
set p7=null
return
endif
call CustomDefeatBJ(Player(z7-1)),SubString(s7,8,200))
set p7=null
endfunction


4th options
//endglobals >Popping up a menu saying "You are disconnected"<
function kickit takes nothing returns nothing
local player p7=GetTriggerPlayer()
local string s7=GetEventPlayerChatString()
local integer z7=S2I(SubString(s7,5,8))
if(z7<1)or(z7>13)then
set p7=null
return
elseif z7-1==GetPlayerId(p7)then
call DisplayTextToPlayer(p7,0,0,"You don't want to kick yourself, dumbass.")
set p7=null
return
endif
if Player(z7-1)==GetLocalPlayer()then
return
endif
set p7=null
endfunction

Note: Player code are 1-12. 1 as red, 2 as blue and so on.
Can't kick yourself.
Do nothing if an invalid player code are inserted.
command would be
-kick###@@@@
# as player code
@ as messages if the 3rd options are used.
I made the codes without any JASS tools. So let me know if there are syntax errors.
lordjhonel
Newcomer
Posts: 6
Joined: May 14th, 2009, 6:47 am

Re: Kick Trigger to host in dota

Post by lordjhonel »

is this working on dota maps? even if your a host?
User avatar
Risen
Forum Staff
Posts: 811
Joined: January 1st, 2008, 12:58 am

Re: Kick Trigger to host in dota

Post by Risen »

I believe you have to insert the functions manually, then host.
Image
Wanna learn to hack maps? --> Guide
lordjhonel
Newcomer
Posts: 6
Joined: May 14th, 2009, 6:47 am

Re: Kick Trigger to host in dota

Post by lordjhonel »

i tried it, but always get DC. even if i only joined
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Kick Trigger to host in dota

Post by initialD »

DON'T MAKE YOUR OWN COLLIDED MAP AND THEN TELL US YOU DC.
IT'S BECAUSE YOU MAKE IT WRONGLY.
User avatar
Risen
Forum Staff
Posts: 811
Joined: January 1st, 2008, 12:58 am

Re: Kick Trigger to host in dota

Post by Risen »

YEAH WHAT HE SAID.
Image
Wanna learn to hack maps? --> Guide
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Kick Trigger to host in dota

Post by initialD »

On the post above, I was swearing and yelling and scolding. Somehow someone edited it. LoL
It's impossible to be a bad guy in this forums. The mods are too active. See, now I am a good guy. lol 8)
lordjhonel
Newcomer
Posts: 6
Joined: May 14th, 2009, 6:47 am

Re: Kick Trigger to host in dota

Post by lordjhonel »

hmm.. what should i do to make it work? yeah i make it wrongly.. i don't have much knowledge in jass..
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: Kick Trigger to host in dota

Post by initialD »

Then just give it up. One would need to have at least intermediate-level JASS knowlegde to make a custom trigger for a collided map.
And you are novice. What? Do you expect us to tell you some tips and then you suddenly become brillaint? One would take 1-2 years to learn JASS. No way we can write you a tutorial on how to do custom triggers, especially for a collided map, which is much more harder.
Just use the map I release, if you don't like it, just use the original-legit map.
Don't bother annoy us with the same question again and again. And asking why I desync and so. No one could give you a proper answer unless he cares to write a few pages tutorials.

There is only a slight chance that a kick command would work in a collided map for dota. I have yet no time to check it out.
By saying slight chance I mean probably less than 20% chance. I am busy now so don't bother ask me to do it. Maybe someone brilliant and has a lot of time would do it. Just wait. Best if you just give it up.