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
change graphic?

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

Author Message
Yerome



Joined: 07 Sep 2007
Posts: 5

PostPosted: Mon Sep 10, 2007 5:11 am    Post subject: change graphic? Reply with quote

How can i change graphic to a player?
GetObjProperty(who,"graphic");
SetObjProperty(who,"graphic",133);

I found 133 in inside uo as some dragon.. but its no work on me... any idea?

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Mon Sep 10, 2007 5:24 am    Post subject: Reply with quote

gotta change the players graphic member. so something like

who.graphic := 133;

Author Message
Yerome



Joined: 07 Sep 2007
Posts: 5

PostPosted: Mon Sep 10, 2007 6:52 am    Post subject: Reply with quote

mr bubbles wrote:
gotta change the players graphic member. so something like

who.graphic := 133;


And when i want to swap between them?
player click on item and it change his graphic and second click turn him back.
Code:

use uo;
use os;
use unicode;


program gump(who);
var human:=Cint(GetObjProperty(who,"graphic"));
who.graphic := 7;


if (who.graphic==7);
who.graphic :=human;
endif;
SendSysMessage(who,"bla bla");


but this script save his property actually.. i need to save his property permanently.

Author Message
Tritan



Joined: 04 Feb 2006
Posts: 136
Location: Illinois, USA

PostPosted: Mon Sep 10, 2007 1:40 pm    Post subject: Reply with quote

You want to this to based off and item getting used?

In order to do that you would first have to check to see what the players current graphic is then change it accordingly.

Code:
use uo;
use os;
use unicode;

program gump(who);
var human_form:=Cint(GetObjProperty(who,"human"));
var beast_form:=Cint(GetObjProperty(who,"beast"));
// Check if prop is set, if not set it now.
if (!beast_form)
beast_form:=7;
SetObjProperty (who, "beast", beast_form);
endif

// Check if prop is set, if not set it now.
if (!human_form)
human_form:=who.graphic;
SetObjProperty (who,"human", human_form);
endif

if (who.graphic==beast_form);
who.graphic :=human_form;
elseif (who.graphic==human_form)
who.graphic := beast_form;
endif;

SendSysMessage(who,"bla bla");


This would allow for the switching between the two graphics when called depending on the current form the player is set to currently. You can either set the beast form in the script or have it be another cprop on the player. I showed the example of using a cprop on the player.

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

 




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