Welcome to the Builder Academy

Question Question about object teleporting

More
07 May 2013 00:52 #2164 by Nerian
I saw somewhere either here or on cwg.lazuras.org asking about objects being teleported with triggers to avoid resetting otimers and things like that


was this ever implemented or is the only way to purge and load it at the other place?

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

More
07 May 2013 03:10 #2165 by Fizban
That was never added, but, umm, you can do it in a rather, uhh, hack-ish manner.

Specifically, you'd make the mob pick the object up, teleport the mob, and then the mob drops the item.

If you don't want the players to see the mob pick the item up you teleport them out of the room before the mob grabs the item, and then teleport them back to the room afterwards so they aren't in the room when the message is sent to the room.

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

More
07 May 2013 23:56 #2172 by Nerian
Eh I understand doing that in a roundabout manner, but I was asking about teleporting items off of a person



I guess I could force the actor to drop the items.

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

More
08 May 2013 16:13 #2178 by Rumble
Forcing a player to drop causes the drop message though. So instead just purge and reload like the example below that takes an entire player's inventory
Code:
Name: 'Near Death Trap Mahatma - 6318', VNum: [ 6300], RNum: [ 984] Trigger Intended Assignment: Mobiles Trigger Type: Greet , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Near Death Trap - Mahatma stuns actor and then takes all of their equipment. wait 3 sec say Here, have a quick trip to the Temple of Midgaard. wait 2 sec %send% %actor% Mahatma plunges a black dagger into your back and takes all your equipment. %echoaround% %actor% Mahatma plunges a black dagger into %actor.name%'s back and takes all of %actor.hisher% equipment. * Damage the actor to 0 hitpoints so they lay there stunned, unable to move. * They will recover. set stunned %actor.hitp% %damage% %actor% %stunned% * steal all their inventory. set i %actor.inventory% while %i% set pge 1 if %i.type% == container if %i.contents% set i %container.contents% * Don't purge containers inside containers or mudmail. if %i.type% == container || %i.vnum% <= 1 set pge 0 end end end eval stolen %i.vnum% set next %i.next_in_list% if %pge% %purge% %i% end * Don't steal mail. if %stolen% > 1 %load% obj %stolen% end if !%next% set i %actor.inventory% else set i %next% end done set i 0 [ Return to continue, (q)uit, (r)efresh, (b)ack, or page number (1/2) ] * steal all their equipped items. while %i% < 18 eval item %actor.eq(%i%)% if %item% eval stolen %item.vnum% %purge% %item% %load% obj %stolen% end eval i %i%+1 done

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

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

More
08 May 2013 19:02 #2180 by Fizban

Rumble wrote: Forcing a player to drop causes the drop message though. So instead just purge and reload like the example below that takes an entire player's inventory

Code:
Name: 'Near Death Trap Mahatma - 6318', VNum: [ 6300], RNum: [ 984] Trigger Intended Assignment: Mobiles Trigger Type: Greet , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Near Death Trap - Mahatma stuns actor and then takes all of their equipment. wait 3 sec say Here, have a quick trip to the Temple of Midgaard. wait 2 sec %send% %actor% Mahatma plunges a black dagger into your back and takes all your equipment. %echoaround% %actor% Mahatma plunges a black dagger into %actor.name%'s back and takes all of %actor.hisher% equipment. * Damage the actor to 0 hitpoints so they lay there stunned, unable to move. * They will recover. set stunned %actor.hitp% %damage% %actor% %stunned% * steal all their inventory. set i %actor.inventory% while %i% set pge 1 if %i.type% == container if %i.contents% set i %container.contents% * Don't purge containers inside containers or mudmail. if %i.type% == container || %i.vnum% <= 1 set pge 0 end end end eval stolen %i.vnum% set next %i.next_in_list% if %pge% %purge% %i% end * Don't steal mail. if %stolen% > 1 %load% obj %stolen% end if !%next% set i %actor.inventory% else set i %next% end done set i 0 [ Return to continue, (q)uit, (r)efresh, (b)ack, or page number (1/2) ] * steal all their equipped items. while %i% < 18 eval item %actor.eq(%i%)% if %item% eval stolen %item.vnum% %purge% %item% %load% obj %stolen% end eval i %i%+1 done


He brought up the issue with that in his first post.

Not all items with the same vnum are identical. They can have varying ovalues and timers, etc.

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

Time to create page: 0.200 seconds