NPCs walk and I dont want to trap it in a corner on my map or something that just ruins it
if(isPlayerPremiumCallback(cid) or not(parameters.premium)) then
if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid)
elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
npcHandler:say('You do not have enough money!', cid)
elseif(isPlayerPzLocked(cid) ~= FALSE then
npcHandler:say('Lose those bloodstains first!', cid)
else
doTeleportThing(cid, parameters.destination, 0)
doSendMagicEffect(parameters.destination, 10)
end
else
npcHandler:say('I can only allow premium players to travel with me.', cid)
end
if(isPlayerPremiumCallback(cid) or not(parameters.premium)) then
if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid)
elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
npcHandler:say('You do not have enough money!', cid)
elseif(isPlayerPzLocked(cid) ~= FALSE then
npcHandler:say('Lose those bloodstains first!', cid)
else
doTeleportThing(cid, parameters.destination, 0)
doSendMagicEffect(parameters.destination, 10)
end
else
npcHandler:say('I can only allow premium players to travel with me.', cid)
end
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
npcHandler:setMessage(MESSAGE_GREET, 'Hello |PLAYERNAME|. I can take You to Hell City')
function onSay2(cid, words, param)
if (getPlayerSkullType(cid) == 0) then
if(doPlayerRemoveMoney(cid, 10000) == TRUE)then
doTeleportThing(cid, {x = 1262, y = 767, z = 7, stackpos = 1}, TRUE)
else
selfSay('Sorry, you dont have enought money.', cid)
end
else
selfSay('Sorry, first get rid of that skull.', cid)
end
end
local node1 = keywordHandler:addKeyword({'hell city'}, onSay2, {})
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())