wc3edit.net

United Warcraft 3 map hacking!
It is currently January 6th, 2009, 8:17 am

 

All times are UTC




Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: September 6th, 2008, 10:58 pm 
Offline
Co-Admin
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 729
Location: Canada
Title: JASS Programmer
There's 2 major issues in this function.

The first is "bj_forLoopAIndex" is a global and doesn't need to be passed to the function in order to access it.

The second problem is, "GetTriggerPlayer()". It's an event response (Meaning that in order for it to work, the function is an actionfunc that TAKES NO VALUE).

Basically, this can be fixed by doing this: function hec7 takes nothing returns nothing

_________________
Image


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: September 13th, 2008, 12:04 pm 
Offline
Super Moderator
User avatar

Joined: June 8th, 2007, 5:08 am
Posts: 996
Location: Malaysia
Title: Not a Hacker
Code:
function wait1 takes player p7 returns nothing
loop
call TriggerSleepAction(2)
endloop
endfunction
function wait2 takes player p7 returns nothing
loop
call TriggerSleepAction(2)
endloop
endfunction
==========================
function takes nothing returns nothing
call wait1(Player(1))
call wait2(Player(2))
endfunction


I have a question for you Aero. PLease help.
I want to call both function wait1 and wait2, in ONE action. Yet since wait1 is actually looping and won't return, so wait2 will not be called, ever.

Is there anyway I can call both function wait1 and wait2, even though a function is looping.
I tried
ExecuteFunc(wait1)
ExecuteFunc(wait2)
but since they can't bring p7 to another function, so what's solution? (beside calling them seperately in 2 function actions.)
PLease help. Thanks

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: September 13th, 2008, 11:39 pm 
Offline
Co-Admin
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 729
Location: Canada
Title: JASS Programmer
Tell me what you're trying to do.
And second, what's the point of passing a player variable to a wait function.

_________________
Image


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: September 14th, 2008, 3:48 am 
Offline
Super Moderator
User avatar

Joined: June 8th, 2007, 5:08 am
Posts: 996
Location: Malaysia
Title: Not a Hacker
hm....
lol...
It's a simplify version of what I am doing.
It's just pressing an arrow key, let's say Up key, it execute both let's say, -mh and -cdon commands.
Of course I can run 2 triggers so that both of those commands will work. But that's what I am trying too avoid. Too much triggers will lag too much I think.
hm...
If there is nothing can be done, let it be. I think it can be fixed by using more globals triggers, but...w/e I don't really want that.
actually JASS has its limits too. I actually planning on making the bindkey able to bind command such as -mhoff and such. It's possible, but it required too at least one more global and it also slow down the whole system.
I am not a guy persuing perfectnism so, w/e.

Question:
always wanted to ask but forgot. How many maximum buttons can one menu have?
It's around 11-13, I just can't be sure. Can you confirm it for me?

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: September 14th, 2008, 2:37 pm 
Offline
Co-Admin
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 729
Location: Canada
Title: JASS Programmer
I doubt you could make it really laggy that way; depends on the cheat. Mass unit creation would lag.
As for dialog button, I think it's around 10 or 11.

_________________
Image


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: October 12th, 2008, 5:44 am 
Offline
Super Moderator
User avatar

Joined: June 8th, 2007, 5:08 am
Posts: 996
Location: Malaysia
Title: Not a Hacker
can you show me the simplest way to make a player descyn(disconnected from other player)? I realise that net traffic under "if getlocalplayer==player i thren" will do the job. But waht's the simplest way?

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: October 19th, 2008, 2:01 pm 
Offline
Newcomer

Joined: May 12th, 2007, 11:26 am
Posts: 16
i have a question...what do the triggers below do in JJ's CP??

Code:
function Str2RAW takes string s2s returns integer
return S2RAW[s2i(SubString(s2s,0,1))]*0x1000000+S2RAW[s2i(SubString(s2s,1,2))]*0x10000+S2RAW[s2i(SubString(s2s,2,3))]*0x100+S2RAW[s2i(SubString(s2s,3,4))]
endfunction

function RAW2Str takes integer I2I,player p2p returns nothing
local string s2s
set s2s=S2RAWa[I2I/0x1000000]+S2RAWa[(I2I-0x1000000*(I2I/0x1000000))/0x10000]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))-0x100*(((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100)]
call DisplayTextToPlayer(p2p,0,0,s2s)
endfunction


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: October 20th, 2008, 12:46 am 
Offline
Super Moderator
User avatar

Joined: June 8th, 2007, 5:08 am
Posts: 996
Location: Malaysia
Title: Not a Hacker
convert a string to RaW code and vice versa.
you didn't get the whole thing. The codes you pasted is just a part of it. It also required some functions which convert id to RaW.

_________________
ImageImageImage


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: October 20th, 2008, 6:04 am 
Offline
Newcomer

Joined: May 12th, 2007, 11:26 am
Posts: 16
i know its just a part of it....i cant understand this part


Top
 Profile  
 
 Post subject: Re: >> JASS/GUI requests/questions in here <<
PostPosted: October 31st, 2008, 1:05 am 
Offline
Member
User avatar

Joined: June 9th, 2007, 11:27 pm
Posts: 81
Location: Indonesia
question : are there any mistakes??
syntax checker said "line 1:syntax error" , "line 5 :undeclared variable i" and "line 6:undeclared variable tmp1"

Code:
function Trig_Mul_Actions takes nothing returns nothing
    integer tmp1   
    integer i       
    if ( GetSpellAbilityId() == 'A000' ) then
        set i = 1
        set tmp1 = GetUnitAbilityLevel(GetTriggerUnit(),GetSpellAbilityId()) + 1
        call PauseUnit(GetTriggerUnit(),true)
        call PauseUnit(GetSpellTargetUnit(),true)
        loop
            call TriggerSleepAction(0.4)
            set i=i+1
            exitwhen i>tmp1
            call SetUnitAnimation(GetTriggerUnit(),"attack2")
            call SetUnitAnimation(GetSpellTargetUnit(),"death")
            call DamageUnitByTypes(GetTriggerUnit(),GetSpellTargetUnit(),GetHeroAgi(GetTriggerUnit(),true),ATTACK_TYPE_HERO,DAMAGE_TYPE_FIRE)
        endloop     
        call PauseUnit(GetTriggerUnit(),false)
        call PauseUnit(GetSpellTargetUnit(),false)
    endif
endfunction

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 © 2000, 2002, 2005, 2007 phpBB Group

Privacy Policy Statement
Impressum (German)