Files
jianyin2025/服务端/MirServer/Mir200/Envir/Market_Def/shengzhuangxitong.lua

85 lines
5.1 KiB
Lua

require("Envir/Market_Def/wza.lua") --个人封装函数
local sz_config = {
[1] = {attr_img="yqsx",mon_img="sq1",mon_x=231.0,mon_y=170.0,title_img="title1",xz_pos={x=35.0,y=132.0},takeids={86,87,88,89,90,91}},
[2] = {attr_img="sqsx",mon_img="sq2",mon_x=237.0,mon_y=145.0,title_img="title2",xz_pos={x=35.0,y=260.0},takeids={92,93,94,95,96,97}},
[3] = {attr_img="tqsx",mon_img="sq3",mon_x=223.0,mon_y=171.0,title_img="title3",xz_pos={x=35.0,y=386.0},takeids={98,99,100,101,102,103}},
}
function shengzhuangxitongui(actor,index,xuanze,isxianshi1)
index = tonumber(index) or 1
xuanze = tonumber(xuanze) or 1
isxianshi1 = tonumber(isxianshi1) or 0
local msg = [[
<Img|x=0.0|y=-1.0|esc=1|bg=1|reset=1|show=4|loadDelay=1|img=wza/sanqingsz/bg.png|move=1>
<Button|x=798.0|y=16.0|pimg=public/1900000511.png|nimg=public/1900000510.png|link=@exit>
]]
if index == 1 then
msg = msg .. "<Button|x=798.0|y=102.0|nimg=wza/25.png|size=18|color=161|text=装 \\备>"
msg = msg .. "<Button|x=798.0|y=180.0|color=161|size=18|nimg=wza/26.png|text=分 \\解|link=@shengzhuangxitongui,2>"
msg = msg .. "<Button|x=798.0|y=258.0|color=161|size=18|nimg=wza/26.png|text=兑 \\换|link=@shengzhuangxitongui,3>"
local cur_cfg = sz_config[xuanze]
msg = msg .. [[
<Img|x=19.0|y=81.0|img=wza/sanqingsz/ditu.png|esc=0>
<Img|x=334.0|y=34.0|img=wza/sanqingsz/sqsz.png|esc=0>
<Img|x=596.0|y=81.0|img=wza/sanqingsz/youkuang.png|esc=0>
<Img|x=137.0|y=85.0|height=458|img=public/bg_yyxsz_02.png|esc=0>
<Img|x=287.0|y=91.0|img=wza/sanqingsz/title_bg.png|esc=0>
]]
msg = msg .. "<Img|x=629.0|y=97.0|img=wza/sanqingsz/"..cur_cfg.attr_img..".png|esc=0>"
msg = msg .. "<Button|x=36.0|y=132.0|nimg=wza/sanqingsz/xz1.png|size=18|color=255|link=@shengzhuangxitongui,"..index..",1>"
msg = msg .. "<Button|x=36.0|y=260.0|nimg=wza/sanqingsz/xz2.png|size=18|color=255|link=@shengzhuangxitongui,"..index..",2>"
msg = msg .. "<Button|x=36.0|y=387.0|nimg=wza/sanqingsz/xz3.png|size=18|color=255|link=@shengzhuangxitongui,"..index..",3>"
msg = msg .. "<Img|x="..cur_cfg.mon_x.."|y="..cur_cfg.mon_y.."|img=wza/sanqingsz/"..cur_cfg.mon_img..".png|esc=0>"
msg = msg .. [[
<Img|x=279.0|y=134.0|img=wza/24.png|esc=0>
<Img|x=388.0|y=134.0|img=wza/24.png|esc=0>
<Img|x=466.0|y=209.0|img=wza/24.png|esc=0>
<Img|x=198.0|y=209.0|img=wza/24.png|esc=0>
<Img|x=198.0|y=327.0|img=wza/24.png|esc=0>
<Img|x=466.0|y=327.0|img=wza/24.png|esc=0>
]]
msg = msg .. "<Img|x=317.0|y=98.0|img=wza/sanqingsz/"..cur_cfg.title_img..".png|esc=0>"
local takeid_t = cur_cfg.takeids
msg = msg .. "<DBItemShow|x=271.0|y=126.0|width=70|height=70|dblink=@tuoxia_shengzhuang,"..takeid_t[1]..","..xuanze.."|makeindex="..getconst(actor,"<$USEITEM["..takeid_t[1].."]>")..">"
msg = msg .. "<DBItemShow|x=379.0|y=126.0|width=70|height=70|dblink=@tuoxia_shengzhuang,"..takeid_t[2]..","..xuanze.."|makeindex="..getconst(actor,"<$USEITEM["..takeid_t[2].."]>")..">"
msg = msg .. "<DBItemShow|x=189.0|y=201.0|width=70|height=70|dblink=@tuoxia_shengzhuang,"..takeid_t[3]..","..xuanze.."|makeindex="..getconst(actor,"<$USEITEM["..takeid_t[3].."]>")..">"
msg = msg .. "<DBItemShow|x=457.0|y=201.0|width=70|height=70|dblink=@tuoxia_shengzhuang,"..takeid_t[4]..","..xuanze.."|makeindex="..getconst(actor,"<$USEITEM["..takeid_t[4].."]>")..">"
msg = msg .. "<DBItemShow|x=189.0|y=318.0|width=70|height=70|dblink=@tuoxia_shengzhuang,"..takeid_t[5]..","..xuanze.."|makeindex="..getconst(actor,"<$USEITEM["..takeid_t[5].."]>")..">"
msg = msg .. "<DBItemShow|x=457.0|y=318.0|width=70|height=70|dblink=@tuoxia_shengzhuang,"..takeid_t[6]..","..xuanze.."|makeindex="..getconst(actor,"<$USEITEM["..takeid_t[6].."]>")..">"
msg = msg .. "<Img|x="..cur_cfg.xz_pos.x.."|y="..cur_cfg.xz_pos.y.."|img=wza/sanqingsz/xuanzhong.png|esc=0>"
elseif index == 2 then
msg = msg .. "<Button|x=798.0|y=102.0|nimg=wza/26.png|size=18|color=161|text=装 \\备|link=@shengzhuangxitongui,1>"
msg = msg .. "<Button|x=798.0|y=180.0|color=161|size=18|nimg=wza/25.png|text=分 \\解>"
msg = msg .. "<Button|x=798.0|y=258.0|color=161|size=18|nimg=wza/26.png|text=兑 \\换|link=@shengzhuangxitongui,3>"
elseif index == 3 then
msg = msg .. "<Button|x=798.0|y=102.0|nimg=wza/26.png|size=18|color=161|text=装 \\备|link=@shengzhuangxitongui,1>"
msg = msg .. "<Button|x=798.0|y=180.0|color=161|size=18|nimg=wza/26.png|text=分 \\解|link=@shengzhuangxitongui,2>"
msg = msg .. "<Button|x=798.0|y=258.0|color=161|size=18|nimg=wza/25.png|text=兑 \\换>"
end
say(actor,msg)
end
function tuoxia_shengzhuang(actor,index,xuanze)
index = tonumber(index)
xuanze = tonumber(xuanze)
local item = GetItemByPos(actor,index)
if item then
local makeIndex = getiteminfo(actor,item,1)
takeoffitem(actor,index,makeIndex)
end
return shengzhuangxitongui(actor,1,xuanze)
end
function lookothershengzhuang(actor,player)
end