stoneage8.5/服务器端lua文件/ablua/item/itemMax.lua
2020-06-22 17:49:02 +08:00

27 lines
980 B
Lua
Raw Blame History

function useitemmax(itemindex, charaindex, toindex, haveitemindex)
local data = other.atoi(item.getChar(itemindex, "俚뙈"))
if (char.getInt(charaindex,"돛야으榴檄")~=2 and data == 3)
or (char.getInt(charaindex,"돛야으榴檄")~=0 and data == 2) then
char.TalkToCli(charaindex, -1,"헝痰宮뚤壇돨윈嵐돛야윱윈嵐관범!", "<EFBFBD>")
return
end
if char.getInt(charaindex,"돛야으榴檄") == 2 then
char.setInt(charaindex,"돛야으榴檄",6);
char.DelItem(charaindex, haveitemindex)
char.TalkToCli(charaindex, -1,"묜毆퀭역폘뒤힛으돛야으!", "<EFBFBD>")
char.UpCahrData(charaindex,"p");
elseif char.getInt(charaindex,"돛야으榴檄") == 6 then
char.TalkToCli(charaindex, -1,"퀭綠쒔홍꼬역렴죄!", "<EFBFBD>")
else
char.DelItem(charaindex, haveitemindex)
char.setInt(charaindex,"돛야으榴檄",2);
char.TalkToCli(charaindex, -1,"묜毆퀭역폘뒤랗으돛야으!", "<EFBFBD>")
char.UpCahrData(charaindex,"p");
end
end
function main()
item.addLUAListFunction( "ITEM_USEITEMMAX", "useitemmax", "")
end