What's new

TFS 0.3.6/ domki/oracle/po smierci

Status
Not open for further replies.

Evodown

User
Joined
Dec 15, 2010
Messages
18
Reaction score
0
Siemka wszystkim:D Mam 3 gnebiace mnie problemy ;/ Mam server forgooten pod 8.54 i mam normalnie konto GoD-a itd...

I: Zwykli gracze nie mog? kupi? domkow;/ lvl do posiadania domkow jest od 1 a maja po 50 ;/ i maja pacc i jak pisza przed drzwiami domku !buyhouse czy tam !buyhause to nic sie nie dzieje;/ a domek dziala bo jak klika sie na drzwi to pisze ze to domek taki i taki ze jest za tyle i nikt w nim nie mieszka;/ Jak wbijam na GM to wchodze do domku i pisze aleta grav i nic tylko dymek mi sie robi i nic sie niedzieje;/ a jaka jest komenda zeby gm przepisac na kogos domek?? a jak pisze aleta som i aleta sio i wpisuje nick gracza to i tak nic nie moze z domkiem zrobic;/...prosze o pomoc;(

II: Mam main i rook :D rook normalnie do 8lvl, idzie noob char do npc oracle zeby wyjsc z rooka :D i pisze na jakie miasto profa itd niby wszystko all dobrze wysyla go na dane miasto ale gdy postac umrze to pojawia sie w temple znow rook:confused:...oco chodzi??:(

II: aha pytanie 3 zostalo umieszczone w pytaniu 2 :D:D
 

Deyvv

Active User
Joined
Nov 3, 2010
Messages
69
Reaction score
8
Odp: TFS 0.3.6/ domki/oracle/po smierci

II. Nie zmienia si? temple, tylko teleportuje zwyczajnie. Podaj skrypt npc to mo?e Ci to zrobi?.
 

Evodown

User
Joined
Dec 15, 2010
Messages
18
Reaction score
0
Odp: TFS 0.3.6/ domki/oracle/po smierci

II. Nie zmienia si? temple, tylko teleportuje zwyczajnie. Podaj skrypt npc to mo?e Ci to zrobi?.
Tu masz skrypt npc "The Oracle"


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
function oracle(cid, message, keywords, parameters, node)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	local cityNode = node:getParent():getParent()
	local vocNode = node:getParent()
	local destination = cityNode:getParameters().destination
	local town = cityNode:getParameters().town
	local vocation = vocNode:getParameters().vocation
	if(destination ~= nil and vocation ~= nil and town ~= nil) then
		if(getPlayerLevel(cid) < parameters.level) then
			npcHandler:say('You must first reach level ' .. parameters.level .. '!', cid)
			npcHandler:resetNpc()
		else
			if(getPlayerVocation(cid) > 0) then
				npcHandler:say('Sorry, You already have a vocation!')
				npcHandler:resetNpc()
			else
				doPlayerSetVocation(cid, vocation)
				doPlayerSetTown(cid, town)
				npcHandler:resetNpc()
				local tmp = getCreaturePosition(cid)
				doTeleportThing(cid, destination)
				doSendMagicEffect(tmp, CONST_ME_POFF)
				doSendMagicEffect(destination, CONST_ME_TELEPORT)
			end
		end
	end
	return true
end
function greetCallback(cid)
	if(getPlayerLevel(cid) < 40) then
		npcHandler:say('COME BACK WHEN YOU GROW UP, CHILD!')
		return false
	else
		return true
	end
end
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setMessage(MESSAGE_GREET, 'Hello |PLAYERNAME|. Are you prepared to face your destiny?')
local yesNode = KeywordNode:new({'yes'}, oracle, {level = 40})
local noNode = KeywordNode:new({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then what vocation do you want to become?'})
local node1 = keywordHandler:addKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'What city do you wish to live in? {Rhyves}, {Varak} or {Jorvik}?'})
	local node2 = node1:addChildKeyword({'varak'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=242, y=429, z=12}, text = 'Varak, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
		local node3 = node2:addChildKeyword({'sorcerer'}, StdModule.say, {npcHandler = npcHandler, vocation = 1, onlyFocus = true, text = 'So, you wish to be a powerful magician? Are you sure about that? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'druid'}, StdModule.say, {npcHandler = npcHandler, vocation = 2, onlyFocus = true, text = 'Are you sure that a druid is what you wish to become? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'paladin'}, StdModule.say, {npcHandler = npcHandler, vocation = 3, onlyFocus = true, text = 'A ranged marksman. Are you sure? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'knight'}, StdModule.say, {npcHandler = npcHandler, vocation = 4, onlyFocus = true, text = 'A mighty warrior. Is that your final decision? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
	node2 = node1:addChildKeyword({'rhyves'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=159, y=387, z=6}, text = 'Rhyves, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
		node3 = node2:addChildKeyword({'sorcerer'}, StdModule.say, {npcHandler = npcHandler, vocation = 1, onlyFocus = true, text = 'So, you wish to be a powerful magician? Are you sure about that? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'druid'}, StdModule.say, {npcHandler = npcHandler, vocation = 2, onlyFocus = true, text = 'Are you sure that a druid is what you wish to become? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'paladin'}, StdModule.say, {npcHandler = npcHandler, vocation = 3, onlyFocus = true, text = 'A ranged marksman. Are you sure? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'knight'}, StdModule.say, {npcHandler = npcHandler, vocation = 4, onlyFocus = true, text = 'A mighty warrior. Is that your final decision? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
	node2 = node1:addChildKeyword({'jorvik'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=469, y=172, z=7}, text = 'Jorvik, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
		node3 = node2:addChildKeyword({'sorcerer'}, StdModule.say, {npcHandler = npcHandler, vocation = 1, onlyFocus = true, text = 'So, you wish to be a powerful magician? Are you sure about that? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'druid'}, StdModule.say, {npcHandler = npcHandler, vocation = 2, onlyFocus = true, text = 'Are you sure that a druid is what you wish to become? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'paladin'}, StdModule.say, {npcHandler = npcHandler, vocation = 3, onlyFocus = true, text = 'A ranged marksman. Are you sure? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
		node3 = node2:addChildKeyword({'knight'}, StdModule.say, {npcHandler = npcHandler, vocation = 4, onlyFocus = true, text = 'A mighty warrior. Is that your final decision? This decision is irreversible!'})
			node3:addChildKeywordNode(yesNode)
			node3:addChildKeywordNode(noNode)
keywordHandler:addKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Then come back when you are ready.'})
npcHandler:addModule(FocusModule:new())

Notka moderatorska:
Dodano code.
 
Last edited by a moderator:

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: TFS 0.3.6/ domki/oracle/po smierci

PHP:
local node2 = node1:addChildKeyword({'varak'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, town = 1, destination = {x=242, y=429, z=12}, text = 'Varak, eh? So what vocation do you wish to become? {Sorcerer}, {druid}, {paladin} or {knight}?'})
Zmienna 'town'. Wsz?dzie masz 1 czyli id miasta rookgard, pozmieniaj na takie jakie posiadaj? Twoje miasta i b?dzie dzia?a?.
 

Evodown

User
Joined
Dec 15, 2010
Messages
18
Reaction score
0
Odp: TFS 0.3.6/ domki/oracle/po smierci

Wielkie dzieki:D teraz dziala:D a wie ktos moze dlaczego domkow nie mozna kupic i nie moge ich nawet GM-em ich przpisac?? I jak zrobic nowy domek? tzn robie nowy domek wchodze w hause pallet i zaznaczam go jako nowy i zaznaczam ten znaczek przed drzwiami , ale jak loguje na server i klikam na drzwi to nie pisze ze to taki i taki domek i kosztuje tyle i tyle tylko poprostu mi pokazuje ze to sa drzwi;/
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: TFS 0.3.6/ domki/oracle/po smierci

Map? zapisa?e?? Sprawd? w data/world sw?j house. Zaloguj si? jeszcze GODem i otw?rz i zamknij drzwi i wtedy kliknij "look".
 

Evodown

User
Joined
Dec 15, 2010
Messages
18
Reaction score
0
Odp: TFS 0.3.6/ domki/oracle/po smierci

nie dziala;/ lol a czemu nawet nie moge kupic tych domkow co byly juz na ots ani GoDem ich przepisac na kogos;/
 

Idk

Senior User
Joined
Aug 5, 2009
Messages
546
Reaction score
68
Age
29
Odp: TFS 0.3.6/ domki/oracle/po smierci

Bo jeste? ?ep i nie umiesz sobie sprawdzi? talkactions...-.-


Fragment talkactions.xml
PHP:
<talkaction words="alana res" filter="word-spaced" event="function" value="houseBuy"/>
 
Status
Not open for further replies.
Top