http://wiki.easyuo.com/api.php?action=feedcontributions&user=Garath&feedformat=atomWiki - User contributions [en]2024-03-29T13:46:19ZUser contributionsMediaWiki 1.26.3http://wiki.easyuo.com/index.php?title=Exevent_Dropc&diff=3348Exevent Dropc2006-02-09T23:48:21Z<p>Garath: </p>
<hr />
<div>{{command header|ExEvents}}<br />
<br />
{{body|Exevent Dropc {container id} [x y]|The ''Exevent Dropc'' command drops obects you drag using the [[Exevent Drag]] command to any container you want.<br />
<br />
If you specify x/y then the item will be dropped in the container at the x/y coordinates relative to the container's location, otherwise it will be dropped on the container.<br />
<br />
If you want to combine the stack being dragged with another stack of the same item type, just pass the ID of the destination stack as <tt>{container id}</tt>.<br />
}}<br />
<br />
<br />
{{note|<br />
*This command is only available from EUO 1.5<br />
*The x/y parameter is only available from EUO 1.5 TV 56<br />
*You shouldn't use [[Event Drag]] in connection with [[Exevent Dropc]] command or you'll end up with a ghost item on your cursor. That's why there is an [[Exevent Drag]] command}}<br />
<br />
<br />
==== Example ====<br />
<pre>finditem %gold G_2<br />
if #findkind &lt;&gt; -1<br />
{<br />
Exevent Drag #findid #findstack<br />
wait 10<br />
Exevent Dropc #backpackid ;drops in a random location in backpack or stacks with existing<br />
wait 10<br />
}<br />
</pre><br />
<pre><br />
event macro 8 7 ;opens backpack<br />
contpos 100 100 ;positions it at 125,125<br />
finditem %mushroom G_2<br />
if #findcnt > 0<br />
{<br />
Exevent Drag #findid 1<br />
wait 10<br />
Exevent Dropc #backpackid 80 80 ;drops the mushroom at 205,205<br />
wait 10<br />
}<br />
halt<br />
</pre><br />
<br />
==== User Contributed Notes ====<br />
<b><u>snicker7</u> 10/21/05:</b><br /><br />
Here are a few things to note about [[exevent dropc]]:<br />
<br />
[[exevent dropc]] can drop to ANY container or object (see below) that is within reach, REGARDLESS of whether or not the container or object is actually visible on the screen. This means that even if you have a bag 2 levels deep in a chest locked down on the floor of your house, if you know the ID of the container, you can drop things into it. Attempting to drop to a container that does not exist or that is out of reach will cause the item to "bounce back" to its original position.<br />
<br />
Additionally, [[exevent dropc]] will take ANYTHING as a parameter that you could normally drag and drop an item onto; it is not solely limited to containers. This includes things like NPCs, Spellbooks, BOD Books, Animals (beetles, packhorses, etc), even other players to initiate trade sessions. For a simple example, say you wanted to drop an item into the backpack of your beetle:<br />
<pre>finditem %beetleID G_2<br />
if #findkind <> -1<br />
{<br />
exevent drag %itemID ;%itemID being the ID of the object<br />
exevent dropc #findid ;#findID being the ID of the beetle<br />
}</pre>You don't actually have to even know the ID of the beetle's backpack (which is different from the beetle's actual ID), because it functions just as if you had actually dropped the item onto the beetle normally. This also means that if you were to drop meat onto it, it would not go into the pack, but would instead be considered food to the beetle.<br />
<br />
<br />
<br />
<br />
{{footer}}</div>Garathhttp://wiki.easyuo.com/index.php?title=Exevent_Dropc&diff=1838Exevent Dropc2006-02-09T23:44:27Z<p>Garath: </p>
<hr />
<div>{{command header|ExEvents}}<br />
<br />
{{body|Exevent Dropc {container id} [x y]|The ''Exevent Dropc'' command drops obects you drag using the [[Exevent Drag]] command to any container you want.<br />
<br />
If you don't specify x/y then the item will be dropped on the bag, otherwise it will be dropped into the bag at the specified location.<br />
<br />
If you want to combine the stack being dragged with another stack of the same item type, just pass the ID of the destination stack as <tt>{container id}</tt>.<br />
}}<br />
<br />
<br />
{{note|<br />
*This command is only available from EUO 1.5<br />
*The x/y parameter is only available from EUO 1.5 TV 56<br />
*You shouldn't use [[Event Drag]] in connection with [[Exevent Dropc]] command or you'll end up with a ghost item on your cursor. That's why there is an [[Exevent Drag]] command}}<br />
<br />
<br />
==== Example ====<br />
<pre>finditem %gold G_2<br />
if #findkind &lt;&gt; -1<br />
{<br />
Exevent Drag #findid #findstack<br />
wait 10<br />
Exevent Dropc #backpackid ;drops the gold in a random location in your backpack<br />
wait 10<br />
}<br />
</pre><br />
<pre><br />
event macro 8 7 ;opens backpack<br />
contpos 100 100 ;positions it at 125,125<br />
finditem %mushroom G_2<br />
if #findcnt > 0<br />
{<br />
Exevent Drag #findid 1<br />
wait 10<br />
Exevent Dropc #backpackid 80 80 ;drops the mushroom at 205,205<br />
wait 10<br />
}<br />
halt<br />
</pre><br />
<br />
==== User Contributed Notes ====<br />
<b><u>snicker7</u> 10/21/05:</b><br /><br />
Here are a few things to note about [[exevent dropc]]:<br />
<br />
[[exevent dropc]] can drop to ANY container or object (see below) that is within reach, REGARDLESS of whether or not the container or object is actually visible on the screen. This means that even if you have a bag 2 levels deep in a chest locked down on the floor of your house, if you know the ID of the container, you can drop things into it. Attempting to drop to a container that does not exist or that is out of reach will cause the item to "bounce back" to its original position.<br />
<br />
Additionally, [[exevent dropc]] will take ANYTHING as a parameter that you could normally drag and drop an item onto; it is not solely limited to containers. This includes things like NPCs, Spellbooks, BOD Books, Animals (beetles, packhorses, etc), even other players to initiate trade sessions. For a simple example, say you wanted to drop an item into the backpack of your beetle:<br />
<pre>finditem %beetleID G_2<br />
if #findkind <> -1<br />
{<br />
exevent drag %itemID ;%itemID being the ID of the object<br />
exevent dropc #findid ;#findID being the ID of the beetle<br />
}</pre>You don't actually have to even know the ID of the beetle's backpack (which is different from the beetle's actual ID), because it functions just as if you had actually dropped the item onto the beetle normally. This also means that if you were to drop meat onto it, it would not go into the pack, but would instead be considered food to the beetle.<br />
<br />
<br />
<br />
<br />
{{footer}}</div>Garathhttp://wiki.easyuo.com/index.php?title=Exevent_RenamePet&diff=3219Exevent RenamePet2005-12-08T16:08:01Z<p>Garath: </p>
<hr />
<div>{{command header|ExEvents}}<br />
<br />
{{body|Exevent RenamePet {id} {name}|The ''Exevent RenamePet'' command changes the name of the pet given by its id to name.<br />
}}<br />
<br />
<br />
{{note|This command is only available from EUO 1.5 TV 56}}<br />
<br />
<br />
==== Example ====<br />
<pre>finditem %horse G_2<br />
if #findkind &lt;&gt; -1<br />
Exevent RenamePet #findid Name<br />
halt<br />
</pre><br />
<br />
{{footer}}</div>Garathhttp://wiki.easyuo.com/index.php?title=While&diff=1979While2005-12-08T16:03:36Z<p>Garath: </p>
<hr />
<div>{{command header|Flow Control}}<br />
{{body|while ( expression ) { }|While loops test the expression and if true, continuously executes the code provided until the expression is no longer true. Unlike [[repeat..until]], while loops will not execute at all if the expression evaluates to false.}}<br />
<br />
==== Example ====<br />
<pre><br />
set %Test 1<br />
<br />
while %Test < 10<br />
{<br />
;Code between these brackets, gets executed, while %Test is smaller than 10<br />
;When its 10, it wont jump back to first bracket.<br />
set %Test %Test + 1<br />
}<br />
display ok %Test $<br />
halt<br />
</pre><br />
<br />
%Test holds the value of 10. Notice the condition "%Test < 10". If that becomes true, the script won't jump back to the while loop start, but continues normally.<br />
<br />
{{footer}}</div>Garathhttp://wiki.easyuo.com/index.php?title=While&diff=1691While2005-12-08T16:02:59Z<p>Garath: /* Example */</p>
<hr />
<div>{{command header|Flow Control}}<br />
{{body|while ( expression ) { }|While loops test the expression and if true, continuously executes the code provided until the expresion is no longer true. Unlike [[repeat..until]], while loops will not execute at all if the expression evaluates to false.}}<br />
<br />
==== Example ====<br />
<pre><br />
set %Test 1<br />
<br />
while %Test < 10<br />
{<br />
;Code between these brackets, gets executed, while %Test is smaller than 10<br />
;When its 10, it wont jump back to first bracket.<br />
set %Test %Test + 1<br />
}<br />
display ok %Test $<br />
halt<br />
</pre><br />
<br />
%Test holds the value of 10. Notice the condition "%Test < 10". If that becomes true, the script won't jump back to the while loop start, but continues normally.<br />
<br />
{{footer}}</div>Garathhttp://wiki.easyuo.com/index.php?title=Repeat..until&diff=1896Repeat..until2005-12-08T16:01:03Z<p>Garath: </p>
<hr />
<div>{{command header|Flow Control}}<br />
{{body|repeat { } until { expression }|The ''repeat..until'' control structure executes the code block between the statements, and then evaluates the expression. This will make it so that [[repeat..until]] loops will always execute the code within the loop at least once. This command differs from the [[while]] command because the expression is evaluated prior to the code inside the code block, where [[while]] evaluates the expression after executing it's code block.}}<br />
<br />
==== Example ====<br />
<pre><br />
set %str Hello , #spc , World <br />
repeat <br />
set %str %str , ! <br />
str len %str <br />
until #strres >= 30 <br />
display ok %str <br />
halt<br />
</pre><br />
<br />
The example above illustrates the difference between a repeat..until loop and a while loop. the exclamation point will always be concatinated to the end of the %str variable, and str len will be executed once before the test for #strRes >= 30 is first evaluated.<br />
<br />
{{footer}}</div>Garath