Bienvenue visiteur !
|
Statistiques
Liste des membres
Contact
Mentions légales
257 connectés actuellement
30743283 visiteurs depuis l'ouverture
3656 visiteurs aujourd'hui
Partenaires
Tous nos partenaires
Devenir partenaire
|
❤ 0 Note : Ce script ne couvre pas toutes les fonctions de RGSS2.
Installation
Ce script doit être situé au-dessus de tous vos scripts custom, soit juste en-dessous de tous les scripts de base.
Liste des fonctions inclues :
Spoiler (cliquez pour afficher) 1 - Fade Screen
2 - Change Character Graphic
2.1 - Get Graphics
3 - Teleport
3.1 - Get Position
4 - Learn Skill
5 - Actor Status
5.1 - Get Status
6 - Chage Party Members
7 - Message
8 - Control Switches
8.1 - Get Switch Value
9 - Control Variables
9.1 - Get Variable Value
10 - Timer
10.1 - Get Timer Value
11 - Self Switches
11.1 - Get Self Switches Value
12 - Money
13 - Items
14 - Common Events
15 - Change Equippment
15.1 - Get Equipment
16 - Change Actor Name or Class
16.1 - Get Actor Name or Class
17 - Create Sprite
18 - Show Animation
19 - Audio Control
20 - Scene Control
21 - Control Accesses
22 - Change System Audio
23 - Set Location (Vehicle or Event)
24 - Scroll Map
25 - Start Move Route (Set Move Route in events)
25.1 - Get Moves (it does nothing without the 25th function)
26 - Wait (from the events, it doesnt freeze the screen)
27 - Show Balloon Icon
28 - Screen Effects
29 - Set Weather
30 - Erase Event
31 - Recover All
Explications (en anglais) :
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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
| =begin
Easy Scripts
Made by Chicheater
version 3.0
-----------------------------------
So this is my new script, that can help lots of people
making their own scripts in RGSS2.
THIS SCRIPT DOESN'T HAVE ALL THE FUNCTIONS OF RGSS2
OK now i will show you how this script works
WARNING:
This script must be on top of all custom ,made with this script, scripts (above Main and below Materials)
*FUNCTIONS*:
Fade Screen:
Is the fade out/in screen effect, to use it write this:
$easy_scripts.fade_screen("op",t)
"op" = determinates if the fade is in or out write "out" or "in"
t = time, in frames, of the duration of the fade effect
--------------------------------------------------------------------------------
Change Character Graphic:
This function is used to chage the actors graphic, use it like this:
$easy_scripts.change_character_graphic(id, name, index, face, f_index)
id = The ID of the actor (e.g Ralph's ID = 1, Ylva's ID = 4)
name = The name of the graphic (must be in the "Graphics/Character/" folder)
index = The index of the image in the graphic* (e.g. Ralph's index = 0, Ylva's index = 5)
face = Same as name but for the face graphic
f_index = Same as index but for the face graphic
*index can only be from 0 to 7
TIP: How to get current graphics?
use this:
variable = $easy_scripts.get_graphics(act, graph)
act = Actor ID (line 30)
graph = Determinates whitch graphic you want to get
("name", "name index", "face" or "face index")
Exemple: if you want the current face of the actor 1, use this:
variable = $easy_scripts.get_graphics(1,"face")
--------------------------------------------------------------------------------
Teleport:
This makes the player teleport, use this:
$easy_scripts.teleport(map, x, y, d)
map = This is the new map that you want to teleport
x = This is the new x-coordinade
y = This is the new y-coordinate
d = This is the new direction of the player(2:Down|4:Left|6:Right|8:Up)
TIP: How to get current position(map, x, y, direction)?
use this:
variable = $easy_scripts.get_position(op)
op = Determinates what you want to get ("map", "x", "y" or "direction")
--------------------------------------------------------------------------------
Learn Skill:
This makes an actor learn/forget a skill
$easy_scripts.actor_learn_skill(act, "op", skill)
act = Actor ID (line 30)
op = determinates if the actor will learn or forget a skill, write "learn" or "forget"
skill = Skill ID (e.g. Heal's ID is 33)
--------------------------------------------------------------------------------
Actor Status:
This makes an actor increase or decrease a parameter, use this:
$easy_scripts.actor_status(act, op, status, value)
act = Actor ID (line 30)
op = Determinates if the actor will gain or lose a status, write "add" or "remove"
status = This is the stat that you want to add/remove from a actor*
value = Determinates how much the actor will gain/lose
*status codes*:
"level" = Level
"exp" = Experience
"maxhp" = Max HP
"maxmp" = Max MP
"hp" = Current HP
"mp" = Current MP
"atk" = Attack
"def" = Defense
"agi" = Agility
"spi" = Spirit
"state" = State ID (when using get_status this will appear in array)
TIP: How to get acurrent status?
use this:
variable = $easy_scripts.get_status(act, op)
op = Determinates what you want to get (same as *status codes*)
--------------------------------------------------------------------------------
Chage Party Members:
This one, the name says everithing, changes the party members, use this:
$easy_scripts.change_party_member(op, actor)
op = Determinates if the actor will join or leave the party, write "add" or "remove"
actor = Actor ID (line 30)
--------------------------------------------------------------------------------
Message:
This function writes a message in the message board, use this:
$easy_scripts.message(text, face, index, position, back)
text = Text that will display in the message board
face = Face graphic name(e.g. "Actor1")
index = Index of the face graphic (line 32)
position = Position of the window (0:Top|1:Midle|2:Bottom)
back = Background of the message board (0:Normal|1:Dim|2:Transparent)
TIP: if you want you can only modify a certain field like:
$easy_scripts.message(text)
Only will display a message in the default proprieties
of the message board
or liket this:
$easy_scripts.message(text, face, index)
It will only display the message with a face in it with the default
position and background.
hope you understand, else contact me (cantact is in the main script)
--------------------------------------------------------------------------------
Control Switches:
This function controls the switches to ON or OFF, use this:
$easy_scripts.control_switches(switch,value,batch,start,limit)
switch = Nº of the switch
value = Determinates if the switches are gonna get ON or OFF, write "ON" or "OFF"
batch = Determinates if the control is going to batch more than 1 switch
start = Determinates the start switch (Only needed if batch = true)
limit = Determinates the limit switch (Only needed if batch = true)
TIP: How to get a switch value?
use this:
$easy_sripts.get_switch_value(switch)
switch = Switch ID
--------------------------------------------------------------------------------
Control Variables:
This function controls the variables value, use this:
$easy_scripts.control_variables(variale, op, value,batch,start,limit)
variable = Nº of the variables
op = This is what you want to do with the value in the variable*
value = Determinates the value that the variables will operate
batch = Determinates if the control is going to batch more than 1 variable
start = Determinates the start variable (Only needed if batch = true)
limit = Determinates the limit variable (Only needed if batch = true)
*op codes*:
"set" = Sets a value (var = value)
"add" = Sum a value (var + value)
"sub" = Sub a value (var - value)
"mul" = Multiply a value (var * value)
"div" = Divide a value (var / value)
"mod" = Gives the rest of a division like 2/4 the rest is 0 (2/4 %= 0)
TIP: How to get a variable value?
use this:
$easy_sripts.get_variable_value(variable)
variable = variable ID
--------------------------------------------------------------------------------
Timer:
This one controls the timer, use this:
$easy_scripts.timer(min, sec, start)
min = minutes you wish the timer have
sec = second you wish the timer have
start = truth value if the timer starts counting or not (true/false)
if you want to the countdown start automaticly just use:
$easy_scripts.timer(min, sec)
TIP: How to get the current time?
use this:
$easy_sripts.get_timer_value(type)
type = Determinates what you want to get("all"*, "min" or "sec")
*all is the time in seconds but without the minutes
exemple if time is 1 minute and 20 seconds the all time is 80
--------------------------------------------------------------------------------
Self Switches:
This controls the self switches of the events, use this:
$easy_scripts.self_switches(map, event, switch, op)
map = Map ID
event = Event ID
switch = Switch Name ("A", "B", "C" or "D")
op = Truth value of the self switch ("ON" or "OFF")
TIP: How to get a Self Switch value?
use this:
$easy_sripts.get_variable_value(variable)
variable = variable ID
--------------------------------------------------------------------------------
Money:
This function operate the party's money, use this:
$easy_scripts.money(value, op)
op = This is what you want to do with the money*
value = Determinates the value that the variables will operate
*op codes*:
"set" = Sets a value (money = value)
"add" = Sum a value (money + value)
"sub" = Sub a value (money - value)
"mul" = Multiply a value (money * value)
--------------------------------------------------------------------------------
Items:
Make the party gain/lose an item, use this:
$easy_scripts.items(item, id, value, op)
item = The type of item ("item", "weapon" or "armor")
id = The ID of the item (e.g. Potion's ID = 1)
value = Determinates the value that will add/remove of the item
op = Determinates if the party will gain or lose the item, write "add" or "remove"
TIP: if you just want to add a item, only use this:
$easy_scripts.items(item, id, value) <= no need the op ^^
--------------------------------------------------------------------------------
Common Events:
This function calls a common event, use this:
$easy_scripts.call_common_event(id)
id = Common Event ID
--------------------------------------------------------------------------------
Change Equipment:
This one changes the equipment of an character, use this:
$easy_scripts.change_equipment(act, weapon, shield, helmet, body_armor, accessory)
act = Actor ID (line 30)
weapon = Weapon ID
shield -------\
helmet --------\
= Armor ID (Armor ID is the same for all kinds of armor)
body_armor ----/
accessory ----/
TIP: How to get current equipment?
use this:
variable = $easy_scripts.get_equipment(act, equip)
act = Actor ID (line 30)
equip = Determinates whitch equip you want to get
("shield", "helmet", "body armor" or "accessory")
Exemple: if you want the current body armor on the actor 4, use this:
variable = $easy_scripts.get_equipment(4,"body armor")
--------------------------------------------------------------------------------
Change Actor Name or Class:
With this you can change the actors name and class, use this
$easy_scripts.change_actor_name(act, op, value)
act = Actor ID (line 30)
op = Determinates what the function will change ("name" or "class")
value = Determinates the value that will change (for "name" write the name in "", for the class put the Class ID)
TIP: How to get current name or class?
use this:
variable = $easy_scripts.get_name_class(act, op)
act = Actor ID (line 30)
op = Determinates what you want to get ("class" or "name")
--------------------------------------------------------------------------------
Create Sprite:
This makes a sprite (insert a picture), use this:
$easy_scripts.create_sprite(var, pic, x, y, z, zoom_x, zoom_y, opac, blend)
var = variabe that will handle the sprite (i advice to use a @ before the variable like this: @sprite)
pic = name of the picture that you want to insert (it have to be in the Graphics/Picture/ folder)
x = x-coordinate of the pic in the screen
y = y-coordinate of the pic in the screen
zoom_x = Zoom in x-coordinate of the pic in the screen (in %, default = 100% (don't put the % sysmbol))
zoom_y = Zoom in y-coordinate of the pic in the screen (in %, default = 100% (don't put the % sysmbol))
opac = Opacity of the sprite
blend = Blend type of the pic (0:Normal|1:Add|2:Sub)
TIP: If you want to change the x & y only, use this
$easy_scripts.create_sprite(var, pic, x, y)
Exemple: $easy_scripts.create_sprite(@sprite1, "myimage", 50, 100)
--------------------------------------------------------------------------------
Show Animation:
This one call a animation to show in the map, use this:
$easy_scripts.call_animation(anim_id, op, event)
anim_id = Animation ID
op = Determinate where the animation will show ("player" or "event")
event = Event ID in the map (only use this when op = "event")
TIP: When the op = "player", use this:
$easy_scripts.call_animation(anim_id, "player")
--------------------------------------------------------------------------------
Audio Control:
Whith this you can play/stop audio, use this:
$easy_scripts.audio_control(type, op, name, volume, pitch)
type = Audio type ("bgm", "bgs", "me" or "se")
op = Operation ("play" or "stop")
volume = Is the percentage of the volume (in %, default = 100% (don't put the % sysmbol))
pitch = Is the percentage of the pitch (in %, default = 100% (don't put the % sysmbol))
--------------------------------------------------------------------------------
Scene Control:
This makes you call a scene, use this:
$easy_scripts.scene_control(scene, can_lose, can_escape, troop)
scene = Here you choose wich screen you want to call
can_lose = Truth value if the party can continue after loses a battle (only use when scene = "battle")
can_escape = Truth value if the party can escape in a battle (only use when scene = "battle")
troop = Troop ID (if you want it to be random dont write nothing)
*scene*:
"menu" = Is the main menu Scene
"battle" = Is the Battle Scene (the toops are in the map encounters or use the troop)
"shop" = Is the Shop Scene
"name" = Is the Name Scene
"save" = Is the Save Menu Scene
"debug" = Is the Debug Menu Scene
"game over" = Is the Game Over Scene
"title" = Is the Title Menu Scene
--------------------------------------------------------------------------------
Control Accesses:
This one changes the access of the menu/save menu/encounters, use this:
$easy_scripts.control_accesses(op, value)
op = Determinates wich command will enable/disable ("menu" ,"save" or "encounter")
value = Determinates if the command will enable or disable("enable" or "disable")
--------------------------------------------------------------------------------
Change System Audio:
This makes you modify the Battle BGM or the ME of the end of the battle, use this:
$easy_scripts.change_system_audio(op, value)
op = Determinates wich audio you want to change("battle bgm" or "end battle me")
value = Name of the music/sound (must be in in "Audio/ BGM or ME/" folder)
--------------------------------------------------------------------------------
Set Location: (Vehicles or Events)
With this one you can set a Vehicle or an Event location, use this:
$easy_scripts.set_location(what,type,x,y,map_id,direction,event_id)
what = Determinates what you want to set the location ("event" or "vehicle")
type = Only use this when what is "vehicle" else put it nil
x = Determinates where the event or vehicle will be transfered to (x-coordinate)
y = Determinates where the event or vehicle will be transfered to (y-coordinate)
direction* = Detrminates the direction that the event will be (this wont work with vehicles)
event_id = Is the id of the event in the map
*what to put in direction? ("retain","up","down","right" or "left")
TIP: If you want to set a location to a vehicle just use this
$easy_scripts.set_location(what,type,x,y,map_id)
--------------------------------------------------------------------------------
Scroll Map:
This makes the screen to move by itself, use this:
$easy_scripts.scroll_map(direction, distance, speed)
direction = The direction of the map to scroll("up" "down" "left" or "right")
distance = Is the nº of tiles you want it to scroll
speed = Speed of the scroll (1 to 6)
--------------------------------------------------------------------------------
Start Move Route: (only to be used with Get Move function)
This forces the player/event to move or do an action, like jump, use this:
moves = []
moves << $easy_scripts.get_move(move,parameters)
$easy_scripts.start_move_route(who,moves)
move = Move that you want to add for the actions array
parameters = Some actions need parameters to work(dont write nothing it its not needed)
who = Who will do the action (use 0(player) or the id of the event)
moves = This is the array tht have the actions that the player/event will do
Example:
es = $easy_scripts
moves = []
moves << es.get_move("move up") makes the Move Up action
moves << es.get_move("move down") makes the Move Down action
moves << es.get_move("move left") makes the Move Left action
moves << es.get_move("jump",[1,2]) makes the Jump action with x = 1 and y = 2
moves << es.get_move("wait",[60]) makes the Wait action with 60 frames
es.start_move_route(0,moves) makes the player do the actions above
*MOVE CODES*
CODE -------------------- PARAMETERS
"nothing"
"move down"
"move left"
"move right"
"move up"
"move lower left"
"move lower right"
"move upper left"
"move upper right"
"move at random"
"move toward player"
"move away from player"
"1 step forward"
"1 step backwards"
"jump" ------------------------------ [x,y]
"wait" ------------------------------ [frames]
"turn down"
"turn left"
"turn right"
"turn up"
"turn 90° right"
"turn 90° left"
"turn 180°"
"turn 90° right or left"
"turn at random"
"turn toward player"
"turn away from player"
"switch on" -------------------------- [switch_ID]
"switch off" -------------------------- [switch_ID]
"change speed" ------------------------ [new_speed]
"change frequency" -------------------- [new_frequency]
"walking animation on"
"walking animation off"
"stepping animation on"
"stepping animation off"
"direction fix on"
"direction fix off"
"through on"
"through off"
"transparent on"
"transparent off"
"change graphic" -------------------- [graphic_name,graphic_index] (index = 0~7)
"change opacity" -------------------- [new_opacity]
"change blending" -------------------- [new_blending]
"play se" -------------------- [SE_name]
hope you understand, else contact me
--------------------------------------------------------------------------------
Wait:
This one makes the player wait a set number of frames/seconds, use this:
$easy_scripts.wait(what,n)
what = Determinates if the function will wait for seconds or frames(use "seconds" or "frames")
n = Number of frames/seconds to wait
--------------------------------------------------------------------------------
Show Balloon Icon:
This shows a ballon over the head of the player/event, use this:
$easy_scripts.show_balloon_icon(who,balloon_id)
who = Who will be the target of the balloon (player(0) or a event id)
balloon_id = ID of the balloon that you want to show
--------------------------------------------------------------------------------
Screen Effects:
This function processes the screen effects, use this:
$easy_scripts.screen_effects(effect,params,frames)
effect = Type of effect you want to do ("tint", "flash" or "shake")
params = Parameter that are needed for the effects
frames = nº of frames that the effect takes to complete itself
TIP: How to use the params thing
$easy_scripts.screen_effects("tint",[100,150,200,250],120)
$easy_scripts.screen_effects("flash",[0,200,100,255],60)
$easy_scripts.screen_effects("shake",[2,5],200)
--------------------------------------------------------------------------------
Set Weather:
This one changes the weather, use this:
$easy_scripts.set_weather(type,power,frames)
type = Type of the weather (0:None|1:Rain|2:Storm|3:Snow)
power = The power of the weather (0~9)
frames = nº of frames that the effect takes to complete itself
--------------------------------------------------------------------------------
Erase Event:
This erases an event in the current map, use this:
$easy_scripts.erase_event(id)
id = ID of the event to erase
--------------------------------------------------------------------------------
Recover All:
This function makes the Recover All command to the party/actor, use this:
$easy_scripts.recover_all(act)
act = ID of the actor to recover (0 to recover the entire party)
--------------------------------------------------------------------------------
=end |
Script :
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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
| =begin
Easy Scripts
Made by Chicheater
version 3.0
-----------------------------------
So this is my new script, that it can help lots of people
making their own scripts in RGSS2.
This script only have 41 functions yet
THIS SCRIPT DOESN'T HAVE ALL THE FUNCTIONS OF RGSS2
if you have any questions, contact me:
mail/msn: paulinho_chicha@hotmail.com
skype: chicheater
List of the functions: (see the instructions to know more about these functions)
1 - Fade Screen
2 - Change Character Graphic
2.1 - Get Graphics
3 - Teleport
3.1 - Get Position
4 - Learn Skill
5 - Actor Status
5.1 - Get Status
6 - Chage Party Members
7 - Message
8 - Control Switches
8.1 - Get Switch Value
9 - Control Variables
9.1 - Get Variable Value
10 - Timer
10.1 - Get Timer Value
11 - Self Switches
11.1 - Get Self Switches Value
12 - Money
13 - Items
14 - Common Events
15 - Change Equippment
15.1 - Get Equipment
16 - Change Actor Name or Class
16.1 - Get Actor Name or Class
17 - Create Sprite
18 - Show Animation
19 - Audio Control
20 - Scene Control
21 - Control Accesses
22 - Change System Audio
23 - Set Location (Vehicle or Event)
24 - Scroll Map
25 - Start Move Route (Set Move Route in events)
25.1 - Get Moves (it does nothing without the 25th function)
26 - Wait (from the events, it doesnt freeze the screen)
27 - Show Balloon Icon
28 - Screen Effects
29 - Set Weather
30 - Erase Event
31 - Recover All
=end
class Easy_Scripts
def fade_screen(op,t)
if op == "out"
Graphics.fadeout(t)
elsif op == "in"
Graphics.fadein(t)
end
end
def change_character_graphic(id, name, index, face, f_index)
$game_actors[id].character_name = name
$game_actors[id].character_index = index
$game_actors[id].face_name = face
$game_actors[id].face_index = f_index
m = $game_map.map_id
x = $game_player.x
y = $game_player.y
d = $game_player.direction
$easy_scripts.teleport(m,x,y,d)
end
def get_graphics(act, graph)
actor = $game_actors[act]
if graph == "name"
return actor.character_name
elsif graph == "name index"
return actor.character_index
elsif graph == "face"
return actor.face_name
elsif graph == "face index"
return actor.face_index
end
end
def teleport(map, x, y, d)
$game_map.setup(map)
$game_player.moveto(x, y)
$game_player.direction = d
$game_player.refresh
end
def get_position(op)
player = $game_player
if op == "map"
return $game_map.map_id
elsif op == "x"
return player.x
elsif op == "y"
return player.y
elsif op == "direction"
return player.direction
end
end
def actor_learn_skill(act, op, skll)
actor = $game_actors[act]
if op == "learn"
actor.learn_skill(skll)
elsif op == "forget"
actor.forget_skill(skll)
end
end
def actor_status(act,op,status,value)
actor = $game_actors[act]
if op == "add"
if status == "level"
actor.level += value
end
if status == "exp"
actor.exp += value
end
if status == "maxhp"
actor.maxhp += value
end
if status == "maxmp"
actor.maxmp += value
end
if status == "hp"
actor.hp += value
end
if status == "mp"
actor.mp += value
end
if status == "atk"
actor.atk += value
end
if status == "def"
actor.def += value
end
if status == "agi"
actor.agi += value
end
if status == "spi"
actor.spi += value
end
if status == "state"
actor.add_state(value)
end
elsif op == "remove"
if status == "level"
actor.level -= value
end
if status == "exp"
actor.exp -= value
end
if status == "maxhp"
actor.maxhp -= value
end
if status == "maxmp"
actor.maxmp -= value
end
if status == "atk"
actor.atk -= value
end
if status == "def"
actor.def -= value
end
if status == "agi"
actor.agi -= value
end
if status == "spi"
actor.spi -= value
end
if status == "state"
actor.remove_state(value)
end
end
end
def get_status(act, op)
actor = $game_actors[act]
if op == "level"
return actor.level
elsif op == "exp"
return actor.exp
elsif op == "maxhp"
return actor.maxhp
elsif op == "maxmp"
return actor.maxmp
elsif op == "atk"
return actor.atk
elsif op == "def"
return actor.def
elsif op == "agi"
return actor.agi
elsif op == "spi"
return actor.spi
elsif op == "state"
stat = []
for i in 0 ... actor.states.size
stat[i] = actor.states[i].id
end
return stat
end
end
def change_party_member(op, actor)
if actor != nil and actor != 0
prty = $game_party
if op == "add"
prty.add_actor(actor)
end
if op == "remove"
prty.remove_actor(actor)
end
end
end
def message(text, face = "", index = 0, position = 2, back = 0)
w = $game_message
w.face_name = face
w.face_index = index
w.position = position
w.background = back
w.texts.push(text)
end
def control_switches(switch, value, batch = false, start = 1 ,limit = 1)
if batch == false
if value == "ON"
$game_switches[switch] = true
elsif value == "OFF"
$game_switches[switch] = false
end
elsif batch == true
for i in start ... limit
if value == "ON"
$game_switches[i] = true
elsif value == "OFF"
$game_switches[i] = false
end
end
end
end
def get_switch_value(switch)
return $game_switches[switch]
end
def control_variables(variable, op ,value, batch = false, start = 1 ,limit = 1)
if batch == false
if op == "set"
$game_variables[variable] = value
elsif value == "add"
$game_variables[variable] += value
elsif value == "sub"
$game_variables[variable] -= value
elsif value == "mul"
$game_variables[variable] *= value
elsif value == "div"
$game_variables[variable] /= value
elsif value == "mod"
$game_variables[variable] %= value
end
elsif batch == true
for i in start ... limit
if op == "set"
$game_variables[variable] = value
elsif value == "add"
$game_variables[variable] += value
elsif value == "sub"
$game_variables[variable] -= value
elsif value == "mul"
$game_variables[variable] *= value
elsif value == "div"
$game_variables[variable] /= value
elsif value == "mod"
$game_variables[variable] %= value
end
end
end
end
def get_variable_value(variable)
return $game_variables_value[variable]
end
def timer(min, sec, start = true)
time = (min * 60) + sec
$game_system.timer = time * Graphics.frame_rate
if start == true
$game_system.timer_working = true
end
end
def get_timer_value(type)
tm = $game_system.timer
t = tm / Graphics.frame_rate
min = t / 60
if type == "all"
return t
elsif type == "min"
return min
elsif type == "sec"
return t - min
end
end
def self_switches(map, event, switch, op)
id = [map, event, switch]
if op == "ON"
$game_self_switches[id] = true
elsif op == "OFF"
$game_self_switches[id] = false
end
end
def get_self_switch_value(map,event,letter)
evnt = [map, event, letter]
return $game_self_switches[evnt]
end
def money(value, op)
if op == "set"
$game_party.gold = value
elsif op == "add"
$game_party.gold += value
elsif op == "sub"
$game_party.gold -= value
elsif op == "mul"
$game_party.gold *= value
end
end
def items(item, id, value, op = "add")
if item == "item"
data = $data_items[id]
elsif item == "weapon"
data = $data_weapons[id]
elsif item == "armor"
data = $data_armors[id]
end
if op == "add"
$game_party.gain_item(data, value)
elsif op == "remove"
$game_party.lose_item(data, value)
end
end
def call_common_event(id)
$game_temp.common_event_id = id
end
def change_equipment(act, weapon = $game_actors[act].weapon_id, shield = $game_actors[act].armor1_id, helmet = $game_actors[act].armor2_id, body_armor = $game_actors[act].armor3_id, accessory = $game_actors[act].armor4_id)
actor = $game_actors[act]
actor.weapon_id = weapon
actor.armor1_id = shield
actor.armor2_id = helmet
actor.armor3_id = body_armor
actor.armor4_id = accessory
end
def get_equipment(act, equip)
actor = $game_actors[act]
if equip == "weapon"
return actor.weapon_id
elsif equip == "shield"
return actor.armor1_id
elsif equip == "helmet"
return actor.armor2_id
elsif equip == "body armor"
return actor.armor3_id
elsif equip == "accessory"
return actor.armor4_id
end
end
def change_actor_name(act, op, value)
actor = $game_actors[act]
if op == "name"
actor.name = value
elsif op == "class"
actor.class_id = value
end
end
def get_name_class(act, op)
actor = $game_actors[act]
if op == "name"
return actor.name
elsif op == "class"
return actor.class_id
end
end
def create_sprite(var, pic, x = 0, y = 0, z = 0, zoom_x = 100, zoom_y = 100, opac = 255, blend = 0)
var = Sprite.new
var.bitmap = Cache.picture(pic)
var.x = x
var.y = y
var.z = z
var.zoom_x = zoom_x / 100
var.zoom_y = zoom_y / 100
var.opacity = opac
var.blend_type = blend
end
def call_animation(anim_id, op, event = 1)
if op == "player"
$game_player.animation_id = anim_id
elsif op == "event"
$game_map.events[event].animation_id = anim_id
end
end
def audio_control(type, op, name, volume = 100, pitch = 100)
if op == "play"
if type == "bgm"
Audio.bgm_play("Audio/BGM/" + name, volume, pitch)
elsif type == "bgs"
Audio.bgs_play("Audio/BGS/" + name, volume, pitch)
elsif type == "me"
Audio.me_play("Audio/ME/" + name, volume, pitch)
elsif type == "se"
Audio.se_play("Audio/SE/" + name, volume, pitch)
end
elsif op == "stop"
if type == "bgm"
Audio.bgm_stop("Audio/BGM/" + name, volume, pitch)
elsif type == "bgs"
Audio.bgs_stop("Audio/BGS/" + name, volume, pitch)
elsif type == "me"
Audio.me_stop("Audio/ME/" + name, volume, pitch)
elsif type == "se"
Audio.se_stop("Audio/SE/" + name, volume, pitch)
end
end
end
def scene_control(scene, can_lose = false, can_escape = true, troop = 0)
if scene == "menu"
Sound.play_decision
$scene = Scene_Menu.new
elsif scene == "battle"
$game_player.make_encounter_troop_id
troop_id = $game_player.make_encounter_troop_id # Determine troop
if troop_id != nil
if troop != 0
$game_troop.setup(troop)
else
$game_troop.setup(troop_id)
end
$game_troop.can_escape = true
$game_temp.battle_proc = nil
Graphics.update
$game_player.make_encounter_count
$game_player.straighten
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
RPG::BGM.stop
RPG::BGS.stop
Sound.play_battle_start
$game_system.battle_bgm.play
$game_troop.can_lose = can_lose
$game_troop.can_escape = can_escape
$scene = Scene_Battle.new
end
elsif scene == "shop"
$scene = Scene_Shop.new
elsif scene == "name"
$scene = Scene_Name.new
elsif scene == "save"
$scene = Scene_File.new(true, false, true)
elsif scene == "debug"
Sound.play_decision
$scene = Scene_Debug.new
elsif scene == "game over"
$scene = Scene_Gameover.new
elsif scene == "title"
$scene = Scene_Title.new
fadeout(60)
end
end
def control_accesses(op, value)
if op == "encounter"
if value == "enable"
$game_system.encounter_disabled = false
elsif value == "disable"
$game_system.encounter_disabled = true
end
end
if op == "menu"
if value == "enable"
$game_system.menu_disabled = false
elsif value == "disable"
$game_system.menu_disabled = true
end
end
if op == "save"
if value == "enable"
$game_system.save_disabled = false
elsif value == "disable"
$game_system.save_disabled = true
end
end
end
def change_system_audio(op, value)
if op == "battle bgm"
$game_system.battle_bgm=(value)
elsif op == "end battle me"
$game_system.battle_end_me=(value)
end
end
def set_location(what,type,x = 0,y = 0,map_id = 1,direction = "retain",event_id = 1)
if what == "vehicle"
if type == "boat" # Boat
$game_map.boat.set_location(map_id, x, y)
elsif type == "ship" # Ship
$game_map.ship.set_location(map_id, x, y)
elsif type == "Airship" # Airship
$game_map.airship.set_location(map_id, x, y)
end
elsif what == "event"
$game_map.events[event_id].moveto(x,y)
if direction == "retain"
elsif direction == "up"
$game_map.events[event_id].turn_up
elsif direction == "down"
$game_map.events[event_id].turn_down
elsif direction == "right"
$game_map.events[event_id].turn_right
elsif direction == "left"
$game_map.events[event_id].turn_left
end
end
end
def scroll_map(direction, distance, speed)
if direction == "down"
direction = 2
elsif direction == "left"
direction = 4
elsif direction == "right"
direction = 6
elsif direction == "up"
direction = 8
end
$game_map.start_scroll(direction, distance, speed)
end
def start_move_route(who,move)
array = []
if $game_map.need_refresh
$game_map.refresh
end
array[0] = who
if array[0] == 0
character = $game_player
else
character = $game_map.events[who]
end
array[1] = RPG::MoveRoute.new
array[1].wait = false
array[1].repeat = false
array[1].skippable = false
move[move.size] = RPG::MoveCommand.new(0)
array[1].list = move
character.force_move_route(array[1])
end
def get_move(move,parameters = [])
case move
when "nothing"
move = 0
when "move down"
move = 1
when "move left"
move = 2
when "move right"
move = 3
when "move up"
move = 4
when "move lower left"
move = 5
when "move lower right"
move = 6
when "move upper left"
move = 7
when "move upper right"
move = 8
when "move at random"
move = 9
when "move toward player"
move = 10
when "move away from player"
move = 11
when "1 step forward"
move = 12
when "1 step backwards"
move = 13
when "jump"
move = 14
when "wait"
move = 15
when "turn down"
move = 16
when "turn left"
move = 17
when "turn right"
move = 18
when "turn up"
move = 19
when "turn 90° right"
move = 20
when "turn 90° left"
move = 21
when "turn 180°"
move = 22
when "turn 90° right or left"
move = 23
when "turn at random"
move = 24
when "turn toward player"
move = 25
when "turn away from player"
move = 26
when "switch on"
move = 27
when "switch off"
move = 28
when "change speed"
move = 29
when "change frequency"
move = 30
when "walking animation on"
move = 31
when "walking animation off"
move = 32
when "stepping animation on"
move = 33
when "stepping animation off"
move = 34
when "direction fix on"
move = 35
when "direction fix off"
move = 36
when "through on"
move = 37
when "through off"
move = 38
when "transparent on"
move = 39
when "transparent off"
move = 40
when "change graphic"
move = 41
when "change opacity"
move = 42
when "change blending"
move = 43
when "play se"
move = 44
else
p "Error In the Move Choice"
p "Try use a correct move"
end
return RPG::MoveCommand.new(move,parameters)
end
def wait(what,n)
if what == "seconds"
frames = 60 * n
else
frames = n
end
moves = []
moves << get_move("wait",[frames])
start_move_route(0,moves)
end
def show_balloon_icon(who,balloon_id)
if who == 0
character = $game_player
else
character = $game_map.events[who]
end
character.balloon_id = balloon_id
end
def screen_effects(effect,params,frames)
screen = $game_map.screen
if effect == "tint"
tone = Tone.new(params[0],params[1],params[2],params[3])
screen.start_tone_change(tone, frames)
elsif effect == "flash"
tone = Color.new(params[0],params[1],params[2],params[3])
screen.start_flash(tone, frames)
elsif effect == "shake"
screen.start_shake(params[0], params[1], frames)
end
end
def set_weather(type,power,frames)
screen = $game_map.screen
screen.weather(type, power, frames)
end
def erase_event(id)
$game_map.events[id].erase
end
def recover_all(act)
if act == 0
for i in 0 ... $game_party.members.size - 1
$game_party.members[i].recover_all
end
else
$game_actors[act].recover_all
end
end
end
$easy_scripts = Easy_Scripts.new
#---------------This doesn't affect the classes--------------------------------#
class Game_Actor < Game_Battler
attr_accessor :name # name
attr_accessor :character_name # character graphic filename
attr_accessor :character_index # character graphic index
attr_accessor :face_name # face graphic filename
attr_accessor :face_index # face graphic index
attr_accessor :weapon_id # weapon ID
attr_accessor :armor1_id # shield ID
attr_accessor :armor2_id # helmet ID
attr_accessor :armor3_id # body armor ID
attr_accessor :armor4_id # accessory ID
attr_accessor :class_id # class ID
attr_accessor :level # level
attr_accessor :exp # experience
end
class Game_Player < Game_Character
attr_accessor :direction
end
class Game_Party < Game_Unit
attr_accessor :gold
end |
|
Aucun commentaire n'a été posté pour le moment. |
|
|