Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Hey Guys Need help asap on this javascript

  1. #1
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Hey Guys Need help asap on this javascript

    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

    Code:
    //++++++++++++++核心函数+++++++++++++++++++++
    //函数名称: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);
    	}
    Last edited by WingedPanther; 01-15-2010 at 08:30 AM. Reason: add code tags (the # button)

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Hey Guys Need help asap on this javascript

    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

  4. #3
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Hey Guys Need help asap on this javascript

    So you want help cheating? Why?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  5. #4
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Hey Guys Need help asap on this javascript

    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

  6. #5
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Hey Guys Need help asap on this javascript

    CAnt believe no one can help me

  7. #6
    DarkLordoftheMonkeys's Avatar
    DarkLordoftheMonkeys is offline Programming Professional
    Join Date
    Oct 2009
    Location
    Massachussets
    Posts
    255
    Blog Entries
    56
    Rep Power
    11

    Re: Hey Guys Need help asap on this javascript

    Quote Originally Posted by LuiDaHottest View Post
    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.

  8. #7
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Hey Guys Need help asap on this javascript

    Quote Originally Posted by DarkLordoftheMonkeys View Post
    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

  9. #8
    tate's Avatar
    tate is offline Learning Programmer
    Join Date
    Dec 2009
    Location
    A desert in Idaho
    Posts
    86
    Rep Power
    8

    Re: Hey Guys Need help asap on this javascript

    my guess is that it would be in this line
    data.credit_minus = getData[1];
    in the exchange credit function. just a guess though
    twas brillig

  10. #9
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Hey Guys Need help asap on this javascript

    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

  11. #10
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Hey Guys Need help asap on this javascript

    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

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need Help ASAP
    By chad in forum PHP Development
    Replies: 9
    Last Post: 04-09-2010, 07:27 AM
  2. Help with JavaScript ASAP
    By Anicho in forum JavaScript and CSS
    Replies: 9
    Last Post: 12-13-2009, 05:32 AM
  3. help ASAP pls...
    By mdeenny in forum C and C++
    Replies: 2
    Last Post: 10-29-2009, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts