Ja, HESEE oraz Angius tworzymy grę (Gothic 3 2D) i potrzebujemy waszej pomocy. Potrzebujemy zmienionego skryptu z HUD Ekwipunku. Chcielibyśmy by działał z "Rozszerzonym ekwipunkiem". Czy jest ktoś w stanie zrobić to dla nas?
Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Sro 04 Maj, 2011 22:54
Spróbuj tego - podmień za skrypt z HUD Ekwipunku na mapie:
Spoiler:
Kod:
#==============================================================================
# MOG HUD Equip V1.1 VX
# Autor XP: Moghunter
# Przełożone na VX przez Ayene (mam nadzieję, że będzie 'śmigać' :P
# Kompatybilne z KGC_EquipExtension
#==============================================================================
if true # True = wyświetla HUD / False = nie wyświetla
module MOG
# Położenie HUD - współrzędne x i y
EQPMAPX = 240 # współrzędna x
EQPMAPY = 320 # współrzędna y
$mogscript = {} if $mogscript == nil
$mogscript["mpequip"] = true
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
def draw_equip_map(item, x, y)
if item == nil
return
end
draw_icon(item.icon_index , x + 3 , y + 34)
end
def draw_mequip(x, y)
self.contents.blt(0, 4, Cache.picture("mequip"), Rect.new(0, 0, self.width, 60))
mequip = Cache.picture("sqequip")
@data = @actor.equips.clone
@item_max = [@data.size, @actor.armor_number + 1].min
cw = mequip.width
ch = mequip.height
src_rect = Rect.new(0, 0, cw, ch)
for i in 0...@item_max
self.contents.blt(32 * i, y - ch + 65, mequip, src_rect)
end
end
end
#==============================================================================
# Window_Equip_Map
#==============================================================================
class Window_Equipmap < Window_Base
def initialize(actor)
w = 160 + actor.extra_armor_number * 32
super(0, 0, w, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = MOG::EQPMAPOPA
self.windowskin = Cache.system(MOG::EQPMAPSKIN)
@actor = actor
refresh
end
def refresh
self.contents.clear
draw_mequip(0,0)
@data = @actor.equips.clone
@item_max = [@data.size, @actor.armor_number + 1].min
rect = Rect.new(0, 0, 32, 32)
@item_max.times { |i|
rect.x = 32 * i
draw_equip_map(@data[i], rect.x, rect.y)}
end
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
alias ayene_start start
def start
@actor = $game_party.members[0]
@eqmap = Window_Equipmap.new(@actor)
@eqmap.x = MOG::EQPMAPX
@eqmap.y = MOG::EQPMAPY
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true
else
@eqmap.visible = false
end
ayene_start
end
alias ayene_terminate terminate
def terminate
ayene_terminate
@eqmap.dispose
end
alias mog8_update update
def update
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true
else
@eqmap.visible = false
end
if $eref == true
@eqmap.refresh
$eref = false
end
mog8_update
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
attr_accessor :eref
end
class Game_Interpreter
def eref
$eref = true
end
alias mog319ref command_319
def command_319
eref
return mog319ref
end
end
end
Do folderu Graphics/Pictures wrzuć poniższe obrazki:
Ayene, super! Wszystko działa jak zawsze kiedy pomagasz :) Przerobiłem napis ekwipunek na swój: I chcielibyśmy go przesunąć na w prawo, bo jest za mocno w lewo przesunięty, a i mogła byś umieścić kawałek skryptu, który przy naciśnięciu nacisku "E" Ekwipunek na mapie zniknie lub pojawi się? Wiem, że napisałem to tak jakoś dziwnie, ale myślę, że zrozumiałaś :) Z góry dziękujemy!
Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Czw 05 Maj, 2011 09:03
Podmień za skrypt - HUD Ekwipunku:
Spoiler:
Kod:
#==============================================================================
# MOG HUD Equip V1.1 VX
# Autor XP: Moghunter
# Przełożone na VX przez Ayene (mam nadzieję, że będzie 'śmigać' :P
# Kompatybilne z KGC_EquipExtension
#==============================================================================
if true # True = wyświetla HUD / False = nie wyświetla
module MOG
# Położenie HUD - współrzędne x i y
EQPMAPX = 280 # współrzędna x
EQPMAPY = 320 # współrzędna y
$mogscript = {} if $mogscript == nil
$mogscript["mpequip"] = true
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
def draw_equip_map(item, x, y)
if item == nil
return
end
draw_icon(item.icon_index , x + 3 , y + 34)
end
def draw_mequip(x, y)
mequip = Cache.picture("sqequip")
@data = @actor.equips.clone
@item_max = [@data.size, @actor.armor_number + 1].min
bit = Cache.picture("mequip")
x = (@item_max * 32 - bit.width) / 2
self.contents.blt(x, 4, bit, Rect.new(0, 0, bit.width, bit.height))
src_rect = Rect.new(0, 0, 32, 32)
for i in 0...@item_max
self.contents.blt(32 * i, y - 32 + 65, mequip, src_rect)
end
end
end
#==============================================================================
# Window_Equip_Map
#==============================================================================
class Window_Equipmap < Window_Base
def initialize(actor)
w = 160 + actor.extra_armor_number * 32
super(0, 0, w, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = MOG::EQPMAPOPA
self.windowskin = Cache.system(MOG::EQPMAPSKIN)
@actor = actor
refresh
end
def refresh
self.contents.clear
draw_mequip(0,0)
@data = @actor.equips.clone
@item_max = [@data.size, @actor.armor_number + 1].min
rect = Rect.new(0, 0, 32, 32)
@item_max.times { |i|
rect.x = 32 * i
draw_equip_map(@data[i], rect.x, rect.y)}
end
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
alias ayene_start start
def start
@actor = $game_party.members[0]
@eqmap = Window_Equipmap.new(@actor)
@eqmap.x = MOG::EQPMAPX
@eqmap.y = MOG::EQPMAPY
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true
else
@eqmap.visible = false
end
ayene_start
end
alias ayene_terminate terminate
def terminate
ayene_terminate
@eqmap.dispose
end
alias mog8_update update
def update
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true
else
@eqmap.visible = false
end
if Input.trigger?(Input::Letters["E"])
a = $game_switches[MOG::EQPMAPVIS]
a ? a = false : a = true
$game_switches[MOG::EQPMAPVIS] = a
end
if $eref == true
@eqmap.refresh
$eref = false
end
mog8_update
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
attr_accessor :eref
end
class Game_Interpreter
def eref
$eref = true
end
alias mog319ref command_319
def command_319
eref
return mog319ref
end
end
end
Pomogła: 232 razy Dołączyła: 18 Wrz 2007 Posty: 2424
Wysłany: Czw 05 Maj, 2011 13:34
Na każdej mapie nie może chodzić? Jesteś pewien, że nic nie namieszałeś w zdarzeniach? Wytnij skrypt Vlada (dodatkowe przyciski), sprawdź, czy działa chodzenie i wklej skrypt ponownie... sprawdź, czy chodzi.
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum