|
function Siii_item takes integer itemid , integer n , integer itemid2 returns nothing
call StoreInteger(udg_itemgc, I2S(itemid), I2S(n) , itemid2)
endfunction
function Liii_item takes integer i1 , integer i2 returns integer
return GetStoredInteger(udg_itemgc, I2S(i1), I2S(i2) )
endfunction
function Liii_item takes integer i1 , integer i2 returns integer
return GetStoredInteger(udg_itemgc, I2S(i1), I2S(i2) )
endfunction
function a takes nothing returns nothing
local integer array i
local integer i2 = 0
local integer i3 = 0
local unit u = GetTriggerUnit()
local boolean b = false
local boolean b2 = false
local item array itemN
local integer i4 = 0
local integer itemid = GetItemTypeId( GetManipulatedItem() )
if IsUnitInGroup( u , udg_itemunitgroup ) == false then
call GroupAddUnit( udg_itemunitgroup , u )
loop
set i2 = i4*10
set i[i2] = Liii_item( itemid , i2 )
exitwhen b == true or i[i2] == null or i[i2] == 0 or i2 >= 1000
set i4 = i4 + 1
set i3 = 0
loop
if ( i[i2] == null or i[i2] == 0 ) then
if b2 == true then
set b = true
endif
exitwhen true
else
set i[i2] = GetInventoryIndexOfItemType( u , i[i2] )
if i[i2] != 0 then
set i3 = i3 + 1
set itemN[i3] = UnitItemInSlot( u , i[i2]-1 )
set b2 = true
else
exitwhen true
endif
endif
set i2 = i2 + 1
set i[i2] = Liii_item( itemid , i2 )
endloop
endloop
if b then
call RemoveItem( GetManipulatedItem() )
loop
exitwhen i3 <= 0
call RemoveItem( itemN[i3] )
set itemN[i3] = null
set i3 = i3 - 1
endloop
set i2 = (i4-1)*10+1000
set i3 = 0
loop
set i[i2] = Liii_item( itemid , i2+i3 )
call UnitAddItemById( u , i[i2] )
set i3 = i3 + 1
exitwhen i3 >= 10 or i[i2] == null or i[i2] == 0
endloop
endif
endif
call TriggerSleepAction(0)
call GroupRemoveUnit( udg_itemunitgroup , u )
set u = null
endfunction
itemid 为 获得物品ID
只要将 获得物品ID 需要其他物品 存到 相应的n上即可n 从 0 - 5存 总的是可存10个= =
多种方式只要 在原来已设好的基础上+10再次存 - -如 a+b=c a+c=d
则 存 b 在 0 上 存 c 在 1000
存 c在 10 存 d在 1010
然后对应的 n+1000 是 产生的物品 同样是 n+1000 ~ n + 1009之间是 产出的物品ID的存 |
评分
-
查看全部评分
|