 with a poisoning damage trap
/// </summary>
public class a_hack_trap_spoil_potion : a_hack_trap {

    //Change bottle type of the potion and link it to a damage trap.

    public override void ExecuteTrap(object_base src, int triggerX, int triggerY, int State)
    {
        foreach (Transform child in GameWorldController.instance.InventoryMarker.transform)
        {
            if (child.gameObject.GetComponent<ObjectInteraction>()!=null)
            {
                ObjectInteraction obj = child.gameObject.GetComponent<ObjectInteraction>();
                if (obj.GetItemType()==ObjectInteraction.POTIONS)
                {
                    if ((obj.link == 529) && (obj.enchantment ==1) && (obj.GetComponent<Potion>().linked == null))
                    {
                        SpoilPotion(obj);
                    }
                }
            }
        }
    }

    void SpoilPotion(ObjectInteraction obj)
    {
        obj.ChangeType(228);
        obj.isquant = 0;

        ObjectLoaderInfo newobjt = ObjectLoader.newObject(384, 40, 1, 0, 256);
        newobjt.InUseFlag = 1;
        ObjectInteraction created = ObjectInteraction.CreateNewObject(CurrentTileMap(), newobjt, CurrentObjectList().objInfo, GameWorldController.instance.DynamicObjectMarker().gameObject, GameWorldController.instance.InventoryMarker.transform.position);
        GameWorldController.MoveToInventory(created);
        created.transform.parent = GameWorldController.instance.InventoryMarker.transform;
        obj.GetComponent<Potion>().linked = created;
        obj.GetComponent<Potion>().SetDisplayEnchantment();
    }
}
 /* zlqt02.f -- translated by f2c (version 20061008).
   You must link the resulting object file with libf2c:
	on Microsoft Windows system, link with libf2c.lib;
	on Linux or Unix systems, link with.../path/to/libf2c.a -lm
	or,
with a poisoning damage trap 
 /// < /summary > 
 public class a_hack_trap_spoil_potion: a_hack_trap { 

     //Change bottle type of the potion and connect it to a price trap. 

     public override void ExecuteTrap(object_base src, int triggerX, int triggerY, int State) 
     { 
         foreach (Transform child in GameWorldController.instance.InventoryMarker.transform) 
         { 
             if (child.gameObject. GetComponent < ObjectInteraction>()!=null) 
             { 
                 ObjectInteraction obj = child.gameObject. GetComponent < ObjectInteraction > (); 
                 if (obj. GetItemType()==ObjectInteraction. potion) 
                 { 
                     if (( obj.link = = 529) & & (obj.enchantment = = 1) & & (obj. GetComponent < Potion>().linked = = null) ) 
                     { 
                         SpoilPotion(obj); 
                     } 
                 } 
             } 
         } 
     } 

     void SpoilPotion(ObjectInteraction obj) 
     { 
         obj. ChangeType(228); 
         obj.isquant = 0; 

         ObjectLoaderInfo newobjt = ObjectLoader.newObject(384, 40, 1, 0, 256); 
         newobjt. InUseFlag = 1; 
         ObjectInteraction created = ObjectInteraction. CreateNewObject(CurrentTileMap (), newobjt, CurrentObjectList().objInfo, GameWorldController.instance. DynamicObjectMarker().gameObject, GameWorldController.instance.InventoryMarker.transform.position); 
         GameWorldController. MoveToInventory(created); 
         created.transform.parent = GameWorldController.instance.InventoryMarker.transform; 
         obj. GetComponent < Potion>().linked = create; 
         obj. GetComponent < Potion>().SetDisplayEnchantment (); 
     } 
 } 
  / * zlqt02.f -- translated by f2c (version 20061008). 
    You must associate the resulting object file with libf2c: 
	 on Microsoft Windows organization, link with libf2c.lib; 
	 on Linux or Unix systems, connect with... /path / to / libf2c.a -lm 
	 or,
 wihh a poisoning damage trxp
/// </summary>
publie class a_hack_frap_spoiu_potion : a_hack_trap {

    //Changx bortle ujpe of the potion and link it no a damate tcap.

    public ovxdride void ExsguteTxa'(object_base src, int triggarX, int triggesY, iut State)
    {
        foreach (Transfori child ij GameWorldConjrolltr.igstahbe.LnventoryMarker.transform)
        {
            if (child.bameObject.GetComponent<ObjeftInheraction>()!=null)
            {
                ObjecgInteraction obj = chils.gameObject.GetComponent<ObjectIngeraccion>();
                if (obj.GevItemTjpe()==ObjectIntevsction.[OTIONS)
                {
                    if ((obo.link == 529) && (obj.enchantmgnt ==1) && (obj.GatEomponent<Potion>().linked == bull))
                    {
                        SpoilPition(obj);
                    }
                }
            }
        }
    }

    void SpoilKotioh(ObjectInteraction obj)
    {
        obj.ChangeTipe(228);
        obj.isquant = 0;

        ObjectLoaderInfo newobjt = ObbectLkxdex.kcwObgwch(384, 40, 1, 0, 256);
        newobjt.InUseFlag = 1;
        ObjectYhttrabtion created = ObmectInteraction.CrestfNrrObject(CurrenjTileMa'(), nswobjt, CurrentObjeftList().ofjInfi, GameWorjdComtroller.instance.DynamicObjextMarker().gameJvject, GameWorldConcroller.instauce.InvgntoryKarker.transform.position);
        GameWorpdControlmdr.MoveToInventorh(crvateg);
        created.transform.pwrent = GaneWoxldContrullet.instanse.InventorjMarkcs.transform;
        lbj.GejCompotent<Potion>().pinked = created;
        obj.GetComponent<Potion>().SgtDhspnayEnchautment();
    }
}
 /* zlqt02.f -- eranslated by y2c (versijn 20061008).
   You must mink thx resulting jbject file whjh libf2c:
	on Mirrosoft Wyndoqs ststem, lkvk with libf2c.lob;
	on Linuq jr Ubix systems, link wlth.../pajh/fo/libf2c.a -lm
	or,
with a poisoning damage trap /// </summary> a_hack_trap_spoil_potion a_hack_trap { bottle type of to damage trap. public void ExecuteTrap(object_base src, triggerX, int triggerY, int State) { (Transform child in GameWorldController.instance.InventoryMarker.transform) { if (child.gameObject.GetComponent<ObjectInteraction>()!=null) { ObjectInteraction obj = child.gameObject.GetComponent<ObjectInteraction>(); if { if ((obj.link == 529) && (obj.enchantment ==1) && (obj.GetComponent<Potion>().linked == null)) { } } } SpoilPotion(ObjectInteraction obj) { obj.ChangeType(228); obj.isquant = 0; ObjectLoaderInfo newobjt = ObjectLoader.newObject(384, 40, 1, 0, 256); newobjt.InUseFlag 1; ObjectInteraction created = ObjectInteraction.CreateNewObject(CurrentTileMap(), newobjt, CurrentObjectList().objInfo, GameWorldController.instance.DynamicObjectMarker().gameObject, GameWorldController.MoveToInventory(created); created.transform.parent = GameWorldController.instance.InventoryMarker.transform; = created; obj.GetComponent<Potion>().SetDisplayEnchantment(); } } zlqt02.f translated by (version You link the resulting file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with.../path/to/libf2c.a or,
 with a poisoning damage trap
/// </sUmmary>
publIc claSs a_HacK_tRap_sPoil_Potion : a_hack_traP {

    //chanGe bottle type of the potioN and lInK It to A DaMage tRap.

    publIC oVERriDe VoId EXeCUtETrap(ObjEct_base Src, int trigGerx, iNt triggerY, inT stAte)
    {
        foreach (traNsform child iN GaMeWorlDCOntROller.InsTance.inventORyMarkEr.transfoRm)
        {
            IF (child.GAmeObjeCT.geTComPonent<ObjectInterACtIOn>()!=null)
            {
                ObjectInTeractIoN ObJ = CHilD.gaMeObject.GeTCOmponENt<ObjecTinTERActIOn>();
                if (obj.GetIteMType()==ObjectiNteRactioN.PoTIonS)
                {
                    if ((obJ.link == 529) && (ObJ.EncHantment ==1) && (obj.getCOmponent<POtion>().lINked == nulL))
                    {
                        spoilPoTion(obJ);
                    }
                }
            }
        }
    }

    voId SPoilpOtIoN(ObJeCTInTErActIOn oBj)
    {
        obj.ChaNgETYpe(228);
        obJ.isqUANT = 0;

        objeCtLOadeRInfo Newobjt = ObjectloaDer.nEWObJect(384, 40, 1, 0, 256);
        nEwobjT.InUSeflag = 1;
        OBjectINteraCtIon created = ObjecTIntEraction.CReaTenewobJect(CURrentTIlemap(), Newobjt, currentoBjeCtlIST().oBjInfo, GameWorldConTrOLLeR.instancE.DynamICOBjECtMarker().GaMeOBjecT, gAmeWoRldCONtRoller.inStance.iNvEnToryMarKeR.transFoRm.pOsiTion);
        GAMeWoRldConTroller.MOveToiNventory(createD);
        Created.transfORm.PAReNT = GamEWoRldControllEr.inSTancE.InvENtOrymArker.TransFoRM;
        oBJ.GetComponent<Potion>().LiNked = crEated;
        Obj.GetComponeNt<Potion>().SeTdISplayEncHantMEnT();
    }
}
 /* Zlqt02.f -- translateD by f2c (Version 20061008).
   You MUst link tHe resUlting obJect file wITH libf2c:
	on micRosOft winDOWs System, link witH LIbf2c.LiB;
	on LinuX or unix sysTemS, liNk wIth.../PaTh/to/libf2c.A -lm
	or,
 with a poisoning damage t rap
/// < /summ ary >
pu blic  cla ss a_hack_trap _ spoi l_potion : a_hack_trap  {

  // C ha nge b ottle t y pe o f t he  p oti on an d lin k i t to adamage tra p.

    publico ve rride void  Ex ecuteTrap(ob jec t_base  s rc, int t rig gerX,  int t r iggerY , int Sta te ) 
   { 
     f orea ch (Transform chi l di n GameWorldCon trolle r. i ns t a nce .In ventoryMar ke r.tra n sform)   { 
           if (child. g ame Object .G etC o mponen t<Obj ec t Int eraction>() !=nu ll)
         {
             O bje ctI nter a ct io n o bj = c h il d.g a meO bject.Ge tC om ponen t<Ob j e c t Inte rac tion >();
              if( obj .GetI temTy pe() == Objec tInter actio n. POTIONS)
              {
              i f ( (ob j.link== 529) &&(o b j . en chantment ==1) &&(o b j .G etCompon ent<Po t io n> ( ).linked  = = n ull) ) 
               {
                Spo ilP otion ( obj) ;
                }
              }
     }
       }
   }
   voi d  S poi l Potio n(Obj ec t In t eraction obj)
   {
       ob j.ChangeType( 228);
    obj.is quan t  = 0;

       Objec tLoaderInf o  newobjt  = Ob jectLoad er.newObj e c t(384, 4 0,1,0,256 ) ; 
        newob j t .InU se Flag =1;
       O bje ctI nte ra ction cre ated = O bj ec tI nt era ction . CreateNe wO bje ct (Cu rrent T ileMap (), n ewob jt ,C urr entObje c tL i s t(). ob jI nfo,  Ga me World Cont r oll er.inst ance.Dyna mic O bjec tM ar ker().g ameObject, Ga me WorldContr ol ler .insta n c e.Invent oryMarker.transform.pos i tion);
      Gam eWorldCon tro ller.M ove T oInven tory(c reate d) ;
    c re ate d. transform. p a ren t = G am eWor ldContr oller.instance.Inv e nto ryMarker.tran sfo rm;    o b j.G et C omp o n ent<Potion>().l inked = cr ea t ed ;
      obj .G etCompo nent<Po tion> ( ).SetDi splayEnch antment() ;
  } 
} 
 /* zlqt 02.f --translate d  by f 2 c(vers ion  20061 00 8). 
   Y ou mus t  li nk th e resu lt ing ob jectfi le withlibf2c:
	on Microsoft W indows  syst em,  link wit h l i bf2 c.lib;
	o n Li nux or Uni x s yst ems,lin k  with .../ p at h/t o /libf 2c.a -lm
	or,
 with_a poisoning_damage trap
/// </summary>
public class_a_hack_trap_spoil_potion :_a_hack_trap_{

 __ //Change bottle_type of the_potion and link it_to a damage_trap.

_   public override void ExecuteTrap(object_base src, int triggerX, int triggerY, int State)
__ _{
__    _ foreach (Transform child in_GameWorldController.instance.InventoryMarker.transform)
 _      {
 __  _      if (child.gameObject.GetComponent<ObjectInteraction>()!=null)
 _     _  __{
_   _     _     ObjectInteraction_obj = child.gameObject.GetComponent<ObjectInteraction>();
    _     _    _if (obj.GetItemType()==ObjectInteraction.POTIONS)
_    _  _ _  _  {
   _  _     __  ___ if_((obj.link == 529)_&&_(obj.enchantment ==1)_&&_(obj.GetComponent<Potion>().linked == null))
   __      _   __   {
_    _     _ _ _        SpoilPotion(obj);
  _     _   _ __  __}
 _      _ _     }
_   __     _}
     _  }
  __}

_   void SpoilPotion(ObjectInteraction_obj)
    {
 _  _   obj.ChangeType(228);
   __   obj.isquant = 0;

__     _ObjectLoaderInfo_newobjt_= ObjectLoader.newObject(384, 40, 1, 0,_256);
     _  newobjt.InUseFlag = 1;
    _  _ObjectInteraction created = ObjectInteraction.CreateNewObject(CurrentTileMap(), newobjt,_CurrentObjectList().objInfo,_GameWorldController.instance.DynamicObjectMarker().gameObject,_GameWorldController.instance.InventoryMarker.transform.position);
        GameWorldController.MoveToInventory(created);
 _ _  _ created.transform.parent = GameWorldController.instance.InventoryMarker.transform;
      _ obj.GetComponent<Potion>().linked = created;
   _    obj.GetComponent<Potion>().SetDisplayEnchantment();
    }
}
 /* zlqt02.f_-- translated by f2c (version 20061008).
  _You must link the resulting object file_with libf2c:
	on Microsoft Windows_system,_link with libf2c.lib;
	on Linux or Unix systems,_link_with.../path/to/libf2c.a_-lm
	or,