|
|
#1 | ||
|
User
|
A library to ease stacking orbs. And to add limitations to stacking orbs.
This uses vJass, DamageEvent, DamageModifiers, AutoIndex, Table and optionally GroupUtils.
Script Code:I additionally attached a map with two samples. Last edited by Deaod : 06-26-2010 at 01:06 PM. Reason: Updated to 1.8.1 |
||
|
|
|
| Sponsored Links - Login to hide this ad! |
|
|
|
|
#2 |
|
Free Software Terrorist
Technical Director
|
Hmnn, an item based addon for LLDD sounds like a good idea, however:
__________________- Heroes only have 6 items while a map could have like err 20 orbs. In other words, instead of iterating through all the orbs and checking if the hero has such item, iterate through all the items and if the item is an orb, do it. - Maybe also add randomization into the equation? Most orbs would like to be random and I think it would be better to handle the random stuff inside your script so it doesn't have to call TriggerEvaluate - Also some stacking is better, a hero could have the same orb multiple times, but for mapmakers just doubling the power of the orb is not that of a great idea, how about running the orb's function once but passing an argument/variable that tells the coder how many of those orbs does he have? |
|
|
|
|
|
#3 |
|
User
|
i could use table, but that would make this thing slow.
__________________Adding the randomization will be a pain in the ass, but ill see what i can do. Having the same orb twice will not do anything (as long as they share at least one category). The user could still check how many times the unit has that orb. |
|
|
|
|
|
#4 | |
|
Free Software Terrorist
Technical Director
|
Quote:
|
|
|
|
|
|
|
#5 |
|
User
|
Version 1.1.0
__________________Edit: Version 1.2.0 Last edited by Deaod : 04-17-2009 at 02:19 PM. |
|
|
|
|
|
#6 |
|
User
|
Version 1.3.0
__________________ |
|
|
|
|
|
#7 |
|
User
Join Date: Mar 2009
Posts: 72
|
Can you make a demo map with blizzard's orb as sample but using you're system ??? (Ice orb, lightning otb ... etc)
__________________And this line private constant integer AID = 'A005' mean the character have the item A005 or the spell A005 (Learned or on an item) (i think it spell, if it, can we trigger this from an item and not a skill ? (Item without any skill on it all triggered, or item with allready these 4 skills max that i want to add an other effect)) Sorry about my very poor english >_> Last edited by Magissia : 04-23-2009 at 07:50 PM. |
|
|
|
|
|
#8 |
|
User
|
Version 1.3.1
__________________I added a map with two sample orbs created by blizzard initially (you could probably replicate those two orbs with simple object editor work, but they wouldnt stack). Yes, you can make items have orbs easily, just pass ABILITY_TYPE_ITEM instead of ABILITY_TYPE_SKILL to Orb.Create(). And yes, you technically dont need a separate ability on the item to trigger the orb, but if you, for example, want to modify the missile art of the unit, you have to add one (either you add one, or you find a way to modify the units missile art through scripting). EDIT: Version 1.4.0 Last edited by Deaod : 04-29-2009 at 08:33 PM. |
|
|
|
|
|
#9 |
|
User
|
Version 1.5.0
__________________ |
|
|
|
|
|
#10 |
|
Free Software Terrorist
Technical Director
|
Approving it.
__________________ |
|
|
|
|
|
#11 |
|
User
|
Version 1.5.1
__________________ |
|
|
|
|
|
#12 |
|
User
|
Version 1.5.2
__________________ |
|
|
|
|
|
#13 |
|
User
|
Can you provide more examples for:
__________________ORB_APPLIED ORB_NOT_APPLIED CATEGORY_TYPE_READ CATEGORY_TYPE_WRITE CATEGORY_TYPE_READWRITE We really can't get it clearly if you are only using 1 type for both spells, it would be better if you will create examples for each category type, each ability type and something that uses ORB_NOT_APPLIED as the returned boolean. Or if you are too lazy to create actual spells and items for examples, can you please state them into words? Thank you. Is CATEGORY_TYPE_READ stacking? or non stacking? I really don't get these category types, and ORB_APPLIED and ORB_NOT_APPLIED are explained before you explained category types, which is really confusing. Last edited by Sinnergy : 11-04-2009 at 08:15 AM. |
|
|
|
|
|
#14 |
|
User
|
Okay, i will try.
__________________Each category has an execution limit associated to it (which defaults to DEFAULT_CATEGORY_EXEC_LIMIT). Each orb can be associated to multiple categories. For the orb to trigger, its necessary that all categories its associated with (and are of type READ or READWRITE) have not yet reached their respective execution limits. If the category for an orb is of type READ, that orb ONLY checks if another orb of that category can be executed but does not increase the execution count of that category. If the category for an orb is of type WRITE, that orb ONLY increases the execution count, but does not check if another orb of that category can be executed. Given that all preconditions are met, and the callback for that orb is executed, you can return ORB_APPLIED or ORB_NOT_APPLIED from the callback, since you might want to trigger an orb like bash or critical strike (which trigger based on chance). If you return ORB_NOT_APPLIED, the execution count for all categories (of type WRITE or READWRITE) the orb is associated with will not be increased. If you return ORB_APPLIED, the execution count for those categories will be increased. The category type READWRITE combines those two. Meaning, it checks whether the execution limit of that category has been reached, and if the orb is successfully executed (its callback returned ORB_APPLIED) it increases the execution count of the category. |
|
|
|
|
|
#15 |
|
User
|
Thanks for the information.
__________________In your life steal spell example, you stated above that it acts like blizzard's life steal spell. Lets say I created an item which also acts like life steal orb in your system, then I want it to stack with the same item, then what types will I use? Example: Mask of Death item, an orb item that steals 10% of the damage dealt which stacks with another Mask of Death item, meaning if I have two Mask of Death, then I will have 20% life steal per attack. Edit: Looks like my code isn't working, I imported it right using the same abilities and buffs inside your test map and still using its raw codes in my map, I don't need to calibrate the script because it has the same raw codes used in my map. Heres the code. unworking code:scope Bear initializer init globals private constant integer superBeing = 'A00D' private constant integer tr = 'A009' endglobals private function trash takes nothing returns boolean local unit c = GetDamagingUnit() local unit t = GetDamagedUnit() local xecast xe debug call BJDebugMsg("trash is called") if(GetUnitAbilityLevel(c,superBeing)>0 and GetUnitAbilityLevel(c, tr) > 0 and GetUnitAbilityLevel(t,'mark') == 0 and IsUnitEnemy(c,GetOwningPlayer(t)) )then if GetRandomInt(0,100) <= 30 then call UnitDamageTarget(c,t,60.0,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,null) set xe = xecast.createA() set xe.abilityid = cr set xe.orderstring = "cripple" set xe.owningplayer = GetOwningPlayer(c) call xe.castOnTarget(t) debug call BJDebugMsg("with bonus") endif elseif GetUnitAbilityLevel(c,superBeing) == 0 and GetUnitAbilityLevel(c, tr) > 0 and GetUnitAbilityLevel(t,'mark') == 0 and IsUnitEnemy(c,GetOwningPlayer(t)) then if GetRandomInt(0,100) <= 20 then call UnitDamageTarget(c,t,30.0,true,false,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL,null) debug call BJDebugMsg("without bonus") if GetUnitAbilityLevel(c,bb) > 0 then set xe = xecast.createA() set xe.abilityid = cr set xe.orderstring = "cripple" set xe.owningplayer = GetOwningPlayer(c) call xe.castOnTarget(t) debug call BJDebugMsg("buff applied") endif endif endif set c = null set t = null return ORB_APPLIED endfunction private function init takes nothing returns nothing call Orb.Create(tr,ABILITY_TYPE_SKILL,Orb_Callback.trash).AddToCategory("trasher",CATEGORY_TYPE_READWRITE) endfunction endscope Last edited by Sinnergy : 11-04-2009 at 11:01 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |