• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

More Effecient Kick Function?

Status
Not open for further replies.
Level 10
Joined
Jun 10, 2007
Messages
557
Hey, Redeemer here.

I'll get straight to the point, I hate kicking people, but sometimes there's this one noob (not newb, noob. Two seperate things) who decides he's going to muck up the game on purpose and not stop. So you want to kick him to make the game better for everyone else. Good thing there's a -kick [color] command.

Right now, I have 7 seperate triggers for kick functions, one being;

  • ICD Boot Blue
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick blue as An exact match
    • Conditions
    • Actions
      • Game - Defeat Player 2 (Blue) with the message: You Got Booted
to kick player 2 (blue) from the game. I have 6 more exactly like it, but with players 3-8.

My question is, is there a way to merge these into one trigger rather than 7? It takes up a lot of space this way, although it's not needed, 'twould be a minor convenience.
Thanks in advance if you can help, I hope this is okay to post.
 
Level 15
Joined
Jan 31, 2007
Messages
502
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -Kick 2 as An exact match
      • Player - Player 1 (Red) types a chat message containing -Kick 3 as An exact match
      • Player - Player 1 (Red) types a chat message containing -Kick 4 as An exact match
      • .....
    • Conditions
    • Actions
      • Game - Defeat (Player((Integer((Substring((Entered chat string), 7, 7)))))) with the message: You Got Booted
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
[TRIGGER=Function]Game - Defeat (Player((Integer((Substring((Entered chat string), 7, 7)))))) with the message: Defeat![/TRIGGER]

Red = Conversion - Convert Player Index to Player
Blue = Conversion - Convert String to Integer
Green = Substring
Yellow = Event Response - Entered Chat String
 
Level 10
Joined
Jun 10, 2007
Messages
557
Thank you both very much for your help. :)

EDIT: One more thing, for the (Player((Integer((Substring((Entered chat string), 7, 7)))))) part, do I need to copy/past that 7 times with (Entered chat string) being the color name, or will typing it just once suffice? If so, what should I put in the chat string box?
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
The substring is to detect a the place of the number.

-kick 2

-... first
k... second
i... third
c... fourth
k... fifth
(space)... sixth
2... seventh


So it checks for the number on the seventh position, converts it to player index and defeats the player.
 
Level 7
Joined
Jun 10, 2007
Messages
225
Heres what there trying to say.
  • Game - Defeat (Player((Integer((Substring((Entered chat string), [COLOR="Red"]7, 7[/COLOR])))))) with the message: Defeat!
See the 7,7? thats the part of the string your taking out. So lets say we had Substring 1,3 Hello This means were taking the first through third letters of the string (Hello) and using them for something. Meaning the substring is Hel.
Now for a kick function, you have -1K2I3C4K5 6[Player Number]7
Now, since we want to figure out what number is the seventh letter, we have to use a substring from 7 to 7, which returns whatever number you typed. For example, -kick 4 means that player 4 is kicked.
 
Level 10
Joined
Jun 10, 2007
Messages
557
There is no squirrel-proof birdfeeder that still lets birds eat from it. Same thing, there is no noob-proof game that lets people who genuinely want to enjoy the game enjoy it. It's a sacrifice I'm willing to make, I'd rather have a map where I can get rid of a total asshole than be in a map that doesn't, yet cannot be abused. There will *always* be people who abuse features on Battle.Net.
Always. From unprotecting maps, to hacking, to rigging maps, it's everywhere.

And no, I will not even consider downloading custom kick. Just... no.

Still waiting on a friend to test the kick function... hopefully results will be up tonight.
 
Level 6
Joined
Apr 28, 2005
Messages
155
A safer approach, used in more serious maps, is to make a poll (usually through a dialog) and let every player exept the "accused" to vote wether or not the player should be kicked. This makes it alot harder, if not impossible, for abuser hosts to kick people as they please.

It's more tedious to make, but I think it would be worth it.
 
Level 3
Joined
Nov 5, 2006
Messages
32
This may be mildly off topic but... Aerox@USEast developed a crash function which apparently "takes up less space" than normal kick functions in JASS.

If I'm breaking any rules with this, I deeply apologize...
 
Level 10
Joined
Jun 10, 2007
Messages
557
A safer approach, used in more serious maps, is to make a poll (usually through a dialog) and let every player exept the "accused" to vote wether or not the player should be kicked. This makes it alot harder, if not impossible, for abuser hosts to kick people as they please.

It's more tedious to make, but I think it would be worth it.

That would be a better option, actually, but I have no idea how to code it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
In PVP maps never impliment a kick function, doing so will result in eithor name spoofing (if it is name locked) or in a drop of host rates by about 50-75%. Also give me an example of a well coded map where a noob could mess it up.

In heroes and empires, noobs and assholes ended up dead unless they have friends. In GOE2 your average noob/annoying idiot could not play it. In EOTA even deconstructive noobs strugled to hinder your team more than not having them.

Why am I saying this, well I am fed up with being kicked from pro only games for abusing flaws in the makers programming and unballences and skill and then being called a noob and kicked after I was winning (example DBZ tribute with a kick hack addition).

Only games where kicking should be allowed is RP games (open ended which require cooperation to play), 1 team TDs (stop the team being killed by 1 week link) and survival games with item hogs.

Even still the kick function is abused for example in SWAT AM I was kicked for saving their members 8 times and surviving without dieing once just so I did not get save/load code.

Just use Custom Kick, it is the best way to rid your self of annoying noobs and it can not be abused since you are the user and host. It is also descrete and does not come up with all this crap people write for defeate messages. It also works for any map, even ones you did not make.
 
Level 10
Joined
Jun 10, 2007
Messages
557
lolwut? Did I not already state I would not even consider Custom Kick? I consider it a hack, it's been abused too many times in front of my eyes for me to want to support it. It can be used on people not on your team. Just... no. I will never download Custom Kick. Ever. My kick function will only work on members of your own team. Well, there's only one team, but still the same thing.

And you're complaining for being kicked for exploiting... and you want me to not impliment a kick function because it will have potential for exploitation... 2+2=5?

Very well, I will give examples. Island Troll Tribes - some noob teammate can come by and take all of your food/items and go die in the enemy's base, then try to rez himself at the spirit ward. Either you have to keep dealing with him or destroy your own spirit ward, hindering team survival.
Molten Core - A rogue can stealth to Luci, unstealth, and aggro him and everything else on the way to the team back at the start.
RP maps - Noob does noob stuff. 'nuff said, although it does already have a kick function (Thank god).

Basically, I am still implimenting a kick function because I have been in too many games without a kick function where I wish there was one. And the noob had ruined the game for me because I couldn't get rid of him, and we all know how they don't respond to requests to leave.
 
Status
Not open for further replies.
Top