找回密码
 点一下
查看: 2316|回复: 3

冷却系统

[复制链接]
发表于 2013-11-17 22:34:05 | 显示全部楼层 |阅读模式
function QCB takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer i=GetHandleId(t)
local unit u=LoadUnitHandle(BX, i, 0)
local integer a=LoadInteger(BX, i, 1)
local integer ii=GetHandleId(gg_unit_Hmkg_0002)//暂时
local integer k=LoadInteger(BX,ii,5)//local integer k=//GetUnitAbilityLevel(u, a)来自记录
call UnitRemoveAbility(u,'A08U')//去除模板
call UnitAddAbility(u, a)//刷新
call SetUnitAbilityLevel(u, a, k)//设置到应有等级
call FlushChildHashtable(BX, i)
call PauseTimer(t)
call DestroyTimer(t)
set t=null
endfunction
function QCD takes unit whichUnit,integer abilcode,real cd,integer r0,integer r1,integer r2,integer r3,integer r4 returns nothing// 这里的cd为技能原始的
local timer t=CreateTimer()                                   //q模板id‘A08U’
local integer i=GetHandleId(t)              //QCD(GetTriggerUnit(),'A08Q',8,69,63,56,50,41)
local real r
local real n=0
local real k=0
local integer l=0
local integer level
call  UnitRemoveAbility(whichUnit,abilcode)//1
//loop
//exitwhen l > 5
//set r=GetWidgetLife(( UnitItemInSlot(whichUnit, l) ))//all-0.1,0.2,0.3,0.4 暂时屏蔽
//if r > 75 then
//set k=S2R(SubString(R2S(r), 3, 4))
//set n=n + k/10
//endif
//set l=l + 1
//endloop
if n > 0.4 then
set n=0.4
endif
set n=0.1//zanshi
if n==0 then
set level=r0
elseif n==0.1 then
set level=r1
elseif n==0.2 then
set level=r2
elseif n==0.3 then
set level=r3
elseif n>=0.4 then
set level=r4
endif

set n=cd * ( 1 - n )  //这个n影响加的模板的等级
call UnitAddAbility(whichUnit,'A08U')
call SetUnitAbilityLevel(whichUnit,'A08U',level)//秒级
call IssueImmediateOrder(whichUnit, "berserk" )//显示
call SaveUnitHandle(BX, i, 0, whichUnit)
call SaveInteger(BX, i, 1, abilcode)
call TimerStart(t,n, false, function QCB)//计时
endfunction


function Trig____________________005Actions takes nothing returns nothing
if GetSpellAbilityId() == 'A08Q' then
call QCD(GetTriggerUnit(),'A08Q',8,69,63,56,50,41)//8 7.2 6.4 5.6 4.8//69,63,56,50,41
endif
if GetSpellAbilityId() == 'A08P' then
call WCD(GetTriggerUnit(),'A08P',22)//
endif
endfunction
发表于 2014-8-15 19:10:11 | 显示全部楼层
沙发
回复

使用道具 举报

发表于 2014-8-28 18:41:55 | 显示全部楼层
板凳,话说看不懂,解说下呗
回复

使用道具 举报

发表于 2014-12-10 12:17:59 | 显示全部楼层
QCD takes unit whichUnit,integer abilcode,real cd,integer r0,integer r1,integer r2,integer r3,integer r4 returns nothing// 这里的cd为技能原始的
local timer t=CreateTimer()                                   //q模板id‘A08U’
local integer i=GetHandleId(t)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-12-22 10:13 , Processed in 0.118013 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表