Al Capone
08-22-2007, 15:39
Hello!
I read Melmis tutorial (http://www.blackdtools.net/showthread.php?t=6966) and use it, but it wasn't always working properly. That's why I decided to make my own script, and show you how to make your cavebot to open door everytime.
What was the problem. The position of doors can be different.. they can be opened, closed, closed and locked. Thats why you have to use different HEX codes to go through.
Put your key into arrow slot. You have to wear it there whenever you're runing this script.
Here i wrote a numbers of sqm that will be used:
http://img528.imageshack.us/img528/531/doornb6.png
To start a part with door opening in your script make a label, e.g.
:door
Now you have to stand exactly in front of the door you want to open (sqm 1, and make a waypoint there.
:door
move 32655,31656,9
Open the door, step on sqm 2 and click "useItem <curent x,y,z>" in your Cavebot window.
:door
move 32655,31656,9
useItem 32655,31655,9
Step back on sqm 1 and close the door using a key, they have to be locked.
http://img468.imageshack.us/img468/7637/door2gj2.jpg
Now you have to get first HEX.
Melmis describes it perfectly so i quote him (i removed some unnecessary parts):
It is recomended you only are using one client when you try to do this. But if you have several clients online, first find out what ID your client has in the Proxy. To do this, I don't know if there is a better way, but I go to "tools" and use the "Fake messages to self" function and try different IDs there.
When you know what ID the right client is open the "Proxy" window. Here you check the small box called "log packets" and then you open [...] the door, then you uncheck the box. Now you should have a bunch of logged packets.
The ones we are interested in are the ones that have the prefix "GAMCLIENT-ID->( hex )". Try to find the first line that is sent FROM your client ( > ) and copy only the hex. But remove the first four characters from the hex, they're called headers and the "exiva" command automatically adds them.
http://img468.imageshack.us/img468/1852/proxyth4.jpg
Now you add the copied part (selected on yellow) and past it behind the comand "sayMessage exiva > ", like in an example:
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
now add it to your code.
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
The thing is, that when you use key on "not locked" door, the OTHER HEX are used. That's why you need to get this hex too. You have to lock door to unlock them in next try.
And here you go, door are not locked.
http://img528.imageshack.us/img528/1570/door1bx3.jpg
Run "PROXY" again, click on "clear logs", than log packets and use key on unlocked, but closed door (image) and copy the new HEX as you did it before.
make line like this:
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
and modify your code.
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
Now open the door, walk to sqm 3 and make a waypoint, after that you should wait 1 sec (waitX 1)
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
move 32655,31654,9
waitX 1
Under this, paste a line like that one:
IfTrue ($myy$#number=#XXXXX) Goto $nlineoflabel:LABELNAME$
:LABELNAME - this is the name of label you use at the beggining
XXXXX - this is the "Y" of your position on sqm 1. You should use $myy$ cords when you're moving south<->north and $myx$ if you move west<->east. through the door.
And here you go, the complete script to move through Ab'dendriiel Troll Cave first door.
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
move 32655,31654,9
waitX 1
IfTrue ($myy$#number=#31656) Goto $nlineoflabel:door$
Good Luck!
I read Melmis tutorial (http://www.blackdtools.net/showthread.php?t=6966) and use it, but it wasn't always working properly. That's why I decided to make my own script, and show you how to make your cavebot to open door everytime.
What was the problem. The position of doors can be different.. they can be opened, closed, closed and locked. Thats why you have to use different HEX codes to go through.
Put your key into arrow slot. You have to wear it there whenever you're runing this script.
Here i wrote a numbers of sqm that will be used:
http://img528.imageshack.us/img528/531/doornb6.png
To start a part with door opening in your script make a label, e.g.
:door
Now you have to stand exactly in front of the door you want to open (sqm 1, and make a waypoint there.
:door
move 32655,31656,9
Open the door, step on sqm 2 and click "useItem <curent x,y,z>" in your Cavebot window.
:door
move 32655,31656,9
useItem 32655,31655,9
Step back on sqm 1 and close the door using a key, they have to be locked.
http://img468.imageshack.us/img468/7637/door2gj2.jpg
Now you have to get first HEX.
Melmis describes it perfectly so i quote him (i removed some unnecessary parts):
It is recomended you only are using one client when you try to do this. But if you have several clients online, first find out what ID your client has in the Proxy. To do this, I don't know if there is a better way, but I go to "tools" and use the "Fake messages to self" function and try different IDs there.
When you know what ID the right client is open the "Proxy" window. Here you check the small box called "log packets" and then you open [...] the door, then you uncheck the box. Now you should have a bunch of logged packets.
The ones we are interested in are the ones that have the prefix "GAMCLIENT-ID->( hex )". Try to find the first line that is sent FROM your client ( > ) and copy only the hex. But remove the first four characters from the hex, they're called headers and the "exiva" command automatically adds them.
http://img468.imageshack.us/img468/1852/proxyth4.jpg
Now you add the copied part (selected on yellow) and past it behind the comand "sayMessage exiva > ", like in an example:
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
now add it to your code.
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
The thing is, that when you use key on "not locked" door, the OTHER HEX are used. That's why you need to get this hex too. You have to lock door to unlock them in next try.
And here you go, door are not locked.
http://img528.imageshack.us/img528/1570/door1bx3.jpg
Run "PROXY" again, click on "clear logs", than log packets and use key on unlocked, but closed door (image) and copy the new HEX as you did it before.
make line like this:
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
and modify your code.
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
Now open the door, walk to sqm 3 and make a waypoint, after that you should wait 1 sec (waitX 1)
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
move 32655,31654,9
waitX 1
Under this, paste a line like that one:
IfTrue ($myy$#number=#XXXXX) Goto $nlineoflabel:LABELNAME$
:LABELNAME - this is the name of label you use at the beggining
XXXXX - this is the "Y" of your position on sqm 1. You should use $myy$ cords when you're moving south<->north and $myx$ if you move west<->east. through the door.
And here you go, the complete script to move through Ab'dendriiel Troll Cave first door.
:door
move 32655,31656,9
useItem 32655,31655,9
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 33 18 01
sayMessage exiva > 83 FF FF 0A 00 00 99 0B 00 8F 7F A7 7B 09 32 18 01
move 32655,31654,9
waitX 1
IfTrue ($myy$#number=#31656) Goto $nlineoflabel:door$
Good Luck!