PenUltima Online

It is currently Sat Sep 06, 2008 1:31 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: change graphic?
PostPosted: Mon Sep 10, 2007 1:11 am 
Offline

Joined: Fri Sep 07, 2007 8:43 am
Posts: 5
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 10, 2007 1:24 am 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
gotta change the players graphic member. so something like

who.graphic := 133;


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 10, 2007 2:52 am 
Offline

Joined: Fri Sep 07, 2007 8:43 am
Posts: 5
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 10, 2007 9:40 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
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.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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