Night.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Sorties: Star Trek: Glorious Wolf - (...) / Sorties: Dread Mac Farlane - episode 3 / News: Plein d'images cools créées par (...) / Sorties: Star Trek: Glorious Wolf - (...) / Jeux: Final Fantasy 2.0 / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

274 connectés actuellement

29187430 visiteurs
depuis l'ouverture

2481 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Kingdom Ultimate

Le Comptoir Du clickeur

RPG Maker - La Communauté

Le Temple de Valor

Lumen

Tous nos partenaires

Devenir
partenaire



Input Name Keyboard

Permet d'écrire les noms des persos au claviers plutôt qu'avec le système des flêches habituelles.

Script pour RPG Maker VX
Ecrit par Inconnu, cybersam et berka
Publié par Sêpsis (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Auteur : Inconnu, cybersam et berka
Logiciel : RPG Maker VX
Nombre de scripts : 2

Fonctionnalités
Modifie le mode d'insertion du nom d'un héros : les noms peuvent maintenant être rentrés avec le clavier au lieu des touches directionnelles.

Installation
A placer au-dessus de Main.

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
module Kboard
$RMouse_BUTTON_L = 0x01 # left mouse button
$RMouse_BUTTON_R = 0x02 # right mouse button
$RMouse_BUTTON_M = 0x04 # middle mouse button
$RMouse_BUTTON_4 = 0x05 # 4th mouse button # only tested with win2k with a logitech mouse (MX900)
$RMouse_BUTTON_5 = 0x06 # 5th mouse button # only tested with win2k with a logitech mouse (MX900)
$R_Key_BACK = 0x08 # BACKSPACE key
$R_Key_TAB = 0x09 # TAB key
$R_Key_RETURN = 0x0D # ENTER key
$R_Key_SHIFT = 0x10 # SHIFT key
$R_Key_PAUSE = 0x13 # PAUSE key
$R_Key_CAPITAL = 0x14 # CAPS LOCK key
$R_Key_ESCAPE = 0x1B # ESC key
$R_Key_SPACE = 0x20 # SPACEBAR
$R_Key_PRIOR = 0x21 # PAGE UP key
$R_Key_NEXT = 0x22 # PAGE DOWN key
$R_Key_END = 0x23 # END key
$R_Key_HOME = 0x24 # HOME key
$R_Key_LEFT = 0x25 # LEFT ARROW key
$R_Key_UP = 0x26 # UP ARROW key
$R_Key_RIGHT = 0x27 # RIGHT ARROW key
$R_Key_DOWN = 0x28 # DOWN ARROW key
$R_Key_SELECT = 0x29 # SELECT key
$R_Key_PRINT = 0x2A # PRINT key
$R_Key_SNAPSHOT = 0x2C # PRINT SCREEN key
$R_Key_INSERT = 0x2D # INS key
$R_Key_DELETE = 0x2E # DEL key
$R_Key_0 = 0x30 # 0 key
$R_Key_1 = 0x31 # 1 key
$R_Key_2 = 0x32 # 2 key
$R_Key_3 = 0x33 # 3 key
$R_Key_4 = 0x34 # 4 key
$R_Key_5 = 0x35 # 5 key
$R_Key_6 = 0x36 # 6 key
$R_Key_7 = 0x37 # 7 key
$R_Key_8 = 0x38 # 8 key
$R_Key_9 = 0x39 # 9 key
$R_Key_A = 0x41 # A key
$R_Key_B = 0x42 # B key
$R_Key_C = 0x43 # C key
$R_Key_D = 0x44 # D key
$R_Key_E = 0x45 # E key
$R_Key_F = 0x46 # F key
$R_Key_G = 0x47 # G key
$R_Key_H = 0x48 # H key
$R_Key_I = 0x49 # I key
$R_Key_J = 0x4A # J key
$R_Key_K = 0x4B # K key
$R_Key_L = 0x4C # L key
$R_Key_M = 0x4D # M key
$R_Key_N = 0x4E # N key
$R_Key_O = 0x4F # O key
$R_Key_P = 0x50 # P key
$R_Key_Q = 0x51 # Q key
$R_Key_R = 0x52 # R key
$R_Key_S = 0x53 # S key
$R_Key_T = 0x54 # T key
$R_Key_U = 0x55 # U key
$R_Key_V = 0x56 # V key
$R_Key_W = 0x57 # W key
$R_Key_X = 0x58 # X key
$R_Key_Y = 0x59 # Y key
$R_Key_Z = 0x5A # Z key
$R_Key_LWIN = 0x5B # Left Windows key (Microsoft Natural keyboard)
$R_Key_RWIN = 0x5C # Right Windows key (Natural keyboard)
$R_Key_APPS = 0x5D # Applications key (Natural keyboard)
$R_Key_NUMPAD0 = 0x60 # Numeric keypad 0 key
$R_Key_NUMPAD1 = 0x61 # Numeric keypad 1 key
$R_Key_NUMPAD2 = 0x62 # Numeric keypad 2 key
$R_Key_NUMPAD3 = 0x63 # Numeric keypad 3 key
$R_Key_NUMPAD4 = 0x64 # Numeric keypad 4 key
$R_Key_NUMPAD5 = 0x65 # Numeric keypad 5 key
$R_Key_NUMPAD6 = 0x66 # Numeric keypad 6 key
$R_Key_NUMPAD7 = 0x67 # Numeric keypad 7 key
$R_Key_NUMPAD8 = 0x68 # Numeric keypad 8 key
$R_Key_NUMPAD9 = 0x69 # Numeric keypad 9 key
$R_Key_MULTIPLY = 0x6A # Multiply key (*)
$R_Key_ADD = 0x6B # Add key (+)
$R_Key_SEPARATOR = 0x6C # Separator key
$R_Key_SUBTRACT = 0x6D # Subtract key (-)
$R_Key_DECIMAL = 0x6E # Decimal key
$R_Key_DIVIDE = 0x6F # Divide key (/)
$R_Key_F1 = 0x70 # F1 key
$R_Key_F2 = 0x71 # F2 key
$R_Key_F3 = 0x72 # F3 key
$R_Key_F4 = 0x73 # F4 key
$R_Key_F5 = 0x74 # F5 key
$R_Key_F6 = 0x75 # F6 key
$R_Key_F7 = 0x76 # F7 key
$R_Key_F8 = 0x77 # F8 key
$R_Key_F9 = 0x78 # F9 key
$R_Key_F10 = 0x79 # F10 key
$R_Key_F11 = 0x7A # F11 key
$R_Key_F12 = 0x7B # F12 key
$R_Key_NUMLOCK = 0x90 # NUM LOCK key
$R_Key_SCROLL = 0x91 # SCROLL LOCK key
$R_Key_LSHIFT = 0xA0 # Left SHIFT key
$R_Key_RSHIFT = 0xA1 # Right SHIFT key
$R_Key_LCONTROL = 0xA2 # Left CONTROL key
$R_Key_RCONTROL = 0xA3 # Right CONTROL key
$R_Key_L_ALT = 0xA4 # Left ALT key
$R_Key_R_ALT = 0xA5 # Right ALT key
$R_Key_SEP = 0xBC # , key
$R_Key_DASH = 0xBD # - key
$R_Key_DOTT = 0xBE # . key
GetKeyState = Win32API.new("user32","GetAsyncKeyState",['i'],'i')
GetKeyboardState = Win32API.new("user32","GetKeyState",['i'],'i')
GetSetKeyState = Win32API.new("user32","SetKeyboardState",['i'],'i')
module_function
def keyboard(rkey)
GetKeyState.call(rkey) & 0x01 == 1 
end
def key(rkey, key = 0)
GetKeyboardState.call(rkey) & 0x01 == key 
end
end



Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#                              Text Input
#                              par cybersam
#                      revu et corrigé par berka
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
class Game_Interpreter
  def command_303
    if $data_actors[@params[0]] != nil
      data, top_text, text, font, size = 
      [],  "Entrez  votre nom: ", "", "Arial", 24
      $game_temp.name_actor_id = @params[0]
      $game_temp.name_max_char = @params[1]
      max =$game_temp.name_max_char
      actor = $game_actors[$game_temp.name_actor_id]
      $game_actors[$game_temp.name_actor_id].name=Text_input.new(actor,top_text, text, font, max, size).text
    end
    @index += 1
    return false 
  end
end
 
class Text_input < Window_Base
  attr_reader :name
  def initialize(actor, top_text, text, font, max, size, free = "_", max2=20)
    @toptext, @actor, @text, @font, @max, @max2, @size, @free = 
    top_text, actor, actor.name, font, max, max2, size, free
    super(272 - (@max2*@size+@size)/2, 208-@size*2-32, @max2 * @size + 32, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = @font
    self.contents.font.size = @size
    self.z = 256
    @twidth, @twidth2 = @max2*@size, @max2*@size-(1/4*@max2)
    refresh
    update
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, @twidth, @size, @toptext, 1)
    for i in 0...@max
      text = @text[i]
      if text == nil
        text = @free
      else
        text = text.chr
      end
      self.contents.font.color = normal_color
      self.contents.draw_text(@size * i+ (@max2*@size+@size)/2-(@max*@size+@size)/2, @size + 24, @size, @size, text.to_s, 1)#
      draw_actor_graphic(@actor, 20, 45)
    end
  end
  def update
    loop do
      Graphics.update
      refresh
      if Kboard.keyboard($R_Key_BACK) 
        text = ""
        if @text.size != 0
          for i in 0... @text.size - 1
            text += @text[i].chr
          end
          @text = text
        else
        end
      end
      return if Kboard.keyboard($R_Key_RETURN)
      if @text.size < @max
        @text += " " if Kboard.keyboard($R_Key_SPACE) 
        if Kboard.key($R_Key_CAPITAL, 1) or
          Kboard.key($R_Key_LSHIFT, 1) or
          Kboard.key($R_Key_LSHIFT, 1)
          @text += "A" if Kboard.keyboard($R_Key_A)
          @text += "B" if Kboard.keyboard($R_Key_B)
          @text += "C" if Kboard.keyboard($R_Key_C)
          @text += "D" if Kboard.keyboard($R_Key_D)
          @text += "E" if Kboard.keyboard($R_Key_E)
          @text += "F" if Kboard.keyboard($R_Key_F)
          @text += "G" if Kboard.keyboard($R_Key_G)
          @text += "H" if Kboard.keyboard($R_Key_H)
          @text += "I" if Kboard.keyboard($R_Key_I)
          @text += "J" if Kboard.keyboard($R_Key_J)
          @text += "K" if Kboard.keyboard($R_Key_K)
          @text += "L" if Kboard.keyboard($R_Key_L)
          @text += "M" if Kboard.keyboard($R_Key_M)
          @text += "N" if Kboard.keyboard($R_Key_N)
          @text += "O" if Kboard.keyboard($R_Key_O)
          @text += "P" if Kboard.keyboard($R_Key_P)
          @text += "Q" if Kboard.keyboard($R_Key_Q)
          @text += "R" if Kboard.keyboard($R_Key_R)
          @text += "S" if Kboard.keyboard($R_Key_S)
          @text += "T" if Kboard.keyboard($R_Key_T)
          @text += "U" if Kboard.keyboard($R_Key_U)
          @text += "V" if Kboard.keyboard($R_Key_V)
          @text += "W" if Kboard.keyboard($R_Key_W)
          @text += "X" if Kboard.keyboard($R_Key_X)
          @text += "Y" if Kboard.keyboard($R_Key_Y)
          @text += "Z" if Kboard.keyboard($R_Key_Z)
        elsif Kboard.key($R_Key_CAPITAL) 
          @text += "a" if Kboard.keyboard($R_Key_A)
          @text += "b" if Kboard.keyboard($R_Key_B)
          @text += "c" if Kboard.keyboard($R_Key_C)
          @text += "d" if Kboard.keyboard($R_Key_D)
          @text += "e" if Kboard.keyboard($R_Key_E)
          @text += "f" if Kboard.keyboard($R_Key_E)
          @text += "g" if Kboard.keyboard($R_Key_G)
          @text += "h" if Kboard.keyboard($R_Key_H)
          @text += "i" if Kboard.keyboard($R_Key_I)
          @text += "j" if Kboard.keyboard($R_Key_J)
          @text += "k" if Kboard.keyboard($R_Key_K)
          @text += "l" if Kboard.keyboard($R_Key_L)
          @text += "m" if Kboard.keyboard($R_Key_M)
          @text += "n" if Kboard.keyboard($R_Key_N)
          @text += "o" if Kboard.keyboard($R_Key_O)
          @text += "p" if Kboard.keyboard($R_Key_P)
          @text += "q" if Kboard.keyboard($R_Key_Q)
          @text += "r" if Kboard.keyboard($R_Key_R)
          @text += "s" if Kboard.keyboard($R_Key_S)
          @text += "t" if Kboard.keyboard($R_Key_T)
          @text += "u" if Kboard.keyboard($R_Key_U)
          @text += "v" if Kboard.keyboard($R_Key_V)
          @text += "w" if Kboard.keyboard($R_Key_W)
          @text += "x" if Kboard.keyboard($R_Key_X)
          @text += "y" if Kboard.keyboard($R_Key_Y)
          @text += "z" if Kboard.keyboard($R_Key_Z)
        end
        if Kboard.key($R_Key_CAPITAL, 1)
          @text += "0" if Kboard.keyboard($R_Key_0)
          @text += "1" if Kboard.keyboard($R_Key_1)
          @text += "2" if Kboard.keyboard($R_Key_2)
          @text += "3" if Kboard.keyboard($R_Key_3)
          @text += "4" if Kboard.keyboard($R_Key_4)
          @text += "5" if Kboard.keyboard($R_Key_5)
          @text += "6" if Kboard.keyboard($R_Key_6)
          @text += "7" if Kboard.keyboard($R_Key_7)
          @text += "8" if Kboard.keyboard($R_Key_8)
          @text += "9" if Kboard.keyboard($R_Key_9)
        elsif Kboard.key($R_Key_CAPITAL)
          @text += "à" if Kboard.keyboard($R_Key_0)
          @text += "&" if Kboard.keyboard($R_Key_1)
          @text += "é" if Kboard.keyboard($R_Key_2)
          @text += "'" if Kboard.keyboard($R_Key_4)
          @text += "(" if Kboard.keyboard($R_Key_5)
          @text += ")" if Kboard.keyboard($R_Key_6)
          @text += "è" if Kboard.keyboard($R_Key_7)
          @text += "_" if Kboard.keyboard($R_Key_8)
          @text += "ç" if Kboard.keyboard($R_Key_9)
        end
        @text += "0" if Kboard.keyboard($R_Key_NUMPAD0)
        @text += "1" if Kboard.keyboard($R_Key_NUMPAD1)
        @text += "2" if Kboard.keyboard($R_Key_NUMPAD2)
        @text += "3" if Kboard.keyboard($R_Key_NUMPAD3)
        @text += "4" if Kboard.keyboard($R_Key_NUMPAD4)
        @text += "5" if Kboard.keyboard($R_Key_NUMPAD5)
        @text += "6" if Kboard.keyboard($R_Key_NUMPAD6)
        @text += "7" if Kboard.keyboard($R_Key_NUMPAD7)
        @text += "8" if Kboard.keyboard($R_Key_NUMPAD8)
        @text += "9" if Kboard.keyboard($R_Key_NUMPAD9)
        @text += "+" if Kboard.keyboard($R_Key_ADD) 
        @text += "-" if Kboard.keyboard($R_Key_SUBTRACT) 
        @text += "/" if Kboard.keyboard($R_Key_DIVIDE) 
        @text += "*" if Kboard.keyboard($R_Key_MULTIPLY) 
        if Kboard.key($R_Key_CAPITAL) 
          @text += "," if Kboard.keyboard($R_Key_SEP) 
          @text += "-" if Kboard.keyboard($R_Key_DASH)
          @text += "." if Kboard.keyboard($R_Key_DOTT) 
        elsif Kboard.key($R_Key_CAPITAL, 1)
          @text += ";" if Kboard.keyboard($R_Key_SEP) 
          @text += "_" if Kboard.keyboard($R_Key_DASH) 
          @text += ":" if Kboard.keyboard($R_Key_DOTT) 
        end
      else
      end
      refresh
    end
  end
  def text()
    self.contents.dispose
    self.dispose
    return @text
  end
end




Mis à jour le 25 juillet 2020.






toy master - posté le 27/09/2008 à 20:08:07 (2553 messages postés)

❤ 0

Programmeur confirmé et à la retraite !

Marche pas.
Ou alors explique comment le mettre en oeuvre.

--Citation : L'homme n'est pas fait pour travailler, la preuve c'est que ça le fatigue !--Un petit rpg totalement debile !--Ma galerie !--Un petit rpg totalement débile 2 !


sêpsis - posté le 27/09/2008 à 20:31:18 (28 messages postés)

❤ 0

A tu bien fait 2 scripts différents ? ( j'en ai apellé un : clavier 1, et l'autre ; clavier 2)

Parce qu'il faut de tout pour faire un monde...


toy master - posté le 27/09/2008 à 21:52:54 (2553 messages postés)

❤ 0

Programmeur confirmé et à la retraite !

Mais apres, pour activer ces scriptes, je fais quoi ?
Pour entrer le noms du hero ?
Et j'ai bien fait 2 scripts différents.

--Citation : L'homme n'est pas fait pour travailler, la preuve c'est que ça le fatigue !--Un petit rpg totalement debile !--Ma galerie !--Un petit rpg totalement débile 2 !


sêpsis - posté le 28/09/2008 à 08:05:21 (28 messages postés)

❤ 0

Une fois que tes deux scripts sont fait, avec leurs noms, tu applique, et tu créés un nouvel évènement ( par exemple un villageois), et tu lui applique l'évènement " rentrer un nom de personnage", en cliquant avec la touche action, au niveau du héros
Tu lances la démo, et quand tu clique sur le villageois, tu rentreras dans une fenêtre où tu devra marquer un nom
C'est là que tu écrit au clavier le nom du héros^^

Parce qu'il faut de tout pour faire un monde...


toy master - posté le 28/09/2008 à 11:27:03 (2553 messages postés)

❤ 0

Programmeur confirmé et à la retraite !

Et ****, j'avais testé ça sous xp XD
Ca marche super sous VX ^^

--Citation : L'homme n'est pas fait pour travailler, la preuve c'est que ça le fatigue !--Un petit rpg totalement debile !--Ma galerie !--Un petit rpg totalement débile 2 !


vlad - posté le 28/09/2008 à 13:34:23 (294 messages postés)

❤ 0

C'est pas pour xp ?
C'est quoi ct'histoire !?
Po juste ... :'(


sêpsis - posté le 28/09/2008 à 18:06:31 (28 messages postés)

❤ 0

lol Ben non dsl, j'ai précisé pour VX
^^ Je vais en sortir de nouveaux

Parce qu'il faut de tout pour faire un monde...


SuperHerosLink - posté le 10/10/2008 à 17:17:17 (31 messages postés)

❤ 0

Projet en cours: un rpg sans titre mais qui va être cool^^

y A RIEN QUE LE F (merde de cap) qui marche po

La terre est ronde, donc comment puis-je marcher normalent?


Vive maitre monos - posté le 12/10/2008 à 18:59:48 (1 messages postés)

❤ 0

Viva notre grand maitre monos

:) Merci pour ce superbe script!

Mange mon geek!


ptiteuf - posté le 28/10/2008 à 18:14:14 (17 messages postés)

❤ 0

c'est bien mais il y a 2 problème:
1: le F marche
2: on écrit tout le temps en majuscules sauf quand on appuie sur maj...

donc à corriger! :p


toutman6 - posté le 09/11/2008 à 15:10:31 (1 messages postés)

❤ 0

est aussi sur mon ordi y dise qu' il y a une erreur ligne 45 et 47 du second script


halanich - posté le 20/11/2008 à 12:21:00 (4 messages postés)

❤ 0

Erreur ligne 26, script 2, et quand je supprime " < Window_Base", ça revient comme avant...


dodake - posté le 29/11/2008 à 13:20:19 (4 messages postés)

❤ 0

merci beaucoup pour se script :)
mintenant, le scipt ideal serait d'en creer 1 qui conserve se nom et qu'il puisse aparaitre dans des dialogue :lol
aller hop, je me mais au boulot... :help


shadows - posté le 03/12/2008 à 14:31:16 (52 messages postés)

❤ 0

Terrible ce texte, non ?

Bah c'est simple tu sais tu fais "\N[1]" dans un dialogue...

Les Ténèbres d'Oniromancie... Ne cliquez pas ici (et ne vous inscrivez pas)


Guadryan - posté le 17/02/2009 à 16:34:13 (3 messages postés)

❤ 0

Bon un petit détail ! j'ai trouvé la solution au F qui s'inscrit pas !
petite erreur en rédigeant le script:
Ligne 157 du script 2, il y a sa:

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
          @text += "d" if Kboard.keyboard($R_Key_D)
 
          @text += "e" if Kboard.keyboard($R_Key_E)
 
          @text += "f" if Kboard.keyboard($R_Key_E)
 
          @text += "g" if Kboard.keyboard($R_Key_G)



remplacez Le deuxième "$R_key_E" par "$R_Key_F"
Et voilà ! Le tour est joué.

De plus, j'ai trifouiller un peu pour le prob de majuscule et j'ai réussi a faire "minuscule pas défaut et Majuscule quand on appuie sur verr.Maj"
Cependant, je ne sais pas comment on marque "Si vous rester appuyer sur Shift" En Ruby alors vous ne pourrez pas utiliser Shift.
Bref voilà le corrigé du Script 2:

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
#                              Text Input
 
#                              par cybersam
 
#                      revu et corrigé par berka
 
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
 
 
class Game_Interpreter
 
  def command_303
 
    if $data_actors[@params[0]] != nil
 
      data, top_text, text, font, size = 
 
      [],  "Entrez  votre nom: ", "", "Arial", 24
 
      $game_temp.name_actor_id = @params[0]
 
      $game_temp.name_max_char = @params[1]
 
      max =$game_temp.name_max_char
 
      actor = $game_actors[$game_temp.name_actor_id]
 
      $game_actors[$game_temp.name_actor_id].name=Text_input.new(actor,top_text, text, font, max, size).text
 
    end
 
    @index += 1
 
    return false 
 
  end
 
end
 
 
 
class Text_input < Window_Base
 
  attr_reader :name
 
  def initialize(actor, top_text, text, font, max, size, free = "_", max2=20)
 
    @toptext, @actor, @text, @font, @max, @max2, @size, @free = 
 
    top_text, actor, actor.name, font, max, max2, size, free
 
    super(272 - (@max2*@size+@size)/2, 208-@size*2-32, @max2 * @size + 32, 128)
 
    self.contents = Bitmap.new(width - 32, height - 32)
 
    self.contents.font.name = @font
 
    self.contents.font.size = @size
 
    self.z = 256
 
    @twidth, @twidth2 = @max2*@size, @max2*@size-(1/4*@max2)
 
    refresh
 
    update
 
  end
 
  def refresh
 
    self.contents.clear
 
    self.contents.font.color = system_color
 
    self.contents.draw_text(0, 0, @twidth, @size, @toptext, 1)
 
    for i in 0...@max
 
      text = @text[i]
 
      if text == nil
 
        text = @free
 
      else
 
        text = text.chr
 
      end
 
      self.contents.font.color = normal_color
 
      self.contents.draw_text(@size * i+ (@max2*@size+@size)/2-(@max*@size+@size)/2, @size + 24, @size, @size, text.to_s, 1)#
 
      draw_actor_graphic(@actor, 20, 45)
 
    end
 
  end
 
  def update
 
    loop do
 
      Graphics.update
 
      refresh
 
      if Kboard.keyboard($R_Key_BACK) 
 
        text = ""
 
        if @text.size != 0
 
          for i in 0... @text.size - 1
 
            text += @text[i].chr
 
          end
 
          @text = text
 
        else
 
        end
 
      end
 
      return if Kboard.keyboard($R_Key_RETURN)
 
      if @text.size < @max
 
        @text += " " if Kboard.keyboard($R_Key_SPACE) 
 
        if Kboard.key($R_Key_CAPITAL, 1) or
          
          Kboard.key($R_Key_LSHIFT)
 
          @text += "A" if Kboard.keyboard($R_Key_A)
 
          @text += "B" if Kboard.keyboard($R_Key_B)
 
          @text += "C" if Kboard.keyboard($R_Key_C)
 
          @text += "D" if Kboard.keyboard($R_Key_D)
 
          @text += "E" if Kboard.keyboard($R_Key_E)
 
          @text += "F" if Kboard.keyboard($R_Key_F)
 
          @text += "G" if Kboard.keyboard($R_Key_G)
 
          @text += "H" if Kboard.keyboard($R_Key_H)
 
          @text += "I" if Kboard.keyboard($R_Key_I)
 
          @text += "J" if Kboard.keyboard($R_Key_J)
 
          @text += "K" if Kboard.keyboard($R_Key_K)
 
          @text += "L" if Kboard.keyboard($R_Key_L)
 
          @text += "M" if Kboard.keyboard($R_Key_M)
 
          @text += "N" if Kboard.keyboard($R_Key_N)
 
          @text += "O" if Kboard.keyboard($R_Key_O)
 
          @text += "P" if Kboard.keyboard($R_Key_P)
 
          @text += "Q" if Kboard.keyboard($R_Key_Q)
 
          @text += "R" if Kboard.keyboard($R_Key_R)
 
          @text += "S" if Kboard.keyboard($R_Key_S)
 
          @text += "T" if Kboard.keyboard($R_Key_T)
 
          @text += "U" if Kboard.keyboard($R_Key_U)
 
          @text += "V" if Kboard.keyboard($R_Key_V)
 
          @text += "W" if Kboard.keyboard($R_Key_W)
 
          @text += "X" if Kboard.keyboard($R_Key_X)
 
          @text += "Y" if Kboard.keyboard($R_Key_Y)
 
          @text += "Z" if Kboard.keyboard($R_Key_Z)
 
        elsif Kboard.key($R_Key_CAPITAL)
 
 
          @text += "a" if Kboard.keyboard($R_Key_A)
 
          @text += "b" if Kboard.keyboard($R_Key_B)
 
          @text += "c" if Kboard.keyboard($R_Key_C)
 
          @text += "d" if Kboard.keyboard($R_Key_D)
 
          @text += "e" if Kboard.keyboard($R_Key_E)
 
          @text += "f" if Kboard.keyboard($R_Key_E)
 
          @text += "g" if Kboard.keyboard($R_Key_G)
 
          @text += "h" if Kboard.keyboard($R_Key_H)
 
          @text += "i" if Kboard.keyboard($R_Key_I)
 
          @text += "j" if Kboard.keyboard($R_Key_J)
 
          @text += "k" if Kboard.keyboard($R_Key_K)
 
          @text += "l" if Kboard.keyboard($R_Key_L)
 
          @text += "m" if Kboard.keyboard($R_Key_M)
 
          @text += "n" if Kboard.keyboard($R_Key_N)
 
          @text += "o" if Kboard.keyboard($R_Key_O)
 
          @text += "p" if Kboard.keyboard($R_Key_P)
 
          @text += "q" if Kboard.keyboard($R_Key_Q)
 
          @text += "r" if Kboard.keyboard($R_Key_R)
 
          @text += "s" if Kboard.keyboard($R_Key_S)
 
          @text += "t" if Kboard.keyboard($R_Key_T)
 
          @text += "u" if Kboard.keyboard($R_Key_U)
 
          @text += "v" if Kboard.keyboard($R_Key_V)
 
          @text += "w" if Kboard.keyboard($R_Key_W)
 
          @text += "x" if Kboard.keyboard($R_Key_X)
 
          @text += "y" if Kboard.keyboard($R_Key_Y)
 
          @text += "z" if Kboard.keyboard($R_Key_Z)
 
        end
 
        if Kboard.key($R_Key_CAPITAL, 1)
 
          @text += "0" if Kboard.keyboard($R_Key_0)
 
          @text += "1" if Kboard.keyboard($R_Key_1)
 
          @text += "2" if Kboard.keyboard($R_Key_2)
 
          @text += "3" if Kboard.keyboard($R_Key_3)
 
          @text += "4" if Kboard.keyboard($R_Key_4)
 
          @text += "5" if Kboard.keyboard($R_Key_5)
 
          @text += "6" if Kboard.keyboard($R_Key_6)
 
          @text += "7" if Kboard.keyboard($R_Key_7)
 
          @text += "8" if Kboard.keyboard($R_Key_8)
 
          @text += "9" if Kboard.keyboard($R_Key_9)
 
        elsif Kboard.key($R_Key_CAPITAL)
 
          @text += "à" if Kboard.keyboard($R_Key_0)
 
          @text += "&" if Kboard.keyboard($R_Key_1)
 
          @text += "é" if Kboard.keyboard($R_Key_2)
 
          @text += "'" if Kboard.keyboard($R_Key_4)
 
          @text += "(" if Kboard.keyboard($R_Key_5)
 
          @text += ")" if Kboard.keyboard($R_Key_6)
 
          @text += "è" if Kboard.keyboard($R_Key_7)
 
          @text += "_" if Kboard.keyboard($R_Key_8)
 
          @text += "ç" if Kboard.keyboard($R_Key_9)
 
        end
 
        @text += "0" if Kboard.keyboard($R_Key_NUMPAD0)
 
        @text += "1" if Kboard.keyboard($R_Key_NUMPAD1)
 
        @text += "2" if Kboard.keyboard($R_Key_NUMPAD2)
 
        @text += "3" if Kboard.keyboard($R_Key_NUMPAD3)
 
        @text += "4" if Kboard.keyboard($R_Key_NUMPAD4)
 
        @text += "5" if Kboard.keyboard($R_Key_NUMPAD5)
 
        @text += "6" if Kboard.keyboard($R_Key_NUMPAD6)
 
        @text += "7" if Kboard.keyboard($R_Key_NUMPAD7)
 
        @text += "8" if Kboard.keyboard($R_Key_NUMPAD8)
 
        @text += "9" if Kboard.keyboard($R_Key_NUMPAD9)
 
        @text += "+" if Kboard.keyboard($R_Key_ADD) 
 
        @text += "-" if Kboard.keyboard($R_Key_SUBTRACT) 
 
        @text += "/" if Kboard.keyboard($R_Key_DIVIDE) 
 
        @text += "*" if Kboard.keyboard($R_Key_MULTIPLY) 
 
        if Kboard.key($R_Key_CAPITAL) 
 
          @text += "," if Kboard.keyboard($R_Key_SEP) 
 
          @text += "-" if Kboard.keyboard($R_Key_DASH)
 
          @text += "." if Kboard.keyboard($R_Key_DOTT) 
 
        elsif Kboard.key($R_Key_CAPITAL, 1)
 
          @text += ";" if Kboard.keyboard($R_Key_SEP) 
 
          @text += "_" if Kboard.keyboard($R_Key_DASH) 
 
          @text += ":" if Kboard.keyboard($R_Key_DOTT) 
 
        end
 
      else
 
      end
 
      refresh
 
    end
 
  end
 
  def text()
 
    self.contents.dispose
 
    self.dispose
 
    return @text
 
  end
 
end 



Voilà ! =D


Amie - posté le 02/03/2009 à 17:04:59 (22 messages postés)

❤ 0

Cliquez sur l'"URL" se ma Sign. SVP

Ok mais pour quoi le nom de perso ne s'affiche pas dans le menu ? :'(

Édit : le scripte 2 version 2 ne marche pas (On à déjà vu un scripte marcher ?) :goutte

Édit 2 : Sa marche aussi pour "Entrer un nombre" ?

&#27700;&#26230;&#12398;&#24515;&#12398;&#28057; (si vous trouvez sa signification MP moi) --- Caractère Tèkma


xXx-Dark-Vlad-xXx - posté le 20/03/2009 à 18:18:42 (25 messages postés)

❤ 0

killer of rpg maker VX

comme dab' vous maité jamais ou ont met le script et moi jsui pomé --"


Darkpyro - posté le 03/05/2009 à 18:45:36 (1 messages postés)

❤ 0

Merci beaucoup pour le script, en plus il marche correctement c'est excellent! Si ça peut en inspirer quelques-uns tant qu'à faire, j'ai utilisé ton script pour pouvoir créer comme un système d'incantation ou le joueur appuie sur une touche, puis entre le nom d'un perso au clavier (merci encore^^) puis comme avec un système de mot de passe, le mot qu'il entre donne lieu à diverses actions...une invisibilité, un téléport...voila mon idée. Continue à être motivé, ton script est génial, je sais que c'est long des scripts mais tu fais tellement d'heureux^^


§pr!nG - posté le 05/05/2009 à 19:07:54 (1 messages postés)

❤ 0

Salut les deux script à créer se placent au dessus de main tu en appel un clavier1 et l'autre clavier2 comme guadryan l'a dit.

Ensuite pour l'erreur du f et du shift il faut remplacer dans clavier2 à la ligne 144 Kboard.key($R_Key_LSHIFT, 1) par Kboard.key($R_Key_RSHIFT, 1)

(Comme l'a dit guadryan il shift fait office de caps lock donc on appui une fois pour les majuscules puis une deuxieme fois pour les minuscules)

Pour le f il faut remplacer :

@text += "F" if Kboard.keyboard($R_Key_E) par @text += "F" if Kboard.keyboard($R_Key_F) à la ligne 156

puis remplacer:

@text += "f" if Kboard.keyboard($R_Key_E) par @text += "f" if Kboard.keyboard($R_Key_F) à la ligne 210

Et voilà le tour est jouer :D


triton25 - posté le 15/06/2009 à 18:13:20 (5 messages postés)

❤ 0

On met quoi dans "nouveau nom"?


franchar - posté le 08/07/2009 à 14:25:10 (9 messages postés)

❤ 0

Merci pour ce super script


dricc - posté le 25/08/2009 à 15:41:22 (13 messages postés)

❤ 0

Oui , merci . Allez , hop , copié !

Maintenant , la gestion des touches SHIFT etant , disons-le , particulierement mal foutue , j'ai modifié le script de cette façon :

Remplacement de :
if Kboard.key($R_Key_CAPITAL, 1) or

Kboard.key($R_Key_LSHIFT, 1) or

Kboard.key($R_Key_RSHIFT, 1)

Par :
if @text.size == 0
(dans le deuxieme code aux alentours de la ligne 139) .

De cette maniere , la premiere lettre est toujours en majuscule et les suivantes en minuscule . Ce qui donne un résultat trés propre et cohérent avec les noms de vos autres personnages !


deutcher - posté le 31/08/2009 à 16:51:20 (19 messages postés)

❤ 0

J'ai un probleme line91 =
text = text.chr


Script '002' line 91: NoMethodError occured.
Undefined method (accentgrave)chr' for "":String


Shadow-of-Life - posté le 22/09/2009 à 18:16:18 (19 messages postés)

❤ 0

"Nous sommes trop à penser peu, peu à penser trop ..."

Ce Script est simplement .... abominable !
Qui eu crut qu'un jour, un script pareille puisse être cataloguer ici !


Je dirai ça si je savait faire un script ... ;)
Ce n'est pas grave mais il bug vraiment beaucoup ce script !

kingdom-of-life.bbactif.com/


Zeddicuss - posté le 12/02/2010 à 14:31:41 (300 messages postés)

❤ 0

La mort c'est l'arret du coeur... L'amour c'est la raie du cul.

Super ce script !
Avec toutes les modifications nécessaires il marche du tonnerre !
Les seuls inconvénient c'est que :
- Je n'ai pas de touche Shift sur mon pc portable XD
- Il y a des touches qui sont inversées ou disparues comme ")"ou d'autre (je les ai pas toutes faites :s)

Ero Sakuga


--ayoub-- - posté le 15/05/2010 à 13:11:40 (96 messages postés)

❤ 0

C'est moi la meileur

ya pas une screen

78


Flopan - posté le 23/11/2010 à 16:29:22 (48 messages postés)

❤ 0

Quand j'arrive, votre sang devient de l'ancre.

On doit le mettre où le code ?............

[img]http://img232.imageshack.us/img232/4056/flopanguerriersignature.png[/img]


Tata Monos - posté le 23/11/2010 à 16:38:52 (28 messages postés)

❤ 0

Compte Non utilisé

Kilam !


kilam1110 - posté le 23/11/2010 à 19:38:20 (9159 messages postés)

❤ 0

:'(

New RPG Maker - Forum traitant du logiciel RPG Maker tout en français ! | SURVIVE V2.5 - Dégommez du zombie !


Flopan - posté le 24/11/2010 à 13:15:06 (48 messages postés)

❤ 0

Quand j'arrive, votre sang devient de l'ancre.

Flopan a dit:


On doit le mettre où le code ?............



[img]http://img232.imageshack.us/img232/4056/flopanguerriersignature.png[/img]


Vulcain83630 - posté le 27/11/2010 à 16:25:12 (1 messages postés)

❤ 0

Bonjour, ou doit-on mettre le code??
Merci de vos réponses:)


kilam1110 - posté le 27/11/2010 à 17:43:54 (9159 messages postés)

❤ 0

DTC !

New RPG Maker - Forum traitant du logiciel RPG Maker tout en français ! | SURVIVE V2.5 - Dégommez du zombie !


dovicmax - posté le 24/12/2010 à 18:02:15 (5 messages postés)

❤ 0

Super script!
merci beaucoup a tous!:D


deltaone - posté le 04/01/2012 à 20:56:00 (29 messages postés)

❤ 0

deutcher a dit:


J'ai un probleme line91 =
text = text.chr


Script '002' line 91: NoMethodError occured.
Undefined method (accentgrave)chr' for "":String



j'ai exactement le même problème ???? est ce du a un conflit avec un autre script ???


Aymeric Maurice - posté le 15/03/2013 à 14:50:03 (3 messages postés)

❤ 0

Il marche super mais les lettre s'affiche en plusieurs fois!:-/

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers