Jump to content

luk19as

Banned
  • Posts

    16
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About luk19as

Contact Methods

  • Website URL
    http://www.l2junit.com

Profile Information

  • Gender
    Not Telling

luk19as's Achievements

Newbie

Newbie (1/16)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Thank you for the nice share mate :)
  2. Okay I have remade the code a little and the python file as well. Java Code: private static final String UPDATE_CHAR_COLOR = "UPDATE character_color SET name_color=?, WHERE charId=?"; public void saveNameColor(int color){ Connection con = null; PreparedStatement statement = null; try { con = L2DatabaseFactory.getInstance().getConnection(false); statement = con.prepareStatement(UPDATE_CHAR_COLOR); statement.setString(1, StringToHex(Integer.toHexString(color).toUpperCase())); statement.setInt(2, getObjectId()); getAppearance().setNameColor(color); broadcastUserInfo(); statement.execute(); statement.close(); } catch(Exception e){} finally { CloseUtil.close(con); } } Python Code: if event == "1": if st.getQuestItemsCount(57) > 250000: st.takeItems(57,250000) st.saveNameColor(0x009900) return "1.htm" if st.getQuestItemsCount(57) <= 250000: return "Announcements: No Enought Adena To Select Color!" st.exitQuest(0) But still no luck ://
  3. Can you give me the proper code for: { //store it in the database } I tried but my one didn't work :D Thanks in advance.
  4. Hello guys, i really need help saving the color i chose into the database. I made a color manager where I can choose colors, but after i chose for example red it wont save after i do restart (relog). This is the Java code in L2PcInstance: public void saveName(int color){// Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement; statement = con.prepareStatement("UPDATE characters SET name_color=?"+color+" WHERE account_name='"+_accountName+"'"); statement.setString(1, StringToHex(Integer.toHexString(color).toUpperCase())); statement.execute(); statement.close(); statement = null; getAppearance().setNameColor(color); broadcastUserInfo(); } catch(Exception e){} finally { CloseUtil.close(con); con = null; } } This is the code for one color in python .py file: if event == "1": if st.getQuestItemsCount(57) > 250000: st.takeItems(57,250000) st.getPlayer().getAppearance().setNameColor(0x009900) st.getPlayer().broadcastUserInfo(); return "1.htm" if st.getQuestItemsCount(57) <= 250000: return "Announcements: No Enought Adena To Select Color!" st.exitQuest(0) How can i make my name color to save after i do restart? Please answer.
  5. I have came across an alphabet letter error. Whenever i would like to you the letter M it show black box instead of M. All other letter work is just the Letter M,Z and maybe some others to. I have tried editing the etcitemgrp.dat file and in id 6903 which looked like this: 2 6903 0 0 2 5 0 icon.etc_m_i00 But non of it seems to make the letter M and Z visible. This is the code i use in htm: icon.etc_alphabet_m_i00 Can someone please help me fix this error? Thanks in advance.
×
×
  • Create New...