Main Menu
  • Welcome to The RPG Maker Resource Kit.

Simple Script Shop

Started by Rune, May 26, 2007, 11:12:37 PM

0 Members and 5 Guests are viewing this topic.

Vmaster22

Thanks.. and sorry for the double post, i would like to say that the hp font color script works great!
but.. the 1st script which is the hp/sp bars on enemies sort of had an error on line 46- undefined method 'hp' for #<Array:0x152b408> (what ever that means). But if i do recall dont you have to download the hp/sp bar for the script? N E ways, i would like to ask one more thing,  sorry if i didnt specify on the black font script, but you guessed it i want the sp font to be black too ^_^, thanks, and sorry for asking alot...
Surprised? That the Dark side doesnt have cookies? Well you shouldnt be.

SirJackRex

Anyone know of a real time battle system?
Just like the default one, but in real time?

Shinami

@Black Shadow:

Given the slight lack of details, I'm not sure if you want the player to have the option to craft ONLY the items for sale in the shop, if you want them to be able to craft more than what is for sale in the shop, or if you want to be able to control what each shop can craft. I have ideas for each. I've made a bit of headway, getting everything visual to look and act right. Now it just comes down to getting everything to function properly BEHIND the visuals. I can't do that though until I get an answer on what sort of functionality you want over what shops can and can't craft. I prefer to script the right thing the first time.

tSwitch

isn't there already a script for crafting items?


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

Shinami

Yes but he want's a script for crafting items in a shop. Either way, it's a fun little request to do!

The Shadow

Quote from: Shinami on November 26, 2007, 10:07:43 PM
@Black Shadow:

Given the slight lack of details, I'm not sure if you want the player to have the option to craft ONLY the items for sale in the shop, if you want them to be able to craft more than what is for sale in the shop, or if you want to be able to control what each shop can craft. I have ideas for each. I've made a bit of headway, getting everything visual to look and act right. Now it just comes down to getting everything to function properly BEHIND the visuals. I can't do that though until I get an answer on what sort of functionality you want over what shops can and can't craft. I prefer to script the right thing the first time.

Only the items for sale in the shop. Then when you visit a new shop, there will be more items to craft there, and so on.

SirJackRex

Quote from: SirJackRex on November 26, 2007, 08:50:36 PM
Anyone know of a real time battle system?
Just like the default one, but in real time?

Could anyone make one? It'd be just for one person...

Shinami

Quote from: Black Shadow on November 27, 2007, 05:52:20 PM
Only the items for sale in the shop. Then when you visit a new shop, there will be more items to craft there, and so on.
Alright. I'll try to finish it up tonight or sometime tomorrow. If it's still not done by tomorrow, then Thursday should be the day I finish since I'll have some free time.

Shinami

UPDATE

Black Shadow, your request is complete. Check your PM box for the script.

Rune

#334
@Vmaster22 - Sorry about that, I must have edited the script in some weird way which I can't remember O_o

[spoiler=Enemy Barz (Take two)]class Window_Base < Window 
  #--------------------------------------------------------------------------
  # * Draw Slant Bar(by SephirothSpawn)
  #--------------------------------------------------------------------------
  def draw_slant_bar(x, y, min, max, width = 152, height = 6,
      bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
    # Draw Border
    for i in 0..height
      self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
    end
    # Draw Background
    for i in 1..(height - 1)
      r = 100 * (height - i) / height + 0 * i / height
      g = 100 * (height - i) / height + 0 * i / height
      b = 100 * (height - i) / height + 0 * i / height
      a = 255 * (height - i) / height + 255 * i / height
      self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
    end
    # Draws Bar
    for i in 1..( (min / max.to_f) * width - 1)
      for j in 1..(height - 1)
        r = bar_color.red * (width - i) / width + end_color.red * i / width
        g = bar_color.green * (width - i) / width + end_color.green * i / width
        b = bar_color.blue * (width - i) / width + end_color.blue * i / width
        a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
        self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
      end
    end
  end
end


class Window_EnemyHP < Window_Base
 
  def initialize
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    refresh
  end
 
  def refresh
    self.contents.clear
    for i in 0...$game_troop.enemies.size
      @enemy = $game_troop.enemies
      @percent = (@enemy.hp * 100) / @enemy.maxhp
      unless @enemy.hp == 0
      draw_slant_bar(@enemy.screen_x - 55, @enemy.screen_y - 200, @enemy.hp, @enemy.maxhp, width = 75, height = 6, bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
      self.contents.draw_text(@enemy.screen_x - 39, @enemy.screen_y - 230, 100, 32, "#{@percent}" + "%")
    end
  end
end
end

class Scene_Battle
 
  alias raz_update update
  alias raz_update_phase5 update_phase5
  alias raz_update_phase4_step1 update_phase4_step1
  alias raz_update_phase4_step5 update_phase4_step5
  alias raz_enemy_hp_main main
 
   def main
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    @enemy_window = Window_EnemyHP.new
    @enemy_window.z = 95
    raz_enemy_hp_main
    @enemy_window.dispose
  end
 
  def update
    @enemy_window.update
    raz_update
  end

  def update_phase5
    # If wait count is larger than 0
    if @phase5_wait_count > 0
      # Decrease wait count
      @phase5_wait_count -= 1
      # If wait count reaches 0
      if @phase5_wait_count == 0
        @enemy_window.visible = false
        # Show result window
        @result_window.visible = true
        # Clear main phase flag
        $game_temp.battle_main_phase = false
        # Refresh status window
        @status_window.refresh
        @enemy_window.refresh
      end
      return
    end
   raz_update_phase5
end

def update_phase4_step1
  raz_update_phase4_step1
  @enemy_window.refresh
end

  def update_phase4_step5
    # Hide help window
    @help_window.visible = false
    # Refresh status window
    @status_window.refresh
    @enemy_window.refresh
    raz_update_phase4_step5
  end
end[/spoiler]

Not sure what's changed, but that works okay now ;D

Will sort out the SP colours ASAP ;)

~Edit

[spoiler=Black SP]  def draw_actor_sp(actor, x, y, width = 144)
    # Draw "SP" text string
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    # Calculate if there is draw space for MaxHP
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    # Draw SP
    self.contents.font.color = Color.new(0, 0, 0)
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    # Draw MaxSP
    if flag
      self.contents.font.color = Color.new(0, 0, 0)
      self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
    end
  end
[/spoiler]

Find "def draw_actor_sp" and replace all the text up to the green text with that ;) Should work for ya :P

Any problems, queries, etc, i'll be right here (sometimes) ;)
Sincerely,
Your conscience.

Redwyn

Heyo! I want to request a simple script (I think it is anyways, dunno) from you guys.

What I need is a script that will give several items once a character reaches a certain level....

Example:
Bob reaches level ten!

Bob Receives Cloth Attire V2!
Bob Receives Cloth Bandana V2!
Bob Receives Fitchfork V2
Etc, etc.

I just need it for two character, they don't have to say what they received, just after the battle where they level up a window pops up that says something like "<Character Name> has received his Version 2 equipment!"

Here is the list of the type of items I need

[spoiler]
One Sword for character A with four versions. V2 is gained at level 10, V3 is gained at level 20, and V4 is gained at level 25.
The same as the sword above but for character B.

One Body Armor for character A with four versions. V2 is gained at level 10, V3 is gained at level 20, and V4 is gained at level 25.
Same as above.

One Shield for character A with four versions. V2 is gained at level 10, V3 is gained at level 20, and V4 is gained at level 25.
Same as above

One Helmet for character B with four versions. V2 is gained at level 10, V3 is gained at level 20, and V4 is gained at level 25.


[/spoiler]

That's all I need for now, and I'm sure I can edit the rest. I hope this isn't non simple ;(

If you could create this for me I would very much appreciate it ^-^

Kokowam

You could do this with common events and setting a check for their levels...

Redwyn

Eh, really? I don't see/know how you would do it let alone the fact of calling up the items after you gain the level, could you please explain to me how to do so? ^-^

Kokowam

Well, you could probably just make it so that the event happens after the battle.  :P

Redwyn

Well the thing is the battle isn't defined, since the people will have to train to get to the level, so I can't do that ;(

Kokowam

Wait, what? Can you rephrase that?

Redwyn

The levels are not set, so players of the game I'm making could reach levels at different times. I can't define really what battle they would receive the items, nor do I know how. XD

Kokowam

No, you can just do a common event. Make it so that it runs a parallel process on a switch that will always be on. Then, make the first action a "Set Variable[something] to hero's level." The next one being a conditional branches or series of conditional branches to check the level and give items if necessary. Then the last command should be a wait command to reduce a bit of lag.

The Shadow

Here's a new request( Since Im so extremly bad at scripting :P)

For my tactical game, I need a 8 player CMS. Instead of the actors character set, I want faces instead.
Here's how I want the layout of it.(Made in paint)




Demonic Blade

Alright, now I dunno if you want me to use the template, but I don't think I will...

I'd like to request a minimap script like the one in so many video games nowadays. I'd like it to be round, and be placed in the upper right corner of the screen, and monsters etc. should have a red dot, others maybe a white dot etc. and you maybe... a green dot! It would be totally wicked if you could make it so it would be possible to easily place a yellow/gold dot for quest "goals" or special points... the yellow dot isn't needed, just my crazy imagination set loose... But all the other things would be cool... oh, and make it easy to use please, I don't understand a word of scripting...
PLEASE!! You can go wild with this if you want, but the position on the screen and the form is IMPORTANT (to me...)
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

imperfectclone19

#345
Here's a request, it would really help.

So I'm using the atb system by ParaDog, and I was wondering if anyone could change it a little.  In the later pokemon games, the enemy pokemon is standing on a circular area of ground, like so-[spoiler]http://hs.facebook.com/photo.php?pid=516938&l=f146d&id=767657455[/spoiler]
so similar to that, I want the atb system changed to look like this-[spoiler]http://hs.facebook.com/photo.php?pid=516940&l=991ac&id=767657455[/spoiler] sorry for the horrible pictures. so..yeah, that's it. I'd really appreciate it if anyone could help =)

Rune

You could edit the battlers. Or are you hoping for a different floor for different areas? (For that you could use events :P)

@SJR - There's loads of RTABs out there, search around :P
Unless someone here wants to take a shot at it. I'm only a basic scripter.

@D B - I think the term you're looking for is Radar? Correct if wrong.
I think i've seen something like that once, but it wasn't rounded.
I can't help you here, again sorry -.- if someone else could though?

@B S - Can't help AGAIN *shoots self* I can't do CMSes with more than four characters :(
Sorry...
Sincerely,
Your conscience.

ChaosSpartan28

I posted this a while back, not sure if Algebra is still helping me. :(

http://rmrk.net/index.php/topic,23163.new.html#new

All I ask for is a script merge (I guess).

Thanx in advance :)
Sig by MacGravel

Demonic Blade

Quote from: Rune on December 30, 2007, 10:31:40 PM
@D B - I think the term you're looking for is Radar? Correct if wrong.
I think i've seen something like that once, but it wasn't rounded.
I can't help you here, again sorry -.- if someone else could though?

Close, but not quite there. Anyhow, I have found a minimap the way I wanted it (sadly it is square and in the lower right corner of the screen, instead of round and in the upper right hand corner... oh well.)
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

tSwitch

Quote from: Demonic Blade on December 31, 2007, 02:38:58 PM
Quote from: Rune on December 30, 2007, 10:31:40 PM
@D B - I think the term you're looking for is Radar? Correct if wrong.
I think i've seen something like that once, but it wasn't rounded.
I can't help you here, again sorry -.- if someone else could though?

Close, but not quite there. Anyhow, I have found a minimap the way I wanted it (sadly it is square and in the lower right corner of the screen, instead of round and in the upper right hand corner... oh well.)

which one might that be?
because if it's blizzard's, you can configure the location


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon