- 38
- Posts
- 9
- Years
- Canada
- Seen Jul 10, 2022
So I've been trying to implement randomized trades into my game, thinking it would be super difficult, but so far so good! I've basically been able to figure everything out that I need, and I'm basically using a few Common Events to do it. Basically I want to make it so that your "rematch" contacts in the phone will occasionally call you and offer a semi-randomized trade. My question's not really about that, but it's related. I've got everything working how I want, I just have to make it so that your Phone Contacts will call you every so often for the Trade. The way I'm thinking of getting that to work is by having a common event that "fires" every in game hour or so that will randomly select a trainer from a list, then check if you've registered that contact into your phone yet, then just flip a switch that starts the whole trade thing.
I can't for the life of me figure out how to have the game check if you've registered a specific trainer as a contact or not...I've been looking through the scripts and found the Contact Information section of Pitem_Phone, and I think the script I want to put in a conditional branch is "pbHasPhoneTrainer?(trtype,trname)" and I can't seem to find any information about it. I'm pretty sure that "trtype" is the trainer type ID in trainertypes.txt (10 for bugcatchers, for example) and I assumed that "trname" would be...the trainer's name, so I put in "pbHasPhoneTrainer?(10,Pete), but I got an error saying:
...
Exception: NameError
Message: (eval):1:in `pbExecuteScript'uninitialized constant Interpreter::Pete
***Full script:
pbHasPhoneTrainer?(10,Pete)
...
So...I have no idea what to put in for "trname", or even if this is the correct script for what I want to do, for that manner, haha. Do any of you guys know what I'm doing wrong?
I can't for the life of me figure out how to have the game check if you've registered a specific trainer as a contact or not...I've been looking through the scripts and found the Contact Information section of Pitem_Phone, and I think the script I want to put in a conditional branch is "pbHasPhoneTrainer?(trtype,trname)" and I can't seem to find any information about it. I'm pretty sure that "trtype" is the trainer type ID in trainertypes.txt (10 for bugcatchers, for example) and I assumed that "trname" would be...the trainer's name, so I put in "pbHasPhoneTrainer?(10,Pete), but I got an error saying:
...
Exception: NameError
Message: (eval):1:in `pbExecuteScript'uninitialized constant Interpreter::Pete
***Full script:
pbHasPhoneTrainer?(10,Pete)
...
So...I have no idea what to put in for "trname", or even if this is the correct script for what I want to do, for that manner, haha. Do any of you guys know what I'm doing wrong?