Регистрация Главная Сообщество
Сообщения за день Справка Регистрация

Zombot (Клиент для игры Зомби ферма) [Обсуждение]

-

Свободное обсуждение

- Ваши идеи, вопросы и ответы на тему браузерных игр и социальных сетей

Ответ
 
Опции темы
Старый 10.01.2014, 17:46   #736
 Разведчик
Аватар для HotBlood
 
HotBlood никому не известный тип
Регистрация: 19.07.2012
Сообщений: 13
Популярность: 10
Сказал(а) спасибо: 1
Поблагодарили 4 раз(а) в 4 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

хм у меня бот работает нормально
  Ответить с цитированием
Старый 10.01.2014, 19:43   #737
 Разведчик
Аватар для xxxXANxxx
 
xxxXANxxx никому не известный тип
Регистрация: 30.07.2013
Сообщений: 1
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

так а что в писать что бы звездочки с подковами вишнями в стандартном боте собирал при вырубке растений на острове зимнем кто что не будь с этой проблемой делал ?

Добавлено через 4 минуты
выложите бот со встроенными торговцами, что я не делал впихивая код с торговцами у меня видимо руки снизу растут, не работает

Последний раз редактировалось xxxXANxxx; 10.01.2014 в 19:47. Причина: Добавлено сообщение
  Ответить с цитированием
Старый 10.01.2014, 20:22   #738
Заблокирован
 Разведчик
Аватар для Cheater84
 
Cheater84 неизвестен в этих краях
Регистрация: 27.08.2013
Сообщений: 2
Популярность: -54
Сказал(а) спасибо: 5
Поблагодарили 15 раз(а) в 14 сообщениях
 
Exclamation Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Vhyrix вот API для FACEBOOK
PHP код:
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

"""Python client library for the Facebook Platform.

This client library is designed to support the Graph API and the
official Facebook JavaScript SDK, which is the canonical way to
implement Facebook authentication. Read more about the Graph API at
http://developers.facebook.com/docs/api. You can download the Facebook
JavaScript SDK at http://github.com/facebook/connect-js/.

If your application is using Google AppEngine's webapp framework, your
usage of this module might look like this:

user = facebook.get_user_from_cookie(self.request.cookies, key, secret)
if user:
    graph = facebook.GraphAPI(user["
access_token"])
    profile = graph.get_object("
me")
    friends = graph.get_connections("
me", "friends")

"""

import cgi
import time
import urllib
import urllib2
import httplib
import hashlib
import hmac
import base64
import logging
import socket

# Find a JSON parser
try:
    
import simplejson as json
except ImportError
:
    try:
        
from django.utils import simplejson as json
    except ImportError
:
        
import json
_parse_json 
json.loads

# Find a query string parser
try:
    
from urlparse import parse_qs
except ImportError
:
    
from cgi import parse_qs


class GraphAPI(object):
    
"""A client for the Facebook Graph API.

    See http://developers.facebook.com/docs/api for complete
    documentation for the API.

    The Graph API is made up of the objects in Facebook (e.g., people,
    pages, events, photos) and the connections between them (e.g.,
    friends, photo tags, and event RSVPs). This client provides access
    to those primitive types in a generic way. For example, given an
    OAuth access token, this will fetch the profile of the active user
    and the list of the user's friends:

       graph = facebook.GraphAPI(access_token)
       user = graph.get_object("
me")
       friends = graph.get_connections(user["
id"], "friends")

    You can see a list of all of the objects and connections supported
    by the API at http://developers.facebook.com/docs/reference/api/.

    You can obtain an access token via OAuth or by using the Facebook
    JavaScript SDK. See
    http://developers.facebook.com/docs/authentication/ for details.

    If you are using the JavaScript SDK, you can use the
    get_user_from_cookie() method below to get the OAuth access token
    for the active user from the cookie saved by the SDK.

    """
    
def __init__(selfaccess_token=Nonetimeout=None):
        
self.access_token access_token
        self
.timeout timeout

    def get_object
(selfid, **args):
        
"""Fetchs the given object from the graph."""
        
return self.request(idargs)

    
def get_objects(selfids, **args):
        
"""Fetchs all of the given object from the graph.

        We return a map from ID to object. If any of the IDs are
        invalid, we raise an exception.
        """
        
args["ids"] = ",".join(ids)
        return 
self.request(""args)

    
def get_connections(selfidconnection_name, **args):
        
"""Fetchs the connections for given object."""
        
return self.request(id "/" connection_nameargs)

    
def put_object(selfparent_objectconnection_name, **data):
        
"""Writes the given object to the graph, connected to the given parent.

        For example,

            graph.put_object("
me", "feed", message="Helloworld")

        writes "
Helloworld" to the active user's wall. Likewise, this
        will comment on a the first post of the active user's feed:

            feed = graph.get_connections("
me", "feed")
            post = feed["
data"][0]
            graph.put_object(post["
id"], "comments", message="First!")

        See http://developers.facebook.com/docs/api#publishing for all
        of the supported writeable objects.

        Certain write operations require extended permissions. For
        example, publishing to a user's feed requires the
        "
publish_actions" permission. See
        http://developers.facebook.com/docs/publishing/ for details
        about publishing permissions.

        """
        
assert self.access_token"Write operations require an access token"
        
return self.request(parent_object "/" connection_name,
                            
post_args=data)

    
def put_wall_post(selfmessageattachment={}, profile_id="me"):
        
"""Writes a wall post to the given profile's wall.

        We default to writing to the authenticated user's wall if no
        profile_id is specified.

        attachment adds a structured attachment to the status message
        being posted to the Wall. It should be a dictionary of the form:

            {"
name": "Link name"
             "
link": "http://www.example.com/",
             
"caption""{*actor*} posted a new review",
             
"description""This is a longer description of the attachment",
             
"picture""http://www.example.com/thumbnail.jpg"}

        
"""
        return self.put_object(profile_id, "
feed", message=message,
                               **attachment)

    def put_comment(self, object_id, message):
        """
Writes the given comment on the given post."""
        return self.put_object(object_id, "
comments", message=message)

    def put_like(self, object_id):
        """
Likes the given post."""
        return self.put_object(object_id, "
likes")

    def delete_object(self, id):
        """
Deletes the object with the given ID from the graph."""
        self.request(id, post_args={"
method": "delete"})

    def delete_request(self, user_id, request_id):
        """
Deletes the Request with the given ID for the given user."""
        conn = httplib.HTTPSConnection('graph.facebook.com')

        url = '/%s_%s?%s' % (
            request_id,
            user_id,
            urllib.urlencode({'access_token': self.access_token}),
        )
        conn.request('DELETE', url)
        response = conn.getresponse()
        data = response.read()

        response = _parse_json(data)
        # Raise an error if we got one, but don't not if Facebook just
        # gave us a Bool value
        if (response and isinstance(response, dict) and response.get("
error")):
            raise GraphAPIError(response)

        conn.close()

    def put_photo(self, image, message=None, album_id=None, **kwargs):
        """
Uploads an image using multipart/form-data.

        
image=File like object for the image
        message
=Caption for your image
        album_id
=None posts to /me/photos which uses or creates and uses
        an album 
for your application.

        
"""
        object_id = album_id or "
me"
        #it would have been nice to reuse self.request;
        #but multipart is messy in urllib
        post_args = {
            'access_token': self.access_token,
            'source': image,
            'message': message,
        }
        post_args.update(kwargs)
        content_type, body = self._encode_multipart_form(post_args)
        req = urllib2.Request(("
https://graph.facebook.com/%s/photos" %
                               
object_id),
                              
data=body)
        
req.add_header('Content-Type'content_type)
        try:
            
data urllib2.urlopen(req).read()
        
#For Python 3 use this:
        #except urllib2.HTTPError as e:
        
except urllib2.HTTPErrore:
            
data e.read()  # Facebook sends OAuth errors as 400, and urllib2
                             # throws an exception, we want a GraphAPIError
        
try:
            
response _parse_json(data)
            
# Raise an error if we got one, but don't not if Facebook just
            # gave us a Bool value
            
if (response and isinstance(responsedict) and
                    
response.get("error")):
                
raise GraphAPIError(response)
        
except ValueError:
            
response data

        
return response

    
# based on: http://code.activestate.com/recipes/146306/
    
def _encode_multipart_form(selffields):
        
"""Encode files as 'multipart/form-data'.

        Fields are a dict of form name-> value. For files, value should
        be a file object. Other file-like objects might work and a fake
        name will be chosen.

        Returns (content_type, body) ready for httplib.HTTP instance.

        """
        
BOUNDARY '----------ThIs_Is_tHe_bouNdaRY_$'
        
CRLF '\r\n'
        
= []
        for (
keyvaluein fields.items():
            
logging.debug("Encoding %s, (%s)%s" % (keytype(value), value))
            if 
not value:
                continue
            
L.append('--' BOUNDARY)
            if 
hasattr(value'read') and callable(value.read):
                
filename getattr(value'name''%s.jpg' key)
                
L.append(('Content-Disposition: form-data;'
                          'name="%s";'
                          'filename="%s"'
) % (keyfilename))
                
L.append('Content-Type: image/jpeg')
                
value value.read()
                
logging.debug(type(value))
            else:
                
L.append('Content-Disposition: form-data; name="%s"' key)
            
L.append('')
            if 
isinstance(valueunicode):
                
logging.debug("Convert to ascii")
                
value value.encode('ascii')
            
L.append(value)
        
L.append('--' BOUNDARY '--')
        
L.append('')
        
body CRLF.join(L)
        
content_type 'multipart/form-data; boundary=%s' BOUNDARY
        
return content_typebody

    def request
(selfpathargs=Nonepost_args=None):
        
"""Fetches the given path in the Graph API.

        We translate args to a valid query string. If post_args is
        given, we send a POST request to the given path with the given
        arguments.

        """
        
args args or {}

        if 
self.access_token:
            if 
post_args is not None:
                
post_args["access_token"] = self.access_token
            
else:
                
args["access_token"] = self.access_token
        post_data 
None if post_args is None else urllib.urlencode(post_args)
        try:
            
file urllib2.urlopen("https://graph.facebook.com/" path "?" +
                                   
urllib.urlencode(args),
                                   
post_datatimeout=self.timeout)
        
except urllib2.HTTPErrore:
            
response _parse_json(e.read())
            
raise GraphAPIError(response)
        
except TypeError:
            
# Timeout support for Python <2.6
            
if self.timeout:
                
socket.setdefaulttimeout(self.timeout)
            
file urllib2.urlopen("https://graph.facebook.com/" path "?" +
                                   
urllib.urlencode(args), post_data)
        try:
            
fileInfo file.info()
            if 
fileInfo.maintype == 'text':
                
response _parse_json(file.read())
            
elif fileInfo.maintype == 'image':
                
mimetype fileInfo['content-type']
                
response = {
                    
"data"file.read(),
                    
"mime-type"mimetype,
                    
"url"file.url,
                }
            else:
                
raise GraphAPIError('Maintype was not text or image')
        finally:
            
file.close()
        if 
response and isinstance(responsedict) and response.get("error"):
            
raise GraphAPIError(response["error"]["type"],
                                
response["error"]["message"])
        return 
response

    def fql
(selfqueryargs=Nonepost_args=None):
        
"""FQL query.

        Example query: "
SELECT affiliations FROM user WHERE uid me()"

        """
        
args args or {}
        if 
self.access_token:
            if 
post_args is not None:
                
post_args["access_token"] = self.access_token
            
else:
                
args["access_token"] = self.access_token
        post_data 
None if post_args is None else urllib.urlencode(post_args)

        
args["q"] = query
        args
["format"] = "json"

        
try:
            
file urllib2.urlopen("https://graph.facebook.com/fql?" +
                                   
urllib.urlencode(args),
                                   
post_datatimeout=self.timeout)
        
except TypeError:
            
# Timeout support for Python <2.6
            
if self.timeout:
                
socket.setdefaulttimeout(self.timeout)
            
file urllib2.urlopen("https://graph.facebook.com/fql?" +
                                   
urllib.urlencode(args),
                                   
post_data)

        try:
            
content file.read()
            
response _parse_json(content)
            
#Return a list if success, return a dictionary if failed
            
if type(responseis dict and "error_code" in response:
                
raise GraphAPIError(response)
        
except Exceptione:
            
raise e
        
finally:
            
file.close()

        return 
response

    def extend_access_token
(selfapp_idapp_secret):
        
"""
        Extends the expiration time of a valid OAuth access token. See
        <https://developers.facebook.com/roadmap/offline-access-removal/
        #extend_token>

        """
        
args = {
            
"client_id"app_id,
            
"client_secret"app_secret,
            
"grant_type""fb_exchange_token",
            
"fb_exchange_token"self.access_token,
        }
        
response urllib2.urlopen("https://graph.facebook.com/oauth/"
                                   "access_token?" 
+
                                   
urllib.urlencode(args)).read()
        
query_str parse_qs(response)
        if 
"access_token" in query_str:
            
result = {"access_token"query_str["access_token"][0]}
            if 
"expires" in query_str:
                
result["expires"] = query_str["expires"][0]
            return 
result
        
else:
            
response json.loads(response)
            
raise GraphAPIError(response)


class 
GraphAPIError(Exception):
    
def __init__(selfresult):
        
#Exception.__init__(self, message)
        #self.type = type
        
self.result result
        
try:
            
self.type result["error_code"]
        
except:
            
self.type ""

        
# OAuth 2.0 Draft 10
        
try:
            
self.message result["error_description"]
        
except:
            
# OAuth 2.0 Draft 00
            
try:
                
self.message result["error"]["message"]
            
except:
                
# REST server style
                
try:
                    
self.message result["error_msg"]
                
except:
                    
self.message result

        Exception
.__init__(selfself.message)


def get_user_from_cookie(cookiesapp_idapp_secret):
    
"""Parses the cookie set by the official Facebook JavaScript SDK.

    cookies should be a dictionary-like object mapping cookie names to
    cookie values.

    If the user is logged in via Facebook, we return a dictionary with
    the keys "
uid" and "access_token". The former is the user's
    Facebook ID, and the latter can be used to make authenticated
    requests to the Graph API. If the user is not logged in, we
    return None.

    Download the official Facebook JavaScript SDK at
    http://github.com/facebook/connect-js/. Read more about Facebook
    authentication at
    http://developers.facebook.com/docs/authentication/.

    """
    
cookie cookies.get("fbsr_" app_id"")
    if 
not cookie:
        return 
None
    parsed_request 
parse_signed_request(cookieapp_secret)
    if 
not parsed_request:
        return 
None
    
try:
        
result get_access_token_from_code(parsed_request["code"], "",
                                            
app_idapp_secret)
    
except GraphAPIError:
        return 
None
    result
["uid"] = parsed_request["user_id"]
    return 
result


def parse_signed_request
(signed_requestapp_secret):
    
""" Return dictionary with signed request data.

    We return a dictionary containing the information in the
    signed_request. This includes a user_id if the user has authorised
    your application, as well as any information requested.

    If the signed_request is malformed or corrupted, False is returned.

    """
    
try:
        
encoded_sigpayload map(strsigned_request.split('.'1))

        
sig base64.urlsafe_b64decode(encoded_sig "=" *
                                       ((
len(encoded_sig) % 4) % 4))
        
data base64.urlsafe_b64decode(payload "=" *
                                        ((
len(payload) % 4) % 4))
    
except IndexError:
        
# Signed request was malformed.
        
return False
    except TypeError
:
        
# Signed request had a corrupted payload.
        
return False

    data 
_parse_json(data)
    if 
data.get('algorithm''').upper() != 'HMAC-SHA256':
        return 
False

    
# HMAC can only handle ascii (byte) strings
    # http://bugs.python.org/issue5285
    
app_secret app_secret.encode('ascii')
    
payload payload.encode('ascii')

    
expected_sig hmac.new(app_secret,
                            
msg=payload,
                            
digestmod=hashlib.sha256).digest()
    if 
sig != expected_sig:
        return 
False

    
return data


def auth_url
(app_idcanvas_urlperms=None, **kwargs):
    
url "https://www.facebook.com/dialog/oauth?"
    
kvps = {'client_id'app_id'redirect_uri'canvas_url}
    if 
perms:
        
kvps['scope'] = ",".join(perms)
    
kvps.update(kwargs)
    return 
url urllib.urlencode(kvps)

def get_access_token_from_code(coderedirect_uriapp_idapp_secret):
    
"""Get an access token from the "code" returned from an OAuth dialog.

    Returns a dict containing the user-specific access token and its
    expiration date (if applicable).

    """
    
args = {
        
"code"code,
        
"redirect_uri"redirect_uri,
        
"client_id"app_id,
        
"client_secret"app_secret,
    }
    
# We would use GraphAPI.request() here, except for that the fact
    # that the response is a key-value pair, and not JSON.
    
response urllib2.urlopen("https://graph.facebook.com/oauth/access_token" +
                               
"?" urllib.urlencode(args)).read()
    
query_str parse_qs(response)
    if 
"access_token" in query_str:
        
result = {"access_token"query_str["access_token"][0]}
        if 
"expires" in query_str:
            
result["expires"] = query_str["expires"][0]
        return 
result
    
else:
        
response json.loads(response)
        
raise GraphAPIError(response)


def get_app_access_token(app_idapp_secret):
    
"""Get the access_token for the app.

    This token can be used for insights and creating test users.

    app_id = retrieved from the developer page
    app_secret = retrieved from the developer page

    Returns the application access_token.

    """
    
# Get an app access token
    
args = {'grant_type''client_credentials',
            
'client_id'app_id,
            
'client_secret'app_secret}

    
file urllib2.urlopen("https://graph.facebook.com/oauth/access_token?" +
                           
urllib.urlencode(args))

    try:
        
result file.read().split("=")[1]
    finally:
        
file.close()

    return 
result 
  Ответить с цитированием
Старый 10.01.2014, 20:32   #739
 Разведчик
Аватар для eTorres
 
eTorres никому не известный тип
Регистрация: 20.04.2012
Сообщений: 4
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 10 раз(а) в 5 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

polkowoy, на майле приходит ответ с ошибкой

'The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
Found'

Последний раз редактировалось eTorres; 10.01.2014 в 20:41.
  Ответить с цитированием
Старый 10.01.2014, 20:42   #740
 Разведчик
Аватар для polkowoy
 
polkowoy никому не известный тип
Регистрация: 03.11.2011
Сообщений: 0
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Цитата:
Сообщение от eTorresПосмотреть сообщение
polkowoy, на майле приходит ответ сервера с кодом - 302. Нужен дополнительный редирект по ссылке в заголовке location. А он не происходит (

это конечно класс!
но вот я с питоном ну вообще никак ( печалька)
если не трудно подскажи что и куда дописать

Добавлено через 3 минуты
да в консоли посмотрел сервер отвечает - "user id not valid"

Добавлено через 5 минут
vhyrix - да в консоли посмотрел сервер отвечает - "user id not valid"
останавливал и в ручную запускал раз 15 подряд - без результатно

Последний раз редактировалось polkowoy; 10.01.2014 в 20:47. Причина: Добавлено сообщение
  Ответить с цитированием
Старый 10.01.2014, 21:20   #741
Заблокирован
 Разведчик
Аватар для Cheater84
 
Cheater84 неизвестен в этих краях
Регистрация: 27.08.2013
Сообщений: 2
Популярность: -54
Сказал(а) спасибо: 5
Поблагодарили 15 раз(а) в 14 сообщениях
 
Exclamation Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Vhyrix еще вопрос,где можно исправить что бы писал не просто CR_06,а именно то что подобрал и что подарил...вобщем название по-русски..?
  Ответить с цитированием
Старый 10.01.2014, 21:58   #742
 Разведчик
Аватар для eTorres
 
eTorres никому не известный тип
Регистрация: 20.04.2012
Сообщений: 4
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 10 раз(а) в 5 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

polkowoy, не знаю, не могу помочь, знаю что дело в какой то мелочи, но ... не знаю в какой. Нюансы подключения к различным сайтам мне не известны (
  Ответить с цитированием
Старый 10.01.2014, 22:03   #743
 Разведчик
Аватар для polkowoy
 
polkowoy никому не известный тип
Регистрация: 03.11.2011
Сообщений: 0
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Цитата:
Сообщение от eTorresПосмотреть сообщение
polkowoy, не знаю, не могу помочь, знаю что дело в какой то мелочи, но ... не знаю в какой. Нюансы подключения к различным сайтам мне не известны (

Очень жаль, а ведь счастье было совсем рядом.
Буду ждать может кто найдет решение проблемки для бота на маиле.
  Ответить с цитированием
Старый 11.01.2014, 15:37   #744
 Разведчик
Аватар для mcing
 
mcing никому не известный тип
Регистрация: 13.10.2009
Сообщений: 0
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Цитата:
Сообщение от xxxXANxxxПосмотреть сообщение

Добавлено через 4 минуты
выложите бот со встроенными торговцами, что я не делал впихивая код с торговцами у меня видимо руки снизу растут, не работает

Вот держи, тип файла измени на .py и замени
Вложения
Тип файла: txt workers.txt (11.1 Кб, 36 просмотров)
  Ответить с цитированием
Старый 11.01.2014, 16:25   #745
 Разведчик
Аватар для Kipari40
 
Kipari40 никому не известный тип
Регистрация: 25.05.2013
Сообщений: 0
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
Отправить сообщение для Kipari40 с помощью Skype™
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Ребят кто Ответит ,Код для Сильвера есть?

P.S. Если таков имеется можете помочь поставить его в бот вот мой vk [Ссылки могут видеть только зарегистрированные пользователи. ]
Заранее спасибо
  Ответить с цитированием
Старый 11.01.2014, 16:36   #746
Заблокирован
 Разведчик
Аватар для Cheater84
 
Cheater84 неизвестен в этих краях
Регистрация: 27.08.2013
Сообщений: 2
Популярность: -54
Сказал(а) спасибо: 5
Поблагодарили 15 раз(а) в 14 сообщениях
 
Exclamation Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Vhyrix может подумаем как для острова сокровищ написать скриптик и для Северного полюса?кстати было бы не плохо еще и для копке кладов у друзей накалякать))))сейчас бот в ОК сидит,кстати как я заметил он вроде подарочки не отсылает на ОК друзьям...но это не суть важно)
  Ответить с цитированием
Старый 11.01.2014, 17:10   #747
 Разведчик
Аватар для mike4kz
 
mike4kz никому не известный тип
Регистрация: 23.08.2013
Сообщений: 1
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 2 раз(а) в 2 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Цитата:
Сообщение от Cheater84Посмотреть сообщение
Vhyrix может подумаем как для острова сокровищ написать скриптик и для Северного полюса?

А в чем проблема с Северным Полюсом? Я выкусил из версии, которая тут пробегала chop.py, и он отлично все рубит. Естественно, в game_state.py закоментировал ChangeLocation (и остальное, что не надо, например посев и т.д.). Но все вырубает. Единственное, что сделал дополнительно - если я не капитан, то чтобы не забивать трюм ерудной (варежками и шишками), рублю не более трех-четырех ударов за раз. Теоретически хотелось бы еще сортировать объекты "по направлению" (чтобы "двигаться в одном направлении"), но до таких сортировок DICT я пока не додумался.

PS. Я сделал разные директории для разных целей. Один "бот" для пиратских островов, другой бот для "повседневной жизни", еще бот с запретом ходить по островам. Так мне проще, чем каждый раз редактировать файлы.

Последний раз редактировалось mike4kz; 11.01.2014 в 17:12.
  Ответить с цитированием
Старый 11.01.2014, 17:26   #748
 Разведчик
Аватар для xxxXANxxx
 
xxxXANxxx никому не известный тип
Регистрация: 30.07.2013
Сообщений: 1
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

спасибо, но не работает ошибки по вылазили 5, 79, потом в воркере 3 в гейм енджи где прописать новый воркер
  Ответить с цитированием
Старый 11.01.2014, 18:03   #749
 Разведчик
Аватар для vhyrix
 
vhyrix никому не известный тип
Регистрация: 09.11.2013
Сообщений: 2
Популярность: 10
Сказал(а) спасибо: 0
Поблагодарили 9 раз(а) в 8 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Cheater84, и что мне с этим апи делать? Его понимать замучаешься. )

Знатно подолбался, но фейсбук сделал. [Ссылки могут видеть только зарегистрированные пользователи. ] Вроде работает.


polkowoy, а игра не запущена? Складывается ощущение, что на mail работает как-то по другому и выдает эту ошибку вместо того, чтобы выкинуть предыдущего.

Cheater84, чтобы писал названия в лог файл? Можно сделать так:

/scripts/get_log.msl
PHP код:
<?

// $log <- log data
// print(); write to log

// $log - $act, $type, $time and data;


if($log['act']=='game_start') print("------------
"
);

if(
$log['act']=='plant_start' && $log['type']=='event') return ;

// print data
print(date("[d.m.y H:i:s] "$log['time']));


if(
$log['act']=='send_free_gift'){
$info=zfn_storage_id($log['data']['item']);
print(
"Послан бесплатный подарок {$info['name']} пользователю {$log['data']['user']}.");
return ;
}

// print type and action
print(substr($log['type'], 01));
print(
":".$log['act'].' ');


if(
$log['act']=='test'){
    print(
"Test key:{$log['data']['test']}.");

}else

//print data
if($log['act']=='game_start');
else if(
$log['act']=='game_stop');
else if(
$log['act']=='ping1');
else if(
$log['act']=='ping2');
else 
print_r($log['data']);

// autoprint \r\n


?>
Здесь добавлена проверка на send_free_gift и вывод нужного сообщения. Вот в таком духе можно выводить в логах все, что угодно. Скрипты очень похожи на php и работают почти так же.

Друзья грузятся только для вконтакта. С остальными сетями вопросы с апи. И теперь можно записать в конфиг список друзей и не мучиться с апи.

Со скритпами, нужна последовательность действий. У меня нет этих островов и я совсем не в курсе, что там и как. Игрок ведь на них должен застревать? То есть нельзя просто так шататься домой и снова туда? И что он должен там делать? Видел видео, видно, что каждые 5 минут надо крутить рулетку и по возможности прорубаться в глубь острова. Нужна информация, сделать не проблема.
  Ответить с цитированием
Старый 11.01.2014, 18:23   #750
 Пехотинец
Аватар для vintets
 
vintets скоро будет известенvintets скоро будет известенvintets скоро будет известен
Регистрация: 01.08.2012
Сообщений: 95
Популярность: 255
Сказал(а) спасибо: 28
Поблагодарили 54 раз(а) в 38 сообщениях
 
По умолчанию Re: Zombot (Клиент для игры Зомби ферма) [Обсуждение]

Цитата:
Сообщение от mike4kzПосмотреть сообщение
...
PS. Я сделал разные директории для разных целей. Один "бот" для пиратских островов, другой бот для "повседневной жизни", еще бот с запретом ходить по островам. Так мне проще, чем каждый раз редактировать файлы.

Видать нас много таких...
Всё сделано точно так же. Обычный и остальные к имени которых дописано: 'не ходит', 'пират'. Ещё один специально для 'слабых' фейков. Для запуска их пачками без хождений и варений.

И все эти три магнитофона, три портсигара... даже четыре, стоят из за чертового майла.

Последний раз редактировалось vintets; 11.01.2014 в 18:45.
  Ответить с цитированием
Ответ


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
[Программа] Zombot (Клиент для игры Зомби ферма) AnonProger Баги игр ВКонтакте 189 26.08.2014 15:50
[Статья] Небольшие секреты игры зомби ферма haussuper Баги игр ВКонтакте 11 26.01.2013 10:54
[Информация] Зомби Ферма dekirillov Баги игр ВКонтакте 40 22.10.2011 18:25

Заявление об ответственности / Список мошенников

Часовой пояс GMT +4, время: 17:42.

Пишите нам: [email protected]
Copyright © 2024 vBulletin Solutions, Inc.
Translate: zCarot. Webdesign by DevArt (Fox)
G-gaMe! Team production | Since 2008
Hosted by GShost.net