Jump to content

Recommended Posts

[Mod] Highlight friends and enemies with color

 

screenshot_01.png

 

This modification highlights friendly and hostile players on the screen: the names of the characters change color, and colored circles are displayed under the characters (see screenshot above).

 

If there are enemies near the player's character, a warning icon is displayed next to the character's avatar:

screenshot_02.png

 

Characters are considered friendly if they:

1) Are in the same party;

2) Are in the same guild;

3) Are in the same fraction.

 

The mod only works on PvP maps that are specified in the settings.

 

 

Requirements

 

Installed mod loading system for server and client (PKOdev.NET mod loader).

 

 

Modification information

 

Name: pkodev.mod.enemy;

Version: 1.0;

Author: V3ct0r;

Type: for client (Game.exe);

Supported executable .exe files: GAME_13X_0, GAME_13X_1, GAME_13X_2, GAME_13X_3, GAME_13X_4, GAME_13X_5.

 

 

Installation

 

1) In the "mods" directory of your client, create a "pkodev.mod.enemy" folder;

2) Place into it the mod DLL file "pkodev.mod.enemy.client.13x_<ID>.dll" for your version of Game.exe;

3) Place into it the mod settings file "pkodev.mod.enemy.cfg" and customize it as you wish:

// pkodev.mod.enemy settings file
// (c) V3ct0r from PKOdev.NET
// 02/16/2022

[show]
main_cha = true          // Should the player character be displayed as a teammate?
colored_name = true      // Colorize character names?
colored_circle = true    // Show circles under characters?

[color]
enemy_color = FFFF0000   // Enemy character name color (in the hexadecimal form: FFRRGGBB)
friend_color = FF00FF00  // Teammate character name color (in the hexadecimal form: FFRRGGBB)

[icon]
warning_show = true      // Should the 'warning' icon be shown when enemies are near?
warning_x = 208          // 'x' position of the icon on the screen
warning_y = 16           // 'y' position of the icon on the screen

[map]
maps = garner,magicsea,darkblue // Maps on which the mod is enabled

4) In the "texture" directory of the game client, create a folder "mods", and in it a subfolder "pkodev.mod.enemy". Place the "warning.png" icon from the archive with the mod into this subfolder. You can replace this icon with any other with the same name, 32 x 32 pixels and in .png format.

 

 

Download

 

1) Binary release (.dll);

2) The source code of the mod for Visual Studio 2019 Community (C++).

 

 

If you encounter any problem, bug or have any questions, then feel free to write in this thread.

  • Like 1

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
On 2/18/2022 at 10:23 PM, RafaelaMartins said:

Hello v3ctor, you can make this mod be able for dont attack ally? like the the attempt to attack. same in PO, when you are in DreamIsland you can't even click on your ally only on the enemy

Hello! It is done.

  • Like 1

Share this post


Link to post
Share on other sites

@dragontechi

 

1) Is the mouse icon displayed instead of the sword one when hovering over a friendly player's character?

2) On the server side, the is _friend() function should also have the appropriate code written so that friendly characters cannot damage each other.

  • Like 1

Share this post


Link to post
Share on other sites
7 minutes ago, V3ct0r said:

@dragontechi

 

1)  ¿Aparece el icono del ratón en lugar del de la espada cuando se pasa el cursor sobre el personaje de un jugador amigo?

2)  En el lado del servidor, la función is _friend() también debe tener el código apropiado escrito para que los personajes amistosos no puedan dañarse entre sí.

1 yes 

2

function is_friend(cha1, cha2) 
--	SystemNotice ( cha1, "transferis_friend" ) 
    local friend_target = 1 
    local Map_type = GetChaMapType( cha1 )
    if CheckChaRole( cha1 ) == 0 and Map_type ~= 2 then			--如果cha1为怪物且不在工会地图中,则cha2为怪物为友方,cha2为人为敌方
	if CheckChaRole( cha2 ) == 0 then							
		return 1 
	else 
		return 0 
	end 

    end
	   
--		SystemNotice ( cha1 , "1" ) 
--		SystemNotice ( cha1 , "Map_type ="..Map_type ) 
--	    if Map_type == 4 then									--迷宫PK地图友方判断
--		local team = is_teammate(cha1, cha2) 
--		if team == 1 then 
--			return 1 
--		end 
--	    else
--		return 0
--	    end
		if Map_type == 1 then 
			if CheckChaRole ( cha1 ) == 1 then 
					if CheckChaRole( cha2 ) == 0 then							
						return 0 
					else 
						return 1 
					end 

			end 
		end 

		if Map_type == 4 then									--迷宫PK地图友方判断
			if Is_NormalMonster (cha1) == 1 then						--如果是普通怪物则与怪物是友方
				if Is_NormalMonster (cha2) == 1 then 
					return 1 
				end 
			end 
			local team = is_teammate(cha1,cha2) 
			if team == 1 then 
				return 1 
			else 
				local guild_id1, guild_id2 
				guild_id1 = get_cha_guild_id(cha1) 
				guild_id2 = get_cha_guild_id(cha2) 
				if guild_id1 ~= 0 and guild_id2 ~= 0 and guild_id1 == guild_id2 then 
					return 1  
				else
					return 0 
				end
			end
			--local team = is_teammate(cha1,cha2) 
			--		if team == 1 then 
			--			return 1 
			--		else 
			--			return 0 
			--		end 
		end 

--	        SystemNotice ( cha1 , "2" ) 

	    if  Map_type ==3 then									--是队伍战地图则队友为友方
--		SystemNotice ( cha1 , "1" ) 
		    local team = is_teammate(cha1, cha2) 
--		    		SystemNotice ( cha1 , "2" ) 

		    if team == 1 then 
--		    		SystemNotice ( cha1 , "3" ) 
		        return 1 
		    else 
			return 0 
		    end
		   
	    end

	    if cha1 == 0 or cha2 == 0 then							--指针为空
	        return 0 
	    end 
--		SystemNotice ( cha1 , "3" ) 
	    if Map_type == 2 then									--工会PK地图判断
		if Is_NormalMonster (cha1) == 1 then						--如果是普通怪物则与怪物是友方
			if Is_NormalMonster (cha2) == 1then 
				return 1 
			end 
		end 
		local guild_id1, guild_id2 
		guild_id1 = get_cha_guild_id(cha1) 
		guild_id2 = get_cha_guild_id(cha2) 
		if guild_id1 ~= 0 and guild_id2 ~= 0 and guild_id1 == guild_id2 then 
			return 1 
		else 
			return 0 
		end

	    end 
	    if Map_type == 5 then									--工会PK地图判断
--		if Is_NormalMonster (cha1) == 1 then						--如果是普通怪物则与怪物是友方
--			if Is_NormalMonster (cha2) == 1then 
--				return 1 
--			end 
--		end 
		local guild_side_1, guild_side_2 
		guild_side_1 = GetChaSideID(cha1) 
		guild_side_2 = GetChaSideID(cha2) 
		--if guild_side_1 <= 100 and guild_side_1 > 0 and guild_side_2 <= 100 and guild_side_2 > 0 then
		if guild_side_1 == guild_side_2 then
			return 1 
		--elseif
		   --guild_side_1 > 100 and guild_side_1 <= 200 and guild_side_2 > 100 and guild_side_2 <= 200 then
			--return 1
	        else
		        return 0
		end

	    end 
--		SystemNotice ( cha1 , "4" ) 

	    return friend_target 
 end 
--	    local is_plycha1 = CheckChaRole(cha1) 
--	    local is_plycha2 = CheckChaRole(cha2) 
--	    local can_PK1 = CheckChaPKState(cha1) 
--	    if can_PK1 == 0 then 
--	        if is_plycha1 ~= 0 and is_plycha2 ~= 0 then 
--	            return 1 
--	        end 
--	        if is_plycha1 == 0 and is_plycha2 == 0 then 
--	            return 1 
--	        end 
--	    end 
  --  end
--    return 0
-- end 

 

Share this post


Link to post
Share on other sites

 

Hace 33 minutos, dragontechi dijo:

1 si 

2




	   





		   



 

 

Hace 40 minutos, V3ct0r dijo:

@dragontechi

 

1)  ¿Aparece el icono del ratón en el lugar de la espada cuando se pasa el cursor sobre el personaje de un jugador amigo?

2)  En el lado del servidor, la función es _friend() también debe tener el código apropiado escrito para que los personajes amistosos no puedan dañarse entre sí.

image.png.e660454f6ed755ffda4458a962ad949b.png

lo siento vector la imagen no lo muestra pero se puede ver la espada

Edited by dragontechi

Share this post


Link to post
Share on other sites

@dragontechi

 

1) Are you sure you are using the latest mod binaries? Try to build .dll from soruce code.

2) Is the map "CA Tweak" added to the pkodev.mod.enemy.cfg file?

3) How to reproduce this bug?

  • Like 1

Share this post


Link to post
Share on other sites
On 2/3/2022 at 8:58, V3ct0r said:

@dragontechi

 

1) ¿Está seguro de que está utilizando los binarios de mod más recientes? Intente compilar .dll a partir del código fuente.

2) ¿Se agregó el mapa "CA Tweak" al archivo pkodev.mod.enemy.cfg ?

3) ¿Cómo reproducir este error?

// Map List
//ID  地图文件名  中文名   是否显示切换区域 初始画面坐标  摆放角色       平行光颜色    平行光方向
1	garner	Ascaron	1	2202,2782	3,2202,2782	255,255,255
2	magicsea	Magical Ocean	1	1350,550	3,1350,550	255,255,255
3	darkblue	Deep Blue Islands	1	70,70	3,70,70	255,255,255
4	lonetower	Lone Tower	0	50,50	3,50,50	255,255,255
5	eastgoaf	Eastern Goaf	1	50,50	3,50,50	255,255,255
6	secretgarden	Garden of Edel	0	50,50	3,50,50	255,255,255
7	darkswamp	Dark Swamp	0	50,50	3,50,50	255,255,255
8	abandonedcity	Forsaken City	0	50,50	3,50,50	255,255,255
9	abandonedcity2	Forsaken City 2	0	150,150	3,50,50	255,255,255
10	abandonedcity3	Forsaken City 3	0	150,150	3,50,50	255,255,255
11	puzzleworld	Demonic World	0	1, 1	3,50,50	0,0,0
12	puzzleworld2	Demonic World 2	0	1, 1	3,50,50	0,0,0
13	teampk	Arena	0	1, 1	3,50,50	0,0,0
14	jialebi	海盗基地	0	150,150	3,50,50	255,255,255	
15	garner2	Chaos Argent	0	150,150	3,150,150	255,255,255
// pkodev.mod.enemy settings file
// (c) V3ct0r from PKOdev.NET
// 02/16/2022

[show]
main_cha = true          // Should the player character be displayed as a teammate?
colored_name = true      // Colorize character names?
colored_circle = true    // Show circles under characters?

[color]
enemy_color = FFFF0000   // Enemy character name color (in the hexadecimal form: FFRRGGBB)
friend_color = FF00FF00  // Teammate character name color (in the hexadecimal form: FFRRGGBB)

[icon]
warning_show = true      // Should the 'warning' icon be shown when enemies are near?
warning_x = 208          // 'x' position of the icon on the screen
warning_y = 56           // 'y' position of the icon on the screen

[map]
maps = pkmap,garner2 // Maps on which the mod is enabled

I removed the Tweak thinking that it could cause some problem but it still allows ataka friends and if I am using the most recent bin

  • Thanks 1

Share this post


Link to post
Share on other sites
On 3/14/2022 at 3:58 AM, gunnapong said:

Mods ไม่รองรับ game.exe ฉันไม่ทราบหมายเลขโปรดบอกฉัน

https://drive.google.com/file/d/1jfnNjzO8iGdNU9KTt0jfkbWaoyAkHPM5/view?usp=drivesdk

Reupload Game.exe please. The link is broken.


Share this post


Link to post
Share on other sites

Hello @gunnapong,

 

// void CHeadSay::Render(D3DXVECTOR3& pos)
const unsigned int CHeadSay__Render = 0x00471C90;

// CCharacter* CGameScene::_pMainCha 
const unsigned int CGameScene___pMainCha = 0x006A08D4;

// void CCharacter::setSideID(long side_id)
const unsigned int CCharacter__setSideID = 0x004A46E0;

// void NetSwitchMap(stNetSwitchMap &switchmap)
const unsigned int NetSwitchMap = 0x00508190;

// void CGameScene::_RenderUI()
const unsigned int CGameScene___RenderUI = 0x004DB070;

// CGuiPic
const unsigned int CGuiPic = 0x00682DF8;

// CGuiPic::CGuiPic( CGuiData* pParent, unsigned int max )
const unsigned int CGuiPic__CGuiPic = 0x0049F900;

// bool	CGuiPic::LoadImage( const char * file, int w, int h, int frame=0, int tx=0, int ty=0, float scalex=0.0, float scaley=0.0 )
const unsigned int CGuiPic__LoadImage = 0x004A1B90;

// inline void CGuiPic::Render( int x, int y )	
const unsigned int CGuiPic__Render = 0x004A0E00;

// bool CIsSkillUse::IsAttack( CSkillRecord* pSkill, CCharacter* pSelf, CCharacter* pTarget )
const unsigned int CIsSkillUse__IsAttack = 0x004DD680;

 


Share this post


Link to post
Share on other sites
On 4/12/2022 at 7:28 PM, V3ct0r said:

Hello @gunnapong,

 


// void CHeadSay::Render(D3DXVECTOR3& pos)
const unsigned int CHeadSay__Render = 0x00471C90;

// CCharacter* CGameScene::_pMainCha 
const unsigned int CGameScene___pMainCha = 0x006A08D4;

// void CCharacter::setSideID(long side_id)
const unsigned int CCharacter__setSideID = 0x004A46E0;

// void NetSwitchMap(stNetSwitchMap &switchmap)
const unsigned int NetSwitchMap = 0x00508190;

// void CGameScene::_RenderUI()
const unsigned int CGameScene___RenderUI = 0x004DB070;

// CGuiPic
const unsigned int CGuiPic = 0x00682DF8;

// CGuiPic::CGuiPic( CGuiData* pParent, unsigned int max )
const unsigned int CGuiPic__CGuiPic = 0x0049F900;

// bool	CGuiPic::LoadImage( const char * file, int w, int h, int frame=0, int tx=0, int ty=0, float scalex=0.0, float scaley=0.0 )
const unsigned int CGuiPic__LoadImage = 0x004A1B90;

// inline void CGuiPic::Render( int x, int y )	
const unsigned int CGuiPic__Render = 0x004A0E00;

// bool CIsSkillUse::IsAttack( CSkillRecord* pSkill, CCharacter* pSelf, CCharacter* pTarget )
const unsigned int CIsSkillUse__IsAttack = 0x004DD680;

 

I don't know what problem it is.The symbol is not displayed.

Capture1.PNG

Capture.PNG

Share this post


Link to post
Share on other sites
1 minute ago, gunnapong said:

I don't know what problem it is.The symbol is not displayed.

Capture1.PNG

Capture.PNG

Check that 'main_cha' parameter set as 'true' in the file pkodev.mod.enemy.cfg:

[show]
main_cha = true          // Should the player character be displayed as a teammate?

 


Share this post


Link to post
Share on other sites
13 minutes ago, V3ct0r said:

ตรวจสอบว่า พารามิเตอร์ ' main_cha ' ตั้งค่าเป็น ' true ' ในไฟล์pkodev.mod.enemy.cfg :


 

Check ok .but nothing shows

Capture1.PNG

Share this post


Link to post
Share on other sites
Just now, gunnapong said:

Check ok .but nothing shows

Capture1.PNG

[map]
maps = CA Tweak

How this map named in GameServer terms? For example Ascaron is garner and so on.


Share this post


Link to post
Share on other sites
4 minutes ago, V3ct0r said:

แผนที่นี้ตั้งชื่อตามเงื่อนไข GameServer อย่างไร? ตัวอย่างเช่น Ascaron คือ garner เป็นต้น

 

Capture1.PNG

Share this post


Link to post
Share on other sites

@gunnapong,

 

so then you should write garner2, not CA Tweak:

[map]
maps = garner2

 


Share this post


Link to post
Share on other sites

Hello @Brothers and welcome back!

 

You can see which Game.exe are supported in this topic:

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...