PoccnnEnquanto houver armas no mundo, haverá guerra!PHerói
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino
31 de agosto de 2020 às 10:04
Elane.xml
<?xml version="1.0"?><npcname="Elane"script="data/npc/scripts/Thais/Elane.lua"walkinterval="2000"><healthnow="200"max="200"/><looktype="137"head="113"body="100"legs="119"feet="119"addons="3"/><parameters><parameterkey="message_greet"value="Welcome to the paladins' guild, |PLAYERNAME|! How can I {help} you?"/><parameterkey="module_shop"value="1"/><parameterkey="shop_buyable"value=""/><parameterkey="shop_sellable"value="sniper gloves,5875,2000"/><parameterkey="module_keywords"value="1"/><parameterkey="keywords"value="name;help;job;Paladins;warriors;magicians;missile;news;members;advantages;spells;general;army;excalibug;Ferumbras;time;crossbow;Baxter;Bozo;McRonalds;Eclesius;Elane;Frodo;Galuna;Gorn;Gregor;Harkath Bloodblade;king tibianus;Lugri;Lynda;Marvik;Muriel;Oswald;Quentin;Sam;"/><parameterkey="keyword_reply1"value="My name is Elane. I am the famous leader of the {Paladins}."/><parameterkey="keyword_reply2"value="I am the leader of the {Paladins}. I help our members."/><parameterkey="keyword_reply3"value="I am the leader of the {Paladins}. I help our members."/><parameterkey="keyword_reply4"value="Paladins are great {warriors} and {magicians}. Besides that we are excellent missile fighters. Many people in Tibia want to join us."/><parameterkey="keyword_reply5"value="Of course, we aren't as strong as {knights}, but no {druid} or {sorcerer} will ever defeat a paladin with a sword."/><parameterkey="keyword_reply6"value="There are many magic spells and runes paladins can use."/><parameterkey="keyword_reply7"value="Paladins are the best missile fighters in Tibia!"/><parameterkey="keyword_reply8"value="I am a paladin, not a storyteller."/><parameterkey="keyword_reply9"value="Every paladin profits from his vocation. It has many advantages to be a paladin."/><parameterkey="keyword_reply10"value="We will help you to improve your skills. Besides I offer spells for paladins."/><parameterkey="keyword_reply11"value="Sorry, I don't teach spells."/><parameterkey="keyword_reply12"value="Harkath Bloodblade is the royal general."/><parameterkey="keyword_reply13"value="Some paladins serve in the kings army."/><parameterkey="keyword_reply14"value="A weapon of myth. I don't believe that this weapon exists."/><parameterkey="keyword_reply15"value="Someday I will slay that bastard!"/><parameterkey="keyword_reply16"value="Oops. I have forgotten my watch."/><parameterkey="keyword_reply17"value="I really wonder what was on this fool's mind when he stole my crossbow. What a huge disappointment."/><parameterkey="keyword_reply18"value="He has some potential."/><parameterkey="keyword_reply19"value="How spineless do you have to be to become a jester?"/><parameterkey="keyword_reply20"value="The McRonalds are simple farmers."/><parameterkey="keyword_reply21"value="He must have been skilled before he became the way he is now. Such a pity."/><parameterkey="keyword_reply22"value="yes?"/><parameterkey="keyword_reply23"value="The alcohol he sells shrouds the mind and the eye."/><parameterkey="keyword_reply24"value="One of the most important members of our guild. She makes all the bows and arrows we need."/><parameterkey="keyword_reply25"value="He sells a lot of useful equipment."/><parameterkey="keyword_reply26"value="He and his guildfellows lack the grace of a true warrior."/><parameterkey="keyword_reply27"value="A fine warrior and a skilled general."/><parameterkey="keyword_reply28"value="King Tibianus is a wise ruler."/><parameterkey="keyword_reply29"value="A follower of evil that will get what he deserves one day."/><parameterkey="keyword_reply30"value="Mhm, a little too nice for my taste. Still, it's amazing how she endures all those men stalking her, especially this creepy Oswald."/><parameterkey="keyword_reply31"value="A skilled healer, that's for sure."/><parameterkey="keyword_reply32"value="Just another arrogant sorcerer."/><parameterkey="keyword_reply33"value="If there wouldn't be higher powers to protect him..."/><parameterkey="keyword_reply34"value="A humble monk and a wise man."/><parameterkey="keyword_reply35"value="Strong man. But a little shy."/></parameters></npc>
Elane.lua
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid)endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid)endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg)endfunction onThink() npcHandler:onThink()endlocal talkState,talkUser ={},0localfunction say(npc,text,cid,talk)ifnot(npcHandler:isFocused(cid))thenreturnfalseendif talk andnot(talkState[talkUser]== talk)thenreturnfalseend
doCreatureSay(npc,text,TALKTYPE_PRIVATE_NP,cid)endlocalfunction changeTalk(talk)
talkState[talkUser]= talk
endfunction creatureSayCallback(cid, type, msg)ifnot(npcHandler:isFocused(cid))thenreturnfalseendlocal msg = string.lower(msg)
talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and0or cid
if(msgcontains(msg,'outfit'))then
npcHandler:say("Oh, my winged tiara? Those are traditionally awarded after having completed a difficult task for our guild, only to female aspirants though. Male warriors will receive a hooded cloak.", cid)
talkState[talkUser]=1elseif(talkState[talkUser]==1and msgcontains(msg,'task'))then
npcHandler:say("So you are saying that you would like to prove that you deserve to wear such a hooded cloak?",cid)
talkState[talkUser]=11elseif(talkState[talkUser]==11)thenif(msgcontains(msg,'yes'))then
doPlayerSetStorageValue(cid,1835,1)--1835
npcHandler:say("Alright, I will give you a chance. Pay close attention to what I'm going to tell you now. ...",cid) addEvent(say,6000,getNpcCid(),"... Recently, one of our members moved to Liberty Bay out of nowhere, talking about some strange cult. That is not the problem, but he took my favourite crossbow with him. ...",cid,11)
addEvent(say,14000,getNpcCid(),"... Please find my crossbow. It has my name engraved on it and is very special to me. ...",cid,11)
addEvent(say,18000,getNpcCid(),"... Secondly, we need a lot of leather for new quivers. 100 pieces of lizard leather and 100 pieces of red dragon leather should suffice. ...",cid,11)
addEvent(say,24000,getNpcCid(),"... Third, since we are giving out tiaras, we are always in need of enchanted chicken wings. Please bring me 5, that would help us tremendously. ...",cid,11)
addEvent(say,30000,getNpcCid(),"... Lastly, for our arrow heads we need a lot of steel. Best would be one piece of royal steel, one piece of draconian steel and one piece of hell steel. ...",cid,11)
addEvent(say,40000,getNpcCid(),"... Did you understand everything I told you and are willing to handle this task?",cid,11)
addEvent(changeTalk,40000,12)else
npcHandler:say("ok.",cid)
talkState[talkUser]=0endelseif(talkState[talkUser]==12)thenif(msgcontains(msg,'yes'))then
npcHandler:say("That's the spirit! I hope you will find my crossbow, "..getCreatureName(cid)..".",cid)else
npcHandler:say("Hmm, maybe next time.",cid)end
talkState[talkUser]=0elseif(msgcontains(msg,'crossbow'))then
npcHandler:say("I'm so excited! Have you really found my crossbow?", cid)
talkState[talkUser]=2elseif(talkState[talkUser]==2and msgcontains(msg,'yes'))thenif(getPlayerItemCount(cid,5947)>=1)then
npcHandler:say("Yeah! I could kiss you right here and there! Besides, you're a handsome one. Please bring me 100 pieces of lizard {leather} and 100 pieces of red dragon {leather} now!",cid)
talkState[talkUser]=21else
npcHandler:say("That's the spirit! I hope you will find my crossbow, "..getCreatureName(cid)..".",cid)
talkState[talkUser]=0endelseif(talkState[talkUser]==21and msgcontains(msg,'leather'))then
npcHandler:say("Did you bring me 100 pieces of lizard leather and 100 pieces of red dragon leather?",cid)
talkState[talkUser]=22elseif(talkState[talkUser]==22and msgcontains(msg,'yes'))thenif(getPlayerItemCount(cid,5876)>=100and getPlayerItemCount(cid,5948)>=100)then
npcHandler:say("Good work, "..getCreatureName(cid).."! That is enough leather for a lot of sturdy quivers. Now, please bring me 5 enchanted {chicken wings}.",cid)
talkState[talkUser]=23else
npcHandler:say("Ah! you dont have all items.", cid)
talkState[talkUser]=0endelseif(talkState[talkUser]==23and msgcontains(msg,'chicken wings'))then
npcHandler:say("Were you able to get hold of 5 enchanted chicken wings?",cid)
talkState[talkUser]=24elseif(talkState[talkUser]==24and msgcontains(msg,'yes'))thenif(getPlayerItemCount(cid,5891)>=5)then
npcHandler:say("Great! Now we can create a few more Tiaras. If only they weren't that expensive... Well anyway, please obtain one piece of royal steel, draconian steel and hell steel each.",cid)
talkState[talkUser]=25else
npcHandler:say("Ah! you dont have all items.", cid)
talkState[talkUser]=0endelseif(talkState[talkUser]==25and msgcontains(msg,'steel'))then
npcHandler:say("Ah, have you brought one piece of royal steel, draconian steel and hell steel each?",cid)
talkState[talkUser]=26elseif(talkState[talkUser]==26and msgcontains(msg,'yes'))thenif(getPlayerItemCount(cid,5887)>=1and getPlayerItemCount(cid,5888)>=1and getPlayerItemCount(cid,5889)>=1and getPlayerItemCount(cid,5891)>=5and getPlayerItemCount(cid,5876)>=100and getPlayerItemCount(cid,5948)>=100and getPlayerItemCount(cid,5947)>=1)then
doPlayerRemoveItem(cid,5887,1,true)
doPlayerRemoveItem(cid,5888,1,true)
doPlayerRemoveItem(cid,5889,1,true)
doPlayerRemoveItem(cid,5891,5,true)
doPlayerRemoveItem(cid,5876,100,true)
doPlayerRemoveItem(cid,5948,100,true)
doPlayerRemoveItem(cid,5947,1,true)if(getPlayerSex(cid)== PLAYERSEX_MALE)then
doPlayerAddOutfit(cid,129,1)else
doPlayerAddOutfit(cid,137,1)end
npcHandler:say("Wow, I'm impressed, "..getCreatureName(cid)..". Your really are a valuable member of our paladin guild. I shall grant you your reward now. Wear it proudly!",cid)else
npcHandler:say("Ah! you dont have all items.", cid)end
talkState[talkUser]=0elseif(msgcontains(msg,'sniper gloves'))thenif(isPremium(Cid))then
npcHandler:say("You found sniper gloves?! Incredible! Listen, if you give them to me, I will grant you the right to wear the sniper gloves accessory. How about it?", cid)else
npcHandler:say("You found sniper gloves?! Incredible! I would love to grant you the sniper gloves accessory, but I can only do that for premium warriors. However, I would pay you 2000 gold pieces for them. How about it?", cid)end
talkState[talkUser]=3elseif(talkState[talkUser]==3and msgcontains(msg,'yes'))thenif(getPlayerItemCount(cid,5875)>=1)then
doPlayerRemoveItem(cid,5875,1,true)if(isPremium(cid))then
npcHandler:say("Great! I hereby grant you the right to wear the sniper gloves as accessory. Congratulations!",cid)if(getPlayerSex(cid)== PLAYERSEX_MALE)then
doPlayerAddOutfit(cid,129,2)else
doPlayerAddOutfit(cid,137,2)endelse
doPlayerAddMoney(cid,2000)
npcHandler:say("Congratulations!",cid)endelse
npcHandler:say("sorry, you dont have a sniper gloves.", cid)end
talkState[talkUser]=0else
npcHandler:say('...?',cid)endreturntrueend
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino
Elane.xml
Elane.lua