Detect Item?

● ARCHIVED · READ-ONLY
Started by Qaoc 3 posts View original ↗
  1. Is it possible to detect an item in your inventory in an event without scripting? For example, If the item "scroll" is detected in your inventory, then ...

    The reason I need this is because the innkeeper needs a scroll in exchange for the reading of a treasure map, and once you get the scroll, he tries to keep them both and you must fight for it... Also: How do you force a battle to happen?

    Thanks!
  2. Yes. Conditional Branch, tab 4, Item (choose from list) in Inventory.

    To force a battle, use Battle Processing on tab 3 of event commands.
  3. One way to do this would be to have 4 pages

    page one

    - msgbox 'if you want the map you have to get me a scroll first'

    - self switch a on

    page two [if self switch a is on]

    - msgbox 'i still want that scroll'

    page three [if item scroll exists]

    - msgbox 'oh good, you found the scroll, now just hand it over and i can help you with the map.'

    - Haha, you lose, I'm going to keep them both!

    - call a battle with the guy (note: you have to make the guy into an enemy in the database first.)

    (set handling if lose)

    if win then msgbox 'Ouch! You kicked my butt, here, you can have the map, I don't want it anyway.'

    change item [map - increase by 1]

    self switch b on

    if lose then msgbox 'Haha, I win, you can't have either of them!

    change item [scroll - decrease 1]

    self switch c on

    page 3 [self switch b on]

    - (this page is what he can do later if you beat him)

    page 4 [self switch c on]

    - (this page is what he can do later if he beat you)