This plugin adds some additional script commands that are useful for automating things such as dungeons. Some of these commands arent that useful to most people but thought I would share anyway as I have made them for people in the past.

If you have any other ideas let me know and I’ll consider adding them

List of current commands:

LeaveParty…Leave the party

Notification,title,message… show a windows notification, bot must be minimized

NotifyList,message… Create a notification in the notifcation list

PlaySound,ding.wav…wav file must be in your phbot folder

SetScript,scriptname.txt… script must be in your phbot folder

CloseBot…kills the bot immediately

CloseBot,in,X… kills the bot in X amount of minutes… Example CloseBot,in,5

CloseBot,at,00:00…kills the bot at a specific time… 24hour clock

StartBot,in,X… Stops then Starts bot in X minutes… Example StartBot,in,5

StartBot,at,00:00… Starts bot at specified time… 24hour clock

GoClientless… Kills the Client instantly

StopStart…Stops and starts the bot 1 second later

StartTrace,player…Starts tracing a player

RemoveSkill,skillname…Removes the skill if active

Drop,itemname… Drops the first stack of the specified item

OpenphBot,commandlinearguments…opens a bot with the specified arguements

CustomNPC,savedname… Executes a custom set of NPC commands that you record and save, see tutorial below

Download: [Link] Right click > save as .py

--------------------------- Custom NPC Recording ---------------------------
useful for custom quests

  1. Name of the saved command, this is used in the script command (see example below)
  2. Start Recording after you have entered a Save Name. Recording is started after you select the NPC and will end once you press Stop Recording. It will record every client action from when its starts to when you end it so only do the actions you want to record.
  3. Shows all the current saved commands, commands are saved in a json file so they can be used by any char once recorded
  4. Deletes the currently selected command
  5. Shows the recorded string of packets for the currently selected command

Script Example


Change Log v1.1

  • Added the ability to record and execute custom NPC commands, useful for adding custom quests to your scripts (see tutorial in original post)

That’s sick dude, scripts are getting powerful and powerful.

1 Like

Very good!! :slight_smile: <3

1 Like

hello @DeRidder14

i tried to use CustomNPC with recording the packets iam doing at the npc like buying trade

the script is working well but once iam teleporting or re-log when the bot try to call the saved packets client crashes

any idea ?

Is your server blocking auto trade? Likely the packets are changing every time. You could record them again and see if they are different from the first time you recorded.

yes my server blocking auto trade

but the script only make my game crashes if it got teleported dunno why

i recorded the packets with 3 different logins / chars all the time was same recorded packets

thanks but after maintenance on servers sometimes only one letter changes .should have opcode edit option . it would be better if it save packages after exiting npc

You can edit it in the CustomNPC.json. No its better to manually stop it, some NPCs send the close packet when another dialog is opened so it would not capture all the packets.

1 Like

unfortunately it failed maybe phbot maybe your fault. It doesn’t need to stop phbot when running “CustomNPC”. If he stops the phbot and writes the opcodes, phbot starts the command and the character gets stuck somewhere.

No i made it skip the command when the bot starts again. Use “continue town script” option in the bot if you are doing it on town.

If you don’t understand because my English is bad, I can post it as a video. and I seem to be speaking rudely as this google translates like board

No youre fine… send me a message with a video if you want, or on the phbot discord.

you did a really good job i was messing with “opcode” one by one like a fool .Now I’ll just edit CustomNPC.json, time won’t be wasted :smiley:

1 Like

sometimes the bot just ignore the custom and keep doing the walk, for example i set for:


Is it completing all the packet injects when it does work?

Also does the log say anything if it skips?

yes, when work he does all complet, but when i stop return and check if will work again he dont works… just sometimes and in the log dont say nothing, only ignore the ‘‘custom’’ keep going the walks, somelike that (imply the custom are in the middle…)

and here the packet
show packet1

Hi , is possibble i can set command use returnscroll at (time) 00.00 ?

Just use the start bot at time command and use a return scroll sometime after that in your script.

sometimes , when character stay at different place from traning area ,
script wont allow to use return scroll , that y i ask if there any force use return scroll command with specific time . like u press on the return scroll button at phbot.