How to make nocd?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
nafre
Junior Member
Posts: 45
Joined: October 25th, 2010, 7:11 am

How to make nocd?

Post by nafre »

Can someone tell me how to make a nocd trigger in jass.
Image
(Signature by Risugami)
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: How to make nocd?

Post by naturesfury »

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: Select all

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)
User avatar
UndeadxAssassin
Grammar King
Posts: 2115
Joined: June 22nd, 2008, 10:11 pm
Title: Worst human for 4eva
Location: Mostly USEast

Re: How to make nocd?

Post by UndeadxAssassin »

Or deprotect the map, open it up in JNG and remove the cd on all spells under object editor.
(20:53:52) Bartimaeus: Thank you, Jen.
(20:53:56) Bartimaeus: Truly, you are wise.


(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!
User avatar
nafre
Junior Member
Posts: 45
Joined: October 25th, 2010, 7:11 am

Re: How to make nocd?

Post by nafre »

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)
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: How to make nocd?

Post by naturesfury »

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
User avatar
nafre
Junior Member
Posts: 45
Joined: October 25th, 2010, 7:11 am

Re: How to make nocd?

Post by nafre »

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)
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: How to make nocd?

Post by naturesfury »

you could do null but later, you'll have to create a trigger anyway
User avatar
nafre
Junior Member
Posts: 45
Joined: October 25th, 2010, 7:11 am

Re: How to make nocd?

Post by nafre »

ok. Thx for the help. It works.
Image
(Signature by Risugami)