gengxxx 发表于 2014-1-1 01:48:16

自编5.4刺杀贼,纯脚本版,求审核,求勋章

本帖最后由 蔡骏 于 2014-11-4 16:54 编辑

先发一段主输出循环代码,比较直观,求指正。
顺带说一句,平台是wowbee, 因为是纯脚本,完全兼容yj,新建宏,粘贴以下内容即可local CurHealth = 100 * UnitHealth("target") / UnitHealthMax("target")
local Pbl = ambufflist("Player")
local Tbl = ambufflist("target")
local CurrentEnergy = UnitPower("player")   --返回能量点数
local CPs=amljd("player","target") --返回连击点数
local Blindside=amfind("盲点",Pbl)          --返回是否有盲点的buff
local BlindsideTimeLeft=ampb("盲点")       --返回是否有盲点的剩余时间
local SnD = amfind("切割",Pbl)      
local SnDTimeLeft = ampb("切割")
local Rup = amtdbn("割裂")   --是否有割裂
local RupTimeLeft = amtdb("割裂") --我上的割裂剩余时间
local Env = amfind("毒伤",Pbl)
local EnvTimeLeft = ampb("毒伤")
local van = amfind("消失",Pbl)            --消失
local Anti = amfind("预感",Pbl)
local AntiCharges = ampb("预感")
local SBTimeLeft = ampb("暗影之刃")
local ShadowBladesUP = amfind("暗影之刃")
local EnergyRegen = select(2,GetPowerRegen(player))--能量恢复
local EnergyAfterEnvenom = CurrentEnergy+(EnergyRegen*1.5) --使用技能后的能量点
local vstart,vduration = GetSpellCooldown(1856)    --消失的开始时间,和已经持续的时间
local Stealth = UnitBuffID(Player,1784)

--暗影之刃
if (amtdb("仇杀") > 0 or amcd("暗影之刃")<=0) and RupTimeLeft > 2 and SnDTimeLeft>5 and Envthen amrun("/cast 暗影之刃\n/cast 狂暴") end
--仇杀
if RupTimeLeft > 2 and SnDTimeLeft>5 and Env and amisr("仇杀") then amrun("仇杀") end

--保持切割
--切割
if CPs > 4 then
    if SnDTimeLeft <= 0 then
      amrun("切割")
    elseif SnDTimeLeft < 2 then
      amrun("切割")
end end


if SnDTimeLeft > 0and CPs > 0 then
    if SnDTimeLeft < 2 then
      amrun("切割") end
elseif SnDTimeLeft <= 0 and CPs > 0 then
    amrun("切割")
end

--保持割裂
if CPs > 4 then
    if RupTimeLeft==0 then amrun("割裂")
    elseif RupTimeLeft < 2 then amrun("割裂") end end

if RupTimeLeft > 0 then
    if CPs > 0 and RupTimeLeft < 2 then amrun("割裂") end
else amrun("割裂") end

--斩击
if Blindside and not van and (CPs < 5 or (Env and EnvTimeLeft > 2 and (not Anti or (ShadowBladesUP and AntiCharges < 3 and (CurrentEnergy + (EnergyRegen * 1.5)) < 100) or (not ShadowBladesUP and AntiCharges < 4) ) ) ) then
    amrun("斩击") return
elseif CurHealth < 35 and not van and (CPs < 5 or (Env and EnvTimeLeft > 2 and (not Anti or (ShadowBladesUP and AntiCharges < 3) or (not ShadowBladesUP and AntiCharges < 4) ) ) ) then
    amrun("斩击") return
end

if (CurHealth < 35 or Blindside) and not van then if CurrentEnergy > 110 then if RupTimeLeft > 0then if RupTimeLeft < 2 then
                amrun("斩击") return end
      else amrun("斩击") return end end
    if Blindside and CPs > 4 and RupTimeLeft > 0 and RupTimeLeft > 3 and Env and (not Anti or ((ShadowBladesUP and AntiCharges < 3) or (not ShadowBladesUP and AntiCharges < 4))) and (CurrentEnergy + (EnergyRegen * 1.5)) < 100 then
      amrun("斩击") return end
end


--毒伤

if CPs >= 2 and SnD and SnDTimeLeft < 2 then amrun("毒伤") return end

if CPs > 4 and RupTimeLeft > 0 and not ShadowBladesUP and (not Anti or AntiCharges < 4) then
    if RupTimeLeft < 6 and RupTimeLeft > 3 and (CurrentEnergy + (EnergyRegen * (RupTimeLeft - 2)) + 25) < 110 then return end
    if RupTimeLeft < 3 or (RupTimeLeft > 3 and CurrentEnergy < 60 and not Ven) then return end end
if CPs > 4 and (not Env or EnvTimeLeft < 1 or (EnergyAfterEnvenom > 100 and (Anti and AntiCharges > 2)) or (ShadowBladesUP and SBTimeLeft > 1 and (EnergyAfterEnvenom < 100 or (Anti and AntiCharges > 2)))) then
    amrun("毒伤") return end






--毁伤

if CurHealth > 35 then
    if CurrentEnergy > 110 then
      if RupTimeLeft > 0 then if RupTimeLeft < 2 then amrun("毁伤") end
      else amrun("毁伤") end end
end

if van then return end
if CPs < 5 or (Env and EnvTimeLeft > 2 and (not Anti or AntiCharges < 3)) then amrun("毁伤") end





---------------------------------------------Bigjj出品--------------------------------------------------------------------







gengxxx 发表于 2014-1-1 01:51:10

基本全程 切割 ,割裂 覆盖
毒伤覆盖率 60%

gengxxx 发表于 2014-1-1 01:55:16


装备差了点,武器更差。
蔡骏大神,帮我simc 模拟的伤害是 5.2 w 左右,10分钟木桩实测 4.8-4.9w , 截图因为停止脚本,掉下来一些

gengxxx 发表于 2014-1-1 01:57:17

^1^T^SItems^T^N1^T^SGUID^N3^SName^S嫁祸焦点^SDescription^S當滿足條件時自動施放^SIcon^SInterface\Icons\INV_Misc_QuestionMark^SScript^S--自动设定焦点~J--如果没有死,没有离线,没有afk~`不是鬼魂~`而且是玩家控制的~`,并且和我距离20码内,就直接设焦点,~Jlocal~`Unit~`=~`ammaximum('aml(unit,"nil")>0~`and~`not~`UnitIsDead(unit)~`and~`not~`UnitIsAFK(unit)~`and~`UnitIsConnected(unit)~`and~`not~`UnitIsGhost(unit)~`and~`UnitIsPlayer(unit)',"aml(unit,'nil')","party")~`~Jif~`Unit~`and~`amjl(unit)<20~`~`then~`~`~`FocusUnit(Unit)~`end~J--嫁祸诀窍~Jlocal~`start,~`duration,~`enabled~`=~`GetSpellCooldown(51713)~`~Jif~`UnitExists(focus)~`and~`UnitInParty(focus)~`and~`not~`UnitIsDead(focus)~`then~`amrun("嫁祸诀窍")~`end^t^N2^T^SEnabled^B^SDescription^S當滿足條件時自動施放^SScript^S--保持双手武器上毒~Jif~`~`(ampb("致命药膏")~`~`/~`~`60)~`<20~`then~`amrun("致命药膏")~`end~Jif~`~`(ampb("吸血药膏")~`~`/~`~`60)~`<20~`then~`amrun("吸血药膏")~`end~J~J--非战斗状态潜行~Jif~`not~`IsMounted()~`~`and~`not~`UnitIsDeadOrGhost("Player")~`and~`not~`UnitAffectingCombat("Player")~`~`~`and~`amcd("潜行")~`==~`0~`~`then~`CastSpellByName(tostring(GetSpellInfo(1784)),Player)~`end~`~J--~J--没进入战斗就别多事~Jif~`not~`amzd()~`then~`~J~`~`~`~`return;~Jend~J~J--坐骑状态下什么都不干~Jif~`IsMounted("player")==1~`then~J~`~`~`~`return;~Jend~J~J--吃饭喝水的时候不动~Jif~`amfind("进食,喝水",ambufflist("player"))~`then~J~`~`~`~`return~`;~Jend~J^SGUID^N2^SIcon^SInterface\Icons\INV_Misc_QuestionMark^SName^S敌不动我不动^t^N3^T^SGUID^N4^SScript^Sif~`amac("target",true)~`and~`amact("target")<1~`and~`amisr("脚踢")~`then~J~`~`~`~`amrun("脚踢");~J~`~`~`~`return~`true;~`~Jend~J^SEnabled^B^SName^S打断施法^SIcon^SInterface\Icons\INV_Misc_QuestionMark^SDescription^S當滿足條件時自動施放^t^N4^T^SGUID^N1^SName^S主输出循环(必选)^SDescription^S當滿足條件時自動施放^SEnabled^B^SIcon^SInterface\Icons\INV_Misc_QuestionMark^SScript^Slocal~`CurHealth~`=~`100~`*~`UnitHealth("target")~`/~`UnitHealthMax("target")~Jlocal~`Pbl~`=~`ambufflist("Player")~Jlocal~`Tbl~`=~`ambufflist("target")~Jlocal~`CurrentEnergy~`=~`UnitPower("player")~`~`~`--返回能量点数~`~Jlocal~`CPs=amljd("player","target")~`--返回连击点数~Jlocal~`Blindside=amfind("盲点",Pbl)~`~`~`~`~`~`~`~`~`~`--返回是否有盲点的buff~Jlocal~`BlindsideTimeLeft=ampb("盲点")~`~`~`~`~`~`~`--返回是否有盲点的剩余时间~Jlocal~`SnD~`=~`amfind("切割",Pbl)~`~`~`~`~`~`~`~Jlocal~`SnDTimeLeft~`=~`ampb("切割")~Jlocal~`Rup~`=~`amtdbn("割裂")~`~`~`--是否有割裂~Jlocal~`RupTimeLeft~`=~`amtdb("割裂")~`--我上的割裂剩余时间~Jlocal~`Env~`=~`amfind("毒伤",Pbl)~Jlocal~`EnvTimeLeft~`=~`ampb("毒伤")~Jlocal~`van~`=~`amfind("消失",Pbl)~`~`~`~`~`~`~`~`~`~`~`~`--消失~Jlocal~`Anti~`=~`amfind("预感",Pbl)~Jlocal~`AntiCharges~`=~`ampb("预感")~Jlocal~`SBTimeLeft~`=~`ampb("暗影之刃")~Jlocal~`ShadowBladesUP~`=~`amfind("暗影之刃")~Jlocal~`EnergyRegen~`=~`select(2,GetPowerRegen(player))~`~`--能量恢复~Jlocal~`EnergyAfterEnvenom~`=~`CurrentEnergy+(EnergyRegen*1.5)~`--使用技能后的能量点~Jlocal~`vstart,vduration~`=~`GetSpellCooldown(1856)~`~`~`~`--消失的开始时间,和已经持续的时间~Jlocal~`Stealth~`=~`UnitBuffID(Player,1784)~`~`~J~J--暗影之刃~Jif~`(amtdb("仇杀")~`>~`0~`or~`amcd("暗影之刃")<=0)~`and~`RupTimeLeft~`>~`2~`and~`SnDTimeLeft>5~`and~`Env~`~`then~`amrun("/cast~`暗影之刃\n/cast~`狂暴")~`end~J--仇杀~Jif~`RupTimeLeft~`>~`2~`and~`SnDTimeLeft>5~`and~`Env~`and~`amisr("仇杀")~`then~`amrun("仇杀")~`end~J~J--保持切割~J--切割~Jif~`CPs~`>~`4~`then~`~J~`~`~`~`if~`SnDTimeLeft~`<=~`0~`then~`~J~`~`~`~`~`~`~`~`amrun("切割")~`~J~`~`~`~`elseif~`SnDTimeLeft~`<~`2~`then~`~J~`~`~`~`~`~`~`~`amrun("切割")~`~Jend~`end~J~J~Jif~`SnDTimeLeft~`>~`0~`~`and~`CPs~`>~`0~`then~`~J~`~`~`~`if~`SnDTimeLeft~`<~`2~`then~`~J~`~`~`~`~`~`~`~`amrun("切割")~`end~`~Jelseif~`SnDTimeLeft~`<=~`0~`and~`CPs~`>~`0~`then~`~J~`~`~`~`amrun("切割")~`~Jend~J~J--保持割裂~Jif~`CPs~`>~`4~`then~`~J~`~`~`~`if~`RupTimeLeft==0~`then~`amrun("割裂")~J~`~`~`~`elseif~`RupTimeLeft~`<~`2~`then~`amrun("割裂")~`end~`end~J~Jif~`RupTimeLeft~`>~`0~`then~`~J~`~`~`~`if~`CPs~`>~`0~`and~`RupTimeLeft~`<~`2~`then~`amrun("割裂")~`end~`~Jelse~`amrun("割裂")~`end~J~J--斩击~Jif~`Blindside~`and~`not~`van~`and~`(CPs~`<~`5~`or~`(Env~`and~`EnvTimeLeft~`>~`2~`and~`(not~`Anti~`or~`(ShadowBladesUP~`and~`AntiCharges~`<~`3~`and~`(CurrentEnergy~`+~`(EnergyRegen~`*~`1.5))~`<~`100)~`or~`(not~`ShadowBladesUP~`and~`AntiCharges~`<~`4)~`)~`)~`)~`then~`~J~`~`~`~`amrun("斩击")~`return~`~Jelseif~`CurHealth~`<~`35~`and~`not~`van~`and~`(CPs~`<~`5~`or~`(Env~`and~`EnvTimeLeft~`>~`2~`and~`(not~`Anti~`or~`(ShadowBladesUP~`and~`AntiCharges~`<~`3)~`or~`(not~`ShadowBladesUP~`and~`AntiCharges~`<~`4)~`)~`)~`)~`then~`~J~`~`~`~`amrun("斩击")~`return~`~Jend~J~Jif~`(CurHealth~`<~`35~`or~`Blindside)~`and~`not~`van~`then~`if~`CurrentEnergy~`>~`110~`then~`if~`RupTimeLeft~`>~`0~`~`then~`if~`RupTimeLeft~`<~`2~`then~`~J~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`amrun("斩击")~`return~`end~`~J~`~`~`~`~`~`~`~`else~`amrun("斩击")~`return~`end~`end~`~J~`~`~`~`if~`Blindside~`and~`CPs~`>~`4~`and~`RupTimeLeft~`>~`0~`and~`RupTimeLeft~`>~`3~`and~`Env~`and~`(not~`Anti~`or~`((ShadowBladesUP~`and~`AntiCharges~`<~`3)~`or~`(not~`ShadowBladesUP~`and~`AntiCharges~`<~`4)))~`and~`(CurrentEnergy~`+~`(EnergyRegen~`*~`1.5))~`<~`100~`then~`~J~`~`~`~`~`~`~`~`amrun("斩击")~`return~`end~Jend~J~J~J--毒伤~J~Jif~`CPs~`>=~`2~`and~`SnD~`and~`SnDTimeLeft~`<~`2~`then~`amrun("毒伤")~`return~`end~J~Jif~`CPs~`>~`4~`and~`RupTimeLeft~`>~`0~`and~`not~`ShadowBladesUP~`and~`(not~`Anti~`or~`AntiCharges~`<~`4)~`then~`~J~`~`~`~`if~`RupTimeLeft~`<~`6~`and~`RupTimeLeft~`>~`3~`and~`(CurrentEnergy~`+~`(EnergyRegen~`*~`(RupTimeLeft~`-~`2))~`+~`25)~`<~`110~`then~`return~`end~`~J~`~`~`~`if~`RupTimeLeft~`<~`3~`or~`(RupTimeLeft~`>~`3~`and~`CurrentEnergy~`<~`60~`and~`not~`Ven)~`then~`return~`end~`end~`~Jif~`CPs~`>~`4~`and~`(not~`Env~`or~`EnvTimeLeft~`<~`1~`or~`(EnergyAfterEnvenom~`>~`100~`and~`(Anti~`and~`AntiCharges~`>~`2))~`or~`(ShadowBladesUP~`and~`SBTimeLeft~`>~`1~`and~`(EnergyAfterEnvenom~`<~`100~`or~`(Anti~`and~`AntiCharges~`>~`2))))~`then~`~J~`~`~`~`amrun("毒伤")~`return~`end~J~J~J~J~J~J~J--毁伤~J~Jif~`CurHealth~`>~`35~`then~`~J~`~`~`~`if~`CurrentEnergy~`>~`110~`then~`~J~`~`~`~`~`~`~`~`if~`RupTimeLeft~`>~`0~`then~`if~`RupTimeLeft~`<~`2~`then~`amrun("毁伤")~`end~`~J~`~`~`~`~`~`~`~`else~`amrun("毁伤")~`end~`end~Jend~J~Jif~`van~`then~`return~`end~`~Jif~`CPs~`<~`5~`or~`(Env~`and~`EnvTimeLeft~`>~`2~`and~`(not~`Anti~`or~`AntiCharges~`<~`3))~`then~`amrun("毁伤")~`end~J~J~J~J~J~J---------------------------------------------Bigjj出品--------------------------------------------------------------------~J~J~J~J~J~J~J^t^t^SVariable^T^t^SName^S5.4刺杀贼^t^^最后跟上完整导出版,功能都在脚本里有注释

臭得转圈圈 发表于 2014-1-1 13:38:24

xxx的脚本,顶一下

_o_冰blood 发表于 2014-1-1 14:10:54

帮顶了。没盗贼

贩子 发表于 2014-1-1 18:15:34

用了好像用不了。。。

long 发表于 2014-1-1 22:57:09

贩子 发表于 2014-1-1 18:15 static/image/common/back.gif
用了好像用不了。。。

用不了是不应该滴,你是不是加载后没有设置无目标啊

八月二十八 发表于 2014-1-1 23:10:39

明天我试下。。。。。

贩子 发表于 2014-1-1 23:10:59

额我默认的是当前目标、、、我明天去试试改为无目标先
页: [1] 2
查看完整版本: 自编5.4刺杀贼,纯脚本版,求审核,求勋章