Mod phó bản kiếm đãng yến vân

đó nếu share full hết thì đâu có nhưng bài như này đâu
tiện cho hỏi cách phục sinh pet luôn kakkaa nha các bạn

Lần thứ 1001 hỏi về cách phục sinh pet :ROFLMAO:. Thôi sẵn hôm nay rãnh làm luôn cho bạn. Mình đã cố làm cho gọn.. nhưng đã gọn hết mức rồi...

Mã:
function phucsinhpetnoi()
        local kiemtra = mod(floor(GetTask(2539)/10),10)
        if kiemtra >= 1 then
            Talk(1,"", "BDH da phuc sinh roi!!!!")
            return 0
        end
        ------------------------------
        local nId = 30149
        if GetSkillLevel(nId) == 0 then
            LearnSkill(nId)
            for i = 1,8 do
                LevelUpSkill(nId)
            end
        end
        SetTask(1535, 12000*100)
        SetTask(2560, GetTask(2560) + (12000 * 100))
        ------------------------------
        SetTask(2538, 1601600000)
        SetTask(2539, 330303013)
        ------------------------------
        local nIsPS = floor(GetTask(2539)/10)
        nIsPS = (nIsPS +1) *10 + mod(GetTask(2539),10)
        SetTask(2539, nIsPS)
        -------------
        local nCount_PET_PS = floor(GetTask(2538)/10)
        nCount_PET_PS = (nCount_PET_PS +1) *10 + mod(GetTask(2538),10)
        SetTask(2538, nCount_PET_PS)
        -------------
        local nNewValue =  SetBytePos(GetTask(2538),1,4)
        SetTask(2538, nNewValue )
        -------------
        CastState("state_m_attack_percent_add",6,-1, 1,2908130);
        CastState("state_life_max_point_add",8000,-1, 1,2908131);
        CastState("state_life_max_percent_add",6,-1, 1,2908132);
        CastState("state_add_allability",12,-1, 1,2908133);
        -------------
        AddPet(26);
        Msg2Player("Phuc sinh BDH thanh cong!!!!")       
end

function phucsinhpetngoai()
        local kiemtra = mod(floor(GetTask(2539)/10),10)
        if kiemtra >= 1 then
            Talk(1,"", "BDH da phuc sinh roi!!!!")
            return 0
        end
        ------------------------------
        local nId = 30149
        if GetSkillLevel(nId) == 0 then
            LearnSkill(nId)
            for i = 1,8 do
                LevelUpSkill(nId)
            end
        end
        SetTask(1535, 12000*100)
        SetTask(2560, GetTask(2560) + (12000 * 100))
        ------------------------------
        SetTask(2538, 1601600000)
        SetTask(2539, 330303013)
        ------------------------------
        local nIsPS = floor(GetTask(2539)/10)
        nIsPS = (nIsPS +1) *10 + mod(GetTask(2539),10)
        SetTask(2539, nIsPS)
        -------------
        local nCount_PET_PS = floor(GetTask(2538)/10)
        nCount_PET_PS = (nCount_PET_PS +1) *10 + mod(GetTask(2538),10)
        SetTask(2538, nCount_PET_PS)
        -------------
        local nNewValue =  SetBytePos(GetTask(2538),2,4)
        SetTask(2538, nNewValue )
        -------------
        CastState("state_p_attack_percent_add",12,-1, 1,2908130);
        CastState("state_life_max_point_add",10000,-1, 1,2908131);
        CastState("state_life_max_percent_add",6,-1, 1,2908132);
        CastState("state_i_defence_point_add",60,-1, 1,2908133);
        CastState("state_o_defence_point_add",60,-1, 1,2908134);
        -------------
        AddPet(26);
        Msg2Player("Phuc sinh BDH thanh cong!!!!")       
end
 
Lần thứ 1001 hỏi về cách phục sinh pet :ROFLMAO:. Thôi sẵn hôm nay rãnh làm luôn cho bạn. Mình đã cố làm cho gọn.. nhưng đã gọn hết mức rồi...

Mã:
function phucsinhpetnoi()
        local kiemtra = mod(floor(GetTask(2539)/10),10)
        if kiemtra >= 1 then
            Talk(1,"", "BDH da phuc sinh roi!!!!")
            return 0
        end
        ------------------------------
        local nId = 30149
        if GetSkillLevel(nId) == 0 then
            LearnSkill(nId)
            for i = 1,8 do
                LevelUpSkill(nId)
            end
        end
        SetTask(1535, 12000*100)
        SetTask(2560, GetTask(2560) + (12000 * 100))
        ------------------------------
        SetTask(2538, 1601600000)
        SetTask(2539, 330303013)
        ------------------------------
        local nIsPS = floor(GetTask(2539)/10)
        nIsPS = (nIsPS +1) *10 + mod(GetTask(2539),10)
        SetTask(2539, nIsPS)
        -------------
        local nCount_PET_PS = floor(GetTask(2538)/10)
        nCount_PET_PS = (nCount_PET_PS +1) *10 + mod(GetTask(2538),10)
        SetTask(2538, nCount_PET_PS)
        -------------
        local nNewValue =  SetBytePos(GetTask(2538),1,4)
        SetTask(2538, nNewValue )
        -------------
        CastState("state_m_attack_percent_add",6,-1, 1,2908130);
        CastState("state_life_max_point_add",8000,-1, 1,2908131);
        CastState("state_life_max_percent_add",6,-1, 1,2908132);
        CastState("state_add_allability",12,-1, 1,2908133);
        -------------
        AddPet(26);
        Msg2Player("Phuc sinh BDH thanh cong!!!!")      
end

function phucsinhpetngoai()
        local kiemtra = mod(floor(GetTask(2539)/10),10)
        if kiemtra >= 1 then
            Talk(1,"", "BDH da phuc sinh roi!!!!")
            return 0
        end
        ------------------------------
        local nId = 30149
        if GetSkillLevel(nId) == 0 then
            LearnSkill(nId)
            for i = 1,8 do
                LevelUpSkill(nId)
            end
        end
        SetTask(1535, 12000*100)
        SetTask(2560, GetTask(2560) + (12000 * 100))
        ------------------------------
        SetTask(2538, 1601600000)
        SetTask(2539, 330303013)
        ------------------------------
        local nIsPS = floor(GetTask(2539)/10)
        nIsPS = (nIsPS +1) *10 + mod(GetTask(2539),10)
        SetTask(2539, nIsPS)
        -------------
        local nCount_PET_PS = floor(GetTask(2538)/10)
        nCount_PET_PS = (nCount_PET_PS +1) *10 + mod(GetTask(2538),10)
        SetTask(2538, nCount_PET_PS)
        -------------
        local nNewValue =  SetBytePos(GetTask(2538),2,4)
        SetTask(2538, nNewValue )
        -------------
        CastState("state_p_attack_percent_add",12,-1, 1,2908130);
        CastState("state_life_max_point_add",10000,-1, 1,2908131);
        CastState("state_life_max_percent_add",6,-1, 1,2908132);
        CastState("state_i_defence_point_add",60,-1, 1,2908133);
        CastState("state_o_defence_point_add",60,-1, 1,2908134);
        -------------
        AddPet(26);
        Msg2Player("Phuc sinh BDH thanh cong!!!!")      
end
Bác hướng dẫn mở NPC đua top luôn đội ơn bác rất nhiều ạ hihi
 
Tiết cái e tìm rồi k ra chứ ! toàn sữa scripts npc top nhưng không ai hướng dẫn để nó hiện ra hết

- Trước tiên bạn mở lại NPC. Tìm đến gs0/script/global/autoexec.lua. Ngay chỗ function AddTuLinhNpc()

Lúc đầu

Mã:
function AddTuLinhNpc()
    local nNation =GetGlbValue(GLB_TSK_SERVER_ID)
    local szName = ""
    local nDate = tonumber(date("%Y%m%d"))
    local nGroup = 2
    for i = 1, getn(tb_server_group) do
        for j = 1, getn(tb_server_group[i]) do
            if nNation == tb_server_group[i][j] then
                nGroup = i
                break
            end
        end
    end
    for i = 1, getn(TB_NATION_SERVERLIST) do
        if nNation == TB_NATION_SERVERLIST[i][1] then
            szName = TB_NATION_SERVERLIST[i][2]
            break
        end
    end
    
    npcIndex = CreateNpc(tb_npc_type[nGroup], szName, 100, 1416, 2965)
    AddUnitStates(npcIndex, 6, nGroup)
    SetNpcScript(npcIndex, "\\script\\online\\viet_event\\tulinhthu_npc\\head.lua")
    -- Add NPC dua top
    if tbNPC_TopServer[GetGlbValue(GLB_TSK_SERVER_ID)] ~= nil then
        if nDate <= tbNPC_TopServer[GetGlbValue(GLB_TSK_SERVER_ID)] then
            npcIndex = CreateNpc(tb_npc_type[nGroup], szName, 200,1405,2840)
            SetNpcScript(npcIndex, "\\script\\online\\viet_event\\top_server\\npc_top.lua")
        end
    end
end

Sau đó bạn bỏ hết các điều kiện không cần thiết. chỉ chừa lại chỗ tạo NPC thôi. Đồng thời thay szName = tb_npc_type[nGroup]. Khi đó bạn được

Mã:
function AddTuLinhNpc()

    local nGroup = 2

    npcIndex = CreateNpc(tb_npc_type[nGroup], tb_npc_type[nGroup], 100, 1416, 2965)
    AddUnitStates(npcIndex, 6, nGroup)
    SetNpcScript(npcIndex, "\\script\\online\\viet_event\\tulinhthu_npc\\head.lua")

    npcIndex = CreateNpc(tb_npc_type[nGroup], tb_npc_type[nGroup], 200,1405,2840)
    SetNpcScript(npcIndex, "\\script\\online\\viet_event\\top_server\\npc_top.lua")
end

You must be registered for see images


Lúc này bạn vào game sẽ thấy NPC ở Tuyền châu (hoạt động) và NPC ở Biện Kinh (Chưa hoạt động)

You must be registered for see images


You must be registered for see images


- Tiếp theo bạn thiết lập ngày cho sự kiện đua top này. Mình chỉnh 2 tháng : từ ngày 01/01 đến 01/03/2024 hết hạn. Lần lượt bạn vào

gs0/script/online/viet_event/top_server/head_top.lua

Mã:
TOP_START_DATE = 20240101
TOP_END_DATE  = 20240301

You must be registered for see images


gs0/script/online/viet_event/top_server/npc_top.lua sửa ngày đồng thời loại bỏ điều kiện không cần thiết

Mã:
szStartDate = "01-01-2024"
szEndDate = "01-03-2024"

Mã:
function main()
....
---    if GetGlbValue(GLB_TSK_SERVER_ID) ~= TOP_SERVER_ID or GetByte(GetTask(TSK_SERVER_ID), TSK_SERVER_ID_CUR) ~= TOP_SERVER_ID then
---        Talk(1,"",strNpcName.."Ng¬i kh«ng ph¶i thÇn d©n bæn quèc nªn kh«ng thÓ nhËn thëng!")
---        return
---    end
....
end

You must be registered for see images


Lưu lại và khởi động server game ....

You must be registered for see images


Phần còn lại bạn tự tìm hiểu nhe.
 
Lần thứ 1001 hỏi về cách phục sinh pet :ROFLMAO:. Thôi sẵn hôm nay rãnh làm luôn cho bạn. Mình đã cố làm cho gọn.. nhưng đã gọn hết mức rồi...

Mã:
function phucsinhpetnoi()
        local kiemtra = mod(floor(GetTask(2539)/10),10)
        if kiemtra >= 1 then
            Talk(1,"", "BDH da phuc sinh roi!!!!")
            return 0
        end
        ------------------------------
        local nId = 30149
        if GetSkillLevel(nId) == 0 then
            LearnSkill(nId)
            for i = 1,8 do
                LevelUpSkill(nId)
            end
        end
        SetTask(1535, 12000*100)
        SetTask(2560, GetTask(2560) + (12000 * 100))
        ------------------------------
        SetTask(2538, 1601600000)
        SetTask(2539, 330303013)
        ------------------------------
        local nIsPS = floor(GetTask(2539)/10)
        nIsPS = (nIsPS +1) *10 + mod(GetTask(2539),10)
        SetTask(2539, nIsPS)
        -------------
        local nCount_PET_PS = floor(GetTask(2538)/10)
        nCount_PET_PS = (nCount_PET_PS +1) *10 + mod(GetTask(2538),10)
        SetTask(2538, nCount_PET_PS)
        -------------
        local nNewValue =  SetBytePos(GetTask(2538),1,4)
        SetTask(2538, nNewValue )
        -------------
        CastState("state_m_attack_percent_add",6,-1, 1,2908130);
        CastState("state_life_max_point_add",8000,-1, 1,2908131);
        CastState("state_life_max_percent_add",6,-1, 1,2908132);
        CastState("state_add_allability",12,-1, 1,2908133);
        -------------
        AddPet(26);
        Msg2Player("Phuc sinh BDH thanh cong!!!!")      
end

function phucsinhpetngoai()
        local kiemtra = mod(floor(GetTask(2539)/10),10)
        if kiemtra >= 1 then
            Talk(1,"", "BDH da phuc sinh roi!!!!")
            return 0
        end
        ------------------------------
        local nId = 30149
        if GetSkillLevel(nId) == 0 then
            LearnSkill(nId)
            for i = 1,8 do
                LevelUpSkill(nId)
            end
        end
        SetTask(1535, 12000*100)
        SetTask(2560, GetTask(2560) + (12000 * 100))
        ------------------------------
        SetTask(2538, 1601600000)
        SetTask(2539, 330303013)
        ------------------------------
        local nIsPS = floor(GetTask(2539)/10)
        nIsPS = (nIsPS +1) *10 + mod(GetTask(2539),10)
        SetTask(2539, nIsPS)
        -------------
        local nCount_PET_PS = floor(GetTask(2538)/10)
        nCount_PET_PS = (nCount_PET_PS +1) *10 + mod(GetTask(2538),10)
        SetTask(2538, nCount_PET_PS)
        -------------
        local nNewValue =  SetBytePos(GetTask(2538),2,4)
        SetTask(2538, nNewValue )
        -------------
        CastState("state_p_attack_percent_add",12,-1, 1,2908130);
        CastState("state_life_max_point_add",10000,-1, 1,2908131);
        CastState("state_life_max_percent_add",6,-1, 1,2908132);
        CastState("state_i_defence_point_add",60,-1, 1,2908133);
        CastState("state_o_defence_point_add",60,-1, 1,2908134);
        -------------
        AddPet(26);
        Msg2Player("Phuc sinh BDH thanh cong!!!!")      
end
mấy cái tham số trong hàm CastState này là gì đó bác ơi, giải thích giúp e vs ạ
 
bạn đổi đuổi file r copy vào script/isolate/functions/armory/item
để ý mấy chỗ sau để chỉnh lại nếu cần:
- g_tItem_NB
define Id của khắc bản trong file settings/item/other.txt
- tMagicInfo
define id attribute, attribute level (lấy từ trong file item_attribute)
1705557407125.png

- g_tArmory
113 - 117 là define loại văn sức ( mũ, áo ,quần, ngọc)
1 - 5 là cấp của văn sức
sau đó sửa đường dẫn script của khắc bản trong file settings/item/other.txt, trỏ vào file armory_head.lua (có thể copy từ khắc bản vs 2)
 

Đính kèm

  • armory_head.txt
    15.4 KB · Xem: 19
group các trang bị cần opt ẩn bằng cột số trang bị (hình 1)- file armory.txt
thêm opt ẩn vào file suit_attribute.txt (hình 2)
 

Đính kèm

  • Untitled1.png
    Untitled1.png
    36.7 KB · Xem: 35
  • Untitled2.png
    Untitled2.png
    23.4 KB · Xem: 36
Bên trên