Jump to content

Adrenaline Detecting An Item In Inventory Script Problem


xdiego91

Recommended Posts

Hello, i have tried to write a script which will detect whether i have picked a specific item and if yes then play a sound. Here is what i have written:

 

begin
  if (Inventory.User.ByID(2934, Plate Shield Fragment) = true) then
  begin
      PlaySound(exepath+'\sounds\'+'Sirena'+'.wav');
      delay(1500);  
      StopSound;
  end.
end.
 
 
When i try to run it, however, i get some error on line 2. 
 
Please help me fix the problem
 
PS: I have tried writing "Plate Shield Fragment" (in quotes) as well but didnt help 
Link to comment
Share on other sites

 

Hello, i have tried to write a script which will detect whether i have picked a specific item and if yes then play a sound. Here is what i have written:

 

begin
  if (Inventory.User.ByID(2934, Plate Shield Fragment) = true) then
  begin
      PlaySound(exepath+'\sounds\'+'Sirena'+'.wav');
      delay(1500);  
      StopSound;
  end.
end.
 
 
When i try to run it, however, i get some error on line 2. 
 
Please help me fix the problem
 
PS: I have tried writing "Plate Shield Fragment" (in quotes) as well but didnt help 

 

var
Plate_Shield_Fragment:tl2item;
begin
  if (Inventory.User.ByID(2934, Plate_Shield_Fragment) = true) then
  begin
      PlaySound(exepath+'\sounds\'+'Sirena'+'.wav');
      delay(1500);  
      StopSound;
  end;
end.

?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...