MapMaking Questions..

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

MapMaking Questions..

Post by risker »

How do you find commands + the triggers with them within CPs?
If no-one can help with that ill ask for the triggers straight off but i'd prefer to try find them my self xD
Ill use JJ's CP

Code: Select all

elseif SubString(s2s,0,6)=="-kick " and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,3,5))>-1then
call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8))),SubString(s2s,9,200))

Thats all i can find.. But what are these substrings?

Code: Select all

SubString(s2s,0,6)
I figure that means Orange

EDIT: So if i make it Substring(s2s,0,1) It will only work for red.. (the host) But my question is will it work just like this

Code: Select all

elseif SubString(s2s,0,1)=="-kick " and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,3,5))>-1then
call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8))),SubString(s2s,9,200))
Cause its from the cheatpack.. which requires than activator to make the trigger work
Will it still need it if i put that in on its own?

EDIT2: I Figure these go under endglobals? correct me if i am wrong




_______________________________________________________________________________________________________

Code: Select all

elseif SubString(s2s,0,6)=="-ally "and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,6,8))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,6,8))),true)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
elseif SubString(s2s,0,8)=="-unally "and S2I(SubString(s2s,8,10))<16 and S2I(SubString(s2s,8,10))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,8,10))),false)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,8,10))),p2p,false)
elseif SubString(s2s,0,10)=="-unallyall"then
loop
exitwhen i2i>11
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),false)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),false)
endif
set i2i=i2i+1
endloop
elseif SubString(s2s,0,8)=="-allyall"then
loop
exitwhen i2i>11
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),true)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),true)
set i2i=i2i+1
endloop
Ally system
Same questions as above basically
Cause its from the cheatpack.. which requires than activator to make the trigger work
Will it still need it if i put that in on its own?
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: MapMaking Questions..

Post by Senethior459 »

elseif SubString(s2s,0,6)=="-kick " and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,3,5))>-1then
call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8))),SubString(s2s,9,200))

SubString is what lets the cheats see if you type something, and act on it. The parentheses format is (string source, integer start, integer end). s2s is anything sent to chat by a player with the cheats activated. The numbers just check the characters in that length to see if it matches. So in the example above, it checks to see if the first bit of what that person said is -kick. If that's true, and the player code after it is less than 16 and greater than -1 (ie. between 0 and 15), then it kicks the person whose color code is written after -kick.

An easier example is the list of commands.
elseif SubString(s2s,0,6)=="-list1"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-gold # - Adds # to your current gold")

Basically, if -list1 was written in the first 6 characters of something a cheater has just written, then it displays the first list.

You'll need to edit the codes slightly if you plan to use it in your map, without the activator.
The problems are that it currently only checks chat of cheaters, and only allies the person who used the command, who must be a cheater. You can probably fix that by replacing p2p with 0, 1, 2, etc., making a code for each person.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Re: MapMaking Questions..

Post by risker »

Ally system problem with making one for each, thats no problem

But i don't get how you make it work without the activator

So i figured this much with the code

elseif SubString(s2s,0,6)=="-kick " and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,3,5))>-1then
call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8))),SubString(s2s,9,200))

Code: Select all

SubString(s2s,0,6)=="-kick "
Checks between first letter to the sixth letter for "-kick"
(as you said)

Code: Select all

S2I(SubString(s2s,6,8))<16
Checks what number you said
EG: 1 (red) And only goes up 16
Also Must between 6-8character in the line

Code: Select all

S2I(SubString(s2s,3,5))>-1
The message why they got kicked..? (not to sure)

Code: Select all

call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8)
It makes them lose and grabs the colour code , We used 1 (red) so red would be defeated (kicked)'

Code: Select all

SubString(s2s,9,200))
No clue :)
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: MapMaking Questions..

Post by Senethior459 »

Correct on the first one.
The second one makes sure that the player code that is typed after a space after -kick (6-8th characters) is below 16.
The third one makes sure that the player code that is typed after a space after -kick (6-8th characters) is above -1.
Correct on the fourth one, it makes them lose, as you put it.
The first SubString on that line checks the 6-8th characters, and kicks the player code that is typed there.
The second SubString on that line checks the characters written after the player code (9th character on), and displays that message on the Defeat screen of the person who was kicked.

The format for -kick is "-kick ## @@@@@@@", where ## is the player code (0=red, 1=blue, etc. up to 15, which is player 16 (computer controlled, critters I believe)), and @@@@@ is a message you want the kicked player to see.

And by the way, for putting those codes into the map: They DO need to go under endglobals, and they need to have a function and endfunction encasing them.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
User avatar
risker
Forum Staff
Posts: 351
Joined: June 8th, 2008, 3:05 am
Location: Australia

Re: MapMaking Questions..

Post by risker »

Mmm and how would i do that?