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

NPC question

So How I can make this with tp

Code:
doTeleportThing(cid, parameters.travel)

local node5 = keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to travel the NAME for 5000 gold coins?'})
	node5:addChildKeyword({'yes'}, travel, {travel = {x=230, y=561, z=5}})
	node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'You should think it over once more.'})
but I get error
Code:
[12/02/2009 20:25:56] Lua Script Error: [Npc interface] 
[12/02/2009 20:25:56] data/npc/scripts/aa.lua:onCreatureSay

[12/02/2009 20:25:56] data/npc/scripts/aa.lua:14: attempt to index global 'parameters' (a nil value)
[12/02/2009 20:25:56] stack traceback:
[12/02/2009 20:25:56] 	data/npc/scripts/aa.lua:14: in function 'callback'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/npchandler.lua:322: in function 'greet'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/npchandler.lua:490: in function 'onGreet'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/modules.lua:217: in function 'callback'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
[12/02/2009 20:25:56] 	data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'
[12/02/2009 20:25:56] 	data/npc/scripts/aa.lua:7: in function <data/npc/scripts/aa.lua:7>
 
Use this script as base, when u say hi the NPC summons monsters(Rl Tibia OrcFrotress Quest)

PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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 greetCallback(cid)
	if getPlayerStorageValue(cid,3058) == 1 then
		selfSay('Arrrrgh! A dirty paleskin! Kill them my guards!', cid)
		pos = getCreaturePosition(getNpcCid())

		local northEast = {x=pos.x+1,y=pos.y-1,z=pos.z}
		local northWest = {x=pos.x-1,y=pos.y-1,z=pos.z}
		local southEast = {x=pos.x+1,y=pos.y+1,z=pos.z}
		local southWest = {x=pos.x-1,y=pos.y+1,z=pos.z}
		local East = {x=pos.x+1,y=pos.y,z=pos.z}
		local West = {x=pos.x-1,y=pos.y,z=pos.z}
		local South = {x=pos.x,y=pos.y+1,z=pos.z}
		local North = {x=pos.x,y=pos.y-1,z=pos.z}

		doSummonCreature('Orc Warlord', northWest)
		doSummonCreature('Orc Warlord', West)
		doSummonCreature('Orc Leader', southWest)
		doSummonCreature('Orc Leader', South)
		doSummonCreature('Orc Leader', southEast)
		doSummonCreature('Slime', East)
		doSummonCreature('Slime', northEast)
		doSummonCreature('Slime', North)
		setPlayerStorageValue(cid,3058,1)
     end
end
 
-- Set the greeting callback function
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top