Page 1 of 1

Please can any of you make a lock for me?

PostPosted: Mon Aug 22, 2005 7:18 am
Author: Havoulov
In Avlis there is a system that uses a database entry for Ranks.

I want this rank attribute by itself to act as a key to a placable or door.

This is not such a big script i guess, but as i have heard it does not exist yet.

Sorry but i have no idea how to include database entries in a script.

Thank you for your trouble! If you need more info feel free to PM me..

PLEASE HELP!
*begs*

PostPosted: Mon Aug 22, 2005 7:32 am
Author: Jonezie
I wasn't aware that the ranks were set in the database, but it seems I was mistaken.

Anyways, the script you're looking for needs to be an OnFailToOpen script, something like:

Code: Select all
void main()
{
    object oPC = GetClickingObject();
    int iRank = GetPersistentInt(oPC, "Rank");

    if (iRank > 5)
        SetLocked(OBJECT_SELF, FALSE);
}

Assuming, for the moment, that the rank is stored as a persistent int on the PC. However, when there's lag about, the OnFailToOpen event WILL NOT FIRE, meaning that this sort of script really isn't viable in a PW. If it's for a single player mod, then there's no problems, but in something like Avlis, an item as the key is really the only option.

You'd also want to have an auto close/lock script on the door to relock it once the person has gone through.

PostPosted: Mon Aug 22, 2005 7:34 am
Author: Psyco
It has been used by both akn and oog in the past.

i know akn has ditched it, and i know oog has issues with it.

The problem is that the onfailtoopen script does not always fire, so often you end up locked out of an area just because.

If you want to go this way, do so at your own risk, i would not recommend it.

PostPosted: Mon Aug 22, 2005 7:39 am
Author: Havoulov
Is the rank saved differently for every guild? or is it so that the database doesn't know who has which rank...

Is the iRank for example AKNRank, or OoGRank?

PostPosted: Mon Aug 22, 2005 7:45 am
Author: Mistcaller
Each guild's rank variable has a different name which was (supposed to be) applied, when the guld leader item was made.
So yes, for AKN it may be AKNRank, for OoG OOG_Rank, etc.

PostPosted: Mon Aug 22, 2005 7:48 am
Author: Havoulov
You guys really rock my world!!!!

The Avlis Top brains all on it!

I have a question that i just send to Jonesie ,but since i have you all team work can save the day!

I Intended to use it for chests, so that different members would have different material access

The optimal would be so that all can load the chest but only the "key" owners could be able to remove.

But since that would interefere with the p-chest coding i take it as a no already

Propably as bad a s the lag is it doesn't matter since the p-chests suck anyway on lag! and none is left out!

Is that (mechanicly) more viable? (sorry Jonesie if you are currently answering that.... )

PostPosted: Mon Aug 22, 2005 3:04 pm
Author: Gorgon
Havoulov wrote:I Intended to use it for chests, so that different members would have different material access

The optimal would be so that all can load the chest but only the "key" owners could be able to remove.

But since that would interefere with the p-chest coding i take it as a no already


Persistant "display" chests already work this way. Anyone can look at the contents and deposit things, but only key holders can take things out. Places like FF-Trading even have drop boxes set up for this exact purpose.

The new text based chests can work like this as well according to the housing director here: http://www.avlis.org/viewtopic.php?p=538606#538606 (I think the name has been changed from ip-chest to ep-chest though)

PostPosted: Mon Aug 22, 2005 3:24 pm
Author: Nighthawk4
Does that explain the issues with the AKN Chests which were evident at the Weekend please? I think Bell Arren's Player (and perhaps someone else) reported these as a Bug.

PostPosted: Mon Aug 22, 2005 4:43 pm
Author: PlasmaJohn
Nighthawk4 wrote:Does that explain the issues with the AKN Chests which were evident at the Weekend please? I think Bell Arren's Player (and perhaps someone else) reported these as a Bug.

Completely different issue.

PostPosted: Mon Aug 22, 2005 4:47 pm
Author: Nighthawk4
PlasmaJohn wrote:
Nighthawk4 wrote:Does that explain the issues with the AKN Chests which were evident at the Weekend please? I think Bell Arren's Player (and perhaps someone else) reported these as a Bug.

Completely different issue.


OK - thanks PJ

PostPosted: Mon Aug 22, 2005 6:03 pm
Author: Havoulov
Gorgon wrote:
Havoulov wrote:I Intended to use it for chests, so that different members would have different material access

The optimal would be so that all can load the chest but only the "key" owners could be able to remove.

But since that would interefere with the p-chest coding i take it as a no already


Persistant "display" chests already work this way. Anyone can look at the contents and deposit things, but only key holders can take things out. Places like FF-Trading even have drop boxes set up for this exact purpose.

The new text based chests can work like this as well according to the housing director here: http://www.avlis.org/viewtopic.php?p=538606#538606 (I think the name has been changed from ip-chest to ep-chest though)


Would that be combinable with Jonezies script though? I know that CPU is VERY picky about altering p-chest scripts.... they have to be authorized all anew...

I would give this whole thing a try definatelly, although Jonezies (PM) idea of having the guild DM distributing keys at need is propably the easiest and more fesible....

PostPosted: Mon Aug 22, 2005 6:09 pm
Author: Mistcaller
although Jonezies (PM) idea of having the guild DM distributing keys at need is propably the easiest and more fesible....

Indeed. So you'd better follow that route.. :)

PostPosted: Tue Aug 23, 2005 2:20 am
Author: CPU
Havoulov wrote:The new text based chests can work like this as well according to the housing director here: http://www.avlis.org/viewtopic.php?p=538606#538606 (I think the name has been changed from ip-chest to ep-chest though)


That was a typo on my part. I should go back and fix that to prevent confusion.

Havoulov wrote:Would that be combinable with Jonezies script though? I know that CPU is VERY picky about altering p-chest scripts.... they have to be authorized all anew...


HEY! I resemble that! I don't like mucking about with established systems because it creates more work for the Team. I'm not a coder, so this requires someone else to review the code. The Team does such incredable stuff, especially when it comes to the coders, that the idea of pushing a single use, one player exception, is alot of work for the low payout. I'd prefer to keep the Team working on what they are (stuff for everyone on Avlis) then to sidetrack them with a player's personal use project. AND often times, most people's idea of what they want can be accomplished with pre-existing scripts.

New scripts in Player Housing = BAD.