new questions getting item graphics on a gump

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Chilliden

new questions getting item graphics on a gump

Post by Chilliden »

i want to check a mobiles backpack if it contains certain items and if it does, show the graphic on the gump.

Code: Select all

var RedCactusSeed		:= GetObjTypeByName   ("RedCactusSeed");
var BlueCactusSeed		:= GetObjTypeByName   ("BlueCactusSeed");
var GreenCactusSeed	:= GetObjTypeByName   ("GreenCactusSeed");
var ShineyCactusSeed 	:= GetObjTypeByName   ("ShineyCactusSeed");
var DarkCactusSeed     	:= GetObjTypeByName   ("DarkCactusSeed");
var CuteCactusSeed    	:= GetObjTypeByName   ("CuteCactusSeed");

var RedCactusSeed1, GreenCactusSeed1,BlueCactusSeed1,ShineyCactusSeed1,DarkCactusSeed1,CuteCactusSeed1;
	
foreach seed in enumerateitemsincontainer(who.backpack)
	
	if (seed.objtype==RedCactusSeed)
		RedCactusSeed1:=1;
		gfdata[7]:= seed.Graphic;
                endif
endforeach

i hope someone can help me :)
Post Reply