PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Props

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion
Display posts from previous:   

Author Message
cow1234



Joined: 25 Sep 2007
Posts: 1

PostPosted: Tue Sep 25, 2007 4:58 pm    Post subject: Props Reply with quote

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 Smile

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1080
Location: Southern Central USA

PostPosted: Tue Sep 25, 2007 7:24 pm    Post subject: Reply with quote

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

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty