wc3edit.net

United Warcraft 3 map hacking!
It is currently November 23rd, 2017, 9:18 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: [Guide] Map Editing
PostPosted: July 13th, 2011, 2:36 pm 
Offline
Grammar King
User avatar

Joined: June 22nd, 2008, 10:11 pm
Posts: 2365
Location: Mostly USEast
Title: Worst human for 4eva
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.


Top
 Profile  
 
 Post subject: Re: [Guide] Map Editing
PostPosted: July 14th, 2011, 1:13 am 
Offline
Super Moderator
User avatar

Joined: February 24th, 2009, 1:31 pm
Posts: 3770
Location: JEW LAND
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:
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:
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:
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.


Top
 Profile  
 
 Post subject: Re: [Guide] Map Editing
PostPosted: September 4th, 2011, 5:53 pm 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
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 =/


Top
 Profile  
 
 Post subject: Re: [Guide] Map Editing
PostPosted: September 5th, 2011, 7:36 am 
Offline
Forum Staff
User avatar

Joined: October 18th, 2010, 8:43 am
Posts: 626
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.


Top
 Profile  
 
 Post subject: Re: [Guide] Map Editing
PostPosted: September 5th, 2011, 2:27 pm 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2195
Location: Wisconsin
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


Top
 Profile  
 
PostPosted: November 20th, 2012, 12:54 pm 
Offline
Newcomer

Joined: February 8th, 2012, 7:43 am
Posts: 6
Thank's man that's verry helping
this is what i'm looking for


Top
 Profile  
 
PostPosted: December 17th, 2012, 9:19 am 
Offline
Moderator

Joined: November 3rd, 2010, 10:48 am
Posts: 1837
Location: Singapore
Title: Best Player
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))


Top
 Profile  
 
PostPosted: January 7th, 2013, 11:26 am 
Offline
Forum Staff
User avatar

Joined: October 18th, 2010, 8:43 am
Posts: 626
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.


Top
 Profile  
 
PostPosted: January 7th, 2013, 4:11 pm 
Offline
Moderator

Joined: November 3rd, 2010, 10:48 am
Posts: 1837
Location: Singapore
Title: Best Player
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)