The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Scripts & Tutorials
Reload this Page Essentials Script TM shop with compatible icons
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Thread Tools
Old April 7th, 2012 (11:09 AM). Edited January 10th, 2016 by FL.
FL's Avatar
FL FL is offline
Pokémon Island Creator
Join Date: Sep 2010
Gender: Male
Posts: 1,620
# * TM shop with compatible icons - by FL (Credits will be apreciated)
# This script is for Pokémon Essentials. It displays your current party icons
# animated in shop screen and the pokémon that can learn a selected TM will be
# colored and more animated.
# To this script works, put it above main, put a 160x128 background box for
# pokémon icons in TMBOXPATH location and change the following lines in
# PokémonMart Script (use Ctrl+F to find it):
# -Change line 'def pbStartBuyOrSellScene(buying,stock,adapter)' to
# 'def pbStartBuyOrSellScene(buying,stock,adapter,tmshop=false)'
# -After line [email protected]["background"].setBitmap("Graphics/Pictures/martscreen")'
# put 'initializeTMSprites(tmshop)'
# -After each line 
# [email protected]["icon"].[email protected](itemwindow.item)' put 
# 'checksTMs if @tmshop'
# -Change line 'def pbBuyScreen' to 'def pbBuyScreen(tmshop=false)'
# -Change line [email protected](@stock,@adapter)' to
# [email protected](@stock,@adapter,tmshop)'
# -Change line 'def pbPokemonMart(stock,speech=nil,cantsell=false)' to
# 'def pbPokemonMart(stock,speech=nil,cantsell=false, tmshop=false)'
# -Change line 'screen.pbBuyScreen' to 'screen.pbBuyScreen(tmshop)'
# To call it, use 'pbPokemonMart([ITEMS],nil,false,true)'
# Ex: A 'pbPokemonMart([PBItems::TM01,PBItems::TM02,PBItems::TM03])' will be
# 'pbPokemonMart([PBItems::TM01,PBItems::TM02,PBItems::TM03],nil,false,true)'  

class PokemonMartScene

TMBOXPATH="Graphics/Pictures/marttmbox" # You can change if you wish

def initializeTMSprites(tmshop)
  if tmshop
    for i in 0...$
      next if $[i].isEgg? # Ignores eggs

def checksTMs
  for i in 0...$
    next if $[i].isEgg?
    [email protected]["itemwindow"].item
    if $ItemData[item][ITEMPOCKET]==4
    # If you don't wish the selected animation change
    # the below line for 'if false'
    if @sprites["pokemon#{i}"].selected!=flag
      (flag) ? @sprites["pokemon#{i}"].x-=8 : @sprites["pokemon#{i}"].x+=8
    gray=255 if !flag # Comment this line if you didn't want the uncolored sprite

def pbStartBuyScene(stock,adapter,tmshop=false) #redefine
Attached Thumbnails
tmshopscreen.png‎   marttmbox.png‎  
Reply With Quote

Relevant Advertising!

Old April 7th, 2012 (12:21 PM).
overstood overstood is offline
Join Date: Mar 2012
Posts: 15
nice one. works for me
Reply With Quote
Old April 7th, 2012 (1:31 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
Join Date: Sep 2010
Gender: Male
Posts: 1,620
I mistake the TM pocket (put 'if $ItemData[item][ITEMPOCKET]==3' when the right is 'if $ItemData[item][ITEMPOCKET]==4').
I updated the script in topic.
Reply With Quote
Old April 9th, 2012 (1:17 AM).
Nickalooose Nickalooose is offline
Join Date: Mar 2008
Gender: Female
Posts: 1,285
Clever idea! I like it... Um I can't post such a small reply apparently...
Reply With Quote
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 4:15 AM.

Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™,
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / Poké
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.