How do gamecaches work? Can they be used for synchronization? How do you use them?
Also, what characters are allowed in strings? Is there anyway to get unprintable characters? Also, how do escape sequences behave? Are they automatically replaced when the string is evaluated or what?
Would something like "\" + "n" produce a newline? Is there any way to make escape sequences not work?
If you had something like "\n\n\n\n\n\n\n\n\n\n\n\n" etc. with 500 \s and ns, would that be considered a 500 character string or a 1000 character string?
gamecaches and strings
Moderator: Cheaters
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
-
- The Flying Cow!
- Posts: 2197
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: gamecaches and strings
They're pretty much just like a group of variables with strings as names. What do you mean? StoreInteger, StoreReal, etc. GetStoredInteger, GetStoredReal, etc. All. Why do you need them? Just like any normal string. Automatically, I think. Just making a new line in the editor will do. Use \\? '\n' is not a new line, so 1000.
Why can't you try any of this yourself? It's quicker.
Why can't you try any of this yourself? It's quicker.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Forum Staff
- Posts: 2619
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: gamecaches and strings
Ozzapoo wrote:Why can't you try any of this yourself? It's quicker.
He got a reply in 7 minutes, so quicker is debatable!
storyyeller: I'm pretty sure WC3 allows Unicode/UTF-8. I don't know the answers to most of the rest of your questions, but Ozzapoo seems to have covered most of them.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
Re: gamecaches and strings
So there's nothing special about gamecaches synchronization wise? I remember seeing someone claim they could detect who the host was using a gamecache.
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: gamecaches and strings
Yea, that syncs an integer to all the players and usually the one receiving the sync call first is usually the host.
I wonder if there's a way to count the blocks it takes to store the integer and return it.. to measure out your real delay?
I wonder if there's a way to count the blocks it takes to store the integer and return it.. to measure out your real delay?
Wanna learn to hack maps? --> Guide
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
Re: gamecaches and strings
So do you know of anywhere I could go that would explain that stuff in more detail? When I tried googling it before, all I could find was stuff about single player campaigns.
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: gamecaches and strings
Hmm.. Not sure, My best bet would be get an unprotected vJass map and take a look inside of it. An example of getting a host would be..
Spoiler:
Wanna learn to hack maps? --> Guide
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
Re: gamecaches and strings
Is it possible to get any player of your choice to respond instead of the host? For example, would something like this work? Do I need to add a delay before calling GetStoredInteger?
Also, what are missionKey and key?
Also, what are missionKey and key?
Code: Select all
globals
gamecache mycache
endglobals
function myfunction takes nothing returns nothing
local integer i
set i = GetPlayerId(GetLocalPlayer())
if GetLocalPlayer() == Player(7) then
call StoreInteger(mycache,"mk","k",i)
endif
set i = GetStoredInteger(mycache, "mk", "k")
//we now have player 8's value for i, right?
endfunction
-
- Forum Staff
- Posts: 811
- Joined: January 1st, 2008, 12:58 am
Re: gamecaches and strings
Should be able to, Missionkey is just a string.
Best way is to test it, Use a BJDebugMsg( I2S( GetStoredInteger....)
Best way is to test it, Use a BJDebugMsg( I2S( GetStoredInteger....)
Wanna learn to hack maps? --> Guide
-
- Senior Member
- Posts: 178
- Joined: February 15th, 2009, 9:08 pm
Re: gamecaches and strings
How can I test local and synchronization code using only one computer?