The World
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

The World

Percez le secret du monde virtuel...
 
AccueilDernières imagesRechercherS'enregistrerConnexion
-28%
Le deal à ne pas rater :
Brandt LVE127J – Lave-vaisselle encastrable 12 couverts – L60cm
279.99 € 390.99 €
Voir le deal

 

 [Map]Script Objets V3

Aller en bas 
AuteurMessage
Try-Edge
Player Killer
Player Killer
Try-Edge


Masculin Nombre de messages : 36
Age : 33
Position : Yewbell
Occupations : Traquer Haseo
Genre : Player Killer
Date d'inscription : 20/03/2008

Identité
Niveau:
[Map]Script Objets V3 Left_bar_bleue5/100[Map]Script Objets V3 Empty_bar_bleue  (5/100)
Clan: The-World
Or:
[Map]Script Objets V3 Left_bar_bleue312/1100[Map]Script Objets V3 Empty_bar_bleue  (312/1100)

[Map]Script Objets V3 Empty
MessageSujet: [Map]Script Objets V3   [Map]Script Objets V3 Icon_minitimeSam 22 Mar - 0:05

Ce Script Permet d'ouvrir une petite fenetre en haut à gauche,où et inscrit le nom de l'objet ainsi que le quantité.
Il est Entiérement personalisable ,tout est expliquer a partir de la ligne 24.

Mode d’emplois :
Il n’y a rien de particulier a faire. Si ,par exemple, vous mettez dans un événement la ligne :
Citation :
> potion + 1

Installation :
Crée un nouveaux script au dessus de Main, nommer le comme vous voulez (Par exemple "Fenetre-Objet") et coller ceci dedans :


Citation :
#==============================================================================
# ? Obj_Map
#------------------------------------------------------------------------------
# Crée par : Kei-kun
# date : 23-02-08
# version : 3.0
#==============================================================================
class Obj_Map < Window_Base
#------------------------------------------------------------------------------
def initialize
super(0, 0, 64, 64)
self.contents = Bitmap.new(self.width - 32, self.height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@dispose_window = false
@drawn_window = false
@deroul = false
@hidden = true
self.visible = false
@conter = 0
@item_index = 0
#-----------------------------------------
#option <==PERSONALISATION==|
#-----------------------------------------
@temps = 200 #Nbr de frame ou la fenétre reste visible
@positif_color = Color.new(255, 255, 255, 255) #couleur l'orsque l'on gagne un objet
@négatif_color = Color.new(180, 0, 0, 255) #couleur l'orsque l'on perd un objet
self.opacity = 160 # Opaciter de la fenétre
@opacity_o = 255 # Opaciter de l'icon
@drawn_speed = 8 #vitesse de daparition de la fenétre (1 à ++)
@dispose_speed = 2 #vitesse de disparition de la fenétre (1 à 10)
@on_actor = true #La fennétre apparai au desus du hero (true=oui/false=non)
self.x = 32 #Coordonner x de la fenétre en pixel (Si @on_actor = false)
self.y = 64 #Coordonner y de la fenétre en pixel (Si @on_actor = false)
windowskin_name = "001-Blue01" # apparance de la fenétre.
@sond_name = "008-System08"#nom du fichier sond produit lors de l'aparition de la fenétre !
@sond_volume = 80 # Volume du son en % (0 = muer)
@sond_pitch = 150 # Tempo du son de 50% a 200%
#-----------------------------------------
#option~end~
#-----------------------------------------
$game_party.inv if @hidden
@hidden = false
@opacity = self.opacity
@d_s_o = @opacity_o/(@opacity/@dispose_speed)
self.windowskin = RPG::Cache.windowskin(windowskin_name)
end
#------------------------------------------------------------------------------
def draw_item(type,index)
self.contents.clear
case type
when 0
$kx2_obj_map_sac[0][index[1]] = 0 if $kx2_obj_map_sac[0][index] == nil
dif = $game_party.item_number(index) - $kx2_obj_map_sac[0][index]
$kx2_obj_map_sac[0][index] = $game_party.item_number(index)
item = $data_items[index]
when 1
$kx2_obj_map_sac[1][index[1]] = 0 if $kx2_obj_map_sac[1][index] == nil
dif = $game_party.armor_number(index) - $kx2_obj_map_sac[1][index]
$kx2_obj_map_sac[1][index] = $game_party.armor_number(index)
item = $data_armors[index]
when 2
$kx2_obj_map_sac[2][index[1]] = 0 if $kx2_obj_map_sac[2][index] == nil
dif = $game_party.weapon_number(index) - $kx2_obj_map_sac[2][index]
$kx2_obj_map_sac[2][index] = $game_party.weapon_number(index)
item = $data_weapons[index]
end
x = -2 # Mod.
y = 0 # Mod.
if item != nil
bitmap = RPG::Cache.icon(item.icon_name)
rect = Rect.new(0, 0, 24, 24)
self.contents.blt(x, y + 4, bitmap, rect,@opacity_o)
end
self.contents.font.color = Color.new(0,0,0,255) # Contoure
self.contents.draw_text(x + 3, y + 9, 32, 32, dif.to_s,2)
self.contents.draw_text(x + 2, y + 10, 32, 32, dif.to_s,2)
self.contents.draw_text(x + 1, y + 9, 32, 32, dif.to_s,2)
self.contents.draw_text(x + 2, y + 8, 32, 32, dif.to_s,2)
self.contents.font.color = dif > 0 ? @positif_color : @négatif_color
dif = "+"+ dif.to_s if dif > 0
self.contents.draw_text(x + 2, y + 9, 32, 32, dif.to_s,2)
Audio.se_play("Audio/SE/" + @sond_name, @sond_volume, @sond_pitch)
end
#------------------------------------------------------------------------------
def update
if @item_index < [$data_weapons.size,$data_armors.size,$data_items.size].max
@item_index += 1
else
@item_index = 1
end
if $kx2_obj_map_sac[0][@item_index] != $game_party.item_number(@item_index)
draw_item(0,@item_index)
@drawn_window_ini = true
end
if $kx2_obj_map_sac[1][@item_index] != $game_party.armor_number(@item_index)
draw_item(1,@item_index)
@drawn_window_ini = true
end
if $kx2_obj_map_sac[2][@item_index] != $game_party.weapon_number(@item_index)
draw_item(2,@item_index)
@drawn_window_ini = true
end
self.x = $game_player.screen_x - (self.width / 2) if @on_actor
self.y = -48 + $game_player.screen_y - self.height if @on_actor
if self.visible and !@deroul
@conter -= 1 if @conter >= 0
@dispose_window = true unless @conter >= 0
end
if @drawn_window_ini == true
self.width, @deroul,self.visible,@drawn_window_ini = 1, true, true,false
end

if @deroul and self.width < 64
for i in 1 .. @drawn_speed
self.width += 1 if self.width < 64
end
elsif @deroul
@deroul,@conter = false,@temps
end

if @dispose_window and self.opacity > @dispose_speed
self.opacity -= @dispose_speed
self.contents_opacity -= @d_s_o
elsif @dispose_window
self.opacity = self.contents_opacity = @opacity
self.visible = @dispose_window = false
end
end
#------------------------------------------------------------------------------
end
#===================================
# ■ Scene_Save
#===================================
class Scene_Save < Scene_File
alias kx2_obj_map_scene_save_write_save_data write_save_data
def write_save_data(file)
kx2_obj_map_scene_save_write_save_data(file)
Marshal.dump($kx2_obj_map_sac, file)
end
end
#===================================
# ■ Scene_Load
#===================================
class Scene_Load < Scene_File
alias kx2_obj_map_scene_load_read_save_data read_save_data
def read_save_data(file)
kx2_obj_map_scene_load_read_save_data(file)
$kx2_obj_map_sac = Marshal.load(file)
end
end
#===================================
# ■ Game_Party
#===================================
class Game_Party
def inv
$kx2_obj_map_sac = [[],[],[]]
for i in 1..[$data_weapons.size,$data_armors.size,$data_items.size].max
$kx2_obj_map_sac[0][i] = $data_items[i] != nil ? $game_party.item_number(i) : 0
$kx2_obj_map_sac[1][i] = $data_armors[i] != nil ? $game_party.armor_number(i) : 0
$kx2_obj_map_sac[2][i] = $data_weapons[i] != nil ? $game_party.weapon_number(i) : 0
end
end
end
#===================================
# ■ Game_Actor
#===================================
class Game_Actor
alias kx2_obj_map_game_actor_equip equip
def equip(equip_type, id)
$game_party.inv
kx2_obj_map_game_actor_equip(equip_type, id)
end
end
#===================================
# ■ Scene_Map
#===================================
class Scene_Map
alias kx2_obj_map_scene_map_main main
alias kx2_obj_map_scene_map_update update
def main
@window_item_plus = Obj_Map.new
kx2_obj_map_scene_map_main
@window_item_plus.dispose
end
def update
@window_item_plus.update
kx2_obj_map_scene_map_update
end
end



Voilà le résultat,Enjoy!
[Map]Script Objets V3 Clipimage002ez6
Revenir en haut Aller en bas
https://the-world.kanak.fr
 
[Map]Script Objets V3
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
The World :: Reunion of Makers :: Scripts-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser