Jump to content

povis111

Members
  • Posts

    143
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by povis111

  1. probably a wrong bypass string with less than required parameters sent from the npc as "command" , this would fix the problem. source: http://javarevisited.blogspot.com/2012/02/how-to-solve-javautilnosuchelementexcep.html
     

    private static void sendReport(String event, L2PcInstance player, String command)
    	{
    		StringTokenizer st = new StringTokenizer(command);
                           if(st.hasMoreTokens())
    			st.nextToken();
    
    			String message = "";
    			String _type = null;
    			L2GameClient info = player.getClient().getConnection().getClient();
    			
    			try
    			{
                                   if(st.hasMoreTokens())
    				_type = st.nextToken();
    				while (st.hasMoreTokens())
    				{
    					message = message + st.nextToken() + " ";
    				}
    				
    				if (message.equals(""))
    				{
    					player.sendMessage("Message box cannot be empty.");
    					return;
    				}
    				
    				String timeStamp = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").format(Calendar.getInstance().getTime());
    				String fname = "data/Reports/" + player.getName() + " "+timeStamp+".txt";
    				File file = new File(fname);
    				boolean exist = file.createNewFile();
    				
    				if (!exist)
    				{
    					return;
    				}
    				
    				FileWriter fstream = new FileWriter(fname);
    				BufferedWriter out = new BufferedWriter(fstream);
    				out.write("Character Info: " + info + "\r\nBug Type: " + _type + "\r\nMessage: " + message);
    				player.sendMessage("Report successfully sent. Staff will check it soon, thank you!");
    				
    				for (L2PcInstance allgms : L2World.getAllGMs())
    				{
    					allgms.sendMessage(player.getName() + " has sent a report. Type: " + _type);
    				}
    				
    				out.close();
    			}
    			catch (Exception e)
    			{
    				L2Character._log.warning("could not send report: " + e);
    			}
    	}
    
  2.  

    i have this error but npc is working

     

    1. WARNING in \BossRespawn.java (at line 57)
            long delay = GrandBossManager.getInstance().getStatsSet(boss).getLong("r
    espawn_time");
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    The static method getStatsSet(int) from the type GrandBossManager should be acce
    ssed in a static way

    It says that the getStatsSet(int) is a static void and static voids don't need new instances so..

    this

     

    long delay = GrandBossManager.getInstance().getStatsSet(boss).getLong("respawn_time");
    

    to this

    long delay = GrandBossManager.getStatsSet(boss).getLong("respawn_time");
    
  3. as i see that no one puts suggestions here, try this

    if DecLevel == True and not st.player.isGM() :
                            pXp = st.player.getExp()
         here I make the mistake--------->tXp = Experience.LEVEL[NewLevel]
                            if pXp > tXp: st.player.removeExpAndSp(pXp - tXp, 0)
                        st.player.setClassId(int(event))

    to that

    if DecLevel == True and not st.player.isGM() :
                            if st.getPlayer().getLevel() > NewLevel : st.getPlayer().removeExpAndSp(st.getPlayer().getExp() - ExperienceData.getInstance().getExpForLevel(NewLevel), 0)
                        st.player.setClassId(int(event))

    won't hurt :D it's all about the tabs in python ya'know ;)

  4. Hello, after lots of time spending on l2j servers, i've decided to try to run and develop(if i'll be capable of) l2off server. Well, to run the server itself was pretty easy, but i don't get how the accounts are created. Firstly, there's no autoreg, as i didn't find any hints on that. Secondly, sql server is not mysql and dbo.user_auth 'password' column has different data type(bytes as i saw in the message)  :lol: . Would somenone mind to tell me how accounts are created or link me to a source of information in which i could find what i'm looking for? :gusta:

  5. dont mess with the stupid methods, moderate it directly from the packet @ byte, 

     

    if (statement)

      writeD( )//ur id goes there

    else

      writeD(  )// classic relation

     

    to calculate the ID perform the bitwise operations providen by l2j, or sniff them from phx

     

    xdem

    i guess i will have to try sniffing packets with phx, thanks :)

     

    EDIT: after all day of searching and sniffing, i've found out that relationchanged packet works only when some other clan related packets are sent, makes it impossilble to use alone... Thanks for the help and have great holidays.

  6. I guess you're right. It's about _relation and its sending info via UserInfo.java

     

    For example

    // 0x40 leader rights
    // siege flags: attacker - 0x180 sword over name, defender - 0x80 shield, 0xC0 crown (|leader), 0x1C0 flag (|leader)
    writeD(_relation);
    

    I guess the same with dat fist. Somehow.. :D

    public static final int RELATION_MUTUAL_WAR = 0x08000; // double fist
    public static final int RELATION_1SIDED_WAR = 0x10000; // single fist
    

    Check L2PcInstance for the use @ public int getRelation(L2PcInstance target)

    if (getClan().isAtWarWith(target.getClan().getClanId()))
        result |= RelationChanged.RELATION_MUTUAL_WAR;
    

    Boom, double fist :P

    Well, the problem is, 

     

    // 0x40 leader rights
    // siege flags: attacker - 0x180 sword over name, defender - 0x80 shield, 0xC0 crown (|leader), 0x1C0 flag (|leader)
    writeD(_relation);
    

    is used for sieges, not for clan wars... so, in my thinking, RelationChanged should control the title but it doesn't. I tried changing the relation, it didn't work :/

×
×
  • Create New...