• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Password Protected PC

Theik

Fancy Cape Knight
70
Posts
15
Years
  • Age 36
  • Seen Nov 16, 2014
Don't program in rmxp myself, but at first glance:
You use a case, followed by a when / else statement.

In most programming languages you'd use an if for the construction you ate using. Generally speaking a case only allows simple compares.

Case switch
1: dosomething
2: dosomethingels
Default: dosomethingdefault
 
1,748
Posts
14
Years
You don't need a class for that small amount of code, a simple function would do (or a module if you really must) anyways, it's probably how you are calling the function which fails. Also, I do believe that pbEnterText adds an extra "\r" to the end which can cause this problem too.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
I would say you can just event this, rather than do any scripting.

Entering free text (i.e. typing with the keyboard as opposed to the way official games let you enter words) will currently cause problems in the way hanseic describes. However, I've fixed that for v11.


Don't program in rmxp myself, but at first glance:
You use a case, followed by a when / else statement.

In most programming languages you'd use an if for the construction you ate using. Generally speaking a case only allows simple compares.

Case switch
1: dosomething
2: dosomethingels
Default: dosomethingdefault
There's nothing wrong with using case here, and thor348 used it correctly. It's just a matter of preference.

If you want to offer advice on how to code in Ruby, perhaps you should learn a bit of Ruby first.
 

Arma

The Hyena
1,688
Posts
14
Years
Okay, I evented a cheat code system some time ago, it's fairly simple to set up.

First, create two new actors.

second, create an event that allows you to edit the first actor's name.
After that you need to to make sure the second actor gets the same name as the first one and clear the first one's name.

Then you have to make sure that whenever you access the PC, you'll be asked to change the name of the first actor. if that ones matches the name of the second one, you'll be granted access.

Hope this helps you;)
 

thor348

That's Oak to You
137
Posts
11
Years
Okay, I evented a cheat code system some time ago, it's fairly simple to set up.

First, create two new actors.

second, create an event that allows you to edit the first actor's name.
After that you need to to make sure the second actor gets the same name as the first one and clear the first one's name.

Then you have to make sure that whenever you access the PC, you'll be asked to change the name of the first actor. if that ones matches the name of the second one, you'll be granted access.

Hope this helps you

I've tried this using the database but the scripts Maruno has made won't allow it to work. is that what you're talking about?

Show us what you have, then. Screenshots help.

is this directed towards me?
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
is this directed towards me?
Yes. I barely understood what elarma was going on about, and I didn't see his post before making mine.

It honestly shouldn't be that difficult. As far as I can tell, it's just a collection of choices with a comparison between inputted text and a preset phrase thrown in somewhere. You can modify the displayed text to make the secret notes look prettier if you want.
 

Arma

The Hyena
1,688
Posts
14
Years
Hmmm, I haven't tried this in essentials yet. I'll try it out tomorrow and put up some screens if it works.
 

thor348

That's Oak to You
137
Posts
11
Years
Yes. I barely understood what elarma was going on about, and I didn't see his post before making mine.

It honestly shouldn't be that difficult. As far as I can tell, it's just a collection of choices with a comparison between inputted text and a preset phrase thrown in somewhere. You can modify the displayed text to make the secret notes look prettier if you want.

your link proved to be much help. I didn't know about that wiki surprisingly... I thought I had read most of them haha it solves my problem with the choices. I was looking for hours on how to do it through script rather than command. I'll work on it tomorrow after work and post my progress.
 
Back
Top