Jump to content

PACI

Developer
  • Posts

    402
  • Joined

  • Days Won

    18
  • Feedback

    0%

Posts posted by PACI

  1. huh? Did i miss a rule in my own board? :D no there is no restriction on the source. You can post parts of it if you want :D

    I thought it wasn't allowed to post copyrighted content too, that's why I said that.
  2. but don't cann connect the game 34083 with this binary ;(

    exist to dif checkclientversion with which you agree with keys it would be like pong

    by default is : 12345 client y serveside

    I'm not sure that will work with this binary, test

    This difference file has been created by IDA Pro
     
    game_r34083_32_internal_ip
    000F4904: 8E 84
    game 34083

    This binary is not for r34083.

    And you are wrong once again Jfirewall, default client version is 1215955205.

    • Love 1
  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hello.

     

    I made this quest some time ago, I was still using rev 34083 and iMer posted a very useful lib. So, thanks to the quest functions which this lib has included, it allowed me to do something like belt system, but without belt inventory.

    Also, nowadays, we have that crap systems full, and that's why I post this here.

     

    Now first of all, iMer's stuff:

    And now the quest:

     

    quest belt_system begin
        state start begin
    
            function is_belt()
                return item.vnum >= 18000 and item.vnum <= 18089
            end
    
            function equip_belt()
                item2.equip(11)
                pc.setqf('belt', item.vnum)
            end
    
            when 18000.use or 18001.use or 18002.use or 18003.use or 18004.use or 18005.use or 18006.use or 18007.use or
            18008.use or 18009.use or 18010.use or 18011.use or 18012.use or 18013.use or 18014.use or 18015.use or 18016.use or
            18017.use or 18018.use or 18019.use or 18020.use or 18021.use or 18022.use or 18023.use or 18024.use or 18025.use or
            18026.use or 18027.use or 18028.use or 18029.use or 18030.use or 18031.use or 18032.use or 18033.use or 18034.use or
            18035.use or 18036.use or 18037.use or 18038.use or 18039.use or 18040.use or 18041.use or 18042.use or 18043.use or
            18044.use or 18045.use or 18046.use or 18047.use or 18048.use or 18049.use or 18050.use or 18051.use or 18052.use or
            18053.use or 18054.use or 18055.use or 18056.use or 18057.use or 18058.use or 18059.use or 18060.use or 18061.use or
            18062.use or 18063.use or 18064.use or 18065.use or 18066.use or 18067.use or 18068.use or 18069.use or 18070.use or
            18071.use or 18072.use or 18073.use or 18074.use or 18075.use or 18076.use or 18077.use or 18078.use or 18079.use or
            18080.use or 18081.use or 18082.use or 18083.use or 18084.use or 18085.use or 18086.use or 18087.use or 18088.use or 18089.use begin
                local v = item.vnum
                local bonus = {{item2.get_attr(0)}, {item2.get_attr(1)}, {item2.get_attr(2)}, {item2.get_attr(3)}, {item2.get_attr(4)}, {item2.get_attr(5)}, {item2.get_attr(6)}}
                if belt_system.is_belt() and v ~= pc.getqf('belt') then
                    belt_system.equip_belt()
                elseif item.select_cell(101) then
                    item.remove()
                    pc2.give_or_drop_item_and_select(v)
                    for i = 1, table.getn(bonus) do
                        if tonumber(bonus[i][1]) > 0 then
                            item2.set_attr(i-1, bonus[i][1], bonus[i][2])
                        end
                    end
                else
                    belt_system.equip_belt()
                end
            end
    
            when 20090.take with belt_system.is_belt() begin
                local maintab = {
                    [0] = {
                        {18000, 1, 50},
                        {18010, 2, 20},
                        {18020, 44, 1},
                        {18030, 44, 1},
                        {18040, 78, 1},
                        {18050, 79, 1},
                        {18060, 80, 1},
                        {18070, 81, 1},
                        {18080, 63, 1}
                    },
                    [1] = {
                        {18000, 1, 50},
                        {18010, 2, 20},
                        {18020, 44, 1},
                        {18030, 44, 1},
                        {18040, 78, 1},
                        {18050, 79, 1},
                        {18060, 80, 1},
                        {18070, 81, 1},
                        {18080, 63, 1}
                    },
                    [2] = {
                        {18000, 1, 100},
                        {18010, 2, 40},
                        {18020, 44, 1},
                        {18030, 44, 1},
                        {18040, 78, 1},
                        {18050, 79, 1},
                        {18060, 80, 1},
                        {18070, 81, 1},
                        {18080, 63, 1}
                    }
                }
                if pc.count_item(18900) < 1 then
                    syschat("You dont have "..item_name(18900)..".")
                    return
                end
                for i = 0, 2 do
                    for k = 1, table.getn(maintab[i]) do
                        if item.vnum >= maintab[i][k][1] and item.vnum <= maintab[i][k][1]+9 and item2.get_attr(i) == 0 then
                            if number(1,3) == 1 then
                                item2.set_attr(i, maintab[i][k][2], maintab[i][k][3])
                                syschat('Your belt received a bonus.')
                            else
                                syschat('Wasnt possible to put a bonus in your belt.')
                            end
                        end
                    end
                    pc.remove_item(18900, 1)
                end
            end
        end
    end

    It also wasn't possible to add the stones to belt's, so I made also a NPC which gives your belt a bonus in exchange for that item.

    All we have to do in clientside, is adding a new line on our inventorywindow.py which is localed in locale.

    So we search this:

    {"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},

    And we write down the following line:

    {"index":EQUIPMENT_START_INDEX+11, "x":39, "y":106, "width":32, "height":32},

    We also need equipment_bg_without_ring.tga, or with_ring as you wish. And change the inventory image path to that file.

    That's all.

    Special thanks to iMer who had written the lib that made this possible, and without cmdchats and affects, because, since the item is equipped into a true slot, the bonuses are defined on item_proto, like a normal weapon, armor, etc.

    • Metin2 Dev 6
    • Eyes 1
    • Good 4
    • Love 20
  4. My antivirus has detected as a virus  :blink:

    74FC8.png

     

    If you will publish the source in the future, why did you pack the exe? :ph34r:

    FAQs

    Q: Why is the main executable file packed?

    A: I'm trying to prevent code leakages until I make it open-source. You can easily test it in a VM and monitor its behaviour...

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.