[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Oprog Question- Deleting the Object?

Oprog Question- Deleting the Object?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Seahawk   (2 posts)  [Biography] bio
Date Tue 03 Aug 2010 06:18 AM (UTC)
Message
I want to make a lever into a one-time use thing where it shatters after being pulled, then pushed. I have it set so it starts out in the up position, got the echoes for the 'shatter' message. To delete the item in question, I tried MPJUNK and MPPURGE, but neither work. Any suggestions?
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 03 Aug 2010 09:22 PM (UTC)
Message
I'm no expert on mobprogs but from the help:


http://www.gammon.com.au/forum/?wiki=mpjunk - for objects in inventory

http://www.gammon.com.au/forum/?wiki=mppurge - sounds like it should work - was a bug logged?


If it isn't obvious, try running gdb and on the mppurge put a breakpoint, and then follow through and see why the object isn't removed.

http://www.gammon.com.au/gdb

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Syrin   (4 posts)  [Biography] bio
Date Reply #2 on Tue 03 Aug 2010 11:23 PM (UTC)
Message
I figured out the reason after digging through how progs work - oprogs set the CHAR_DATA to supermob as a proxy mob, which works fine in most instances, but mpjunk directly references CHAR_DATA ch's inventory, and the item in question wouldn't be in the supermob's inventory - a workaround (that worked) is to just force it to drop with mpforce "drop item" and then mppurge when it's on the ground. It's annoying, though, in that it gives you the drop message, and it won't work in nodrop rooms.
[Go to top] top

Posted by Conner   USA  (381 posts)  [Biography] bio
Date Reply #3 on Thu 05 Aug 2010 03:51 AM (UTC)
Message
One solution to that problem might be to look through the stock progs in New Darkhaven. I believe that most of the shopkeeps (or at least certain mobs who routinely get things from players) have in their progs to every so often mpgoto a room that's not player accessible, drop whatever they've gotten for purging, then use mppurge to get rid of it, then mpgoto whence they came. Even if a player is watching them do this, it's all completely over and done with before they'd ever know anything transpired and there's no messages displayed about it.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,437 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]