Item_on_spot

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Item_on_spot
Master
Member # 5977
Profile Homepage #0
I want a script to check whether there is a specific item on a specific spot, but I didn't find the right call. I only found "item_of_class_on_spot" and that was basically it. is there the call i want (a call to check whether a specific items was put on a specific spot), or will I have to do it with the item_of_class call?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Shaper
Member # 7472
Profile Homepage #1
Odd. I thought there was a call for that. It looks like you're stuck with item_of_class_on_spot.

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Master
Member # 5977
Profile Homepage #2
I tried the following:

beginstate START_STATE;

if (get_flag(13,5) == 0 && item_of_class_on_spot(26,33,1) == 1);
set_flag(13,5,1);

if (get_flag(13,5) == 4 && item_of_class_on_spot(34,33,2) == 1);
set_flag(13,5,5);

break;
It doesn't seem to work. Anybody know what the cause could be?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Shaper
Member # 7472
Profile Homepage #3
Make sure you have the items set to a special class.

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Master
Member # 5977
Profile Homepage #4
I did that, didn't I? The third parameter in between the brackets (1 at the first call, 2 at the second), is the item class.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Infiltrator
Member # 3040
Profile #5
Are there supposed to be semicolons after the "if" statements?

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Shaper
Member # 7472
Profile Homepage #6
I mean that you have to set that specific item to that class in your scenario data script.

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
...b10010b...
Member # 869
Profile Homepage #7
quote:
Originally written by wz. As:

Are there supposed to be semicolons after the "if" statements?
No. Also, if I were writing it, I'd practise safe mathematics and use parentheses:

if ((get_flag(13,5) == 0) && (item_of_class_on_spot(26,33,1) == 1))
set_flag(13,5,1);


[ Sunday, October 01, 2006 13:54: Message edited by: Anthropos Kakistos ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00