Mario Bros
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu function game_start()
{
// Set the initial state of all icon bar buttons
Button1.NormalGraphic = 2244;
Button2.NormalGraphic = 2256;
Button3.NormalGraphic = 2246;
Button4.NormalGraphic = 2247;
Button5.NormalGraphic = 2248;
Button6.NormalGraphic = 2252;
Button7.NormalGraphic = 2253;
Button8.NormalGraphic = 2249;
Button9.NormalGraphic = 2251;
Button10.NormalGraphic = 2250;
Button11.NormalGraphic = 2254;
Button12.NormalGraphic = 2255;
Button13.NormalGraphic = 2245;
}
function on_event(EventType event, int data)
{
if (event == eEventAddInventory || event == eEventLoseInventory)
{
if (cJulius.HasInventory(iCarKeys)) {
Button1.NormalGraphic = 2231;
} else {
Button1.NormalGraphic = 2244;
}
if (cJulius.HasInventory(iFlowInductor)) {
Button2.NormalGraphic = 2243;
} else {
Button2.NormalGraphic = 2256;
}
if (cJulius.HasInventory(iBackingPlate)) {
Button3.NormalGraphic = 2233;
} else {
Button3.NormalGraphic = 2246;
}
if (cJulius.HasInventory(iCog)) {
Button4.NormalGraphic = 2234;
} else {
Button4.NormalGraphic = 2247;
}
if (cJulius.HasInventory(iCarCoolant)) {
Button5.NormalGraphic = 2235;
} else {
Button5.NormalGraphic = 2248;
}
if (cJulius.HasInventory(iOilContainer)) {
Button6.NormalGraphic = 2239;
} else {
Button6.NormalGraphic = 2252;
}
if (cJulius.HasInventory(iCarPetrol)) {
Button7.NormalGraphic = 2240;
} else {
Button7.NormalGraphic = 2253;
}
if (cJulius.HasInventory(iDialFace1)) {
Button8.NormalGraphic = 2236;
} else {
Button8.NormalGraphic = 2249;
}
if (cJulius.HasInventory(iKeyboardKeys)) {
Button9.NormalGraphic = 2238;
} else {
Button9.NormalGraphic = 2251;
}
if (cJulius.HasInventory(iFuzzyDice)) {
Button10.NormalGraphic = 2237;
} else {
Button10.NormalGraphic = 2250;
}
if (cJulius.HasInventory(iElectricWireSilver)) {
Button11.NormalGraphic = 2241;
} else {
Button11.NormalGraphic = 2254;
}
if (cJulius.HasInventory(iBobbleHead)) {
Button12.NormalGraphic = 2242;
} else {
Button12.NormalGraphic = 2255;
}
if (cJulius.HasInventory(iGum)) {
Button13.NormalGraphic = 2232;
} else {
Button13.NormalGraphic = 2245;
}
}
}
function on_event(EventType event, int data)
{
if(event == eEventAddInventory)
{
if (cJulius.HasInventory(iCarKeys)) {
Button1.NormalGraphic = 2231;
} else {
Button1.NormalGraphic = 2244;
}
if (cJulius.HasInventory(iFlowInductor)) {
Button2.NormalGraphic = 2243;
} else {
Button2.NormalGraphic = 2243;
}
if (cJulius.HasInventory(iBackingPlate)) {
Button3.NormalGraphic = 2233;
} else {
Button3.NormalGraphic = 2246;
}
if (cJulius.HasInventory(iCog)) {
Button4.NormalGraphic = 2234;
} else {
Button4.NormalGraphic = 2247;
}
if (cJulius.HasInventory(iCarCoolant)) {
Button5.NormalGraphic = 2235;
} else {
Button5.NormalGraphic = 2248;
}
if (cJulius.HasInventory(iOilContainer)) {
Button6.NormalGraphic = 2239;
} else {
Button6.NormalGraphic = 2252;
}
if (cJulius.HasInventory(iCarPetrol)) {
Button7.NormalGraphic = 2240;
} else {
Button7.NormalGraphic = 2253;
}
if (cJulius.HasInventory(iDialFace1)) {
Button8.NormalGraphic = 2236;
} else {
Button8.NormalGraphic = 2249;
}
if (cJulius.HasInventory(iKeyboardKeys)) {
Button9.NormalGraphic = 2238;
} else {
Button9.NormalGraphic = 2251;
}
if (cJulius.HasInventory(iFuzzyDice)) {
Button10.NormalGraphic = 2237;
} else {
Button10.NormalGraphic = 2250;
}
if (cJulius.HasInventory(iElectricWireSilver)) {
Button11.NormalGraphic = 2241;
} else {
Button11.NormalGraphic = 2254;
}
if (cJulius.HasInventory(iBobbleHead)) {
Button12.NormalGraphic = 2240;
} else {
Button12.NormalGraphic = 2255;
}
if (cJulius.HasInventory(iGum)) {
Button13.NormalGraphic = 2232;
} else {
Button13.NormalGraphic = 2245;
}
}
else
{
if(event == eEventLoseInventory)
{
if (cJulius.HasInventory(iCarKeys)) {
Button1.NormalGraphic = 2231;
} else {
Button1.NormalGraphic = 2244;
}
if (cJulius.HasInventory(iFlowInductor)) {
Button2.NormalGraphic = 2243;
} else {
Button2.NormalGraphic = 2243;
}
if (cJulius.HasInventory(iBackingPlate)) {
Button3.NormalGraphic = 2233;
} else {
Button3.NormalGraphic = 2246;
}
if (cJulius.HasInventory(iCog)) {
Button4.NormalGraphic = 2234;
} else {
Button4.NormalGraphic = 2247;
}
if (cJulius.HasInventory(iCarCoolant)) {
Button5.NormalGraphic = 2235;
} else {
Button5.NormalGraphic = 2248;
}
if (cJulius.HasInventory(iOilContainer)) {
Button6.NormalGraphic = 2239;
} else {
Button6.NormalGraphic = 2252;
}
if (cJulius.HasInventory(iCarPetrol)) {
Button7.NormalGraphic = 2240;
} else {
Button7.NormalGraphic = 2253;
}
if (cJulius.HasInventory(iDialFace1)) {
Button8.NormalGraphic = 2236;
} else {
Button8.NormalGraphic = 2249;
}
if (cJulius.HasInventory(iKeyboardKeys)) {
Button9.NormalGraphic = 2238;
} else {
Button9.NormalGraphic = 2251;
}
if (cJulius.HasInventory(iFuzzyDice)) {
Button10.NormalGraphic = 2237;
} else {
Button10.NormalGraphic = 2250;
}
if (cJulius.HasInventory(iElectricWireSilver)) {
Button11.NormalGraphic = 2241;
} else {
Button11.NormalGraphic = 2254;
}
if (cJulius.HasInventory(iBobbleHead)) {
Button12.NormalGraphic = 2240;
} else {
Button12.NormalGraphic = 2255;
}
if (cJulius.HasInventory(iGum)) {
Button13.NormalGraphic = 2232;
} else {
Button13.NormalGraphic = 2245;
}
}
}
}
function on_event(EventType event, int data)
{
switch(event)
{
case eEventAddInventory:
switch(data)
{
case iCarKeys.ID:
Button1.NormalGraphic = 2231;
break;
// This graphic stays the same
/*
case iFlowInductor.ID:
Button2.NormalGraphic = 2243;
break;
*/
case iBackingPlate.ID:
Button3.NormalGraphic = 2234;
break;
case iCog.ID:
Button4.NormalGraphic = 2235;
break;
case iCarCoolant.ID:
Button5.NormalGraphic = 2239;
break;
case iOilContainer.ID:
Button6.NormalGraphic = 2240;
break;
case iCarPetrol.ID:
Button7.NormalGraphic = 2231;
break;
case iDialFace1.ID:
Button8.NormalGraphic = 2236;
break;
case iKeyboardKeys.ID:
Button9.NormalGraphic = 2238;
break;
case iFuzzyDice.ID:
Button10.NormalGraphic = 2237;
break;
case iElectricWireSilver.ID:
Button11.NormalGraphic = 2241;
break;
case iBobbleHead.ID:
Button12.NormalGraphic = 2240;
break;
case iGum.ID:
Button13.NormalGraphic = 2232;
break;
}
break;
case eEventLoseInventory:
switch(data)
{
case iCarKeys.ID:
Button1.NormalGraphic = 2244;
break;
// This graphic stays the same
/*
case iFlowInductor.ID:
Button2.NormalGraphic = 2243;
break;
*/
case iBackingPlate.ID:
Button3.NormalGraphic = 2246;
break;
case iCog.ID:
Button4.NormalGraphic = 2247;
break;
case iCarCoolant.ID:
Button5.NormalGraphic = 2248;
break;
case iOilContainer.ID:
Button6.NormalGraphic = 2252;
break;
case iCarPetrol.ID:
Button7.NormalGraphic = 2253;
break;
case iDialFace1.ID:
Button8.NormalGraphic = 2249;
break;
case iKeyboardKeys.ID:
Button9.NormalGraphic = 2251;
break;
case iFuzzyDice.ID:
Button10.NormalGraphic = 2250;
break;
case iElectricWireSilver.ID:
Button11.NormalGraphic = 2254;
break;
case iBobbleHead.ID:
Button12.NormalGraphic = 2255;
break;
case iGum.ID:
Button13.NormalGraphic = 2245;
break;
}
break;
}
}
bool wasInventoryEmpty;
function game_start()
{
wasInventoryEmpty = invMyWindow.ItemCount == 0;
}
function on_event(EventType event, int data)
{
if(event == eEventAddInventory)
{
if(wasInventoryEmpty && invMyWindow.ItemCount > 0) // First item(s) were added
{
button.NormalGraphic = 123;
// Anything else you want to have shown when there are items present
wasInventoryEmpty = false;
}
}
else
{
if(event == eEventLoseInventory)
{
if(!wasInventoryEmpty && invMyWindow.ItemCount == 0) // Last item was removed
{
button.NormalGraphic = 456;
// Anything else you want to have shown when there are no items present
wasInventoryEmpty = true;
}
}
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.416 seconds with 15 queries.