<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
    <channel>
        <title>Leptoon's site</title>
        <link>http://www.byond.com/members/Leptoon</link>
        <description></description>
        <lastBuildDate>Tue, 18 Jun 2013 21:18:05 +0000</lastBuildDate>
        <language>en-us</language>
    
                <item>
            <title>Attacking mob movement delay</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=927924</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=927924</guid>
            <pubDate>Mon, 13 Aug 2012 06:52:44 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=927924#comments</comments>
            
            <description>How can I add a delay to the movement of a mob after he is already within one tile of the player?&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
&lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(target &lt;span class=&quot;dmkeyword&quot;&gt;in&lt;/span&gt; view(Attack_View, src)) &lt;span class=&quot;dmcomment&quot;&gt;//If the player is within the field of view of the attacking NPC mob (default: 5 tiles)&lt;/span&gt;&lt;br&gt;   walk_to(src, target, 1, move_delay) &lt;span class=&quot;dmcomment&quot;&gt;//move to the player. move_delay default: 1.6&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(target &lt;span class=&quot;dmkeyword&quot;&gt;in&lt;/span&gt; view(1)) &lt;span class=&quot;dmcomment&quot;&gt;//If within one tile of the player...&lt;/span&gt;&lt;br&gt;      dir = get_dir(src, target) &lt;span class=&quot;dmcomment&quot;&gt;//get the direction of the player...&lt;/span&gt;&lt;br&gt;      step_towards(src, target) &lt;span class=&quot;dmcomment&quot;&gt;//and attack (Bump triggers the attack proc).&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;</description>
        </item>
                <item>
            <title>Noob question about if(prob())</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=926656</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=926656</guid>
            <pubDate>Sun, 12 Aug 2012 17:27:50 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=926656#comments</comments>
            
            <description>Am I correct in assuming the following?&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
&lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(prob(80)) &lt;span class=&quot;dmcomment&quot;&gt;//There is an 80% chance that&lt;/span&gt;&lt;br&gt;   A &lt;span class=&quot;dmcomment&quot;&gt;//A will occur.&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;dmkeyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;dmcomment&quot;&gt;//If it does not,&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(prob(80)) &lt;span class=&quot;dmcomment&quot;&gt;//there is an 80% chance that&lt;/span&gt;&lt;br&gt;      B &lt;span class=&quot;dmcomment&quot;&gt;//B will occur.&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;dmkeyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;dmcomment&quot;&gt;//If it does not,&lt;/span&gt;&lt;br&gt;      &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(prob(80)) &lt;span class=&quot;dmcomment&quot;&gt;//there is an 80% chance that&lt;/span&gt;&lt;br&gt;         C &lt;span class=&quot;dmcomment&quot;&gt;//C will occur.&lt;/span&gt;&lt;br&gt;      &lt;span class=&quot;dmkeyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;dmcomment&quot;&gt;//If it does not,&lt;/span&gt;&lt;br&gt;         D &lt;span class=&quot;dmcomment&quot;&gt;//D will occur.&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
The idea would be to use this to determine ranges of item stats and item rarity. Would it work? Is there a less messy way to do this? Thanks for any help.</description>
        </item>
                <item>
            <title>Breaking one value into multiple values...</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=926187</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=926187</guid>
            <pubDate>Sun, 12 Aug 2012 05:49:43 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=926187#comments</comments>
            
            <description>I'm wondering if it's possible to use one numerical value to set the value of four other variables.&lt;br&gt;
&lt;br&gt;
The four variables are copper for the 1s place, silver for the 10s place, gold for the 100s place and platinum for the 1000s place. They are the players currency. The item value would be translated into those four currencies, which would then be displayed individually.&lt;br&gt;
&lt;br&gt;
Like so...&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
item_value=37&lt;br&gt;&lt;br&gt;37 = 37 copper&lt;br&gt;     or&lt;br&gt;     3 silver 7 copper
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
item_value=1424&lt;br&gt;&lt;br&gt;1424 = 1424 copper&lt;br&gt;       or&lt;br&gt;       14 gold 2 silver 4 copper&lt;br&gt;       or&lt;br&gt;       1 platinum 4 gold 24 copper&lt;br&gt;       or&lt;br&gt;       1 platinum 4 gold 2 silver 4 copper
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
item_value=27893&lt;br&gt;&lt;br&gt;27893 = 27893 copper&lt;br&gt;        or&lt;br&gt;        278 gold 9 silver 3 copper&lt;br&gt;        or&lt;br&gt;        27 platinum 8 gold 93 copper&lt;br&gt;        or&lt;br&gt;        27 platinum 8 gold 9 silver 3 copper
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;</description>
        </item>
                <item>
            <title>Invalid expression?</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=925886</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=925886</guid>
            <pubDate>Sun, 12 Aug 2012 01:49:38 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=925886#comments</comments>
            
            <description>Basically, I'm calling the item level. If it is level 1, this happens. But it says this is an invalid expression. I'm pretty sure it has something to do with that H var trying to be added to manabonus, but I'm not sure how to fix it.&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
&lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(1)&lt;br&gt;   &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/dice = &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;3d6&amp;quot;&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/H = roll(dice)&lt;br&gt;   {firebonus+=1;manabonus+=H;value+=rand(1,25)}
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;</description>
        </item>
                <item>
            <title>Problem with alert</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=628927</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=628927</guid>
            <pubDate>Thu, 05 Apr 2012 09:02:54 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=628927#comments</comments>
            
            <description>When I activate this verb via a button on the shop window, a dialog pops up to select an object in the usr.contents before the alert comes up. I don't know why there is a prompt to select an object in usr.contents. The purchased item will always go to the user's equipped pack (usr.pack).&lt;br&gt;
&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
obj/object/&lt;span class=&quot;dmkeyword&quot;&gt;verb&lt;/span&gt;&lt;br&gt;    PurchaseSelected()&lt;br&gt;        &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(usr.SelectedObject)&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/obj/object/L = usr.SelectedObject&lt;br&gt;            &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(!(L &lt;span class=&quot;dmkeyword&quot;&gt;in&lt;/span&gt; usr.pack))&lt;br&gt;                &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(L.price1)&lt;br&gt;                    &lt;span class=&quot;dmkeyword&quot;&gt;if&lt;/span&gt;(alert(&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Would you like to buy the &lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[L.name]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt; for &lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[L.price1]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt; copper?&amp;quot;&lt;/span&gt;,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Buy&amp;quot;&lt;/span&gt;,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;Yes&amp;quot;&lt;/span&gt;,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;No&amp;quot;&lt;/span&gt;)==&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;No&amp;quot;&lt;/span&gt;)&lt;span class=&quot;dmkeyword&quot;&gt;return&lt;/span&gt;&lt;br&gt;                    usr.copper-=L.price1&lt;br&gt;                    &lt;span class=&quot;dmkeyword&quot;&gt;var&lt;/span&gt;/obj/object/s=&lt;span class=&quot;dmkeyword&quot;&gt;new&lt;/span&gt; L.type&lt;br&gt;                    s.loc=usr.pack&lt;br&gt;                    usr.IncreaseWeight(O=s,P=usr.pack)&lt;br&gt;                    usr.WeightLabel()&lt;br&gt;                    usr.UpdateShop()
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Thanks for any assistance.</description>
        </item>
                <item>
            <title>Problem with consumable item</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=568246</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=568246</guid>
            <pubDate>Sat, 24 Mar 2012 01:17:03 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=568246#comments</comments>
            
            <description>I want to set a variable when a potion is consumed then after an amount of time has passed, unset the variable. Here is what I have right now. Don't mind the indention.&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
                    usr.hp+=src.restorehp&lt;br&gt;                                usr &amp;lt;&amp;lt; &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;The potion has restored &lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[src.restorehp]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt;HP!&amp;quot;&lt;/span&gt;&lt;br&gt;                                usr.hppotionused=1&lt;br&gt;                                usr &amp;lt;&amp;lt; output(null, &lt;span class=&quot;dmstring&quot;&gt;&amp;quot;inventory.freehand&amp;quot;&lt;/span&gt;)&lt;br&gt;                                usr.UpdateInv()&lt;br&gt;                                usr.UpdateFreehandLabel()&lt;br&gt;                                &lt;span class=&quot;dmkeyword&quot;&gt;del&lt;/span&gt;(src)&lt;br&gt;                                spawn(50)&lt;br&gt;                                    usr.hppotionused=0
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Only problem is that the src seems to be deleted before the countdown starts. I have to get rid of the item when it's used... Is there a way to do this? Thanks.</description>
        </item>
                <item>
            <title>Question about selection</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=562607</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=562607</guid>
            <pubDate>Thu, 22 Mar 2012 20:10:21 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=562607#comments</comments>
            
            <description>How can I use the player when I can't use usr or src? What can I put here that will always be the player?&lt;br&gt;
&lt;br&gt;
Example:&lt;br&gt;
&lt;div class=&quot;dmcode&quot;&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;pre class=&quot;dmcode&quot;&gt;
mob/&lt;span class=&quot;dmkeyword&quot;&gt;proc&lt;/span&gt;/UpdateBar()&lt;br&gt;    winset(HERE,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;hp&amp;quot;&lt;/span&gt;,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;value=&lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[round(100*hp/maxhp)]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;&lt;/span&gt;)&lt;br&gt;    winset(HERE,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;mp&amp;quot;&lt;/span&gt;,&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;value=&lt;/span&gt;&lt;span class=&quot;dmbrace&quot;&gt;[round(100*mp/maxmp)]&lt;/span&gt;&lt;span class=&quot;dmstring&quot;&gt;&amp;quot;&lt;/span&gt;)
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;</description>
        </item>
                <item>
            <title>Using winset to clear the contents of a grid?</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=557364</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=557364</guid>
            <pubDate>Wed, 21 Mar 2012 02:55:07 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=557364#comments</comments>
            
            <description>What would be the code to clear the contents of a grid? Right now, I have a multiple nested pack system and it seems to work but I need to clear the contents of the grid, cause when I open one object and close it, then open another, the contents from the first object still appear on the grid.&lt;br&gt;
&lt;br&gt;
Anywho, thanks for any help. I very much appreciate it.</description>
        </item>
                <item>
            <title>If the grid is visible, do this. If it's not, do this instead. How?</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=556065</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=556065</guid>
            <pubDate>Tue, 20 Mar 2012 19:19:31 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=556065#comments</comments>
            
            <description>Another simple question that I could probably find the answer to in an interface demo... But I would rather just post it here.&lt;br&gt;
&lt;br&gt;
So, how do you use an if statement to check if an interface grid is visible?</description>
        </item>
                <item>
            <title>Question about nested containers</title>
            <link>http://www.byond.com/members/Leptoon?command=view_post&amp;post=554576</link>
            <guid>http://www.byond.com/members/Leptoon?command=view_post&amp;post=554576</guid>
            <pubDate>Tue, 20 Mar 2012 13:21:08 +0000</pubDate>
            
            <comments>http://www.byond.com/members/Leptoon?command=view_comments&amp;post=554576#comments</comments>
            
            <description>I know you can have objects that contain other objects inside of objects, but how can I pull the contents of the container inside the main container? I want to calculate the weight of the contents of a nested container but I'm not sure how to even call the contents of a nested container...</description>
        </item>
            
    </channel>
</rss>

