Now to the business... I'm trying to make a script to make a script for a Dwarf quest (with no good results atm) called "Here Comes the Rain!" that its to "repair" a gate.
After accept the quest, the npc Valent Blackscar start saying out of 2 tools 1 to use...
...and so on until quest is done...[Say] [Valent Blackscar]: Now! Grab your hammer!
click hammer and then click gate
[Say] [Valent Blackscar]: Now! Grab your pliers!
click pliers and then click gate
[Say] [Valent Blackscar]: Now! Grab your hammer!
click hammer and then click gate
I realise that its possible to have this work with EventMonitor & EventMonitorCheck
this is my last try.. i know it might be all f.. messed up but i really tried :S
Code: Select all
<onload>
function black()
local time, moretocome, msg = EventMonitorCheck("blacksay","1")
if msg ~= nil then
if string.find(msg, "Now! Grab your hammer!") then
stuff to do
elseif if string.find(msg, "Now! Grab your pliers!") then
other stuff to do
end
end
end
</onload>
<!-- # 1 --><waypoint x="-11" z="374" y="1561">
EventMonitorStart("blacksay","CHAT_MSG_SAY",",,,Valent Blackscar");
</waypoint>
<!-- # 2 --><waypoint x="-371" z="321" y="1638">
player:target_NPC("Valent Blackscar"); AcceptQuestByName("Here Comes the Rain!"); yrest(5000);
while (getQuestStatus("Here Comes the Rain!") == "incomplete") do
black()
end
player:target_NPC("Valent Blackscar"); CompleteQuestByName("Here Comes the Rain!"); yrest(2000);
EventMonitorStop("blacksay");
loadPaths("next_stuff");
</waypoint>