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?
change graphic?
-
mr bubbles
- Grandmaster Poster
- Posts: 120
- Joined: Thu Jan 18, 2007 2:34 am
And when i want to swap between them?mr bubbles wrote:gotta change the players graphic member. so something like
who.graphic := 133;
player click on item and it change his graphic and second click turn him back.
Code: Select all
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");
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.
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.
In order to do that you would first have to check to see what the players current graphic is then change it accordingly.
Code: Select all
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");