PDA

View Full Version : Key Ring / Character flag


LostZaphod
06-15-2006, 08:37 AM
I have been spending a lot of time in Ssrattemple and in Vex Thal. Does any one have the Emperor raid event in perl scripts?

I noticed that when using a key item, it does not add to the key ring. I have been on many raid events when every one was killed, and I would hate to have to gather all of the items to get back into Vex Thal. Here are some modifications that should be considered. Rather than make a one off solution, I also considered the PoP character flagging. The table could also be used to keep track of character flagging.

There are 2 perl side functions, get_characterflag and set_characterflag. The get_characterflag is used to find out if a character has a flag. There are 2 values passed in, keyid and keydesc. If the key id is not 0 the function searches for the keyid for that character (this would be a door key). If keyid =0 then the description is looked for. This way the function can be used for PoP quests. The set_characterflag works very similar. If they keyid is not 0 a search is done in the items table for that id, if found it is put on the description. If the keyid = 0 then the description must be filled in

There are 2 items that need to be considered, /keys and single quotes. I could not find a good way to deal with single quotes in the key description. If text is passed with a single quote, it will cause the SQL to be invalid returning false. Second item is /key, I could not find any code related to /key. We could do a select keydesc from character_flag where keyid <> 0 and charid=x. This would return the description of the door keys that the character has. When deleting a character the character_flat items would need to be deleted also.

But any ways here is the code

fathernitwit
06-18-2006, 08:32 AM
Howdy,
good to see somebody making some code changes around here (:
In the future, please post unified diffs of your changes to make it easier to apply/read.

as for keys, most of the functionality you did here is provided by the zone flag facility. This lets you put a flag requirement on a zone, and require that the character have the flag for that zone before entering. This applies to any way they might get into the zone, not just doors. On that note, I am not really happy with the zone flag stuff, and I want to tie it together with the doors/key items better.

I really dont want there to be two seperate systems for essentially the same thing... If you are interested in taking some guidance from me on how it should be implemented, I would be happy to discuss a good overall solution that you could then implement and after review, I will check in.