1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with Amfphp

Discussion in 'General Programming Chat' started by trey5333, Feb 25, 2014.

  1. trey5333

    trey5333 Newbie

    Joined:
    Feb 18, 2014
    Messages:
    1
    Likes Received:
    0
    I have this code its an exploit for a neopoint gen can you help me get it working in amfphp?

    def dobattleexploit(self):
    print "My exploits bring all the nerds to the source"


    #As3 code:
    # var _loc_3:Object = {};
    # _loc_3.p3s = vectorToArray(this.boardComponents.mapDataVO.p3s);
    # _loc_3.structures = vectorToArray(this.boardComponents.mapDataVO.struc tures);
    # _loc_3.gems = vectorToArray(this.boardComponents.mapDataVO.gems) ;
    # _loc_3.eggs = vectorToArray(this.boardComponents.mapDataVO.eggs) ;
    # _loc_3.boosters = vectorToArray(this.boardComponents.mapDataVO.boost ers);
    # _loc_3.resources = vectorToArray(this.boardComponents.mapDataVO.resou rceTiles);
    # _loc_3.decorations = vectorToArray(this.boardComponents.mapDataVO.decor ations);
    # _loc_3.pesttraps = vectorToArray(this.boardComponents.mapDataVO.pestT raps);
    # this._gameBoardProxy.updateSceneAfterPestAttack(_l oc_3);
    #:As3 code END




    self.PestService = self.amfgetservice("PestService")
    print "start battle function"
    if self.resp3['player']['underPestAttack']== True:
    print "Battle found , so sending packet"
    outarray = [{'p3s':'' , 'structures':''}]
    outp3s = {}
    outstructures = []
    outgems = []
    outeggs = []
    outboosters=[]
    outresources = []
    outdecorations = []
    outtrap=[]


    outlist1 = []
    for x in self.itemcollection:
    #outarray["p3s"] = "tesT"
    if (x['sceneItemType'] == "Character"):
    outlist1 = outlist1 + [x]
    if (x['sceneItemType'] == "Structure"):
    outstructures = outstructures + [x]
    if (x['sceneItemType'] == "Gem"):
    outgems = outgems + [x]
    if (x['sceneItemType'] == "Egg"):
    outeggs = outeggs + [x]
    if (x['sceneItemType'] == "Decoration"):
    outdecorations = outdecorations + [x]
    if (x['sceneItemType'] == "Booster"):
    outboosters = outboosters + [x]
    if (x['sceneItemType'] == "Resource"):
    outresources = outresources + [x]
    if (x['sceneItemType'] == "PestTrap"):
    outtrap = outtrap + [x]

    outarray[0].update({'p3s': outp3s,'structures': outstructures ,'structures': outstructures ,'gems': outgems ,'eggs': outeggs ,'boosters': outboosters ,'resources': outresources,'decorations': outdecorations,'pesttraps': outtrap})


    #myArray = names[ ('test','test2','test2') ]
    outp3s ={'p3s': [outlist1]}
    outlist = outp3s["p3s"] #the list of p3s from the packet
    #for x in outp3s:
    # print x
    p3list = []
    #print str(outlist)

    p3list2 = outlist[0]

    for Y in p3list2:
    print Y

    #print p3list
    #self.PestService.updateSceneAfterPestAttack(p3lis t2[0])