Jump to content

FEXP Question


Bongo_Bongo
 Share

Recommended Posts

Hello all, I'm trying to make the stealing in FEXP like in Thracia, where the player could steal a weapon if their constitution was higher than the weight of the item.

I'm unsure of a few things, though. Here's the part of the script I need to edit:

  def can_steal_from?(target)
    # Compares speed    
    return false unless self.spd > target.spd
    # Tests if target has anything to steal
    has_item = false
    for item in target.actor.items
      if item[0] == 1 or (item[0] == 0 and item[1] != 0)
        has_item = true
        break
      end
    end
    return has_item
  end

I need to make the game compare the player's constitution and the item's weight. How can I find item weight by ID, and how can I find player constitution?

Edited by Bongo_Bongo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...