wc3edit.net

United Warcraft 3 map hacking!
It is currently April 16th, 2024, 12:36 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: February 15th, 2007, 6:16 pm 
Offline
Member
User avatar

Joined: February 11th, 2007, 8:31 am
Posts: 57
Location: Germany
How to add my own cheats[Tutorial]

1. Create Triggers

Open the Warcraft3 - World Editor. Then open the Trigger Editor(F4) and create a new Trigger.
To make the Trigger you must know how GUI works, but wheter you know how jass work you don't need this tutorial. Create your Trigger or your Triggers. If you finished your work, select your trigger and click at Edit->Convert in own Text(Or Something like that). Your Trigger is now written in Jass.

2. Open the war3map.j

Download MPQMaster or something like this.
Open the Map you want to cheat with MPQMaster.
Then Extract the war3map.j. (Maybe the war3map.j is in a "Scripts" folder)

3. Edit the war3map.j

Open the war3map.j with notepad or something else.
Search for a line wich looks like that: trigger xy=CreateTrigger()
Now you need your cheat, you created in step 1.
The Trigger could look like this:
Quote:
function Trig_cheat_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 1000, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction

//===========================================================================
function InitTrig_cheat takes nothing returns nothing
set gg_trg_cheat = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_cheat, Player(0), "-cheat", true )
call TriggerRegisterPlayerChatEvent( gg_trg_cheat, Player(1), "-cheat", true )
call TriggerRegisterPlayerChatEvent( gg_trg_cheat, Player(2), "-cheat", true )
call TriggerRegisterPlayerChatEvent( gg_trg_cheat, Player(3), "-cheat", true )
call TriggerRegisterPlayerChatEvent( gg_trg_cheat, Player(4), "-cheat", true )
call TriggerAddAction( gg_trg_cheat, function Trig_cheat_Actions )
endfunction


Add the line "trigger gg_trg_cheat=null" behind the line you searched for. (In my example the trigger has the name gg_trg_cheat. You must replace this with the name of your trigger. It is red marked!)

Now you must search for: endfunction
Add your Trigger behind this.

After that search for a line like that: function main takes nothing returns nothing

Scroll a bit down until you see something like that: call x( y )
Insert "call InitTrig_cheat( )" after this, without the Quotienstion marks. (In my example the trigger has the name InitTrig_cheat. You must replace this with the name of your trigger. It is blue marked!)

Now save the war3map.j

4. Insert the new war3map.j

Open the map you want to cheat in MPQMaster.
Delete the old war3map.j and add the edited one.
Now close MPQMaster and have much fun with your edited map.

TIPP: Clone the Map wich you want to edit, then you still have the originall one.

I'm sorry for my bad english :oops:

greets Dark_Shadow32


Top
 Profile  
 
 Post subject:
PostPosted: March 2nd, 2007, 3:45 am 
Offline
Forum Addict

Joined: February 17th, 2007, 9:16 pm
Posts: 405
Could yah make this in GUI instead?


Top
 Profile  
 
 Post subject:
PostPosted: May 12th, 2007, 9:05 am 
Offline
Newcomer

Joined: May 4th, 2007, 11:38 am
Posts: 2
not a chance because war3Map.j is the archive for all triggers for the map that its in (GUI and JASS) but is written in jass. when you make triggers in GUI it automaticaly makes the JASS "behind the sceens" in war3Map.j. All GUI does is make it easier for people to make triggers(and what i said above) so there is no "war3Map.gui"


Top
 Profile  
 
 Post subject:
PostPosted: May 12th, 2007, 12:40 pm 
Offline
Honorary wc3edit.net Traitor
User avatar

Joined: February 1st, 2007, 4:11 pm
Posts: 2513
Location: NEVADA
i-want-dota wrote:
not a chance because war3Map.j is the archive for all triggers for the map that its in (GUI and JASS) but is written in jass. when you make triggers in GUI it automaticaly makes the JASS "behind the sceens" in war3Map.j. All GUI does is make it easier for people to make triggers(and what i said above) so there is no "war3Map.gui"


There is a war3map.wtg... but thats only for the editor, as you said the war3map.j is the only thing that actually means anything.


Top
 Profile  
 
 Post subject:
PostPosted: May 14th, 2007, 12:41 am 
Offline
Senior Member
User avatar

Joined: May 7th, 2007, 10:19 pm
Posts: 115
Location: somewere in Canada -_-'
Title: bunshinsaba!
what do we do if there is no war3Map.j


Top
 Profile  
 
 Post subject:
PostPosted: May 14th, 2007, 1:35 am 
Offline
Honorary wc3edit.net Traitor
User avatar

Joined: February 1st, 2007, 4:11 pm
Posts: 2513
Location: NEVADA
thegreatgaara wrote:
what do we do if there is no war3Map.j


thats impossible unless the map has absolutely nothing in it.

Did you check \scripts? (the folder)


Top
 Profile  
 
 Post subject:
PostPosted: May 14th, 2007, 1:52 am 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
If there's no war3map.j, then it's not a wc3 map you're editing :)


Top
 Profile  
 
 Post subject:
PostPosted: May 24th, 2007, 11:04 pm 
Offline
Old Wrinkly Member

Joined: March 2nd, 2007, 5:52 pm
Posts: 238
Location: USA
thegreatgaara wrote:
what do we do if there is no war3Map.j


he means if it doesnt show up in MPQMaster ive seen alot of maps like this and have managed to add cheats to em

What you do is u dl XDep from files.wc3edit.net
rename ur map to Mymap
put it in the same folder as XDep
Rename your map to Mymap
open XDep and wait for it to finish
after its done u will have a map called deprotected
it should now have a J file in MPQMaster
But dont open it and save in it or else everything gets deleted
There may be other ways to do this but this is how i do it

_________________
when life gives you lemons you use the lemon juice to squirt people in their eyes


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

All times are UTC


Who is online

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