<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://solarstrike.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wildfire</id>
		<title>SolarStrike wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://solarstrike.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wildfire"/>
		<link rel="alternate" type="text/html" href="https://solarstrike.net/wiki/index.php/Special:Contributions/Wildfire"/>
		<updated>2026-06-11T00:21:33Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://solarstrike.net/wiki/index.php?title=RoM_Auto_repair&amp;diff=985</id>
		<title>RoM Auto repair</title>
		<link rel="alternate" type="text/html" href="https://solarstrike.net/wiki/index.php?title=RoM_Auto_repair&amp;diff=985"/>
				<updated>2011-08-23T03:26:08Z</updated>
		
		<summary type="html">&lt;p&gt;Wildfire: /* Use a Durability Based AutoRepair */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Auto Repair at the merchant NPC =&lt;br /&gt;
&lt;br /&gt;
For using the autorepair ingame, you need normaly to press the 'repair' button. You can install the ingame addon [http://rom.curse.com/downloads/rom-addons/details/streamline.aspx Streamline]. Streamline will automaticly repair if you open a dialog window with a merchant and it will automaticly deliver quests, if you open a dialog with a quest NPC.&lt;br /&gt;
&lt;br /&gt;
You can also do that by using the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;player:merchant( npc_name );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will try to target the nearest NPC's and find the NPC by name. After that, the bot will open the dialog window, autorepair and buy consumables depending from your profile options. It will also work while using multiple bots.&lt;br /&gt;
&lt;br /&gt;
If you only want to target a NPC and do the further stuff by yourself you can use the function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;player:target_NPC( npc_name );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you have to create a waypoint file, which leads your character to the repair NPC&lt;br /&gt;
&lt;br /&gt;
e.g. '5-7_bugs_repair.xml'&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;waypoints&amp;gt;&lt;br /&gt;
   &amp;lt;!-- Thats a demo to interact with the NPC Tracy                         --&amp;gt;&lt;br /&gt;
	&amp;lt;!-- # 1 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-12282&amp;quot; z=&amp;quot;11183&amp;quot;&amp;gt;&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
	&amp;lt;!-- # 2 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-12391&amp;quot; z=&amp;quot;10982&amp;quot;&amp;gt;&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
	&amp;lt;!-- # 3 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-12529&amp;quot; z=&amp;quot;10941&amp;quot;&amp;gt;&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
	&amp;lt;!-- # 4 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-808&amp;quot; z=&amp;quot;-6067&amp;quot;&amp;gt;&lt;br /&gt;
		player:merchant(&amp;quot;Tracy&amp;quot;);&lt;br /&gt;
		loadPaths(&amp;quot;5-7_bugs_repair_back&amp;quot;);&lt;br /&gt;
   &amp;lt;/waypoint&amp;gt;&lt;br /&gt;
&amp;lt;/waypoints&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
The bot will use the waypoint file '5-7_bugs_repair_back' to find back the way to the original boting place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You now have to insert some code into your boting waypoint file (in this example into the file '5-7_bugs.xml'), to give the bot the information when to repair. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use a Durability Based AutoRepair ==&lt;br /&gt;
&lt;br /&gt;
It could be based on the duration of your items:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!-- #  1 --&amp;gt;&amp;lt;waypoint x=&amp;quot;13752&amp;quot; z=&amp;quot;6726&amp;quot;&amp;gt;&lt;br /&gt;
	if( player.free_flag1 == true ) then &lt;br /&gt;
		player.free_flag1 = false; &lt;br /&gt;
		loadPaths(&amp;quot;5-7_bugs_repair.xml&amp;quot;);&lt;br /&gt;
	end&lt;br /&gt;
	&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you see, we don't check the duration directly in the waypoint file. Simply because the duration is dependent from your armor and by that, dependend from your character. Hence we check the duration in our characters profile and set just a flag, if we should go for repairing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;onLeaveCombat&amp;gt;&lt;br /&gt;
	local dura = inventory:getMainHandDurability();&lt;br /&gt;
	printf(&amp;quot;Durability:%s\n&amp;quot;, dura);&lt;br /&gt;
	if( dura &amp;amp;lt; 90 ) then&lt;br /&gt;
		player.free_flag1 = true;&lt;br /&gt;
	end&lt;br /&gt;
&amp;lt;/onLeaveCombat&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use a Fight Based AutoRepair ==&lt;br /&gt;
&lt;br /&gt;
It could be fight based:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;	&amp;lt;!-- #16 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-12364&amp;quot; z=&amp;quot;10939&amp;quot;&amp;gt;&lt;br /&gt;
	if( player.Fights-player.free_counter1 &amp;gt; 300 ) then&lt;br /&gt;
		player.free_counter1 = player.Fights;&lt;br /&gt;
		load_paths(&amp;quot;5-7_bugs_repair.xml&amp;quot;);&lt;br /&gt;
	end&lt;br /&gt;
	&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use a Time Based AutoRepair ==&lt;br /&gt;
&lt;br /&gt;
Or time based:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;	&amp;lt;!-- #16 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-12364&amp;quot; z=&amp;quot;10939&amp;quot;&amp;gt;&lt;br /&gt;
	if(player.free_counter1 == 0) then player.free_counter1 = os.time(); end;&lt;br /&gt;
	if( os.difftime(os.time(), player.free_counter1) &amp;gt; 3600 ) then&lt;br /&gt;
		player.free_counter1 = os.time();&lt;br /&gt;
		load_paths(&amp;quot;5-7_bugs_repair.xml&amp;quot;);&lt;br /&gt;
	end&lt;br /&gt;
	&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use a Items Based AutoRepair ==&lt;br /&gt;
&lt;br /&gt;
You also can check for an item amount like healing or mana potions. But I would recommend more to use a durability check and by that fill up enough of your potions &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;	&amp;lt;!-- #16 --&amp;gt;&amp;lt;waypoint x=&amp;quot;-12364&amp;quot; z=&amp;quot;10939&amp;quot;&amp;gt;&lt;br /&gt;
	if( 20 &amp;gt; inventory:itemTotalCount(&amp;lt;itemNameOrId&amp;gt;) ) then&lt;br /&gt;
		load_paths(&amp;quot;5-7_bugs_repair.xml&amp;quot;);&lt;br /&gt;
	end&lt;br /&gt;
	&amp;lt;/waypoint&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace &amp;lt;itemNameOrId&amp;gt; with the itemname or item-id of the potions you want to check. Be sure your cached inventory is up to date. See the [http://www.solarstrike.net/wiki/index.php5?title=RoM_Functions#Inventory_and_Item_Functions inventory functions section] for more informatione about that.&lt;br /&gt;
&lt;br /&gt;
== Switch an item ==&lt;br /&gt;
&lt;br /&gt;
Instead of repairing your items, you could also switch a item based on the durabilty:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;onLeaveCombat&amp;gt;&lt;br /&gt;
   local dura = inventory:getMainHandDurability();&lt;br /&gt;
   printf(&amp;quot;Durability:%s\n&amp;quot;, dura);&lt;br /&gt;
   if( dura &amp;amp;lt; 0.9 ) then&lt;br /&gt;
      inventory:useItem(&amp;lt;itemNameOrId&amp;gt;);&lt;br /&gt;
   end&lt;br /&gt;
&amp;lt;/onLeaveCombat&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace '&amp;lt;itemNameOrId&amp;gt;' with the itemname or itemid of the item you want to equipt. You have to be sure that your [http://www.solarstrike.net/wiki/index.php5?title=RoM_Functions#Inventory_and_Item_Functions inventory is up to date], because the funtion 'inventory:useItem(itemNameOrId);' uses the cached inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You also could combine some of that methods.&lt;br /&gt;
&lt;br /&gt;
= Auto Sell at the merchant NPC =&lt;br /&gt;
&lt;br /&gt;
==General Autosell Options==&lt;br /&gt;
&lt;br /&gt;
There are some expert options for your profile if you want to automatically sell items to the merchant NPC.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;option name=&amp;quot;INV_AUTOSELL_ENABLE&amp;quot;	value=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_FROMSLOT&amp;quot;		value=&amp;quot;61&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_TOSLOT&amp;quot;		value=&amp;quot;120&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_QUALITY&amp;quot;		value=&amp;quot;white,green&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_IGNORE&amp;quot;		value=&amp;quot;Pfeil,Elementar, III&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_TYPES&amp;quot;		value=&amp;quot;Weapons,Armor,Recipes,Others&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_TYPES_NOSELL&amp;quot;	value=&amp;quot;Cloth,Cooking&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;padding: 8px;&amp;quot; |&lt;br /&gt;
| style=&amp;quot;width: 200px; border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_ENABLE&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Allows you to enable or disable the Auto Sell function. Valid values are true|false.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_FROMSLOT&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Starting bagslot for autosell. Bag 1 has slots 1-30, bag 2 has slots 31-60, ...&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_TOSLOT&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Ending bagslot for autosell.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_QUALITY&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Enter the item qualities you want to sell. Recommended value is &amp;quot;white, green&amp;quot; ( white | green | blue | purple | orange | gold).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_IGNORE&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Enter items names (or parts of the names) or item-Ids (not parts of the tooltip text !), you don't want to sell. You can enter more than one item. Use commata as delimites.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_TYPES&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Enter the item types you want to sell. You can view a list of the item types in the cache file &amp;quot;cache/itemtypestable.lua&amp;quot; once it has been created. If no types are specified then it will default to selling all.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_TYPES_NOSELL&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Enter the item types you don't want to sell. This overrides the &amp;quot;INV_AUTOSELL_TYPES&amp;quot; option. So if you set INV_AUTOSELL_TYPES = &amp;quot;Armor&amp;quot; and INV_AUTOSELL_TYPES_NOSELL = &amp;quot;Cloth&amp;quot; then it will sell armor but not cloth armor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Use the normal 'player:merchant()' function in your waypoint file to autosale your items. The bagslot are starting from the top left with 1, 2, 3, ... in the first row, 6, 7, 8, ... in the second row, ...&lt;br /&gt;
&lt;br /&gt;
==Check Durability and Stats while using Autosell==&lt;br /&gt;
&lt;br /&gt;
You can also check the durability and/or stats of an item while selling it. We need to read the ingame tooltip to check the durability and the stats. That's at the moment not possible by only using the RoMScript() MACRO function. So we need a little ingame addon. That addon is named 'igf' (ingamefunctions). You found that addon in the bot folder 'rom/devtools/'.&lt;br /&gt;
&lt;br /&gt;
'''Please copy the folder 'ingamefunctions' into your RoM installation into the folder '\Runes of Magic\Interface\AddOns' to install that addon. And restart the RoM games client.&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;option name=&amp;quot;INV_AUTOSELL_NOSELL_DURA&amp;quot;      value=&amp;quot;110&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_STATS_NOSELL&amp;quot;      value=&amp;quot; X,XI&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;option name=&amp;quot;INV_AUTOSELL_STATS_SELL&amp;quot;      value=&amp;quot;IX&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;padding: 8px;&amp;quot; |&lt;br /&gt;
| style=&amp;quot;width: 200px; border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_NOSELL_DURA&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Items with a durability eq or greater that value will not be sold.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_STATS_NOSELL&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | Items with that text strings in the right tooltip side will not be sold. Caution: It's only a very easy check. So that text strings are checked against the whole right side tooltip text. E.g. if you want to save the stat 'defense', also items with 'magical defense' will not be sold. Not only items with the stat 'defense'. Sry for that. If you set the value 'X', all stats with 'X' wouldn't be sold: 'X', 'IX', 'XI'.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | INV_AUTOSELL_STATS_SELL&lt;br /&gt;
| style=&amp;quot;border-bottom:1px dotted #000000;&amp;quot; | By using that items, you could overwrite the 'INV_AUTOSELL_STATS_NOSELL' value. e.g. if you set 'INV_AUTOSELL_STATS_NOSELL'=&amp;quot;X&amp;quot; you would not sell 'IX' stats. But if you know set 'INV_AUTOSELL_STATS_SELL=&amp;quot;IX&amp;quot; you would sell 'IX' stats and save all other stats with 'X'.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Debuging Option for Autosell==&lt;br /&gt;
&lt;br /&gt;
You can use the option:&lt;br /&gt;
 &amp;lt;option name=&amp;quot;DEBUG_AUTOSELL&amp;quot;      value=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
to get some debuging options while using autosell.&lt;/div&gt;</summary>
		<author><name>Wildfire</name></author>	</entry>

	<entry>
		<id>https://solarstrike.net/wiki/index.php?title=Snippets&amp;diff=984</id>
		<title>Snippets</title>
		<link rel="alternate" type="text/html" href="https://solarstrike.net/wiki/index.php?title=Snippets&amp;diff=984"/>
				<updated>2011-08-23T01:22:25Z</updated>
		
		<summary type="html">&lt;p&gt;Wildfire: /* Expirience per Hour */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:'''&lt;br /&gt;
&lt;br /&gt;
Code posted here is considered Public Domain unless otherwise noted. Be aware of this '''before''' posting your code! You may release your code here only under the following licenses: Public Domain, BSD, GPL, or LGPL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Random hash generator ==&lt;br /&gt;
'''random_hash(len)'''&lt;br /&gt;
&lt;br /&gt;
'''random_hash()'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Description: '''&lt;br /&gt;
Generates a random filled hash containing numbers and (capitol) letters. It will generate and return a hash that is 'len' characters long. If 'len' is not specified, then a 32 character hash will be assumed.&lt;br /&gt;
&lt;br /&gt;
'''Purpose: '''&lt;br /&gt;
Random hashes are, often, used in place of passwords. It is considered more secure than storing a reversible hash simply because it cannot be reversed (as it contains no real information). For example, after a successful login, a server might generate a random hash for that specific user. The client (user) will now use the random hash for future authentication instead of the password.&lt;br /&gt;
&lt;br /&gt;
'''License: ''' Public Domain&lt;br /&gt;
&lt;br /&gt;
'''Author: ''' &amp;quot;Elverion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Generates a random hash with the specified length.&lt;br /&gt;
-- If length is less than or equal to zero, or unspecified, 32 bytes will be assumed.&lt;br /&gt;
function random_hash(len)&lt;br /&gt;
  if( len == nil or len &amp;lt;= 0 ) then len = 32; end;&lt;br /&gt;
  local holder = &amp;quot;&amp;quot;; -- a string for holding our hash temporarily&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  -- create an array of all acceptable characters that can be put in our hash.&lt;br /&gt;
  local hash_chars = {&amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot;, &amp;quot;4&amp;quot;, &amp;quot;5&amp;quot;, &amp;quot;6&amp;quot;, &amp;quot;7&amp;quot;, &amp;quot;8&amp;quot;, &amp;quot;9&amp;quot;, &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;E&amp;quot;,&lt;br /&gt;
                &amp;quot;F&amp;quot;, &amp;quot;G&amp;quot;, &amp;quot;H&amp;quot;, &amp;quot;I&amp;quot;, &amp;quot;J&amp;quot;, &amp;quot;K&amp;quot;, &amp;quot;L&amp;quot;, &amp;quot;M&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;O&amp;quot;, &amp;quot;P&amp;quot;, &amp;quot;Q&amp;quot;, &amp;quot;R&amp;quot;, &amp;quot;S&amp;quot;, &amp;quot;T&amp;quot;,&lt;br /&gt;
                &amp;quot;U&amp;quot;, &amp;quot;V&amp;quot;, &amp;quot;W&amp;quot;, &amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;, &amp;quot;Z&amp;quot;};&lt;br /&gt;
&lt;br /&gt;
  for i = 1, len do&lt;br /&gt;
    local index = math.random(1, #hash_chars);&lt;br /&gt;
    holder = holder .. hash_chars[index];&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  return holder;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== memory Write String ==&lt;br /&gt;
'''memoryWriteString(proc, address, msg)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Description: '''&lt;br /&gt;
Enters a string into memory.&lt;br /&gt;
&lt;br /&gt;
'''Purpose: '''&lt;br /&gt;
So strings can be written. Be sure not to write a string that's greater than the strings allocated memory.&lt;br /&gt;
&lt;br /&gt;
'''License: ''' Public Domain&lt;br /&gt;
&lt;br /&gt;
'''Author: ''' &amp;quot;zerosignal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function memoryWriteString(proc, address, msg)&lt;br /&gt;
  local l_msg_len = msg:len()&lt;br /&gt;
  local l_char = nil;&lt;br /&gt;
  for i=0, (l_msg_len-1) do&lt;br /&gt;
    l_char = msg:byte(i)&lt;br /&gt;
    --debug_message(&amp;quot;char: &amp;quot; .. l_char);&lt;br /&gt;
    memoryWriteByte(proc, address + i, l_char)&lt;br /&gt;
  end&lt;br /&gt;
  memoryWriteByte(proc, address + l_msg_len, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Experience per Hour ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Description: '''&lt;br /&gt;
Estimates the total experience in a hour. Can be extended for Gold, Kills or anything else.&lt;br /&gt;
&lt;br /&gt;
'''License: ''' Public Domain&lt;br /&gt;
&lt;br /&gt;
'''Author: ''' &amp;quot;Elverion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local expGained = 0;&lt;br /&gt;
local startTime = os.time();&lt;br /&gt;
local lastAnnounce = os.time();&lt;br /&gt;
&lt;br /&gt;
local lastTotalExp = 0;&lt;br /&gt;
while(true) do&lt;br /&gt;
  local newTotalExp = memoryReadInt(proc, experienceaddr, experience_offset);&lt;br /&gt;
  if( newTotalExp &amp;gt; lastTotalExp ) then&lt;br /&gt;
    expGained = expGained + (newTotalExp - lastTotalExp);&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  -- has 10 seconds elapsed? update the exp/min&lt;br /&gt;
  if( os.difftime(os.time(), lastAnnounce) &amp;gt; 10 ) then&lt;br /&gt;
    local timeElapsed = os.difftime(os.time(), startTime);&lt;br /&gt;
    local expPerMin = 0;&lt;br /&gt;
    if( timeElapsed == 0 ) then timeElapsed = 1; end; -- prevent division by zero&lt;br /&gt;
&lt;br /&gt;
    expPerMin = expGained/(timeElapsed/60.0);&lt;br /&gt;
    lastAnnounce = os.time();&lt;br /&gt;
    printf(&amp;quot;Exp/min: %0.1f\n&amp;quot; expPerMin);&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wildfire</name></author>	</entry>

	<entry>
		<id>https://solarstrike.net/wiki/index.php?title=RoM_Getting_started&amp;diff=983</id>
		<title>RoM Getting started</title>
		<link rel="alternate" type="text/html" href="https://solarstrike.net/wiki/index.php?title=RoM_Getting_started&amp;diff=983"/>
				<updated>2011-08-23T01:17:23Z</updated>
		
		<summary type="html">&lt;p&gt;Wildfire: /* Run */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
MicroMacro 1.0, which you can get [http://www.solarstrike.net/phpBB3/viewtopic.php?f=6&amp;amp;t=177 here]&lt;br /&gt;
&lt;br /&gt;
You will need rom scripts and put them in micromacro/scripts folder. here is how you get them:&lt;br /&gt;
&lt;br /&gt;
http://rom-bot.googlecode.com/svn/trunk/&lt;br /&gt;
&lt;br /&gt;
== Configure RoM in game ==&lt;br /&gt;
In Runes of Magic, hit the 'Escape' button and click 'Interface Options', and be sure to turn on 'Self Cast', 'Click To Move', and 'Auto Loot'.&lt;br /&gt;
&lt;br /&gt;
== Configure the macro ==&lt;br /&gt;
'''Important:''' As of revision 524, this step is no longer necessary. The bot can now create it's own macro in the first free available macro or find a previously setup macro. It will no longer accidentally over-write user macros either. It will also setup the actionbar key, using the user specified macro hotkey if available or the first empty key. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create ingame a empty macro at macro slot 1. You do that by:&lt;br /&gt;
&lt;br /&gt;
Press ESC (System-Menu) -&amp;gt; Macros). Then click at the macro slot 1 at the very up left.&lt;br /&gt;
&lt;br /&gt;
[[Image:macroslot.jpg]]&lt;br /&gt;
&lt;br /&gt;
Press the button 'New' -&amp;gt; 'Save'.&lt;br /&gt;
&lt;br /&gt;
Now move (via Drag&amp;amp;Drop) that empty macro to your action bar button with the defined hotkey from your profile (default key is 0).&lt;br /&gt;
&lt;br /&gt;
Please note that for the bot to be able to target npc's you will have to set the target friendly hotkey to &amp;quot; j &amp;quot;. &lt;br /&gt;
&lt;br /&gt;
'''Tipp to avoid missing keypress:'''&lt;br /&gt;
If your bot works in the background and you do some writings in a foreground window, your keypress of modifiers (CTRL/SHIFT/ALT) in the editor will be the cause that sometimes the RoM client receive a CTRL+0 instead of a keypress 0 (if 0 is your hotkey for the macro). To avoid that, it is recommendet to take a second action button and also assign your dummy macro to that second button. After doing that assign the hotkey CTRL+0 and ALT+0 to that second button. Also assign SHIFT+0 to the key 2 for your main MACRO button 0. By doing that you can avoid the miss of keypresses.&lt;br /&gt;
&lt;br /&gt;
== Make a path ==&lt;br /&gt;
Now you'll need to make a waypoint script. Start MicroMacro and execute the rom/createpath.lua script when prompted. You just walk to each point you want in your waypoint list (try to avoid walking near any trees, fences, steep hills, etc.), and press NUMPAD 1. Once you've made your round (the waypoints should loop back and bring you near the start), press NUMPAD 3. Now type in the name you want to save it as (example: 'boars' would be good enough. Don't include any slashes, and the .xml extension is automatically applied).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  Configure RoM bot ==&lt;br /&gt;
Next you must make a profile. Go to the profile directory and make a copy of Default.xml, but rename it to whatever your character name is. It must be exact, but capitalization shouldn't mater. For the waypoint script option, you will apply the '.xml' extension this time.&lt;br /&gt;
&lt;br /&gt;
To see how to configure your bot, go to [[RoM_Configuration|configuration]]&lt;br /&gt;
&lt;br /&gt;
Heres a video tutorial on configuring your bot. [http://www.youtube.com/watch?v=mUe8g4Eplj4 YouTube link]&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
Run by starting micromacro and typing &lt;br /&gt;
&lt;br /&gt;
      rom/bot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see the bot at full work, create a new character (at best a mage or a priest) at the pioneer village and start the bot with&lt;br /&gt;
&lt;br /&gt;
      rom/bot profile:l1-10&lt;br /&gt;
&lt;br /&gt;
Then choose path '1-10Pi../l1t_start.xml' from the list. That will level you the character from level 1 to 10 and after doing that run to Varanas class hall (best works mage, priest and scout ... in that order). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope this helps! If you see anything i forgot to tell you about, please add it to this wiki page.&lt;/div&gt;</summary>
		<author><name>Wildfire</name></author>	</entry>

	</feed>