wc3edit.net

United Warcraft 3 map hacking!
It is currently April 28th, 2024, 7:20 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: December 6th, 2009, 11:22 am 
Offline
Newcomer

Joined: December 6th, 2009, 5:35 am
Posts: 10
Hi,

I am currently trying to hack the map: Terrania v0.32

I extract the .j file from the map with a mpq editor.
I open it with JassCraft.
I add a trigger (the cheats activation trigger).
This is what I add:
Spoiler:
function Trig_Enable_Actions takes nothing returns nothing
set udg_CheatsEnabled[GetConvertedPlayerId(GetTriggerPlayer())] = true
call DisplayTextToPlayer((GetTriggerPlayer()), 0, 0, "Cheats Activated!")
endfunction
function InitTrig_Enable takes nothing returns nothing
set gg_trg_Enable = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(0), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(1), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(2), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(3), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(4), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(5), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(6), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(7), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(8), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(9), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(10), "-clearly hacked ", true )
call TriggerAddAction( gg_trg_Enable, function Trig_Enable_Actions )
endfunction

I add the globals.
This is what I add:
Spoiler:
trigger Enable=CreateTrigger()
boolean CheatsEnabled=false

I save the .j file.
I import the .j back into the file.
I go test.
I get .j file error.

I'm thinking it's something to do with "CheatsEnabled" being an array. I don't know much about using globals, but is there a way in globals to show that it is an array?

Or is there any other thing that makes it crash?

Thanks in advance.


Top
 Profile  
 
PostPosted: December 6th, 2009, 11:28 am 
Offline
Not an Admin, and Not Unique
User avatar

Joined: March 1st, 2009, 12:30 pm
Posts: 2472
Location: Germany
Title: Der Boss :D
That's not really a cheatpack, xD.
The commands are missing, nothing is triggered.
It's useless.

_________________
Download Senethior's tool package here!
Spoiler for Funny shit:
Kryptonyte wrote:
Pew-pew, together, 2pac and I can take over the world. Muhahahahahaha.

Kryptonyte wrote:
@2Pac, You're a G. Keep your pimp hand strong.

Kryptonyte wrote:
anyways i gtg, PEACE, MR. ZOMG O SO PRO U RAWKZ0RZ SUM BoXZ()RZ


Code:
(23:22:14) FatherSpace: BWAHAHA
(23:22:21) FatherSpace: I am 1337, you must fear my coolness.
(23:22:51) FatherSpace: I got bored, so I made a Python script so now whenever I open Terminal, I get a random haiku from here: http://www.smalltime.com/Haiku
(23:24:12) FatherSpace: afk... Killing myself. :(

Code:
(03:52:56) ChatBot: (673237) logs into the Chat.
(03:53:08) (673237): plzplzplz, im sorry about before.
(03:53:26) FatherSpace: I'm sorry you were born.
(03:53:31) ChatBot: (673237) has been logged out (Kicked).

Code:
(21:39:14) GeorgeMots: Jen are you there?
(21:39:44) 2Pac: ...lol?
(21:39:49) 2Pac: (21:22:22) ChatBot: UndeadxAssassin has been logged out (Timeout).
(21:39:52) GeorgeMots: w00t
(21:39:54) GeorgeMots: rofl
(21:39:58) GeorgeMots: *facepalm*
(21:39:59) 2Pac: you definetly fail

Get to know Bushido alias 2Pac alias King-Bushido!


Top
 Profile  
 
PostPosted: December 6th, 2009, 7:32 pm 
Offline
Spice Pirate
User avatar

Joined: January 29th, 2009, 5:35 pm
Posts: 949
Location: Canada
Title: LHC
Both problems are in your globals. CheatsEnabled should be declared as "boolean array CheatsEnabled", and have a function that runs on map initialization to set all indexes (1-12) to false.

And also, Enabled should be declared as "trigger gg_trg_Enabled=null".

_________________
Spoiler:
xkiska wrote:
BARTIMEAUS is more understandable then u
Senethior459 wrote:
Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:
We laughed, we cried. Trashed.
Quote:
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Quote:
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Quote:
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
Quote:
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that


Top
 Profile  
 
PostPosted: December 7th, 2009, 10:44 am 
Offline
Newcomer

Joined: December 6th, 2009, 5:35 am
Posts: 10
FatherSpace wrote:
Both problems are in your globals. CheatsEnabled should be declared as "boolean array CheatsEnabled", and have a function that runs on map initialization to set all indexes (1-12) to false.

And also, Enabled should be declared as "trigger gg_trg_Enabled=null".


Okay. Thank you! By the way, aren't boolean always false until set otherwise?
FFS! Not working... I give up...
Can you look over the triggers again to see whats wrong?
Yes, I did change the globals.
I'm using the MPQ editor from http://deprotect.nathanmx.com/ , will it make a difference?

Here's what I've done, with the changed globals.

Spoiler:
boolean array CheatsEnabled
trigger gg_trg_Enable=null
endglobals
//startcheats
function Trig_Enable_Actions takes nothing returns nothing
set udg_CheatsEnabled[GetConvertedPlayerId(GetTriggerPlayer())] = true
call DisplayTextToPlayer((GetTriggerPlayer()), 0, 0, "Cheats Activated!")
endfunction

function InitTrig_Enable takes nothing returns nothing
set gg_trg_Enable = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(0), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(1), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(2), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(3), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(4), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(5), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(6), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(7), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(8), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(9), "-clearly hacked ", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Enable, Player(10), "-clearly hacked ", true )
call TriggerAddAction( gg_trg_Enable, function Trig_Enable_Actions )
endfunction
//endcheats


Tupac Shakur wrote:
That's not really a cheatpack, xD.
The commands are missing, nothing is triggered.
It's useless.


It's not meant to be a cheat pack SO FAR. I was just posting my activation string as an example of what I place into the .j file to cheat the map. The cheats will be added later. ;)


Top
 Profile  
 
PostPosted: December 7th, 2009, 4:27 pm 
Offline
Spice Pirate
User avatar

Joined: January 29th, 2009, 5:35 pm
Posts: 949
Location: Canada
Title: LHC
Oh, I think I may have forgotten to mention... In the trigger actions, you're trying to set udg_CheatsEnabled, when it's declared without the udg_ prefix.

Also, do you have a call to the init from function main, or somewhere that runs on map initialization?

_________________
Spoiler:
xkiska wrote:
BARTIMEAUS is more understandable then u
Senethior459 wrote:
Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:
We laughed, we cried. Trashed.
Quote:
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Quote:
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Quote:
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
Quote:
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that


Top
 Profile  
 
PostPosted: December 9th, 2009, 3:17 pm 
Offline
Newcomer

Joined: December 6th, 2009, 5:35 am
Posts: 10
What do I need to do on map initialization?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 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)