KEYRING by Jaystonian (aka James76)
Discussion: http://eqemulator.net/forums/showthread.php?t=26177
Please forgive the indent loss. This should be straight-forward. The last modification in Doors::HandleClick, the /*NEW*/ lines indicate what to add, just look for the start and don't miss the curly braces. ================================================== ======================== [in SQL] Quote:
[in ./common/database.cpp add to method Database::DeleteCharacter(char *name)]: Quote:
[in ./zone/client.h add to header:] Quote:
[in ./zone/client.h add to private section of Client class definition:] Quote:
[in ./zone/client.h add to public section of Client class definition:] Quote:
[in ./zone/client.cpp add to constructor:] Quote:
[in ./zone/client.cpp add:] Quote:
[in ./common/emu_oplist.h add] Quote:
[in patch_Titanium.conf add] Quote:
[in ./zone/client_packet.h add] Quote:
[in ./zone/client_packet.cpp in function MapOpcodes() add] Quote:
[in ./zone/client_packet.cpp add] Quote:
[in ./zone/client_packet.cpp, insert in Client::FinishConnState2() just after SetEndurance():] Quote:
[in ./zone/doors.cpp in method Doors::HandleClick(...) add code on lines] Quote:
|
final note:
This is only for door keys.
|
Quote:
Thanks for the code submission! Have you tested this and verified that it all works? I can't wait to get this on my server and try it out :) |
Yes, flawless victory.
|
Great work! Would you mind posting a diff, or at the least approximate line numbers?
|
Quote:
Working down my list of mods, line 493 ./common/database.cpp line 46 ./zone/client.h (header section) line 877 ./zone/client.h (private section) line 190 ./zone/client.h (public section) line 3281 ./zone/client.cpp (4 methods to insert) line 318 ./zone/client_packet.cpp line 7000 ./zone/client_packet.cpp (add Client::Handle_OP_KeyRing()) line 6436 ./zone/client_packet.cpp (mod FinishConnState2()) line 165 ./zone/doors.cpp (this is start of section) You may find it easier to open some sort of text editor, copy my entire post over, and delete each section as you add it in. |
Quote:
|
I think the port into Seb is an object in the doors table. So even though it isn't a door in the way you would normally think of one, I imagine it would be treated the same as far as the emulator and this code is concerned. Unless it is a zone point that requires a key or something. Don't really feel like searching the DB to check which one hehe.
|
bug found
Somehow it breaks the code for clicking on the factory door in Plane of Innovation after killing Xanamech. I get:
You got the door open. This is locked... Hold tight, I'll figure it out. |
The factory door is handled by a Perl script, because it requires a character flag, and not a key. The door is permalocked using keyitem 1, and it's up to the script to determine if the player can open the door or not, and if so to do it. There are also doors in a similar situation, but the door can accept two keys. In that case, the script would be the same except for looking for a global, it would look for one of the keys in the player's inventory. Here is the script:
Code:
sub EVENT_CLICKDOOR { |
ok I had some time to look at this... i disabled my code and I found I could click on the door for a while and it still wouldn't open. It looks like Client::Message_StringID(4,DOORS_LOCKED) has been hijacked with a flags check to unlock the door....
So one fix and one change. In ./zone/doors.cpp it should look like: Code:
// a key is required or the door is locked but can be picked or both Then in ./zone/client.cpp add to very start of Client::KeyRingAdd() Code:
if(0==item_id)return; |
I think you missed Cavedude's post :P
|
I'll be a few days at least (probably more) before I can get this and everything else posted in this section looked at. R.I.P free time =p
|
Quote:
I have yet to understand what the idea is behind all this 'closed doors' operation. |
LOL, well I can certainly build a working source and test it for bugs, but I am no where near good enough to read code and see if something is horribly wrong with it somewhere. I am sure that most of the time it would be just fine, but I am also sure that it would be done much sloppier than how KLS would add it. I know she sometimes edits the code some before actually adding it.
I feel like Derision would do a good job at it, but he isn't a developer yet. Not exactly sure where S2K is, but I know he was having some PC problems for a while. He may have just popped out as quickly as he popped back in :P No rush, KLS. I still haven't tested alot of the new code updates yet. I have been super busy with finalizing a zone I have been working on for about 4 months. It should be done in a day or 2 and I will try to get all of the new code submissions in and test them as best I can. I will let you all know what I find :) So far I know that my scribespells and traindiscs code works well. Though, I have been seeing a considerably large amount of "world zone disconnects". Where it will send a message like that and then say it reconnected to all zones in use by each zone name. It doesn't actually cause a crash as long as you stay in the zone, but if you try to zone out, you get booted back to login. Then, if you login again you are fine, at least until it happens again. Currently it seems to happen every couple of hours. I have seen this happen before, but never this bad. The only time in the past that I ever saw it was when I was using the emulator admin tool and doing database searches for accounts/characters. The only thing I can think of that is causing it now is the 1129 source, or custom code I have added in. Or, it could be that I gave 2 of my GMs remote database access recently. But, the problem happens even when neither of them are doing any changes/queries. I will look into this issue more later, but if anyone else is having this problem too, I would be glad to know that it isn't just me. Plus, that helps narrow down what is causing it. I guess I should have made a whole new support post about that issue lol. Got carried away =P |
All times are GMT -4. The time now is 12:57 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.