Ir para conteúdo

[Npc] Seymour De Rookgaard


Posts Recomendados

Fala ae galera XTibiana!

 

Alguns de vocês devem saber que eu sou o criador do Tibia World RPG OldSchool Server e como eu ando fazendo MUITOS NPCs para o meu Servidor, resolvi liberar alguns dos meus NPCs mais fáceis de fazer e é claro que não vou postar um dificil como a The Queen of the Banshee NPC até porque não sou nenhum idiota ;)

 

Só para lembrar que todos os meus NPCs são baseados nos arquivos originais de NPC da Cipsoft!

 

Vamos parar de conversa e vamos aos Scripts:

 

Arquivo em que o NPC foi baseado (arquivo original da CipSoft):

# GIMUD - Graphical Interface Multi User Dungeon
# seymour.npc: Datenbank fuer den Schulleiter Seymour

Name = "Seymour"
Sex = male
Race = 1
Outfit = (128,115-69-87-116)
Home = [32103,32195,7]
Radius = 1
GoStrength = 5

Behaviour = {
ADDRESS,"hello",!        -> "Hello, %N. What do you need?"
ADDRESS,"hi",!           -> *
ADDRESS,!                -> Idle
BUSY,"hi$",!             -> "%N, I am already talking to somebody else! Please wait until it is your turn.", Queue
BUSY,"hello$",!          -> *
BUSY,!                   -> NOP
VANISH,!                 -> "Good bye! And remember: No running up and down in the academy!"

"bye"               -> "Good bye! And remember: No running up and down in the academy!", Idle
"farewell"          -> *
"how","are","you"   -> "Well, the king doesn't send troops anymore, the academy is dreadfully low on money, and the end of the world is pretty nigh. Apart from that I am reasonably fine, I suppose."
"sell"              -> "I sell the Key to Adventure for 5 gold! If you are interested, tell me that you want to buy the key."
"job"               -> "I am the master of this fine academy."
"academy"           -> "Our academy has a library, a training center in the cellars and the oracle upstairs." 
"library"           -> "Go and read our books. Ignorance may mean death, so be careful." 
"train"             -> "You can try some basic things down there, but don't challenge the monsters in our arena if you are inexperienced."
"center"            -> *
"cellar"            -> *
"oracle"             -> "You will find the oracle upstairs. Talk to the oracle as soon as you have made level 8. Choose a vocation and a new home town, and you will be sent off to the continent."
"vocation"          -> *

"key"                     -> Type=2969, Data=4600, Amount=1, Price=5, "Do you want to buy the Key to Adventure for %P gold coins?", Topic=1
Topic=1,"no"                    -> "As you wish." 
Topic=1,"yes",CountMoney>=Price -> "Here you are.", DeleteMoney, Create(Type)
Topic=1,"yes"                   -> "You don't have enough money."
Topic=1                         -> "Only nonsense on your mind, eh?"

"rookgaard"       -> "Here on Rookgaard we have some people, a temple, some shops, a farm and an academy."
"name"            -> "My name is Seymour, but to you I am 'Sir' Seymour."
"seymour"         -> * 
"sir"             -> "At least you know how to address a man of my importance." 
"time"            -> "It is %T, so you are late. Hurry!"
"help"            -> "I can assist you with my advice."
"hint"            -> *
"people"      -> "Well, there's me, Cipfried, Willie, Obi, Amber, Dallheim, Al Dee, Norma, and Hyacinth."
"advice"          -> "Read the blackboard for some hints and visit the training center in the cellar."
"monster"         -> "You can learn about Tibia's monsters in our library."
"dungeon",level<3 -> "There are some dungeons on this isle, but almost all of them are too dangerous for you at the moment."
"dungeon",level>2 -> "There are some dungeons on this isle. You should be strong enough to explore them now, but make sure to take a rope with you."
"sewer"           -> "Our sewers are overrun with rats. If you own some equipment you could go down a sewer grate and fight the vermin."
"god"             -> "You can learn much about Tibia's gods in our library."
"gamemaster"      -> "If you have serious problems with the game or with other people who are harassing you, contact a counsellor or a gamemaster using CTRL+R."
"counsellor"      -> *
"king"            -> "Hail to King Tibianus! Long live our king! Not that he cares for an old veteran who is stuck on this godforsaken island..."
"obi"             -> "A cousin of Thais' smith Sam. He has a shop here where you can buy most stuff an adventurer needs."
"cipfried"        -> "A humble monk with healing powers, and a pupil of the great Quentin himself."
"amber"           -> "A traveller from the main land. I wonder what brought her here, since no one comes here of his own free will."
"willie"          -> "Willie is a fine farmer, although he has short temper." 
"hyacinth"        -> "A mysterious druid who lives somewhere in the wilderness. He sells precious life fluids."
"dallheim"        -> "Oh good Dallheim! What a fighter he is! Without him we would be doomed."
"al","dee"        -> "He is a shop owner in the northwestern part of the village."
"quentin"         -> "He is responsible for the temple in Thais."
"life","fluid"    -> "A rare magic potion that restores health."
"fuck",male       -> "For this remark I will wash your mouth with soap, young man!", EffectOpp(8)
"fuck",female     -> "For this remark I will wash your mouth with soap, young lady!", EffectOpp(8)
"bug"             -> "Nasty little creatures, but once you have a suitable weapon and perhaps a shield they will be no match for you."
"weapon"          -> "You need fine weapons to fight the tougher beasts. Unfortunately only the most basic weapons and armor are available here. You will have to fight some monsters to get a better weapon."
"magic"           -> "The only magic-user on this isle is old Hyacinth."
"tibia"           -> "Oh, how I miss the crowded streets of Thais. I know one day I will get promoted and get a job at the castle... I must get out of here! The faster the better! It is people like you who are driving me mad." 
"castle"          -> "The castle of Thais is the greatest achievement in Tibian history."

"mission",level<4 -> "You are pretty inexperienced. I think killing rats is a suitable challenge for you. For each fresh rat I will give you two shiny coins of gold."
"quest",level<4   -> *
"mission",level>3 -> "Well I would like to send our king a little present, but I do not have a suitable box. If you find a nice box, please bring it to me." 
"quest",level>3   -> *

"rat"                                     -> Type=3994, Amount=1,  Price=2,    "Have you brought a dead rat to me to pick up your reward?", Topic=2
%1,1<%1,"rat"                             -> Type=3994, Amount=%1, Price=2*%1, "Have you brought %A dead rats to me to pick up your reward?", Topic=2
Topic=2,"yes",Count(Type)>=Amount -> "Thank you! Here is your reward.", Delete(Type), CreateMoney
Topic=2,"yes"                             -> "HEY! You don't have one! Stop playing tricks on fooling me or I will give you some extra work!"
Topic=2,"yes",Amount>1                    -> "HEY! You do not have so many!"
Topic=2                                   -> "Go and find some rats to kill!"

"box"                                     -> Type=2856, Amount=1, "Do you have a suitable present box for me?", Topic=3
Topic=3,"yes",Count(Type)>=Amount -> "THANK YOU! Here is a helmet that will serve you well.", Delete(Type), Create(3374) 
Topic=3,"yes"                             -> "HEY! You don't have one! Stop playing tricks on me or I will give some extra work!"
Topic=3                                   -> *
}

 

Seymour.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Seymour" script="seymour.lua" walkinterval="1000" access="3" floorchange="0">
   <health now="100" max="100"/>
   <look type="128" head="115" body="69" legs="87" feet="116" addons="0"/>
   <parameters>

       <parameter key="message_greet" value="Hello, |PLAYERNAME|. What do you need?" /> 
	<parameter key="message_placedinqueue" value="|PLAYERNAME|, I am already talking to somebody else! Please wait until it is your turn." />
	<parameter key="message_farewell" value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!" /> 
	<parameter key="message_walkaway" value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!" /> 
	<parameter key="message_idletimeout" value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!" />
       <parameter key="message_buy" value="Have you brought a dead rat to me to pick up your reward?" />
	<parameter key="message_onsell" value="Thank you! Here is your reward." />
	<parameter key="message_nothaveitem" value="HEY! You don't have one! Stop playing tricks on fooling me or I will give you some extra work!" /> 		

       <parameter key="module_keywords" value="1" />
       <parameter key="keywords" value="how are you;sell;job;academy;library;train;center;cellar;oracle;vocation;rookgaard;name;seymour;sir;help;hint;people;advice;monster;sewer;god;gamemaster;counsellor;king;obi;cipfried;amber;willie;hyancith;dallheim;al dee;quentin;life fluid;bug;weapon;magic;tibia;castle;" />

       <parameter key="keyword_reply1" value="Well, the king doesn't send troops anymore, the academy is dreadfully low on money, and the end of the world is pretty nigh. Apart from that I am reasonably fine, I suppose." />
       <parameter key="keyword_reply2" value="I sell the Key to Adventure for 5 gold! If you are interested, tell me that you want to buy the key." />
       <parameter key="keyword_reply3" value="I am the master of this fine academy." />
       <parameter key="keyword_reply4" value="Our academy has a library, a training center in the cellars and the oracle upstairs." />
       <parameter key="keyword_reply5" value="Go and read our books. Ignorance may mean death, so be careful." />
       <parameter key="keyword_reply6" value="You can try some basic things down there, but don't challenge the monsters in our arena if you are inexperienced." />
	<parameter key="keyword_reply7" value="You can try some basic things down there, but don't challenge the monsters in our arena if you are inexperienced." />
	<parameter key="keyword_reply8" value="You can try some basic things down there, but don't challenge the monsters in our arena if you are inexperienced." />
	<parameter key="keyword_reply9" value="You will find the oracle upstairs. Talk to the oracle as soon as you have made level 8. Choose a vocation and a new home town, and you will be sent off to the continent." />
	<parameter key="keyword_reply10" value="You will find the oracle upstairs. Talk to the oracle as soon as you have made level 8. Choose a vocation and a new home town, and you will be sent off to the continent." />
	<parameter key="keyword_reply11" value="Here on Rookgaard we have some people, a temple, some shops, a farm and an academy." />
	<parameter key="keyword_reply12" value="My name is Seymour, but to you I am 'Sir' Seymour." />
	<parameter key="keyword_reply13" value="My name is Seymour, but to you I am 'Sir' Seymour." />
	<parameter key="keyword_reply14" value="At least you know how to address a man of my importance." />
	<parameter key="keyword_reply15" value="I can assist you with my advice." />
	<parameter key="keyword_reply16" value="I can assist you with my advice." />
	<parameter key="keyword_reply17" value="Well, there's me, Cipfried, Willie, Obi, Amber, Dallheim, Al Dee, Norma, and Hyacinth." />
	<parameter key="keyword_reply18" value="Read the blackboard for some hints and visit the training center in the cellar." />
	<parameter key="keyword_reply19" value="You can learn about Tibia's monsters in our library." />
	<parameter key="keyword_reply20" value="Our sewers are overrun with rats. If you own some equipment you could go down a sewer grate and fight the vermin." />
	<parameter key="keyword_reply21" value="You can learn much about Tibia's gods in our library." />
	<parameter key="keyword_reply22" value="If you have serious problems with the game or with other people who are harassing you, contact a counsellor or a gamemaster using CTRL+R." />
	<parameter key="keyword_reply23" value="If you have serious problems with the game or with other people who are harassing you, contact a counsellor or a gamemaster using CTRL+R." />
	<parameter key="keyword_reply24" value="Hail to King Tibianus! Long live our king! Not that he cares for an old veteran who is stuck on this godforsaken island..." />
	<parameter key="keyword_reply25" value="A cousin of Thais' smith Sam. He has a shop here where you can buy most stuff an adventurer needs." />
	<parameter key="keyword_reply26" value="A humble monk with healing powers, and a pupil of the great Quentin himself." />
	<parameter key="keyword_reply27" value="A traveller from the main land. I wonder what brought her here, since no one comes here of his own free will." />
	<parameter key="keyword_reply28" value="Willie is a fine farmer, although he has short temper." />
	<parameter key="keyword_reply29" value="A mysterious druid who lives somewhere in the wilderness. He sells precious life fluids." />
	<parameter key="keyword_reply30" value="Oh good Dallheim! What a fighter he is! Without him we would be doomed." />
	<parameter key="keyword_reply31" value="He is a shop owner in the northwestern part of the village." />
	<parameter key="keyword_reply32" value="He is responsible for the temple in Thais." />
	<parameter key="keyword_reply33" value="A rare magic potion that restores health." />
	<parameter key="keyword_reply34" value="Nasty little creatures, but once you have a suitable weapon and perhaps a shield they will be no match for you." />
	<parameter key="keyword_reply35" value="You need fine weapons to fight the tougher beasts. Unfortunately only the most basic weapons and armor are available here. You will have to fight some monsters to get a better weapon." />
	<parameter key="keyword_reply36" value="The only magic-user on this isle is old Hyacinth." />
	<parameter key="keyword_reply37" value="Oh, how I miss the crowded streets of Thais. I know one day I will get promoted and get a job at the castle... I must get out of here! The faster the better! It is people like you who are driving me mad." />
	<parameter key="keyword_reply38" value="The castle of Thais is the greatest achievement in Tibian history." />

       <parameter key="module_shop" value="1"/>
       <parameter key="shop_buyable" value="" />
       <parameter key="shop_sellable" value="dead rat,2813,2" />
   </parameters>
</npc>

 

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

function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
	return false
end

-- NPC Seymour feito por Rodrigo (Nottinghster)
-- Inicio NPC Seymour

local player_gold     = getPlayerItemCount(cid,2148)
   local player_plat     = getPlayerItemCount(cid,2152)*100
   local player_crys     = getPlayerItemCount(cid,2160)*10000
   local player_money    = player_gold + player_plat + player_crys

if msgcontains(msg, 'dungeon') and getPlayerLevel(cid) < 3 then
selfSay('There are some dungeons on this isle, but almost all of them are too dangerous for you at the moment.')

elseif msgcontains(msg, 'dungeon') and getPlayerLevel(cid) > 2 then
selfSay('There are some dungeons on this isle. You should be strong enough to explore them now, but make sure to take a rope with you.')

elseif msgcontains(msg, 'mission') or msgcontains(msg, 'quest') and getPlayerLevel(cid) < 4 then
selfSay('You are pretty inexperienced. I think killing rats is a suitable challenge for you. For each fresh rat I will give you two shiny coins of gold.')

elseif msgcontains(msg, 'mission') or msgcontains(msg, 'quest') and getPlayerLevel(cid) > 3 then
selfSay('Well I would like to send our king a little present, but I do not have a suitable box. If you find a nice box, please bring it to me.')

elseif msgcontains(msg, 'key') then
selfSay('Do you want to buy the Key to Adventure for 5 gold coins?')
talk_state = 1

elseif msgcontains(msg, 'yes') and talk_state == 1 and player_money >= 5 then
selfSay('Here you are.')
doPlayerRemoveMoney(cid, 5)
key = doPlayerAddItem(cid, 2088,1)
doSetItemActionId(key,4600)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 1 and player_money < 5 then
selfSay('You don\'t have enough money.')
elseif msgcontains(msg, 'no') and talk_state == 1 then
selfSay('As you wish.')
talk_state = 0

elseif msgcontains(msg, 'box') then
selfSay('Do you have a suitable present box for me?')
talk_state = 2

elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerItemCount(cid,1990) >= 1 then
selfSay('THANK YOU! Here is a helmet that will serve you well.')
doPlayerRemoveItem(cid, 1990, 1)
doPlayerAddItem(cid, 2480, 1)
talk_state = 0
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerItemCount(cid,1990) == 0 then
selfSay('HEY! You don\'t have one! Stop playing tricks on fooling me or I will give you some extra work!')
talk_state = 0

elseif msgcontains(msg, 'bye') and (talk_state >= 1 and talk_state <= 2) then
selfSay('See you later.')
talk_state = 0

end
-- Final Seymour NPC
-- NPC Seymour feito por Rodrigo (Nottinghster)
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

É isso ai galera

abraço!

Link para o comentário
Compartilhar em outros sites

caral*0 eu non costumo responder tópico atoa nao mas ae...

 

só pela programaçao do npc ja merece 10 =D

 

medo ;/

 

(nem testei, a nota é pela programaçao =)

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

×
×
  • Criar Novo...