Jump to content
Sign in to follow this  
DaGreatMarky

Can someone help me about this list

Recommended Posts

Title Explains it all 

 

 

 

1) I Made a map that have 50 mobs

what i want is when player kill 20 mob of it it teleports him to another coords , only him  , so when ever he kill 1 mob it shows on screen Total Kills (1 / 20 )

 

 

2)New Bosses.

When i add the new bosses and go to the place i put the boss at

i see the effect/hits of the boss on me but i cant see the boss[hidden].

 

3) .....

Edited by DaGreatMarky

Share this post


Link to post
Share on other sites
12 minutes ago, Foxseiz said:

2. Make sure the textures, scripts, animations, and models are in the proper folder.

I also assist him, we just do extract and manually extract but still same. Even with clean characteraction.tx incase someone hide it but it's not. So not sure whats the problem.

Share this post


Link to post
Share on other sites

Hello @DaGreatMarky, i will provide you a example for the first question u asked. I didn't tested it, but it will be something like that.

 

function new_pkm_hook(dead, atk)
	local mobId					= GetChaTypeID(dead)								--Gets monsterId killed
	local mobName				= GetMonsterName(mobId)								--Gets monsters name killed
	local mobDeadNum			= 0													--It will record amount of mobs killed
	local pos_x,pos_y,map		= 2171,2782,'garner'								--Coords to be teleported or just use MoveCity()
	if mobId == 103 then															--MonterId to record kill num (Forest Spirit)
		if mobDeadNum < 20 then														--If kill num < 20 then
			mobDeadNum = mobDeadNum + 1												--Increase kill num by + 1
			BickerNotice(atk, 'Killed ['..mobName..'] : {'..mobDeadNum..'/20}')		--Display notice to killer
		else																		--If kill num >= 20 then
			GoTo(atk, pos_x, pos_y, map)											--Teleport killer to coords and map						
		end
	end
end

	twenty_pkm_hook = GetExp_PKM													--Hooking Player Kill Monster
	GetExp_PKM = function(dead, atk)
		twenty_pkm_hook(dead, atk)
		if (GetChaMapName(atk) == "garner") then									--Map name to custom function be called
			new_pkm_hook(dead, atk)
		end
	end

Make sure u did the correct conditions for that, this just a example! If you back killing same monster when kill >= 20 it will just keep teleporting player, so reset the var when player teleported or something like.


lelouch_signature_by_vahntheknight-d4uafwj.png

Share this post


Link to post
Share on other sites
1 hour ago, Satan said:

Hello @DaGreatMarky, i will provide you a example for the first question u asked. I didn't tested it, but it will be something like that.

 


function new_pkm_hook(dead, atk)
	local mobId					= GetChaTypeID(dead)								--Gets monsterId killed
	local mobName				= GetMonsterName(mobId)								--Gets monsters name killed
	local mobDeadNum			= 0													--It will record amount of mobs killed
	local pos_x,pos_y,map		= 2171,2782,'garner'								--Coords to be teleported or just use MoveCity()
	if mobId == 103 then															--MonterId to record kill num (Forest Spirit)
		if mobDeadNum < 20 then														--If kill num < 20 then
			mobDeadNum = mobDeadNum + 1												--Increase kill num by + 1
			BickerNotice(atk, 'Killed ['..mobName..'] : {'..mobDeadNum..'/20}')		--Display notice to killer
		else																		--If kill num >= 20 then
			GoTo(atk, pos_x, pos_y, map)											--Teleport killer to coords and map						
		end
	end
end

	twenty_pkm_hook = GetExp_PKM													--Hooking Player Kill Monster
	GetExp_PKM = function(dead, atk)
		twenty_pkm_hook(dead, atk)
		if (GetChaMapName(atk) == "garner") then									--Map name to custom function be called
			new_pkm_hook(dead, atk)
		end
	end

Make sure u did the correct conditions for that, this just a example! If you back killing same monster when kill >= 20 it will just keep teleporting player, so reset the var when player teleported or something like.

perhaps you'd like to reset the counter back to 0 somewhere?

Share this post


Link to post
Share on other sites
1 hour ago, Satan said:

Hello @DaGreatMarky, i will provide you a example for the first question u asked. I didn't tested it, but it will be something like that.

 


function new_pkm_hook(dead, atk)
	local mobId					= GetChaTypeID(dead)								--Gets monsterId killed
	local mobName				= GetMonsterName(mobId)								--Gets monsters name killed
	local mobDeadNum			= 0													--It will record amount of mobs killed
	local pos_x,pos_y,map		= 2171,2782,'garner'								--Coords to be teleported or just use MoveCity()
	if mobId == 103 then															--MonterId to record kill num (Forest Spirit)
		if mobDeadNum < 20 then														--If kill num < 20 then
			mobDeadNum = mobDeadNum + 1												--Increase kill num by + 1
			BickerNotice(atk, 'Killed ['..mobName..'] : {'..mobDeadNum..'/20}')		--Display notice to killer
		else																		--If kill num >= 20 then
			GoTo(atk, pos_x, pos_y, map)											--Teleport killer to coords and map						
		end
	end
end

	twenty_pkm_hook = GetExp_PKM													--Hooking Player Kill Monster
	GetExp_PKM = function(dead, atk)
		twenty_pkm_hook(dead, atk)
		if (GetChaMapName(atk) == "garner") then									--Map name to custom function be called
			new_pkm_hook(dead, atk)
		end
	end

Make sure u did the correct conditions for that, this just a example! If you back killing same monster when kill >= 20 it will just keep teleporting player, so reset the var when player teleported or something like.

 

i put it and 

when ever i kill x1 mob it shows 

Killed [ xx ]  : [1/20]

 

i killed like 57 mobs now and still  never teleported me

 

and only shows Killed [ xx ]  : [1/20] 

not 2/20 / 3/20

 

just stuck at 1/20

 

where is the problem bro?

 

 

Share this post


Link to post
Share on other sites
On 20/01/2018 at 1:42 PM, DaGreatMarky said:

where is the problem bro?

Ok, fixed it for you.

 

- Record monster kill num to table based on roleID;

- Fixed the problem on kill num which was not being increased. Defined the local mobDeadNum to global var;

- Player teleport to another coords when reach 20 kills and the monster kill num resets to 0;

 

mobDeadNum 						= {};
function new_pkm_hook(dead, atk)
	local chaId					= GetCharID(atk)
	local mobId					= GetChaTypeID(dead)								
	local mobName				= GetMonsterName(mobId)								
	local pos_x,pos_y,map		= 2171,2782,'garner'
	if mobId == 103 then
		if mobDeadNum[chaId] == nil then
			mobDeadNum[chaId]	= 0
		end
		mobDeadNum[chaId]		= mobDeadNum[chaId] + 1	
		if mobDeadNum[chaId] <= 19 then
			BickerNotice(atk, 'Killed ['..mobName..'] : {'..mobDeadNum[chaId]..'/20}')
		else
			GoTo(atk, pos_x, pos_y, map)
			mobDeadNum[chaId]	= nil			
		end
	end		
end

	twenty_pkm_hook	= GetExp_PKM													
	GetExp_PKM		= function(dead, atk)
		twenty_pkm_hook(dead, atk)
		if (GetChaMapName(atk) == "garner") then								
			new_pkm_hook(dead, atk)
		end
	end

 

Edited by Satan

lelouch_signature_by_vahntheknight-d4uafwj.png

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.

Sign in to follow this  

×
×
  • Create New...