Landera
Veteran OT User
- Joined
- Nov 24, 2011
- Messages
- 905
- Solutions
- 1
- Reaction score
- 318
Hello guys,
I'd tried creating an reverse oracle npc basically, and came up with some kind of base. But no clue how to get this into a working script.
I'm using TFS 1.5 772 downgrade by nekiro
I'd tried creating an reverse oracle npc basically, and came up with some kind of base. But no clue how to get this into a working script.
Lua:
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
if msgcontains(msg, 'rookgaard') then
npcHandler:say('Hmmm. Long time I visited that isle. Not very exciting place. Why do you ask? Do you wish to go there?')
talk_state = 3
elseif msgcontains(msg, 'yes') and talk_state == 3 then
npcHandler:say('Careful, careful, it\'s a one-way ticket only! You can never come back here if you leave now, and you will lose all your equipment and products!?')
talk_state = 4
elseif msgcontains(msg, 'no') and talk_state == 3 then
npcHandler:say('A wise decision. It\'s much better here, believe me. Been there, done that.')
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 4 then
npcHandler:say('Then so be it. I\'m sorry to see you go, but if this is what you want, step this way... right. Now, cover your eyes... GO!')
doPlayerSetVocation(cid, 0)
doPlayerSetTown(cid, 1)
doPlayerSetMagicLevel(cid, 0)
doPlayerSetSkillLevel(cid, SKILL_SHIELD, 10)
doPlayerSetSkillLevel(cid, SKILL_DISTANCE, 10)
doPlayerSetSkillLevel(cid, SKILL_AXE, 10)
doPlayerSetSkillLevel(cid, SKILL_SWORD, 10)
doPlayerSetSkillLevel(cid, SKILL_CLUB, 10)
player:removeExperience(player:getExperience() - getExpForLevel(1), false)
player:setMaxHealth(150)
player:setMaxMana(55)
player:addHealth(player:getMaxHealth())
player:addMana(player:getMaxMana())
player:setCapacity(400)
doTeleportThing(cid, {x=32097,y=32219,z=7})
doSendMagicEffect(destination, CONST_ME_MAGIC_BLUE)
local slots = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
for _, slot in pairs(slots) do
local item = player:getSlotItem(slot)
if item then
item:remove()
end
end
doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(bag,2650,1)
doAddContainerItem(bag,2382,1)
doAddContainerItem(bag,2674,1)
end
npcHandler:addModule(FocusModule:new())
I'm using TFS 1.5 772 downgrade by nekiro