Kapitan i tabliczka z ktorej jest napis rep++

Status
Zamknięty.

Cgf

Advanced User
Zarejestrowany
Dołączył
Sierpień 17, 2009
Posty
334
Liczba reakcji
8
Witam mam problem z kapitanem Blubar.. Jest to kapitan na statku thais.
Skrypt:

Kod:
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({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Carlin for 110 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 110, destination = {x=32387, y=31820, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'ab\'dendriel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Ab\'dendriel for 130 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 130, destination = {x=32734, y=31668, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Venore for 170 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 170, destination = {x=32952, y=32022, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Edron for 160 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 160, destination = {x=33173, y=31764, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Port Hope for 160 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 160, destination = {x=32527, y=32784, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'svargrond'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Svargrond for 180 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 180, destination = {x=32431, y=31162, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'liberty bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Liberty Bay for 180 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 180, destination = {x=32285, y=32892, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Darashia for 100 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=33289, y=32480, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
        keywordHandler:addKeyword({'passage'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Ab\'dendriel, Darashia, Venore, Ankrahmun, Port Hope, Thais, Liberty Bay, Carlin and Yalahar'})
        keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I am the captain of this ship.'})
        keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Carlin, Ab\'dendriel, Darashia, Venore, Ankrahmun, Port Hope, Thais, Liberty Bay, Carlin and Yalahar.'})
-- Makes sure the npc reacts when you say hi, bye etc.
        npcHandler:addModule(FocusModule:new())
I tu si? pojawia problem jak zrobi?,?e jak napisz? do niego hi to b?dzie pisa? na jakie wyspy mo?e nas zabra??
I drugie pytanie mam kilka wysp,kt?re chc? doda? i jak dodaje on nie dzia?a ;/
Nazwa i pozycja wysp:
-Zuggachi Isle Position: [X: 32147] [Y: 32616] [Z: 6].
-Pyre Position: [X: 32681] [Y: 32649] [Z: 6].
-Oken Position: [X: 23137] [Y: 19101] [Z: 6].
-Goroma Position: [X: 31994] [Y: 32564] [Z: 6].
-Ethno City Position: [X: 32049] [Y: 31974] [Z: 6].
-Gengia Position: [X: 32071] [Y: 32182] [Z: 6].
-Nastor Position: [X: 31981] [Y: 32420] [Z: 6].
Galaxy (PVP Arena.) Position: [X: 31585] [Y: 31821] [Z: 5].
Zao Position: [X: 33256] [Y: 31075] [Z: 7].

Oczywi?cie b?dzie reput. Ostatnie moje pytanie jak zrobi? tabliczk? z kt?rej b?dzie wychodzi? napis np. Trainers?
 
Odp: Kapitan i tabliczka z ktorej jest napis rep++

PHP:
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({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Carlin for 110 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 110, destination = {x=32387, y=31820, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'ab\'dendriel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Ab\'dendriel for 130 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 130, destination = {x=32734, y=31668, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Venore for 170 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 170, destination = {x=32952, y=32022, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Edron for 160 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 160, destination = {x=33173, y=31764, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Port Hope for 160 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 160, destination = {x=32527, y=32784, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'svargrond'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Svargrond for 180 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 180, destination = {x=32431, y=31162, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'liberty bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Liberty Bay for 180 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 180, destination = {x=32285, y=32892, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Darashia for 100 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 100, destination = {x=33289, y=32480, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	[COLOR="Lime"]local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
	local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
        	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
        	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})[/COLOR]
        keywordHandler:addKeyword({'passage'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Ab\'dendriel, Darashia, Venore, Ankrahmun, Port Hope, Thais, Liberty Bay, Carlin and Yalahar'})
        keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I am the captain of this ship.'})
        keywordHandler:addKeyword({'hi'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = '[COLOR="Red"]I can take you to Carlin, Ab\'dendriel, Darashia, Venore, Ankrahmun, Port Hope, Thais, Liberty Bay, Carlin and Yalahar.[/COLOR]'})
-- Makes sure the npc reacts when you say hi, bye etc.
        npcHandler:addModule(FocusModule:new())

Tam gdzie jest tym zaznaczone zmien se to all i bedzie chodzic -.^

Ps. Ups nie dalo koloru lecz tam pisze [color lime to to usun i tam zmien se i [/color] :PP


Regards,
Shadok
 
Odp: Kapitan i tabliczka z ktorej jest napis rep++

No to wyt?umaczy?e?... Jak kto? si? w og?le nie zna to nei wie o co chodzi ;* I jak by? zauwa?y? ja chc?, ?eby to zosta?o co jest a nie zamienia?,a to co poda?em chc? doda?.. Jak nie wiesz to po co piszesz i nabijasz posty?
 
Ostatnia edycja:
Odp: Kapitan i tabliczka z ktorej jest napis rep++

3#
http://tibia.net.pl/globalevents/104369-7-92-kolorowe-napisy-nad-roznymi-rzeczami.html

2#

Po
local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=615, y=672, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})


Dodajesz
local travelNode = keywordHandler:addKeyword({'nazwa wyspy z malej litery!'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=posx, y=posy, z=posz} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})


1#
Nie pomog? ci z tym poniewa? nie potrafi?. (osobi?cie s?dz? ?e ten ca?y nowy system npc jest jako? kiepski)
 
Ostatnia edycja:
Odp: Kapitan i tabliczka z ktorej jest napis rep++

1. Podmien Captain Bluebear.xml na
PHP:
<npc name="Captain Bluebear" script="script.lua" walkinterval="0" floorchange="0">
	<health now="150" max="150"/>
<look type="129" head="60" body="113" legs="95" feet="115" addons="0"/>
	<parameters>
		<parameter key="message_greet" value="Welcome on board, |PLAYERNAME|. I can travel with you to : {Yalahar}, {Carlin}, {Ab'dendriel}, {Thais}, {Venore}, {Darashia}, {Ankrahmun}, {Edron}, {Port Hope}, {Liberty Bay}, {Goroma}, {Svargrond}, {Cormaya}, {Pyre}, {Oken}, {Gengia}. So?" />
		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="travel" />
		<parameter key="keyword_reply1" value="I can travel with you to : {Yalahar}, {Carlin}, {Ab'dendriel}, {Thais}, {Venore}, {Darashia}, {Ankrahmun}, {Edron}, {Port Hope}, {Liberty Bay}, {Goroma}, {Svargrond}, {Cormaya}, {Pyre}, {Oken}, {Gengia}. So?" />
	</parameters>
</npc>
tylko zmien sobie miasta jakie ma wypisywac
 
Odp: Kapitan i tabliczka z ktorej jest napis rep++

3#
http://tibia.net.pl/globalevents/104369-7-92-kolorowe-napisy-nad-roznymi-rzeczami.html
2#
Po
Dodajesz
local travelNode = keywordHandler:addKeyword({'nazwa wyspy z malej litery!'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to sail to Yalahar for 200 gold coins?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 200, destination = {x=posx, y=posy, z=posz} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
1#
Nie pomog? ci z tym poniewa? nie potrafi?. (osobi?cie s?dz? ?e ten ca?y nowy system npc jest jako? kiepski)
Co do tych kolorowych napis?w nie do ko?ca mi o to chodzi?o. Chc? aby nad skrzynk? questow? pisa?o np 50lvl i zmienia?o to kolory....
 
Odp: Kapitan i tabliczka z ktorej jest napis rep++

1. Podmien Captain Bluebear.xml na
PHP:
<npc name="Captain Bluebear" script="script.lua" walkinterval="0" floorchange="0">
	<health now="150" max="150"/>
<look type="129" head="60" body="113" legs="95" feet="115" addons="0"/>
	<parameters>
		<parameter key="message_greet" value="Welcome on board, |PLAYERNAME|. I can travel with you to : {Yalahar}, {Carlin}, {Ab'dendriel}, {Thais}, {Venore}, {Darashia}, {Ankrahmun}, {Edron}, {Port Hope}, {Liberty Bay}, {Goroma}, {Svargrond}, {Cormaya}, {Pyre}, {Oken}, {Gengia}. So?" />
		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="travel" />
		<parameter key="keyword_reply1" value="I can travel with you to : {Yalahar}, {Carlin}, {Ab'dendriel}, {Thais}, {Venore}, {Darashia}, {Ankrahmun}, {Edron}, {Port Hope}, {Liberty Bay}, {Goroma}, {Svargrond}, {Cormaya}, {Pyre}, {Oken}, {Gengia}. So?" />
	</parameters>
</npc>
tylko zmien sobie miasta jakie ma wypisywac
Da si? tak zrobi? zeby pisa? tylko w kanale npc? Nie na default?
 
Status
Zamknięty.
Back
Do góry