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.
Newbie here needing event/switch whatever help

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 83
Hey i'm new to Rm2k3, like i know how to map fairly well, and i can simple like message events but i need help with switches and such. well ill explain: i have a NPC outside of a pub and his message is "hey pal! get me a beer and i'll give you a rare item!" like idk how to change the message for when u have a beer in your inventory, i want it so like when u have a beer he says "Thanks pal! here you go!" then u get a potion (i know how to add items)
then AFTER U GET THE POTION FROM HIM I WANT HIM TO SAY "Thanks again!" NO MATTER HOW MANY TIMES U TALK TO HIM! EVEN WITH BEER! so basically i dont want it to repeat help me plz? sorry for ramblin :s
<Imagine me knowing how to make a sig>

***
Rep:
Level 86
Sonic Dog -> Light Spear -> Overlimit -> Slash
Start with a conditional branch, and make the condition if party possesses Beer (Second page, first option). Directly under that, put your message as "Thanks pal! here you go!" add your potion, and turn on a switch. Make a new page, and set the precondition to that switch. In that command box, have him say "Thanks again!" and that should do it.

******
Walking Billboard
Rep:
Level 87
m'kay :3

*attempts to answer first*

This is actually pretty simple.

FIRSTLY, Make a conditional branch that activates when a switch is turned on.

THEN, in that little part that's like "OTHERWISE" make ANOTHER conditional branch that activates when you have one beer in the inventory.

So you'll have a few conditional branches, and it should be like this:

Code: [Select]
CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<>
ELSEWISE

  CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
  <>
  ELSEWISE
  <>
  END BRANCH
  <>
END BRANCH
<>

So now you're gonna have to dump your messages in there.

So, the first time you talk to this guy, you're probably not gonna have a beer and the switch DEFINITELY won't be turned on. So your first message should go:

Code: [Select]
CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<>
ELSEWISE

  CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
  <>
  ELSEWISE
  <[RIGHT HERE]>
  END BRANCH
  <>
END BRANCH
<>

all in that little section. Then, the second message, when you have a beer, is gonna be

Code: [Select]
CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<>
ELSEWISE

  CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
  <[RIGHT HERE]>
  ELSEWISE
  message "HEY, GIMMIE A BEER."
  <>
  END BRANCH
  <>
END BRANCH
<>

So, after you get that message in, you're gonna need to dump that first switch in after that. SO INSIDE THAT LITTLE SECTION, IT SHOULD BE LIKE:

Code: [Select]
CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
message "YO MAN, THANKS!"
Switch WHATEVER is turned ON
<>
ELSEWISE
message "HEY, GIMMIE A BEER"
<>
END

THEN, YOU PUT THAT FINAL MESSAGE right in that first little switch section.




Code: [Select]
CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<[Yeah, right here]>
ELSEWISE

  CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
  message "YO MAN, THANKS!"
  Switch WHATEVER is turned ON
  <>
  ELSEWISE
  message "HEY, GIMMIE A BEER"
<>
END
  <>
END BRANCH
<>

And that should be it. I know it's confusing, so if you have any questions just ask me ._.

[EDIT]: Basically what Sirus said, lol

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2009Project of the Month winner for January 2010Project of the Month winner for April 2010
Or you could just do.

If Hero has beer
Thanks
Switch Beer On
Make New Page Even with Switch beer on on the sidebar on the left and have that message loop

else

Where's mah beer

Many ways to do it really @_@


******
Walking Billboard
Rep:
Level 87
Actually, that was pretty much what we all said XD

Yeah, the way Nessy said to do it will be much easier to edit, however...

SO YES. DO IT - the Nessy way 8D

**
Rep: +0/-0Level 83
Well, You just need to
1. make 2 page in an Event
2. First one, Is for Hi, If you bring me the bir , I'll give you something
3. Then, After you got it, At the second page, You Put on Precondition "Item : Beer"
4. After that, You just simply lose 1 beer and get 1 potion, And the event will back to the first one, When he ask the beer again  :)
Good luck on trying ;)

******
Walking Billboard
Rep:
Level 87
M'KAY, TWO THINGS:

I do believe this is rather old.

Also, I think after two weeks if he had any further questions he would have asked for help, in which place it would be appropriate to jump in :)