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

Delete npc tfs 1.2

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi folks! How I can delete a NPC without check his position? Has a function in TFS 1.2 for this? Game.removeNpc("NpcName"), something like this.

Thanks.
 
the only function that I could find about npcs is:
Game.getNpcCount()
Description:
Find the total amount of npcs on the server.
Parameters: None
Returns: Total amount of npcs on the server.
Example:

print(Game.getNpcCount())

to remove the npcs you can make a big Game.getSpectator and make:
Code:
if spectator:isNpc() then
     local name = spectator:getName():lower()
     if isInArray(Npcs, name) then
         spectator:remove()
     end
end
of course you need to create a table with the npc names
edit: I'm not sure that the function Game.getSpectator get npcs too
 
Back
Top