Welcome to the Builder Academy

Question More Trigger Help

  • Silvaria
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Writer, Builder, Artist, Newbie!Programmer
More
05 May 2013 13:40 - 05 May 2013 13:51 #2120 by Silvaria
More Trigger Help was created by Silvaria
So here is the first trigger I've essentially written myself (woohoo!).

[strike]I can get it to work, but not the way I want it to hahaha.[/strike][strike] I can sort of get it to work. Caught up also at the giving action. D:[/strike] Fixed this.

Is there a way to make the trigger recognize the speech as a whisper? I've tried a couple of different things, but it comes down to me not knowing the jargon I think. And I can't find where different methods of speech are defined for use in triggers, or if it's possible at all. :(

Here is what I have (slightly edited from within the game because I was playing with it):

Code:
Trigger Editor [59303] 1) Name : Iryli Loads Key - Obj [59322] 2) Intended for : Mobiles 3) Trigger types: Speech 4) Numeric Arg : 0 5) Arguments : May the Cycle balance all things. ((I'd like this phrase to only activate the trigger if it is whispered, like a secret password. 8D)) 6) Commands: *This is intended to only load obj 59322 to Iryli if someone whispers the correct phrase to her. %load% obj 59322 Iryli_593 %echo% Iryli inclines her head. 'Of course. Here you are.' wait 1 second give key %actor.name% wait 1 second %echo% Iryli resumes her position. 'Have a pleasant day.'

I tried using "if %arg% == whisper" at the top, but it didn't recognize whisper.

I foresee a lot of trigger-type questions from me in the near future. I'm close to finishing my zone and these are the final touches! But a lot of what I want to do is beyond my knowledge!! But in preparation for that, I'm just going to add my additional questions onto this thread, so I don't have a gajillion of them. XD I appreciate everyone's help!! Thank you so much!!

Began building in July, 2012.

Began learning C in July, 2013.

Downloaded ROM and TBAmud in August, 2013.

Conversion nearly complete.
Last edit: 05 May 2013 13:51 by Silvaria.

Please Log in or Create an account to join the conversation.

More
05 May 2013 17:45 - 05 May 2013 17:46 #2122 by rudeboyrave
Replied by rudeboyrave on topic More Trigger Help
This works. Enjoy :)
Code:
1) Name : Iryli Loads Key - Obj [59322] 2) Intended for : Mobiles 3) Trigger types: Act 4) Numeric Arg : 100 5) Arguments : * 6) Commands: wait 2s if %arg% /= whispers to you, 'May the Cycle balance all things %load% obj 59322 %echo% Iryli inclines her head. 'Of course. Here you are.' wait 2s give key %actor.name% wait 2s %echo% Iryli resumes her position. 'Have a pleasant day.' wait 1s else end

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.
Last edit: 05 May 2013 17:46 by rudeboyrave.

Please Log in or Create an account to join the conversation.

More
05 May 2013 20:31 - 06 May 2013 13:57 #2129 by Fizban
Replied by Fizban on topic More Trigger Help
Two key ways to go about this, one is the way that Rave showed above, the other would be:
Code:
1) Name : Iryli Loads Key - Obj [59322] 2) Intended for : Mobiles 3) Trigger types: Command 4) Numeric Arg : 0 5) Arguments : w 6) Commands: if %cmd.mudcommand% == whisper && %arg% == May the Cycle balance all things. %load% obj 59322 %echo% Iryli inclines her head. 'Of course. Here you are.' wait 1 second give key %actor.name% wait 1 second %echo% Iryli resumes her position. 'Have a pleasant day.' end
Last edit: 06 May 2013 13:57 by Fizban.

Please Log in or Create an account to join the conversation.

  • Silvaria
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Writer, Builder, Artist, Newbie!Programmer
More
06 May 2013 13:42 #2145 by Silvaria
Replied by Silvaria on topic More Trigger Help
Probably not the best idea to try to work on learning scripting while suffering the kind of headache I am, ughhhh. Oh well...

Quick question on tstat 338... In the following section...

Code:
elseif %cmd.mudcommand% == buy if %actor.gold% < 800 tell %actor.name% I cannot sell you a bird for less than 800 coins. halt * lets not allow them to have more than one pet to keep the game balanced. elseif %actor.follower% tell %actor.name% You seem to already have a pet. halt end if bird /= %arg% || %arg% == 1 set pet_name bird set pet_vnum 59310 set pet_cost 800 else tell %actor.name% I only sell birds here. halt end * if %actor.gold% < %pet_cost% tell %actor.name% You don't have enough gold for that. else

I'm confused why there are two lines that both say "if PC has less money than what the pet costs". One of them says < 800 (which is 1500 in the original, I'm just editing it), and the second says < %pet_cost%, but that's 800.

I might have made some sense of it just now, but just to be clear: Since this was written for a multiple-pet petshop, if I'm designing a shop that only has one pet, do I need the second line?

Began building in July, 2012.

Began learning C in July, 2013.

Downloaded ROM and TBAmud in August, 2013.

Conversion nearly complete.

Please Log in or Create an account to join the conversation.

More
06 May 2013 13:53 #2146 by Fizban
Replied by Fizban on topic More Trigger Help
The first check was just there to tell them they were "poor" if they couldn't afford the cheapest item for sale, whereas the other lines referenced specific items instead.

With only one item for sale they'd do the same thing.
The following user(s) said Thank You: Silvaria

Please Log in or Create an account to join the conversation.

  • Silvaria
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Writer, Builder, Artist, Newbie!Programmer
More
08 May 2013 02:46 #2173 by Silvaria
Replied by Silvaria on topic More Trigger Help
I'm going around in circles. :(

Neither of the triggers I've asked for advice about here are working as intended... and I don't know whyy.

I'll reference the first one here.

Code:
1) Name : Iryli Loads Key - Obj [59322] 2) Intended for : Mobiles 3) Trigger types: Act 4) Numeric Arg : 100 5) Arguments : * 6) Commands: wait 2s if %arg% /= whispers to you, 'May the Cycle balance all things.' %load% obj 59322 %echo% Iryli inclines her head and speaks in a low voice. 'Of course. Here you are.' wait 2s %echo% Iryli resumes her position. 'Have a pleasant day.' wait 1s else end

This works fine, without the whisper component. In Rave's example, it seems like the trigger isn't recognizing the whisper at all, as this is the reaction I get:

Code:
34H 100M 88V > whisp Iryli May the Cycle balance all things. You whisper to Iryli, the Keeper's Guard, 'May the Cycle balance all things.'

No actions following. In Fizban's example, I get:

Code:
34H 100M 88V > whisper Iryli May the Cycle balance all things.

No answer from the MUD. I've tweaked it all day and looked up everything I could think of that might help... but I can't get it to recognize the whispered phrase so the rest of the trigger will execute. :/ Any advice? D: Am I missing something obvious? T-T

Began building in July, 2012.

Began learning C in July, 2013.

Downloaded ROM and TBAmud in August, 2013.

Conversion nearly complete.

Please Log in or Create an account to join the conversation.

Time to create page: 0.195 seconds