27 lines
980 B
Lua
27 lines
980 B
Lua
![]() |
function useitemmax(itemindex, charaindex, toindex, haveitemindex)
|
|||
|
|
|||
|
local data = other.atoi(item.getChar(itemindex, "<EFBFBD>ֶ<EFBFBD>"))
|
|||
|
if (char.getInt(charaindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬")~=2 and data == 3)
|
|||
|
or (char.getInt(charaindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬")~=0 and data == 2) then
|
|||
|
char.TalkToCli(charaindex, -1,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
|
|||
|
return
|
|||
|
end
|
|||
|
if char.getInt(charaindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬") == 2 then
|
|||
|
char.setInt(charaindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬",6);
|
|||
|
char.DelItem(charaindex, haveitemindex)
|
|||
|
char.TalkToCli(charaindex, -1,"<EFBFBD><EFBFBD>ϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!", "<EFBFBD><EFBFBD>ɫ")
|
|||
|
char.UpCahrData(charaindex,"p");
|
|||
|
elseif char.getInt(charaindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬") == 6 then
|
|||
|
char.TalkToCli(charaindex, -1,"<EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD>ȫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!", "<EFBFBD><EFBFBD>ɫ")
|
|||
|
else
|
|||
|
char.DelItem(charaindex, haveitemindex)
|
|||
|
char.setInt(charaindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬",2);
|
|||
|
char.TalkToCli(charaindex, -1,"<EFBFBD><EFBFBD>ϲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!", "<EFBFBD><EFBFBD>ɫ")
|
|||
|
char.UpCahrData(charaindex,"p");
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
function main()
|
|||
|
item.addLUAListFunction( "ITEM_USEITEMMAX", "useitemmax", "")
|
|||
|
end
|