- 0
-
Posts
-
Hello lads, AA-Astral Assassins are recruiting active players/cps to join us on https://l2noxis.com/ . The server runs on GOD client. We are around 20+ members with a very active discord. Most of the players are EU based but we also have Aussies, Brits (brexit), Canadians and BRs. Anyone is welcome to join and cause some havoc. Feel free to pm me if you need any further info or if u want to join ingame "MarkoPolo or on discord "markopolol2 The server it self is fairly new with around 200-400 active players. Balance is in the works but admins seem very active.
-
does anyone have one Quest, which when he kills 100 monsters Take Reward item.. but without speak any npc.. like this quest but 100 monsters package l2s.gameserver.scripts.custom; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.concurrent.TimeUnit; import l2s.commons.db.DatabaseFactory; import l2s.gameserver.Announcements; import l2s.gameserver.datatables.SkillTable; import l2s.gameserver.model.L2Skill; import l2s.gameserver.model.actor.L2Npc; import l2s.gameserver.model.actor.instance.L2PcInstance; import l2s.gameserver.model.quest.Quest; /** * @author SoFace */ public class SuperMonster extends Quest { // Monsters's ID. private static final int MONSTERS[] = { 12564 }; private static final boolean REWARD_PARTY = false; // Reward party ? private final static boolean REWARD_NOBLE = true; // Give Noblesse ? private final static boolean REWARD_HERO = false; // Give Hero ? private final static int REWARD_HERO_DAYS = -1; // How many days to give the status of Hero ? // 0 - Until relogin. -1 - Forever. private final static boolean REWARD_SKILL = true; // Give Skill ? private final static int REWARD_SKILL_ID = 0; // Skill's ID. private final static int REWARD_SKILL_LVL = 0; // Skill's LvL. private final static boolean REWARD_ITEMS = true; // Give Items ? private final static int REWARD_ITEM_ID = 4037; // Item's ID. private final static int REWARD_ITEM_COUNT = 5; // Count. public SuperMonster() { super(-1, "SuperMonster", "custom"); for (int mobs : MONSTERS) addKillId(mobs); } @Override public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { L2Skill skill = SkillTable.getInstance().getInfo(REWARD_SKILL_ID, REWARD_SKILL_LVL); Announcements.announceToAll("SuperMonster was killed."); if (REWARD_PARTY) { if (player.getParty() != null) { for (L2PcInstance members : player.getParty().getPartyMembers()) { members.sendMessage("Congratulations ! You killed The SuperMonster !"); if (REWARD_ITEMS) members.addItem("Add", REWARD_ITEM_ID, REWARD_ITEM_COUNT, members, true); if (REWARD_SKILL) members.addSkill(skill, true); if (REWARD_HERO) { if (!player.isHero()) addHero(player, REWARD_HERO_DAYS); else player.sendMessage("You already Hero."); } if (REWARD_NOBLE) { if (!members.isNoble()) members.setNoble(true, true); else members.sendMessage("You already Noblesse."); } members.broadcastUserInfo(); } } else { player.sendMessage("Congratulations ! You killed The SuperMonster !"); if (REWARD_ITEMS) player.addItem("Add", REWARD_ITEM_ID, REWARD_ITEM_COUNT, player, true); if (REWARD_SKILL) player.addSkill(skill, true); if (REWARD_HERO) { if (!player.isHero()) addHero(player, REWARD_HERO_DAYS); else player.sendMessage("You already Hero."); } if (REWARD_NOBLE) { if (!player.isNoble()) player.setNoble(true, true); else player.sendMessage("You already Noblesse."); } player.broadcastUserInfo(); } } else { player.sendMessage("Congratulations ! You killed The SuperMonster !"); if (REWARD_ITEMS) player.addItem("Add", REWARD_ITEM_ID, REWARD_ITEM_COUNT, player, true); if (REWARD_SKILL) player.addSkill(skill, true); if (REWARD_HERO) { if (!player.isHero()) addHero(player, REWARD_HERO_DAYS); else player.sendMessage("You already Hero."); } if (REWARD_NOBLE) { if (!player.isNoble()) player.setNoble(true, true); else player.sendMessage("You already Noblesse."); } player.broadcastUserInfo(); } return null; } private void addHero(L2PcInstance player, int days) { long _heroExpire = 0L; player.setHero(true); player.broadcastUserInfo(); if (days == 0) { _heroExpire = 3L; return; } _heroExpire = (days == -1 ? 1L : System.currentTimeMillis() + TimeUnit.DAYS.toMillis(days)); try (Connection con = DatabaseFactory.getConnection(); PreparedStatement stm = con.prepareStatement("UPDATE `characters` SET `hero`=? WHERE `obj_Id`=?")) { stm.setLong(1, _heroExpire); stm.setInt(2, player.getObjectId()); stm.execute(); } catch (SQLException e) { _log.warn("[SuperMonster] addHero(days) error: ", e); } } public static void main(String args[]) { new SuperMonster(); } }
-
Very beautiful, I would certainly like to use it, make some changes, and create my own. Your work is very beautiful.
-
-
Topics
Question
gryzli
Starting L2J Login Server.
INFO : loading login config
INFO : MLog clients using log4j logging.
INFO : Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace
: 10]
INFO : Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ jav
a.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [num
ThreadsAwaitingCheckoutDefaultUser] ]
WARN : SQL Error: 1045, SQLState: 28000
ERROR : Access denied for user 'root'@'localhost' (using password: YES)
WARN : Could not obtain connection metadata java.sql.SQLException: Access denied
for user 'root'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:283)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:119)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:143)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:132)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.initializeAu
tomaticTestTable(C3P0PooledConnectionPoolManager.java:772)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooled
ConnectionPool(C3P0PooledConnectionPoolManager.java:696)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0
PooledConnectionPoolManager.java:257)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0
PooledConnectionPoolManager.java:271)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
bstractPoolBackedDataSource.java:128)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.
getConnection(LocalDataSourceConnectionProvider.java:81)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
84)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009
)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1292)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSession
Factory(LocalSessionFactoryBean.java:804)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessi
onFactory(LocalSessionFactoryBean.java:744)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPr
opertiesSet(AbstractSessionFactoryBean.java:131)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:429)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:250)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:247)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:161)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:270)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:346)
at org.springframework.context.support.ClassPathXmlApplicationContext.<i
nit>(ClassPathXmlApplicationContext.java:92)
at org.springframework.context.support.ClassPathXmlApplicationContext.<i
nit>(ClassPathXmlApplicationContext.java:77)
at net.sf.l2j.L2Registry.loadRegistry(L2Registry.java:65)
at net.sf.l2j.loginserver.L2LoginServer.<init>(L2LoginServer.java:104)
at net.sf.l2j.loginserver.L2LoginServer.main(L2LoginServer.java:77)
INFO : Loaded 127 server names
INFO : LoginManager initiating
INFO : Cached 10 KeyPairs for RSA communication
INFO : RandomIntGenerator: initialized
INFO : Stored 20 keys for Blowfish communication
WARN : SQL Error: 1045, SQLState: 28000
ERROR : Access denied for user 'root'@'localhost' (using password: YES)
WARN : SQL Error: 1045, SQLState: 28000
ERROR : Access denied for user 'root'@'localhost' (using password: YES)
Exception in thread "main" org.springframework.transaction.CannotCreateTransacti
onException: Could not open Hibernate Session for transaction; nested exception
is org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:424)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
java:144)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
57)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326
)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegi
n(HibernateTransactionManager.java:497)
at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.getTransaction(AbstractPlatformTransactionManager.java:349)
at org.springframework.transaction.interceptor.TransactionAspectSupport.
createTransactionIfNecessary(TransactionAspectSupport.java:255)
at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:102)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:176)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterc
eptor.intercept(Cglib2AopProxy.java:616)
at net.sf.l2j.loginserver.services.GameserversServices$$EnhancerByCGLIB$
$ea482160.getAllGameservers(<generated>)
at net.sf.l2j.loginserver.manager.GameServerManager.load(GameServerManag
er.java:208)
at net.sf.l2j.loginserver.manager.GameServerManager.<init>(GameServerMan
ager.java:111)
at net.sf.l2j.loginserver.manager.GameServerManager.getInstance(GameServ
erManager.java:82)
at net.sf.l2j.loginserver.L2LoginServer.<init>(L2LoginServer.java:113)
at net.sf.l2j.loginserver.L2LoginServer.main(L2LoginServer.java:77)
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (usi
ng password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:283)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:119)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:143)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:132)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.initializeAu
tomaticTestTable(C3P0PooledConnectionPoolManager.java:772)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.createPooled
ConnectionPool(C3P0PooledConnectionPoolManager.java:696)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0
PooledConnectionPoolManager.java:257)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManager.getPool(C3P0
PooledConnectionPoolManager.java:271)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
bstractPoolBackedDataSource.java:128)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.
getConnection(LocalDataSourceConnectionProvider.java:81)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
.java:421)
... 16 more
Server terminated abnormaly
server terminated
Im newbie so it will be nice if you write what exacly i have to do :).
Link to comment
Share on other sites
11 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.