Cod: Selectaţi tot
quest borrar_items begin
state start begin
when login begin
cmdchat("BORRAR QID|"..q.getcurrentquestindex())
end
when button or info begin
cmdchat("BORRAR INPUT|1")
local shang = split(input(cmdchat("BORRAR SEND|")), "|")
cmdchat("BORRAR INPUT|0")
if shang[1] == "BORRAR" then
borrar_items.Borrar(tonumber(shang[2]), tonumber(shang[3]))
end
end
function Borrar(slot, vnum)
item.select_cell(slot)
local item_vnum, item_count, item_id = item.get_vnum(), item.get_count(), item.get_id()
mysql_query("INSERT INTO log.log_delete (account_id, name, id_item, vnum, count, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2) VALUES("..pc.get_account_id()..", '"..pc.get_name().."', "..item_id..", "..item_vnum..", "..item_count..", "..item.get_attr(0)[1]..", "..item.get_attr(0)[2]..", "..item.get_attr(1)[1]..", "..item.get_attr(1)[2]..", "..item.get_attr(2)[1]..", "..item.get_attr(2)[2]..", "..item.get_attr(3)[1]..", "..item.get_attr(3)[2]..", "..item.get_attr(4)[1]..", "..item.get_attr(4)[2]..", "..item.get_attr(5)[1]..", "..item.get_attr(5)[2]..", "..item.get_attr(6)[1]..", "..item.get_attr(6)[2]..", "..item.get_socket(0)..", "..item.get_socket(1)..", "..item.get_socket(2)..");")
if is_test_server() then
syschat("---- Debug ----")
syschat("Vnum: "..tostring(vnum))
syschat("Slot: "..tostring(slot))
syschat("ID: "..tostring(item.get_id()))
syschat("---- End_Debug ----")
end
item.remove_stack()
end
end
end