Jump to content

Lupetto

Member
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Lupetto

  1. I just recompiled whole source & quest and this works without any problem ^^

     

    btw. i think you should correct your tabs :D (sorry, i know i give to you badly format of code but i haven't so much time to correct whitespaces)

     

    	void CQuestManager::Dead(unsigned int pc, unsigned int npc)
    	{
    		PC * pPC;
    
    		sys_log(0, "CQuestManager::OnDead QUEST_DEAD_EVENT (pc=%d, npc=%d)", pc, npc);
    
    		if ((pPC = GetPC(pc)))
    		{
    			if (!CheckQuestLoaded(pPC))
    				return;
    			m_mapNPC[npc].OnDead(*pPC);
    
    			if (m_mapNPC[QUEST_NO_NPC].OnDead(*pPC))
    				return;
    		}
    		else
    			sys_err("QUEST: no such pc id : %d", pc);
    	}
    
    should work. :)

     

     

    I have the problem explained with your code and i fixed it using this :

    	void CQuestManager::Dead(unsigned int pc, unsigned int npc)
    	{
    		PC * pPC;
    		sys_log(0, "CQuestManager::OnDead QUEST_DEAD_EVENT (pc=%d, npc=%d)", pc, npc);
    		if (pPC = GetPC(pc))
    		{
    			if (!CheckQuestLoaded(pPC))
    				return;
    
    			if(npc > 0)
    				m_mapNPC[npc].OnDead(*pPC);
    			
    			if (m_mapNPC[QUEST_NO_NPC].OnDead(*pPC))
    				return;
    		}
    		else
    			sys_err("QUEST: no such pc id : %d", pc);
    	}
    

    Anyway i really thank you for your reply on a my request and now i have learned something new :)

    Thank 's you again,

    Lup.

    • Love 1
  2.  

    You could do it with npc.get_vid()

    quest dead begin
    	state start begin
    		when kill with npc.is_pc() begin
    			local vid = npc.get_vid()
    			local old_pc = pc.select(vid)
    			if old_pc != 0 then
    				chat("You die")
    				pc.select(old_pc)
    			end
    		end
    	end
    end
    

    I Think this is not correct, the quest name is "dead" but you use the kill event..

    All writed by Zonni is working good, but there is a bug, that the event "dead" is called two times, maybe is the same bug as "kill" counted twiche, i'll investigate on it and let you know

  3. Thanks for you help Zonni, i have just a little problem:

    The event is triggeret 2 times, i try to explain better:

    when dead begin
    	syschat("You are death.")
    end
    

    I will get the text "You are death" 2 times.

     

    Any ideas about?

     

    In the code you give to me i dont understand this part : 

    m_mapNPC[npc].OnDead(*pPC);
    		 
    if (m_mapNPC[QUEST_NO_NPC].OnDead(*pPC))
    	return;
    
  4. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hello, i think that will be nice to know how much slot add every belt.

     

    So i have investigated a little bit about that and i have done a mod.

    You need to change just uitooltip.py in the root.

     

    Search 

    WARP_SCROLLS = [22011, 22000, 22010]

    And add this after:

    extra_slot = [0,1,2,4,6,9,12,16]

    Now search

    		elif item.ITEM_TYPE_BELT == itemType:
    			self.__AppendLimitInformation()
    			self.__AppendAffectInformation()
    			self.__AppendAttributeInformation(attrSlot)
    			self.__AppendAccessoryMetinSlotInfo(metinSlot, constInfo.GET_BELT_MATERIAL_VNUM(itemVnum))

    And replace with

    		elif item.ITEM_TYPE_BELT == itemType:
    			self.__AppendLimitInformation()
    			self.__AppendAffectInformation()
    			self.__AppendAttributeInformation(attrSlot)
    			self.AppendTextLine("Extra slots : %s " % extra_slot[item.GetValue(0)], self.SPECIAL_POSITIVE_COLOR)
    			self.__AppendAccessoryMetinSlotInfo(metinSlot, constInfo.GET_BELT_MATERIAL_VNUM(itemVnum))

    As you can see, just a textline has added.

    self.AppendTextLine("Extra slots : %s " % extra_slot[item.GetValue(0)], self.SPECIAL_POSITIVE_COLOR)

    Here you can change the text, and the color (self.SPECIAL_POSITIVE_COLOR)

    Hope that will be nice for you,

     

    Lup.

    • Metin2 Dev 11
    • Think 1
    • Confused 1
    • Good 3
    • Love 1
    • Love 24
  5. Hello,

    Sorry for the bad title of the topic but i dont know how to explain in a single row.

     

    I'm working on the game source, and i can compile it whitout any errors.

     

    After i have edited something in char.cpp, it look like had lost the original encoding.

     

    Here is the result ingame: 

     

    2f0auc7.png

     

    Some strings are in korean (All from char.cpp) and will display in korean cause in locale_string.txt there arent korean strings.

    Other strings, from other files (not char.cpp) will display correctly.

     

    Here is how i see char.cpp strings in my editor:

    2j0b1pu.jpg

     

    They look in the right charset encoding ( I take just a part of strings, but they are same of locale_string.txt)

    When i compile the game and run the server, i get the result of the first screen.

    What do you think can be the problem?

    Thanks in advance,

    Lup.

  6. I know this is a forum to help and share things but you ppl take it too much as a self service you are using, you can find here all free without having a clue and keep asking for stuffs in the end you have a  sv made 80% by a board and 20% by you from that 19% is copy paste work!!!

     

    FREEE FREE FREEE dafuq i give you free stuff if doo free stuffs for me this board should have some gold or points ranking so you can earn them releasing things or solving errors/buggs  , this way those who brings things to forum will have the right to request things!

    The devs from here are not your slaves all i see dayly is ppl with no ideaa about c++ and  modding src and f***k them and then ask for help  lol cant swim take lessons and then jump in the pool! I used to hate epv** for their sistem but i think it might be the right way!

     

    * This got a small reference to your  request it has to doo with all forum but my brain crashed on your topic xD

     

    My opinion you dont have to share it or aprove it!

    Total agree with you.

     

    About the topic, you can try to search on this forum or google it.

    There are some public releases, but i'm not sure if they have backdoor or security fix.

     

    You can ever build your own or ask to someone if you want to buy it.

  7. Here is the Attack Speed check:

    input_main.cpp

    		if (CheckSpeedHack)
    		{
    			int iDelta = (int) (pinfo->dwTime - ch->GetDesc()->GetClientTime());
    			int iServerDelta = (int) (dwCurTime - ch->GetDesc()->GetClientTime());
    
    			iDelta = (int) (dwCurTime - pinfo->dwTime);
    
    			// ½Ã°£ÀÌ ´Ê°Ô°£´Ù. ÀÏ´Ü ·Î±×¸¸ ÇصдÙ. ÁøÂ¥ ÀÌ·± »ç¶÷µéÀÌ ¸¹ÀºÁö üũÇؾßÇÔ. TODO
    			if (iDelta >= 30000)
    			{
    				sys_log(0, "SPEEDHACK: slow timer name %s delta %d", ch->GetName(), iDelta);
    				ch->GetDesc()->DelayedDisconnect(3);
    			}
    			// 1ÃÊ¿¡ 20msec »¡¸® °¡´Â°Å ±îÁö´Â ÀÌÇØÇÑ´Ù.
    			else if (iDelta < -(iServerDelta / 50))
    			{
    				sys_log(0, "SPEEDHACK: DETECTED! %s (delta %d %d)", ch->GetName(), iDelta, iServerDelta);
    				ch->GetDesc()->DelayedDisconnect(3);
    			}
    		}
    

    U can remove all this part or you can comment just

    ch->GetDesc()->DelayedDisconnect(3);
    

    if you want the check and the log.

    Hope to have helped you,

    Lup =)

    • Love 1
  8. As you correctly identified, the speedhack control that there's in the server has nothing to do with actual move speed, just attack speed. There is not any kind of built-in measure against speedhack (and you can go at 500 speed without any setback issues).

     

    What you describe sounds like the position syncing is not being ran properly, either too slowly (and by the time the server tries to sync you, you are in already another position and it sets you back... but I never saw this happen), or too fast (and server receives many syncs together and decides you are hacking - this is to prevent movement by teleporting though, not speedhacking).

     

    Which mount are you using? Or well, which mob you poly to? Which is your base speed (w/out mount) and which is the bonus speed (w/ mount)? Maybe we could try to reproduce the error.

     

    Your thing look plausible,

    I'm doing some modifications on the code and if i found a fix i will share to the community so everyone can fix if they have the same issue.

    Thanks to all that have reply to the topic.

    Lup.

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