Jump to content

Photo

Only one of my two scripts can work at all please help


  • Please log in to reply
2 replies to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 02 March 2018 - 05:59 PM

Scripts
Import ASM FFC Script
Import ASM Item Script
Import ASM Global Script
Compile ZScript...
 
 
 
Assign Compiled Script
FFC
Global
Item
 
 
 
Here is my ffc script:
import "std.zh"
ffc script GiveRedRing
{
  void run()
  {
    if ( Game->GetCurDMap() == 0 )
    {
      if ( Game->GetCurScreen() == 0x00 )
      {
        if ( Link->Item[18] == false )
        {
          Link->Item[18] = true;
        }
      }
    }
  }
}
 
 
 
Here is my item script:
import "std.zh"
item script DeathPotionWhenUsed
{
  void run()
  {
    while ( Game->Counter[CR_LIFE] != 0 )
    {
      Game->Counter[CR_LIFE] -= 1;
      Game->PlaySound(23);
    }
  }
}
 
 
 
Here is my ffc script and item script combined into one script:
import "std.zh"
ffc script GiveRedRing
{
  void run()
  {
    if ( Game->GetCurDMap() == 0 )
    {
      if ( Game->GetCurScreen() == 0x00 )
      {
        if ( Link->Item[18] == false )
        {
          Link->Item[18] = true;
        }
      }
    }
  }
}
import "std.zh"
item script DeathPotionWhenUsed
{
  void run()
  {
    while ( Game->Counter[CR_LIFE] != 0 )
    {
      Game->Counter[CR_LIFE] -= 1;
      Game->PlaySound(23);
    }
  }
}
 
 
 
How do I make both my
DeathPotionWhenUsed
and also
GiveRedRing
scripts to work properly?
 
 
 
I was thinking of using combined mentioned up above scripts
and then compiling them as different names for
FFC
Global
Item
and then applying such a script to whatever I want.


#2 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 02 March 2018 - 06:48 PM

Remove one of the import "std.zh".


  • LikeLike888 likes this

#3 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 02 March 2018 - 06:48 PM

Remove one of the import "std.zh".

Thank you dude :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users