--与6040205 时装兑换 对话
function n6040205_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex)
if TalkIndex == -1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650201) -- "高级时装兑换商:\n 在我这里可以用时装兑换卷将一些时限装备变为永久装备。"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 4) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650202) --"宠物和装备兑换"
msg.AddMsgEvent(MsgID, 21, 5) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650203) --"时装兑换"
msg.AddMsgEvent(MsgID, 21, 99) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 4 then --宠物和装备兑换
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650204) -- "高级时装兑换商:\n 强健体魄的旺财[7天]+时装兑换卷= 强健体魄的旺财[永久]\n 圣灵防御戒指[7天]+时装兑换卷= 圣灵防御戒指[永久]\n 圣灵防御披风[7天]+时装兑换卷= 圣灵防御披风[永久]\n 圣灵防御项链[7天]+时装兑换卷= 圣灵防御项链[永久]"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 6) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650205) --"兑换强健体魄的旺财[永久]"
msg.AddMsgEvent(MsgID, 21, 7) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650206) --"兑换圣灵防御戒指[永久]"
msg.AddMsgEvent(MsgID, 21, 8) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650207) --"兑换圣灵防御披风[永久]"
msg.AddMsgEvent(MsgID, 21, 9) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650208) --"兑换圣灵防御项链[永久]"
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 5 then --兑换时装
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650209) -- "高级时装兑换商:\n 生命小不乖套装[永久]、生命阳光休闲套装[永久]、圣灵防护黑色诱惑套装[永久]、圣灵防护圣洁信仰套装[永久]集齐之后都有新的衣橱属性,你可以打开衣橱查看一下。"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 10) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650210) --"兑换生命小不乖套装[永久]"
msg.AddMsgEvent(MsgID, 21, 11) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650211) --"兑换生命阳光休闲套装[永久]"
msg.AddMsgEvent(MsgID, 21, 12) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650212) --"兑换圣灵防护黑色诱惑套装[永久]"
msg.AddMsgEvent(MsgID, 21, 13) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650213) --"兑换圣灵防护圣洁信仰套装[永久]"
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 10 then --兑换生命小不乖套装[永久]
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650214) -- "高级时装兑换商:\n 生命小不乖发带[7天]+时装兑换卷= 生命小不乖发带[永久]\n 生命透明水粉抹胸裙[7天]+时装兑换卷= 生命透明水粉抹胸裙[永久]\n 生命梦幻珠链[7天]+时装兑换卷= 生命梦幻珠链[永久]"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 14) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650215) --"兑换生命小不乖发带[永久]"
msg.AddMsgEvent(MsgID, 21, 15) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650216) --"兑换生命透明水粉抹胸裙[永久]"
msg.AddMsgEvent(MsgID, 21, 16) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650217) --"兑换生命梦幻珠链[永久]"
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 11 then --兑换生命阳光休闲套装[永久]
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650218) -- "高级时装兑换商:\n 生命阳光休闲服饰[7天]+时装兑换卷= 生命阳光休闲服饰[永久]\n 生命阳光手环[7天]+时装兑换卷= 生命阳光手环[永久]\n 生命阳光休闲鞋[7天]+时装兑换卷= 生命阳光休闲鞋[永久]"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 17) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650219) --"兑换生命阳光休闲服饰[永久]"
msg.AddMsgEvent(MsgID, 21, 18) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650220) --"兑换生命阳光手环[永久]"
msg.AddMsgEvent(MsgID, 21, 19) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650221) --"兑换生命阳光休闲鞋[永久]"
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 12 then --圣灵防护黑色诱惑套装
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650222) -- "高级时装兑换商:\n 圣灵防护个性墨镜[7天]+时装兑换卷= 圣灵防护个性墨镜[永久]\n 圣灵防护黑红诱惑背心[7天]+时装兑换卷= 圣灵防护黑红诱惑背心[永久]\n 圣灵防护黑红诱惑护腕[7天]+时装兑换卷= 圣灵防护黑红诱惑护腕[永久]\n 圣灵防护黑网格长靴[7天]+时装兑换卷= 圣灵防护黑网格长靴[永久]"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 20) -- 选项按钮
msg.AddMsgEvent(MsgID, 1, 650223) -- 兑换圣灵防护个性墨镜[永久]
msg.AddMsgEvent(MsgID, 21, 21) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650224) --"兑换圣灵防护黑红诱惑背心[永久]"
msg.AddMsgEvent(MsgID, 21, 22) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650225) --"兑换圣灵防护黑红诱惑护腕[永久]"
msg.AddMsgEvent(MsgID, 21, 23) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650226) --"兑换圣灵防护黑网格长靴[永久]"
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 13 then -- 每日奖牌积分排行
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650227) -- "高级时装兑换商:\n 圣灵防护圣洁信仰之帽[7天]+时装兑换卷= 圣灵防护圣洁信仰之帽[永久]\n 圣灵防护圣洁信仰之服[7天]+时装兑换卷= 圣灵防护圣洁信仰之服[永久]\n 圣灵防护圣洁信仰之腕[7天]+时装兑换卷= 圣灵防护圣洁信仰之腕[永久]\n 圣灵防护圣洁信仰之靴[7天]+时装兑换卷= 圣灵防护圣洁信仰之靴[永久]"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, 24) -- 选项按钮
msg.AddMsgEvent(MsgID, 1, 650228) -- 兑换圣灵防护圣洁信仰之帽[永久]
msg.AddMsgEvent(MsgID, 21, 25) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650229) --"兑换圣灵防护圣洁信仰之服[永久]"
msg.AddMsgEvent(MsgID, 21, 26) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650230) --"兑换圣灵防护圣洁信仰之腕[永久]"
msg.AddMsgEvent(MsgID, 21, 27) --选项按钮
msg.AddMsgEvent(MsgID, 1, 650231) --"兑换圣灵防护圣洁信仰之靴[永久]"
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100002) --"取消"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
elseif TalkIndex == 6 then -- 兑换强健体魄的旺财[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 4212041)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 4212042, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4212041, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 7 then -- 兑换圣灵防御戒指[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440507)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440524, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440507, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 8 then -- 兑换圣灵防御披风[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440508)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440525, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440508, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 9 then -- 兑换圣灵防御项链[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440509)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440526, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440509, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 14 then -- 兑换生命小不乖发带[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440493)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440510, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440493, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 15 then -- 兑换生命透明水粉抹胸裙[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440494)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440511, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440494, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 16 then -- 兑换生命梦幻珠链[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440495)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440512, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440495, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 17 then -- 兑换生命阳光休闲服饰[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440496)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440513, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440496, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 18 then -- 兑换生命阳光手环[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440497)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440514, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440497, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 19 then -- 兑换生命阳光休闲鞋[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440498)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440515, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440498, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 20 then -- 圣灵防护个性墨镜[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440499)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440516, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440499, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 21 then -- 圣灵防护黑红诱惑背心[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440500)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440517, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440500, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 22 then -- 圣灵防护黑红诱惑护腕[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440501)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440518, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440501, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 23 then -- 圣灵防护黑网格长靴[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440502)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440519, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440502, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 24 then -- 圣灵防护圣洁信仰之帽[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440503)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440520, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440503, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 25 then -- 圣灵防护圣洁信仰之服[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440504)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440521, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440504, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 26 then -- 圣灵防护圣洁信仰之腕[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440505)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440522, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440505, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
elseif TalkIndex == 27 then -- 圣灵防护圣洁信仰之靴[永久]
local juan = role.GetRoleItemNum(RoleID, 4810094)
local item = role.GetRoleItemNum(RoleID, 8440506)
if juan < 1 or item < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650232) -- "高级时装兑换商:\n 兑换所需材料不足"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) --取消按钮
msg.AddMsgEvent(MsgID, 1, 100001) --"确定"
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
if role.GetBagFreeSize(RoleID) < 1 then
local MsgID = msg.BeginMsgEvent()
msg.AddMsgEvent(MsgID, 20, 650233) -- "高级时装兑换商:\n 背包要有空间才能兑换奖励!"
msg.AddMsgEvent(MsgID, 24, TargetID) --npcid
msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮
msg.AddMsgEvent(MsgID, 1, 100001) -- “确定”
msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息
else
role.AddRoleItem(MapID, InstanceID, RoleID, 8440523, 1, -1, 8, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 8440506, 1, 420)
role.RemoveFromRole(MapID, InstanceID, RoleID, 4810094, 1, 420)
end
end
end
end
aux.RegisterCreatureEvent(6040205, 7, "n6040205_OnTalk")