wc3edit.net

United Warcraft 3 map hacking!
It is currently April 27th, 2024, 6:23 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: October 21st, 2009, 1:54 pm 
Offline
Senior Member
User avatar

Joined: May 18th, 2009, 1:36 am
Posts: 106
Mostly, I'd like to make own cc of exp.
Like notd's -exp xxx or swat, dawn of the dead and extra save/load type of survival rpg(mostly they were about marine rpg fight against the virus, infected, parasite, alien etc) :(
I WANNA GET EASY EXP TO RANK UP!! ARGH
Write me one or more tutorials about making CC with nice images please :]


Top
 Profile  
 
PostPosted: October 21st, 2009, 2:23 pm 
Offline
Spice Pirate
User avatar

Joined: January 29th, 2009, 5:35 pm
Posts: 949
Location: Canada
Title: LHC
There's no simple way to do it for any map... But these general steps should help you. Also, this tutorial is written assuming you know basic JASS, and are capable of making your own triggers through JASS.

1) Identify and list things you can do that will grant you exp. Make sure to also record messages that are displayed at this time (annotate where colour changes occur, the colour itself isn't important)
2) Open the .j file for the map and search the messages you recorded.
NOTE: Only search for a section that's between two colour changes. Colour changes are done by "|cffRRGGBB" or "|r", so unless you know exactly what was used for it, your search will fail.
3) You should end up with a function that is sorta like this:

Code:
function somefunc takes something returns probably nothing
local player p = GetTriggerPlayer() // If not specified in the function parameters
local integer i = GetPlayerId(p) // As above
set exp_array[i] = exp_array[i] + 5
call DisplayTextToPlayer(p, 0, 0, "Earned 5 experience.")
endfunction


IF: The function takes a player and an amount to increase by, create a trigger like this:

Code:
function yourfunc takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer i = GetPlayerId(p)
local string s = GetEventPlayerChatString()
local integer exp = SubString(s,4,8) // Assuming exp goes from 0-9999
call somefunc(p,exp) // Should be function name of the one you found, use proper parameters
endfunction

function main takes nothing returns nothing
//locals
local integer i2i = 0
local trigger t2t = CreateTrigger()
loop
exitwhen i2i > 11
call TriggerRegisterPlayerChatEvent(t2t,Player(i2i),"-exp ", false)
set i2i=i2i+1
endloop
call TriggerAddAction(t2t, function yourfunc)


OTHERWISE: Create a similar function as what I made above, but change this line:

call somefunc(p,exp)

To:

set exp_array[i]=exp_array[i]+exp

Obviously replacing exp_array with whatever the name of the array in the map would be.

Some maps require a function to be called that will generate and display your code. You should add a call to that in your function after changing your experience, as well as (if that function doesn't) displaying your code to you.

Hopefully this post helps you. If you need any clarification or help (aside from doing the entire thing for you) then just ask.

_________________
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


Last edited by Ken on October 22nd, 2009, 9:26 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: October 22nd, 2009, 7:27 am 
Offline
Senior Member

Joined: October 5th, 2009, 7:31 am
Posts: 184
Location: Here!? XD
Title: Taiwan, Singapore
I think something wrong on the function main part....?

Code:
function yourfunc takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer i = GetPlayerId(p)
local string s = GetEventPlayerChatString()
local integer exp = SubString(s,4,8) // Assuming exp goes from 0-9999
call somefunc(p,exp) // Should be function name of the one you found, use proper parameters
endfunction

function main takes nothing returns nothing
//locals
local integer i2i = 0
local trigger t2t = CreateTrigger()
loop
exitwhen i2i > 11
call TriggerRegisterPlayerChatEvent(t,Player(i2i),"-exp ", false)
set i2i=i2i+1
endloop
call TriggerAddAction(t, function yourfunc)


Undeclared variable t?
Correct me if I'm wrong.


Top
 Profile  
 
PostPosted: October 22nd, 2009, 9:26 pm 
Offline
Spice Pirate
User avatar

Joined: January 29th, 2009, 5:35 pm
Posts: 949
Location: Canada
Title: LHC
Sorry. Named trigger t2t, but called it with t.

Try what I have there now.

_________________
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: October 25th, 2009, 3:01 am 
Offline
Senior Member
User avatar

Joined: May 18th, 2009, 1:36 am
Posts: 106
I guess I need to learn jass more and over..
It was alot easier me to make triggers w/ WE but not with jass program :S


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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)