Jump to content

Jack's Pest Control


Jack's Pest Control  

38 members have voted

  1. 1. How much should I charge?

    • One time payment $5
    • One time payment $10
    • One time payment $15
    • Recurring payment $5 per month


Recommended Posts

Posted (edited)

 

Will it World hop, like look for the world the majority of clan members are in then hop to that specific world? I would pay much more if this was supported

I can look into this, but the clan chat interfaces and not in the api

Read the interface data from the clan members, array the worlds all the members are in. Using a map find the most common number in the array and hop to that world.

Something like this.

 

public int getCommonWorld(int[] a)
{
int count = 1, tempCount;
int world = a[0];
int temp = 0;
for (int i = 0; i < (a.length - 1); i++)
{
temp = a[i];
tempCount = 0;
for (int j = 1; j < a.length; j++)
{
if (temp == a[j])
tempCount++;
}
if (tempCount > count)
{
world = temp;
count = tempCount;
}
}
return world;
}
Edited by Th3
Posted

Will it World hop, like look for the world the majority of clan members are in then hop to that specific world? I would pay much more if this was supported

I can look into this, but the clan chat interfaces and not in the api
Read the interface data from the clan members, array the worlds all the members are in. Using a map find the most common number in the array and hop to that world.

Something like this.

public int getCommonWorld(int[] a){int count = 1, tempCount;int world = a[0];int temp = 0;for (int i = 0; i < (a.length - 1); i++){temp = a[i];tempCount = 0;for (int j = 1; j < a.length; j++){if (temp == a[j])tempCount++;}if (tempCount > count){world = temp;count = tempCount;}}return world;}

im good with the advanced java part, its just reading the world from the interfaces that im having trouble with.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...