Buff Whisper
Posted: Wed Sep 18, 2013 1:20 am
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad><![CDATA[
EventMonitorStart("BUFFER", "CHAT_MSG_WHISPER")
while true do
cprintf(cli.lightred,"Waiting for buf requests...\n")
local time, moreToCome, _name, _message = EventMonitorCheck("BUFFER","4,1",true)
if _message == "buff" then
string.lower(_message)
printf("Got message ".._message.." from ".._name.."\n")
for i = 1,10 do
sendMacro("TargetNearestFriend();")
target=player:getTarget()
if target.Name == _name then
printf("Target: "..target.Name.."\n");
sendMacro("UseAction(2)");
break
end
if i == 10 then
printf("Did not find target ".._name.."\n");
end
end
end
player:update()
yrest(1000)
end
]]></onLoad>
</waypoints>
when i start the script , the buffer gets this error message
[Error]: call igf_events_Frame's OnEvent, line: [string"?"]:23: attempt to index global 'os' (a nil value)
<waypoints>
<onLoad><![CDATA[
EventMonitorStart("BUFFER", "CHAT_MSG_WHISPER")
while true do
cprintf(cli.lightred,"Waiting for buf requests...\n")
local time, moreToCome, _name, _message = EventMonitorCheck("BUFFER","4,1",true)
if _message == "buff" then
string.lower(_message)
printf("Got message ".._message.." from ".._name.."\n")
for i = 1,10 do
sendMacro("TargetNearestFriend();")
target=player:getTarget()
if target.Name == _name then
printf("Target: "..target.Name.."\n");
sendMacro("UseAction(2)");
break
end
if i == 10 then
printf("Did not find target ".._name.."\n");
end
end
end
player:update()
yrest(1000)
end
]]></onLoad>
</waypoints>
when i start the script , the buffer gets this error message
[Error]: call igf_events_Frame's OnEvent, line: [string"?"]:23: attempt to index global 'os' (a nil value)