System Multi Kick

Status
Not open for further replies.

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
As far as I know, local players do not have to be nulled.
 

Romek

Super Moderator
Reaction score
963
A system like this is useful in nearly every type of map, and the ease of use is excellent for this one. (Kicking a player by name, number, colour, etc).

Approved

And +Rep :D
 

Leazy

You can change this now in User CP.
Reaction score
50
Great system!

Haven't tested it yet, so I don't know if you got this already, but if you don't it will make it look a bit nicer. You know, when your trying to buy a unit that costs 150 gold and you only got 100? Then a error message is displayed saying ''Not enough gold.'' at the bottom of the screen, centered and an error message is played. I was thinking if you could add that to the error message, it would make it look better, if even just a tiny bit :p

Anyway +rep =)
 

Ghostwind

o________o
Reaction score
172
I'm sure they do too.
It explains why you can't use |r in any chats or anything.

---
Also, instead of doing that tiny little trigger:
Code:
Kick
    Events
        Player - Player 1 (Red) types a chat message containing -kick  as A substring
    Conditions
    Actions
        Custom script:   call KickPlayer(GetTriggerPlayer(),SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString()))
Why don't you implement that into the system?
So you just paste the system into a new trigger, and bam! It works. :D

They don't use |r. Max length for usernames is 15 chars. Max for colored names is 5.

|cff000000 = 10 characters = 5 maximum
|cff000000|r = 12 characters = 3 maximum
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
/me is newb
--
How can i copy the sistem into my map ?

1. Download and install Newgen (you will have to edit your map with Newgen in order to compile the vJASS code, this means every time you want to save your map).

2. Open the map with newgen

3. Create a new Trigger (name it whatever you want to).

4. Go to Edit -> Convert Trigger to Custom Script

5. Delete all the text inside the trigger, and paste the code into the box.
 

AlExAlExAlEx

Member
Reaction score
7
1. Download and install Newgen (you will have to edit your map with Newgen in order to compile the vJASS code, this means every time you want to save your map).

2. Open the map with newgen

3. Create a new Trigger (name it whatever you want to).

4. Go to Edit -> Convert Trigger to Custom Script

5. Delete all the text inside the trigger, and paste the code into the box.
installing newgen sounds like :nuts: i need dual instlation , installing X standalone patch..a bit to much stuff ?
 

saw792

Is known to say things. That is all.
Reaction score
280
You don't need to install two version, Newgen is now compatible with 1.22 (although war3err isn't...).
 

Akolyt0r

New Member
Reaction score
33
a nice thing which helps debugging ..

It prevents maps from crashing due to code errors like "divide by zero" ...and displays ingame something like: "divide by zero in function idoBadstuffinhere"
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
installing newgen sounds like :nuts: i need dual instlation , installing X standalone patch..a bit to much stuff ?

You don't need dual installation, or anything like that. There are a few features which USED to work in the older version of Warcraft, but no longer work for the newest patch. They aren't necessary, they're just helpful if you're ever getting crashes and want to find the cause of it. If you ever plan on using vJASS, you have to use JASSHelper. This is included in Newgen.

By the way, Newgen also allows you to get rid of map limits (extends maximum map size to 480x480, allows you to add more tiles to your tileset, unlimited amount of doodads/units/destructibles PREplaced, etc), and also has a few other features you might find useful.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
BUMP, updated main post with a new non-vJASS version of the kick system. It requires you to do a few things though, since you aren't using Newgen.

Here's the full instructions for how to use the non-vJASS version of the system:

  1. Create a new trigger (name it whatever you want)
  2. Go to Edit -> Convert Trigger to Custom Text
  3. Delete all the text, and paste in my code.
  4. Follow the directions at the very top of my trigger:
  5. Create a trigger (give it your own name), paste in the code, and change the name of the last function from InitTrig_MultiKick to InitTrig_<Put your trigger's name here>
  6. Create a global player variable called host
  7. Create a global string variable called PlayerColors, and make it an array
  8. Replace both "Darthfett" with "Your_Name_Here"

A few things the non-vJASS version does differently:
  • No custom function for you to put in your own JASS code
  • Integrated some of the vJASS globals directly, to make it simpler to implement (less globals). This also means it is slightly slower, because it detects player names at runtime, instead of at initialization
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Bump, another update:

Update 6/25/09 v1.20:
  • The system's player detection has been recoded. (String2Player function)
  • It now supports maps with name-changing systems, and maps that allow players to change their color.
  • Renamed the abominably long String to player conversion function to "String2Player"

It is a bit less efficient at initialization since it has to match up the colors string array to each player's number (to allow for maps that let players change their color).
It is also slightly slower at run-time if the player decides to kick using a player's name, as this means it has to compare the player's name at run-time.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
umm this doesn't seem to work anymore since the patch :(

Actually, it does. I just put it in an empty map and ran it. It worked fine.

However, there's a ton of problems that have come with the new map. I'll be that if you ran your map without this, it still wouldn't run. I know Forest CTF won't currently run, even though it's not getting any errors.

I have an update pending for this, once Blizzard figures out what they're going to do with the game they broke.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
I have an update pending for this, once Blizzard figures out what they're going to do with the game they broke.

I am now delivering on this, as patch 1.24b has come out.

== Update, version 1.21 ==

The system's initialization should now be a bit faster, and I have outsourced all the String related functions to the Advanced Strings system. It should now be a bit more readable, and is much shorter.

The two Cons to this update are that it now only works on post 1.24b maps, and it requires the Advanced Strings system.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top