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
Refill script
#1
Hi,

Making a basic refiller with cavebot and actions and have a few questions;

1. How can i check if a door is open. Then if it is: keep walking. If not: Open door. (I've managed to open a closed door, but if it's already open i will close it instead and stopping bot from walking.

2. When approaching a boat npc to sail i have just set a waypoint in the middle-ish of where npc is. Is it possible to locate npc and walk up to it before talking?

3. How can i check: If player(s) on screen, wait until player(s) is not on screen, then sail to ex. edron?


Want to get better making these myself but watching lua functions thread is a bit confusing. You got any guides on how to make my own cavebots with actions and how they work?
If not, i'd love to get some pointers on how to make the actions myself.

For point 3 i've found that i can use getcreatures variable to check for players, but i'm not sure how to use it. Your guide says "getcreatures(string filter) [table]: (p, m, n, f and s)" but what is [table]? I have some really basic knowledge about javascript, html and css so i'll learn eventually but it's harder since it's not the same language.. :p

Thanks!
Reply

#2
Hello.


1. Use gettile() or topitem() to find for door ids to know if door is closed or open. You can also use usedoor() to open door.
gettile(number posx, number posy, number posz) [table]: Return tile information
.posx [number]
.posy [number]
.posz [number]
.items [table(item)]
.topitem [item]
.itemcount [number]

topitem(number posx, number posy, number posz, optional boolean considerCreatures) [table]: Return top of specific tile.
.id [number]: Item ID.
.count [number]: Item amount.
.index [number]: Item index in backpack.
.posx [number]
.posy [number]
.posz [number]
|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.


2. Use findcreature or getcreatures() to find if npc is on screen or far away then use reachcreature() to reach it.
|Only Registered members can see download links. | Click here to buy subscription or here to register.


3. use paround()
while paround('player name') > 0 do
    wait(300, 500)
end

say('hi')
wait(800, 1200)
say('edron')
wait(800, 1200)
say('yes')
wait(800, 1200)
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Thank you! Everything works, but i've not been able to test "paround" yet. Guessing that using "paround('player name')" works for all players, not just one player with a specific name?
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.
The opposite. It returns amount of listed players, so if paround('player name') returns how many players with name "player name" can be found in your screen.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016