Jump to content

wongerlt

Members
  • Posts

    535
  • Credits

  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Community Answers

  1. wongerlt's post in MariaDb No connection was marked as the answer   
    I think i found where is problem.
     
    // with this i get errors (No connection available within the specified time (option 'connectTimeout': 30,000 ms)
    private void updateDatabase() { try { Connection con = ConnectionPool.getConnection(); PreparedStatement stm = con.prepareStatement("DELETE FROM dungeon"); stm.executeUpdate(); }catch (Exception e) { e.printStackTrace(); } } // with this no errors
    private void updateDatabase() { try(Connection con = ConnectionPool.getConnection()) { PreparedStatement stm = con.prepareStatement("DELETE FROM dungeon"); stm.executeUpdate(); }catch (Exception e) { e.printStackTrace(); } }  
    who can explain why? 😄
  2. wongerlt's post in Html button with a message was marked as the answer   
    with little edit in source you can do it with packets.
    ConfirmDlg()
    DlgAnswer()
    Easy.
  3. wongerlt's post in how i can open 2 servers in one was marked as the answer   
    change second server port 7777 to 7778 or an other. 
  4. wongerlt's post in Java was marked as the answer   
    if(getPartyMembers().size()<4){ for (final L2PcInstance member : getPartyMembers()) if (member.isInsideZone(L2Character.ZONE_UNUSED)) member.teleToLocation(81035,148614,-3464); }  
  5. wongerlt's post in Need Vote Script php for hopzone was marked as the answer   
    total votes:
    script.php return  total votes.
    <?php error_reporting(0); $ctx = stream_context_create(array('https'=> array( 'timeout' => 2 ) )); $file = @file_get_contents("https://api.hopzone.net/lineage2/votes?token=YOUR_TOKEN",false,$ctx); if(!$file){ echo 0; exit; } $file = @json_decode($file, true); echo isset($file['totalvotes']) ? $file['totalvotes'] : 0; ?> IP IS VOTED?
    script.php?ip=PLAYER_IP return TRUE/FALSE
    <?php error_reporting(0); if (!filter_var($_GET['ip'], FILTER_VALIDATE_IP)) echo "FALSE".exit; $ctx = stream_context_create(array('https'=> array( 'timeout' => 2 ) )); $file = @file_get_contents("https://api.hopzone.net/lineage2/vote?token=YOUR_TOKEN&ip_address=".$_GET['ip'],false,$ctx); if(!$file){ echo "FALSE"; exit; } $file = @json_decode($file, true); echo isset($file['voted'])&&$file['voted']==1?"TRUE":"FALSE"; ?>  
  6. wongerlt's post in Connecting website to db was marked as the answer   
    better warn who provoke to do that because everything starts with that.
  7. wongerlt's post in Another Error. was marked as the answer   
    try this
    member.addItem("Party", itemId , (int) count, player, true);
     
  8. wongerlt's post in Problem making the server public was marked as the answer   
    you can login if change ip to 127.0.0.1 in l2.ini and other l2.ini with external ip for others
  9. wongerlt's post in Htmls Giving Scripts was marked as the answer   
    its virus :D
    Clean your pc with antivirus.
  10. wongerlt's post in Rb Spawn Announcement L2Acis was marked as the answer   
    +import net.sf.l2j.gameserver.util.Broadcast; _log.info("RaidBoss: " + raidboss.getName() + " has spawned."); +Broadcast.announceToOnlinePlayers(raidboss.getName() + ": Im alive!! who try to kill me???" , true); ..... ..... ..... +Broadcast.announceToOnlinePlayers(boss.getName() + ": Im dead... I will be back after " +respawnDelay+ " hours." , true); _schedules.put(boss.getNpcId(), ThreadPoolManager.getInstance().scheduleGeneral(new spawnSchedule(boss.getNpcId()), respawnDelay * 3600000)); from me server.
     
×
×
  • Create New...