Jump to content

Hey Guys Need help asap on this javascript

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
12 replies to this topic

#1
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
okay so me and my crew found a bug os this famous game called happy harvest its like a brazilian version of farmville and the bug we found they fixed so now we are tryin to find away to make this script exchange iteams with out check the points we have avaible if u guys could help out we would apreciate tkz and adv

//++++++++++++++核心函数+++++++++++++++++++++
//函数名称:makePOSTRequest
//参数描述:
//			obj:回调函数名称
//			mod:对象[与服务器端接口对应]
//			act:方法[与服务器端接口对应]
//			data:需要传输的参数
//
//函数描述:回调函数负责操作UI;
//++++++++++++++++++++++++++++++++++++++++++
function makePOSTRequest(obj,mod,act,data) {
	var params = {};
	var postdata = {};
	postdata.mod = mod;
	postdata.act = act;
	postdata.sig_user = $("#user_id").attr("value");
	
	for(var key in data){
    	eval('postdata.'+key+' = "'+data[key]+'";');
	}
	params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
	params[gadgets.io.RequestParameters.POST_DATA] = gadgets.io.encodeValues(postdata);
	params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
	params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;
	var url = 'http://happyfarm.mentez.com/myfarm/orkut/index.php?randnum='+ Math.random();
//	if(obj == "userinit"){
//		gadgets.io.makeRequest(url, eval('response'+obj), params);
//	}else{
//		gadgets.io.makeRequest(url, eval('response'), params);
//	}

	gadgets.io.makeRequest(url, eval((obj =='invite' || obj == 'userinit')?mod+"_"+act:"response"), params);
};
function farm_index(obj){
	if(obj.data == "OK"){
		//初始化页面
		$("#body_content").html(obj.data);
	}else{
		$("#body_content").html(obj.data);
	}
	data = {};
	makePOSTRequest('','farm','flash',data);
}
function response(obj){
	$("#content").html(obj.data);
	gadgets.window.adjustHeight();
};

function invite_adduser(obj)
{
	
}
function sendInvite(){
	  var params = [];
	  var recipient = 'OWNER_FRIENDS';
	  var messageTitle="Colheita Feliz";
	  var messageBody="Convide seus amigos! Com mais amigos você aumenta suas chances de ganhar experiência e dinheiro!<br>http://www.orkut.com/Main#Application.aspx?appId=999787414856";
	  params[opensocial.Message.Field.TITLE] = messageTitle;
	  var message = opensocial.newMessage(messageBody, params);
	  opensocial.requestSendMessage(recipient, message, function(response2) {

	  var getData = response2.getData();
	  var invited_users = getData['recipientIds'];
	  var data = {};
	  data.selectUser = invited_users;
	  makePOSTRequest('invite','invite','adduser',data);
	  });
	 };
 function exchange_credit(radioGroup){
			gadgets.window.adjustHeight();
			var getData=radioGroup.value.split("_");
			var data = {};
			data.item_id = getData[0];
			data.credit_minus = getData[1];
			if(!confirm("Você confirma a troca? Custará "+getData[1]+"  pontos")){
			return false;
			}
			
			gadgets.window.adjustHeight();
			var loadingWindow="<img src='http://opensocial.xinggeq.com/quiz/trunk/static/img/loading.gif'/><br>Trocando........";
			$("#exchange_result").html(loadingWindow);
			document.getElementById('exchange_result').style.display='';
			var userCurrentCredit = document.getElementById('hidden_credit_value').value;

		    if(parseInt(getData[1])>parseInt(userCurrentCredit))
		    {
		   $("#exchange_result").html("<br><font style=\"color:red\">Desculpe, você não tem pontos suficientes</font>");
		    	return;
		    }
			gadgets.window.adjustHeight();
			makePOSTRequest('invite','invite','exchange',data);
   }
  function invite_exchange(obj){
	 
		var getData2=obj.data.split("__");
		$("#current_credit").html(getData2['1']);
		$("#exchange_result").html(getData2['0']);
		gadgets.window.adjustHeight();
	}
  function christmas_index(obj) {
		response(obj);
	}
	function christmas_exchange(obj) {
		$("#christmasExchangeResult").html(obj.data);
	}

Edited by WingedPanther, 15 January 2010 - 08:30 AM.
add code tags (the # button)


#2
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
the games in on a social site called orkut www.orkut.com

the old bug worked this way u changed the value of the iteam to 0 using firebug and it would pop out a box asking are you sure you want to exchange the iteam for 0 points from the points you have avaible and it would exchange without a problem even if u had no points to exchange since u changed the value of how many point it would take away from of what we had but now when u try to exchage the iteam some how now before it exchange it double checks the mount of points u have avaible and if im not mistaking that change they did should be on this script i posted here any help would be nice tkz

i will post the other scripts the game use after i get some replys reguarding this script

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
So you want help cheating? Why?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#4
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
well I already have all i needed on the game
from this point is not even wanting to cheat on the game its beeing able to bring the bug back in other words a challenge that almost seems imposible

i just though i would get help from u guys i looked around on the site and it seemed really good and if what im trying to get helped with is against any of the rules here im sorry tkz

#5
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
CAnt believe no one can help me

#6
DarkLordoftheMonkeys

DarkLordoftheMonkeys

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 255 posts

LuiDaHottest said:

CAnt believe no one can help me

Some of us don't like reading through 50+ lines of uncommented code.
Life's too short to be cool. Be a nerd.

#7
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts

DarkLordoftheMonkeys said:

Some of us don't like reading through 50+ lines of uncommented code.

at least tkz for the reply ill go look for help somewhere else i though this was a forum to help others not make cricts tkz thoug

#8
tate

tate

    Learning Programmer

  • Members
  • PipPipPip
  • 90 posts
my guess is that it would be in this line

Quote

data.credit_minus = getData[1];
in the exchange credit function. just a guess though
twas brillig

#9
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
well i edit the script but now the problem is when i change the original url of the external script with the one i edit it still uses the original script so im guessin on the page theres a hidden script that checks the links value to make sure its the original link any sugestion?? and i really apreciated your reply tate

#10
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
and here a link to the tutorial how the old bug worked before


YouTube - Colheita feliz bug do lv ;) BY:Erik Rox e Renato Rox

#11
tate

tate

    Learning Programmer

  • Members
  • PipPipPip
  • 90 posts
You should be able to look at most of the javascript files. I honestly don't have any experience in javascript (or internet programming in general) so i don't know how it would check for a link value but you can usually get access to all the javascript files if you look at the page source. I wish i could help more but i can only understand the stuff in javascript that is similar to java.
twas brillig

#12
LuiDaHottest

LuiDaHottest

    Newbie

  • Members
  • PipPip
  • 20 posts
alright but thanks anyway just wish other people here could give me a light on this but thank you u for stoping by and trying to help