Created
June 11, 2023 12:32
-
-
Save triacontane/eee097a5ab7e08b23530acd9802b8b66 to your computer and use it in GitHub Desktop.
所持している武器と防具をすべて売却する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allItems = $gameParty.allItems(); | |
for (var i = 0; i < allItems.length; i++) { | |
var item = allItems[i]; | |
if (DataManager.isWeapon(item) || DataManager.isArmor(item)) { | |
var num = $gameParty.numItems(item); | |
var price = Math.floor(item.price / 2); | |
$gameParty.gainGold(price * num); | |
$gameParty.loseItem(item, num); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ChatGPT-4に作って貰いました。
