ElfBot NG

Understanding - A short introduction (Deposit, Selling Items, Conditions, Hotkeys)

Actions and Hotkeys

  • only that part will give a short introduction to hotkeys and actions, noting that in cavebot, actions can be used in Actions and Waypoints in Cavebot hotkeys Hotkeys.
the actions can be used to do almost anything in the tibia. There are many functions. aki will cite just a few important cavebot


Using items

(good for entering the manhole, open doors, etc ...)

add an Action Waypoint on your script
space arm in place, replacing IDDOITEM the id of the item:
usegrounditem IDDOITEM
This action uses the id IDDOITEM item that is found on the floor 1sqm away from you.

Jumping to a label

Remember I explained what was q label?
aki is its use. for example, the Action Waypoint with the following code jumps to the label NOMEDOLABEL:
gotolabel NOMEDOLABEL

Deposit

just for example, with these actions, your character will speak 'hi' and then speak in Default 'deposit all', 'yes' in NPCs
say hi
npcsay 'deposit all'
npcsay 'yes'


Selling items

this code will speak 'hi' in default, then tell 'trade' and then the NPCs will sell all items ITEM id that you have in bps. if you want, switch 100 by the number of items you want to sell (100 sells all)
say 'hi'
npcsay 'trade'
ITEM 100 sellitems

Terms

You can also use conditions.
They follow this pattern:
if [condition] {action}
For example, this code tells the amount of money. then, if that amount is greater than 1000, the label goes to deposit
countitems 3031
if [$ count> 1000] gotolabel deposit

Hotkeys

Hotkeys are like actions, but may recur from time to time.
100 self ifplayerattacking gotolabel {pk | settargeting off | end}
every 100 milliseconds (1000ms = 1s) the bot will see if someone is attacking you. if he jumps to the label pk, targeting the off, on and off the code, that would not be jumping to label constantly pk
auto 3000 if [$ mp> = ($ maxmp - 5)] say 'exura'

every 3 seconds, the bot sees that the current mana is greater than or equal to the maximum mana least 5. if talks 'exura'
Related Posts

0 comentários:

Post a Comment

 
Copyright © 2011 Tibia ElfBot NG. Designed by designer