• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Remove Monters

valivan601

New Member
Joined
Apr 13, 2011
Messages
365
Reaction score
1
Hello I'm having problems with this script for example I have one monsters with name Morgaroth then the script removes the monsters but show erros for the other monsters of the list also when there is noone monster too it show this erros can anyone help me to fix it?

(luaGetCreatureName) Creature not found

PHP:
local config = {"Ghazbaran","Morgaroth","Zulazza the Corruptor","Ferumbras","Orshabaal","Brutus Bloodbeard","Deadeye Devious","Lethal Lissy","Ron the Ripper","The Horned Fox","Demodras","Necropharus","The Old Widow","Sir Valorcrest","Zevelong Duskbringer","Diblis The Fair","Arachir the Ancient One","Dracola","Mr. Punish","Countess Sorrow","The Plasmother","The Handmaiden","The Imperor","Massacre","Tiquandas Revenge"}

function onTime(interval, lastExecution, thinkInterval)
	
	for _, monster in ipairs(config) do
		doRemoveCreature(getCreatureByName(monster))
	end
	return true
end
 
LUA:
local config = {"Ghazbaran","Morgaroth","Zulazza the Corruptor","Ferumbras","Orshabaal","Brutus Bloodbeard","Deadeye Devious","Lethal Lissy","Ron the Ripper","The Horned Fox","Demodras","Necropharus","The Old Widow","Sir Valorcrest","Zevelong Duskbringer","Diblis The Fair","Arachir the Ancient One","Dracola","Mr. Punish","Countess Sorrow","The Plasmother","The Handmaiden","The Imperor","Massacre","Tiquandas Revenge"}

function onThink(interval, lastExecution, thinkInterval)
	for i = 1, #config do
		if(getCreatureByName(config[i])) then
			return doRemoveCreature(getCreatureByName(config[i]))
			end
		end
	return true
end
 
Back
Top