Thread: OrbStacking
View Single Post
Old 11-04-2009, 09:38 AM   #15
Sinnergy
User
 
Sinnergy's Avatar
 
Join Date: Apr 2009
Posts: 173

Sinnergy has little to show at this moment (8)

Default

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.
Collapse 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
none of the debug messages are displayed in testing the map in debug mode
__________________
Current Project:
Rise of Sinnergy v1.00
Sinnergy is offline   Reply With Quote