五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

jass基礎(chǔ)-合成代碼整理

2023-07-28 00:02 作者:龐各莊大棚  | 我要投稿

// ?道具合成

library demo initializer test

? ? globals

? ? ? ? HechengTemplate array hcArr

? ? ? ? integer index

? ? endglobals


? ? function getPackageItemCount takes unit u, integer itemTypeId returns integer

? ? ? ? local integer i = 0

? ? ? ? local integer count = 0

? ? ? ? local item tempItem

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 6

? ? ? ? ? ? set tempItem = UnitItemInSlot(u, i)

? ? ? ? ? ? if tempItem != null and GetItemTypeId(tempItem) == itemTypeId then

? ? ? ? ? ? ? ? set count = count + 1

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? set tempItem = null

? ? ? ? return count

? ? endfunction


? ? struct HechengTemplate

? ? ? ? integer array itemTypeIdArr[6]

? ? ? ? integer array itemTypeCountArr[6]

? ? ? ?

? ? ? ? integer targetItemId


? ? ? ? effect ef


? ? ? ? string efId


? ? ? ? public static method create takes integer itemTypeId0, integer itemTypeCount0, integer itemTypeId1, integer itemTypeCount1, integer itemTypeId2, integer itemTypeCount2, integer itemTypeId3, integer itemTypeCount3, integer itemTypeId4, integer itemTypeCount4, integer itemTypeId5, integer itemTypeCount5, integer targetId, string efId returns HechengTemplate

? ? ? ? ? ? local HechengTemplate this = HechengTemplate.allocate()

? ? ? ? ? ? set itemTypeIdArr[0] = itemTypeId0

? ? ? ? ? ? set itemTypeIdArr[1] = itemTypeId1

? ? ? ? ? ? set itemTypeIdArr[2] = itemTypeId2

? ? ? ? ? ? set itemTypeIdArr[3] = itemTypeId3

? ? ? ? ? ? set itemTypeIdArr[4] = itemTypeId4

? ? ? ? ? ? set itemTypeIdArr[5] = itemTypeId5

? ? ? ? ? ?

? ? ? ? ? ? set itemTypeCountArr[0] = itemTypeCount0

? ? ? ? ? ? set itemTypeCountArr[1] = itemTypeCount1

? ? ? ? ? ? set itemTypeCountArr[2] = itemTypeCount2

? ? ? ? ? ? set itemTypeCountArr[3] = itemTypeCount3

? ? ? ? ? ? set itemTypeCountArr[4] = itemTypeCount4

? ? ? ? ? ? set itemTypeCountArr[5] = itemTypeCount5


? ? ? ? ? ? set this.targetItemId = targetId

? ? ? ? ? ? set this.efId = efId

? ? ? ? ? ? return this

? ? ? ? endmethod

? ? endstruct


? ? function isEnough takes unit u, HechengTemplate ht returns boolean

? ? ? ? local integer i = 0


? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 6

? ? ? ? ? ? if getPackageItemCount(u, ht.itemTypeIdArr[i]) < ht.itemTypeCountArr[i] then

? ? ? ? ? ? ? ? return false

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? return true

? ? endfunction


? ? function doSomething takes nothing returns nothing


? ? endfunction


? ? function getItemIndex takes unit u, integer itemTypeId returns integer

? ? ? ? local integer i = 0


? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 6

? ? ? ? ? ? if GetItemTypeId(UnitItemInSlot(u, i)) == itemTypeId then

? ? ? ? ? ? ? ? return i

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop


? ? ? ? return - 1

? ? endfunction


? ? function hecheng takes unit u, HechengTemplate ht returns nothing

? ? ? ? local integer count

? ? ? ? local integer index

? ? ? ? local integer i = 0

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 6

? ? ? ? ? ? set count = ht.itemTypeCountArr[i]

? ? ? ? ? ? if count > 0 then

? ? ? ? ? ? ? ? loop

? ? ? ? ? ? ? ? ? ? exitwhen count <= 0

? ? ? ? ? ? ? ? ? ? set index = getItemIndex(u, ht.itemTypeIdArr[i])

? ? ? ? ? ? ? ? ? ? if index != - 1 then

? ? ? ? ? ? ? ? ? ? ? ? call RemoveItem(UnitItemInSlot(u, index))

? ? ? ? ? ? ? ? ? ? endif

? ? ? ? ? ? ? ? ? ? set count = count - 1

? ? ? ? ? ? ? ? endloop

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? call UnitAddItemById(u, ht.targetItemId)

? ? ? ? set ht.ef = AddSpecialEffectTargetUnitBJ("overhead", u, ht.efId)

? ? endfunction


? ? function aaaa takes nothing returns nothing

? ? ? ? if hcArr[index].ef != null then

? ? ? ? ? ? call DestroyEffect(hcArr[index].ef)

? ? ? ? endif

? ? ? ? call DestroyTimer(GetExpiredTimer())

? ? endfunction


? ? function pickupNew takes nothing returns nothing

? ? ? ? local unit u = GetTriggerUnit()

? ? ? ? local timer tm = CreateTimer()

? ? ? ? local integer i = 0

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= 2

? ? ? ? ? ? if isEnough(u, hcArr[i]) then

? ? ? ? ? ? ? ? call hecheng(u, hcArr[i])

? ? ? ? ? ? ? ? set index = i

? ? ? ? ? ? ? ? call TimerStart(tm, 2, false, function aaaa)

? ? ? ? ? ? ? ? return

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? set u = null

? ? ? ? set tm = null

? ? endfunction


? ? function triggerInit takes nothing returns nothing

? ? ? ? local trigger t = CreateTrigger()

? ? ? ? local trigger t2 = CreateTrigger()

? ? ? ? call TriggerRegisterPlayerChatEvent(t, Player(0), "1", true)

? ? ? ? call TriggerAddAction(t, function doSomething)


? ? ? ? call TriggerRegisterAnyUnitEventBJ(t2, EVENT_PLAYER_UNIT_PICKUP_ITEM)

? ? ? ? call TriggerAddAction(t2, function pickupNew)

? ? ? ?

? ? ? ? call CreateUnit(Player(0), 'H000', - 100, - 100, 0)


? ? ? ? set t = null

? ? ? ? set t2 = null


? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )

? ? ? ? call CreateItem('rin1', 0, 0 )


? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )

? ? ? ? call CreateItem('rag1', 100, 0 )


? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )

? ? ? ? call CreateItem('rst1', 200, 0 )


? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? ? ? call CreateItem('cnob', 300, 0 )

? ? endfunction


? ? function gameInit takes nothing returns nothing

? ? ? ? call FogEnable(false)

? ? ? ? call FogMaskEnable(false)

? ? endfunction


? ? function test takes nothing returns nothing

? ? ? ? call gameInit()

? ? ? ? call triggerInit()


? ? ? ? set hcArr[0] = HechengTemplate.create('rin1', 1, 'rag1', 1, 'rst1', 1, 0, 0, 0, 0, 0, 0, 'cnob', "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")

? ? ? ? set hcArr[1] = HechengTemplate.create('rin1', 1, 'rag1', 1, 'cnob', 1, 0, 0, 0, 0, 0, 0, 'clsd', "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl")

? ? endfunction

endlibrary



jass基礎(chǔ)-合成代碼整理的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
甘谷县| 娄底市| 霍林郭勒市| 西贡区| 栖霞市| 镇赉县| 衡阳市| 来安县| 察哈| 叙永县| 五家渠市| 习水县| 泰和县| 长沙市| 渑池县| 浦北县| 将乐县| 宜春市| 吕梁市| 金阳县| 杭州市| 柘城县| 清徐县| 化州市| 开原市| 昭觉县| 兰州市| 六安市| 朝阳县| 沙坪坝区| 南汇区| 新民市| 扶绥县| 乾安县| 惠来县| 车险| 徐州市| 尼勒克县| 睢宁县| 大宁县| 颍上县|