Resource icon

Resource Berry Trees

Maurili

Not a scobunny
Member
Joined
Jan 23, 2018
Posts
21
Maurili submitted a new resource:

Berry Trees - Adds in berry trees like SwSh or SM in your game

Here's a simple? Script that adds in Berry Trees like SwSh or Sm to your game.
to call it use berrytree(berry1,berry2,berry3) where berry is the name of the item you want the
tree to drop, you also need to add an encounter type "berry tree" for the pokemon that will appear if you shake the tree too much
Here's the script :
Berry Trees Script
I would suggest using it along timed event for the true berry tree fell
I also attached a berry tree sprite...

Read more about this resource...
 

SuzuiXIi

Novice
Member
Joined
Dec 29, 2017
Posts
27
I had a problem while making this script:

berrytree(ORANBERRY,PASSHOBERRY,SHUCABERRY)

Here's the error:
---------------------------
Error
---------------------------
Script 'Interpreter' line 276: RuntimeError occurred.

Script error within event 1 (coords 21,13), map 7 (Floresta Paleta):

Exception: NameError

Message: (eval):1:in `pbExecuteScript'uninitialized constant Interpreter::ORANBERRY

***Full script:

berrytree(ORANBERRY,PASSHOBERRY,SHUCABERRY)

Interpreter:243:in `pbExecuteScript'

Interpreter:794:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:794:in `command_111'

Interpreter:320:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:163:in `follow_update'

Scene_Map:161:in `loop'


---------------------------
Aceptar
---------------------------
 

Maurili

Not a scobunny
Member
Joined
Jan 23, 2018
Posts
21
the call is berrytree(:ORANBERRY,:REDAPRICORN,:CHERIBERRY) you need to add the ":" before the berry names also the script changed a little and now with the latest update you need to put it on a condition that if true will activate the event's self switch (intended to only be able to use once but reset using essential's timed event system)
 

Oatibx15

Connikon
Member
Joined
May 12, 2019
Posts
1
This error shows up on encounter, I created the encounter type BerryTree and everything


---------------------------
[Pokémon Essentials version 17.2]

Exception: RuntimeError

Message: Script error within event 14 (coords 12,11), map 5 (Route 1):

Exception: NoMethodError

Message: PField_Encounters:201:in `pbEncounteredPokemon'undefined method `<' for :BerryTree:Symbol

***Full script:

berrytree(:ORANBERRY,:REPEL,:POTION)


Interpreter:243:in `pbExecuteScript'

PField_Encounters:384:in `pbEncounter'

BERRY:47:in `berrytree'

BERRY:21:in `loop'

BERRY:91:in `berrytree'

(eval):1:in `pbExecuteScript'

Interpreter:1606:in `eval'

Interpreter:243:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'



Interpreter:276:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:163:in `follow_update'

Scene_Map:161:in `loop'

Scene_Map:170:in `follow_update'

PokeFollow:1551:in `update'
 

BiggusWeeabus

"What's so funny about Biggus Dickus?"
Member
Joined
Sep 1, 2020
Posts
20
Age
19
Hey There, i'm having some problems with this script, this is the Error Message i get when i try to use the Tree:

---------------------------
Pokemon Immortal X/Oblivion Y
---------------------------
[Pokémon Essentials version 17.2]

Exception: RuntimeError

Message: Script error within event 31 (coords 32,46), map 79 (Santalune Forest):

Exception: SyntaxError

Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error
berrytree(:ORANBERRY,:CHESTOBERRY,:CHERIBERRY,)
^

***Full script:

berrytree(:ORANBERRY,:CHESTOBERRY,:CHERIBERRY,)



Interpreter:276:in `pbExecuteScript'

Interpreter:794:in `command_111'

Interpreter:320:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:163:in `update'

Scene_Map:161:in `loop'

Scene_Map:170:in `update'

Scene_Map:234:in `main'



This exception was logged in

C:\Users\Darci\Saved Games\Pokemon Immortal X_Oblivion Y\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------

It says there's something wrong with the syntax, here's my event structure (The language is portuguese, but it should be easy to understand):


 

Maurili

Not a scobunny
Member
Joined
Jan 23, 2018
Posts
21
the script is now upgraded to V18 of essentials
i was thinking of making 2 versions of the script one that is more like SM and
one that is SwSh, but this is a thing that will come in the future
 
Top