Conditions change request

Would it be possible to have condition modified to not break a script once it's reached?  If you try to do, say the artist quest in one script. you could add conditions for each of the items in turn say...  *incoming pseudo code*
Code:
if item_amount palette < 1
   add condition 1 palette
  adventure * pantry

if item_amount paintbrush < 1
  add condition 1 paintbrush
  adventure * alley

as an example. I'm sure locations are not 100% accurate, they're just a quick example. Now once that first condition is hit the script breaks ( not like crash, but returns ) and stops execution. I'm left with defining my adventuring like this

Code:
 while item_amount palette < 1
   adventure 1 location

but I would really like to use the condition logic because I think it's "teh sex" :) Could this maybe be changed, or atleast add the functionality to do so on demand?
 

macman104

Member
Add all of your conditions at the beginning, and then adventure.
Code:
if itemcheck
add item condiiton
if item2check
add item2 condition
if item3check
add item3 condition
adventure * location_of_choice
 
[quote author=macman104 link=topic=502.msg2445#msg2445 date=1160267048]
Add all of your conditions at the beginning, and then adventure.
Code:
if itemcheck
add item condiiton
if item2check
add item2 condition
if item3check
add item3 condition
adventure * location_of_choice
[/quote]

Ah but when you add conditions for 2 different areas as in the first post, then hit the first adventure * location_of_choice it will blow all of your adventures in that area trying to get the item you want from the other area.
 
[quote author=efilnikufecin link=topic=502.msg2447#msg2447 date=1160280181]
Ah but when you add conditions for 2 different areas as in the first post, then hit the first adventure * location_of_choice it will blow all of your adventures in that area trying to get the item you want from the other area.
[/quote]

Yea that's the problem there. The logic will never leave the first location because all conditions are not met there. It only leaves a location when the condition is hit, which is when the scripting system breaks the chain of execution.
 

holatuwol

Developer
I'm not seeing what you're discussing here.

Code:
add_item_condition( 1, $item[goat cheese] );
adventure( my_adventures(), $location[Goatlet] );
add_item_condition( 1, $item[goat cheese] );
adventure( my_adventures(), $location[Goatlet] );

A CLI script which did the same thing also succeeded.
 
[quote author=holatuwol link=topic=502.msg2453#msg2453 date=1160284681]
I'm not seeing what you're discussing here.

Code:
add_item_condition( 1, $item[goat cheese] );
adventure( my_adventures(), $location[Goatlet] );
add_item_condition( 1, $item[goat cheese] );
adventure( my_adventures(), $location[Goatlet] );

A CLI script which did the same thing also succeeded.
[/quote]

When I did that, the CLI returned script succeeded right after the first location and did not proceed. I've rewritten them already to not use conditions, but I will try to recreate the problem again in the morning. I just logged 13 hours or so writting a library file and I'm about to pass out.
 
Top