<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.herc.ws/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.herc.ws/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hemagx</id>
		<title>Hercules Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.herc.ws/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hemagx"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Special:Contributions/Hemagx"/>
		<updated>2026-05-03T14:07:44Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/wiki/Building_HPM_Plugin_for_MSVC</id>
		<title>Building HPM Plugin for MSVC</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Building_HPM_Plugin_for_MSVC"/>
				<updated>2015-12-11T15:25:19Z</updated>
		
		<summary type="html">&lt;p&gt;Hemagx: Put Warning about wrong fix.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Guide =&lt;br /&gt;
This is a guide on how to prepare your MSVC environment for a new [[HPM]] plugin.&lt;br /&gt;
== Installation ==&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
Go to '''src/plugins/''' folder, create a new '''.c''' file, e.g. '''dance.c''' (this name will be used throughout this guide)&lt;br /&gt;
[[File:step1.JPG|center|750px]]&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
Open dance.c and paste this code&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;quot;common/hercules.h&amp;quot; // Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces)&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;quot;common/HPMi.h&amp;quot;&lt;br /&gt;
#include &amp;quot;map/script.h&amp;quot;&lt;br /&gt;
#include &amp;quot;map/pc.h&amp;quot;&lt;br /&gt;
#include &amp;quot;common/HPMDataCheck.h&amp;quot; // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)&lt;br /&gt;
&lt;br /&gt;
HPExport struct hplugin_info pinfo = {&lt;br /&gt;
	&amp;quot;dance&amp;quot;,		// Plugin name&lt;br /&gt;
	SERVER_TYPE_MAP,// Which server types this plugin works with?&lt;br /&gt;
	&amp;quot;0.2&amp;quot;,			// Plugin version&lt;br /&gt;
	HPM_VERSION,	// HPM Version (don't change, macro is automatically updated)&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
ACMD(dance) {&lt;br /&gt;
	if (!message || !*message) {&lt;br /&gt;
		clif-&amp;gt;message(fd, &amp;quot;usage: @dance 1-9&amp;quot;);&lt;br /&gt;
		return -1;&lt;br /&gt;
	}&lt;br /&gt;
	if ( atoi(message) == 1 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 413, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 2 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 414, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 3 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 415, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 4 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 426, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 5 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 458, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 6 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 466, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 7 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 501, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 8 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 540, ALL_CLIENT);&lt;br /&gt;
	} else if ( atoi(message) == 9 ) {&lt;br /&gt;
		clif-&amp;gt;specialeffect(&amp;amp;sd-&amp;gt;bl, 550, ALL_CLIENT);&lt;br /&gt;
	} else {&lt;br /&gt;
		clif-&amp;gt;message(fd, &amp;quot;usage: @dance 1-9&amp;quot;); &lt;br /&gt;
	}&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Server Startup */&lt;br /&gt;
HPExport void plugin_init (void) {&lt;br /&gt;
	addAtcommand(&amp;quot;dance&amp;quot;,dance);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3 ===&lt;br /&gt;
Open your MSVC project (e.g. '''Hercules-10.sln'')&lt;br /&gt;
[[File:step2.JPG|center|750px]]&lt;br /&gt;
=== Step 4 ===&lt;br /&gt;
Go to the '''Solution Explorer'''&lt;br /&gt;
[[File:step3.JPG|center|750px]]&lt;br /&gt;
=== Step 5 ===&lt;br /&gt;
Right click the Hercules project (first item in '''Solution Explorer'''), and click '''Add-&amp;gt;New Project'''&lt;br /&gt;
[[File:step4.JPG|center|750px]]&lt;br /&gt;
=== Step 6 ===&lt;br /&gt;
Select '''General''', and pick '''Empty Project'''.&lt;br /&gt;
[[File:step5.JPG|center|750px]]&lt;br /&gt;
=== Step 7 ===&lt;br /&gt;
Enter the name of your plugin in the '''Name''' field, and click OK.&lt;br /&gt;
=== Step 8 ===&lt;br /&gt;
In the solution explorer it'll display the new project.&lt;br /&gt;
[[File:step6.JPG|center|750px]]&lt;br /&gt;
=== Step 9 ===&lt;br /&gt;
Right click the new project, and open '''Add-&amp;gt;Existing Item'''&lt;br /&gt;
[[File:step7.JPG|center|750px]]&lt;br /&gt;
=== Step 10 ===&lt;br /&gt;
Browse to '''src/plugins/''' and select the '''dance.c''' file, and hit OK.&lt;br /&gt;
[[File:step8.JPG|center|750px]]&lt;br /&gt;
=== Step 11 ===&lt;br /&gt;
It will place the '''dance.c''' file under the '''Source Files''' folder, drag it to the project you created and drop it (in a manner it be placed out of the source files folder.)&lt;br /&gt;
[[File:step9.JPG|center|750px]]&lt;br /&gt;
(It should look like the image below)&lt;br /&gt;
[[File:step10.JPG|center|750px]]&lt;br /&gt;
=== Step 12 ===&lt;br /&gt;
With the '''dance.c''' out of the folders, delete the 3 of them (select the 3, hit delete, hit ok)&lt;br /&gt;
[[File:step11.JPG|center|750px]]&lt;br /&gt;
(It should look like the image below)&lt;br /&gt;
[[File:step12.JPG|center|750px]]&lt;br /&gt;
=== Step 13 ===&lt;br /&gt;
Right click the project you created, open '''Properties'''&lt;br /&gt;
[[File:step13.JPG|center|750px]]&lt;br /&gt;
=== Step 14 ===&lt;br /&gt;
Under '''Configuration Properties''' click '''General''', change '''Output Directory''' to '''..\plugins\''', '''Intermediate Directory''' to '''$(ProjectName)\$(ConfigurationName)\''' and  '''Configuration Type''' to '''Dynamic Library (.dll)'''&lt;br /&gt;
[[File:step14.JPG|center|750px]]&lt;br /&gt;
=== Step 15 ===&lt;br /&gt;
Under '''Configuration Properties''' click '''C/C++''' and open '''General''', change '''Additional Include Directories''' to '''..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)'''&lt;br /&gt;
[[File:step15.JPG|center|750px]]&lt;br /&gt;
=== Step 16 ===&lt;br /&gt;
Under '''Configuration Properties''' click '''Linker''' and open '''General''', change '''Output File''' to '''$(OutDir)\$(ProjectName).dll'''&lt;br /&gt;
[[File:step16.JPG|center|750px]]&lt;br /&gt;
=== Step 17 ===&lt;br /&gt;
Under '''Configuration Properties''' click '''C/C++''' and open '''Preprocessor''', change '''Preprocessor Definitions''' to '''_WINDLL;PCRE_SUPPORT;%(PreprocessorDefinitions)'''&lt;br /&gt;
[[File:step17.jpg|center|750px]]&lt;br /&gt;
=== Step 18 ===&lt;br /&gt;
Add your code to the '''dance.c''' file, and then right-click the project you created, and select '''Build'''&lt;br /&gt;
=== Step 19 ===&lt;br /&gt;
Add it to ''' /conf/plugins.conf'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
plugins_list: [&lt;br /&gt;
	/* Enable HPMHooking when plugins in use rely on Hooking */&lt;br /&gt;
	//&amp;quot;HPMHooking&amp;quot;,&lt;br /&gt;
	//&amp;quot;db2sql&amp;quot;,&lt;br /&gt;
	//&amp;quot;sample&amp;quot;,&lt;br /&gt;
	//&amp;quot;other&amp;quot;,&lt;br /&gt;
	&amp;quot;dance&amp;quot;, // loads dance plugin&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== PCRE_SUPPORT ==&lt;br /&gt;
{{yellbox|The steps described here are a temporary solution. They will no longer be necessary after issue [https://github.com/HerculesWS/Hercules/issues/931 #931] is fixed.}}&lt;br /&gt;
&lt;br /&gt;
Although previously on step-17 has included PCRE_SUPPORT, but it was just to prevent the error message on map-server if the plugin has included npc.h. To properly make use of the PCRE interface, there are 2 additional steps.&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
Under '''Configuration Properties''' click '''Linker''' and open '''Input''', On '''Additional Dependencies''', Add '''pcre.lib;''' at the beginning.&lt;br /&gt;
[[File:Pcre support step1.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
Under '''Configuration Properties''' click '''Linker''' and open '''General''', On '''Additional Library Directory''', Add '''..\3rdparty\pcre\lib;'''&lt;br /&gt;
[[File:Pcre support step2.png|center|750px]]&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
And don't forget to include pcre.h in your plugin&lt;br /&gt;
 #include &amp;quot;../3rdparty/pcre/include/pcre.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
* This guide is probably the worst I've ever written, if you can do better please hit the 'Edit' button, will be most welcome. - Ind&lt;br /&gt;
* I used MSVC 2008 when testing this guide.&lt;br /&gt;
&lt;br /&gt;
= New Note =&lt;br /&gt;
* Sorry for editing this page, I added step by step images for other people to follow so they can easily follow one of the best feature Hercules have, the HPM. - Thanna&lt;br /&gt;
* The tutorial is tested on MSVC 2010.&lt;br /&gt;
* Add additional steps for PCRE_SUPPORT, credit to hemagx for the info, which he claimed that came from Haru&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Hemagx</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Map_Server</id>
		<title>Map Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Map_Server"/>
				<updated>2014-11-26T23:41:29Z</updated>
		
		<summary type="html">&lt;p&gt;Hemagx: Created page with &amp;quot;{{incomplete}}  == Server Overview == Map Server is responsible for Game Play Dynamics.  == Server Tasks == * Running Game Play Dynamics&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
== Server Overview ==&lt;br /&gt;
Map Server is responsible for Game Play Dynamics.&lt;br /&gt;
&lt;br /&gt;
== Server Tasks ==&lt;br /&gt;
* Running Game Play Dynamics&lt;/div&gt;</summary>
		<author><name>Hemagx</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/User:Hemagx</id>
		<title>User:Hemagx</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/User:Hemagx"/>
				<updated>2014-11-26T23:29:44Z</updated>
		
		<summary type="html">&lt;p&gt;Hemagx: Created page with &amp;quot;== Who's Hemagx ? ==  just another neko.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Who's Hemagx ? ==&lt;br /&gt;
&lt;br /&gt;
just another neko.&lt;/div&gt;</summary>
		<author><name>Hemagx</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Inter_Server</id>
		<title>Inter Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Inter_Server"/>
				<updated>2014-11-26T23:23:59Z</updated>
		
		<summary type="html">&lt;p&gt;Hemagx: Redirected page to Character Server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Character Server]]&lt;/div&gt;</summary>
		<author><name>Hemagx</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Character_Server</id>
		<title>Character Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Character_Server"/>
				<updated>2014-11-26T23:19:39Z</updated>
		
		<summary type="html">&lt;p&gt;Hemagx: Created page with &amp;quot;{{incomplete}} == Character Server Overview == Character Server is where users/players go through while Character Select or Making new character. Map Server also use this ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
== Character Server Overview ==&lt;br /&gt;
Character Server is where users/players go through while Character Select or Making new character.&lt;br /&gt;
[[Map Server]] also use this server to handle character data saving and load process.&lt;br /&gt;
Character Server also holding inside it a [[Inter Server]].&lt;br /&gt;
&lt;br /&gt;
== Character Server Tasks ==&lt;br /&gt;
* Process Character Select / Making new Character&lt;br /&gt;
* Load/Save Character Data and send it to Map Server&lt;br /&gt;
* Load/Save Character and Account based variables&lt;br /&gt;
&lt;br /&gt;
== Inter Server Overview ==&lt;br /&gt;
Inter Server is made to sync between all [[Map Server|Map servers]], in case you're using [[Multi Zone]] System it will take care of sync all your servers.&lt;br /&gt;
&lt;br /&gt;
== Inter Server Tasks ==&lt;br /&gt;
* Taking Care of Sync between all Map Servers&lt;/div&gt;</summary>
		<author><name>Hemagx</name></author>	</entry>

	<entry>
		<id>https://wiki.herc.ws/wiki/Login_Server</id>
		<title>Login Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/wiki/Login_Server"/>
				<updated>2014-11-26T22:50:22Z</updated>
		
		<summary type="html">&lt;p&gt;Hemagx: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Server Overview ==&lt;br /&gt;
Login Server is where the users/players go right after pressing enter in the login screen of the client. During the process of logging in, username and password fields from the login table of hercules schema will be compared with the username and password inputted by the client. Once verified, the player will proceed to the [[Character Server]].&lt;br /&gt;
&lt;br /&gt;
== Server Tasks ==&lt;br /&gt;
&lt;br /&gt;
* Process user login&lt;br /&gt;
* Load/Save global accounts variables&lt;br /&gt;
* Load/Save accounts information&lt;br /&gt;
* Block/Unblock accounts&lt;br /&gt;
&lt;br /&gt;
[[Category:Hercules]]&lt;/div&gt;</summary>
		<author><name>Hemagx</name></author>	</entry>

	</feed>