Jump to content

Question

Posted

Gia sas exo kani 3ana post gia vote hopzone pou exo problima 8elo ligo help to topzone doulevi alla to hopzone oxi den doulevi ti na kanw ta exo bali ola sosta akoulou8isa auto to topic http://www.maxcheaters.com/topic/188957-vote-manager-npc/help me plz

9 answers to this question

Recommended Posts

  • 0
Posted

kapou to ida k ipan oti dulevi dn ksero dokimaseto

protected static int getVotes()
{
InputStreamReader isr = null;
BufferedReader br = null;

try
{
if(!hopzoneUrl.endsWith(".html"))
hopzoneUrl+=".html";

URLConnection con = new URL(hopzoneUrl).openConnection();


con.addRequestProperty("User-L2Hopzone", "Mozilla/4.76");
isr = new InputStreamReader(con.getInputStream());
br = new BufferedReader(isr);

String line;
while ((line = br.readLine()) != null)
{
if (line.contains("no steal make love")||line.contains("no votes here")||line.contains("bang, you don't have votes")|| line.contains("la vita e bella"))
{
int votes = Integer.valueOf(line.split(">")[2].replace("</span", ""));

return votes;
}
}

br.close();
isr.close();
}
catch (Exception e)
{
System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage());
}
return -1;
}
  • 0
Posted

pou ton bazo auton to code gt den to brisko sto l2votemanagerinstane , L2Pcinstane  , VoteConfig , VoteManager , MonthyResetTask , TriesResetTask , Se pia apo ola?


 

  • 0
Posted

VoteManager

	protected static int getHopZoneVotes()
	{
		int votes = -1;
		String Hopzonelink = Config.VOTE_LINK_HOPZONE;
		InputStreamReader isr = null;
		BufferedReader br = null;
		
		try
		{
			URLConnection con = new URL(Hopzonelink).openConnection();
		-	con.addRequestProperty("User-Agent", "Mozilla/4.76");
                +       con.addRequestProperty("User-L2Hopzone", "Mozilla/4.76");
			isr = new InputStreamReader(con.getInputStream());
			br = new BufferedReader(isr);

try this

  • 0
Posted

 

kapou to ida k ipan oti dulevi dn ksero dokimaseto

protected static int getVotes()
{
InputStreamReader isr = null;
BufferedReader br = null;

try
{
if(!hopzoneUrl.endsWith(".html"))
hopzoneUrl+=".html";

URLConnection con = new URL(hopzoneUrl).openConnection();


con.addRequestProperty("User-L2Hopzone", "Mozilla/4.76");
isr = new InputStreamReader(con.getInputStream());
br = new BufferedReader(isr);

String line;
while ((line = br.readLine()) != null)
{
if (line.contains("no steal make love")||line.contains("no votes here")||line.contains("bang, you don't have votes")|| line.contains("la vita e bella"))
{
int votes = Integer.valueOf(line.split(">")[2].replace("</span", ""));

return votes;
}
}

br.close();
isr.close();
}
catch (Exception e)
{
System.out.println("[VoteRewardManager]: Problem occured while getting Hopzone votes. Error Trace: " + e.getMessage());
}
return -1;
}

εγώ το είχα postarei στου Anarchy, είναι Commit απο l2j-hellas αλλα δουλεύει κανονικά αυτό έχω και εγώ .. και στο αυτόματο Και στον Manager

 

 

 

pou ton bazo auton to code gt den to brisko sto l2votemanagerinstane , L2Pcinstane  , VoteConfig , VoteManager , MonthyResetTask , TriesResetTask , Se pia apo ola?

 

 

 

φίλε εσύ που έχεις πρόβλημα?

  • 0
Posted (edited)

εγώ το είχα postarei στου Anarchy, είναι Commit απο l2j-hellas αλλα δουλεύει κανονικά αυτό έχω και εγώ .. και στο αυτόματο Και στον Manager

 

 

 

φίλε εσύ που έχεις πρόβλημα?

sto hopzone pataw stin vote manager hopzone kai leei exis 60 sec na kanis vote paw kanw vote ston damage pou exo bali alla den kani kato stin vote manager mou leei hopzone kai topzone sto topzone mou leei voted eno sto hopzone mou leei Not Voted oti den exo kani vote ebala tou teox pou mou etsile auton to code alla kai pali den litourgi

 

Edit: na sas stilo ta files na ta dite ? otan pernaw to code tou Anarchy  mou bgazi error edw sto values egw xrisimopio l2jfrozen exo perasi ena code pou exi anebasi o teox  gia vote

 

Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();

                        if (firstPageVotes-currentVotes <= 0)

                        {

Edited by FastCow
  • 0
Posted (edited)

Καλύτερα να το βάλεις στο αγγλικό section, αφού βλέπεις ότι εδώ δεν μπορείς να βρεις λύση..

Καλύτερα για να τελειώσει το πρόβλημά σου, γιατί το έχεις καιρό..

 

Πάντως εδώ πιστεύω πως οφείλεται..

 

con.addRequestProperty("User-Agent", "Mozilla/4.76");

 

Προσπάθησε να το κάνεις όπως το έχει για το topzone. Απλά θα βάλεις για hopzone εσύ.
 

Edited by 'Baggos'
  • 0
Posted

sto hopzone pataw stin vote manager hopzone kai leei exis 60 sec na kanis vote paw kanw vote ston damage pou exo bali alla den kani kato stin vote manager mou leei hopzone kai topzone sto topzone mou leei voted eno sto hopzone mou leei Not Voted oti den exo kani vote ebala tou teox pou mou etsile auton to code alla kai pali den litourgi

 

Edit: na sas stilo ta files na ta dite ? otan pernaw to code tou Anarchy  mou bgazi error edw sto values egw xrisimopio l2jfrozen exo perasi ena code pou exi anebasi o teox  gia vote

 

Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();

                        if (firstPageVotes-currentVotes <= 0)

                        {

 

tote isws ekanes kati lathos, to doulevw egw kai einai ola swsta.

an akoma paleveis steile mou ena private na sto kanw meso tv.

Guest
This topic is now closed to further replies.


×
×
  • Create New...