-- 门派死亡激发
function mp_jifa()
local mp = GetVariable("mymp")
autorun=false
EnableTimer("pfm", false)
EnableTimer("hbpfm", false)
EnableTimer("cure", false)
EnableTimer("nt_pfm", false)
ResetTimer("reconnect")
EnableTimer("reconnect", true)
DeleteTimer("xm_pfm")
EnableTimer("xukong", false)
if mp == "将军府" then
cmdSender:Add("@50;jifa axe sanban-axe;jifa dodge yanxing-steps;jifa parry bawang-qiang;jifa spear bawang-qiang;jifa spells baguazhou;jifa force lengquan-force;jifa leadership strategy;jifa blade wuhu-blade;jifa unarmed changquan;jifa mace wusi-mace;quit")
return
end
if mp == "陷空山无底洞" then
cmdSender:Add("@50;jifa dodge kugu-blade;jifa force huntian-qigong;jifa spells dao;jifa blade kugu-blade;jifa parry kugu-blade;jifa unarmed yinfeng-zhua;jifa sword qixiu-jian;quit")
return
end
if mp == "方寸山三星洞" then
cmdSender:Add("@50;jifa spells dao;jifa dodge jindouyun;jifa unarmed puti-zhi;jifa force wuxiangforce;jifa stick qianjun-bang;jifa parry qianjun-bang;jifa sword liangyi-jian;quit")
return
end
if mp == "蜀山剑派" then
cmdSender:Add("@50;jifa sword canxin-jian;jifa unarmed hunyuan-zhang;jifa force zixia-shengong;jifa spells taoism;jifa parry mindsword;jifa dodge sevensteps;quit")
return
end
if mp == "盘丝洞" then
cmdSender:Add("@50;jifa force jiuyin-xinjing;jifa spells pansi-dafa;jifa dodge yueying-wubu;jifa parry qingxia-jian;jifa sword chixin-jian;jifa unarmed lanhua-shou;jifa music qin;jifa whip yinsuo-jinling;quit")
return
end
end
function OnLijingNotKilled()
if renwu == "李靖" then
EnableTriggerGroup("renwu_end", false)
EnableTriggerGroup("pfm", false)
EnableTimer("pfm", false)
g_findagain = true
GoDzRightnow()
end
end
function InitVar()
--大米id和名字
g_jianding = ""
local superperform = GetVariable("superperform")
local giveid = GetVariable("giveid")
local giveidname = GetVariable("giveidname")
local flower_id = GetVariable("flower_id")
local yaodianname = GetVariable("yaodianname")
local yaodianid = GetVariable("yaodianid")
local racespe = GetVariable("racespe")
g_race_spe = racespe
g_give_dami_name = giveidname
g_give_dami_id = giveid
zhuanshiperform = superperform
flower_boss = flower_id
g_yaodian_name = yaodianname
g_yaodian_id = yaodianid
--是否要自己买药
g_buyyao_self = true
yinwu_go = "ne"
g_race = "人"
--g_race_spe = "special faith"
g_pj_all_ok = false
g_tianzhu_ok = false
g_findagain = false
g_findtime = 0
idle = 0
g_qx_per = 100
g_xinshen_per = 100
g_needbian = false
g_dzing = false
g_in_renwu = false
blocked = 0
autorun = true
g_sealcounts = 0
g_sealboss = "wei"
g_find = 0
target_id = "none"
g_specounts = 0
g_spelist = {}
g_sellcounts = 0
g_givecounts = 0
g_getcounts = 0
g_getlist = {}
g_selllist = {}
g_givelist = {}
g_givelist2 = {}
hbmatch = "asdfsadfdsfdsafdsafdsaf"
givereceipt = false
guai_id = "none"
guai_name = "none"
guai_place = "none"
g_needput = true
g_needmap = true
g_needbag = false
g_needyao = true
g_needbsz = true
g_sealboss ="wei"
g_needsword = false
g_needaxe = false
g_needdz = true
g_pfm = jjf_pfm
-- mp
g_renwu_mp = true
-- li
g_renwu_li = true
-- hb
local dohb = GetVariable("dohb")
if dohb == "yes" then
g_renwu_hb = true
else
g_renwu_hb = false
end
local dopj = GetVariable("dopj")
if dopj == "yes" then
g_renwu_pj = true
else
g_renwu_pj = false
end
local dont = GetVariable("dont")
if dont == "yes" then
g_renwu_nt = true
else
g_renwu_nt = false
end
g_renwu_kf = false
g_renwu_tf = true
g_renwu_yuan = false
can_nt = true
can_mp = true
can_li = true
can_hb = true
can_pj = true
can_kf = true
can_tf = true
can_yuan = true
--枯骨洞
g_kgd_fx = ""
g_kgd_ffx = ""
g_kgdmove_counts = 0
g_random_move_flag = false
g_random_move_steps = 0
yy_fire = false
yy_water = false
yy_earth = false
yy_metal = false
yy_wood = false
kk_id = ""
g_zhuanshiPfm = ""
g_zhuanshiPfm_fight = ""
g_hb_success = 0
g_hb_failure = 0
g_li_success = 0
g_li_failure = 0
g_nt_success = 0
g_nt_cancel = 0
g_nt_notfind = 0
g_nt_errkill = 0
g_nt_bekilled = 0
g_hb_matchs = 0
g_hbmatch_times = 0
g_hbpaper = ""
g_hbline = ""
g_hbing = true
g_current_go = ""
g_nt_bianid = ""
g_nt_bianname = ""
g_nt_ob = false
g_nt_giveyao = false
g_nt_fight_who = 0
g_nt_bian = false
g_nt_qin = shushan_nt_qin
g_nt_quan = shushan_nt_quan
g_nt_fight = shushan_nt_fight
g_nt_kill = shushan_nt_kill
if g_renwu_nt then
g_yao = 300
g_dan = 100
else
g_yao = 30
g_dan = 30
end
g_checkset = 0
g_gold = 0
g_silver = 0
g_coin = 0
g_map_penglai = 0
g_map_xueshan = 0
g_bishuizhou = 0
g_shaqi = 0
myid = "none"
myname = "天晓得"
nowname = ""
mp = ""
sex = ""
g_set_no_teach = ""
g_penglai_climb_faint = false
g_bianid = ""
g_exp_gain = 0
g_exp_permin = 0
g_exp = 0
g_item_list = {}
g_item_counts = 0
g_item_current = 0
g_jldl = false
g_zxzx = false
g_hb_huifu_wrong = false
g_linda_reward = false
g_panjiang_name = ""
g_panjiang_place = ""
g_panjiang_killed = true
g_panjiang_find = 0
g_maoynig_1 = false
g_maoynig_2 = false
g_maoynig_3 = false
g_maoying_go = "end"
g_maoying_hole = false
g_maoying_in_hole = false
g_thousand_cash = 0
g_tenthousand_cash = 0
g_cast_fail = ""
-- 杀怪用剑气好吗?
--shushan_busy_pfm = "perform jianqi;"
shushan_busy_pfm = ""
g_nt_type = "??"
g_nt_level = "??"
g_nt_mp = "未知"
pan_jiang = ""
pan_jiang_id = ""
pan_jiang_place = ""
g_can_drop = false
g_give_hulu = false
g_pj_killed = 0
g_pj_cancel = 0
g_maoying_enter = 0
g_pfmwhat = g_pfm
g_unwield_all = "unwield sword;unwield dagger;unwield axe"
g_target_eff = 0
g_target_hp = 0
g_mp_zheng = true
g_rose = 0
g_nandu = 0
end
function InitTrigger()
for i = 1, 10 do
DeleteTrigger("hbmatch"..i)
end
EnableTriggerGroup("ask_hb", false)
EnableTriggerGroup("ask_li", false)
EnableTriggerGroup("ask_mp", false)
EnableTriggerGroup("ask_pj", false)
EnableTriggerGroup("autokillnpc", false)
EnableTriggerGroup("autokillnpc2", false)
EnableTriggerGroup("autokillnpc3", false)
EnableTriggerGroup("bian", true)
EnableTriggerGroup("boss", true)
EnableTriggerGroup("CastEsc", false)
EnableTriggerGroup("changanw", false)
EnableTriggerGroup("check", false)
EnableTriggerGroup("checkset", true)
EnableTriggerGroup("connect", true)
EnableTriggerGroup("cure", false)
EnableTriggerGroup("checkbag", false)
EnableTriggerGroup("dz", false)
EnableTriggerGroup("didian", false)
EnableTriggerGroup("deposit", false)
EnableTriggerGroup("dud", false)
EnableTriggerGroup("eatshen", true)
EnableTriggerGroup("eatyao", true)
EnableTriggerGroup("find", false)
EnableTriggerGroup("findguai", true)
EnableTriggerGroup("fly", false)
EnableTriggerGroup("follow", false)
EnableTriggerGroup("guaiesc", false)
EnableTriggerGroup("hbkill", false)
EnableTriggerGroup("hbjl", false)
EnableTriggerGroup("hb", true)
EnableTriggerGroup("hblog", false)
EnableTriggerGroup("hongl", false)
EnableTriggerGroup("hp_shaqi", true)
EnableTriggerGroup("idle", true)
EnableTriggerGroup("itemdrop", true)
EnableTriggerGroup("itemget", false)
EnableTriggerGroup("jldl", true)
EnableTriggerGroup("kgd", false)
EnableTriggerGroup("OnLiCanceled", true)
EnableTriggerGroup("linda", false)
EnableTriggerGroup("login", false)
EnableTriggerGroup("nt_bian_id", false)
EnableTriggerGroup("nt_find", false)
EnableTriggerGroup("nt_give", false)
EnableTriggerGroup("nt_fight", false)
EnableTriggerGroup("nt_ask", false)
EnableTriggerGroup("nt_canceled", true)
EnableTriggerGroup("nt_quan", true)
EnableTriggerGroup("nt_fail", true)
EnableTriggerGroup("nt_qin", false)
EnableTriggerGroup("nt_wakeup", false)
EnableTriggerGroup("ntcha", false)
EnableTriggerGroup("panjiang_end", true)
EnableTriggerGroup("pfm", false)
EnableTriggerGroup("pengl", false)
EnableTriggerGroup("penglai", true)
EnableTriggerGroup("pj_get", true)
EnableTriggerGroup("proc_item", false)
EnableTriggerGroup("quit", true)
EnableTriggerGroup("query", true)
EnableTriggerGroup("renwu_end", false)
EnableTriggerGroup("score", false)
EnableTriggerGroup("set", true)
EnableTriggerGroup("Normal", true)
EnableTriggerGroup("xinmo", true)
EnableTriggerGroup("yueg", false)
EnableTriggerGroup("yinw", false)
EnableTriggerGroup("wakeup", true)
DeleteTrigger("xinmo_die")
EnableTriggerGroup("maoying_hole", false)
EnableTriggerGroup("yinwu_go", false)
end
function InitTimer()
EnableTimer("pfm", false)
EnableTimer("hbpfm", false)
EnableTimer("cure", false)
EnableTimer("nt_pfm", false)
ResetTimer("reconnect")
EnableTimer("reconnect", true)
DeleteTimer("xm_pfm")
EnableTimer("xukong", false)
end
function init()
Note("init(xxx)...")
math.randomseed( os.time() )
InitVar()
InitTrigger()
InitTimer()
cmdSender:Add("@10;#t+ score;score")
cmdSender:Add("#t+ special;special;@10;#t- special")
cmdSender:Add("nt;pj;i;hp;l magic box")
UpdateStatus()
end
function OnScoreEnd()
cmdSender:Add("#t- score")
end
function OnFlySuccess()
EnableTriggerGroup("fly", false)
if g_AfterFly ~= "" then
cmdSender:Add(g_AfterFly)
end
end
function OnFlyFail()
cmdSender:Add("@30;ss;ec;ef;fly "..g_FlyTo)
end
function OnFlyFailNeedHeal()
cmdSender:Add("hp;@10;ec;ef;ss;fly "..g_FlyTo)
end
function OnFlyFailHongl()
cmdSender:Add("n;w;s")
OnFlyFail()
end
function OnFallinKuGuDong()
Note("糟糕啦!掉枯骨洞啦!")
InitTimer()
InitTrigger()
cmdSender:Clear()
g_random_move_flag = false
g_kgdmove_counts = 0
cmdSender:Add("unset brief")
g_kgd_skip = false
cmdSender:Add("#t- follow;#t- pfm;#t- find;#t+ kgd")
cmdSender:Add("zuan;l")
end
function OnFlyFailNoMana()
cmdSender:Insert("eat ling zhi")
OnFlyFail()
end
function OnCastEscSuccess()
g_cast_fail = "success"
--[[
EnableTriggerGroup("CastEsc", false)
if g_AfterCastEsc ~= "" then
cmdSender:Add(g_AfterCastEsc)
end
]]
end
-- set notop cast
function OnCastSuccess()
if g_cast_fail == "success" then
blocked = 0
EnableTriggerGroup("CastEsc", false)
if g_AfterCastEsc ~= "" then
cmdSender:Add(mp_after_cast)
cmdSender:Add(g_AfterCastEsc)
end
else
if "" == g_cast_fail then
blocked = 0
OnNoCast()
end
end
g_cast_fail = ""
end
function OnShuShanCastSuccess()
g_cast_fail = "success"
--[[
EnableTriggerGroup("CastEsc", false)
if g_AfterCastEsc ~= "" then
cmdSender:Add("s;ef")
cmdSender:Add(g_AfterCastEsc)
end
]]
end
function OnwudidongCastSuccess()
g_cast_fail = "success"
--[[
EnableTriggerGroup("CastEsc", false)
if g_AfterCastEsc ~= "" then
cmdSender:Add("ef;e;e;w;#5 s;up")
cmdSender:Add(g_AfterCastEsc)
end
]]
end
function OnCastEscFail()
if g_cast_fail == "" then
g_cast_fail = "fail"
end
EnableTriggerGroup("CastEsc", true)
cmdSender:Add("@50;"..g_CastEscAction)
end
function OnCastEscFailNoMana()
g_cast_fail = "nomana"
cmdSender:Insert("eat ling zhi")
OnCastEscFail()
end
function OnFlyFailNoCloud()
EnableTriggerGroup("CastEsc", true)
g_AfterCastEsc = "fly "..g_FlyTo
if mp == "五庄观" and (g_bianid ~= "" or nowname ~= myname) then
cmdSender:Add("bian;@50")
end
cmdSender:Add(g_CastEscAction)
end
function OnCastEscFailNoCast()
EnableTriggerGroup("NoCast", true)
cmdSender:Add("l")
end