wc3edit.net

United Warcraft 3 map hacking!
It is currently March 29th, 2024, 6:27 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How to make nocd?
PostPosted: August 19th, 2011, 11:00 am 
Offline
Member
User avatar

Joined: October 25th, 2010, 7:11 am
Posts: 63
Can someone tell me how to make a nocd trigger in jass.

_________________
Image
(Signature by Risugami)


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 19th, 2011, 11:39 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
Didn't you make the same post in Triggering and Editing O.o....
but this post makes more sense...
Copied from JJCP, with a bit of editing:
Code:
globals
trigger t2t=CreateTrigger()
...
endglobals

function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction

function main takes nothing returns nothing
local player p2p=Player(SomeNumber)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerAddAction(t2t,function ResetCD)
...
endfunction


just replace SomeNumber with the number of the player you want nocd for (red=0, blue=1, etc)
or if you want everyone to have nocd, loop it through 11 (brown)


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 19th, 2011, 2:34 pm 
Offline
Grammar King
User avatar

Joined: June 22nd, 2008, 10:11 pm
Posts: 2410
Location: Mostly USEast
Title: Worst human for 4eva
Or deprotect the map, open it up in JNG and remove the cd on all spells under object editor.

_________________
Quote:
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


Quote:
(23:44:12) Bartimaeus: I was in pubic school until middle school...


Learn how to extract and read RAW Codes here!

Need help? Click here and ask your question!


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 20th, 2011, 7:27 am 
Offline
Member
User avatar

Joined: October 25th, 2010, 7:11 am
Posts: 63
How do i loop it?
P.S. I'm sorry about posting the same question many times because i didnt know how does this thing work and which category to post it under.

_________________
Image
(Signature by Risugami)


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 20th, 2011, 11:56 am 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
function main takes nothing returns nothing
local integer p2p=0
loop
exitwhen p2p>11
call TriggerRegisterPlayerUnitEvent(t2t,Player(p2p),EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t2t,Player(p2p),EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t2t,Player(p2p),EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t2t,Player(p2p),EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t2t,Player(p2p),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set p2p=p2p+1
endloop
call TriggerAddAction(t2t,function ResetCD)
...
endfunction


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 20th, 2011, 12:23 pm 
Offline
Member
User avatar

Joined: October 25th, 2010, 7:11 am
Posts: 63
OOO....Thx.
So in the globals you have to put "trigger t2t=CreateTrigger()" not "trigger t2t=null"?

EDIT: NeverMind it works thx to you.

_________________
Image
(Signature by Risugami)


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 20th, 2011, 1:07 pm 
Offline
Forum Spammer

Joined: March 30th, 2009, 9:02 pm
Posts: 682
you could do null but later, you'll have to create a trigger anyway


Top
 Profile  
 
 Post subject: Re: How to make nocd?
PostPosted: August 20th, 2011, 3:20 pm 
Offline
Member
User avatar

Joined: October 25th, 2010, 7:11 am
Posts: 63
ok. Thx for the help. It works.

_________________
Image
(Signature by Risugami)


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 30 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)