Skip to content

Instantly share code, notes, and snippets.

View mrtopf's full-sized avatar

Christian Scholz mrtopf

View GitHub Profile
@mrtopf
mrtopf / entworldmac
Created June 29, 2015 09:20
How to run EntWorld on Mac with MultiMC
Here is what you have to do:
1. Install MultiMC (https://multimc.org/)
2. Click Accounts in top right corner and add your MC account
3. Add a new instance (first icon), select Minecraft 1.7.10
4. Click on "Edit instance" after selecting your new instance
5. Click "Install Forge" and select 1448
6. Close the edit window
7. Open the Instance Folder ("Instance Folder" on the right)
8. Open the minecraft/ folder
@mrtopf
mrtopf / bot1.py
Last active April 24, 2016 08:38
Test-Script für den Messenger-Bot-Server
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/testbot', methods=["GET"])
def confirm():
return 'Hello World!'
if __name__ == '__main__':
@mrtopf
mrtopf / bot2.py
Created April 25, 2016 15:35
Ein Messenger-Bot, der die Webhook-Challenge erfüllt.
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/testbot', methods=["GET"])
def confirm():
if request.args['hub.verify_token'] == "cd7czs87czds8chsiuh9eh3k3bcjhdbjhb":
return request.args['hub.challenge']
return 'Hello World!'
@mrtopf
mrtopf / gist:9c2220729a7b7cff683f290597470cff
Created April 25, 2016 15:56
Eine Nachricht an den Bot
{'entry': [{'id': 1779681335651753,
'messaging': [{'message': {'mid': 'mid.1461599731432:95a28608b48b993283',
'seq': 6,
'text': 'Hallo Bot!'},
'recipient': {'id': 1779681335651753},
'sender': {'id': 875317532580370},
'timestamp': 1461599731441}],
'time': 1461599731622}],
'object': 'page'}
@mrtopf
mrtopf / testmessage.js
Created April 25, 2016 16:23
Bot-Antwort an den Nutzer
{
'message': {
'text': 'Toll, Du hast folgendes gesagt: Hallo'
},
'recipient': {
'id': 875317532580370
}
}
@mrtopf
mrtopf / bot3.py
Last active April 27, 2016 09:28
from flask import Flask
from flask import request
import requests
import json
PAGE_TOKEN="please use your own token here"
app = Flask(__name__)
@app.route('/testbot', methods=["GET"])
@mrtopf
mrtopf / send_image.py
Created April 27, 2016 09:26
Die send_image()-Funktion für den Messenger-Bot
def send_image(recipient_id, image_url):
"""send an image to a recipient"""
recipient = { 'id' : recipient_id }
# create an image object
image = { 'url' : image_url }
# add the image object to an attachment of type "image"
attachment = {
@mrtopf
mrtopf / handle_messages.py
Created April 27, 2016 09:39
handle_messages mit Versand eines Bildes
def handle_messages(data):
"""handle all incoming messages"""
messaging_events = data['entry'][0]['messaging']
for event in messaging_events:
sender_id = event['sender']['id']
# check if we actually have some input
if "message" in event and event['message'].get("text","") != "":
text = event['message']['text']
# send a simple text reply
[{
u 'postback': {
u 'payload': u 'my postback string'
},
u 'recipient': {
u 'id': 129283210520070
},
u 'sender': {
u 'id': 1049549878444680
},
@mrtopf
mrtopf / gist:ecd6843b00042388397fc17f9592640b
Created October 10, 2016 12:42
Crash with DungeonTactics and OreExcavation
---- Minecraft Crash Report ----
WARNING: coremods are present:
LoadingPlugin (Quark-r1.0-56.jar)
SHLoadingPlugin (ScalingHealth-1.9.4-0.2.5-24.jar)
LoadingPlugin (RandomThings-MC1.10.2-3.7.6.jar)
AppleCore (AppleCore-mc1.10.2-2.0.1.jar)
MalisisCorePlugin (malisiscore-1.10.2-4.2.5.jar)
IvToolkit (IvToolkit-1.2.8.5.jar)
BookshelfLoadingPlugin (Bookshelf-1.10.2-1.4.2.327.jar)