Jump to content

Aveline™

Inactive Member
  • Posts

    190
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    0%

Posts posted by Aveline™

  1. Hi guys :D

     

    Someone wanna disable duel for some map.

     

    If you're ready then let's go ;)

     

     

    open uigameoption.py and add this module in your uigameoption.py

    import background

    after search this.

    	def __OnClickPvPModeFreeButton(self):
    		if self.__CheckPvPProtectedLevelPlayer():
    			return
    
    		self.__RefreshPVPButtonList()
    
    		if constInfo.PVPMODE_ENABLE:
    			net.SendChatPacket("/pkmode 2", chat.CHAT_TYPE_TALKING)
    		else:
    			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_NOT_SUPPORT)

    replace to 

    	def __OnClickPvPModeFreeButton(self):
    		if self.__CheckPvPProtectedLevelPlayer():
    			return
    			
    			
    		mapDict = (
    			"metin2_map_a1",
    			"metin2_map_b1",
    			"metin2_map_c1",
    		)
    		
    		if(background.GetCurrentMapName() in mapDict):
    			chat.AppendChat(chat.CHAT_TYPE_INFO, "You can not change pvp mode on this map.")
    			return
    
    		self.__RefreshPVPButtonList()
    
    		if constInfo.PVPMODE_ENABLE:
    			net.SendChatPacket("/pkmode 2", chat.CHAT_TYPE_TALKING)
    		else:
    			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_NOT_SUPPORT)

    If player wanna change PvP-Mode and player in this map, player can not change pvp-mode.

     

    thanks @metin2_team

    	def __SendChatPacket(self, text, type):
    #		if text[0] == '/':
    #			if ENABLE_CHAT_COMMAND or constInfo.CONSOLE_ENABLE:
    #				pass
    #			else:
    #				return
    
    		if net.IsChatInsultIn(text):
    			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)
    		else if "pkmode" in text:
    			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_PVPMODE_NOT_SUPPORT)
    			return
    		else:
    			net.SendChatPacket(text, type)

    thanks @Sanchez for r40k

     

     

     

    The thread and the idea is great, but NEVER do something like this on client-side. Here is the server-side solution:

    Add mapindex.cpp and mapindex.h to your project
     
    Copy this to mapindex.cpp:

    #include "fstream"
    #include "stdafx.h"
    
    std::vector<std::string> ExcludeIndex;
    
    void LoadIndexes()
    {
        std::string tempIndex;
        std::ifstream File("locale/mapindex.txt");
    
        if (!File.is_open())
        {
            sys_log(0, "WARNING: locale/mapindex.txt");
            return;
        }
    
        ExcludeIndex.clear();
    
        while (!File.eof())
        {
            File >> tempIndex;
            ExcludeIndex.push_back(tempIndex);
        }
    
        File.close();
    }

    Copy this to mapindex.h:

    extern std::vector<std::string> ExcludeIndex;
    extern void LoadIndexes();

    Add this to main.cpp:

    #include "mapindex.h"

    Add this under PanamaLoad(); still in main.cpp:

    LoadIndexes();

    Add this to char.cpp:

    #include "mapindex.h"

    And these events:

    std::string CHARACTER::LongToString(long data)
    {
        std::ostringstream convert;
        convert << data;
        return convert.str();
    }
    
    bool CHARACTER::AllowMapIndex()
    {
        for (int i = 0; i < ExcludeIndex.size(); i++)
        {
            if (!strcmp(LongToString(GetMapIndex()).c_str(), ExcludeIndex[i].c_str()))
            {
                return false;
            }
        }
    
        return true;
    }

    Open cmd_general.cpp and navigate to ACMD(do_pvp)
    Add this to the begin of the event:

        if (!ch->AllowMapIndex())
        {
            ch->ChatPacket(CHAT_TYPE_INFO, ("PVP has been blocked on this map!"));
            return;
        }

    Example mapindex.txt:

    1
    2
    3
    4
    5
    6
    7

     

     

    Kind Regards

    HaveBeen

    • Love 5
  2. function say_withlanguage(langName,txt)
    	if(type(txt) != "table") then
    		return 0
    	end
    	if(txt[langName] == nil) then
    		return 2
    	end
    	say(txt[langName])
    end
    
    --[[
    	
    	- How to use to this function in my quest? (If you're use to my multi-language quest, let's go.
    	
    	local lang = {"en","tr"}
    	
    	say_withlangauge(lang[pc.get_lang()],locale.blacksmith_dialog1)
    	
    	result is "If there another language for this text, show language text."
    	
    	another result is "If there any result for this text, show "2" "
    	
    	- How to use to this function in my quest? (If you're not use to my multi-langauge quest, let's go.
    	
    	local lang = {"en","tr"}
    	local self = pc.getf("questname",pc.name.."_lang")
    	
    	
    	-- locale.lua
    	
    	
    	locale.blacksmith_dialog1 = {
    		["en"] = "text1",
    		["tr"] = "text2",
    	}
    	
    	
    	say_withlanguage(lang[self],locale.blacksmith_dialog1)
    	
    	- I hope you're like it.
    	
    	Kind Regards
    	HaveBeen
    ]]--

    Little function.

    Thanks share us.

    • Love 1
  3. use to ctype module.

    from ctypes import *
    import sys,ctypes
    import dbg
    
    PAGE_RW_PRIV = 0x04
    PROCESS_ALL_ACCESS = 0x1F0FFF
    VIRTUAL_MEM = 0x3000
    
    kernel32 = windll.kernel32
    
    def dllInject(PID,dllPath):
    	if(PID == 0 or dllPath == ""):
    		dbg.LogBox("PID or dll path not entered.")
    		sys.exit(0)
    	
    	LEN_DLL = len(dllPath)
    	hProcess = kernel32.OpenProcess(PROCESS_ALL_ACCESS,False,PID)
    	
    	if(hProcess == None):
    		dbg.LogBox("Unable to get process handle.")
    		sys.exit(0)
    	
    	DLL_PATH_ADDR = kernel32.VirtualAllocEx(hProcess,0,LEN_DLL,VIRTUAL_MEM,PAGE_RW_PRIV)
    	
    	bool_Written = c_int(0)
    	
    	kernel32.WriteProcessMemory(hProcess,DLL_PATH_ADDR,dllPath,LEN_DLL,byref(bool_Written))
    	kernel32DllHandler_addr = kernel32.GetModuleHandleA("kernel32")
    	LoadLibraryA_func_addr = kernel32.GetProcAdress(kernel32DllHandler_addr,"LoadLibraryA")
    	
    	thread_id = c_ulong(0)
    	
    	if(not kernel32.CreateRemoteThread(hProcess,None,0,LoadLibraryA_func_addr,DLL_PATH_ADDR,0,byref(thread_id))):
    		dbg.LogBox("Injection failed.")
    		sys.exit(0)
    	
    

    Regards HaveBeen ;)

    • Love 1
  4. Please tell me how that is insulting? For real, the world would be better off without the religion nonsense. And the guy who made that pic is muslim himself and he isn't in the WoM team anymore anyway.

     

    I don't mean who made that pic. I mean why you're sharing on facebook fan-page? Paylasici make this system and share on wom2 topic(epvp). If you're wanna game without religion. You shouldn't be share like this picture on facebook fan-page.

     

    Your client is public on metin2dev.org. Hovewer, someone wanna py extractor for decompiled metin2.sg. Maybe your client same with metin2.sg or not. I don't care.

     

    Anyway..

     

    Regards.

  5. You can't decompile current SG client or current WoM client with that, so it's a bit useless, moreso when the full old WoM client which used this method is published here:

     

    http://metin2dev.org/board/topic/462-world-of-metin2-beta-client-34k/

     

    Care to explain that about muslims, I don't really get it? It's forbidden to speak about religion in our server. If this release is some kind of bizarre religious revenge for imaginary

    offenses I will delete it straight away.

     

     

    Can you explain this? 

     

    1385731_686800731371659_1887556918_n.jpg

     

    Why pet name is muslim? If you're say "I don't really get it? It's forbidden to speak about religion in our server", you don't do this.

     

     

     

    Give credits where credits are due ...

    I bet you're not using your own decompiler^^

     

    Btw seems you missed some updates on world of metin we no longer use pyc^^

     

     

     

    Yep i've seen your updates but i don't care :) Turk players playing your games and your kidding muslim name. First show respect to players.

     

    Finally, No system can't protect forever.

     

    Regards.

     

    What the heck is wrong with you ?

    Where are we kidding muslim name ? || <-- no proper english sentence btw

    Finally this system will prevent noobs from stealing our root content so its pretty sufficient for our needs^^

     

    Kind regards

    MartPwnS

     

    PS: This is no personal debate this topic has the intention of releasing your pyc decompiler, so please as you alrdy said, "it´s not personal", follow your guidelines and keep this stuff out of here.

     

     

    1385731_686800731371659_1887556918_n.jpg

     

    Then can you explain this?

     

    Regards.

  6. Give credits where credits are due ...

    I bet you're not using your own decompiler^^

     

    Btw seems you missed some updates on world of metin we no longer use pyc^^

     

     

     

    Yep i've seen your updates but i don't care :) Turk players playing your games and your kidding muslim name. First show respect to players.

     

    Finally, No system can't protect forever.

     

    Regards.

  7. quest welcome begin
    	state start begin
    		when login begin
    			if(pc.getqf("metin2") == 0) then
    				pc.setqf("metin2",1)
    				if(pc.job == 0) then
    					pc.give_item2(19,1)
    					pc.give_item2(11209,1)
    					pc.give_item2(12209,1)
    				elseif(pc.job == 1) then
    					pc.give_item2(1009,1)
    					pc.give_item2(11409,1)
    					pc.give_item2(12349,1)
    				elseif(pc.job == 2) then
    					pc.give_item2(19,1)
    					pc.give_item2(11609,1)
    					pc.give_item2(12489,1)
    				elseif(pc.job == 3) then
    					pc.give_item2(7009,1)
    					pc.give_item2(11809,1)
    					pc.give_item2(12620,1)
    				end
    				pc.change_money(50000)
    				pc.give_item2(13009,1)
    				pc.give_item2(14009,1)
    				pc.give_item2(15009,1)
    				pc.give_item2(16009,1)
    				pc.give_item2(17009,1)
    				pc.give_item2(50051,1)
    				pc.give_item2(50187,1)
    				pc.change_alignment(500)
    				horse.advance()
    				horse.ride()		
    				syschat("Bine aþi venit pe "..settings.server_name)
    				set_state(__COMPLETE__)
    			end
    		end
    	end
    	state __COMPLETE__ begin
    	end
    end
    
    

    Try like this. (I test it. It's work)

     

    Regards.

    • Love 1
  8. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hello guys i will want to share something with your. Actually this quest public but i'll rewrite this quest i think it was a little perfect.

     

    Quest : 

    --[[
    	
    	* fileName 	  : musicPlayerSystem.quest
    	* date	   	  : 15.03.2014
    	* author   	  : HaveBeen
    	* description : - 
    	
    ]]--
    quest musicPlayer begin
    	state start begin
    		function load()
    			local data = {}
    			data.MapNames = {
    				-- MapIndex	   MapName
    				[1] 		= "Shinsoo Kingdom",
    				[21]	    = "Chunjo Kingdom",
    				[41]	    = "Jinno Kingdom",
    			}
    			data.MapIndexs = {1,21,41}
    			data.Notice = "%s enjoy the music begins. Music name : %s"
    			data.Notice2 = "For all the kingdoms of music. Music name : %s"
    			data.Options = {"Add music for one map","Add music for all map","Close"}
    			return data
    		end
    		function is_admin()
    			local gmList = {"HaveBeen"}
    			if(table.getn(gmList) >= 1) then
    				if(gmList[1] == pc.name) then
    					return true
    				else
    					return false
    				end
    			else
    				for i = 1,table.getn(gmList),1 do
    					if(gmList[i] == pc.name) then
    						return true
    					else
    						return false
    					end
    				end
    			end
    		end
    		when letter with pc.is_gm() and musicPlayer.is_admin() begin
    			send_letter("Music Player")
    		end
    		when button or info begin
    			say_title("Music Player:")
    			say("")
    			---
    			say("What do you want?")
    			local data = musicPlayer.load()
    			local s = select_table(data.Options)
    			if(s >= table.getn(data.Options)) then
    				return
    			end
    			say_title(string.format("%s : ",data.Options[s]))
    			say("")
    			---			
    			if(s >= 1) then
    				say("Select a map.")
    				say("")
    				local q = {}
    				for i = 1,table.getn(data.MapIndexs),1 do
    					table.insert(q,data.MapNames[data.MapIndexs[i]])
    					table.insert(q,"Close")
    				end
    				local t = select_table(q)
    				if(t >= table.getn(q)) then
    					return
    				end
    				say_title(string.format("%s enjoy the music",q[t]))
    				say("")
    				---
    				say("Please write music name..")
    				say("")
    				local music = input()
    				if(music == "" or tostring(music) == nil) then
    					return
    				end
    				say_title(string.format("%s enjoy the music",q[t]))
    				say("")
    				---
    				say("Music is starting.. ")
    				say("Thanks! ")
    				add_bgm_info(data.MapIndexs[t],music,0.5)
    				notice_all(string.format(data.Notice,q[t],music))
    			elseif(s >= 2) then
    				say("Please write music name..")
    				say("")
    				local music = input()
    				if(music == "" or tostring(music) == nil) then
    					return
    				end
    				say_title(string.format("%s enjoy the music",q[t]))
    				say("")
    				---
    				say("Music is starting.. ")
    				say("Thanks! ")
    				i = 0
    				repeat
    					i = i + 1
    					add_bgm_info(data.MapIndexs[i],music,0.5)
    				until i == table.getn(data.MapIndexs)
    				notice_all(string.format(data.Notice2,music))
    			end
    		end
    	end
    end

    I hope you're like it.

     

    Regards.

    • Metin2 Dev 2
    • Good 1
    • Love 1
    • Love 5
  9.  

     

    SYSERR: Mar 14 10:18:06 :: locale_find: LOCALE_ERROR: "¼º°øÀûÀ¸·Î ¼Ó¼ºÀÌ Ãß°¡ µÇ¾ú½À´Ï´Ù";

     

    Convert this text to your language and add locale_string.txt

     

     

     

    SYSERR: Mar 14 10:22:39 :: ChildLoop: AsyncSQL: query failed: Unknown column 'vnum' in 'field list' (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 16, 15, 10000807, 'SET_ATTR', '', '', 1060) errno: 1054)
    SYSERR: Mar 14 10:22:37 :: ChildLoop: AsyncSQL: query failed: Unknown column 'account_id' in 'field list' (query: REPLACE INTO levellog (name, level, time, account_id, pid, playtime) VALUES('Test', 71, NOW(), 52378, 57919, 55) errno: 1054)

     

    Have you got log.sql,levellog.sql?

     

    Regards.

    • Good 1
    • Love 1
  10. can u show examples for the tanaka.txt metin.txt mob.txt ?

     

    and where are the informations about the data.notice?

     

    data.notice has 2 text.

     

    First is when event is opened, show 1 text. Another is when event is closed, show 2 text.

     

    This system like dungeon system. You should be look at regen files.

     

    Regards.

  11. M2 Download Center

    This is the hidden content, please
    ( Internal )

    I'll share a little quest with your :P

     

    Quest:

    ---------------------------------------------------------------
    --- Copyright (c) 2014-2015 by  HaveBeen
    ---------------------------------------------------------------
    quest events begin
    	state start begin
    		function event()
    			local data = {}
    			data.eventName = {"Event Tanaka","Rain Metin","Event Mob","Close"}
    			data.what_do = {
    				[1] = {
    					["mapIndexs"] = {1,21,41}, -- For Shinsoo,Chunjo,Jinno					
    					["regenMode"] = true,
    					["regenFile"] = "data/event/tanaka.txt",					
    				},
    				[2] = {
    					["mapIndexs"] = {1,21,41}, -- For shinsoo,Chunjo,Jinno
    					["regenMode"] = true,
    					["regenFile"] = "data/event/metin.txt",
    				},
    				[3] = {
    					["mapIndexs"] = {1,21,41}, -- For shinoso,Chunjo,Jinno
    					["regenMode"] = true,
    					["regenFile"] = "data/event/mob.txt",					
    				},
    			}
    			data.notices = {
    				[1] = {"EVENT_TANAKA","CLOSE_METIN"},
    				[2] = {"EVENT_RAIN_METIN","CLOSE_METIN"},
    				[3] = {"EVENT_MOB","CLOSE_METIN"},
    			}
    			data.eventFlags = {
    				[1] = "tanaka",
    				[2] = "rainmetin",
    				[3] = "eventmob",
    			}
    			return data
    		end
    		when letter with pc.is_gm() and pc.name == "HaveBeen™" begin
    			send_letter("Launch Event")
    		end
    		when button or info begin
    			say_title("Launch Event:")
    			say("")
    			---
    			say("Please select event.")
    			say("")
    			local data = events.event()
    			local s = select_table(data.eventName)
    			say_title("Launch Event:")
    			say("")
    			---
    			if(s >= table.getn(data.eventName)) then
    				return
    			end
    			say_title(string.format("%s:",data.eventName[s]))
    			say("")
    			---
    			if(game.get_event_flag("event_"..data.eventFlags[s]) > 0) then
    				say("Do you want to stop "..data.eventName[s].." ? ")
    				say("")
    				if(select(locale.yes,locale.no) >= 1) then
    					say("Event is closing, please wait..")
    					game.set_event_flag("event_"..data.eventFlags[s],0)
    					notice_multiline(data.notices[s][2])
    				end
    			else
    				say("Event opening, please wait..")
    				say("")
    				notice_multiline(data.notices[s][1])
    				game.set_event_flag("event_"..data.eventFlags[s],1)
    				for i = 1,table.getn(data.what_do[s]["mapIndexs"]), 1 do
    					regen_in_map(data.what_do[s]["mapIndexs"][i],data.what_do[s]["regenFile"])
    				end
    			end
    		end
    	end
    end

    I hope you're like it.

     

    Regards.

    • Metin2 Dev 38
    • kekw 1
    • Eyes 1
    • Dislove 1
    • Think 1
    • Lmao 1
    • Good 9
    • Love 1
    • Love 35
×
×
  • 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.