Ir para conteúdo
  • Cadastre-se
  • 0

AutoReward acis 362


anakinl2

Pergunta

 

### Eclipse Workspace Patch 1.0

#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/entity/AutoRewarder.java
===================================================================
--- java/net/sf/l2j/gameserver/model/entity/AutoRewarder.java (revision 0)
+++ java/net/sf/l2j/gameserver/model/entity/AutoRewarder.java (working copy)
@@ -0,0 +1,51 @@
+/*
+* This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <
O conteúdo está oculto, favor efetuar login ou se cadastrar!
+ */
+package net.sf.l2j.gameserver.model.entity;
+
+import java.util.Collection;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.ThreadPoolManager;
+import net.sf.l2j.gameserver.Announcements;
+import net.sf.l2j.gameserver.model.L2World;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * @creado KingBorracho69
+ *
+ */
+public class AutoRewarder
+{
+
+ public static void getInstance()
+ {
+ ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
+ {
+ public void run()
+ {
+ AutoReward();
+ }
+
+ }, 0,Config.AUTO_REWARD_DELAY * 1000);
+ }
+ public static void AutoReward()
+ {
+ Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
+ for (L2PcInstance p: pls)
+ {
+
+ p.addItem("Auto Reward Online", Config.AUTO_REWARD_ID, Config.AUTO_REWARD_COUNT, p, true);
+ Announcements.getInstance().announceToAll("Auto Reward Online Time: Reward Pc Bang Points 5 ");
+ Announcements.getInstance().announceToAll("Auto Reward Online Time: Next reward in 30 Min ");
+ }
+ }
+
+}
Index: java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- java/net/sf/l2j/gameserver/GameServer.java (revision 13)
+++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
@@ -90,6 +90,7 @@
import net.sf.l2j.gameserver.model.PartyMatchRoomList;
import net.sf.l2j.gameserver.model.PartyMatchWaitingList;
import net.sf.l2j.gameserver.model.entity.custom.AnnounceOnlinePlayers;
+import net.sf.l2j.gameserver.model.entity.custom.AutoRewarder;
import net.sf.l2j.gameserver.model.entity.Castle;
import net.sf.l2j.gameserver.model.entity.Hero;
import net.sf.l2j.gameserver.model.olympiad.Olympiad;
@@ -272,6 +273,10 @@
_log.config("UserCommandHandler: Loaded " + UserCommandHandler.getInstance().size() + " handlers.");
Util.printSection("Custom");
+
+ if (Config.ALLOW_AUTO_REWARDER)
+ AutoRewarder.getInstance();
+
if (Config.ALLOW_WEDDING)
{
CoupleManager.getInstance();
Index: config/aCis.properties
===================================================================
--- config/events.properties (revision 15)
+++ config/events.properties (working copy)
@@ -113,4 +113,13 @@
+
+# Auto rewarder.
+AllowAutoRewarder = True
+# Delay for reward. (in seconds)
+# 5 minutes = 300 segundo
+# 10 minutes = 600 segundo
+# 15 minutes = 900 segundo
+# 20 minutes = 1200 segundo
+# 25 minutes = 1500 segundo
+# 30 minutes = 1800 segundo -> Default
+# Tool Convert minutes to seconds
+AutoRewardDelay = 1800
+# ID of item reward.
+AutoRewardID = 57
+# Count of item reward.
+AutoRewardCount = 1000
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 15)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -311,6 +313,11 @@
public static int ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;
+
+ public static boolean ALLOW_AUTO_REWARDER;
+ public static int AUTO_REWARD_DELAY;
+ public static int AUTO_REWARD_ID;
+ public static int AUTO_REWARD_COUNT;
@@ -1166,6 +1168,11 @@
ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = Integer.parseInt(events.getProperty("AltLottery2and1NumberPrize","200"));
+
+ ALLOW_AUTO_REWARDER = Boolean.parseBoolean(events.getProperty("AllowAutoRewarder", "True"));
+ AUTO_REWARD_DELAY = Integer.parseInt(events.getProperty("AutoRewardDelay", "1200"));
+ AUTO_REWARD_ID = Integer.parseInt(events.getProperty("AutoRewardID", "57"));
+ AUTO_REWARD_COUNT = Integer.parseInt(events.getProperty("AutoRewardCount", "1000"));
}
catch (Exception e)
{

 

 

alguem por favor poderia adaptar esse mods ?

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts recomendados

  • 0

Crie o arquivo AutoRewarder.java em model/entity

 

 

 

O conteúdo está oculto, favor efetuar login ou se cadastrar!

 

 

 

Em Gameserver.java

 

Procure por:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Adicione em baixo:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Procure por:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Adicione:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Em Config.java

 

Procure por:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Adicione:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Procure por:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Adicione:

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Vá em players.properties

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Adicione:

 

 

O conteúdo está oculto, favor efetuar login ou se cadastrar!
Editado por Leonardo Holanda
Link para o comentário
Compartilhar em outros sites


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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.