Hi all !
Update 2.0
* Bugs fix
* Now you can use 3 items needed
* Add a tools to create crafts
Update 1.1 :
* Bugs fix in [WIN] Craft and [WIN] Quest_List
See the demo pack or the new scripts
Today I post my (*perfect*) craft script for Net Play Master v4.0.7 :D
First, can somebody translate this message and the script ? I'm French ^^.
New Screens :
The tool :
The new window with the 3rd item :
Old Screens :
Here's the script and the functions :
The Verfication :
The player don't have all the items, so :
If he has all the items (with the Amber Necklace) :
If you have any problem, you can download the demo pack in III/ Download.
1) Open the script menu
2) Create a new script before "[Main] Netplay Main". Call it : "[WIN] Craft"
3) Go to the script "[SC] Net Rmxp Hud".
4) On line 81 AFTER
Add :
5) On line 319, after
Add :
6) On line 426, after
Add :
7) On line 690, after
Add :
8) Replace your actual "[Win] Quest_List" by :
9) To open the craft menu In Game, create an event like this :
(The name is NOT needed)
If you have any problem, you can download this pack with the normal version of NetPlay Master v4.0.7 [The Last] from Valentine with my craft script.
Version 2.0 :
Download it :-)
Tool :
Download it :-)
For the config, use the tool and copy the generate line to your script in line 20.
You can use my script in any game or any Netplay System. I just want my name in the credit :-)
- More than 2 items needed //Done
- Suggest me !
If you have this error (or something like this that tell the function name or icon_name doesn't exist) :
Check if all IDs that you wrote in [WIN] Craft line 24 and more or with the tool are good !
(Thanks @Louis_R for the repport)
You have this error :
Go to [WIN] Craft line 55 and replace
to
(Thanks to @Jonny for the repport)
If you have an other problem, reply to this topic or pm me ^^
Update 2.0
* Bugs fix
* Now you can use 3 items needed
* Add a tools to create crafts
Update 1.1 :
* Bugs fix in [WIN] Craft and [WIN] Quest_List
See the demo pack or the new scripts
Today I post my (*perfect*) craft script for Net Play Master v4.0.7 :D
First, can somebody translate this message and the script ? I'm French ^^.
I/ Demonstration
New Screens :
The tool :
The new window with the 3rd item :
Old Screens :
Here's the script and the functions :
The Verfication :
The player don't have all the items, so :
If he has all the items (with the Amber Necklace) :
II/ Tutorial
If you have any problem, you can download the demo pack in III/ Download.
1) Open the script menu
2) Create a new script before "[Main] Netplay Main". Call it : "[WIN] Craft"
- Código:
#==============================================================================
# ** Craft
#------------------------------------------------------------------------------
# By Gauthier99
# Version 2.0
# 1 Jan 2014
#==============================================================================
def end_color
return Color.new(0, 200, 0, 0)
end
module Craft_Configure
#--------------------------------------------------------------------------
# * Liste des Crafts
#
# Download the tools on Aldeia RPG :
# http://aldeiarpgbr.forumeiros.com/t9311-npm-407-full-craft-system-new-update-20
#
#--------------------------------------------------------------------------
CRAFT = []
CRAFT[1] = ["Sword Handle", 39, "Item", 41, 3,"Item", 0, 0, "No_2", 0, 0, "No_3"]
CRAFT[2] = ["Iron Sword", 2, "Weapon", 39, 1,"Item", 36, 2, "Item", 0, 0, "No_3"]
CRAFT[3] = ["Amber Necklace", 37, "Armor", 38, 1,"Item", 40, 1, "Item", 0, 0, "No_3"]
CRAFT[4] = ["Strange Potion", 42, "Item", 2, 1,"Weapon", 37, 1, "Armor", 39, 1, "Item"]
end #Craft_Configure
#Initialisation
class Window_Craft < Window_Base
def initialize
super(310,80,232,260)
self.contents = Bitmap.new(width - 32, height - 32)
@dragable = true
@closable = true
self.z = 999999
self.back_opacity = 200
refresh
end
def update
super
end
def on_close
$craft_go = false
self.visible = false
self.active = false
$fechando_ativar = true
end
def refresh
if $index_craft == nil
$index_craft = 0
end
@actor = $game_party.actors[0]
self.contents.clear
@id = $index_craft + 1
@name = Craft_Configure::CRAFT[@id][0]
@type = Craft_Configure::CRAFT[@id][2]
@id_item = Craft_Configure::CRAFT[@id][1]
@item_1 = Craft_Configure::CRAFT[@id][3]
@item_1_qt = Craft_Configure::CRAFT[@id][4]
@item_1_type = Craft_Configure::CRAFT[@id][5]
@item_2 = Craft_Configure::CRAFT[@id][6]
@item_2_qt = Craft_Configure::CRAFT[@id][7]
@item_2_type = Craft_Configure::CRAFT[@id][8]
@item_3 = Craft_Configure::CRAFT[@id][9]
@item_3_qt = Craft_Configure::CRAFT[@id][10]
@item_3_type = Craft_Configure::CRAFT[@id][11]
# Nom de l'item crafté
rect = Rect.new(4, 0, self.contents.width - 8, 32)
self.contents.font.color = Color.new(255, 0, 0)
self.contents.draw_text(rect, @name.to_s, 1)
# Infos de l'item crafté
rect2 = Rect.new(4, 25, self.contents.width - 8, 32)
self.contents.font.color = normal_color
if @type == "Item"
self.contents.draw_text(rect2, $data_items[@id_item].description, 1)
elsif @type == "Weapon"
self.contents.draw_text(rect2, $data_weapons[@id_item].description, 1)
elsif @type == "Armor"
self.contents.draw_text(rect2, $data_armors[@id_item].description, 1)
end
# Icon de l'item crafté
if @type == "Item"
bitmap = RPG::Cache.icon($data_items[@id_item].icon_name)
elsif @type == "Weapon"
bitmap = RPG::Cache.icon($data_weapons[@id_item].icon_name)
elsif @type == "Armor"
bitmap = RPG::Cache.icon($data_armors[@id_item].icon_name)
end
cw = bitmap.width
ch = bitmap.height
facing = 0
src_rect = Rect.new(0, facing * ch, cw, ch)
self.contents.blt(89, 51, bitmap, src_rect)
# Séparation
rect = Rect.new(1, -35, self.contents.width, self.contents.height)
self.contents.font.color = normal_color
self.contents.draw_text(rect, "-------------------------------------------------------------------------------", 1)
self.contents.font.color = normal_color
# "Items Requis : "
rect = Rect.new(4, 80, self.contents.width - 8, 32)
self.contents.font.color = normal_color
self.contents.draw_text(rect, "Items Needed : ", 1)
self.contents.font.color = normal_color
# Icon de l'item 1 requis
if @item_1_type == "Item"
bitmap = RPG::Cache.icon($data_items[@item_1].icon_name)
elsif @item_1_type == "Weapon"
bitmap = RPG::Cache.icon($data_weapons[@item_1].icon_name)
elsif @item_1_type == "Armor"
bitmap = RPG::Cache.icon($data_armors[@item_1].icon_name)
end
cw = bitmap.width
ch = bitmap.height
facing = 0
src_rect = Rect.new(0, facing * ch, cw, ch)
self.contents.blt(10, 110, bitmap, src_rect)
# Nom de l'item 1 requis
rect = Rect.new(50, 104, 100, 30)
self.contents.font.color = normal_color
if @item_1_type == "Item"
self.contents.draw_text(rect, $data_items[@item_1].name)
elsif @item_1_type == "Weapon"
self.contents.draw_text(rect, $data_weapons[@item_1].name)
elsif @item_1_type == "Armor"
self.contents.draw_text(rect, $data_armors[@item_1].name)
end
self.contents.font.color = normal_color
# Quantité de l'item 1 requis
rect = Rect.new(70, 104, self.contents.width - 8, 32)
if @item_1_type == "Item"
if $game_party.item_number(@item_1) >= @item_1_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.item_number(@item_1).to_s+"/"+@item_1_qt.to_s, 1)
elsif @item_1_type == "Weapon"
if $game_party.weapon_number(@item_1) >= @item_1_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.weapon_number(@item_1).to_s+"/"+@item_1_qt.to_s, 1)
elsif @item_1_type == "Armor"
if $game_party.armor_number(@item_1) >= @item_1_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.armor_number(@item_1).to_s+"/"+@item_1_qt.to_s, 1)
end
if @item_2 == 0
#rien
else
# Icon de l'item 2 requis
if @item_2_type == "Item"
bitmap = RPG::Cache.icon($data_items[@item_2].icon_name)
elsif @item_2_type == "Weapon"
bitmap = RPG::Cache.icon($data_weapons[@item_2].icon_name)
elsif @item_2_type == "Armor"
bitmap = RPG::Cache.icon($data_armors[@item_2].icon_name)
end
cw = bitmap.width
ch = bitmap.height
facing = 0
src_rect = Rect.new(0, facing * ch, cw, ch)
self.contents.blt(10, 138, bitmap, src_rect)
# Nom de l'item 2 requis
rect = Rect.new(50, 134, 100, 30)
self.contents.font.color = normal_color
if @item_2_type == "Item"
self.contents.draw_text(rect, $data_items[@item_2].name)
elsif @item_2_type == "Weapon"
self.contents.draw_text(rect, $data_weapons[@item_2].name)
elsif @item_2_type == "Armor"
self.contents.draw_text(rect, $data_armors[@item_2].name)
end
self.contents.font.color = normal_color
# Quantité de l'item 2 requis
rect = Rect.new(70, 134, self.contents.width - 8, 32)
if @item_2_type == "Item"
if $game_party.item_number(@item_2) >= @item_2_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.item_number(@item_2).to_s+"/"+@item_2_qt.to_s, 1)
elsif @item_2_type == "Weapon"
if $game_party.weapon_number(@item_2) >= @item_2_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.weapon_number(@item_2).to_s+"/"+@item_2_qt.to_s, 1)
elsif @item_2_type == "Armor"
if $game_party.armor_number(@item_2) >= @item_2_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.armor_number(@item_2).to_s+"/"+@item_2_qt.to_s, 1)
end
end
if @item_3 == 0
#rien
else
# Icon de l'item 3 requis
if @item_3_type == "Item"
bitmap = RPG::Cache.icon($data_items[@item_3].icon_name)
elsif @item_3_type == "Weapon"
bitmap = RPG::Cache.icon($data_weapons[@item_3].icon_name)
elsif @item_3_type == "Armor"
bitmap = RPG::Cache.icon($data_armors[@item_3].icon_name)
end
cw = bitmap.width
ch = bitmap.height
facing = 0
src_rect = Rect.new(0, facing * ch, cw, ch)
self.contents.blt(10, 166, bitmap, src_rect)
# Nom de l'item 3 requis
rect = Rect.new(50, 164, 100, 30)
self.contents.font.color = normal_color
if @item_3_type == "Item"
self.contents.draw_text(rect, $data_items[@item_3].name)
elsif @item_3_type == "Weapon"
self.contents.draw_text(rect, $data_weapons[@item_3].name)
elsif @item_3_type == "Armor"
self.contents.draw_text(rect, $data_armors[@item_3].name)
end
self.contents.font.color = normal_color
# Quantité de l'item 3 requis
rect = Rect.new(70, 164, self.contents.width - 8, 32)
if @item_3_type == "Item"
if $game_party.item_number(@item_3) >= @item_3_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.item_number(@item_3).to_s+"/"+@item_3_qt.to_s, 1)
elsif @item_3_type == "Weapon"
if $game_party.weapon_number(@item_3) >= @item_3_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.weapon_number(@item_3).to_s+"/"+@item_3_qt.to_s, 1)
elsif @item_3_type == "Armor"
if $game_party.armor_number(@item_3) >= @item_3_qt
# Assez d'Item
self.contents.font.color = Color.new(0, 128, 0)
else
# Pas Assez
self.contents.font.color = Color.new(255, 0, 0)
end
self.contents.draw_text(rect, $game_party.armor_number(@item_3).to_s+"/"+@item_3_qt.to_s, 1)
end
end
# Bouton de Validation
@craft_button = Button.new(self,82,220," Craft ") {craft_it}
end
#end
def pas_assez
# Pas Assez
$quest_list.visible = false
$quest_list.active = false
$craft_w.visible = false
$craft_w.active = false
$craft_go = false
$fechando_ativar = true
$popup.set_text("Sorry, you don't have all",15, -3)
$popup.set_text2("items needed.",15, 10)
$popup.visible = true
$popup.active = true
end
# Fabriquation
def craft_it
#HERE
if @item_1_type == "Item"
if $game_party.item_number(@item_1) >= @item_1_qt
$game_party.lose_item(@item_1,@item_1_qt)
@item_1_ok = true
end
elsif @item_1_type == "Weapon"
if $game_party.weapon_number(@item_1) >= @item_1_qt
$game_party.lose_weapon(@item_1,@item_1_qt)
@item_1_ok = true
end
elsif @item_1_type == "Armor"
if $game_party.armor_number(@item_1) >= @item_1_qt
$game_party.lose_armor(@item_1,@item_1_qt)
@item_1_ok = true
end
else
@item_1_ok = true
end
if @item_2_type == "Item"
if $game_party.item_number(@item_2) >= @item_2_qt
$game_party.lose_item(@item_2,@item_2_qt)
@item_2_ok = true
end
elsif @item_2_type == "Weapon"
if $game_party.weapon_number(@item_2) >= @item_2_qt
$game_party.lose_weapon(@item_2,@item_2_qt)
@item_2_ok = true
end
elsif @item_2_type == "Armor"
if $game_party.armor_number(@item_2) >= @item_2_qt
$game_party.lose_armor(@item_2,@item_2_qt)
@item_2_ok = true
end
else
@item_2_ok = true
end
if @item_3_type == "Item"
if $game_party.item_number(@item_3) >= @item_3_qt
$game_party.lose_item(@item_3,@item_3_qt)
@item_3_ok = true
end
elsif @item_3_type == "Weapon"
if $game_party.weapon_number(@item_3) >= @item_3_qt
$game_party.lose_weapon(@item_3,@item_3_qt)
@item_3_ok = true
end
elsif @item_3_type == "Armor"
if $game_party.armor_number(@item_3) >= @item_3_qt
$game_party.lose_armor(@item_3,@item_3_qt)
@item_3_ok = true
end
else
@item_3_ok = true
end
if @item_1_ok == true and @item_2_ok == true and @item_3_ok == true
if @type == "Item"
$game_party.gain_item(@id_item, 1)
elsif @type == "Weapon"
$game_party.gain_weapon(@id_item, 1)
elsif @type == "Armor"
$game_party.gain_armor(@id_item, 1)
end
$craft_w.refresh
$quest_list.visible = false
$quest_list.active = false
$craft_w.visible = false
$craft_w.active = false
$craft_go = false
$fechando_ativar = true
$popup.set_text("You have crafted :",15, -3)
$popup.set_text2(@name + " !",15, 10)
$popup.visible = true
$popup.active = true
else
pas_assez
end
end
def something_changed?
return true if @name != @name
return true if @id_item != @name
return true if @description != @name
return true if @item_1 != @name
return true if @item_1_qt != @name
return true if @item_1_type != @name
return true if @item_2 != @name
return true if @item_2_qt != @name
return true if @item_2_type != @name
return true if @item_3 != @name
return true if @item_3_qt != @name
return true if @item_3_type != @name
return false
end
end
3) Go to the script "[SC] Net Rmxp Hud".
4) On line 81 AFTER
- Código:
$msg.active = false
Add :
- Código:
#Popup by Gauthier99
$popup = Window_Dummys.new(220,170,230,90)
@popup_button = Button.new($popup,90, 50, LANGUAGE::MSGOK) {$popup.visible = false; $popup.active = false; $fechando_ativar = true}
$popup.dragable = true
$popup.closable = true
$popup.visible = false
$popup.active = false
#Craft by Gauthier99
$craft_go = false
$craft_w = Window_Craft.new
$craft_w.visible = false
$craft_w.active = false
$craft_go = false
5) On line 319, after
- Código:
$member_list.dispose
Add :
- Código:
$popup.dispose
$craft_w.dispose
6) On line 426, after
- Código:
$teleport.update if $teleport.visible
Add :
- Código:
$craft_w.update if $craft_w.visible
$popup.update if $popup.visible
7) On line 690, after
- Código:
$game_temp.atualizar_mouse = true
end
Add :
- Código:
if $craft_w.visible == true
$craft_w.visible = false
$craft_w.active = false
$craft_go = false
end
if $popup.visible == true
$popup.visible = false
$popup.active = false
end
8) Replace your actual "[Win] Quest_List" by :
- Código:
#==============================================================================
# ** Lista de Quests
#------------------------------------------------------------------------------
# By Valentine
# Update by Gauthier99, Dec 2013
#==============================================================================
class Quest_list < Window_Selectable
attr_accessor :data2
def initialize(x,y,a,b,id)
super(x,y,a,b,id)
self.x = x
self.y = y
self.width = width
self.height = height
self.index = index
self.back_opacity = 200
self.z = 99999
self.index = 0
@dragable = true
@closable = true
refresh
end
def item
return @data[self.index]
end
def update
super
refresh if @old_quests != @data
if Input.trigger?(Input::C) or can_pressed?
#if $game_switches[Quest_Configure::MISSION[index+1][1]] == true #Si la quête est en cours, alors on peut cliquer dessus
# else
# return
#end
return if @data[index] == nil
if $craft_go == false
$quest_w.refresh
$quest_w.visible = true
$quest_w.active = true
else
$index_craft = self.index
$craft_w.refresh
$craft_w.visible = true
$craft_w.active = true
end
end
end
def can_pressed?
if ( Input.pressed?(Input::Mouse_Left) and in_area?([0, 16,self.width, 20*@item_max]) and @item_max <= 10 ) or ( Input.pressed?(Input::Mouse_Left) and in_area?([0, 16,self.width, self.height]) and @item_max > 10 )
return true
end
end
def on_close
$craft_go = false
self.visible = false
self.active = false
$fechando_ativar = true
end
def refresh
@old_quests = @data
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
if $craft_go == false
@old_quests = @data
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for p in 1..(Quest_Configure::MISSION.size-1)
@data.push(Quest_Configure::MISSION[p][0])
end
a = @data.index(p)
@data[a] = nil if a != nil
@data = @data.compact
@item_max = @data.size
# If item count is not 0, make a bit map and draw all items
if @data.size > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@data.size
draw_item(i)
end
end
else if $craft_go == true
#c'est un craft
@old_quests = @data
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for p in 1..(Craft_Configure::CRAFT.size-1)
#if $game_switches[Quest_Configure::MISSION[p][1]] == true
@data.push(Craft_Configure::CRAFT[p][0])
# end
end
a = @data.index(p)
@data[a] = nil if a != nil
@data = @data.compact
@item_max = @data.size
# If item count is not 0, make a bit map and draw all items
if @data.size > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@data.size
draw_item(i)
end
end
end
end
end
def open_craft
$craft_go = true
$quest.list.refresh
$quest.list.visible = true
$quest.list.active = true
end
def draw_item(index)
#$index_craft = self.index
item = @data[index]
if $craft_go == false
if $game_switches[Quest_Configure::MISSION[index+1][1]] == true
self.contents.font.color = Color.new(0,0,0) #normal_color # Bleu Gris : Color.new(76,124,145)
if $game_switches[Quest_Configure::MISSION[index+1][6]] == false
self.contents.font.color = Color.new(255,0,0) # Jaune : 250 180 0
end
else
self.contents.font.color = Color.new(0,0,0)#(128,
end
else
self.contents.font.color = Color.new(0,0,0)
end
x = 4
y = index * 20
rect = Rect.new(x, y-6, self.contents.width - 8, 32)
self.contents.draw_text(rect, item, 1)
end
end
9) To open the craft menu In Game, create an event like this :
(The name is NOT needed)
III/ Download
If you have any problem, you can download this pack with the normal version of NetPlay Master v4.0.7 [The Last] from Valentine with my craft script.
Version 2.0 :
Download it :-)
Tool :
Download it :-)
IV/ Config
For the config, use the tool and copy the generate line to your script in line 20.
- Old Config System:
Go the script "[WIN] Craft" line 20.
- Código:
CRAFT[1] = ["Sword Handle", "Item", 39, 41, 3, 0, 0]
CRAFT]1] is the ID
"Sword Handle" is the name (for the list)
"Item" is the type. Item, Armor, or Weapon
"39" is the ID of craft
"41" is the first item needed
"3" is the number of item 1
"0" is the second item needed (0 = No item)
"0" is the number of item 2 (0 = No item)
V/ Licence
You can use my script in any game or any Netplay System. I just want my name in the credit :-)
VI/ TO DO
- More than 2 items needed //Done
- Suggest me !
VII/ F.A.Q
If you have this error (or something like this that tell the function name or icon_name doesn't exist) :
Check if all IDs that you wrote in [WIN] Craft line 24 and more or with the tool are good !
(Thanks @Louis_R for the repport)
IIX/ !! BUG !! (In Version 1.0)
You have this error :
Go to [WIN] Craft line 55 and replace
- Código:
@id = $quest_list.index + 1
to
- Código:
@id = $index_craft + 1
(Thanks to @Jonny for the repport)
If you have an other problem, reply to this topic or pm me ^^
Última edição por Gauthier99 em Seg Jan 13, 2014 2:10 pm, editado 11 vez(es)