Ir para conteúdo
  • 0

lokodurst

Pergunta

3 respostass a esta questão

Posts Recomendados

  • 0

Eremo.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Eremo" script="data/npc/scripts/blessnpc.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="130" head="0" body="109" legs="128" feet="95" addons="0"/>
<voices>
<voice text="Passages to Kazordoon! Gotta try the beer there." interval2="120" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="amulet of loss;help;offer;" />
		<parameter key="shop_buyable" value="amulet of loss,2173,10000;protection amulet,2200,700;"/>
		<parameter key="shop_sellable" value="amulet of loss,2173,1000;broken amulet amulet,2196,1000;"/>
        <parameter key="keyword_reply1" value="I've collected quite a few protection amulets, and some amulets of loss as well. Also, I'm interested in buying broken amulets."/>
		<parameter key="keyword_reply2" value="I can bless you with The {Wisdom} {of} {Solitude}" />
		<parameter key="keyword_reply3" value="I can bless you with The {Wisdom} {of} {Solitude}" />
        <parameter key="message_greet" value="Welcome to my little garden, adventurer |PLAYERNAME|!"/>
        <parameter key="message_farewell" value="Shouldn't I teleport you back to Pemaret?"/>
		<parameter key="message_walkaway" value="Shouldn't I teleport you back to Pemaret?" />
</parameters>
</npc>

blessnpc.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

local node1 = keywordHandler:addKeyword({'first bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first blessing for 2000 (plus level depending amount) gold?'})
	node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 1, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node2 = keywordHandler:addKeyword({'second bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the second blessing for 2000 (plus level depending amount) gold?'})
	node2:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 2, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node3 = keywordHandler:addKeyword({'third bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the third blessing for 2000 (plus level depending amount) gold?'})
	node3:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 3, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120})
	node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node4 = keywordHandler:addKeyword({'fourth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fourth blessing for 2000 (plus level depending amount) gold?'})
	node4:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 4, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120})
	node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node5 = keywordHandler:addKeyword({'fifth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fifth blessing for 2000 (plus level depending amount) gold?'})
	node5:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 5, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120})
	node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

npcHandler:addModule(FocusModule:new())


Para comprar bless é:

first bless

second bless

third bless

fourth bless

fifth bless

 

Ou então você muda...

Editado por AnneMotta
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...