Mens Rea wrote:Hmm I logged into the UOSA tutorial server and purchased some blank keys, I tried copying the keys and got the same message when the key I was copying was in my pack as when it was on the floor. Is the demo server not the demo?
Our demo server is a an experiment in getting RunUO scripts to run on an actual demo server. This means that any error in our scripts will appear on both the demo server and the live server.
Mens Rea wrote:Furthermore, on current UOSA you can copy a non-locked down key without it being in your pack. I just tried it.
So unless something has changed between the demo and UOSA then I think you may be mistaken on this issue Kaivan.
So, if you can copy a key which is not in your pack then you should be able to copy a key which is locked down. At the moment you get a "This is not accessible" which due to recent discussions may not be era accurate.
I think the above answer covers these issues as well.
My best suggestion is that if you want to see how something worked in the demo, its best to actually fire up the demo or look at the code.
In that regard, for reference, here is the code in the demo that shows that you cannot copy a key that is not in your pack:
First, this piece of code is run when you first attempt to use a key:
Code: Select all
#on use(object user)
{
if(!Q4CD(this, user))
{
return(0x00);
}
The referenced function, Q4CD contains the following code:
Code: Select all
integer Q4CD(object it, object user)
{
object Q4WD = getTopmostContainer(it);
if(Q4WD != user)
{
systemMessage(user, "That key is unreachable.");
return(0x00);
}
return(0x01);
}
Basically, this means that when you use a key it will check to see what the outermost container that is holding it is. Since players count as containers, if it is being held by a player, then the player becomes the outermost container. Once the outermost container has been determined, it compares that object (containers are objects) to the object that used the key. If the user of the key doesn't match the outermost container for the key, then it prevents you from attempting to use the key at all.
When attempting to copy a key, this piece of code is checked first:
Code: Select all
integer Q65M = 0x01;
if(hasObjVar(this, "whatIUnlock"))
{
barkTo(this, user, "What shall I use this key on?");
Q65M = 0x00;
}
else
{
barkTo(this, user, "This is a key blank. Which key would you like to make a copy of?");
Q65M = 0x01;
}
targetObj(user, this);
return(0x00);
}
This code checks to see if the key actually unlocks anything yet. If so, a flag is set (Q65M) to indicate that it does indeed unlock something. Otherwise, the flag is set differently. Finally, the keyholder is given a target cursor to target the object to unlock or copy.
Upon targeting the object, this piece of code is executed:
Code: Select all
#on targetobj(object user, object usedon)
{
if(!Q4CD(this, user))
{
return(0x00);
}
The above code is identical to that which is executed when the key is first used. Thus, if the target key is also not in the pack of the player who is attempting to copy it, the same message is given.
Finally, extending forward from the demo, no recorded changes exist (that I could find) that shows any difference in the way that key copying or use worked during T2A. I hope this clarifies the issue.