Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
go to x position and log out when you get serversave message?
#1
Would it be possible to make a persistent script that goes into the house on the last one minute serversave message?
then logout, wait 5min for the bot to auto reconnect and say alana sio?

or will the bot shutdown after the character loggs out?

i copied something like this together, would it work?

if ischannelopen("Default")
    then
        local msg = getmessages()
        local count = 0

        for _ in pairs(msg)
        do
        count = count + 1
        end

        for i = 1, count, 1
        do
        if string.find(msg[i].fullcontent, "Server will save in one minute. Please log out.") and msg[i].type == 3
            then
goto pos xyz
logout
wait(300000)
say ('Alana sio')
end
Reply

#2
Hello.

If your house is not on your screen.
local WPT_LABEL = 'GO_HOUSE'


if ischannelselected("Default") then
    local msgs = getnewmessages()
    for _, msg in ipairs(msgs) do
        if string.find(msg.content, "Server will save in one minute. Please log out.") and msg.type == 3 then
            gotolabel(WPT_LABEL)
            break
        end
    end
end

logout()
wait(300000)
reconnect()
say('Alana sio')

Wpt example:
000 Stand (GO_HOUSE) -- This wpt would go to house
001 Action -- this wpt would run 2nd script.


If your house location is on your screen then you can use this script directly.
local LOCATION = { X = 12345, Y = 12345, Z = 6 }


if ischannelselected("Default") then
    local msgs = getnewmessages()
    for _, msg in ipairs(msgs) do
        if string.find(msg.content, "Server will save in one minute. Please log out.") and msg.type == 3 then
            if reachlocation(LOCATION.X, LOCATION.Y, LOCATION.Z) then
                logout()
                wait(300000)
                reconnect()
                say('Alana sio')
            end
        end
    end
end
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.


thank you so much! will test this out
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Smile" title="Smile" class="smilie smilie_1" />
Reply

#4
i got this error mesage in console copying the your script: "18:15:25 - Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString:loggehusSS: 7: 'do' expected near 'if'"

so added the "do" after "msg in ipairs(msgs)"

i was able to run it, but will it work now or did i add that in the wrong place?

I was also wondering if the "msg in ipairs(msgs)" part will ruin it? seeing as it will only say that one sentence once and not the whole thing in pairs?

thank you so much for your help on this!




if ischannelselected("Default") then
    local msgs = getnewmessages()
    for _, msg in ipairs(msgs) do
        if string.find(msg.content, "Server is saving game in 1 minute. Please log out.") and msg.type == 3 then
            if reachlocation(LOCATION.X, LOCATION.Y, LOCATION.Z) then
                logout()
                wait(300000)
                reconnect()
                say('Alana sio')
            end
        end
    end
end
Reply

#5
Hello.

You did it correctly!
Reply

#6
is there a reason this isnt working?

local WPT_LABEL = 'SS'

if ischannelselected("Default") then
local msgs = getnewmessages()
for _, msg in ipairs(msgs) do
if string.find(msg.content, "Server is saving game in 5 minutes.") and msg.type == 3 then
gotolabel(WPT_LABEL)
break
end
end
end
Reply

#7
No, it works fine.
Reply

#8
Hmm, even on Retrots? i ended up using the loot one you made, changed the message type to 18 (i checked my log to get the server type number)
and changed flash client to gotolabel
Seems to do the same thing. From what i read, it will go to label SS if at any point there is a server message that includes the word server

Need to test tonight.

local ITEMS = { 'Server' }

local messages = getnewmessages('Default') -- Get new messages from Default channel. If your server uses Server Log then change it.

for _, msg in ipairs(messages) do
if msg.type == 18 and string.find(msg.content, '') ~= nil then
local text_lower = msg.content:lower()
for __, item in ipairs(ITEMS) do
if string.find(text_lower, item:lower()) ~= nil then
gotolabel('SS')
flashclient()
return
end
end
end
end
Reply

#9
This section is for Mastercores OTBot only.

You must check what's the message type, it changes according the message color, etc.
Reply

#10
i got this working.

local ITEMS = { 'Server' }

local messages = getnewmessages('Default') -- Get new messages from Default channel. If your server uses Server Log then change it.

for _, msg in ipairs(messages) do
if msg.type == 18 and string.find(msg.content, '') ~= nil then
local text_lower = msg.content:lower()
for __, item in ipairs(ITEMS) do
if string.find(text_lower, item:lower()) ~= nil then
gotolabel('SS')
flashclient()
return
end
end
end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016