Basic JS Question

Hi there my friends, can you teach me basic coding such as .. for example:


Modify a character equipment


ex: Char in party


if check? inparty = 1


 then char[1].weapon = Rust sword


         char[1].armor = Silver Breastplace


         char[1].accessory.removed //removed one piece equipments


else end


Check if an item is existing in inventory


ex: If check?item[1] inside inventory?=true


variables[1] = 1


variables[2] = inventory.item[1].amount //get amounf of item 1 in the inventory


Removed Item[x] from inventory


ex: If check?item[1] inside inventory?=true


item[1].amount -= 5 //removed 5 from amount of item1 in inventory


item[1].removed //completely removed item 1 from inventory


Modify Gold


party.gold += varibales[100]


Modify Skill


party.actor[1].add = skill[10]   //add a skill


party.actor[1].forget = skill[5]    //remove a skill


if party.actor[1].skill[6]?exist = true   //check if skill X exist then remove it & adding skill Y


 then actor[1].forget = skill[6]


         actor[1].add = skill[20]


🙁 thank, i am trying to make  a game and i need to work with scripts, please help mee T.T
You don't need script,you can use the event editor,if that is what you want.


additionally,you can use plugin if you want to do stuff that the


current version of your rpgmaker don't allow.
If you just want to do them, you can do all those using just event commands... Else you just need to read how the basic js files handles those event commands to know what JS code they run.
Awesome thank you guys, actually i want to work around with script for more flexible 🙂 RPG Maker MV Script Call List is exactly what i want, thank Shaz
not sure how you get "more flexible" out of calling them via script vs event commands.  All of those things are incredibly easy to do with event commands.  Doing them via script is adding complexity.

Original thread: https://forums.rpgmakerweb.com/threads/basic-js-question.72140/