PenUltima Online

It is currently Sat Sep 06, 2008 10:33 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Props
PostPosted: Tue Sep 25, 2007 12:58 pm 
Offline

Joined: Tue Sep 25, 2007 12:54 pm
Posts: 1
Hey guys, Im needing a little hand with using the .setobjproperty (yeah, must be with this command)

I'd REAAALLY apreciate if anyone could tell me how to:

edit stack amounts ( I mean, is .setobjproperty what?? for blankscrolls for example)

need help also in cursing and removing cursing with the setobjproperty

also in changing color and name... and in setting items to decrease skills, raise i already know (with the skilladvamount prop)

it MUST be with the .setobjproperty

thanks a lot buddys, u saved me life :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 25, 2007 3:24 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1127
Location: Southern Central USA
Editing amounts of items in a stack is done by editing the member amount not by a Custom Property (CProp).

Example:

stacked_item.amount := stacked_item.amount -1;
will reduce the amount of the stacked item by one.

Colour and name are handled the same way.
item.color := 33;
colour number 33 is a shade of red so the item will now have the hue of red.

You can use the SetName() function or use the name member in the same way as I did above with color.

item.name := "new name";

The methods I described above are for editing those values from within a script. You would have to write them into a command if you want them to be done with a <dot> command.

As far as cursed items and skilld ropping is concerned that will depend on the scripts you are running.

A couple last thoughts: the GM command .propedit is another way to edit CProps and as a GM you also have access to the .info command which may let you edit a lot of the member properties depending on which version of scripts you are running.


Here's a copy of a command I wrote to allow changing a colour of an item. You can modify it to chanmge other properties such name, desc, and amount.

Code:
use uo;
use os;

include "include/client";


program color(who, textline)
        if (!textline)
            SendSysMessage (who, "Usage is: color [integer] or 'none' (without the quotes)", color := 88);
            return;
        endif
   var item := target(who);
        if (textline == "none")
            item.color := 0;
            return;
        endif
        item.color := CINT (textline) + 2; // We add 2 because the colour numbers in Inside UO are off by 2
        return;
       

endprogram

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl