- 0
-
Quem Está Navegando
- Nenhum usuário registrado visualizando esta página.
-
Posts
-
Boa Noite Galera o @Mr.Kadu postou o link do projeto mas eu fiz um erro e estarei postando a correção. aqueles que baixou o projeto e tentou ligar e deu erro e por causa do java que foi copilado eu copilei no java 22 e o projeto e no java 17 vou postar o link aqui para vcs, vai incluso a Geodata O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se
-
Nova Revisão com AutoFarm e .Menu O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se
-
alguem tambem esta tendo problemas com email ? quando vc loga com a conta e nao tem email cadastrado. eu levo erro 500
-
muito bom meu amigo. vou começar os testes........
-
@Mr.Kadu VOU COMEÇA OS TESTES AGORA MESMO. VOU VER SE COLOCO UM PROJETO ONLINE. USANDO SUA BASE, AI SERÁ MUITO BOM PRA REPORTAR. abraços mano e muito boa iniciativa com esse projeto, que muitos usaram.
-
Por Gabrieljdb · Postado
Falta arquivo "armorgrp.dat" alguém poderia postar. Grato! -
Também to querendo só a textura do drop no chão, se alguém tiver.
-
Opa Obrigado amigo e aguarde que vamos tentar por todas as quests 99,9% funcional principalemnte porque projeto acis nao vi ate agora com quest 90%
-
O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se Nova Revisão 1.0 O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se
-
Pergunta
TheBeasT
Boa noite galera alguem pode me ajudar nessa quest gostaria de limitar o drop a 400, por exemplo quando o player dropa 400 itens para de dropar e aparecer aquela alerta para ele voltar ao npc e entregar os itens, desde ja agradeço obrigado
/*
* 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 .
*/
package net.sf.l2j.gameserver.scripting.quests;
import java.util.HashMap;
import java.util.Map;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
import net.sf.l2j.commons.random.Rnd;
public class Q999_RandonItemReward extends Quest
{
private static final String qn = "Q999_RandonItemReward";
//Status
private static final boolean QUEST_ENABLE = Config.CUSTOM_QUEST_ENABLE;
// NPCs
private static final int NPC = Config.CUSTOM_QUEST_NPC_ID;
// Items Drop Quest
private static int[][] ITEMS = Config.CUSTOM_QUEST_REQUIRED_ITENS_LIST;
private static int MINIMUM_LEVEL = Config.CUSTOM_QUEST_MINIMUM_LEVEL;
private static int[][] MONSTERS = Config.CUSTOM_QUEST_MONSTERS_CHANCE_LIST;
private static int[][] REWARD_STATUS = Config.CUSTOM_QUEST_STATUS_REWARD;
private static int[][] LIST_REWARD_ITEMS = Config.CUSTOM_QUEST_GROUP_ITEM_ID;
public int[] SortItem(){
int[] premiacao = new int[]{57,1};
double sorteio = Math.random() * 100;
for(int i = 0 ; i < REWARD_STATUS.length ; i++)
{
if((sorteio -= REWARD_STATUS[0]) < 0){
int premio = Rnd.get(LIST_REWARD_ITEMS.length);
int quantidade = Rnd.get(REWARD_STATUS[1], REWARD_STATUS[2]);
premiacao = new int[]{LIST_REWARD_ITEMS[premio],quantidade};
break;
}
}
return premiacao;
}
// Drop chances
private static final Map CHANCES = new HashMap<>();
{
for(int i = 0 ; i < MONSTERS.length ; i++){
CHANCES.put(MONSTERS[0], MONSTERS[1]);
}
}
public Q999_RandonItemReward()
{
super(999, "Quest do Teste");
if(QUEST_ENABLE){
for(int i = 0 ; i < ITEMS.length ; i++)
{
setItemsIds(ITEMS[0]);
}
addStartNpc(NPC);
addTalkId(NPC);
for (int mobs : CHANCES.keySet())
addKillId(mobs);
}
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
if (event.equalsIgnoreCase(NPC + "-3.htm"))
{
st.setState(STATE_STARTED);
st.set("cond", "1");
st.playSound(QuestState.SOUND_ACCEPT);
}
else if (event.equalsIgnoreCase(NPC + "-5.htm"))
{
if (CheckItemsRequire(player))
{
int[] sorteado = this.SortItem();
htmltext = NPC + "-6.htm";
for(int i = 0 ; i < ITEMS.length ; i++)
st.takeItems(ITEMS[0], ITEMS[1]);
st.giveItems(sorteado[0],sorteado[1]);
}
}
else if (event.equalsIgnoreCase(NPC + "-7.htm"))
{
for(int i = 0 ; i < ITEMS.length ; i++)
st.takeItems(ITEMS[0], -1);
st.exitQuest(true);
}
return htmltext;
}
@SuppressWarnings("static-method")
private boolean CheckItemsRequire(Player player){
QuestState st = player.getQuestState(qn);
for(int i = 0 ; i < ITEMS.length ; i++){
if(st.getQuestItemsCount(ITEMS[0]) < ITEMS[1])
return false;
}
return true;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg();
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
switch (st.getState())
{
case STATE_CREATED:
htmltext = npc.getNpcId() + ((player.getLevel() >= MINIMUM_LEVEL) ? "-1.htm" : "-2.htm");
break;
case STATE_STARTED:
if(npc.getNpcId() == NPC){
boolean stQ = false;
for(int i = 0 ; i < ITEMS.length ; i++)
{
if(st.getQuestItemsCount(ITEMS[0]) >= ITEMS[1]){
stQ = true;
}
else
{
stQ = false;
break;
}
}
htmltext = (stQ) ? NPC + "-4.htm" : NPC + "-5.htm";
}
break;
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player player, boolean isPet)
{
Player partyMember = getRandomPartyMemberState(player, npc, STATE_STARTED);
if (partyMember == null)
return null;
for(int i = 0 ; i < ITEMS.length ; i++)
partyMember.getQuestState(qn).dropItems(ITEMS[0], 1, 0, CHANCES.get(npc.getNpcId()));
return null;
}
}
,>
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts recomendados
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.