PDA

View Full Version : [Essentials script] Honey tree script


help-14
September 29th, 2010, 04:50 PM
First, i have to say that i haven't test with near May 7th version of starter kit and when turn off the game, honey disappear too o_0 Still working on it.

- Step 1: Add a new item call HONEY to PBS/items.txt
http://i177.photobucket.com/albums/w222/pokemonfan14/Untitled1-8.png

- Step 2: Add the script to Script Database

- Step 3: Add new event like those pictures
http://i177.photobucket.com/albums/w222/pokemonfan14/Untitled2-5.png
http://i177.photobucket.com/albums/w222/pokemonfan14/Untitled3-2.png

Demo: http://www.mediafire.com/?dn2g1pzjbabnngo

nmorr
September 30th, 2010, 01:50 PM
Coolio! I think IK what to give u for your birthday!

aSeRo141414
October 8th, 2010, 09:03 PM
nice script! this will help me.. :P

mattfriends
October 9th, 2010, 04:43 AM
You finally put up a threat.

pokemonseablueversion
October 24th, 2010, 09:44 PM
Nice! I haven't tried it yet, but I think it will work! BTW, what script will you put onto th Script Database?

Mezoka
December 7th, 2010, 06:20 PM
Help-14, your scripts are wonderful! This will, without a doubt, help a lot of people in their Pokemon game-making.

Lexxilion
August 11th, 2014, 11:22 AM
Ok, so I found the post on the forums, but the images in h14's post are removed. CAn't seem to find any guidance on setting up honey trees elsewhere. Anybody able to share the script and set up of a honey tree event?

Super Dedenne
August 12th, 2014, 10:29 AM
Ok, so I found the post on the forums, but the images in h14's post are removed. CAn't seem to find any guidance on setting up honey trees elsewhere. Anybody able to share the script and set up of a honey tree event?

Hello, Lexxilion! I can assist you with this as I happen to have this script archived on my computer.
I'm going to assume you have this script already loaded into Essentials above "Main".

#==============================================================================
# ● Honey tree script made by Help-14
#==============================================================================

#----------------------------------------------------------------------------
# Configuration
#----------------------------------------------------------------------------
$HONEY_TIME = 5

#----------------------------------------------------------------------------
# Script
#----------------------------------------------------------------------------
def add_honey(event_id)
mapid=$game_map.map_id
#event=$game_map.events[event_id]
$GlobalHoneyTime={} if !$GlobalHoneyTime
$GlobalHoneyTime[mapid]={} if !$GlobalHoneyTime[mapid]
$GlobalHoneyTime[mapid][event_id]=0
end

def check_honey(event_id)
mapid=$game_map.map_id
if $GlobalHoneyTime[mapid][event_id]>$HONEY_TIME*Graphics.frame_rate
return true
else
return false
end
end

def random_honey_tree_pokemon(event_id,list)
length=list.length
num=rand(length-1)
pbWildBattle(list[num][0],list[num][1])
mapid=$game_map.map_id
$GlobalHoneyTime[mapid][event_id]=0
end

#----------------------------------------------------------------------------
# Game_System
#----------------------------------------------------------------------------
class Game_System
alias up update

def update
add_honey_time
up
end

def add_honey_time
mapid=$game_map.map_id
for event in $game_map.events.values
key = [mapid, event.id, "A"]
if event.name=="HONEYTREE" and $game_self_switches[key]==true
$GlobalHoneyTime[mapid][event.id]+=1
end
end
end

end


Create an event named "HONEYTREE". The ID of the event is important to note! If an error occurs, please make sure that (in any place where they are prompted) they match the event's ID. Now, with this event paired with your tree graphic, follow the steps using my attached screenshots:

PAGE 1:
As you can see, 77 is the ID and anywhere where this number repeats is where you should place your event's ID number. Should also make sure it checks with $PokemonBag.pbQuantity(PBItems::HONEY)>0 first and then takes away 1 Honey away from the player when true upon slathering it to the tree...

You should also probably make the $HONEY_TIME wait longer than just 5...

PAGE 2:
Now here's the list of Pokemon that appear! The "10" in this case is just the level of the specific species listed in the array. Go nuts. You can make this different for any tree... The 77, again, is the ID of the event shown.

Hope that helps! Works just fine for me.