Is there a way to add a code to a map that when the host activates this mode,all players get 1000 or more gold?
Example is adding a game mode in dota that adds a certain amount of gold to everyone in game.
Question about gold
Moderator: Cheaters
-
- Forum Staff
- Posts: 519
- Joined: October 18th, 2010, 8:43 am
Re: Question about gold
If im not wrong, DotA's -test mode has a -goldall command which gives xx gold to all players. You can just use that.
-
- Grammar King
- Posts: 2117
- Joined: June 22nd, 2008, 10:11 pm
- Title: Worst human for 4eva
- Location: Mostly USEast
Re: Question about gold
There is no -goldall command in test mode, as far as I know.
If you want it to be after host activates a certain mode, then, let's take DotA for example. If they activate, say, ap mode.
The code would be something like:
if AP then
blahblahblah
endif
etc.
AP, of course, being a boolean that was called in an earlier function.
All you would have to do is add this line to the beginning of the function:
local integer goldz
then add this line under the blahblahblah but above the endif:
loop
exitwhen goldz>12 (replace 12 with number of players according to color. I believe these are the JASS colors so 00 is red, 01 is blue, 02 is teal, etc...)
call SetPlayerState(goldz, PLAYER_STATE_RESOURCE_GOLD, SetPlayerState(goldz,PLAYER_STATE_RESOURCE_GOLD) + xxx)
set goldz=goldz+1
endloop
Something like that. My JASS is bad .
Replace xxx with the amount of gold you want to add.
If you want it to be after host activates a certain mode, then, let's take DotA for example. If they activate, say, ap mode.
The code would be something like:
if AP then
blahblahblah
endif
etc.
AP, of course, being a boolean that was called in an earlier function.
All you would have to do is add this line to the beginning of the function:
local integer goldz
then add this line under the blahblahblah but above the endif:
loop
exitwhen goldz>12 (replace 12 with number of players according to color. I believe these are the JASS colors so 00 is red, 01 is blue, 02 is teal, etc...)
call SetPlayerState(goldz, PLAYER_STATE_RESOURCE_GOLD, SetPlayerState(goldz,PLAYER_STATE_RESOURCE_GOLD) + xxx)
set goldz=goldz+1
endloop
Something like that. My JASS is bad .
Replace xxx with the amount of gold you want to add.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.
Learn how to extract and read RAW Codes here!(23:44:12) Bartimaeus: I was in pubic school until middle school...
Need help? Click here and ask your question!
-
- Junior Member
- Posts: 48
- Joined: October 1st, 2010, 2:36 pm
Re: Question about gold
Well,I thank you for trying to help me but I just don't understand those stuff. Can you or anyone else explain in a much more detailed way?UndeadxAssassin wrote:There is no -goldall command in test mode, as far as I know.
If you want it to be after host activates a certain mode, then, let's take DotA for example. If they activate, say, ap mode.
The code would be something like:
if AP then
blahblahblah
endif
etc.
AP, of course, being a boolean that was called in an earlier function.
All you would have to do is add this line to the beginning of the function:
local integer goldz
then add this line under the blahblahblah but above the endif:
loop
exitwhen goldz>12 (replace 12 with number of players according to color. I believe these are the JASS colors so 00 is red, 01 is blue, 02 is teal, etc...)
call SetPlayerState(goldz, PLAYER_STATE_RESOURCE_GOLD, SetPlayerState(goldz,PLAYER_STATE_RESOURCE_GOLD) + xxx)
set goldz=goldz+1
endloop
Something like that. My JASS is bad .
Replace xxx with the amount of gold you want to add.
Thanks.
-
- Forum Staff
- Posts: 519
- Joined: October 18th, 2010, 8:43 am
Re: Question about gold
Oh, then its only in the AI versions.
From 6.67b ai :
From 6.67b ai :
Code: Select all
local string VH=GetEventPlayerChatString()
local integer UP
local integer O5
.
.
.
elseif(SubString(VH,0,9)=="-goldall ")then
set UP=S2I(SubString(VH,9,StringLength(VH)))
set O5=1
loop
call SetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(O5),PLAYER_STATE_RESOURCE_GOLD)+UP)
set O5=O5+1
exitwhen O5>11
endloop
-
- Super Moderator
- Posts: 3197
- Joined: February 24th, 2009, 1:31 pm
- Location: JEW LAND
- Been thanked: 1 time
Re: Question about gold
why only in AI? it can be done in any map. tough every one will need to download it from you and would likly to QUITE before you start the game.
You need to find the code of the mode, or just add it yourself, as dota is checking what is the mode already.
You need to find the code of the mode, or just add it yourself, as dota is checking what is the mode already.
-
- Forum Fanatic
- Posts: 311
- Joined: October 26th, 2009, 10:22 pm
- Title: mib^
Re: Question about gold
He meant the goldall was only in ai version of dota...haxorico wrote:why only in AI? it can be done in any map. tough every one will need to download it from you and would likly to QUITE before you start the game.
You need to find the code of the mode, or just add it yourself, as dota is checking what is the mode already.
Spoiler: