ClickOnItem = {}
ClickOnItem.cfg = {
["盟重传送石"] = function(actor, ...)
MapCfg.gotomap(actor, "3", 330, 330, 8)
-- gohome(actor)
return false
end,
["随机传送石"] = function(actor, ...)
local _map = getbaseinfo(actor, ConstCfg.gbase.mapid)
if MapCfg.dalumap[_map] and MapCfg.dalumap[_map].notrandom then
Func.sendmsg9(actor, "[随机传送石]:#70|此地图禁止随机!")
return false
else
map(actor, _map)
end
return false
end,
["开天斩"] = function(actor, ...)
Func.messagebox(actor, string.format("是否确认开始练习“%s”?", "开天斩"), "@click_addmagic,开天斩", "@exit")
return false
end,
["逐日剑法"] = function(actor, ...)
Func.messagebox(actor, string.format("是否确认开始练习“%s”?", "开天斩"), "@click_addmagic,逐日剑法", "@exit")
return false
end,
["四转材料宝箱"] = function(actor, ...)
gives(actor, "四转紫晶石#1#819&四转五彩石#1#819", "四转材料宝箱")
return true
end,
["金条"] = function(actor, ...)
changemoney(actor, 1, "+", 1000000, "金条兑换", true)
return true
end,
["蟠桃"] = function(actor, ...)
local pantao = Player.getint(actor, VarCfg.Player.int["蟠桃"]) or 0
if pantao < 10 then
Player.addint(actor, VarCfg.Player.int["蟠桃"], 1)
ReloadAttOBJ.main(actor)
return true
else
Func.sendmsg9(actor, "[蟠桃]:#70|您已经使用了10颗了!")
return false
end
end,
["万年何首乌"] = function(actor, ...)
local pantao = Player.getint(actor, VarCfg.Player.int["何首乌"]) or 0
if pantao < 10 then
Player.addint(actor, VarCfg.Player.int["何首乌"], 1)
ReloadAttOBJ.main(actor)
return true
else
Func.sendmsg9(actor, "[何首乌]:#70|您已经使用了10颗了!")
return false
end
end,
["千年灵芝"] = function(actor, ...)
local pantao = Player.getint(actor, VarCfg.Player.int["千年灵芝"]) or 0
if pantao < 10 then
Player.addint(actor, VarCfg.Player.int["千年灵芝"], 1)
ReloadAttOBJ.main(actor)
return true
else
Func.sendmsg9(actor, "[千年灵芝]:#70|您已经使用了10颗了!")
return false
end
end,
["人参果"] = function(actor, ...)
local pantao = Player.getint(actor, VarCfg.Player.int["人参果"]) or 0
if pantao < 10 then
Player.addint(actor, VarCfg.Player.int["人参果"], 1)
ReloadAttOBJ.main(actor)
return true
else
Func.sendmsg9(actor, "[人参果]:#70|您已经使用了10颗了!")
return false
end
end,
["天山雪莲"] = function(actor, ...)
local pantao = Player.getint(actor, VarCfg.Player.int["天山雪莲"]) or 0
if pantao < 10 then
Player.addint(actor, VarCfg.Player.int["天山雪莲"], 1)
ReloadAttOBJ.main(actor)
return true
else
Func.sendmsg9(actor, "[天山雪莲]:#70|您已经使用了10颗了!")
return false
end
end,
["10万经验卷"] = function(actor, ...)
clickon_exp(actor, "10万经验卷")
-- changeexp(actor, "+", 100000, false)
return false
end,
["300万经验卷"] = function(actor, ...)
LOGDump(...)
batch_exp(actor, "300万经验卷")
-- Func.messagebox(actor, "使用300万经验卷将消耗:#251|千年玄石x3#215|\\是否确认使用?#249", "@clickon_exp,300万经验卷", "@exit", 16)
return false
end,
["100万经验卷"] = function(actor, ...)
batch_exp(actor, "100万经验卷")
-- Func.messagebox(actor, "使用100万经验卷将消耗:#251|千年玄石x1#215|\\是否确认使用?#249", "@clickon_exp,100万经验卷", "@exit", 16)
return false
end,
["5000万经验卷"] = function(actor, ...)
batch_exp(actor, "5000万经验卷")
-- Func.messagebox(actor, "使用5000万经验卷将消耗:#251|千年玄石x50#215|\\是否确认使用?#249", "@clickon_exp,5000万经验卷", "@exit", 16)
return false
end,
["1000万经验卷"] = function(actor, ...)
batch_exp(actor, "1000万经验卷")
-- Func.messagebox(actor, "使用1000万经验卷将消耗:#251|千年玄石x10#215|\\是否确认使用?#249", "@clickon_exp,1000万经验卷", "@exit", 16)
return false
end,
["游艇"] = function(actor, ...)
giveitem(actor, "灵符", 500)
return true
end,
["鼠标"] = function(actor, ...)
giveitem(actor, "灵符", 100)
return true
end,
["键盘"] = function(actor, ...)
giveitem(actor, "灵符", 50)
return true
end,
["咖啡"] = function(actor, ...)
giveitem(actor, "灵符", 15)
return true
end,
["大苹果"] = function(actor, ...)
giveitem(actor, "灵符", 7)
return true
end,
["可乐"] = function(actor, ...)
giveitem(actor, "灵符", 3)
return true
end,
["香蕉"] = function(actor, ...)
giveitem(actor, "灵符", 1)
return true
end,
["女儿红"] = function(actor, ...)
if hasbuff(actor, 10027) or hasbuff(actor, 10028) then
Func.sendmsg9(actor, "[酒肆小二]:#70|您处于醉酒状态中,不可以重复使用哦!")
return false
end
addbuff(actor, 10027)
Func.sendmsg9(actor, "[酒肆小二]:#70|使用成功!伤害减免+10%,持续300s.中途可以再使用女儿红或者高粱酒.")
return true
end,
["高粱酒"] = function(actor, ...)
if hasbuff(actor, 10027) or hasbuff(actor, 10028) then
Func.sendmsg9(actor, "[酒肆小二]:#70|您处于醉酒状态中,不可以重复使用哦!")
return false
end
addbuff(actor, 10028)
Func.sendmsg9(actor, "[酒肆小二]:#70|使用成功!攻击伤害+10%,持续300s.中途可以再使用女儿红或者高粱酒.")
return true
end,
["鞭尸丹"] = function(actor, ...)
local _num = Player.getint(actor, VarCfg.Player.int["鞭尸丹"])
if _num < 999 then
Player.addint(actor, VarCfg.Player.int["鞭尸丹"], 1)
Func.sendmsg9(actor, string.format("[鞭尸丹]:#70|使用成功,100%%鞭尸1次,已叠加:%d次.", _num + 1))
return true
else
Func.sendmsg9(actor, "[鞭尸丹]:#70|叠加已达上限.")
return false
end
end,
["祝福油"] = function(actor, ...)
local equipMakeIndex = GetItemByPos(actor, 1)
if equipMakeIndex == "0" then
return false
else
local itemid = getiteminfo(actor, equipMakeIndex, 2)
local lucky_item = getstditematt(itemid, 39)
local set_Luck = GetItemLuck(actor, equipMakeIndex)
if set_Luck + lucky_item >= 9 then
return false
end
if (lucky_item + set_Luck) > 1 and Func.random(20, 500) then
SetItemLuck(actor, equipMakeIndex, set_Luck - 1)
sendmsg(actor, 1, '{"Msg":"〖提示〗你的武器被诅咒了.","Type":1,"FColor":255,"BColor":249}')
elseif (lucky_item + set_Luck) < 1 then
if Func.random(100) then
SetItemLuck(actor, equipMakeIndex, set_Luck + 1)
sendmsg(actor, 1, '{"Msg":"〖提示〗武器被加幸运了...","Type":1,"FColor":255,"BColor":249}')
else
sendmsg(actor, 1, '{"Msg":"〖提示〗无效.","Type":1,"FColor":255,"BColor":249}')
end
elseif (lucky_item + set_Luck) < 3 then
if Func.random(60) then
SetItemLuck(actor, equipMakeIndex, set_Luck + 1)
sendmsg(actor, 1, '{"Msg":"〖提示〗武器被加幸运了...","Type":1,"FColor":255,"BColor":249}')
else
sendmsg(actor, 1, '{"Msg":"〖提示〗无效.","Type":1,"FColor":255,"BColor":249}')
end
elseif (lucky_item + set_Luck) < 7 then
if Func.random(30) then
SetItemLuck(actor, equipMakeIndex, set_Luck + 1)
sendmsg(actor, 1, '{"Msg":"〖提示〗武器被加幸运了...","Type":1,"FColor":255,"BColor":249}')
else
sendmsg(actor, 1, '{"Msg":"〖提示〗无效.","Type":1,"FColor":255,"BColor":249}')
end
else
if Func.random(5, 200) then
SetItemLuck(actor, equipMakeIndex, set_Luck + 1)
sendmsg(actor, 1, '{"Msg":"〖提示〗武器被加幸运了...","Type":1,"FColor":255,"BColor":249}')
else
sendmsg(actor, 1, '{"Msg":"〖提示〗无效.","Type":1,"FColor":255,"BColor":249}')
end
end
end
end,
["高级祝福油"] = function(actor, ...)
local equipMakeIndex = GetItemByPos(actor, 1)
if equipMakeIndex == "0" then
return false
else
local itemid = getiteminfo(actor, equipMakeIndex, 2)
local lucky_item = getstditematt(itemid, 39)
local set_Luck = GetItemLuck(actor, equipMakeIndex)
if set_Luck + lucky_item >= 9 then
return false
end
SetItemLuck(actor, equipMakeIndex, set_Luck + 1)
sendmsg(actor, 1, '{"Msg":"〖提示〗武器被加幸运了...","Type":1,"FColor":255,"BColor":249}')
end
end,
["竹叶青"] = function(actor, ...)
ZhiJinHuLuOBJ:addjiuqi(actor, 1)
return false
end,
["特戒碎片"] = function(actor, ...)
if Func.takeitmes(actor, { { "特戒碎片", 10, 0 } }, true, true) then
local cfg = {
{ "复活戒指", 2 },
{ "麻痹戒指", 2 },
{ "护身戒指", 2 },
{ "隐身戒指", 17 },
{ "防御戒指", 17 },
{ "火焰戒指", 15 },
{ "邪眼指环", 15 },
{ "冰雪乾坤戒", 15 },
{ "冰雪龙渊戒", 15 },
}
local random = math.random(1, 100)
local total = 0
for _, v in ipairs(cfg) do
total = total + v[2]
if random <= total then
giveitem(actor, v[1], 1, 0, "特戒碎片")
Func.sendmsg9(actor, string.format("[特戒碎片]:#70|恭喜获得#251|%s#249|!", v[1]))
break
end
end
end
return false
end,
---* 10个生肖碎片 → 随机黄金生肖
["生肖碎片"] = function(actor, ...)
if Func.takeitmes(actor, { { "生肖碎片", 10, 0 } }, true, true) then
local cfg = {
"黄金鼠", "黄金牛", "黄金虎", "黄金兔", "黄金龙", "黄金蛇",
"黄金马", "黄金羊", "黄金猴", "黄金鸡", "黄金狗", "黄金猪",
}
local idx = math.random(1, #cfg)
giveitem(actor, cfg[idx], 1, 0, "生肖碎片")
Func.sendmsg9(actor, string.format("[生肖碎片]:#70|恭喜获得#251|%s#249|!", cfg[idx]))
end
return false
end,
---* 10个黄金生肖精华 → 随机钻石生肖
["黄金生肖精华"] = function(actor, ...)
if Func.takeitmes(actor, { { "黄金生肖精华", 10, 0 } }, true, true) then
local cfg = {
"钻石鼠", "钻石牛", "钻石虎", "钻石兔", "钻石龙", "钻石蛇",
"钻石马", "钻石羊", "钻石猴", "钻石鸡", "钻石狗", "钻石猪",
}
local idx = math.random(1, #cfg)
giveitem(actor, cfg[idx], 1, 0, "黄金生肖精华")
Func.sendmsg9(actor, string.format("[黄金生肖精华]:#70|恭喜获得#251|%s#249|!", cfg[idx]))
end
return false
end,
---* 10个钻石生肖精华 → 随机至尊生肖
["钻石生肖精华"] = function(actor, ...)
if Func.takeitmes(actor, { { "钻石生肖精华", 10, 0 } }, true, true) then
local cfg = {
"至尊鼠", "至尊牛", "至尊虎", "至尊兔", "至尊龙", "至尊蛇",
"至尊马", "至尊羊", "至尊猴", "至尊鸡", "至尊狗", "至尊猪",
}
local idx = math.random(1, #cfg)
giveitem(actor, cfg[idx], 1, 0, "钻石生肖精华")
Func.sendmsg9(actor, string.format("[钻石生肖精华]:#70|恭喜获得#251|%s#249|!", cfg[idx]))
end
return false
end,
["混沌碎片宝箱"] = function(actor, ...)
local result1, result2 = ransjstr("混沌战盔[碎片]#1|混沌战链[碎片]#1|混沌战镯[碎片]#1|混沌战戒[碎片]#1|混沌战腰[碎片]#1|混沌战靴[碎片]#1", 1, 3)
giveitem(actor, result1, 1, 0)
-- ZhiJinHuLuOBJ:addjiuqi(actor, 1)
return true
end,
["主宰碎片宝箱"] = function(actor, ...)
local result1, result2 = ransjstr("主宰战盔[碎片]#1|主宰战链[碎片]#1|主宰战镯[碎片]#1|主宰战戒[碎片]#1|主宰战腰[碎片]#1|主宰战靴[碎片]#1", 1, 3)
giveitem(actor, result1, 1, 0)
-- ZhiJinHuLuOBJ:addjiuqi(actor, 1)
return true
end,
---* 10个混沌战盔碎片 → 混沌战盔
["混沌战盔[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "混沌战盔[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "混沌战盔", 1, 0, "混沌战盔[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|混沌战盔#249|!")
end
return false
end,
---* 10个混沌战链碎片 → 混沌战链
["混沌战链[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "混沌战链[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "混沌战链", 1, 0, "混沌战链[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|混沌战链#249|!")
end
return false
end,
---* 10个混沌战镯碎片 → 混沌战镯
["混沌战镯[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "混沌战镯[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "混沌战镯", 1, 0, "混沌战镯[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|混沌战镯#249|!")
end
return false
end,
---* 10个混沌战戒碎片 → 混沌战戒
["混沌战戒[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "混沌战戒[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "混沌战戒", 1, 0, "混沌战戒[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|混沌战戒#249|!")
end
return false
end,
---* 10个混沌战腰碎片 → 混沌战腰
["混沌战腰[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "混沌战腰[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "混沌战腰", 1, 0, "混沌战腰[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|混沌战腰#249|!")
end
return false
end,
---* 10个混沌战靴碎片 → 混沌战靴
["混沌战靴[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "混沌战靴[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "混沌战靴", 1, 0, "混沌战靴[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|混沌战靴#249|!")
end
return false
end,
---* 10个主宰战盔碎片 → 主宰战盔
["主宰战盔[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "主宰战盔[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "主宰战盔", 1, 0, "主宰战盔[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|主宰战盔#249|!")
end
return false
end,
---* 10个主宰战链碎片 → 主宰战链
["主宰战链[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "主宰战链[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "主宰战链", 1, 0, "主宰战链[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|主宰战链#249|!")
end
return false
end,
---* 10个主宰战镯碎片 → 主宰战镯
["主宰战镯[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "主宰战镯[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "主宰战镯", 1, 0, "主宰战镯[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|主宰战镯#249|!")
end
return false
end,
---* 10个主宰战戒碎片 → 主宰战戒
["主宰战戒[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "主宰战戒[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "主宰战戒", 1, 0, "主宰战戒[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|主宰战戒#249|!")
end
return false
end,
---* 10个主宰战腰碎片 → 主宰战腰
["主宰战腰[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "主宰战腰[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "主宰战腰", 1, 0, "主宰战腰[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|主宰战腰#249|!")
end
return false
end,
---* 10个主宰战靴碎片 → 主宰战靴
["主宰战靴[碎片]"] = function(actor, ...)
if Func.takeitmes(actor, { { "主宰战靴[碎片]", 10, 0 } }, true, true) then
giveitem(actor, "主宰战靴", 1, 0, "主宰战靴[碎片]")
Func.sendmsg9(actor, "[合成]:#70|恭喜获得#251|主宰战靴#249|!")
end
return false
end,
["行会召集令"] = function(actor, ...)
local _map = getbaseinfo(actor, ConstCfg.gbase.mapid)
if MapCfg.dalumap[_map] and not MapCfg.dalumap[_map].chuanyunjian then
Func.sendmsg9(actor, "[提示]:#70|当前地图不能使用行会召集令!")
return false
end
local _x = getbaseinfo(actor, ConstCfg.gbase.x)
local _y = getbaseinfo(actor, ConstCfg.gbase.y)
local link = string.format("chuanyuanjian,%s,%d,%d,%s,%s", _map, _x, _y, getbaseinfo(actor, ConstCfg.gbase.name),
getbaseinfo(actor, ConstCfg.gbase.map_title))
gotolabel(actor, 1, link)
playeffect(actor, 82, 0, 0, 1, 0, 1)
return true
end,
}
function chuanyuanjian(actor, mapid, x, y, name, maptitle)
local _map = getbaseinfo(actor, ConstCfg.gbase.mapid)
local _bool = false
if _map ~= mapid then
_bool = true
else
_bool = not Npc.CheckRange(actor, x, y, 8)
end
if _bool then
local str = {}
table.insert(str, "
")
table.insert(str, "")
table.insert(str, "