Main Menu
  • Welcome to The RPG Maker Resource Kit.

need simple script edited *cough*Blizzard*cough*

Started by fadark, April 10, 2007, 01:16:14 AM

0 Members and 1 Guest are viewing this topic.

fadark

i need a hud script edited.
here is the hud script:
#==============================================================================
# ** Game_Actor
# Script by MeisMe
# Graphics added by Peaches
# Icons made by Joshie666 & Axerax
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor
#--------------------------------------------------------------------------
# * Get the current EXP
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get the next level's EXP
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

#==============================================================================
# ** Window_HUD
#------------------------------------------------------------------------------
# This class is used to display HP, SP and Gold on the map.
#==============================================================================
class Window_HUD < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-16, -16, 672, 150)
self.contents = Bitmap.new(width-32, height-32)
self.opacity = 0
self.contents.font.size = 14
self.contents.font.name = "Arial"
@actors = []
@old_hp = []
@old_sp = []
@old_exp = []
@old_level = []
for i in 0...$game_party.actors.size
@actors.push($game_party.actors[i])
@old_hp.push(@actors[i].hp)
@old_sp.push(@actors[i].sp)
@old_exp.push(@actors[i].now_exp)
@old_level.push(@actors[i].level)
end
@old_gold = $game_party.gold
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
#self.contents.draw_text(6, 0, 32, 14, $data_system.words.hp + "")
#self.contents.draw_text(6, 14, 32, 14, $data_system.words.sp + "")
self.contents.draw_text(6, 28, 32, 14, "")
#self.contents.draw_text(6, 42, 32, 14, $data_system.words.gold + "")
self.contents.font.color = normal_color
#Images

case @actors.size
when 1
bitmap = RPG::Cache.picture("HUD Graphic")
self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
when 2
bitmap = RPG::Cache.picture("HUD Graphic2")
self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
when 3
bitmap = RPG::Cache.picture("HUD Graphic2")
self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
when 4
bitmap = RPG::Cache.picture("HUD Graphic3")
self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500))
when 5
bitmap = RPG::Cache.picture("HUD Graphic3")
self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500))
end

#bitmap = RPG::Cache.picture("HUD Graphic")
#self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500))
bitmap = RPG::Cache.icon("HP Symbol")
self.contents.blt(3, 10, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("SP Symbol")
self.contents.blt(3, 30, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("EXP Symbol")
self.contents.blt(3, 50, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("Hero")
self.contents.blt(25, 67, bitmap, Rect.new(0, 0, 24, 24))

if $game_switches[99] == true
if $game_variables[99] == 0
self.contents.draw_text(x, y, 210, 14, $game_party.item_number[1])
elsif $game_variables[8] == 1
  self.contents.draw_text(x, y, 210, 14, $game_party.item_number(2))
elsif $game_variables[8] ==2
  self.contents.draw_text(x, y, 110, 14, @actors[i].name)
end
end
x = 32
for i in 0...@actors.size
y = 6
self.contents.draw_text(x, y, 110, 14, @actors[i].name)
self.contents.draw_text(x, y, 110, 14, "Lv: #{@actors[i].level}", 2)
y += 16
draw_hp_bar(@actors[i], x, y, 112, 5)
y += 19
draw_sp_bar(@actors[i], x, y, 104, 5)
y += 19
draw_exp_bar(@actors[i], x, y, 88, 5)
y += 19
x += 130
end
x = 32
self.contents.draw_text(45, 73, 110, 14, $game_party.gold.to_s)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if @actors.size != $game_party.actors.size
@actors = []
for i in 0...$game_party.actors.size
@actors.push($game_party.actors[i])
end
refresh
return
end
for i in 0...@actors.size
if @old_hp[i] != @actors[i].hp or
@old_sp[i] != @actors[i].sp or
@old_exp[i] != @actors[i].now_exp or
@old_level[i] != @actors[i].level or
@old_gold != $game_party.gold
refresh
@old_hp[i] = @actors[i].hp
@old_sp[i] = @actors[i].sp
@old_exp[i] = @actors[i].now_exp
@old_level[i] = @actors[i].level
@old_gold = $game_party.gold
end
end
end
#--------------------------------------------------------------------------
# * Draw HP Bar
#--------------------------------------------------------------------------
def draw_hp_bar(actor, x, y, length, thick)
width = length
height = thick
c1 = Color.new(255, 0, 0)
c2 = Color.new(155, 0, 0)
e1 = actor.hp
e2 = actor.maxhp
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# * Draw SP Bar
#--------------------------------------------------------------------------
def draw_sp_bar(actor, x, y, length, thick)
width = length
height = thick
c1 = Color.new(0, 0, 255)
c2 = Color.new(0, 0, 155)
e1 = actor.sp
e2 = actor.maxsp
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# * Draw EXP Bar
#--------------------------------------------------------------------------
def draw_exp_bar(actor, x, y, length, thick)
width = length
height = thick
c1 = Color.new(158, 208, 9)
c2 = Color.new(58, 108, 0)
e1 = actor.now_exp
e2 = actor.next_exp
if actor.next_exp == 0
e1 = 1
e2 = 1
end
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
end
end

#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Object Aliasing
#--------------------------------------------------------------------------
alias hud_scene_map_main main
alias hud_scene_map_update update
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def main
@HUD = Window_HUD.new
hud_scene_map_main
@HUD.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
@HUD.update
hud_scene_map_update
end
end


i need the exp bar where the sp bar is. and take the sp bar out. where the exp bar is in the original, put "Ammo:" there.
and:
if the player has weapon #1 (id_1) equiped, show the value of variable #26.
if the player has weapon #2 (id_2) equiped, show the value of variable #27.
if the player has weapon #3 (id_3) equiped, show the value of variable #28.
if the player has weapon #4 (id_4) equiped, show the value of variable #29.
if the player has weapon #5 (id_5) equiped, show the value of variable #30.
if the player has weapon #6 (id_6) equiped, show the value of variable #31.
if the player has weapon #7 (id_7) equiped, show the value of variable #32.
if the player has weapon #8 (id_8) equiped, show a line like this:     -


can someone please do this? i know it take quite a bit of editing, but if someone did this for me, it would be my Dream Hud for my game!

just so everyone knows, im 15 years old.

fadark

i think the part about the variables might look like this:
if $data_weapons[$data_actors[1].1].Pistol = true: show $game_variable[26]
elsif $data_weapons[$data_actors[1].2].Machine Gun = true: show $game_variable[27]
elsif $data_weapons[$data_actors[1].3].Duel Sub Machine Guns = true: show $game_variable[28]
elsif $data_weapons[$data_actors[1].4].Rifle = true: show $game_variable[29]
elsif $data_weapons[$data_actors[1].5].Sniper Rifle = true: show $game_variable[30]
elsif $data_weapons[$data_actors[1].6].Rocket Launcher = true: show $game_variable[31]
elsif $data_weapons[$data_actors[1].7].Laser Focuser = true: show $game_variable[32]
elsif $data_weapons[$data_actors[1].8].Laser Sabor = true: show "-"
else show "None"


but that's just a suggestion. i dont even know the right syntax. :P

ps. if you are confused, just follow the instructions in my first post.

just so everyone knows, im 15 years old.

modern algebra

Post the graphics too, otherwise whoever makes it won't be able to test it.

fadark


just so everyone knows, im 15 years old.

fadark

#4
but that doesn't help getting the script

[edit] oh! you mean it would help kind people make me the script?

just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.

:)

you have more request then anyone I have seen  :o
idea make a SIMPLE game, use only RTP and show us you cna actaully make something good then people will help you more.
Watch out for: HaloOfTheSun

fadark

nobody askes me for the beta of any of my games

just so everyone knows, im 15 years old.

modern algebra

Well, finish one game. It doesn't have to be long. It doesn't even have to be good. Just make a complete game which does not need any scripts. You have over 300 posts and I think I can honestly say that 2/3 of them are requests. Once someone agrees to take on a request, you respond every 6 hours with a "done yet", or a "I neeeeed this for my game. Please finish it quickly" or a "*cough <insert name of better scripter than the slowpoke who's doing it now> *cough*". Quite simply, you seem not to recognize that people are doing you a favour when they make something for you.

Finish a game and I will write this script for you. Finish "Light's Shadow" if you like - you've already said that you are 95% done, and don't say it needs some stupid resource like a battler before it can be finished. Finish it with RTP stuff if you must and then you can update it later once you get the resources you've requested. I hope this doesn't sound too harsh, it's just a suggestion.

fadark

#10
QuoteQuite simply, you seem not to recognize that people are doing you a favour when they make something for you.
i have no idea what you're talking about -_-

Quote[the rest of what you said]
light's shadow is at it's pre-peak. it's done except for one thing:
chokobo race
the chokobo practice rounds and stables are done but the race cant happen because i need the sprites. im currently requesting them but i haven't gotten a reply from the person i asked yet. i would call it a "complete game" but technically its not yet. so i basicly finished it.

not technically
but basicly

if you want to play it, there's now an open beta test on page 3

ps. if you do try it out, try to give me some slack when saying my storyline sucks. i hope its good enough but im bad at storylines (which is why i am making a pacman game ;D)


[edit] will you please make this script for me? becasue i doubt the game is ever gonna be 100% done

just so everyone knows, im 15 years old.

fadark


just so everyone knows, im 15 years old.