Skip to content

Commit

Permalink
Initial release thing
Browse files Browse the repository at this point in the history
  • Loading branch information
notmika committed Sep 10, 2016
1 parent b3759f1 commit 54683c5
Show file tree
Hide file tree
Showing 13 changed files with 699 additions and 0 deletions.
22 changes: 22 additions & 0 deletions TeleportSS.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeleportSS", "TeleportSS\TeleportSS.csproj", "{064BDE87-D8A6-4FCF-9A83-CFFA35177467}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{064BDE87-D8A6-4FCF-9A83-CFFA35177467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{064BDE87-D8A6-4FCF-9A83-CFFA35177467}.Debug|Any CPU.Build.0 = Debug|Any CPU
{064BDE87-D8A6-4FCF-9A83-CFFA35177467}.Release|Any CPU.ActiveCfg = Release|Any CPU
{064BDE87-D8A6-4FCF-9A83-CFFA35177467}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions TeleportSS/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
66 changes: 66 additions & 0 deletions TeleportSS/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions TeleportSS/Form1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sulakore.Communication;
using Tangine;
using Sulakore.Modules;

namespace TeleportSS
{
[Module("Wardrobe Deluxe", "To the moon and further!")]
[GitHub("notmika", "WardrobeDeluxe")]
[Author("Mika", HabboName = "96", Hotel = Sulakore.Habbo.HHotel.Nl, ResourceName = "Follow on Twitter", ResourceUrl = "https://twitter.com/Metoniem")]
public partial class Form1 : ExtensionForm
{
public ushort PlacePet { get; set; }
public ushort Walk { get; set; }
public ushort MovePet { get; set; }
public ushort MountPet { get; set; }
public int PetId { get; set; }
public Random Randomizer = new Random();

public Form1()
{
InitializeComponent();

PlacePet = Game.GetMessageHeaders("d7eadc2163756ff7b1dfb130f493d7a4")[0];
Walk = Game.GetMessageHeaders("5dec6a7881d4a598d5b15d0e743bcdcb")[0];
MovePet = Game.GetMessageHeaders("68563ba310531af2a2c256663e0d2524")[0];
MountPet = Game.GetMessageHeaders("ea8690d440d59e281e545eac19306aa2")[0];

Triggers.OutAttach(PlacePet, PetPlaced);
}

private void PetPlaced(DataInterceptedEventArgs obj)
{
PetId = obj.Packet.ReadInteger();

obj.Packet.ReadInteger();
obj.Packet.ReadInteger();

Triggers.OutAttach(MountPet, PetMounted);
Triggers.OutDetach(obj.Packet.Header);
InfoLbl.Text = "Please mount (ride) the horse..";
}

private void PetMounted(DataInterceptedEventArgs obj)
{
int id = obj.Packet.ReadInteger();
if (id == PetId && obj.Packet.ReadBoolean())
{
Triggers.OutAttach(Walk, Walked);
Triggers.OutDetach(obj.Packet.Header);
InfoLbl.Text = "Click anywhere to teleport!";
}
}

private async void Walked(DataInterceptedEventArgs obj)
{
int x = obj.Packet.ReadInteger();
int y = obj.Packet.ReadInteger();

await Connection.SendToServerAsync(MovePet, PetId, x, y, Randomizer.Next(0, 8));
obj.IsBlocked = true;
}
}
}
145 changes: 145 additions & 0 deletions TeleportSS/Form1.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA
AAD///8B////AQAAACkAAAB3AAAAIf///wH///8B////AQAAAHdKR0b1HBsbiQAAABn///8B////Af//
/wH///8B////Af///wEAAABVK015/xcwU/MEDyCTDAsLb0dDQu+TjIr/mZKS/8/JyP9zcG/xKikpiwAA
ACP///8B////Af///wH///8BAAAAVTRXhP83X5f/L1SI/0hVaf90cXD/e3l3/5iRkv/c1tX/2NLR/52Z
mP8AAABV////Af///wH///8B////AQAAAFU0V4T/OWCY/zlgmP9PXnX/i4iG/2lpZ/+Ujo//3NbV/9jS
0f+sqKf/AAAAVf///wH///8B////Af///wEAAABVNFeE/zlgmP85YJj/P09l/5GPjP9/fXz/lpCQ/9zW
1f/Y0tH/rKin/wAAAFX///8B////Af///wH///8BAAAAVTRXhP85YJj/OWCY/z9PZf+Rj4z/f318/5aQ
kP/c1tX/2NLR/6yop/8AAABV////Af///wH///8B////AQAAAFU0V4T/OWCY/zlgmP8/T2X/kY+M/399
fP+WkJD/3NbV/9jS0f+sqKf/AAAAVf///wH///8B////Af///wEAAABVNFeE/zlgmP85YJj/P09l/5GP
jP9/fXz/lpCQ/9zW1f/Y0tH/rKin/wAAAFX///8B////Af///wH///8BAAAAVTRXhP85YJj/OWCY/z9P
Zf+Rj4z/f318/5aQkP/c1tX/2NLR/6yop/8AAABV////Af///wH///8B////AQAAAFU0V4T/OWCY/zlg
mP8/T2X/kY+M/399fP+WkJD/3NbV/9jS0f+sqKf/AAAAVf///wH///8B////Af///wEAAABVNFeE/zlg
mP83Xpb/Okph/5GPjP94d3b/lpCQ/9zW1f/Y0tH/rKin/wAAAFX///8B////Af///wH///8BAAAAPxkq
P80yVYH/O2Wd/2Z0i/94dHT/RkVG/4WBgf/Y0tH/2NLR/6yop/8AAABV////Af///wH///8B////Af//
/wEAAAATCRAYXxsuRdMlNEf/UlBR/6ulpP/l397/493c/9nT0v+sqKf/AAAAVf///wH///8B////Af//
/wH///8B////Af///wEAAAANExISu+Lb2v/u6un/8O3s//Lv7v/w7Ov/o5+f/wAAAFX///8B////Af//
/wH///8B////Af///wH///8B////ARgYGEdpZ2fv3NnY/+7r6v/f3dz/f3198S4uLYsAAAAj////Af//
/wH///8B////Af///wH///8B////Af///wH///8B////AQAAAHdsamr1GxsaiQAAABn///8B////Af//
/wH///8BAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA
//8AAP//AAD//w==
</value>
</data>
</root>
22 changes: 22 additions & 0 deletions TeleportSS/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TeleportSS
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
36 changes: 36 additions & 0 deletions TeleportSS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Wardrobe Deluxe")]
[assembly: AssemblyDescription("Serverside teleporting, to the moon and further!")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mika")]
[assembly: AssemblyProduct("Wardrobe Deluxe")]
[assembly: AssemblyCopyright("Copyright © Sulakore (Mika) 2016")]
[assembly: AssemblyTrademark("Mika")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("064bde87-d8a6-4fcf-9a83-cffa35177467")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 54683c5

Please sign in to comment.