Better phBot API

I am developing some plugins to make life easier.

@Ryan

Can you add more functions to phBot API please? Currently lots of things cannot be done or can be done in very messy way.

For example I have to do most of actions with scripts and not by code because functions are not available for plugins.
stop_bot()
set_training_script(“unequip_some_item.txt”)
start_bot()
time.sleep(5.0)
set_training_script(“do_some_other_thing.txt”)
start_bot()
time.sleep(5.0)
stop_bot()

Conditions, training scripts, plugins everything is so messy.

Currently I need these functions for plugin:

  • get_active_training_script
  • disable_party_invite_accept_matching
  • enable_party_invite_accept_matching
  • equip_item
  • unequip_item
  • settleconsignment
  • beginconsignment
  • cast,Job - Caravan Bugle
  • begintargettrading
  • teleport,Ferry Ticket Seller
  • teleport,Boat
  • settletargettrading

have you not checked the API? you can do most of what you want with the current API. You just need to know how to use it.

https://projecthax.gitbook.io/phbot-plugins/phbot-api

I did but probably u didnt.

  • get_active_training_script
    https://projecthax.gitbook.io/phbot-plugins/phbot-api/training-area
  • disable_party_invite_accept_matching
    No API but you can make your own accept/decline with packets
  • enable_party_invite_accept_matching
    same as above
  • equip_item
    use get_inventory API for this
  • unequip_item
    dont really need any API, but can also use get_inventory
  • settleconsignment
    use get_npcs API to build your packet
  • beginconsignment
    use get_npcs API to build your packet
  • cast,Job - Caravan Bugle
    cast packets are blocked
  • begintargettrading
    use get_npcs API to build your packet
  • teleport,Ferry Ticket Seller
    use get_npcs and get_teleport_data API to build your packet
  • teleport,Boat
    same as above
  • settletargettrading
    use get_npcs API to build your packet

I asked for improvement on API. What you are suggesting is messy way I explained in first post.

Instead of finding op codes, building packets and injecting. These actions could be available in API with much less effort since they are already in application itself (Not available through API).

I read some forum posts and saw some requests accepted and implemented.

Ya i know, just saying how you can do it with the current tools at hand if you needed it now. Of course it would be nice to have an API for everything.

More functions would be great and easy for my current project.