Kann das zweiten Truhenscript nicht finden
Hallo,
ich glaube, dass ich irgendwann ein Foreneintrag gelesen hatte der davon handelt das jemand zu diesem Script ein zweites geschrieben hat, welches ermöglicht eine zweite Truhe zu benutzen, aber ich bin gerade nicht in der Lage das ding zu finden, ich hoffe mir kann jemand helfen!
Ich bin dankbar für jede Antwort!
Gits
Ps. Ich meine nicht das Script von Gamer Guy!
ich glaube, dass ich irgendwann ein Foreneintrag gelesen hatte der davon handelt das jemand zu diesem Script ein zweites geschrieben hat, welches ermöglicht eine zweite Truhe zu benutzen, aber ich bin gerade nicht in der Lage das ding zu finden, ich hoffe mir kann jemand helfen!
Ich bin dankbar für jede Antwort!
Gits
Ps. Ich meine nicht das Script von Gamer Guy!
...und so
Mir fällt da noch das Itemkiste Script von thunderbolt256 ein.
Script:
Aufrufen kannst du das Script mit :
$scene = Scene_Box.new
MFG
Script:
|
|
Ruby Quellcode |
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 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
#============================================================================== # # Itemkiste # #============================================================================== # scripted by thunderbolt256 #------------------------------------------------------------------------------ # class Scene_Box #-------------------------------------------------------------------------- def main @info_window = Window_Help.new @help_window = Window_Help.new @help_window.y = @info_window.height @item_window = Window_Box.new(0) @item_window.active = false @item_window.y = @help_window.y + @help_window.height @item_window.height = 480 - @item_window.y - @help_window.height @box_window = Window_Box.new(1) @box_window.active = false @box_window.visible = false @box_window.y = @item_window.y @box_window.height = @item_window.height @item_window.refresh @box_window.refresh @ort_window = Window_Help.new @ort_window.x = @item_window.x @ort_window.y = @item_window.y + @item_window.height @ort_window.width = @item_window.width @ort_window.height = 480 - @ort_window.y @ort_window.bitmap_adapt s1 = "Ablegen" s2 = "Aufnehmen" s3 = "Wegwerfen (Tasche)" s4 = "Wegwerfen (Box)" s5 = "Gehen" @command_window = Window_Command.new(320, [s1, s2, s3, s4, s5]) @command_window.x = 0 @command_window.y = @help_window.y + @help_window.height @command_window.set_align(1) @command_window.refresh @command_window.index = 0 @command_window.active = true @layout_window = Window_Help.new @layout_window.y = @command_window.y + @command_window.height @layout_window.width = 640 - @item_window.x @layout_window.height = 480 - @layout_window.y @layout_window.bitmap_adapt s1 = "Ja" s2 = "Nein" s3 = "Abbruch" @command2_window = Window_Command.new(@layout_window.width, [s1, s2, s3]) @command2_window.y = @layout_window.y @command2_window.height = @layout_window.height @command2_window.width = @layout_window.width @command2_window.set_align(1) @command2_window.refresh @command2_window.visible = false @command2_window.active = false @number_input = Window_InputNumber.new(1) @number_input.active = false @number_input.visible = false @number_input.x = 160 @number_input.y = @layout_window.y + 48 @item_window.ort_window = @ort_window @box_window.ort_window = @ort_window @item_window.help_window = @help_window @box_window.help_window = @help_window @item_window.update_help @anzahl = 1 Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @help_window.dispose @ort_window.dispose @info_window.dispose @item_window.dispose @box_window.dispose @command_window.dispose @layout_window.dispose @number_input.dispose @command2_window.dispose end #-------------------------------------------------------------------------- def update @help_window.update @ort_window.update @info_window.update @item_window.update @box_window.update if !@item_window.eof @command_window.disable_item(0) @command_window.disable_item(2) else @command_window.enable_item(0) @command_window.enable_item(2) end if !@box_window.eof @command_window.disable_item(1) @command_window.disable_item(3) else @command_window.enable_item(1) @command_window.enable_item(3) end @command_window.update if @command_window.active case @command_window.index when 0 @item_window.visible = true @box_window.visible = false @item_window.update_help @info_window.set_text("Willst etwas aus der Tasche in die Box tun?") when 1 @item_window.visible = false @box_window.visible = true @box_window.update_help @info_window.set_text("Willst du etwas aus der Box in die Tasche tun?") when 2 @item_window.visible = true @box_window.visible = false @item_window.update_help @info_window.set_text("Willst du etwas aus der Tasche wegwerfen?") when 3 @item_window.visible = false @box_window.visible = true @box_window.update_help @info_window.set_text("Willst du etwas aus der Box wegwerfen?") when 4 @item_window.visible = true @box_window.visible = false @item_window.update_help @info_window.set_text("Willst du gehen?") end update_command return end @layout_window.update @number_input.update @command2_window.update if @item_window.active update_item return end if @box_window.active update_box return end if @number_input.active update_input return end if @command2_window.active update_c2 return end end #-------------------------------------------------------------------------- def zehn(hoch) if hoch == 0 return 0 # nur speziell hierfür. Normal return 1 end temp=1 for i in 1..hoch temp = temp*10 end return temp end #-------------------------------------------------------------------------- def digits_number(n) n=n.abs for i in 0..5 if n>= zehn(i) and n<zehn(i+1) return i+1 end end end #-------------------------------------------------------------------------- def update_item if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @item_window.index = 0 @item_window.update_help @item_window.active = false @command_window.active = true return end if Input.trigger?(Input::C) @item = @item_window.item case @item when RPG::Item @number = $game_party.item_number(@item.id) @cnumber = $game_party.item_box_number(@item.id) @maxnumber = $game_party.maxitemb when RPG::Weapon @number = $game_party.weapon_number(@item.id) @cnumber = $game_party.weapon_box_number(@item.id) @maxnumber = $game_party.maxweaponb when RPG::Armor @number = $game_party.armor_number(@item.id) @cnumber = $game_party.armor_box_number(@item.id) @maxnumber = $game_party.maxarmorb end if @number == 1 case @command_window.index when 0 @info_window.set_text("Willst du "+@item.name+" ablegen?") when 2 @info_window.set_text("Willst du "+@item.name+" wegwerfen?") end @anzahl = 1 @command2_window.visible = true @command2_window.active = true @item_window.active = false return elsif @number > 1 @number_input = Window_InputNumber.new(digits_number(@number)) @number_input.x = 160 - @number_input.width @number_input.y = @layout_window.y + 48 @item_window.active = false case @command_window.index when 0 @info_window.set_text("Wie viel von "+@item.name+" willst du aus der Tasche ablegen?") @layout_window.set_text("Wie viele ablegen?") when 2 @info_window.set_text("Viel von "+@item.name+" willst du aus der Tasche wegwerfen?") @layout_window.set_text("Wie viele wegwerfen?") end else $game_system.se_play($data_system.buzzer_se) end end end #-------------------------------------------------------------------------- def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) case @command_window.index when 0 if @item_window.eof $game_system.se_play($data_system.decision_se) @item_window.active = true @command_window.active = false @info_window.set_text("Was möchtest du ablegen?") else $game_system.se_play($data_system.buzzer_se) end when 1 if @box_window.eof $game_system.se_play($data_system.decision_se) @item_window.visible = false @box_window.visible = true @box_window.active = true @command_window.active = false @info_window.set_text("Was möchtest du auflegen?") else $game_system.se_play($data_system.buzzer_se) end when 2 if @item_window.eof $game_system.se_play($data_system.decision_se) @item_window.active = true @command_window.active = false @info_window.set_text("Was möchtest du aus der Tasche wegwerfen?") else $game_system.se_play($data_system.buzzer_se) end when 3 if @box_window.eof $game_system.se_play($data_system.decision_se) @item_window.visible = false @box_window.visible = true @box_window.active = true @command_window.active = false @info_window.set_text("Was möchtest du aus der Box wegwerfen?") else $game_system.se_play($data_system.buzzer_se) end when 4 $scene = Scene_Map.new end end end #-------------------------------------------------------------------------- def update_c2 if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) case @command_window.index when 0 @item_window.active = true @info_window.set_text("Was willst du ablegen?") when 1 @box_window.active = true @info_window.set_text("Was willst du aufnehmen?") when 2 @item_window.active = true @info_window.set_text("Was willst du aus der Tasche wegwerfen?") when 3 @box_window.active = true @info_window.set_text("Was willst du aus der Box wegwerfen?") end @command2_window.active = false @command2_window.visible = false @command2_window.index = 0 return end if Input.trigger?(Input::C) $game_system.se_play($data_system.decision_se) case @command2_window.index when 0 case @command_window.index when 0 case @item when RPG::Item $game_party.lose_item(@item.id, (@anzahl>=@number) ? @number : @anzahl) $game_party.gain_item_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Weapon $game_party.lose_weapon(@item.id, (@anzahl>=@number) ? @number : @anzahl) $game_party.gain_weapon_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Armor $game_party.lose_armor(@item.id, (@anzahl>=@number) ? @number : @anzahl) $game_party.gain_armor_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) end @item_window.index = 0 @item_window.refresh if @item_window.eof @info_window.set_text("Was willst du ablegen?") @item_window.active = true else @command_window.index = 0 @command_window.active = true end when 1 case @item when RPG::Item $game_party.lose_item_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) $game_party.gain_item(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Weapon $game_party.lose_weapon_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) $game_party.gain_weapon(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Armor $game_party.lose_armor_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) $game_party.gain_armor(@item.id, (@anzahl>=@number) ? @number : @anzahl) end @box_window.index = 0 @box_window.refresh if @box_window.eof @info_window.set_text("Was willst du aufnehmen?") @box_window.active = true else @command_window.index = 0 @command_window.active = true end when 2 case @item when RPG::Item $game_party.lose_item(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Weapon $game_party.lose_weapon(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Armor $game_party.lose_armor(@item.id, (@anzahl>=@number) ? @number : @anzahl) end @item_window.index = 0 @item_window.refresh if @item_window.eof @info_window.set_text("Was willst du aus der Tasche wegwerfen?") @item_window.active = true else @command_window.index = 0 @command_window.active = true end when 3 case @item when RPG::Item $game_party.lose_item_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Weapon $game_party.lose_weapon_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) when RPG::Armor $game_party.lose_armor_box(@item.id, (@anzahl>=@number) ? @number : @anzahl) end @box_window.index = 0 @box_window.refresh if @box_window.eof @info_window.set_text("Was willst du aus der Box wegwerfen?") @box_window.active = true else @command_window.index = 0 @command_window.active = true end end @command2_window.active = false @command2_window.visible = false @command2_window.index = 0 @item_window.refresh @box_window.refresh when 1 case @command_window.index when 0 @item_window.active = true @info_window.set_text("Was willst du ablegen?") when 1 @box_window.active = true @info_window.set_text("Was willst du aufnehmen?") when 2 @item_window.active = true @info_window.set_text("Was willst du aus der Tasche wegwerfen?") when 3 @box_window.active = true @info_window.set_text("Was willst du aus der Box wegwerfen?") end @command2_window.active = false @command2_window.visible = false @command2_window.index = 0 when 2 @command2_window.active = false @command2_window.visible = false @command2_window.index = 0 @command_window.index = 0 @command_window.active = true @item_window.visible = true @box_window.visible = false @item_window.index = 0 @item_window.update_help @box_window.index = 0 end end end #-------------------------------------------------------------------------- def update_input if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @layout_window.set_text(" ") case @command_window.index when 0 @item_window.active = true @info_window.set_text("Was willst du ablegen?") when 1 @box_window.active = true @info_window.set_text("Was willst du aufnehmen?") when 2 @item_window.active = true @info_window.set_text("Was willst du aus der Tasche wegwerfen?") when 3 @box_window.active = true @info_window.set_text("Was willst du aus der Box wegwerfen?") end @number_input.active = false @number_input.visible = false @number_input.number = 0 return end if Input.trigger?(Input::C) @anzahl = @number_input.number if @anzahl > 0 @anzahl = (@anzahl > @number) ? @number : @anzahl case @command_window.index when 0 if (@anzahl + @cnumber) > @maxnumber @info_window.set_text("Von "+@item.name+" kannst nur noch höchstens "+(@maxnumber - @cnumber).to_s+" ablegen.") @number_input.number = 0 return elsif @anzahl >= @number @info_window.set_text("Willst du alles von "+@item.name+" ablegen?") else @info_window.set_text("Willst du "+@anzahl.to_s+" von "+@item.name+" ablegen?") end when 1 if (@anzahl + @cnumber) > @maxnumber @info_window.set_text("Von "+@item.name+" kannst nur noch höchstens "+(@maxnumber - @cnumber).to_s+" ablegen.") @number_input.number = 0 return elsif @anzahl >= @number @info_window.set_text("Willst du alles von "+@item.name+" aufnehmen?") else @info_window.set_text("Willst du "+@anzahl.to_s+" von "+@item.name+" aufnehmen?") end when 2 if @anzahl >= @number @info_window.set_text("Willst du alles von "+@item.name+" aus der Tasche wegwerfen?") else @info_window.set_text("Willst du "+@anzahl.to_s+" von "+@item.name+" aus der Tasche wegwerfen?") end when 3 if @anzahl >= @number @info_window.set_text("Willst du alles von "+@item.name+" aus der Box wegwerfen?") else @info_window.set_text("Willst du "+@anzahl.to_s+" von "+@item.name+" aus der Box wegwerfen?") end end @layout_window.set_text(" ") @command2_window.active = true @command2_window.visible = true @number_input.number = 0 @number_input.active = false @number_input.visible = false else $game_system.se_play($data_system.buzzer_se) end end end #-------------------------------------------------------------------------- def update_box if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @box_window.active = false @box_window.visible = false @box_window.index = 0 @item_window.index = 0 @item_window.update_help @item_window.visible = true @command_window.active = true return end if Input.trigger?(Input::C) @item = @box_window.item case @item when RPG::Item @number = $game_party.item_box_number(@item.id) @cnumber = $game_party.item_number(@item.id) @maxnumber = $game_party.maxitemt when RPG::Weapon @number = $game_party.weapon_box_number(@item.id) @cnumber = $game_party.weapon_number(@item.id) @maxnumber = $game_party.maxweapont when RPG::Armor @number = $game_party.armor_box_number(@item.id) @cnumber = $game_party.armor_number(@item.id) @maxnumber = $game_party.maxarmort end if @number == 1 case @command_window.index when 1 @info_window.set_text("Willst du "+@item.name+" aufnehmen?") when 3 @info_window.set_text("Willst du aus der Box "+@item.name+" wegwerfen?") end @anzahl = 1 @command2_window.visible = true @command2_window.active = true @box_window.active = false return elsif @number > 1 @number_input = Window_InputNumber.new(digits_number(@number)) @number_input.x = 160 - @number_input.width @number_input.y = @layout_window.y + 48 @box_window.active = false case @command_window.index when 1 @info_window.set_text("Viel von "+@item.name+" willst du aufnehmen?") @layout_window.set_text("Wie viele aufnehmen?") when 3 @info_window.set_text("Viel von "+@item.name+" willst du aus der Box wegwerfen?") @layout_window.set_text("Wie viele wegwerfen?") end elsif $game_system.se_play($data_system.buzzer_se) end end end end #============================================================================== class Window_Box < Window_Selectable #-------------------------------------------------------------------------- attr_reader :ort_window #-------------------------------------------------------------------------- def initialize(n) super(320, 64, 320, 416) refresh self.index = 0 if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end # typ == 0 -> tasche typ == 1 -> kiste @typ = n end #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- def eof return @data != [] end #-------------------------------------------------------------------------- def ort_window=(ort_window) @ort_window = ort_window end #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] case @typ when 0 for i in 1...$data_items.size if $game_party.item_number(i) > 0 @data.push($data_items[i]) end end for i in 1...$data_weapons.size if $game_party.weapon_number(i) > 0 @data.push($data_weapons[i]) end end for i in 1...$data_armors.size if $game_party.armor_number(i) > 0 @data.push($data_armors[i]) end end when 1 for i in 1...$data_items.size if $game_party.item_box_number(i) > 0 @data.push($data_items[i]) end end for i in 1...$data_weapons.size if $game_party.weapon_box_number(i) > 0 @data.push($data_weapons[i]) end end for i in 1...$data_armors.size if $game_party.armor_box_number(i) > 0 @data.push($data_armors[i]) end end end # If item count is not 0, make a bit map and draw all items @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = (@typ == 0) ? $game_party.item_number(item.id) : $game_party.item_box_number(item.id) when RPG::Weapon number = (@typ == 0) ? $game_party.weapon_number(item.id) : $game_party.weapon_box_number(item.id) when RPG::Armor number = (@typ == 0) ? $game_party.armor_number(item.id) : $game_party.armor_box_number(item.id) end self.contents.font.color = normal_color x = 4 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) @ort_window.set_text((@typ == 0) ? "Tasche" : "Box") end end #============================================================================== class Window_Help < Window_Base #-------------------------------------------------------------------------- def bitmap_adapt self.contents = Bitmap.new(width - 32, height - 32) end end #============================================================================== class Window_Command < Window_Selectable alias initialize_ikssbt :initialize def initialize(width, commands) @align = 0 initialize_ikssbt(width, commands) end #-------------------------------------------------------------------------- def set_align(n) if n>=0 and n<=2 @align = n end end #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index], @align) end #-------------------------------------------------------------------------- def enable_item(index) draw_item(index, normal_color) end end #============================================================================== class Game_Party attr_reader :maxitemt # max Anz. für Items (Tasche) attr_reader :maxweapont # max Anz. für Weapon (Tasche) attr_reader :maxarmort # max Anz. für Armor (Tasche) attr_reader :maxitemb # max Anz. für Items (Box) attr_reader :maxweaponb # max Anz. für Weapon (Box) attr_reader :maxarmorb # max Anz. für Armor (Box) alias initialize_ikssbt :initialize def initialize initialize_ikssbt @items_box = {} @weapons_box = {} @armors_box = {} @maxitemt = 1000 # man kann 1000 Items von der selben Sorte tragen @maxweapont = 100 # man kann 100 Waffen von der selben Sorte tragen @maxarmort = 100 # man kann 100 Rüstungen von der selben Sorte tragen @maxitemb = 5000 # man kann 5000 Items von der selben Sorte lagern @maxweaponb = 300 # man kann 300 Waffen von der selben Sorte lagern @maxarmorb = 300 # man kann 300 Rüstungen von der selben Sorte lagern end #-------------------------------------------------------------------------- def gain_item(item_id, n) if item_id > 0 @items[item_id] = [[item_number(item_id) + n, 0].max, @maxitemt].min end end #-------------------------------------------------------------------------- def gain_weapon(weapon_id, n) if weapon_id > 0 @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, @maxweapont].min end end #-------------------------------------------------------------------------- def gain_armor(armor_id, n) if armor_id > 0 @armors[armor_id] = [[armor_number(armor_id) + n, 0].max, @maxarmort].min end end #-------------------------------------------------------------------------- def item_box_number(item_id) return @items_box.include?(item_id) ? @items_box[item_id] : 0 end #-------------------------------------------------------------------------- def weapon_box_number(weapon_id) return @weapons_box.include?(weapon_id) ? @weapons_box[weapon_id] : 0 end #-------------------------------------------------------------------------- def armor_box_number(armor_id) return @armors_box.include?(armor_id) ? @armors_box[armor_id] : 0 end #-------------------------------------------------------------------------- def gain_item_box(item_id, n) if item_id > 0 @items_box[item_id] = [[item_box_number(item_id) + n, 0].max, @maxitemb].min end end #-------------------------------------------------------------------------- def gain_weapon_box(weapon_id, n) if weapon_id > 0 @weapons_box[weapon_id] = [[weapon_box_number(weapon_id) + n, 0].max, @maxweaponb].min end end #-------------------------------------------------------------------------- def gain_armor_box(armor_id, n) if armor_id > 0 @armors_box[armor_id] = [[armor_box_number(armor_id) + n, 0].max, @maxarmorb].min end end #-------------------------------------------------------------------------- def lose_item_box(item_id, n) gain_item_box(item_id, -n) end #-------------------------------------------------------------------------- def lose_weapon_box(weapon_id, n) gain_weapon_box(weapon_id, -n) end #-------------------------------------------------------------------------- def lose_armor_box(armor_id, n) gain_armor_box(armor_id, -n) end end |
zum Lesen den Text mit der Maus markieren
Aufrufen kannst du das Script mit :
$scene = Scene_Box.new
MFG
Realität ist auch nur eine Art von Rollenspiel.
Ähnliche Themen
-
Skript-Anfragen »-
Waffen herstellungsscipt
(23. November 2011, 20:29)
-
Skript-Anfragen »-
Menüoption ändern 2.0
(24. November 2011, 00:03)
-
Mapping »-
Eine neue Art des Paralaxmappings
(7. Dezember 2011, 10:52)
-
Skript-Anfragen »-
Fragen
(25. Oktober 2011, 17:25)
-
Skript-Anfragen »-
Brauche hilfe bei ein paar script's
(20. August 2010, 15:12)
