1/Xuất ra thông báo
ui_tool.note_insert("hello")
ui_chat.show_ui_text_id(70251)
2/Lấy id text từ file text.txt,define.txtui_chat.show_ui_text_id(70251)
 local tt = bo2.gv_text:find(text_id)
lấy giá trị từ ô input use functiom callback
 local define = bo2.gv_define:find(1096)
 local total = tonumber(tostring(define.value))  
function getValure()
  local on_msg_callback = function(ret)
    if ret.result == 1 then
      local ctrl = ret.window
      local input_ctrl = ctrl:search("name_input")
    end
  end
  <button on_click="ui_minimap.on_btdich" dock_solo="true" visible="true">
     <tip-cmn_tip text="Dịch"/>
  </button>
trong function có thể gọi đến file lua khác cùng tên hàm vd action.lua
function on_btdich()
  ui_action.on_btdich()
end
 <text_box  on_char="ui_action.on_char_searchname">
    <font name="art" size="16"/>
    <value limit="200"  multiline="true" focus_able="true" name="lb_im_searchname"/>
 </text_box>
function on_char_searchname(ctrl, ch)
     --lấy giá trị từ ô input lb_im_searchname
    local search_name = ctrl:search("lb_im_searchname").text
    if search_name == L("") then --nếu trống
        --lấy text từ zh_tw/text/gui/im.txt  với field cg_err_no_input
        local text =  sys.format(ui.get_text("im|cg_err_no_input"))
        ui_tool.note_insert(text)
      return
    end
    if ch == ui.VK_RETURN then
        local text = sys.format(L("you press enter"))
        ui_tool.note_insert(text)
    end
  end
 local obj = bo2.player.name
6/ tự tìm đường đến npc   với id  nằm trong file zh_tw/text/mb/mark_list.txt
ui_map.find_path_byid(3217) --kim đại bàng
7/ chức năng chat
        ui_chat.add_chat({
          channel = bo2.eChatChannel_Notice,
          text = ui.get_text("phase|service_intermit")
        })
type từ 1-12
vd : đăng ký Thích sát v:set(packet.key.battle_type, 12)
vd : đăng ký Huyết chiến v:set(packet.key.battle_type, 10)
local v = sys.variant()
  v:set(packet.key.cmn_type, 0)
  v:set(packet.key.battle_type, 10)
  bo2.send_variant(packet.eCTS_UI_Battle_Apply, v)
    local v = sys.variant()
          v:set(packet.key.cmn_type, 0)
          v:set(packet.key.cmn_md5, input_ctrl.text.v_code)
          bo2.send_variant(packet.eCTS_UI_AccBankPassSet, v)
  local v = sys.variant()
          v:set(packet.key.cmn_type, 2)
          v:set(packet.key.cmn_name, old_ctrl.text.v_code)
          v:set(packet.key.cmn_md5, input_ctrl.text.v_code)
          bo2.send_variant(packet.eCTS_UI_AccBankPassSet, v)
  local pos_x, pos_z = player:get_position()
12/Joint team
 local v = sys.variant()
  v:set(packet.key.cha_name, tennv)
  bo2.send_variant(packet.eCTS_Convene_JoinTeam, v)
ui_widget.ui_msg_box.show_common({
          text = "Ban muon dong cua so nay",
          modal = true,
          btn_confirm = true,
          btn_cancel = true,
          callback = function(msg)
            if msg.result == 1 then
              ui_tool.note_insert("Ban da click ok")
            else
              ui_tool.note_insert("not ok")
            end
          end
        })
  local cur_hp = var:get(packet.key.cha_cur_hp).v_int
  local max_hp = var:get(packet.key.cha_max_hp).v_int

