GM detection is working on my pc - i got the message in the mm-monitor.
But I still have the probleme, that if GMnearbylogout if false, an even if i put function gmnearby() in the WP_onlaod-Section,
the bot does not stop moving when the testchar comes nearby.
So now the whisper-funtion can be forgotten - works properly - char stops on whipser. Also you told me this function is working independent from the nearby-thing
When GMnearbylogout if true - the bot logs out. If false - only the alarm goes on.
So in the lua-file I am at this positon at this time...
Why does the script not come to "elseif gmnearby"?
Couldn´t have to do anything with the time-thing -or?
Code: Select all
if settings.profile.options.GMnearbylogout == true then
RoMScript("Logout();");
error("Logging out because GM detected.")
elseif gmnearby then
gmnearby()
end
@lisa: yesterday you give me the thought that gettime and time are different and I implemented your code to print the values in MM-Montior.
Does the two printed times have to be exact the same?
Have I done everything wrong in my wp-onload-section?
Code: Select all
<onLoad>
-- Loading GM-detection
-- remember: always put the options in profile-file
-- remember: you have to put the lua-file in userfunctions-folder
-- remember: you habe to put in the d303fix to addons - or it won´t work
<![CDATA[
startGMDetect()
]]>
-- just stop what you are doing in case a gm is near you - works if gmnearbylogout is set to false--
function gmnearby()
local _time = os.time()
repeat
yrest(2000)
until (os.time() - _time) >= 300 -- 5 minute pause.
end
-- edit by spawni 27.09 beep by whisper ----
function beepwhispers()
repeat
local time, moreToCome, name, msg = EventMonitorCheck("Whispers", "4,1")
if time ~= nil then
printf("\a\a\a");
end
until moreToCome ~= true
end
EventMonitorStart("Whispers", "CHAT_MSG_WHISPER");
registerTimer("beepwhispers", secondsToTimer(5), beepwhispers)
-- end of beepwhispers ---
</onLoad>