Welcome to the Builder Academy

Question Having issues with command arguments.

  • Scarman
  • Topic Author
  • Visitor
  • Visitor
29 Mar 2013 17:34 - 29 Mar 2013 17:38 #1747 by Scarman
Having issues with command arguments. was created by Scarman
Code:
1) Name : strength spell rune 2) Intended for : Objects 3) Trigger types: Command 4) Numeric Arg : 4 5) Arguments : touch 6) Commands: %echo% A blue mist rises from the rune and surrounds your body. Wait 10 dg_cast 'strength' %actor%

The trigger works fine when the player uses the command touch within the room. How can I write it so the player has to type "touch rune". It has to be simple and I have tried a few things but I can't get it to work.

I have a couple more triggers that are nearly identical but I can't figure out how to get two words to be the command.

Thanks,

Treyorn
LuminariMUD

edit: Sorry for wrong forum :(
Last edit: 29 Mar 2013 17:38 by Scarman. Reason: Put in wrong forum

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

More
29 Mar 2013 17:53 - 29 Mar 2013 17:53 #1748 by Rumble
Here is an example of an object command trig. All you have to do is check the %arg%.
Code:
Name: 'Shirt reverse', VNum: [ 4421], RNum: [ 1040] Trigger Intended Assignment: Objects Trigger Type: Command, Numeric Arg: 2, Arg list: r Commands: if %cmd% == reverse && shirt /= %arg% if %self.vnum(4421)% %transform% 4422 %send% %actor% You turn the shirt inside out. elseif %self.vnum(4422)% %transform% 4421 %send% %actor% You turn the shirt back right-side out. else %send% %actor% This script is on an item it shouldn't be, please tell an immortal. end else return 0 end

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 29 Mar 2013 17:53 by Rumble.

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

  • Scarman
  • Topic Author
  • Visitor
  • Visitor
29 Mar 2013 18:25 #1749 by Scarman
Replied by Scarman on topic Having issues with command arguments.
Ahh, that's frustrating.

I was using
Code:
if %cmd.mudcommand% == touch && rune /= %arg%
and not
Code:
%cmd%

Well I was close. Thanks for the quick help.

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

More
29 Mar 2013 21:14 #1750 by Rumble
No problem, %cmd.mudcommand% only works for words under the "command" command.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

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

Time to create page: 0.203 seconds