Welcome to the Builder Academy

Question dg_script question

More
14 Jul 2012 02:47 #370 by bakarus
Replied by bakarus on topic Re: dg_script question
Thank you Vatiken, that fixed it and it works great.

Thanks again Rumble/Vatiken and everyone for the help

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

More
14 Jul 2012 12:19 - 14 Jul 2012 12:27 #371 by Rumble
Replied by Rumble on topic Re: dg_script question
Nice addition, and thanks for sharing. I actually added it to the stock teleporter. A modified version, you should add a return 0 to yours, otherwise the trigger will not let anyone "enter" anything else.
Code:
1) Name : Teleporter Recall and Return 2) Intended for : Objects 3) Trigger types: Command 4) Numeric Arg : 7 5) Arguments : re 6) Commands: * By Rumble of The Builder Academy tbamud.com 9091 if %cmd% == recall eval teleporter_return_room %actor.room.vnum% remote teleporter_return_room %actor.id% %send% %actor% You recall to safety. %echoaround% %actor% %actor.name% recalls. %teleport% %actor% 3001 %force% %actor% look %echoaround% %actor% %actor.name% appears in the room. elseif %cmd% == return %send% %actor% You return to your previous location. %echoaround% %actor% %actor.name% teleports out of the room. %teleport% %actor% %actor.teleporter_return_room% %force% %actor% look %echoaround% %actor% %actor.name% appears in the room. else return 0 end
Be careful with command triggers. Every builder that uses trigedit extensively freezes themselves. In this case the trigger interferes with the immortal "return" command. So after demoting myself to test I thought I did it again until I realized I had to type "retur" to restore myself.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 14 Jul 2012 12:27 by Rumble.

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

More
16 Jul 2012 02:26 - 16 Jul 2012 02:35 #376 by Fizban
Replied by Fizban on topic Re: dg_script question

Vatiken wrote: "set original_vnum = %actor.room.vnum%"
to
"eval original_vnum %actor.room.vnum%"


That can remain set rather than being eval.

Better for it to remain set inf act, the = though does need to be removed as you suggested.

One other suggestion is to replace this line:

if %cmd.mudcommand% == enter && %arg% /= gateway

with these two:

set gateway 'gateway
if %cmd.mudcommend% == enter && %gateway.contains('%arg%)%
Last edit: 16 Jul 2012 02:35 by Fizban.

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

More
16 Jul 2012 02:41 #377 by Fizban
Replied by Fizban on topic Re: dg_script question

Rumble wrote: Be careful with command triggers. Every builder that uses trigedit extensively freezes themselves.


Pssh, only amateurs make that mistake less than a dozen times .

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

Time to create page: 0.184 seconds