Jump to content

Recommended Posts

Hello Metin2dev.

1) When i use the "Pink Dew, Red, Blue.....", how can i then make a "effect" like the Sun Elixir? I have here a picture: https://metin2.download/picture/bP26HcdC90gKlPq8G1dOJdaCM344QYo0/.png

2) When i use the "Pink Dew,Red,Blue......", how can i then make that is giving me a icon top left? I have here a picture: https://metin2.download/picture/bP26HcdC90gKlPq8G1dOJdaCM344QYo0/.png

3) I want to know where the "Pink Dews..." in the source are. I want to make that you only need to use one, and its will be there, and not -1 every time you use one

4)  Where can I set when the player is dead, that he dont need to wait 10sec? That he can live directly?

Sorry for my bad english

Edited by Metin2 Dev
Core X - External 2 Internal
  • Good 1
  • Love 1
  • Love 1
Link to comment
https://metin2.dev/topic/12403-c-and-client/
Share on other sites

root/uiAffectshower.py

	AFFECT_DATA_DICT[chr.NEW_AFFECT_POTION_PINK] = ("Potion Pink", "d:/ymir work/ui/affect/pink.sub")

[File: src/Client/UserInterface/InstanceBase.h]

			NEW_AFFECT_POTION_PINK = 999,

[File: src/Client/UserInterface/PythonCharacterModule.cpp]

	PyModule_AddIntConstant(poModule, "NEW_AFFECT_POTION_PINK",			CInstanceBase::NEW_AFFECT_POTION_PINK);

[File: src/Server/game/src/affect.h]

	NEW_AFFECT_POTION_PINK = 999,

[File: src/Server/game/src/char_affect.cpp] // When you die you will not lose effect

#define IS_NO_CLEAR_ON_DEATH_AFFECT(type) ((type) == AFFECT_BLOCK_CHAT || (type) == NEW_AFFECT_POTION_PINK || ((type) >= 500 && (type) < 600))

[File: src/Server/game/src/char_item.cpp]

	case 50825:
		if (!FindAffect(NEW_AFFECT_POTION_PINK))
		{
			AddAffect(NEW_AFFECT_POTION_PINK, 0, 0, AFF_NONE, 5*60, 0, true, false);
		}
		else
		{
			ChatPacket(CHAT_TYPE_INFO, "You already have this potion active!");
		}
			break;

Function char_item is just a small example of the call, you must include in char_item.cpp function something like:

Look  this:

						AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
						item->SetCount(item->GetCount() - 1);

 And delete and make like that:

			if (item->GetVnum() == 50824)
			{
				AddAffect(NEW_AFFECT_POTION_PINK, 0, 0, AFF_NONE, apply_duration, 0, true, false);
				AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
				item->SetCount(item->GetCount() - 1);
			}							
			else if (item->GetVnum() == 50825)
			{
				AddAffect(NEW_AFFECT_POTION_DICK, 0, 0, AFF_NONE, apply_duration, 0, true, false);
				AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
				item->SetCount(item->GetCount() - 1);
			}							
			else if (item->GetVnum() == 50826)
			{
				AddAffect(NEW_AFFECT_POTION_PUSSY, 0, 0, AFF_NONE, apply_duration, 0, true, false);
				AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
				item->SetCount(item->GetCount() - 1);
			}	

I gave mostly 90% of what you do, now please use your brain. Good luck.

Edited by VegaS
fuck code tag
  • Love 1
Link to comment
https://metin2.dev/topic/12403-c-and-client/#findComment-71659
Share on other sites

  • 4 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.