Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[ANY] Steambot


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7179
  • Lokalizacja:AMXX.PL
Offline

Napisano 12.10.2015 13:35

<div><div align="center"><img src="http://puu.sh/kHuY8/73f4c20c3d.png"border="0" alt="" /><br /><u><i><b><font color="Red">If you find password / username / personal infos, please, remove them and contact me ! I'm pretty sure I left some...</font></b></i></u><br /></div><font size="6"><font color="#2E64FE">Description :</font><br /></font><br /><i>God... Another steambot ? Really ?</i><br />Yeah, but wait, there is more ! This one provide a simple interface but complete (okay, well, not yet, still in version 1.0) through TCP messages. So, the bot warn in <b>REAL-TIME</b> when something happen, as exemple : When someone finsih a trade with him ! You might want to give a close look at the &quot;Features&quot; section !<br /><br />But before continuing I would like to say this :<br />This bot is been made by Jessecar96 and I slighty modified it to provide such small features (like trades end handling and a speak module, I want to add more in the futur, but I need time). Also this bot is made in <font color="Lime"><font size="4"><b>C#</b></font></font>, so, Mac (heheehhe) and Linux (sorry D;) can already quit. <b>Except</b> if you find a way to run it on Wine or something else.<br /><br />Also it's a pre-release, many people pushed me to publish this as fast as possible. So, don't except a lot of features <b>YET</b>. But, the things who are already implemented are working fine :D !<br /><br /><i>So, why the f. should I use that thing ?</i><br />Because like I said 84134803214 times above, this thing have a (simple, okay ?) interface, where you can handle the trades, etc... to create things on your server, so now. Let's said I would like to display a nice message each time someone has finished to trade with the bot, well, you can, take a look at the template plugin (availables in the downloads.)<br /><br /><font size="6"><font color="#2E64FE">Commands:</font><br /></font><br /><i>No commands</i><br /><i>No Cvar</i><br />What did you excepted ? It's a steambot !<br /><br /><font size="6"><font color="#2E64FE">Installation :</font><br /></font><br />1) Download the zip archive (The sources are included inside, also the compilled binaries)<br />2) Go to &quot;<b>SteamBot_ArkarrSteamBotInterfacebinDebug</b>&quot; and edit <b>Serttings.json</b> with your favorite text editor.<br />3) Start the bot by double-clicking on the <b>SteamBotInterface.exe</b> executable file.<br />4) ???<br />5) Enjoy !<br /><br /><font size="6"><font color="#2E64FE">What I plan to do ?</font></font><br />- a hudge list of features. I don't want to write them down now, will take me all the after-noon.<br /><br /><font size="6"><font color="#2E64FE">Request :</font><br /></font><br />None for the moment... feel free to ask !<br /><br /><font size="6"><font color="#2E64FE">Screenshots</font><br /></font><br /><img src="http://puu.sh/kHuhY/5ab56d88f9.PNG" border="0" alt="" /><br /><br /><font size="6"><font color="#2E64FE">Template</font><br /></font><br /><br /><i>Template ?</i> Yeah, this is how you 'speak' with the bot, he send you event, and you handle them, actually, there is only 1 event you can handle, when a trade finish.<br /><br /><b>TRADEOFFER_ENDED</b> - Called when someone finish (confirm through his emails) the trade offer.<br />Exemple :<br /><b>TRADEOFFER_ENDED|5000|5000|5001/5002|STEAM_0:1:XXXXXXX</b><br />those numbers (5000, 5001, etc...) are item definition index. For exemple, here, it's scarp, reclaimed and raffined metal who are traded. The left part is the items that the BOT will have and on the right, it's the items that the USER will have.<br /><br />Here is a template about how to create, and communicate with the bot.<br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">#include&nbsp;&lt;sourcemod&gt;<br />#include&nbsp;&lt;sdktools&gt;<br />#include&nbsp;&lt;socket&gt;<br /><br />#define&nbsp;PLUGIN_AUTHOR&nbsp;"Arkarr"<br />#define&nbsp;PLUGIN_VERSION&nbsp;"1.00"<br /><br /></span><span style="color: #0000BB">Handle&nbsp;clientSocket</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">Handle&nbsp;CVAR_SteambotServerIP</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">Handle&nbsp;CVAR_SteambotServerPort</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">Handle&nbsp;CVAR_SteambotTCPPassword</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">Handle&nbsp;TimerReconnect</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">char&nbsp;steambotIP</span><span style="color: #007700">[</span><span style="color: #0000BB">100</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">char&nbsp;steambotPort</span><span style="color: #007700">[</span><span style="color: #0000BB">10</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">char&nbsp;steambotPassword</span><span style="color: #007700">[</span><span style="color: #0000BB">25</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">bool&nbsp;connected</span><span style="color: #007700">;<br /><br />public&nbsp;</span><span style="color: #0000BB">Plugin&nbsp;myinfo&nbsp;</span><span style="color: #007700">=&nbsp;<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"[ANY]&nbsp;TCP&nbsp;connection&nbsp;to&nbsp;Steambot"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">author&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">PLUGIN_AUTHOR</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">description&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"A&nbsp;template&nbsp;to&nbsp;create&nbsp;a&nbsp;simple&nbsp;TCP&nbsp;connection&nbsp;with&nbsp;the&nbsp;steambot"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">version&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">PLUGIN_VERSION</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://www.sourcemod.net"<br /></span><span style="color: #007700">};<br /><br />public&nbsp;</span><span style="color: #0000BB">void&nbsp;OnPluginStart</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CVAR_SteambotServerIP&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">CreateConVar</span><span style="color: #007700">(</span><span style="color: #DD0000">"sm_steambot_server_ip"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"XXX.XXX.XXX.XXX"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"The&nbsp;ip&nbsp;of&nbsp;the&nbsp;server&nbsp;where&nbsp;the&nbsp;steambot&nbsp;is&nbsp;hosted."</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CVAR_SteambotServerPort&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">CreateConVar</span><span style="color: #007700">(</span><span style="color: #DD0000">"sm_steambot_server_port"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"11000"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"The&nbsp;port&nbsp;of&nbsp;the&nbsp;server&nbsp;where&nbsp;the&nbsp;steambot&nbsp;is&nbsp;hosted,&nbsp;WATCH&nbsp;OUT&nbsp;!&nbsp;In&nbsp;version&nbsp;1.0&nbsp;of&nbsp;the&nbsp;bot,&nbsp;the&nbsp;port&nbsp;is&nbsp;hardcoded&nbsp;and&nbsp;is&nbsp;11000&nbsp;!!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CVAR_SteambotTCPPassword&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">CreateConVar</span><span style="color: #007700">(</span><span style="color: #DD0000">"sm_steambot_tcp_password"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Pa</span><span style="color: #0000BB">$Sw0Rd</span><span style="color: #DD0000">"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"The&nbsp;password&nbsp;to&nbsp;allow&nbsp;TCP&nbsp;data&nbsp;to&nbsp;be&nbsp;read&nbsp;/&nbsp;send&nbsp;(TCPPassword&nbsp;in&nbsp;settings.json)"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AutoExecConfig</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Steambot_TEMPLATE"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetConVarString</span><span style="color: #007700">(</span><span style="color: #0000BB">CVAR_SteambotServerIP</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotIP</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">steambotIP</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetConVarString</span><span style="color: #007700">(</span><span style="color: #0000BB">CVAR_SteambotServerPort</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotPort</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">steambotPort</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetConVarString</span><span style="color: #007700">(</span><span style="color: #0000BB">CVAR_SteambotTCPPassword</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotPassword</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">steambotPassword</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AttemptSteamBotConnection</span><span style="color: #007700">();<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">void&nbsp;AttemptSteamBotConnection</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">connected&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">clientSocket&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">SocketCreate</span><span style="color: #007700">(</span><span style="color: #0000BB">SOCKET_TCP</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">OnClientSocketError</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"Attempt&nbsp;to&nbsp;connect&nbsp;to&nbsp;%s:%i&nbsp;..."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotIP</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">StringToInt</span><span style="color: #007700">(</span><span style="color: #0000BB">steambotPort</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SocketConnect</span><span style="color: #007700">(</span><span style="color: #0000BB">clientSocket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">OnClientSocketConnected</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">OnChildSocketReceive</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">OnChildSocketDisconnected</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotIP</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">StringToInt</span><span style="color: #007700">(</span><span style="color: #0000BB">steambotPort</span><span style="color: #007700">));<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">OnClientSocketConnected</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle&nbsp;socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">any&nbsp;arg</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&nbsp;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We&nbsp;NEED&nbsp;to&nbsp;send&nbsp;the&nbsp;data&nbsp;'REQUEST_CONNECTION'&nbsp;ONCE&nbsp;and&nbsp;AT&nbsp;THE&nbsp;FIRST&nbsp;CONNECTION&nbsp;so&nbsp;the&nbsp;steambot&nbsp;register&nbsp;us&nbsp;in&nbsp;his&nbsp;client&nbsp;list.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br />&nbsp;&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"&gt;&gt;&gt;&nbsp;CONNECTED&nbsp;!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">char&nbsp;data</span><span style="color: #007700">[</span><span style="color: #0000BB">200</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Format</span><span style="color: #007700">(</span><span style="color: #0000BB">data</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">data</span><span style="color: #007700">),&nbsp;</span><span style="color: #DD0000">"%sREQUEST_CONNECTION"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotPassword</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SocketSend</span><span style="color: #007700">(</span><span style="color: #0000BB">clientSocket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">data</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">data</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Destroying&nbsp;the&nbsp;reconnect&nbsp;timer&nbsp;on&nbsp;failure&nbsp;:<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">TimerReconnect&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">INVALID_HANDLE</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">KillTimer</span><span style="color: #007700">(</span><span style="color: #0000BB">TimerReconnect</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TimerReconnect&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">INVALID_HANDLE</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">OnClientSocketError</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle&nbsp;socket</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">int&nbsp;errorType</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">int&nbsp;errorNum</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">any&nbsp;ary</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">connected&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//Client&nbsp;NOT&nbsp;connected&nbsp;anymore,&nbsp;this&nbsp;is&nbsp;very&nbsp;important.<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">LogError</span><span style="color: #007700">(</span><span style="color: #DD0000">"socket&nbsp;error&nbsp;%d&nbsp;(errno&nbsp;%d)"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">errorType</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">errorNum</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CloseHandle</span><span style="color: #007700">(</span><span style="color: #0000BB">socket</span><span style="color: #007700">);<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">OnChildSocketReceive</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle&nbsp;socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">char</span><span style="color: #007700">[]&nbsp;</span><span style="color: #0000BB">receiveData</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">int&nbsp;dataSize</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">any&nbsp;hFile</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Data&nbsp;received&nbsp;by&nbsp;the&nbsp;bot,&nbsp;warning,&nbsp;password&nbsp;included&nbsp;(pretty&nbsp;dumb&nbsp;?)&nbsp;!<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ReplaceString</span><span style="color: #007700">(</span><span style="color: #0000BB">receiveData</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">dataSize</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">steambotPassword</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Password&nbsp;removed,&nbsp;priting&nbsp;the&nbsp;message&nbsp;:<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"&gt;&gt;&gt;&nbsp;%s"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">receiveData</span><span style="color: #007700">);<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">OnChildSocketDisconnected</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle&nbsp;socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">any&nbsp;hFile</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Connection&nbsp;to&nbsp;steam&nbsp;bot&nbsp;lost&nbsp;!<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"&gt;&gt;&gt;&nbsp;DISCONNECTED&nbsp;!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">connected&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CloseHandle</span><span style="color: #007700">(</span><span style="color: #0000BB">socket</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TimerReconnect&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">CreateTimer</span><span style="color: #007700">(</span><span style="color: #0000BB">10.0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TMR_TryReconnection</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">_</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TIMER_REPEAT</span><span style="color: #007700">);<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">Action&nbsp;TMR_TryReconnection</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle&nbsp;timer</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">any&nbsp;none</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AttemptSteamBotConnection</span><span style="color: #007700">();<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div><font size="6"><font color="#2E64FE">Download</font><br /></font><br /><br /><a href="http://tf2serverofar...Bot_Arkarr.zip"target="_blank">The ZIP archive (contain the compilled binaries as well.)</a><br /><a href="http://tf2serverofarkarr.no-ip.biz/arkarrbox/data/Steambot/TEMPLATE_TCPSBConnection.sp" target="_blank">The exemple template, same code as above</a><br /><br /><b>Logs </b> :<br /><b>1.0</b> : First public release.</div>

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych