Log in

View Full Version : [how to] open door with cavebot (100% working)



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!

Ernie
08-22-2007, 16:49
Really usefull for me!:D

Does this also works with the stone at edron orcs?

tito
08-22-2007, 17:22
yup, but i dunno what for all this use item etc

i just send packet for openin door with key and opening door without key if the door are lcoked the first one will open and if not the second one will 100% working :)

@script: ye its good, very good :p

Tescik2
08-22-2007, 19:37
I know about it since loooonger time, but it's very good for begginers and others :)

Very nice tutorial with images.

Regards,
Tescik2

Al Capone
08-22-2007, 23:20
Thanks for posts. Im glad you like it :)

tobbes
08-23-2007, 02:18
what about closing the door after you went trow it? :P

ps: for them who want to open several doors just need to switch the key by putting a other key into ammunition slot with exiva commands =)

Kocz
08-24-2007, 20:03
Good, it'll help lots.

zygfryd
04-26-2008, 20:59
Hello:). Some1 can help me, I need edit my script because he open the door, but if door is open he closed and w8. Some1 can help my, please


Sorry for maine english:):p

Zmulan
04-26-2008, 21:06
looks good, only one thing i can tell you to make it better:
when locking/unlocking door, use hotkeys, this way you don't need to have the key in ammo slot.

in the script, use the "hotkey-packet" instead of "ammo-to-door-packet"
I hope you understand what I mean.

zygfryd
04-26-2008, 21:26
Heh, If u can change this srept??:p

Xinek
04-27-2008, 11:51
Very useful tutorial ;)

Thanks
Xinek

zygfryd
04-30-2008, 23:58
Some1 can helpp, and change this script plsssss