PilzAdam wrote:You shouldnt override the functions player_get_animations() and player_update_visuals() of the default minetest_game.
It causes that that players will get the same textures as your NPCs when the server doesnt use the player_textures mod.
jojoa1997 wrote:PilzAdam wrote:You shouldnt override the functions player_get_animations() and player_update_visuals() of the default minetest_game.
It causes that that players will get the same textures as your NPCs when the server doesnt use the player_textures mod.
ok then how should i change it
PilzAdam wrote:jojoa1997 wrote:PilzAdam wrote:You shouldnt override the functions player_get_animations() and player_update_visuals() of the default minetest_game.
It causes that that players will get the same textures as your NPCs when the server doesnt use the player_textures mod.
ok then how should i change it
Rename the functions or make the local.
--Spawn command
minetest.register_chatcommand("summonnpc", {
description = "spawns a npc",
privs = {peacefulnpc=true},
func = function(name, param)
local npcs_to_spawn = tonumber(param) or 1
local player = minetest.env:get_player_by_name(name)
local pos = player:getpos()
local MAX_SPAWN = 15
local active_npc_count = table.getn(minetest.env:get_objects_inside_radius(pos, 100))
if active_npc_count == nil then
active_npc_count = 0
for n = 1, npcs_to_spawn do
if active_npc_count <= MAX_SPAWN then
minetest.env:add_entity({x=pos.x+math.random(-1,1),y=pos.y+math.random(2,3),z=pos.z+math.random(-1,1)}, ("peaceful_npc:npc"))
else
if active_npc_count >= 15 then
minetest.chat_send_player(name, "The spawn limit is 15")
end
})playzooki wrote:21:29:03: INFO[main]: [peaceful_npc-master] ["C:\Users\me\Downloads\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\games\minetest_game\mods\peaceful_npc-master\init.lua"]
21:29:03: ERROR[main]: Error loading mod "peaceful_npc-master": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
21:29:03: ERROR[main]: Server: Failed to load and run C:\Users\me\Downloads\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\games\minetest_game\mods\peaceful_npc-master\init.lua
21:29:03: INFO[main]: BanManager: saving to C:\Users\me\Downloads\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\worlds\hi0.4.4\ipban.txt
21:29:03: ERROR[main]: ModError: Failed to load and run C:\Users\me\Downloads\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\games\minetest_game\mods\peaceful_npc-master\init.lua
21:29:03: INFO[main]: Searching worlds...
21:29:03: INFO[main]: In C:\Users\me\Downloads\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\worlds:
21:29:03: INFO[main]: hahalol hi0.4.4 I AM PUNCHING YOUR SALAD newwwww (invalid: skyblock_freestyle)
21:29:03: INFO[main]: 4 found.
21:29:03: INFO[main]: Waiting for other menus
21:29:03: INFO[main]: Waited for other menus
21:29:03: VERBOSE[main]: error_message = ModError: Failed to load and run C:\Users\me\Downloads\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\games\minetest_game\mods\peaceful_npc-master\init.lua
21:29:03: VERBOSE[main]: Check debug.txt for details.
playzooki wrote:WARNING: StaticObjectList::remove(): id=10 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=10 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=16 on inactive block (8,1,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=16 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=17 on inactive block (8,1,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=17 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=18 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=18 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=19 on inactive block (8,1,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=19 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=20 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=20 m_static_exists=true but static data doesn't actually exist in (6,1,2)
WARNING: StaticObjectList::remove(): id=20 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=20 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=21 on inactive block (8,1,3)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=21 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=23 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=23 m_static_exists=true but static data doesn't actually exist in (7,1,2)
WARNING: StaticObjectList::remove(): id=23 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=23 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=24 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=24 m_static_exists=true but static data doesn't actually exist in (7,1,2)
WARNING: StaticObjectList::remove(): id=24 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=24 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=25 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: INFO[main]: Client: avg_rtt=1.01687e-033
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=25 m_static_exists=true but static data doesn't actually exist in (7,1,2)
WARNING: StaticObjectList::remove(): id=25 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=25 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=26 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=26 m_static_exists=true but static data doesn't actually exist in (8,1,2)
WARNING: StaticObjectList::remove(): id=26 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=26 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=27 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=27 m_static_exists=true but static data doesn't actually exist in (8,1,2)
WARNING: StaticObjectList::remove(): id=27 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=27 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=29 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=29 m_static_exists=true but static data doesn't actually exist in (8,1,2)
WARNING: StaticObjectList::remove(): id=29 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=29 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=30 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=30 m_static_exists=true but static data doesn't actually exist in (7,2,3)
WARNING: StaticObjectList::remove(): id=30 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=30 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=33 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=33 m_static_exists=true but static data doesn't actually exist in (7,2,3)
WARNING: StaticObjectList::remove(): id=33 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=33 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=35 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=35 m_static_exists=true but static data doesn't actually exist in (7,1,2)
WARNING: StaticObjectList::remove(): id=35 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=35 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=36 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=36 m_static_exists=true but static data doesn't actually exist in (7,1,2)
WARNING: StaticObjectList::remove(): id=36 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=36 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=43 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=43 m_static_exists=true but static data doesn't actually exist in (8,1,2)
WARNING: StaticObjectList::remove(): id=43 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=43 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=44 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=44 m_static_exists=true but static data doesn't actually exist in (7,2,4)
WARNING: StaticObjectList::remove(): id=44 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=44 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=45 on inactive block (6,2,2)
21:54:33: VERBOSE[ServerThread]: LuaEntitySAO::getStaticData
21:54:33: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=45 m_static_exists=true but static data doesn't actually exist in (8,1,2)
WARNING: StaticObjectList::remove(): id=45 not found
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=45 is known by clients; not deleting yet
21:54:33: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=4
Thats what you get for spawning 99
markveidemanis wrote:make it so you can right click your NPC and configure it.
configuration:
sit or not sit
stand still/follow players/given player
turn to face player
attack/entities/player.given player
*wander*
follow a predefined path --speed
execute chat commands
talk? - say [X] at a certain time
if in chat, [Y] is mentioned, do [action from the above}
--all for now--

Likwid H-Craft wrote:Well if you taking a break...I will like to have mine Avatar.
Likwid (Really his name is)
jojoa1997 wrote:Likwid H-Craft wrote:Well if you taking a break...I will like to have mine Avatar.
Likwid (Really his name is)
Sure will add it when I get home. Could you give me 2-4 more textures so I could actually make a worthy update
Users browsing this forum: No registered users and 39 guests