Jump to content


Photo

How to use a script [XP]


  • Please log in to reply
6 replies to this topic

#1 Gluttony

Gluttony

    Advanced Member

  • Members
  • 32 posts
  • LocationCanada
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 27 June 2012 - 12:16 AM

This is probably one of the noobier questions that'll ever come along here, but please bear with me, as I've never used scripts or coded before and I honestly don't know what I'm doing:

A member in another topic here pointed me towards a script that seems to accomplish what I was trying to do in my game (create 2-handed weapons), but I don't know how to actually make use of the script now that I have it.

If anyone's willing to help, it's probably best to assume I don't know anything about scripting. Because I don't really.

The script itself is here: http://www.rmxpunlim...7404#entry67404. The three things I'm most concerned with are that it works, that I'm giving proper credit (I don't know if that's in the script somewhere or I have to manually put it somewhere myself), and that I'm only using the Two-handed weapons/gauntlets part of the script (if I understand correctly, the other features can be turned off so that I only use the parts I want).

Again, sorry for not knowing how to do all this...

#2 Racheal

Racheal

    Advanced Member

  • Early Adopter
  • 181 posts
  • LocationCanada
  • Primarily UsesN/A

Posted 27 June 2012 - 09:05 AM

Let's see if I can help.

-The first step with any script is it goes just above Main. I'm assuming you're not using any other scripts, so we don't have to worry about script order.
-For turning off unused features, there is a section in the script from lines ~123 to ~169. Make sure they are all set to false except the one you want.
-The script portion you're using starts at line ~846. There is one bug noted in that section, though it seems minor and visual.
-As far as setting it up, you simply need to list the IDs of weapons that are two-handed into the array on line ~876 called TWO_HANDED_IDS. So if the first three weapons in your database were two-handed, you would go TWO_HANDED_IDS = [1, 2, 3] Same goes for the gauntlet set-up if you're using that.

As to if it works, it would appear so? But I no longer have XP to test it with. And for credit, it is in the script at the top (ForeverZer0), but seeing as how not everyone can access the scripts, I would suggest keeping a separate credits file.

Any other questions or anything I missed, feel free to shoot my way.

ArtorisBanner.png

HFbar.png RBTS.png


#3 Gluttony

Gluttony

    Advanced Member

  • Members
  • 32 posts
  • LocationCanada
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 27 June 2012 - 11:02 AM

Excellent, it seems to work (and the bug that's mentioned doesn't actually seem to happen).

Where would I put a separate credits file?

Edited by Gluttony, 27 June 2012 - 11:04 AM.


#4 Gluttony

Gluttony

    Advanced Member

  • Members
  • 32 posts
  • LocationCanada
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 27 June 2012 - 11:28 AM

Oh, wait, I'm getting a pretty bad error. After fleeing from a battle the following error message occurs:

Script 'Main' line 1137: NoMethodError occurred.
unidentified method 'any?' for nil:NilClass

And then the game closes.

#5 Racheal

Racheal

    Advanced Member

  • Early Adopter
  • 181 posts
  • LocationCanada
  • Primarily UsesN/A

Posted 27 June 2012 - 12:58 PM

I generally keep a credits txt file in the main folder of the program. As far as the error, I think I might know what's causing it? I have a question first. Does it only occur when you have no armor equipped?

ArtorisBanner.png

HFbar.png RBTS.png


#6 Gluttony

Gluttony

    Advanced Member

  • Members
  • 32 posts
  • LocationCanada
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 27 June 2012 - 06:52 PM

When it was occurring both of the 2 party members had armor, shields, and weapons, and one had an accessory. Neither had a helmet.

...But now the error isn't happening at all. And I didn't change anything.

#7 Gluttony

Gluttony

    Advanced Member

  • Members
  • 32 posts
  • LocationCanada
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 29 June 2012 - 10:23 PM

New, important issue that I've noticed (and would like help with if possible). Single-use items like potions no longer disappear from my inventory when I use them. They don't immediately indicate that they've had any effect either, but in fact can be used repeatedly, taking effect as many times as they were clicked on once the item menu is closed. This is definitely not how it used to work.

(This problem only occurs outside of combat)

Edited by Gluttony, 29 June 2012 - 10:30 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users