Server Totals
Deglos - (1)
Le'Or - (1)
Elysia - (1)
Ferrell - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 3
Gallery
  • M'Chek - Azlae vs Nixtixu
    Album name: DM Events
    Uploaded by: Hamlet
    Uploaded: Wed Aug 20, 2014 12:40 am

Links Menu

Please can any of you make a lock for me?

Moderators: Nighthawk4, Dungeon Masters

Please can any of you make a lock for me?

PostAuthor: Havoulov » Mon Aug 22, 2005 7:18 am

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*
User avatar
Havoulov
Team Member; Retired with Honors
 
Posts: 3429
Joined: Sun Mar 21, 2004 9:22 pm
Location: Just behind you!((Norway)) GMT+2

PostAuthor: Jonezie » Mon Aug 22, 2005 7:32 am

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.
Last edited by Jonezie on Mon Aug 22, 2005 7:39 am, edited 1 time in total.
User avatar
Jonezie
Team Member; Retired with Honors
 
Posts: 3906
Joined: Wed Jun 09, 2004 7:05 am
Location: Melbourne (GMT +10)

PostAuthor: Psyco » Mon Aug 22, 2005 7:34 am

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.
Player Housing info - This answers most questions people have. Read this before asking.
User avatar
Psyco
Elder Sage
 
Posts: 3297
Joined: Mon Jun 30, 2003 10:05 pm
Location: New Zealand (NZDT, +12 GMT)

PostAuthor: Havoulov » Mon Aug 22, 2005 7:39 am

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?
User avatar
Havoulov
Team Member; Retired with Honors
 
Posts: 3429
Joined: Sun Mar 21, 2004 9:22 pm
Location: Just behind you!((Norway)) GMT+2

PostAuthor: Mistcaller » Mon Aug 22, 2005 7:45 am

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.
User avatar
Mistcaller
Team Member; Retired with Honors
 
Posts: 5481
Joined: Sun Feb 09, 2003 3:42 pm
Location: Athens, Greece (GMT +2)

PostAuthor: Havoulov » Mon Aug 22, 2005 7:48 am

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.... )
User avatar
Havoulov
Team Member; Retired with Honors
 
Posts: 3429
Joined: Sun Mar 21, 2004 9:22 pm
Location: Just behind you!((Norway)) GMT+2

PostAuthor: Gorgon » Mon Aug 22, 2005 3:04 pm

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)
"God not only plays dice, he throws them in the corner where you can't see them."
-- Stephen William Hawking (b. 1942) --


Sprucing up ye olde NWN | Modifying nwn.ini and nwnplayer.ini | ~Rare Items Wanted~ | Stealth Modifiers
User avatar
Gorgon
QA's 2nd|CCC Mobster
QA's 2nd|CCC Mobster
 
Posts: 5866
Images: 38
Joined: Fri Oct 17, 2003 10:14 pm
Location: Vancouver, BC, Canada
Timezone: PDT -7

PostAuthor: Nighthawk4 » Mon Aug 22, 2005 3:24 pm

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.
Life is never as bad as you think it is, although that doesn't help at the time.

Orleron wrote:I think it's a fun idea if you can idiot-proof it. Problem is God always builds a better idiot. :P


Please visit:
Avlis UK, ACE Forum and SATF Forum

Image
User avatar
Nighthawk4
Eldest DM
Eldest DM
 
Posts: 23894
Images: 2
Joined: Fri Feb 07, 2003 8:32 pm
Location: The Home of the Bard of Avon
Timezone: GMT
DM Avatar: DruEl

PostAuthor: PlasmaJohn » Mon Aug 22, 2005 4:43 pm

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.
Calvin: This is so cool!
Hobbes: This is so stupid.
User avatar
PlasmaJohn
Team Member; Retired with Honors; Has a Tom Selleck Stache
 
Posts: 8822
Joined: Fri Dec 26, 2003 10:37 pm
Location: New Eden
Timezone: US/Eastern

PostAuthor: Nighthawk4 » Mon Aug 22, 2005 4:47 pm

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
Life is never as bad as you think it is, although that doesn't help at the time.

Orleron wrote:I think it's a fun idea if you can idiot-proof it. Problem is God always builds a better idiot. :P


Please visit:
Avlis UK, ACE Forum and SATF Forum

Image
User avatar
Nighthawk4
Eldest DM
Eldest DM
 
Posts: 23894
Images: 2
Joined: Fri Feb 07, 2003 8:32 pm
Location: The Home of the Bard of Avon
Timezone: GMT
DM Avatar: DruEl

PostAuthor: Havoulov » Mon Aug 22, 2005 6:03 pm

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....
User avatar
Havoulov
Team Member; Retired with Honors
 
Posts: 3429
Joined: Sun Mar 21, 2004 9:22 pm
Location: Just behind you!((Norway)) GMT+2

PostAuthor: Mistcaller » Mon Aug 22, 2005 6:09 pm

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.. :)
User avatar
Mistcaller
Team Member; Retired with Honors
 
Posts: 5481
Joined: Sun Feb 09, 2003 3:42 pm
Location: Athens, Greece (GMT +2)

PostAuthor: CPU » Tue Aug 23, 2005 2:20 am

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.
Avlis Housing Director
PM: Avlis Player Housing
Player Housing Information - This answers most questions people have. Please read this before asking.
User avatar
CPU
Team Member; Retired with Honors
 
Posts: 5163
Joined: Sat Apr 05, 2003 4:27 pm
Location: NY. USA (-4GMT)


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]