RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Im a newb! HELP ME! :P

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 88
Hi, i'm not very new to RMXP, but I am to it's scripting  :P.
So i'd like to ask this basics to you guys;
HOW do i make somekinda thing like: ''Get me a banana and you will get my weapon''. then you get a banana and he says like ''good! here my weapon'' and then doesnt repeat it unless you make a new character?
And is there anything to insert your name?

Please, :)

Thanks!

*****
Ancient Mummy
Rep:
Level 90
Switches and conditional branch.

*****
Rep:
Level 89
I'm back again. Again.
And use the below command to add a characters name in a conversation, if you allow the player to change it.

Code: [Select]
\n[XXX]

Change the XXX to the ID of the character in  the database.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
From the RMXP FAQ. Just apply the changes where necessary and you got yourself a quest.

Quote from: RMXP FAQ
How do I make a quest, where you have to find an item?
There is a bazillion ways to do this. I will try to cook the general concepts down into an example.
If you don't know what a switch is or are unsure of how to use them you should read What is a switch? before continuing.
Phase 1: Activation of the quest
Let's say you talk to this person who gives you the quest. If the quest is given you let the event turn on a switch.
We could use switch 21 - Quest Start and turn it ON. (This could be any switch)
You should make sure that the person does not continue to give the quest. (This is strictly speaking not necessary)
Make a new event page and set as precondition the switch 21 - Quest Start. (Should be the same as the switch you turned ON in the previous page. Remember to set the event graphic)
Here you can set the action for when the Quest is active, but not finished.

Phase 2: Getting the item
Let's say that you could not get the item before.
The event from which you can get the item shall like the event starting the quest have a condition for when the quest start. That is. New page, Precondition set to 21 - Quest Start (2nd page)
Here you should turn another switch to ON. Let it be 22 - Item Gotten. You can make some actions. (Tell the player a story or whatever)
Make a new page (3rd). Set Precondition to 22 - Item Gotten.
Here you can set actions if the player tries to trigger the event again.

Phase 3: Ending the quest
Go back to the event that starts the quest and make a new page (3rd). Set precondition to 22 - Item Gotten.
Here you should tell the player that he or she has completed the quest. Afterwards turn switch 23 - Quest Finished ON. New page (4th). Precondition set to 23 - Quest Finished.
For the item event. New page (4th). Precondition set to 23 - Quest Finished.
Here you can make actions for when the player triggers the events after the quest is completed.

Final notes:
As you might notice a lot of switches are used.
You could actually add an event and then check whether the player has it or not with a conditional branch during the quest. This will eliminate the need for the 22 - Item Gotten switch.

*****
<3
Rep:
Level 90
1. Event with Conditional Branches, read a tut if you don't understand conditional branches.

2. To insert a character's name, there is a commend somewhere in that box you select stuff (Man, I've been away RMXP too long)

Hope I made sense...

~Winged