Jump to content

rafiuskyz

Members
  • Posts

    47
  • Credits

  • Joined

  • Last visited

    Never
  • Feedback

    0%

Everything posted by rafiuskyz

  1. thx rullezz, i use im my web site!
  2. Great share man !!! Very usefull ^^ keep up!
  3. when the players open the map, appears the following error: Game Guard Fail! Please restart Lineage! I turn off gameguard of LoginServer and GameServer. LoginServer settings: # Enforce GG Authorization from client # Login server will kick client if client bypassed GameGuard authentication ForceGGAuth = False Options settings: # Enforce gameguard for clients # GameGuardEnforce - enforces gameguard query on character login # GameGuardProhibitAction - don't allow player to perform trade, talk with npc # or move until gameguard reply is received. GameGuardEnforce = False GameGuardProhibitAction = False I use the last revision l2dot Interlude! What is this? How to resolve? thx...
  4. Sorry i use translator! Vamos la, estou querendo adicionar um linha de comando para quando eu remover o membro VIP remova também um certo item que esta no inventario dele, uma Weapon por exemplo. Postei o código do AdminCommand //setvip no post antigo.
  5. how do I add a command line when to remove the member VIP also remove a weapon that the inventory? see the code... package com.l2j.gameserver.handler.admincommandhandlers; import java.sql.Connection; import java.sql.PreparedStatement; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.l2j.L2DatabaseFactory; import com.l2j.gameserver.Announcements; import com.l2j.gameserver.datatables.GmListTable; import com.l2j.gameserver.handler.IAdminCommandHandler; import com.l2j.gameserver.model.L2Object; import com.l2j.gameserver.model.actor.instance.L2PcInstance; import com.l2j.gameserver.network.serverpackets.SocialAction; public class AdminVip implements IAdminCommandHandler { private static String[] ADMIN_COMMANDS = { "admin_setvip" }; private final static Log _log = LogFactory.getLog(AdminVip.class.getName()); public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (activeChar == null) return false; if (command.startsWith("admin_setvip")) { L2Object target = activeChar.getTarget(); if (target instanceof L2PcInstance) { L2PcInstance targetPlayer = (L2PcInstance) target; boolean newVip = !targetPlayer.isCharViP(); if (newVip) { targetPlayer.setCharViP(true); targetPlayer.updateNameTitleColor(); updateDatabase(activeChar, true); sendMessages(true, targetPlayer, activeChar, true, true); targetPlayer.broadcastPacket(new SocialAction(targetPlayer.getObjectId(), 16)); targetPlayer.broadcastUserInfo(); } else { targetPlayer.setCharViP(false); targetPlayer.updateNameTitleColor(); updateDatabase(activeChar, false); sendMessages(false, targetPlayer, activeChar, true, true); targetPlayer.broadcastUserInfo(); } } else { activeChar.sendMessage("Impossible to set a non Player Target as VIP."); _log.info("GM: " + activeChar.getName() + " is trying to set a non Player Target as VIP."); return false; } } return true; } private void sendMessages(boolean fornewVip, L2PcInstance player, L2PcInstance gm, boolean announce, boolean notifyGmList) { if (fornewVip) { player.sendMessage(gm.getName() + " has granted VIP Status for you!"); gm.sendMessage("You've granted VIP Status for " + player.getName()); if (announce) Announcements.getInstance().announceToAll(player.getName() + " has received VIP Status!"); if (notifyGmList) GmListTable.broadcastMessageToGMs("Warn: " + gm.getName() + " has Set " + player.getName() + " as VIP !"); } else { player.sendMessage(gm.getName() + " has revoked VIP Status from you!"); gm.sendMessage("You've revoked VIP Status from " + player.getName()); if (announce) Announcements.getInstance().announceToAll(player.getName() + " has lost VIP Status!"); if (notifyGmList) GmListTable.broadcastMessageToGMs("Warn: " + gm.getName() + " has removed VIP Status of player" + player.getName()); } } /** * * @param activeChar * @param newDonator */ private void updateDatabase(L2PcInstance player, boolean newVIP) { Connection con = null; try { // prevents any NPE. // ---------------- if (player == null) return; // Database Connection //-------------------------------- con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement stmt = con.prepareStatement(newVIP ? INSERT_DATA : DEL_DATA); // if it is a new donator insert proper data // -------------------------------------------- if (newVIP) { stmt.setInt(1, player.getObjectId()); stmt.setString(2, player.getName()); stmt.setInt(3, player.isHero() ? 1 : 0); stmt.setInt(4, player.isNoble() ? 1 : 0); stmt.setInt(5, player.isDonator() ? 1 : 0); stmt.setInt(6, 1); stmt.execute(); stmt.close(); } else // deletes from database { stmt.setInt(1, player.getObjectId()); stmt.execute(); stmt.close(); } } catch (Exception e) { _log.error("Error: could not update database: ", e); } finally { try { con.close(); } catch (Exception e) { _log.error("Error: could not update database: ", e); } } } // Updates That Will be Executed by MySQL // ---------------------------------------- String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator, vip) VALUES (?,?,?,?,?,?)"; String DEL_DATA = "UPDATE characters_custom_data SET vip = 0 WHERE obj_Id=?"; /** * @return */ public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } thxx
  6. nice very very thanks for this share! 8)
  7. everst-rj I understood what you said, but in my case will need. I tested the way you went and put the answer... thx
  8. fakoykas, I tried as you said and all that without being restricted to event. if st.getPlayer().isInFunEvent: return "Warning: You are attending the event TvT and can not use NPC Buffer!" and also tried the following adding () also unsuccessfully, not restricted anyone! =/ if st.getPlayer().isInFunEvent() : return "Warning: You are attending the event TvT and can not use NPC Buffer!" sorry for my English I use translator.
  9. Quero adicionar esta restrição pro NPC BUFFER nao BUFFAR o cara se ele estiver registrado nos Eventos, eu sei que ele perde os buffs ao inicio do evento, mas tem sempre os safados que tentam de tudo
  10. how do I say that the player in this event and can not use the Buff? I tried without success for some forms... example
  11. l2jdot died! =/ For more info visit www.l2dot.info/forum
×
×
  • Create New...