• 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!

Add soul orb on monster kill, not summons.

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
287
Reaction score
2
PHP:
local loot = 5944
 
function onKill(cid, target, lastHit)
	if isMonster(target) then
			local item = getPlayerItemById(cid, true, loot)
			if item.uid == 0 or item.type == 100 then
				doPlayerAddItem(cid, loot, 1)
			else
				doTransformItem(item.uid, loot, item.type + 1)
			end
end
	return true
end

Any way to fix this script so it doesn't give soul orbs to the player if the monster was a summon? Maybe by checking if the monster's summonable flag is set to 0. Or if the monster gave the player experience, then give him a soul orb. Or maybe even by checking if the monster can't be convinced.
 
Last edited:
I would think adding
PHP:
if isMonster(target) and not isSummon(target) then

That should do it if your server supports that function.
 
Back
Top