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

[Gesior AAC] Most Creature Killers! [update! fixed with 1 query]

Code:
-- Script by slawkens, modified by Zonet

local monsters = {
	['dragon'] = 9541,
	['dragon lord'] = 9542,
	['frost dragon'] = 9543,
	['wyrm'] = 9544,
	['demon'] = 9545
}

function onKill(cid, target, lastHit)
	local monster = monsters[getCreatureName(target):lower()]
	if lastHit and not isPlayer(target) and monster then
		local killedMonsters = math.max(0, getPlayerStorageValue(cid, monster)) + 1
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You killed ' .. killedMonsters .. ' ' .. name .. 's.')
		setPlayerStorageValue(cid, monster, killedMonsters)
	end
	return true
end
:p
 
Most deaths don't see

hello man
do I hear as I leave Most death also, because I do not leave?

thanks and regards.

P.D. You are very good, it is like this :$
 
Whats up I did everything as written there, and you can not see me for who was killed like the Dragon is just an empty box
26569303530206463141.jpg
 
[10:14:22.061] [Error - CreatureScript Interface]
[10:14:22.061] data/creaturescripts/scripts/count.lua:eek:nKill
[10:14:22.061] Description:
[10:14:22.061] data/creaturescripts/scripts/count.lua:15: attempt to compare string with number
[10:14:22.061] stack traceback:
[10:14:22.061] data/creaturescripts/scripts/count.lua:15: in function <data/creaturescripts/scripts/count.lua:9>

help me
 
The scoring system is wrong because you have two people attacking a demon, the second will earn points not only of death and the person who has gained more exp.

There's no fix?
 
Really cool idea! I'll definitely install this in my server..

Regards.
 
where can i paste this?¿ i need to create monster list

<?php
$strg_num = 9541;

if(file_exists($path = '/home/migxxx/tfs/data/monster/monsters.xml') && $xml = simplexml_load_file($path))
foreach($xml as $xmlx)
echo('["'.strtolower($xmlx['name']).'"] = '.$strg_num++.',<br />');
?>
 
bump Script works/loads I just cant get the images to work. Any thoughts?
 
Back
Top