?? functions.lua
字號(hào):
MFRADIX=100
CRTRADIX=100
ATKER=0
DEFER=1
--------------圣戰(zhàn)專用部分----------------------------------------
count_haidao = 0
count_haijun = 0
five_seconds = 0
second_five_seconds = 0
time_can_setmonster = 0
time_can_setnvsheng = 0
check_need_show = 0
create_boss_hj = 0
create_boss_hd = 0
--create_two_side_lose = 0
--CLOSENotice = 0
count_haijun2 = 0
count_haidao2 = 0
five_seconds2 = 0
second_five_seconds2 = 0
time_can_setmonster2 = 0
time_can_setnvsheng2 = 0
check_need_show2 = 0
create_boss_hj2 = 0
create_boss_hd2 = 0
--create_two_side_lose2 = 0
--CLOSENotice2 = 0
function get_repatriate_city_guildwar(role)
local map_name_role_guildwar = GetChaMapName ( role )
return map_name_role_guildwar
end
function get_repatriate_city_guildwar2(role)
local map_name_role_guildwar2 = GetChaMapName ( role )
return map_name_role_guildwar2
end
---------------------------------------------------
---------------------------------------------------
atk_statecheck = {}
def_statecheck = {}
function Reset_Statecheck ()
for i = 1 , 100 , 1 do
atk_statecheck[i] = 0
def_statecheck[i] = 0
end
end
function EightyLv_ExpAdd ( cha , expadd )
if ValidCha (cha) ==1 then --指針存在
if ChaIsBoat ( cha ) == 0 then --人物加經(jīng)驗(yàn)作特殊處理
if Lv ( cha ) >= 80 then
expadd = math.floor ( expadd / 50 )
end
if expadd == 0 then
SystemNotice ( TurnToCha(cha) , "Distance is too far to obtain any EXP" )
end
end
exp = GetChaAttr ( cha , ATTR_CEXP )
exp = exp + expadd
SetCharaAttr ( exp , cha , ATTR_CEXP )
end
end
function Check_State ( atk_role , def_role )
Reset_Statecheck()
--攻擊狀態(tài)判斷
-- atk_statecheck[STATE_ZMYJ] = GetChaStateLv ( ATKER , STATE_ZMYJ )
-- atk_statecheck[STATE_SMYB] = GetChaStateLv ( ATKER , STATE_SMYB )
atk_statecheck[STATE_YS] = GetChaStateLv ( atk_role , STATE_YS )
--受擊狀態(tài)判斷
-- def_statecheck[STATE_ZJFT] = GetChaStateLv ( DEFER , STATE_ZJFT )
-- def_statecheck[STATE_BSHD] = GetChaStateLv ( DEFER , STATE_BSHD )
end
function CreatChaSkill ( role )
end
function CheckJobLegal ( job )
local check_job = 1
if job < JOB_TYPE_XINSHOU or job > JOB_TYPE_GONGCHENGSHI then
check_job = 0
end
return check_job
end
function RemoveYS( role )
--SystemNotice ( role , "come here" )
RemoveState( role , STATE_YS )
return 1
end
function Rem_State_Unnormal ( role )
RemoveState( role , STATE_ZD ) --中毒
RemoveState( role , STATE_MB ) --麻痹
RemoveState( role , STATE_ZZZH ) --詛咒之火
RemoveState( role , STATE_SYNZ) --深淵泥沼
RemoveState( role , STATE_SDBZ ) --閃躲壁障
RemoveState( role , STATE_TJ ) --腿狙
RemoveState( role , STATE_SJ ) --手狙
-- RemoveState( role , STATE_XY ) --眩暈
RemoveState( role , STATE_JNJZ ) --技能禁止
RemoveState( role , STATE_GJJZ ) --攻擊禁止
RemoveState( role , STATE_BDJ ) --冰凍箭
RemoveState( role , STATE_XN ) --血怒
RemoveState( role , STATE_NT ) --泥潭
RemoveState( role , STATE_DIZ ) --地震
RemoveState( role , STATE_SWCX ) --死亡嘲笑
RemoveState( role , STATE_JSDD ) --僵尸帶毒
RemoveState( role , STATE_HYMH ) --狐妖魔法-魅惑
RemoveState( role , STATE_HLKJ ) --黑龍-恐懼
RemoveState( role , STATE_HLLM ) --黑龍-龍鳴
RemoveState( role , STATE_CRXSF ) --長(zhǎng)絨蟹-束縛
RemoveState( role , STATE_BlackHX ) --黑龍虎嘯
RemoveState( role , STATE_HLKJ ) --黑龍雷擊
end
------------------------------------------REMOVE戰(zhàn)斗狀態(tài)
function Rem_State_StarUnnormal ( role )
RemoveState( role , STATE_KUANGZ ) --狂戰(zhàn)術(shù)
RemoveState( role , STATE_QUANS ) --全身裝甲
RemoveState( role , STATE_QINGZ ) --輕裝藥水
end
function Rem_State_NOSEA ( role ) ------------------下海時(shí)移除狀態(tài)
RemoveState( role , STATE_KB )
RemoveState( role , STATE_XLZH )
RemoveState( role , STATE_PKJSYS )
RemoveState( role , STATE_PKSFYS)
RemoveState( role , STATE_TSHD )
RemoveState( role , STATE_FZLZ )
RemoveState( role , STATE_PKZDYS )
RemoveState( role , STATE_PKKBYS )
RemoveState( role , STATE_YSLLQH )
RemoveState( role , STATE_YSMJQH )
RemoveState( role , STATE_YSLQQH )
RemoveState( role , STATE_YSTZQH )
RemoveState( role , STATE_YSJSQH )
RemoveState( role , STATE_DENGLONG )
RemoveState( role , STATE_YSMspd )
RemoveState( role , STATE_PKSBYS )
RemoveState( role , STATE_KUANGZ )
RemoveState( role , STATE_QUANS )
RemoveState( role , STATE_QINGZ )
RemoveState( role , STATE_CJBBT )
RemoveState( role , STATE_JRQKL )
RemoveState( role , STATE_KALA )
RemoveState( role , STATE_CZZX )
RemoveState( role , STATE_JLFT1 )
RemoveState( role , STATE_JLFT2 )
RemoveState( role , STATE_JLFT3 )
RemoveState( role , STATE_JLFT4 )
RemoveState( role , STATE_JLFT5 )
RemoveState( role , STATE_JLFT6 )
RemoveState( role , STATE_JLFT7 )
RemoveState( role , STATE_JLFT8 )
end
function SetCharaAttr(a,b,c) --[[設(shè)置角色屬性轉(zhuǎn)化接口:屬性值,角色類型,屬性編號(hào)]]--
local x,y=b,c
local z=math.floor(a)
-- LuaPrint("Set character"..b)
--LuaPrint("Attribute"..c)
--LuaPrint(a.."\n")
--LG("setchaattr","Setting"..c, "number attribute", "= ", a ,"\n")
SetChaAttr(x,y,z)
end
function Attr_ap(a) --[[取角色剩余可分配點(diǎn)數(shù)]]--
--LuaPrint("Obtain character attribute remain_ap")
local attr_ap=GetChaAttr(a,ATTR_AP)
return attr_ap
end
function Attr_tp(a)
--LuaPrint("Obtain character attribute remain_tp")
local attr_tp=GetChaAttr(a,ATTR_TP)
return attr_tp
end
function CheckCha_Job(a) --[[取角色職業(yè)]]--
--LuaPrint("Obtain character attribute job")
local role_attr_job=GetChaAttr(a,ATTR_JOB)
return role_attr_job
end
function Exp(a)
--LuaPrint("obtain character current exp or monster exp")
local exp=GetChaAttr(a,ATTR_CEXP) --[[取exp]]--
return exp
end
function Lv(a)
--LuaPrint("Obtain character attribute lv")
local b = TurnToCha ( a )
local lv=GetChaAttr( b , ATTR_LV ) --[[取lv]]--
return lv
end
function Hp(a)
--LuaPrint("Obtain character attribute hp")
local hp=GetChaAttr(a,ATTR_HP) --[[取hp]]--
return hp
end
function Mxhp(a)
--LuaPrint("Obtain character attribute mxhp")
local mxhp=GetChaAttr(a,ATTR_MXHP) --[[取mxhp]]--
return mxhp
end
function MxhpSa(a)
--LuaPrint("Obtain character attribute mxhp_sa")
local mxhpsa= GetChaAttr(a, ATTR_STATEC_MXHP)/ATTR_RADIX --[[取mxhp狀態(tài)百分比]]--
return mxhpsa
end
function MxhpSb(a)
--LuaPrint("Obtain character attributemxhp_sb")
local mxhpsb=GetChaAttr(a, ATTR_STATEV_MXHP) --[[取mxhp狀態(tài)常數(shù)]]--
return mxhpsb
end
function MxhpIa(a)
--LuaPrint("Obtain character attribute mxhp_ia")
local mxhpia=GetChaAttr(a, ATTR_ITEMC_MXHP)/ATTR_RADIX --[[取mxhp道具百分比]]--
return mxhpia
end
function MxhpIb(a)
--LuaPrint("Obtain character attribute mshp_ib")
local mxhpib=GetChaAttr(a, ATTR_ITEMV_MXHP) --[[取mxhp道具常數(shù)]]--
return mxhpib
end
function Sp(a)
--LuaPrint("Obtain player attribute sp")
local sp=GetChaAttr(a,ATTR_SP) --[[取sp]]--
return sp
end
function Mxsp(a)
--LuaPrint("Obtain character attribute mxsp")
local mxsp=GetChaAttr(a,ATTR_MXSP) --[[取mxsp]]--
return mxsp
end
function MxspSa(a)
--LuaPrint("Obtain player attribute mxsp_sa")
local mxspsa=GetChaAttr(a, ATTR_STATEC_MXSP)/ATTR_RADIX --[[取mxsp狀態(tài)百分比]]--
return mxspsa
end
function MxspSb(a)
--LuaPrint("Obtain character attribute mxsp_sb")
local mxspsb=GetChaAttr(a, ATTR_STATEV_MXSP) --[[取mxsp狀態(tài)常數(shù)]]--
return mxspsb
end
function MxspIa(a)
--LuaPrint("Obtain character attribute mxsp_ia")
local mxspia=GetChaAttr(a, ATTR_ITEMC_MXSP)/ATTR_RADIX --[[取mxsp道具百分比]]--
return mxspia
end
function MxspIb(a)
--LuaPrint("Obtain character attribute mxsp_ib")
local mxspib=GetChaAttr(a, ATTR_ITEMV_MXSP) --[[取mxsp道具常數(shù)]]--
return mxspib
end
function Mnatk(a)
--LuaPrint("Obtain character attribute mnatk")
local mnatk=GetChaAttr(a,ATTR_MNATK) --[[取mnatk]]--
return mnatk
end
function MnatkSa(a)
--LuaPrint("Obtain character attribute mnatk_sa")
local mnatksa= GetChaAttr(a, ATTR_STATEC_MNATK)/ATTR_RADIX --[[取mnatk狀態(tài)百分比]]--
return mnatksa
end
function MnatkSb(a)
--LuaPrint("Obtain character attributemnatk_sb")
local mnatksb=GetChaAttr(a, ATTR_STATEV_MNATK) --[[取mnatk狀態(tài)常數(shù)]]--
return mnatksb
end
function MnatkIa(a)
--LuaPrint("Obtain character attribute mnatk_ia")
local mnatkia=GetChaAttr(a, ATTR_ITEMC_MNATK)/ATTR_RADIX --[[取mnatk道具百分比]]--
return mnatkia
end
function MnatkIb(a)
--LuaPrint("Obtain player attribute mnatk_ib")
local mnatkib=GetChaAttr(a, ATTR_ITEMV_MNATK) --[[取mnatk道具常數(shù)]]--
return mnatkib
end
function Mxatk(a)
--LuaPrint("Obtain player attribute mxatk")
local mxatk=GetChaAttr(a,ATTR_MXATK) --[[取mxatk]]--
return mxatk
end
function MxatkSa(a)
--LuaPrint("Obtain character attribute mxatk_sa")
local mxatksa= GetChaAttr(a, ATTR_STATEC_MXATK)/ATTR_RADIX --[[取mxatk狀態(tài)百分比]]--
return mxatksa
end
function MxatkSb(a)
--LuaPrint("Obtain character attribute mxatk_sb")
local mxatksb=GetChaAttr(a, ATTR_STATEV_MXATK) --[[取mxatk狀態(tài)常數(shù)]]--
return mxatksb
end
function MxatkIa(a)
--LuaPrint("Obtain character attribute mxatk_ia")
local mxatkia=GetChaAttr(a, ATTR_ITEMC_MXATK)/ATTR_RADIX --[[取mxatk道具百分比]]--
return mxatkia
end
function MxatkIb(a)
--LuaPrint("Obtain character attributemxatk_ib")
local mxatkib=GetChaAttr(a, ATTR_ITEMV_MXATK) --[[取mxatk道具常數(shù)]]--
return mxatkib
end
function Def(a)
--LuaPrint("Obtain character attribute def")
local def=GetChaAttr(a,ATTR_DEF) --[[取def]]--
return def
end
function DefSa(a)
--LuaPrint("Obtain player attribute def_sa")
local defsa= GetChaAttr(a, ATTR_STATEC_DEF)/ATTR_RADIX --[[取def狀態(tài)百分比]]--
return defsa
end
function DefSb(a)
--LuaPrint("Obtain character attribute def_sb")
local defsb=GetChaAttr(a, ATTR_STATEV_DEF) --[[取def狀態(tài)常數(shù)]]--
--LG("setchaattr","obtain character",ATTR_STATEV_DEF,"number attribute= ", defsb,"\n" )
return defsb
end
function DefIa(a)
--LuaPrint("Obtain character attribute def_ia")
local defia=GetChaAttr(a, ATTR_ITEMC_DEF)/ATTR_RADIX --[[取def道具百分比]]--
return defia
end
function DefIb(a)
--LuaPrint("Obtain character attribute def_ib")
local defib=GetChaAttr(a, ATTR_ITEMV_DEF) --[[取def道具常數(shù)]]--
return defib
end
function Resist(a)
--LuaPrint("Obtain character attribute def")
local def=GetChaAttr(a,ATTR_PDEF) --[[取def]]--
return def
end
function ResistSa(a)
--LuaPrint("Obtain player attribute def_sa")
local defsa= GetChaAttr(a, ATTR_STATEC_PDEF)/ATTR_RADIX --[[取def狀態(tài)百分比]]--
return defsa
end
function ResistSb(a)
--LuaPrint("Obtain character attribute def_sb")
local defsb=GetChaAttr(a, ATTR_STATEV_PDEF) --[[取def狀態(tài)常數(shù)]]--
return defsb
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -