• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[C++] Monster Target

TaurenLess

New Member
Joined
Jan 2, 2010
Messages
76
Reaction score
1
Location
Brasília / Brasil
If the target monster is one player and if the player has summons, the monster has a 100% chance of attacking the summon, else, the monster attacking player.
It's possible?
I've tried this in creaturescripts:
PHP:
function onCombat(cid, target)
	local summons = getCreatureSummons(target)
	
	if target == isPlayer then
		if table.maxn(summons) > 0 then
			doMonsterSetTarget(cid, getCreatureSummons(target)[1])
		end
	end
	
	return true
end
AND NOT WORK =(


In which file of sources make it?

Sorry for my bad english.
Thx
 
I guess the issue is in monster(s).cpp that the monster will not accept the new target based on isOpponent etc.
 
I could help you, but i'm pretty busy doing personal stuff, but for a small fee i could postpone something and help you ;) (yep, i'm one of those greedy fckers)
 
Back
Top