Jump to content

MrLibya

Premium
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    8
  • Feedback

    0%

Posts posted by MrLibya

  1. M2 Download Center

    This is the hidden content, please
    ( Internal )

    hallo all

     

    thos quests are only present in my files that i sell ( NewWorld) and someone stole it from one of my clients so i will public it here ( while the last update for thos two quests have too new feature )

    the system will send a leeter to any gm with high level so he can start / close any event & also rate

    note : it was writen too long time by me , so maybe u may not like some method

    note2: the other event i will upload it here < useing official 40k quests < some of them i make litile change for them

    note3: for adding more events , u can just add new line in the next two quests < easy to add

    event manger:

    Spoiler

     

    
    
    			quest event begin
    
    			    state start begin
    
    			        when letter with pc.get_gm_level()==5 begin
    
    			            send_letter(gameforge.event.letter_10)
    
    			        end
    
    			        when button or info begin
    
    			            say_title(gameforge.event.title_20)
    
    			            say(gameforge.event.say_30)
    
    			            local events_info = {
    
    			                --- event_name , flag
    
    			                {gameforge.event.event_90, "new_2006_drop"},
    
    			                {gameforge.event.event_100, "new_drop_moon"},
    
    			                {gameforge.event.event_110, "new_valentine_drop"},
    
    			                {gameforge.event.event_120, "new_football_drop"},
    
    			                {gameforge.event.event_130, "new_ramadan_drop"},
    
    			                {gameforge.event.event_140, "halloween_hair"},
    
    			                {gameforge.event.event_150, "easter_rabbit"},
    
    			                {gameforge.event.event_160, "new_xmas_event"},
    
    			                {gameforge.event.event_170, "dressup_saleh"},
    
    			                {gameforge.event.event_180, "sertbox_saleh"},
    
    			                -- حالة خاصه , لاتقم بالتعديل هنا
    
    			                {gameforge.event.say_70, nil}, -- rate
    
    			                {gameforge.locale.cancel, ""} -- close
    
    			            }
    
    			            local menu01 = {}
    
    			            for num1,str1 in ipairs(events_info) do
    
    			                table.insert(menu01, str1[1])
    
    			            end
    
    			            local seltab01 = select_table(menu01, gameforge.locale.cancel)
    
    			            if seltab01 == table.getn(menu01) then return end
    
    			            say_reward(gameforge.event.say_reward_40)
    
    			            if events_info[seltab01][2] == nil then
    
    			                say(gameforge.event.say_80)
    
    			                local min_rate = tonumber(input())
    
    			                if min_rate == nil then
    
    			                    say(gameforge.event.say_90)
    
    			                    return
    
    			                end
    
    			                game.set_event_flag("event_rate", min_rate)
    
    			            else
    
    			                local s = select(gameforge.event.select_50, gameforge.event.select_60, gameforge.locale.cancel)
    
    			                if s == 1 then
    
    			                    notice_all(string.format(gameforge.event.notice_70, events_info[seltab01][1]))
    
    			                    game.set_event_flag(events_info[seltab01][2], 1)
    
    			                elseif s == 2 then
    
    			                    notice_all(string.format(gameforge.event.notice_80, events_info[seltab01][1]))
    
    			                    game.set_event_flag(events_info[seltab01][2], 0)
    
    			                else
    
    			                    return
    
    			                end
    
    			            end
    
    			        end
    
    			    end
    
    			end  
    
    			
    
    
    		

    event drop :

    Spoiler
    
    
    			quest event_drop begin
    
    			    state start begin
    
    			        function get_events_table()
    
    			            if event_drop.events_info == nil then
    
    			                event_drop.events_info={
    
    			                    {gameforge.event.event_90, "new_2006_drop", 50037},
    
    			                    {gameforge.event.event_100, "new_drop_moon", 50011},
    
    			                    {" صندوق غامض ", "new_kids_day_drop", 50034},
    
    			                    {gameforge.event.event_120, "new_football_drop", 50096},
    
    			                    {gameforge.event.event_130, "new_ramadan_drop", 30315},
    
    			                    {gameforge.event.event_170, "dressup_saleh", 50130},
    
    			                    {gameforge.event.event_180, "sertbox_saleh", 50033},
    
    			                }
    
    			            end
    
    			            return event_drop.events_info
    
    			        end
    
    			        
    
    			        when login or enter begin
    
    			            for i,v in ipairs(event_drop.get_events_table()) do
    
    			                if game.get_event_flag(v[2]) == 1 then
    
    			                    syschat(gameforge.event.say_100, v[1])
    
    			                end
    
    			            end
    
    			        end
    
    			        
    
    			        when kill with not npc.is_pc() begin
    
    			            for i,v in ipairs(event_drop.get_events_table()) do
    
    			                if game.get_event_flag(v[2]) == 1 then
    
    			                    local level = pc.get_level()
    
    			                    local limit = npc.get_level0()
    
    			                    local rate = game.get_event_flag("event_rate")
    
    			                    if level < limit+5 then
    
    			                        if math.random(1, 100) <= rate then
    
    			                            game.drop_item_with_ownership(v[3])
    
    			                        end
    
    			                    end
    
    			                end
    
    			            end
    
    			        end
    
    			    end
    
    			end   
    
    
    
     

     

    • Metin2 Dev 38
    • Eyes 3
    • Facepalm 1
    • Dislove 1
    • Sad 1
    • Cry 1
    • Confused 2
    • Good 9
    • Love 3
    • Love 40
  2. that was a test , but the acticle one is :

    when 20017.chat.gameforge.arena_manager._10_npcChat begin

    gameforge.warehouse._10_npcChat = pc.get_lang()..gameforge.warehouse._10_npcChat

    i also try

    gameforge.warehouse._10_npcChat = ""..pc.get_lang()..gameforge.warehouse._10_npcChat

    error :

    attempt to concatenate field `_10_npcChat' (a nil value)

     

    maybe cuz u write it in questlib.lua

    try in translate.lua

  3. how i can  increase yang privetshop ( for now it's 999.999.999 , i want make it 900.000.000.000)

    in root i have change the int to long ( for shops)

    uicommon:
     

    Spoiler

     

    class MoneyInputDialog(ui.ScriptWindow):

    self.SetMaxLength(12)

    money = 900000000000

     

    in moneyinputdialog.py

    Spoiler

    "name" : "InputValue",

    input_limit" : 15,

    and

    "name" : "MoneyValue",

    "text" : "4000000000",

    but ingamge i can't write price more then 999.999.999

    did i miss something?

  4. now i add in SPlayerStatus

    Spoiler

                LONGLONG                m_alPointEx[POINT_MAX_NUM];
                void SetPointEx(UINT ePoint, LONGLONG lPoint);
                LONGLONG GetPointEx(UINT ePoint);

    and the new function
     

    Spoiler

     

    const LONGLONG POINT_MAGIC_NUMBER_EX = 0xe73ac1da;

    void CPythonPlayer::SPlayerStatus::SetPointEx(UINT ePoint, LONGLONG lPoint)

    LONGLONG CPythonPlayer::SPlayerStatus::GetPointEx(UINT ePoint)

    void CPythonPlayer::SetStatusEx(DWORD dwType, LONGLONG lValue)

    int CPythonPlayer::GetStatusEx(DWORD dwType)


     

    and new packet for packet_points_ex
     

    Spoiler

     

    bool CPythonNetworkStream::__RecvPlayerPointsEx()
    {
        TPacketGCPointsEx PointsPacketEx;

        if (!Recv(sizeof(TPacketGCPointsEx), &PointsPacketEx))
            return false;

        CPythonPlayer::Instance().SetStatusEx(POINT_GOLD, PointsPacketEx.points[POINT_GOLD]);

        PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshStatusEx", Py_BuildValue("()"));
        return true;
    }

     

     

    but still same bug,

    maybe the const LONGLONG POINT_MAGIC_NUMBER_EX = 0xe73ac1da; wrong ?

  5. 3 minutes ago, metin2team said:

    since that I've done it a long time ago, I'm not sure what's the problem you're facing.

    anyway, can you tell me what PointChangeEx.amount 's datatype is?

    what is the type that this (GetStatus) function is returning?

    long long , i had to make new packet for point gold and delete it from the old one
     

    this one from the binary

    Spoiler

     

    typedef struct packet_point_change_ex
    {
        int         header;

        DWORD        dwVID;
        BYTE        Type;

        LONGLONG        amount; // ¹ظ²ï °ھ
        LONGLONG        value;  // اِہç °ھ
    } TPacketGCPointChangeEx;

     

     

  6. i was try to make it unsigned long long in binary and long long in source,

    now i make the binary long long and use PyLong_FromLongLong and same bug

    also i test it with normal code

    elk function :

    Spoiler

    DWORDLONG gold = CPythonPlayer::Instance().GetStatus(POINT_GOLD);
       return Py_BuildValue("L", gold);

     

    the new function for the new packet

    Spoiler

    PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", Py_BuildValue("(i)", PointChangeEx.amount));

    and

    PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", Py_BuildValue("(L)", PointChangeEx.amount));

     

     

    and same problem

  7. hallo all

    i was trying to increase yang  so the server part is ok , i use ULL also i make new packet for that

    only 1 problem every time i try something i get big value like that : wHH8mIG.png

    i'm useing


     

    Spoiler

     

    return PyLong_FromUnsignedLongLong( CPythonPlayer::Instance().GetStatus(POINT_GOLD));

    PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", PyLong_FromUnsignedLongLong( PointChangeEx.amount));


     

     

     

    i also try Py_BuildValue("(K)" and same bug

     

×
×
  • 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.