I have two edits....ish..
I have a bankstone and I am trying to make it so I can set the owner, and only he or a staff member can open that bank stone, while if there is no owner set, anyone can open the bankstone...
Here are my two scripts...
setowner.src: Needs to set a property on the bank with the same value as the owners name.
Code: Select all
use uo;
program textcmd_setowner( who, text )
SendSysMessage( who, "Target the bank stone" );
var bankstone := TargetCoordinates( who );
SendSysMessage( who, "Target the new owner" );
var newowner := TargetCoordinates( who );
SetObjProperty(bankstone, "owner", newowner.name);
SendSysMessage( who, "New owner set!" );
endprogramCode: Select all
var owner := GetObjProperty(item, "owner");
if (owner && owner != who.name && who.cmdlevel < 2 )
SendSysMessage( who, "This is not your bankstone!" );
return;
endifMy problem is that at the moment everyone can open it, weather it has an owner set or not..
Any issues that are obvious?