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

RL NPC Help plz

Sexy Vampire

New Member
Joined
Jan 11, 2010
Messages
71
Reaction score
0
i have bulets rl npc and some not working
heres my error's

Code:
[20/01/2010 14:25:23] [Notice - Npc::Npc] NPC Name: Soft Boots - autowalk has been deprecated, use walkinterval.
[20/01/2010 14:25:23] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/inresponsive.lua: No such file or directory
[20/01/2010 14:25:23] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/inresponsive.lua
[20/01/2010 14:25:23] cannot open data/npc/scripts/inresponsive.lua: No such file or directory
[20/01/2010 14:25:23] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/bpruneshop.lua: No such file or directory
[20/01/2010 14:25:23] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bpruneshop.lua
[20/01/2010 14:25:23] cannot open data/npc/scripts/bpruneshop.lua: No such file or directory
[20/01/2010 14:25:23] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/addons/jester.lua: No such file or directory
[20/01/2010 14:25:23] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/addons/jester.lua
[20/01/2010 14:25:23] cannot open data/npc/scripts/addons/jester.lua: No such file or directory
[20/01/2010 14:25:23] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/addons/sam.lua: No such file or directory
[20/01/2010 14:25:23] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/addons/sam.lua
[20/01/2010 14:25:23] cannot open data/npc/scripts/addons/sam.lua: No such file or directory
[20/01/2010 14:25:23] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/addons/citizen2.lua: No such file or directory
[20/01/2010 14:25:23] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/addons/citizen2.lua
[20/01/2010 14:25:23] cannot open data/npc/scripts/addons/citizen2.lua: No such file or directory
[20/01/2010 14:25:23] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/bpruneshop.lua: No such file or directory
[20/01/2010 14:25:23] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bpruneshop.lua
[20/01/2010 14:25:23] cannot open data/npc/scripts/bpruneshop.lua: No such file or directory
[20/01/2010 14:25:24] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/addons/hunter.lua: No such file or directory
[20/01/2010 14:25:24] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/addons/hunter.lua
[20/01/2010 14:25:24] cannot open data/npc/scripts/addons/hunter.lua: No such file or directory
[20/01/2010 14:25:24] [Error - LuaScriptInterface::loadFile] cannot open data/npc/scripts/healer.lua: No such file or directory
[20/01/2010 14:25:24] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/healer.lua
[20/01/2010 14:25:24] cannot open data/npc/scripts/healer.lua:

can some one help me make scripts i need or point me to where i can get the npcs with no errors or bugs
ty in advance
 
You just don't have the script file for every npc.

You can't just add the .xml files, be sure to add the scripts in npc/scripts as well in order for them to work correctly.
 
cannot open data/npc/scripts/addons/hunter.lua
Aldo.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Aldo" script="[B]bootmaker.lua[/B]" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="128" head="17" body="54" legs="114" feet="0" addons="2"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|, I am a bootmaker."/>
	</parameters>
</npc>

and in your Npc's/Scripts (sub-folder)

you'll have
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)			npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)			npcHandler:onCreatureSay(cid, type, msg)		end
function onThink()					npcHandler:onThink()					end

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end

	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

	if(msgcontains(msg, 'soft') or msgcontains(msg, 'boots')) then
		selfSay('Do you want to repair your worn soft boots for 10000 gold coins?', cid)
		talkState[talkUser] = 1
	elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
		if(getPlayerItemCount(cid, 6530) >= 1) then
			if(doPlayerRemoveMoney(cid, 10000)) then
				local item = getPlayerItemById(cid, true, 6530)
				doTransformItem(item.uid, 6132)
				selfSay('Here you are.', cid)
			else
				selfSay('Sorry, you don\'t have enough gold.', cid)
			end
		elseif(getPlayerItemCount(cid, 10021) >= 1) then
			if(doPlayerRemoveMoney(cid, 10000)) then
				local item = getPlayerItemById(cid, true, 10021)
				doTransformItem(item.uid, 6132)
				selfSay('Here you are.', cid)
			else
				selfSay('Sorry, you don\'t have enough gold.', cid)
			end
		else
			selfSay('Sorry, you don\'t have the item.', cid)
		end
		talkState[talkUser] = 0
	elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then
		talkState[talkUser] = 0
		selfSay('Ok then.', cid)
	end

	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
They need to be named the right thing. As the guy posted up here , you need the
Code:
script="nameofscript.lua"
in the xml file.
 
Back
Top