kurczok666
New Member
- Joined
- Nov 23, 2008
- Messages
- 64
- Reaction score
- 1
Mam taki problem chciałem zrobić NPC na Dywan żeby teleportował graczy jednak Gdy mi odpowiada mi
gdy wpisuje travel żeby zobaczyć gdzie mogę lecieć pisze
i na tym się kończy gdy wpisuje któreś z miast NPC nie reaguje
boat.xml
boat.lua
Mam silnik tfs 0.3.2 Crying Damson
Nie wywala żadnych błędów ale nie działa
Code:
"Witaj Tester. Gdzie chcesz leciec?(travel)."
Code:
"Moge zabrac cie do miasta 1, miasta 2 i miasta 3."
boat.xml
Code:
<npc name="boat" script="data/npc/scripts/boat.lua" walkinterval="2000" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="130" head="132" body="116" legs="116" feet="76" corpse="2212"/>
<parameters>
<parameter key="message_greet" value="Witaj |PLAYERNAME|. Gdzie chcesz leciec?(travel)." />
<parameter key="message_needmoremoney" value="Nie stac Cie na to." />
<parameter key="message_decline" value="|TOTALCOST| czy to zbyt wiele dla Ciebie?" />
</parameters>
</npc>
boat.lua
Code:
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
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Moge zabrac cie do miasta 1, miasta 2 i miasta 3.'})
local travelNode = keywordHandler:addKeyword({'miasta 1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Czy chcesz plynac do miasta 1 za 200 gp ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=366, y=458, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Wroc gdy bedziesz chcial plynac.'})
local travelNode = keywordHandler:addKeyword({'miasta 2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Czy chcesz plynac do miasta 2 za 200 gp ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=913, y=367, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Wroc gdy bedziesz chcial plynac?'})
local travelNode = keywordHandler:addKeyword({'miasta 3'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Czy chcesz plynac do miasta 3 za 200 gp ?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 200, destination = {x=925, y=1034, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Wroc gdy bedziesz chcial plynac?'})
npcHandler:addModule(FocusModule:new())
Mam silnik tfs 0.3.2 Crying Damson
Nie wywala żadnych błędów ale nie działa