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
If private message: say exeta res, character says exeta res
#1
I am hunting with 2 characters. One knight character and one paladin character.
Character knight goes ahead, luring and blocking the monsters.
I would like to send a private message from the paladin to knight.
The knight character must to aceppt only commands from determined listed character(the shooter in the case).
A msg like: "Say exeta res", and knight will say exeta res.
Please, this is my request, I would love it, and have no idea how to script it. Thanks
|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="Wink" title="Wink" class="smilie smilie_2" />
Reply

#2
Hello.

1st script
If you wanna run any lua code from a message, you can use a script like this.
Examples:
00:00 Main character: print('lol')
Then the character that receives will run the command "print('lol')".

00:00 Main character: cast('exeta res')
Then the character that receives will run the command "cast('exeta res')".

local PLAYER = 'Main character'

local messages = getnewmessages('Default')
for _, msg in ipairs(messages) do
    if msg.sender:lower() == PLAYER:lower() then
        local command = loadstring(msg.content)
        command()
    end
end

local messages_pm = getnewmessages(PLAYER)
for _, msg in ipairs(messages_pm) do
    if msg.sender:lower() == PLAYER:lower() then
        local command = loadstring(msg.content)
        command()
    end
end

2nd script
When say the "WORD PLAYER" it will shoot the rune or attack on the PLAYER.
E.g.:
16:17 Leader Name: SD Knight
It will make people who are using this script to shoot SD on player "Knight".

16:18 Leader Name: SD Weak Sorcereer
It will make people who are using this script to shoot SD on player "Weak Sorcereer".

local ComboLeader = "Leader Name"

local RUNES_SHOOT = {
   { ITEM = "sudden death rune", WORD = "SD" },
   { ITEM = "heavy magic missile rune", WORD = "HMM" },
   { ITEM = "attack", WORD = "attack" },
}

--[[ DON'T EDIT BELOW THIS LINE --]]


if cancast() then
   local MESSAGES = getnewmessages(PLAYER)
   for i,m in pairs(MESSAGES) do
      if m.sender ~= nil and m.sender ~= '' and m.sender:lower() == ComboLeader:lower() then
         local temp = m.content:token(nil,' ')
         if temp[1] ~= nil and temp[2] ~= nil then
            for RUNE_INDEX = 1, #RUNES_SHOOT do
               if RUNES_SHOOT[RUNE_INDEX].WORD:lower() == temp[1]:lower() then
                  local RuneItem = RUNES_SHOOT[RUNE_INDEX].ITEM
                  local TargetName = ''

                  if #temp > 2 then
                     TargetName = temp[2]
                     for SPLIT_INDEX = 3, #temp do
                        TargetName = (TargetName:concat(temp[SPLIT_INDEX]):match("^%s*(.-)%s*$"))
                     end
                  else
                     TargetName = (temp[2]:match("^%s*(.-)%s*$"))
                  end
                  if TargetName ~= '' and RuneItem ~= '' then
                     if RuneItem == "attack" then
                        attack(TargetName)
                        wait(1000)
                     else
                        useitemoncreature(RuneItem, TargetName)
                        wait(1000)
                     end
                  end
                  return
               end
            end
         end
      end
   end
end
Reply

#3
Thanks very much! It worked perfectly, exactly what I wanted.
|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" /> 
|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" /> 

I am imaginating here, the best way to do this, is to use a HOTKEY in mode "NO focus client", in the bot client of knight character. It will be more undetectable by other players and gamemastes.

Is there a possibilty to use a Hotkey from classic bot that uses a hotkey from tibia client?

Example: tibia client 1, is loged on knight, and in this client F5 hotkey = exeta res.
So, I will be playing in tibia client 2, where I leave the hotkey F5 clear.
Is there a syntax code, to use directly hotkeys(or any keys) from tibia client that is not foccused?
Reply

#4
Hello.

Yeah, it's possible to do that pretty much as you said.

Just use Hotkeys tab on Knight.
1. Create a new hotkey.
2. Setup F5 as hotkey.
3. Setup Type as LUA Script
4.
cast('exeta res')
5. Uncheck "client focus required".

So when you press F5, no matter which window you are focusing, Knight will cast exeta res.
Reply

#5
Yeah, I am doing that, but I would like to add some line code, like this:

- presskey ("f5")

I don't know if there is an actiont in the library like this, in the classic bot.

Cause if there is something like this, I can use other keys, and its a little faster
Reply

#6
Hello.

What? It doesn’t make any sense.

Why would you rather press a hotkey to use the same hotkey on knight? You would be limited to say a single text. Because tibia client hotkeys can only be use to say texts, while Bots hotkey can be used to do anything .
Reply

#7
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Yeah, its that what I mean, the possibility to use anything in the hotkey. I want to do something like :

- presskey ("uparrow") -- Then the character move north


I know that there is this character action: 

move(string direction)

What I mean is a hotkey that convert to any other key in a non focused client.
Reply

#8
Hello.

My first post tells you what to do, which can be used to do anything you like move north, cast spell or so.

It is not possible to use a code to press a key, because it just doesn't make sense.
Reply

#9
Thumbs Up 
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Yeah,  its resolved my problem! Thank you very much, don't worry more about this post hehe
|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



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016