Jump to content

Zonni

Premium
  • Posts

    165
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by Zonni

  1.  

     

    You didn't have to give the actual link to this kick hack.. now i have to make lib for 34k coz kids are playing around^

     

    Having the information public is the fastest way to get people to take action against it and the fix is in the thread. If you're able to create libs then it should be no problem for you

     

    Also having the hack we could test if the c++ fix works :D

     

     

     

    give me the hack for test in my server? Thank you

     

    http://wklej.to/BZqOB

    password: metin2dev

     

    only for testing purposes only and i don't know this works because i didn't use it

    • Metin2 Dev 1
    • Love 1
  2. It's easy to bind application to hardware.

    #define _WIN32_WINNT 0x0400
    
    #include <windows.h>
    #include <stdio.h>
    
    int main()
    {
    	HW_PROFILE_INFO hwProfileInfo;
    
    	if(GetCurrentHwProfile(&hwProfileInfo) != NULL){
    		printf("Hardware GUID: %sn",	 hwProfileInfo.szHwProfileGuid);
    		printf("Hardware Profile: %sn", hwProfileInfo.szHwProfileName);
    	}else{
    		return 0;
    	}
    
    	getchar();
    }
    

    source:

    http://skilinium.com/blog/?p=323

    anyway, i have program which check your hardware id, connect to server on my ip, check version & licence and send information to client (everything via encrypted packet)

    This is good way to check license i think.

  3. Hello, i started coding my new dungegon. I have one big problem...

    1. enter to dungeon with d.new_jump_party()

    2. After i login to a dungegon Metin Stone spawning with d.spawn_mob() (properly) ("when enter")

    3. When I kill Metin Stone i receive info "you're killed metin stone" (just for debug) and this shows

    4. In the same "when kill" i have another d.spawn_mob but in this time i want to spawn for ex. Wild Dog. Wild Dog can't be spawned because quest doesn't recognize my dungeon (i modified in-game function to show me this info in syserr).

    i need to use d.spawn_mob() to show me actual number of monsters in d.count_monster()

    What can be wrong? Map base positions? (anyway, someone have good tutorial for finding non-used coordinates?)

  4. Change say2 to say :D I'm using say2 function to show text, sorry :P

    I need to show times at your quest.

    quest akapo_map begin
    	state start begin
    		when enter begin
    			if pc.get_map_index() == 103 then
    				if pc.getqf("enter_time") <= get_time() then
    					say_title("Information:")
    					say("One hour passed. [ENTER][ENTER] You will be teleported to village soon.")
    					wait()
    					pc.setqf("enter_time", 0)
    					warp_to_village()
    				end
    			end
    			clear_letter()
    		end
    		
    		when 20090.chat."Akapo Map (Lvl. 95)" begin
    			say_title(mob_name(20090)..":")
    			----"01234567890123456789012345678901234567890"
    			if pc.get_level() >= 95 then
    				say("Do you really want to warp to[ENTER]Akapo Map?")
    				say("")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					say_title(mob_name(20090)..":")
    					say("You will warp for a moment.[ENTER][ENTER]Please be carefull.")
    					wait()
    					set_state(warp_to_map)
    				end
    			else
    				say("You must have at least 95 level.")
    				say("Akapo Map isn't made for noobs.")
    			end
    		end
    	end
    	
    	state warp_to_map begin
    		when enter begin
    			pc.setqf("enter_time", get_time() + 60 * 60)
    			pc.warp(45600, 45600)
    			loop_timer('check_time', 1 * 30) -- one time per 30 seconds
    		end
    		
    		when check_time.timer begin
    			if pc.getqf("enter_time") <= get_time() then
    				set_state(start)
    			end
    		end
    		
    		when login begin
    			if pc.getqf("enter_time") <= get_time() then
    				set_state(start)
    			end
    			if pc.get_map_index() == 103 then
    				send_letter("Akapo Map")
    				local rest_time = pc.getqf("enter_time") - get_time()
    				q.set_clock("Rest time", rest_time)
    			end
    			loop_timer('check_time', 1 * 30)
    		end
    		
    		when button or info begin
    			say_title("Akapo Map")
    			say("You're allowed to enter to Akapo Map.")
    			if pc.get_map_index() == 103 then
    				local remain_minutes = math.ceil((pc.getqf("enter_time") - get_time()) / 60)
    				local remain_seconds = pc.getqf("enter_time") - (remain_minutes) * 60
    				say("")
    				say_reward("Remaining time: "..remain_minutes.."m "..remain_seconds.."s.")
    			else
    				say("Go to "..mob_name(20090) to enter there.")
    			end
    		end
    		
    		when 20090.chat."Return to Akapo" begin
    			say_title(mob_name(20090)..":")
    			say("I'll teleport you soon.[ENTER][ENTER]Please be carefull.")
    			pc.warp(45600, 45600)
    		end
    	end
    end
    
  5. Okay devs, I end the quest with correct times and no bugs.

    Thanks for help.  :wub:  :wub: 

     

    quest event1 begin
        state start begin
        when 20090.chat."Akapo Map (LVL.95)" begin
            if pc.getqf("24h") == 0 then
                pc.setqf("akapo2223",get_time()+3600)
                pc.warp(45600,45600)
    		elseif pc.getqf("24h") == 2 then
    			pc.warp(45600,45600)
    		elseif pc.getqf("access666")< get_time() then
    			pc.setqf("akapo2223",get_time()+3600)
                pc.warp(45600,45600)
    		elseif pc.getqf("access666")> get_time() then
    			akapotim3 = pc.getqf("access666")-get_time()
                say("You have to wait "..akapotim3.." seconds to enter.")
            elseif pc.get_level() < 95 then
            say_title("Heuk-Young")
            say("You need to be at level 95.")
    		say("Akapo Map not made for noobs.")
        end
    end
      
        when login with pc.get_map_index() == 103 begin
            if pc.getqf("akapo2223") < get_time() then
                warp_to_village()
            else
                akapotime = pc.getqf("akapo2223")-get_time()
                say("You have "..akapotime.." seconds. ")
                timer("exit",pc.getqf("akapo2223")-get_time())
                pc.setqf("24h", 2)
        end
    end
      
        when exit.timer begin
            warp_to_village()
            pc.setqf("24h", 22)
    		pc.setqf("access666",get_time()+86400)
            end
        end
    end
    

     

     

    Good ;) But you can still use my version

     

    quest akapo_map begin
    	state start begin
    		when enter begin
    			if pc.get_map_index() == 103 then
    				if pc.getqf("enter_time") <= get_time() then
    					say_title("Information:")
    					say("One hour passed. [ENTER][ENTER] You will be teleported to village soon.")
    					wait()
    					pc.setqf("enter_time", 0)
    					warp_to_village()
    				end
    			end
    		end
    		
    		when 20090.chat."Akapo Map (Lvl. 95)" begin
    			say_title(mob_name(20090)..":")
    			----"01234567890123456789012345678901234567890"
    			if pc.get_level() >= 95 then
    				say("Do you really want to warp to[ENTER]Akapo Map?")
    				say("")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					say_title(mob_name(20090)..":")
    					say("You will warp for a moment.[ENTER][ENTER]Please be carefull.")
    					wait()
    					set_state(warp_to_map)
    				end
    			else
    				say("You must have at least 95 level.")
    				say("Akapo Map isn't made for noobs.")
    			end
    		end
    	end
    	
    	state warp_to_map begin
    		when enter begin
    			pc.setqf("enter_time", get_time() + 60 * 60)
    			pc.warp(45600, 45600)
    			loop_timer('check_time', 1 * 30) -- one time per 30 seconds
    		end
    		
    		when check_time.timer begin
    			if pc.getqf("enter_time") <= get_time() then
    				set_state(start)
    			end
    		end
    		
    		when login begin
    			if pc.getqf("enter_time") <= get_time() then
    				set_state(start)
    			end
    			loop_timer('check_time', 1 * 30)
    		end
    		
    		when 20090.chat."Return to Akapo" begin
    			say_title(mob_name(20090)..":")
    			say2("I'll teleport you soon.[ENTER][ENTER]Please be carefull.")
    			pc.warp(45600, 45600)
    		end
    	end
    end
    
    • Love 2
  6. You can still use DXT3 (Compressed texture format ~ 1,048,704 bytes) theres no visible drawback and it will perform a bit fast while loading.

    Thanks for drawing our attention on that piece of armor tho :D

     

    I appreciate it.

     

    Kind regards

    MartPwnS

    Maybe you're right, but while I coding new interface i truly see difference between DXT3 and 8.8.8.8, maybe on large files it isn't required.

    You can add how to avoid the shiny ground texture. ^^

     

    DXT3 If I remember well. :)

    I never add a new ground textures for Metin2, for me is enough to use oblivion textures and original metin2 textures.

  7. Hello everyone!

    Many, many users didn't know how to save DDS file with Photoshop. I want to change that.

    Step one

    Download NVIDIA DDS plugin for Photoshop from here: https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop (You must choose between x86 and x64 version).

     

     

    2023250HtVe.png.cb2d063b62640c185cebe03f

     

    Step two

    After downloading ends you must install this application.

     

     

    202520SoXUf.png.5e98d94013fb44fab9bb3448

    202520etehe.png.affd69b5069aff625f672f9d

     

    Step three

    Run Photoshop and open your file. (i'll open ymir work/pc2/assassin/assassin_4-1.dds)

     

     

    202520lJgsh.png.76ef8212c84752ed29ea0633

     

    Step four

    Save your file!

     

     

    202520TOsdh.png.58e437ce59ab97f94be14730

     

    202520yq3Cb.png.306fc0813734334d2df1e9d4

     

    You can easily find information about saving format - on this forum every men talking about DXT3... Yep, that's right and textures will show without blank spaces... But this saving only in 8 bpp (byte per pixel)... And that sucks. I strongly recommend to use 8.8.8.8 ARGB 32 bpp. Why? Because if you create HD model with HD texture... You must save texture in highest resolution. If you creating texture for armor you also need to save MIP-Maps (i can be wrong with that), while coding interface based on DDS files this isn't required. Of course you can use all ARGB file outputs, it depends on what you actually need.

    Anyway, this should look like that.

     

     

    202520awwYg.png.1a4430eec1f27fe5ab88cef4

     

    BONUS! Reflection effect!

    In this forum i never noticed how to make reflection effect on texture. I figure out how to do that and I'll share this information. I'll show you how to repair reflection on assassin_4-1.dds (this texture is copied from female assassin and someone didn't care about reflection... since Metin2 was released -_-).

    1. Switch to "Channels" on right side of Photoshop.

     

     

    202520Gv2Hd.png.cdc3af280d7672bd7032aa1b

     

    2. Compare "Alpha 1" and "RGB". It didn't match right?

     

     

    202520vZwpb.png.cad2f244c4632ac40b3edb27

     

    202520Ujh2h.png.ff79f1e28ddc373f18193f3e

     

    3. Make Alpha 1 channel likely RGB channel (but leave only this thing you want to reflect! (honestly, i just copy Green channel to anoter file, remove things and copy that into right file channel)).

     

     

    202520zUztd.png.9f6505ded3e3d2e718d357e5

     

    Before (anyone can see it in client ^^):

     

    202325fnXeh.jpg.86b1040f5f7f92f76cb742b2

     

    After:

     

    2023255q6be.jpg.08e777ea443a5ccce68f3d1d

     

    Thanks for reading my not very good English ^^ Peace!

    • Metin2 Dev 8
    • Not Good 1
    • Good 5
    • Love 10
  8. The other function that I posted it can only lvl up,there isn't any way to reduce the level.

    Aww... I really have to compile the source? :/ It is not difficult, but there are too many problems for me...

     

    1- I dont know C++ (i can only edit the things from the tutorials that i find in the internet)

    2- I compiled my own game but when i use it i cant log in my account i dont know why... ://

     

    Here's the syserr from the channel when i log in with my game:

    SYSERR: Nov  2 23:30:42 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
    SYSERR: Nov  2 23:30:47 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
    SYSERR: Nov  2 23:30:47 :: GetValidLocation: cannot find sectree_map by map index -268431706
    SYSERR: Nov  2 23:30:47 :: PlayerLoad: InputDB::PlayerLoad : cannot find valid location -1677262848 x 30144 (name: )
    

    I compiled client from novaline & server from mainline and everything works (without many modifications, only error fixes). If you use WoM files you should use release branch.

  9. You can use quest flag by using pc.getqf("flag") for get value and pc.setqf("flag", value) to set value. It's basics. I know you would to use new table in mysql but in most cases it doesn't nessesary. Try to recode that.

    Honestly i do smillar system before. check my old quest for that. It's nasty coded but work ^^

    ------------------------------------
    --- Reborn System By Zonni @2014 ---
    ------------------------------------
    
    define max_reborn_level 8
    
    quest reborn_system begin
    	state start begin
    		function give_bonus(id)
    			if id == 1 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 2 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 3 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 4 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 5 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 6 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 7 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			elseif id == 8 then
    				affect.add_collect(apply.MAX_HP, 2000, 60*60*24*365*60)
    			end
    		end
    		
    		when login or levelup with pc.get_level() >= 105 and is_test_server() and game.get_event_flag("reborn_system_active") = 1 begin
    			local reborn_level = pc.get_reborn_level()
    			--syschat("Test - reborn level: "..reborn_level..".")
    			if reborn_level < max_reborn_level then
    				if reborn_level == 0 then
    					send_letter("~Reborn character")
    				else
    					send_letter("~Reborn character - Level "..reborn_level)
    				end
    			end
    		end
    		
    		when button or info begin
    			say_title("Reborn system:")
    			----"123456789012345678901234567890123456789012345678901234567890"|
    			say("If you reborn your character you will")
    			say("recive extra bonuses:")
    			say("+2000 HP")
    			say("Your level willl be decreased to one.")
    			say("")
    			wait()
    			local reborn_level = pc.get_reborn_level()
    			if reborn_level == 0 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(1)
    					reborn_system.give_bonus(1)
    					say_title("Reborn System:")
    					say("Your character have now 1 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 1 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(2)
    					reborn_system.give_bonus(2)
    					say_title("Reborn System:")
    					say("Your character have now 2 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 2 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(3)
    					reborn_system.give_bonus(3)
    					say_title("Reborn System:")
    					say("Your character have now 3 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 3 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(4)
    					reborn_system.give_bonus(4)
    					say_title("Reborn System:")
    					say("Your character have now 4 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 4 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(5)
    					reborn_system.give_bonus(5)
    					say_title("Reborn System:")
    					say("Your character have now 5 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 5 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(6)
    					reborn_system.give_bonus(6)
    					say_title("Reborn System:")
    					say("Your character have now 6 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 6 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(7)
    					reborn_system.give_bonus(7)
    					say_title("Reborn System:")
    					say("Your character have now 7 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			elseif reborn_level == 7 then
    				say("Do you really want to reset your level to one")
    				say("and recive this special bonuses?")
    				local s = select("Yes", "No")
    				if s == 2 then
    					return
    				elseif s == 1 then
    					pc.set_level(1)
    					pc.give_exp2(-pc.get_exp())
    					pc.set_reborn_level(8)
    					reborn_system.give_bonus(8)
    					say_title("Reborn System:")
    					say("Your character have now 8 reborn level. Take off your equipement")
    					say("and put into storage. After relog your eq will automaticly")
    					say("take off from you.")
    					say("You recive super bonuses!")
    					say("")
    					clear_letter()
    				end
    			end
    		end
    	end
    end
    NeWfd.jpg

  10. After All i must correct this modification because exchange didn't work well (3&4 page didn't work, like doesn't exist)

     

    You cant use it like this:

    for (i = 0; i < INVENTORY_MAX_NUM / 4; ++i)
        {
            if (!(item = victim->GetInventoryItem(i)))
                continue;
    
            s_grid1.Put(i, 1, item->GetSize());
        }
        for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
        {
            if (!(item = victim->GetInventoryItem(i)))
                continue;
    
            s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
        }
    
        for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
        {
            if (!(item = victim->GetInventoryItem(i)))
                continue;
    
            s_grid3.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
        }
        for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
        {
            if (!(item = victim->GetInventoryItem(i)))
                continue;
    
            s_grid4.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
        }
    

    And little explanaton.

    If someone read this topic before i said you must set right grid size (5x9). anyway look at this - if we have 4 inventory cards we set (INVENTORY_MAX_NUM(180) /5 /4 = 9) so we have 45 slots.

    static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 4); // inven page 1

    But if you want to trade works well with entire inventory you must change something more.

    look at code i posted up.

    for example: cgrid4 uses slots from 45-180 but it's only 45 slot grid so after value pass 45 everything is set to null, and item cant locate at this grid. we must set it to right inventory value and set right slots to this card. good value is between 135 - 180. How we can do that - we must modify function.

    for (i = (INVENTORY_MAX_NUM / 4) *3; i < (INVENTORY_MAX_NUM /4 ) * 4; ++i)
        {
            if (!(item = victim->GetInventoryItem(i)))
                continue;
            s_grid4.Put(i - (INVENTORY_MAX_NUM / 4) * 3, 1, item->GetSize());
        }
    

    Now function checks slots from 135 ((INVENTORY_MAX_NUM / 4) * 3 = 180 / 4 * 3 = 135) to 180 (INVENTORY_MAX_NUM) and set item to right pos because we set correctly i (for example if we have full first, second and third inventory and someone trade with us red potion, item bind to first slot in fourth inventory (135) (why? i - INVENTORY_MAX_NUM / 4 =  (INVENTORY_MAX_NUM / 4) *3 - (INVENTORY_MAX_NUM/4) *3 = 0 and this is first place in fourth inventory)

     

     

    finally, that's valid code if you use 5 inventory window.

    int i;
    
    for (i = 0; i < INVENTORY_MAX_NUM / 5; ++i)
    {
      if (!(item = victim->GetInventoryItem(i)))
       continue;
    
      s_grid1.Put(i, 1, item->GetSize());
    }
    for (i = INVENTORY_MAX_NUM / 5; i < (INVENTORY_MAX_NUM / 5) * 2; ++i)
    {
      if (!(item = victim->GetInventoryItem(i)))
       continue;
    
      s_grid2.Put(i - INVENTORY_MAX_NUM / 5, 1, item->GetSize());
    }
    for (i = (INVENTORY_MAX_NUM / 5) * 2; i < (INVENTORY_MAX_NUM / 5) * 3; ++i)
    {
      if (!(item = victim->GetInventoryItem(i)))
       continue;
    
      s_grid3.Put(i - (INVENTORY_MAX_NUM / 5) * 2, 1, item->GetSize());
    }
    for (i = (INVENTORY_MAX_NUM / 5) * 3; i < (INVENTORY_MAX_NUM / 5) * 4; ++i)
    {
      if (!(item = victim->GetInventoryItem(i)))
       continue;
    
      s_grid4.Put(i -(INVENTORY_MAX_NUM / 5) * 3, 1, item->GetSize());
    }
    for (i = (INVENTORY_MAX_NUM / 5) * 4; i < (INVENTORY_MAX_NUM / 5) * 5; ++i)
    {
      if (!(item = victim->GetInventoryItem(i)))
       continue;
    
      s_grid5.Put(i - (INVENTORY_MAX_NUM / 5) * 4, 1, item->GetSize());
    }
    

    i'm really sorry if you don't understand me but i tried to explain it as easy as i can :D

    if you don't understand my explanation look into code and analize it.

     

     

    moreover aveline forgot about something.

    find

    int iPos = s_grid1.FindBlank(1, item->GetSize());
       if (iPos >= 0)
       {
        s_grid1.Put(iPos, 1, item->GetSize());
       }
       else
       {
        iPos = s_grid2.FindBlank(1, item->GetSize());
        if (iPos >= 0)
        {
         s_grid2.Put(iPos, 1, item->GetSize());
        }
        else
        {
          return false;
        }
    

    and replace to:

    int iPos = s_grid1.FindBlank(1, item->GetSize());
       if (iPos >= 0)
       {
        s_grid1.Put(iPos, 1, item->GetSize());
       }
       else
       {
        iPos = s_grid2.FindBlank(1, item->GetSize());
        if (iPos >= 0)
        {
         s_grid2.Put(iPos, 1, item->GetSize());
        }
        else
        {
         iPos = s_grid3.FindBlank(1, item->GetSize());
         if (iPos >= 0)
         {
          s_grid3.Put(iPos, 1, item->GetSize());
         }
         else
         {
          iPos = s_grid4.FindBlank(1, item->GetSize());
          if (iPos >= 0)
          {
           s_grid4.Put(iPos, 1, item->GetSize());
          }
          else
          {
           iPos = s_grid5.FindBlank(1, item->GetSize());
           if (iPos >= 0)
           {
            s_grid5.Put(iPos, 1, item->GetSize());
           }
           else
           {
            return false;
           }
          }
         }
        }
       }
    

    adapt it for yourself if you're using 4 inventory window.

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