[GUIDE] Advanced Map Editing

Cheatpacks and learning how to use them, as well as other guides for manipulating maps.

Moderator: Cheaters

User avatar
UndeadxAssassin
Grammar King
Posts: 2117
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: [Guide] Map Editing

Post by UndeadxAssassin »

darkfuryex wrote:Hey there i got a few questions...
Nuuby wrote:
As you might be able to guess, I2S(Vx[bj_forLoopAIndex])) , is what shows the score. Here's an explanation of the stuff in this. I2S converts an integer into a string. Naturally Vx[bj_forLoopAIndex] is a integer. Whenever you see those [ ] it would mean that it's an array, in this case an integer array. An integer goes into that [ ]. Which in this case would be 1 = Red 2 = blue so on... How would you know this? When the bj_forLoopAIndex is 1, the player is that minus 1, in other words player 0 aka Red.
about this, if the ID of player red is 1...why did it bother to minus 1 from that to make it 0 again? i know that the default color of red is 0..and blue is 1 etc etc but why did it minus 1?
In JASS, red is always player 0. What nuuby is saying is that the 1 means red because it will automatically subtract 1 from the integer to create the player ID.

darkfuryex wrote:
Nuuby wrote: So from this we know that Vx[1] is the Jurassic score for Red. So now we make the command~ The easiest way is to insert this line of code into JJ's cheatpack.

elseif SubString(s2s,0,3)=="-cc"then
set Vx[Player(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,4,15))
may i ask is "s2s" just the "name" for this trigger? sorry i dont have any basic knowledge of jass x(, and "4,15" just means that it will only take whatever value that appears right after 4 letters which is after "-cc " and the max score we can set to is 11 digits eg "-cc 12312312312"..right?

then how about the "0,3" what is that for?
The 0,3 is for the command, 0-1c2c3, which goes from 0 to 3, as indicated in red above.

s2s is just the string. You would need to use a local to call it earlier in the function (local string s2s). JJ uses that in his cheatpack.

And, yes, it means you can only do 11 characters. If you changed the 15, you can make it higher or lower if you wanted.

darkfuryex wrote:
Nuuby wrote: What this does is that once you have activated JJ's CP. When you type "-cc 9999" it will set your Jurassic Score to 9999. What the individual stuff do:
-Player(GetPlayerId(p2p)+1) what this does is that it gets your player ID, ie if you're red it gives you a number of 0. Then adds 1 to it. So if you're red it gives you a number of 1. Which is what we need
-S2I(SubString(s2s,4,15)) S2I is the opposite of I2S. The 4,15 is the location in your string that it will check for the integer. In this case it checks from the range more then 4 less then 15.
last question, in the 1st question i asked why did the system minus 1 from the ID...why does the system adds 1 value to our ID again after giving you the final code? is it due to some security stuff? i seriously dont understand this minus 1 and plus 1 thingy..can you explain further pls? why is having the value of 1 for generating the final score code important and is what we need as mentioned by you?

sorry im a noob but im willing to learn x( pls help..

anyway u got a very nice guide here...u went in depth with some stuff which is what noobs like me needs :D

P.S i hope you can see the words i specially bolded out..
The code probably takes in your Player ID (using the bj_LoopAIndex thing which uses 1 for red and so on). That being said, if 1 is for red in that function, would you think using 0 for red generate the same code? Most of the time, it will be used in some sort of formula, and to make it easier, adding 1 and adding 0 to a number gives different results (multiplying is even worse because one value will be 0!). You need to add 1 back into the value because that's how the LoopAIndex works.

Hope that explains some stuff.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.
(23:44:12) Bartimaeus: I was in pubic school until middle school...
Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: [Guide] Map Editing

Post by haxorico »

Why to add one at the function:

Well if you edit a map - What you want to do is to change as few things as possible from the map triggers. You could just change the code that decreases 1 from the integer, although it might affect something else. So you gotta think about your final result, as in other maps, it may want the array (the number inside the []) to be player ID + 100 or even player ID + I*c+3 while I and c are integer variables, finding them can be a bitch.

The example for what you need is the player id + 1. So that is why you get the player ID and add a 1 to it, as far as you concern, its all okay. If the map wants to decrease that integer by 1, let it have it, its not up to your concern.

As for the s2s.
Ill try to explain it as easly as possible.

JJ's CP is a string based CP. Every trigger needs some kind of event to run. Weather its a unit that does something like killing, or for our case, a player is writing something.
You can see in function main

Code: Select all

call TriggerRegisterPlayerChatEvent(SomeNameOfATrigger,Player(zzz),"-",false)
Without getting into deep detail. the trigger called SomeNameOfATrigger will run once Player(zzz) is writing something on chat containing "-".
What will this trigger do?

Code: Select all

call TriggerAddAction(SomeNameOfATrigger,function SomeFunctionName)
When Player(zzz) is writing something containing "-", the function SomeFunctionName will run. In our case its the Commands function.
Now we get to your answer (this is all backround)
When the function is running, it starting to hold some small variables, one of the is a string called s2s, that is holding GetEventPlayerChatString(), or in other words. It holds the string you just wrote on chat. Like -gold.

So the line you write is

Code: Select all

if SubString(s2s,0,3)=="-s2s" then
meaning the if the characters between 0,1,2,3 are "-s2s" than it will run whats inside that if statemant. Remember that s2s is what your wrote on chat. So if wrote "-gold 1000" than s2s will be set to "-gold 1000"
the result of SubString(s2s,0,3) will be "-gol".
Since "-gol" isn't "-s2s". The if statemant wont run at all. And just skips forward.

Hope it clears things up for ya.
Image
Spoiler:
(02:24:09)

Code: Select all

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: Select all


(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: Select all

(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: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(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: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(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: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: [Guide] Map Editing

Post by naturesfury »

Hey o.o nice guide
but there's a random txt file in w3m master....it's called New Text Document and has 35+16 RANDOM questions/answers on it o.o
can't tell what game the questions are for either...

and btw, microsoft smartscreen filter blocks dropbox =/
User avatar
Nuuby
Forum Staff
Posts: 519
Joined: October 18th, 2010, 8:43 am

Re: [Guide] Map Editing

Post by Nuuby »

naturesfury wrote:Hey o.o nice guide
but there's a random txt file in w3m master....it's called New Text Document and has 35+16 RANDOM questions/answers on it o.o
can't tell what game the questions are for either...

and btw, microsoft smartscreen filter blocks dropbox =/
I'm pretty sure they are just random trivia, you can put it in your ghost bot for the lulz

Dropbox is an awesome service, Microsoft are just tards for blocking it ffs
Anyway, those are my mirrors only, I'm sure you can find those programs somewhere else.
owner123
Super Moderator
Posts: 1943
Joined: February 3rd, 2009, 11:28 pm
Been thanked: 1 time

Re: [Guide] Map Editing

Post by owner123 »

naturesfury wrote:and btw, microsoft smartscreen filter blocks dropbox =/
What, are they going to ban youtube too? I mean I bet you can find a bunch of malware links posted there.
Spoiler:
............................................________
....................................,.-‘”...................``~.,
.............................,.-”...................................“-.,
.........................,/...............................................”:,
.....................,?......................................................\,
.................../...........................................................,}
................./......................................................,:`^`..}
.............../...................................................,:”........./
..............?.....__.........................................:`.........../
............./__.(.....“~-,_..............................,:`........../
.........../(_....”~,_........“~,_....................,:`........_/
..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}
...........((.....*~_.......”=-._......“;,,./`..../”............../
...,,,___.\`~,......“~.,....................`.....}............../
............(....`=-,,.......`........................(......;_,,-”
............/.`~,......`-...............................\....../\
.............\`~.*-,.....................................|,./.....\,__
,,_..........}.>-._\...................................|..............`=~-,
.....`=~-,_\_......`\,.................................\
...................`=~-,,.\,...............................\
................................`:,,...........................`\..............__
.....................................`=-,...................,%`>--==``
........................................_\..........._,-%.......`\
...................................,<`.._|_,-&``................`\
http://forums.dropbox.com/topic.php?id=10019
Hayabuzza171
Newcomer
Posts: 4
Joined: February 8th, 2012, 7:43 am

Re: [GUIDE] Advanced Map Editing

Post by Hayabuzza171 »

Thank's man that's verry helping
this is what i'm looking for
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: [GUIDE] Advanced Map Editing

Post by Apple »

set Vx[Player(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,4,15))
this line cannot convert player to integer

I think it should be
set Vx[(GetPlayerId(b3)+1)]=S2I(SubString(B3,6,15))
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
User avatar
Nuuby
Forum Staff
Posts: 519
Joined: October 18th, 2010, 8:43 am

Re: [GUIDE] Advanced Map Editing

Post by Nuuby »

God.Is.A.Dog wrote:set Vx[Player(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,4,15))
this line cannot convert player to integer

I think it should be
set Vx[(GetPlayerId(b3)+1)]=S2I(SubString(B3,6,15))
This was under the assumptions you were using an un-optimized as-per-release version of JJ's. In the end you can change the variable to whatever you want.
Apple
Forum Staff
Posts: 1470
Joined: November 3rd, 2010, 10:48 am
Title: Best Player
Location: Singapore

Re: [GUIDE] Advanced Map Editing

Post by Apple »

God.Is.A.Dog wrote: set Vx[Player(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,4,15))
this line cannot convert player to integer

I think it should be
set Vx[(GetPlayerId(p2p)+1)]=S2I(SubString(s2s,6,15))
I reverted it back, now this is what i mean.
Request a map? Follow the rulesHERE
Request templateHERE
Please, do not PM me.
On the side note, I'm still playing vampirism speed on malaysia room, occasionally in Garena. Bcuz too lazy to find out where else I can play them.
diamsa
Newcomer
Posts: 8
Joined: April 18th, 2020, 2:54 am

Re: [GUIDE] Advanced Map Editing

Post by diamsa »

hello, i tried to follow the tuto here, and i didn't find the activator code, but i fond this instead

Code: Select all

gamecache CACHE=InitGameCache("KeyBindings.w3v")
trigger CreateUnity=CreateTrigger()
trigger gg_trg_Hear=CreateTrigger()
trigger CreateRect2=CreateTrigger()
trigger CreateArea=CreateTrigger()
trigger CreateRect=CreateTrigger()
trigger CHEATS=CreateTrigger()
trigger ICHEAT=CreateTrigger()
string Abooleanc=""
force udg_hear=CreateForce()
force CHEATER=CreateForce()
group Heal=CreateGroup()
-------------------------
function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Abooleanc and not IsPlayerInForce(p2p,CHEATER) then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"-",false)
call DisplayTimedTextToPlayer(p2p,0,0,10,"Cheats Inserted By F-Train" )

can someone explain to me please
thank u in advance