Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Saved on Wednesday, May 31, 2006, 9:51 AM -->
- <!-- MuClient version 3.70 -->
- <!-- Plugin "Quest_Inform" generated by Plugin Wizard -->
- <muclient>
- <plugin name="Quest_Inform" author="Onoitsu2" id="2b778ca65f74f5d3a4343cfc" language="Lua" purpose="Informs On A Certain Channel Quest Info" save_state="y" date_written="2006-05-31 09:49:56" requires="3.65" version="1.1">
- <description trim="n">
- Quest Inform Plugin Help File - Commands are as follows: (without the of course)
- qchan = <CHANNEL> (ftalk = default) - sets the channel to send all Quest Inform related messages to (can even be tell PERSON)
- qinform help - shows this help message
- </description>
- </plugin>
- <!-- Get our standard constants -->
- <include name="constants.lua"/>
- <!-- Triggers -->
- <triggers>
- <trigger enabled="y" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'You have (\d{1,}) minutes to complete your quest\.\'$" name="qtimematch" regexp="y" script="QTimeSetSend" sequence="26" lowercase_wildcard="y">
- </trigger>
- <trigger enabled="y" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'of (.*?)\.\'$" regexp="y" script="QAreaSet" sequence="27" lowercase_wildcard="y">
- </trigger>
- <trigger enabled="y" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'of (.*?) which(.*?)" regexp="y" script="QRoomSet" sequence="28" lowercase_wildcard="y">
- </trigger>
- <trigger enabled="y" custom_colour="4" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'(An enemy of mine|Aardwolf\'s most heinous criminal)\,\s(.*?)\,(.*?)\'$" regexp="y" script="QMobSet" sequence="29" lowercase_wildcard="y">
- </trigger>
- <trigger group="questcom2" match="^You gain an extra 2 quest points \'MCCP Bonus\'\.$" regexp="y" script="QRewardSend" sequence="20">
- </trigger>
- <trigger group="questcom2" match="^\*\* You gain a bonus trivia point! \*\* $" regexp="y" script="QReward1Trivia" sequence="20">
- </trigger>
- <trigger group="questcom2" match="^\*\* You gain a bonus training session \*\* $" regexp="y" script="QReward1Train" sequence="20">
- </trigger>
- <trigger group="questcom2" match="^\*\* You gain a bonus practice \*\* $" regexp="y" script="QReward1Practice" sequence="20">
- </trigger>
- <trigger group="questcom2" match="^\*\* You gain a bonus (\d{1,}) practices \*\* $" regexp="y" script="QRewardXPractice" sequence="20">
- </trigger>
- <trigger group="questcom2" match="^You get lucky and gain an extra (.*?) quest points\.$" regexp="y" script="QRewardXPoints" sequence="20">
- </trigger>
- <trigger group="questcom2" match="^The gods reward you (.*?) bonus quest points\.$" regexp="y" script="QRewardDoublePoints" sequence="20">
- </trigger>
- <trigger group="questcom2" keep_evaluating="y" match="^(.*?) tells you \'I am also giving you (.*?) quest point(s?) tier bonus\.\'$" regexp="y" script="QRewardTierPoints" sequence="20">
- </trigger>
- <trigger group="questcom2" keep_evaluating="y" match="^(.*?) tells you \'As a reward\, I am giving you (.*?) quest points and (.*?) gold\.\'$" regexp="y" script="QReward1" sequence="20">
- </trigger>
- <trigger enabled="y" group="questcom" match="^You inform (.*?) that you have completed your quest\.$" regexp="y" script="InformQMComplete" send_to="12" sequence="20" lowercase_wildcard="y">
- </trigger>
- <trigger enabled="y" group="questcom" match="^Return to the questmaster before your time runs out\.$" regexp="y" script="QReturn" sequence="20">
- </trigger>
- <trigger custom_colour="4" enabled="y" group="quest_stuff" match="^You ask (.*?) for a quest\.$" regexp="y" script="QRequestGetName" sequence="30">
- </trigger>
- <trigger custom_colour="4" enabled="y" group="quest_stuff" match="^(There are (.*?) minutes remaining until you can go on another quest\.|You do not have to wait to go on another quest\.|QUEST\: You may now quest again\.)$" regexp="y" script="QTimeRemain" sequence="20">
- </trigger>
- </triggers>
- <!-- Aliases -->
- <aliases>
- <alias script="SetChannel" ignore_case="y" match="^qchan\s*\=\s*(.*?)$" enabled="y" regexp="y">
- </alias>
- </aliases>
- <!-- Plugin help -->
- <aliases>
- <alias script="OnHelp" ignore_case="y" match="qinform help" enabled="y">
- </alias>
- </aliases>
- <script>
- function QTimeSetSend(sName,sLine,wildcards)
- DoAfterSpecial(.5,'world.EnableTrigger("qtimematch",false)',12)
- Note("Disabling Trigger")
- local questor, send, url
- questor = string.lower(world.GetVariable("questor"))
- if string.lower(wildcards[1]) == questor then
- world.SetVariable("qtime",wildcards[2])
- local mob, room, area, time, colorinfo, colortitles, colornorm, qchan
- mob = world.GetVariable("qmob")
- room = world.GetVariable("qroom")
- area = world.GetVariable("qarea")
- time = world.GetVariable("qtime")
- colorinfo = "@G"
- colortitles = "@C"
- colornorm = "@Y"
- qchan = world.GetVariable("qchan")
- sendinfo = qchan .. "@BQuest Info - " .. colortitles .. "Mob:" ..
- colorinfo .. mob .. colornorm .. ", " .. colortitles .. "Room:" ..
- colorinfo .. room .. colornorm .. ", " .. colortitles .. "Area:" ..
- colorinfo .. area .. colornorm .. ", " .. colortitles .. "Time:" ..
- colorinfo .. time .. colornorm
- DoAfterSpecial(2,"world.Send(sendinfo)",12)
- DoAfterSpecial(5,'world.EnableTrigger("qtimematch",true)',12)
- end
- end -- QTimeSetSend
- function QAreaSet(sName,sLine,wildcards)
- local questor
- questor = string.lower(world.GetVariable("questor"))
- if string.lower(wildcards[1]) == questor then
- world.SetVariable("qarea",wildcards[2])
- end
- end -- QAreaSet
- function QRoomSet(sName,sLine,wildcards)
- local questor
- questor = string.lower(world.GetVariable("questor"))
- if string.lower(wildcards[1]) == questor then
- world.SetVariable("qroom",wildcards[2])
- end
- end -- QRoomSet
- function QMobSet(sName,sLine,wildcards)
- local questor
- questor = string.lower(world.GetVariable("questor"))
- if string.lower(wildcards[1]) == questor then
- world.SetVariable("qmob",wildcards[3])
- end
- end -- QMobSet
- function QRewardSend(sName,sLine,wildcards)
- local questmessage, qchan, qptotal
- qptotal = tonumber(world.GetVariable("totalqp")) + 2
- questmessage = world.GetVariable("qcommessage")
- questmessage = questmessage .. " @Y+ @G2 @C(MCCP) qps @B= @G" .. qptotal .. " @RTOTAL QP@Y"
- qchan = world.GetVariable("qchan")
- world.Send(qchan .. questmessage)
- world.EnableGroup("questcom2",0)
- end -- QRewardSend
- function QRewardTierPoints(sName,sLine,wildcards)
- local questmessage, qptotal
- questmessage = world.GetVariable("qcommessage")
- qptotal = tonumber(world.GetVariable("totalqp")) +
- tonumber(wildcards[2])
- questmessage = questmessage .. " @Y+ @G" .. wildcards[2] .. " @MTier Bonus!@Y"
- world.SetVariable("totalqp",qptotal)
- world.SetVariable("qcommessage",questmessage)
- end -- QRewardTierPoints
- function QRewardDoublePoints(sName,sLine,wildcards)
- local questmessage, qptotal
- questmessage = world.GetVariable("qcommessage")
- qptotal = tonumber(world.GetVariable("totalqp")) + tonumber(wildcards[1])
- questmessage = questmessage .. " @Y+ @BDouble QP@Y"
- world.SetVariable("totalqp",qptotal)
- world.SetVariable("qcommessage",questmessage)
- end -- QRewardDoublePoints
- function QReward1Trivia(sName,sLine,wildcards)
- local questmessage
- questmessage = world.GetVariable("qcommessage")
- questmessage = questmessage .. " @Y+ @MTrivia!@Y"
- world.SetVariable("qcommessage",questmessage)
- end -- QReward1Trivia
- function QReward1Train(sName,sLine,wildcards)
- local questmessage
- questmessage = world.GetVariable("qcommessage")
- questmessage = questmessage .. " @Y+ @G1 @CTrain@Y"
- world.SetVariable("qcommessage",questmessage)
- end -- QReward1Train
- function QReward1Practice(sName,sLine,wildcards)
- local questmessage
- questmessage = world.GetVariable("qcommessage")
- questmessage = questmessage .. " @Y+ @G1 @CPractice@Y"
- world.SetVariable("qcommessage",questmessage)
- end -- QReward1Practice
- function QRewardXPractice(sName,sLine,wildcards)
- local questmessage
- questmessage = world.GetVariable("qcommessage")
- questmessage = questmessage .. " @Y+ @G" .. wildcards[1] .. " @CPractices@Y"
- world.SetVariable("qcommessage",questmessage)
- end -- QRewardXPractice
- function QRewardXPoints(sName,sLine,wildcards)
- local questmessage, qptotal
- questmessage = world.GetVariable("qcommessage")
- qptotal = tonumber(world.GetVariable("totalqp")) + tonumber(wildcards[1])
- questmessage = questmessage .. " @Y+ @G" .. wildcards[1] .. " @CLucky Points@Y"
- world.SetVariable("totalqp",qptotal)
- world.SetVariable("qcommessage",questmessage)
- end -- QRewardXPoints
- function QReward1(sName,sLine,wildcards)
- local questmessage, qptotal
- qptotal = tonumber(wildcards[2])
- questmessage = "@BLast Quest: @G" .. wildcards[2]
- world.SetVariable("totalqp",qptotal)
- world.SetVariable("qcommessage",questmessage)
- end -- QReward1
- function InformQMComplete(sName,sLine,wildcards)
- world.SetVariable("questor",string.lower(wildcards[1]))
- world.EnableGroup("questcom2",1)
- end
- function QReturn(sName,sLine,wildcards)
- local questor, qchan
- questor = string.lower(world.GetVariable("questor"))
- qchan = world.GetVariable("qchan")
- world.Send(qchan .. " '@CQuest @RMob @WDead @BReturning @YTo @G" .. questor .. "@Y'")
- end -- QReturn
- function QRequestGetName(sName,sLine,wildcards)
- world.SetVariable("questor",string.lower(wildcards[1]))
- end -- QRequestGetName
- function QTimeRemain(sName,sLine,wildcards)
- local qchan
- qchan = world.GetVariable("qchan")
- if string.sub(wildcards[1],1,10) == "There are " then
- world.Send(qchan .. "'@CThere's @G" .. wildcards[2] .. " @YMinutes @WLeft @BTill @MNext @RQuest@Y'")
- else
- if wildcards[1] == "QUEST: You may now quest again." then
- world.Send(qchan .. "'@CThere's @RQuest @WPoints @BTa @YBe @GHad@Y'")
- end
- end
- end -- QTimeRemain
- function SetChannel(sName,sLine,wildcards)
- local qchan
- qchan = string.lower(wildcards[1])
- if qchan == "" then
- qchan = "ftalk "
- end
- world.SetVariable("qchan",qchan .. " ")
- SaveState()
- end -- SetChannel
- function OnPluginInstall()
- world.SetVariable("qchan","ftalk ")
- OnHelp()
- end -- OnPluginInstall
- function OnHelp ()
- world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
- end
- </script>
- </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement