TenTypSwir
NNSTORY.EU Developer
- Joined
- Jun 8, 2010
- Messages
- 1,657
- Reaction score
- 117
Witam mam skrypt na Oracle ale taki u kt?rego trzeba wybra? profesj?...A potrzebny mi bez jej wyboru Wi?c prosz? o pomoc...
<npc name="Oracle" script="data/npc/scripts/oraacle.lua" walkinterval="90000" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="1448" corpse="2212"/>
<parameters>
</parameters>
</npc>
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
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
-- OTServ event handling functions end
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'enigma city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Czy jestes pewien ze chcesz plynac do enigma city?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=1000, y=1000, z=7} })
local travelNode = keywordHandler:addKeyword({'Serella'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Czy jestes pewien ze chcesz plynac do Serella?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=1500, y=1500, z=7} })
local travelNode = keywordHandler:addKeyword({'Mavena'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Czy jestes pewien ze chcesz plynac do Mavena?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=1300, y=1000, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Nastepnym razem sie zastanow'})
keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Moge zabrac do \'Enigma City\' \'Serella\' oraz \'Mavena\' jesli tylko tego zapragniesz.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())