<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://coffeemud.net:8080/wiki/index.php?action=history&amp;feed=atom&amp;title=GiveOrDrop%28Script%29</id>
	<title>GiveOrDrop(Script) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://coffeemud.net:8080/wiki/index.php?action=history&amp;feed=atom&amp;title=GiveOrDrop%28Script%29"/>
	<link rel="alternate" type="text/html" href="http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;action=history"/>
	<updated>2026-05-14T21:38:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;diff=21189&amp;oldid=prev</id>
		<title>Loki at 13:34, 17 September 2024</title>
		<link rel="alternate" type="text/html" href="http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;diff=21189&amp;oldid=prev"/>
		<updated>2024-09-17T13:34:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:34, 17 September 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Notes=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Notes=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:UurDin(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Builder&lt;/del&gt;)]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:UurDin(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Scripter&lt;/ins&gt;)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Loki</name></author>
	</entry>
	<entry>
		<id>http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;diff=21127&amp;oldid=prev</id>
		<title>Loki at 13:59, 16 August 2024</title>
		<link rel="alternate" type="text/html" href="http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;diff=21127&amp;oldid=prev"/>
		<updated>2024-08-16T13:59:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:59, 16 August 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{CoffeeMUDWikiBuilderTOC}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{CoffeeMUDWikiBuilderTOC}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Give or Drop =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Give or Drop =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This script function can be used in any script to allow a mob to properly award quest rewards, give out specific items or properly transfer money to mobs that are not normally detectable by the scripted mob. If the mob can&#039;t see the person they are trying to give the item to, they will drop the item instead.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This script function can be used in any script to allow a mob to properly award quest rewards, give out specific items or properly transfer money to mobs that are not normally detectable by the scripted mob. If the mob can&#039;t see the person they are trying to give the item to&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, or if the mob can&#039;t accept the item for another reason, such as over-encumbered or inappropriate zappermask&lt;/ins&gt;, they will drop the item instead.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* You must call this function instead of a using a GIVE command. For example, instead of a give 200 &amp;quot;$n&amp;quot;, you would issue an mpcallfunc GiveOrDrop 200 &amp;quot;$n&amp;quot; to give $n 200 coins (as long as this function is in the script)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* You must call this function instead of a using a GIVE command. For example, instead of a give 200 &amp;quot;$n&amp;quot;, you would issue an mpcallfunc GiveOrDrop 200 &amp;quot;$n&amp;quot; to give $n 200 coins (as long as this function is in the script)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Loki</name></author>
	</entry>
	<entry>
		<id>http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;diff=21126&amp;oldid=prev</id>
		<title>Loki: Created page with &quot;{{CoffeeMUDWikiBuilderTOC}} = Give or Drop = This script function can be used in any script to allow a mob to properly award quest rewards, give out specific items or properly...&quot;</title>
		<link rel="alternate" type="text/html" href="http://coffeemud.net:8080/wiki/index.php?title=GiveOrDrop(Script)&amp;diff=21126&amp;oldid=prev"/>
		<updated>2024-08-16T13:55:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{CoffeeMUDWikiBuilderTOC}} = Give or Drop = This script function can be used in any script to allow a mob to properly award quest rewards, give out specific items or properly...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{CoffeeMUDWikiBuilderTOC}}&lt;br /&gt;
= Give or Drop =&lt;br /&gt;
This script function can be used in any script to allow a mob to properly award quest rewards, give out specific items or properly transfer money to mobs that are not normally detectable by the scripted mob. If the mob can&amp;#039;t see the person they are trying to give the item to, they will drop the item instead.&lt;br /&gt;
* You must call this function instead of a using a GIVE command. For example, instead of a give 200 &amp;quot;$n&amp;quot;, you would issue an mpcallfunc GiveOrDrop 200 &amp;quot;$n&amp;quot; to give $n 200 coins (as long as this function is in the script)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#give 200 &amp;quot;$n&amp;quot;&lt;br /&gt;
mpcallfunc GiveOrDrop 200 &amp;quot;$n&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== GiveOrDrop ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#expect parm0=object to give and parm1=who to give to&lt;br /&gt;
#parms should be passed in in double quotes to handle if name has spaces&lt;br /&gt;
function_prog GiveOrDrop&lt;br /&gt;
  #below is for actual items or quest points.  It handles when the mob has more than one of them.&lt;br /&gt;
  if has($i $g.0)&lt;br /&gt;
    MPSETVAR $i VAR_INVCOUNT1 $%NUMITEMSMOB($i)%&lt;br /&gt;
    give $g.0 $g.1&lt;br /&gt;
    if numitemsmob($i == $&amp;lt;$i VAR_INVCOUNT1&amp;gt;)&lt;br /&gt;
      mpecho ^T$i says, &amp;#039;I&amp;#039;ll set this on the ground for you.^?&lt;br /&gt;
      drop $g.0&lt;br /&gt;
    endif&lt;br /&gt;
  endif&lt;br /&gt;
&lt;br /&gt;
  #below is for money (i.e. use 200 for 200 gold coins or local currency)&lt;br /&gt;
  if number($g.0)&lt;br /&gt;
    MPSETVAR $i VAR_MONEYCOUNT1 $%GSTAT($i money)%&lt;br /&gt;
    give $g.0 $g.1&lt;br /&gt;
    MPSETVAR $i VAR_MONEYCOUNT2 $%GSTAT($i money)%&lt;br /&gt;
    if eval(&amp;#039;$&amp;lt;$i VAR_MONEYCOUNT1&amp;gt;&amp;#039; == &amp;#039;$&amp;lt;$i VAR_MONEYCOUNT2&amp;gt;&amp;#039;)&lt;br /&gt;
      mpecho ^T$i says, &amp;#039;I&amp;#039;ll set this on the ground for you.^?&lt;br /&gt;
      drop $g.0&lt;br /&gt;
    endif&lt;br /&gt;
  endif&lt;br /&gt;
~&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
.&lt;br /&gt;
[[Category:UurDin(Builder)]]&lt;/div&gt;</summary>
		<author><name>Loki</name></author>
	</entry>
</feed>