Multi-Gaming Community
It is currently 28 Mar 2024, 12:48

All times are UTC+01:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
nl 
 Post subject: wc3 mod updated
PostPosted: 30 May 2010, 20:59 
Offline
Community slut (13473)
User avatar
Quote:
1.0.9b for TF2 and CSS

new natives for cooldown management, so races do not have to keep track themselves
for examples see Corrupted Disciple, which has a cooldown ability, skill, and ultimate


/**
* cooldown manager
* basically self explainatory parameters, creates a cooldown for a skill (term skill used here is generic for skill/ability/ultimate)
* printMsgOnExpireByTime prints message to client (if alive and same race) when this skill expires by time (will not print when expired by spawn or death or force reset)
* CooldownPrintMsgName[] is the name of the skill that will be printed: ie Voodoo is ready. You pass "Voodoo".
* If left empty, it will say "Ability" for skillnum 0-2 and "Ultimate"
* This string will also be used in War3_PrintSkillIsNotReady and is the only way to set it. you should never call War3_PrintSkillIsNotReady before calling this manager
* If there is a skill that has cooldown but not counted as an ability, you should not have it print on expiration
*
* when a cooldown expires (by time, by death, by spawn, by force reset), it will forward to OnCooldownExpired(....) forward, use if u need to
* @noreturn
*/
native War3_CooldownMGR(client,Float:cooldownTime,raceid,skillNum,bool:resetOnSpawn=true,bool:resetOnDeath=true,bool:printMsgOnExpireByTime=true,String:CooldownPrintMsgName[]="");



/**
* how much time is left on this particular cooldown?
* returns an int (rounted up from the float)
*/
native War3_CooldownRemaining(client,raceid,skillNum);


/**
* basically make this cooldown expire, expiring is not considered "by time"
*/
native War3_CooldownReset(client,raceid,skillNum);


/**
* is this skill NOT in COOLDOWN? YOU NEED TO CHECK IF CLIENT HAS LEVELED THIS SKILL FIRST, THIS IS ONLY COOLDOWN RELATED
* you would only do this if this skill has a cooldown and u called War3_CooldownMGR
* printTextIfNotReady=true will print a not ready message
*/
native bool:War3_SkillNotInCooldown(client,raceid,skillNum,bool:printTextIfNotReady=false);


/**
* prints Ability/Ultimate Is Not Ready or something
* the String can replace "Ultimate", its copied from the creation of CooldownMGR
*/
native War3_PrintSkillIsNotReady(client,raceid,skillNum);


implemented corrupted disciple with cooldown manager
implemented shadowhunter with cooldown manager
implemented human with cooldown manager
implemented orc with cooldown manager
implemented night elf with cooldown manager
implemented blood mage with cooldown manager
implemented warden with cooldown manager
implemented crypt lord with cooldown manager
(we left out undead for now)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00


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 Limited