Ir para conteúdo
  • Cadastre-se

ACP 3.5 Funcionando


Posts recomendados

ola

 

Cara esse Painel e muito lindo gosto muito dele mais não estou conseguindo entra nele quando fica hospedado

 

 

quando ta em localhost fica tudo OK

quando eu Up ele para um hospedagem ele cria as SQL na minha DB mais não passa da tela de logar, tento criar uma conta nova e não cria!

 

Agradeço a todos pela ajuda!

Tudo que sobe desce e acerta sua cabeça! :boxing:

Link para o comentário
Compartilhar em outros sites

  • 1 month later...

Olá colega!

Realmente! O software atualmente só tem suporte a alguns servidores interlude, conforme mostra no post inicial.

Grande abraço!

Aew Mano seu sistema tá dando problema no votesystem não ta aparacendo a opção para votar

Editado por =ADM.SPITE=
Link para o comentário
Compartilhar em outros sites

  • 3 months later...
  • 4 weeks later...

 

Aparentemente a instalação foi ok, nenhum erro, mas quando eu vou logar e aceitar os termos a conta não entra, volta para a tela de login e não exibe nenhum erro!

 

/////edit/////

 

error_log da hospedagem:

 

[05-Jul-2017 19:18:21 America/Sao_Paulo] PHP Notice: Undefined index: login in /home/lwhitec1/public_html/acp35/core.php on line 95

Editado por CrisRodrigues
Link para o comentário
Compartilhar em outros sites

Arrumei o Erro do Mysqli

 

deu tudo certo sem nenhum erro mas agora não quer logar na minha conta admin.


na minha hospedagem não loga de jeito nenhum.

e usando wamp server ele loga normalmente mas não loga como administrador.

pois uso dream v2 ela não tem accesslevel na tabela de Characters .

o que fazer?

como fazer login como admin para configurar o painel?

Editado por admhoro
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
  • 3 weeks later...
  • 5 months later...

painel muito bacana acabo de conseguir adaptar ele todo para a rev l2jlisvus so nao consegui achar onde alterar o enchant limitie gostaria de por o +10 no lugar do +16 e tb o valor do nobles limpar pk etc pf ficaria mt grato

Editado por [ADM]Mystogan

Especialidade em DataPack / Client

Link para o comentário
Compartilhar em outros sites

 

painel muito bacana acabo de conseguir adaptar ele todo para a rev l2jlisvus so nao consegui achar onde alterar o enchant limitie gostaria de por o +10 no lugar do +16 e tb o valor do nobles limpar pk etc pf ficaria mt grato

6trJIh0.jpg

 

as opção ai dos nobles, karma, ban, esta mais pra frente Mude onde tiver Price  

Editado por VANPER
Link para o comentário
Compartilhar em outros sites

obrigado fiz aqui uma coisa agr que estou com erro e nao esta acusando em nada eu compro os itens pelo site mais nao estao entregando na minha conta oque poderia estar causando isso ?

Especialidade em DataPack / Client

Link para o comentário
Compartilhar em outros sites

 

obrigado fiz aqui uma coisa agr que estou com erro e nao esta acusando em nada eu compro os itens pelo site mais nao estao entregando na minha conta oque poderia estar causando isso ?

eu uso acis não sei qual sua versão includes/classes.php

 

	<?php
	class template{
	  function load($filepath){
    $this->template = preg_replace("#\{(.*)\}#","<?php echo $1; ?>",file_get_contents($filepath));
  }
	  function replace($var,$content){
    $this->template = str_replace("%$var%",$content,$this->template);
  }
	  function content(){
    return $this->template;
  }
	}
	class mysql{
	  protected $hostname;
  protected $database;
  protected $username;
  protected $password;
  protected $_handle = null;
	  public function __construct($hostname = null,$database = null,$username = null,$password = null){
    $this->hostname = $hostname;
    $this->database = $database;
    $this->username = $username;
    $this->password = $password;
  }
	  public function __call($method,$args){
    if(!$this->_handle)
      $this->connect();
    return call_user_func_array(array($this,$method),$args);
  }
	  function connect(){
    global $client;
    try{
      $this->_handle = new PDO("mysql:host={$this->hostname};dbname={$this->database};charset=utf8",$this->username,$this->password);
      $this->_handle->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);
      $this->_handle->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
    }catch(PDOException $e){
      $this->error($e->getMessage(),$this->hostname);
    }
  }
	  function error($error,$hostname){
    $file = fopen(PATH_ROOT."errorLog.txt","a");
    fwrite($file,date("H:i:s d/m/Y",time()).": ".$error." (".$_SERVER['REMOTE_ADDR'].")\n");
    fclose($file);
  }
	  protected function select($query,$array){
    if(!$this->_handle){
      return false;
    }
    try{
      $statement = $this->_handle->prepare($query);
      $statement->execute($array);
      $data = $statement->fetchAll();
      if(count($data) == 1)
        return $data[0];
      return $data;
    }catch(PDOException $e){
      $this->error($e->getMessage(),$this->hostname);
      return false;
    }
  }
	  protected function execute($query,$array){
    if(!$this->_handle){
      return false;
    }
    try{
      $statement = $this->_handle->prepare($query);
      $statement->execute($array);
      return $statement->rowCount();
    }catch(PDOException $e){
      if($e->getCode() != "23000")
        $this->error($e->getMessage(),$this->hostname);
      return $this->error($e->getMessage(),$this->hostname);
    }
  }
	  protected function isConnected(){
    return $this->_handle != null;
  }
	  protected function test(){
    try{
      $this->_handle = new PDO("mysql:host={$this->hostname};dbname={$this->database}",$this->username,$this->password);
      $this->_handle->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);
      $this->_handle->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
      return true;
    }catch(PDOException $e){
      return $e->getMessage();
    }
  }
	}
	class log{
	  function format($log,$arguments){
    return vsprintf($log,$arguments);
  }
	  function add($log){
    global $mysqlClientLoginServer;
    global $queryLogin;
    global $player;
    $mysqlClientLoginServer->execute("INSERT INTO `acp_logs` (`serverId`,`account`,`characterId`,`log`,`time`) VALUES (?,?,?,?,?);",array((($player['server']) ? $player['server'] : 0),$player['account'],(($player['character']['id']) ? $player['character']['id'] : 0),$log,time()));
  }
	}
	$log = new log();
	class mail{
	  function send($to,$message){
    global $settings;
    $headers = "From: \" { ".$settings['projectName']." } \" < { ".$settings['projectEmail']." } >"."\n";
    $headers .= "MIME-Version: 1.0"."\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
    mail($to,$settings['projectName'],$message,$headers);
  }
	}
	class validate{
	  function account($account){
    return (preg_match("/^[A-Za-z0-9]{1,20}$/",$account));
  }
	  function character($id){
    return (preg_match("/^[0-9]{9,10}$/",$id));
  }
	  function password($password){
    return (preg_match("/^[A-Za-z0-9]{1,20}$/",$password));
  }
	  function numeric($value){
    return (preg_match("/^\d+$/",$value));
  }
	  function money($value){
    return (preg_match("/^[0-9]+(?:\.[0-9]{0,2})?$/",$value));
  }
	  function pin($value){
    return (preg_match("/^[a-z0-9 ]{19}$/",$value));
  }
	  function email($email){
    return (filter_var($email,FILTER_VALIDATE_EMAIL));
  }
	  function blank($value){
    if($value !== null && (is_array($value) || strlen($value) > 0)){
      return TRUE;
    }else{
      return FALSE;
    }
  }
	  function match($value1,$value2){
    return ($value1 === $value2);
  }
	  function gameserver($id){
    return ($this->numeric($id));
  }
	  function escape($string){
    return (preg_match("/^[A-Za-z0-9\\.\\_]{0,30}$/",$string));
  }
	  function sessionID($string){
    return (preg_match("/^[a-f0-9]{30}$/",$string));
  }
	  function letters($string){
    return (preg_match("/^[a-zA-Z]+$/",$string));
  }
	}
	$validate = new validate();
	class cookie{
	  function add($name,$value,$duration){
    global $client;
    setCookie('acp['.$client['id'].']['.$name.']',$value,$duration,'/');
  }
	  function set($name){
    global $client;
    return (isset($_COOKIE['acp'][$client['id']][$name]));
  }
	  function get($name){
    global $client;
    return (isset($_COOKIE['acp'][$client['id']][$name]));
  }
	  function destroy($name){
    global $client;
    unset($_COOKIE['acp'][$client['id']][$name]);
    setCookie("acp[".$client['id']."][".$name."]","",time() - 10,"/");
  }
	}
	$cookie = new cookie();
	class session{
	  function add($name,$value){
    global $client;
    $_SESSION['acp'][$client['id']][$name] = $value;
  }
	  function set($name){
    global $client;
    return (isset($_SESSION['acp'][$client['id']][$name]));
  }
	  function get($name){
    global $client;
    return $_SESSION['acp'][$client['id']][$name];
  }
	  function destroy($name){
    global $client;
    unset($_SESSION['acp'][$client['id']][$name]);
  }
	}
	$session = new session();
	class items{
	  function findItemXML($item){
    $file = "";
    $XMLfiles = opendir(PATH_LIBRARIES."xml/items");
    while($XMLfile = readdir($XMLfiles)){
      if($XMLfile != "." && $XMLfile != ".." && $XMLfile != "index.html"){
        $XMLfile = str_replace(".xml","",$XMLfile);
        $range = explode('-',$XMLfile);
        if($item >= $range[0] && $item <= $range[1]){
          $file = $XMLfile.".xml";
          break;
        }
      }
    }
    return $file;
  }
	  function findItemInXML($item_id){
    $itemXML = "";
    $items = simplexml_load_file(PATH_LIBRARIES."xml/items/".$this->findItemXML($item_id));
    foreach($items as $item){
      if($item_id == $item->attributes()->id){
        $itemXML = $item;
      }
    }
    return $itemXML;
  }
	  function getType($item){
    return (string)$item->attributes()->type;
  }
	  function getName($item){
    return (string)$item->attributes()->name;
  }
	  function getIcon($item){
    $item = $item->xpath('set[@name="icon"]');
    if(isset($item[0])){
      return (string)str_replace("icon.","",$item[0]->attributes()->val);
    }else{
      return FALSE;
    }
  }
	  function getStackable($item){
    $item = $item->xpath('set[@name="is_stackable"]');
	    if(!$item){
      return FALSE;
    }
    return (bool)$item[0]->attributes()->val;
  }
	  function getEnchantable($item){
    $item = $item->xpath('set[@name="enchant_enabled"]');
    if(!$item)
      return false;
    return (bool)($item[0]->attributes()->val == 1);
  }
	  function getGrade($item){
    $item = $item->xpath('set[@name="crystal_type"]');
    if(!$item)
      return "none";
    return (string)$item[0]->attributes()->val;
  }
	  function add($itemXML,$item_id,$count,$enchant_level,$enchanted_set){
    global $mysqlClientGameServer;
    global $queryGame;
    global $player;
    global $telnet;
    global $config;
	    if($player['character']['online'] == 1){
      return FALSE;
    }
    if($this->getStackable($itemXML) == 1){
      $itemData = $mysqlClientGameServer->select($queryGame['selectPlayerItemData'],array($player['character']['id'],$item_id));
      if($itemData){
        $up1 = $mysqlClientGameServer->execute($queryGame['updatePlayerItemCount'],array($count,$itemData['object_id']));
        if($up1){
          return TRUE;
        }else{
          return FALSE;
        }
      }else{
        $up2 = $mysqlClientGameServer->execute($queryGame['addItemToPlayerInventory'],array($player['character']['id'],$item_id,$count,$enchant_level,'INVENTORY'));
        if($up2){
          return TRUE;
        }else{
          return FALSE;
        }
      }
    }else{
      for($i = 1; $i <= $count; $i++){
        $up3 = $mysqlClientGameServer->execute($queryGame['addItemToPlayerInventory'],array($player['character']['id'],$item_id,1,$enchant_level,'INVENTORY'));
      }
      if($up3){
        return TRUE;
      }else{
        return FALSE;
      }
    }
  }
	}
	$items = new items();
	class telnet{
	  function give($character,$id,$count){
    $socket = fsockopen($config['mysqlHostname'],$config['telnetPort'],$errno,$errstr,30);
    if($socket){
      fputs($socket,$config['telnetPassword']);
      fputs($socket,"\r\n");
      fputs($socket,"give ".$character." ".$id." ".$count);
      fputs($socket,"\r\n");
      fputs($socket,"exit\r\n");
      while(!feof($socket)){
        $line = fgets($socket,2000);
        if(strstr($line,"Player not found"))
          return false;
      }
      fclose($socket);
      return true;
    }
    return false;
  }
	}
	$telnet = new telnet();
	class credits{
	  function increase($credits){
    global $mysqlClientLoginServer;
    global $queryLogin;
    global $player;
    if(!$mysqlClientLoginServer->execute("UPDATE `acp_players` SET `balance` = balance+? WHERE `account` = ?;",array($credits,$player['account'])))
      exit("REFRESH");
    return true;
  }
	  function reduce($credits){
    global $mysqlClientLoginServer;
    global $queryLogin;
    global $player;
    if($credits == 0){
      return FALSE;
    }
    $reduz = $mysqlClientLoginServer->execute("UPDATE `acp_players` SET `balance` = balance-? WHERE `account` = ?;",array($credits,$player['account']));
    if($reduz){
      return TRUE;
    }else{
      return FALSE;
    }
  }
	}
	$credits = new credits();
?>
	

Link para o comentário
Compartilhar em outros sites

eu uso a lisvus C4 arrumei maior parte do site mais agr ao comprar os itens ele desconta o valor e nao entrega nada vou dar uma lida nesse arquivo ja que ele que e reponsavel pelo ato de entregar items ... obrigado

Especialidade em DataPack / Client

Link para o comentário
Compartilhar em outros sites

 

Alguem sabe outro local de colocar o VoteSystem com esses sistema de chave publica ou alguem ae sabe como retirar isso e colocar outros....

 

Vlw

estou tentando adaptar um script de vote aqui se der certo te passo ele...
alguem ai esta com um problema de nao atualizar o dinheiro depois de comprar algo na loja de itens ?

Especialidade em DataPack / Client

Link para o comentário
Compartilhar em outros sites

  • 1 year later...

 

En 14/7/2016 a las 2:19, VelhoJack dijo:
Fala galera!
Observei que alguns colegas estão tentando utilizar um painel compartilhado em alguns fóruns e neste também, chamado "ACP 3.5" de alguém cujo nick é "TheEngo".
Pois bem. O painel postado aqui anteriormente realmente tem muitos problemas.
Resolvi os problemas que encontrei e deixei bom para uso.
 
Obs: Vi relatos de falha de segurança e etc.. Não executei testes de segurança, pois estou com tempo bem escasso devido a trabalhos. Apenas adicionei uma segurança básica de forma bem rápida. Acredito que com a segurança básica para POST, GET, SESSION, COOKIE, já não permitirá muita coisa que aparentemente estava vulnerável. Mas podem ir informando caso encontrem algum erro ou vulnerabilidade aqui e podemos fixar assim que possível.
 
Adições:
Proteção de variáveis globais básica
Instalação simplificada (Sem necessidade de alterar arquivos manualmente).
Diversas correções no código (Apenas para que fique funcional).
Menu Administração
Configurações de pagamento: Paypal e PagSeguro
Configurações do sistema de votação Rank200
Adição de créditos pela administração (Créditos utilizados para compra de itens e serviços).
Sistema de votos: Rank200 100%.
Tradução 99% (Google Translator).
 
Gravei 2 videos rápidos mostrando como instalar e configurar. Não deixe de conferir.
Aproveitem, e qualquer dúvida, posta ai que assim que puder ajudo sem problemas. ?
 
Links Atualizados 15/08/2016

Link Mega - Link ZippyShare - Link GoogleDrive


Manuais:

Instalação - Configuração



Atualizações:
20/07/2016: Adicionado suporte a L2jDreamV2
10/08/2016: Adicionado suporte a L2jxline
15/08/2016: Reparo de erros relacionados a arquivos JS


Ambiente de testes:
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.23
Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.8
MySQL server version: 5.7.13-log
Créditos
Criação: TheEngo
Resoluções: VelhoJack
 
Senha:rank200
 
 
Breve estarei postando um projeto próprio bem completo aqui no fórum.
Olá, como criar conta de administrador para o painel de controle?
por favor ajude!
Link para o comentário
Compartilhar em outros sites

  • 3 months later...
  • 3 months later...

Warning: simplexml_load_file(D:\xampp\htdocs\dashboard/libraries/xml/items/): failed to open stream: No such file or directory in D:\xampp\htdocs\dashboard\includes\classes.php on line 270

Warning: simplexml_load_file(): I/O warning : failed to load external entity "D:\xampp\htdocs\dashboard/libraries/xml/items/" in D:\xampp\htdocs\dashboard\includes\classes.php on line 270

Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\dashboard\includes\classes.php on line 271

Fatal error: Uncaught Error: Call to a member function xpath() on string in D:\xampp\htdocs\dashboard\includes\classes.php:306 Stack trace: #0 D:\xampp\htdocs\dashboard\templates\itemEnchanter.php(38): items->getEnchantable('') #1 D:\xampp\htdocs\dashboard\index.php(54): require_once('D:\\xampp\\htdocs...') #2 {main} thrown in D:\xampp\htdocs\dashboard\includes\classes.php on line 306

Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...

 

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\painel\includes\itensCons.php on line 17

O unico problema que estou tento é na hora de carregar os itens pra add ao shop (estou usando a rev da aCis)

 

giphy.gif 
Se te ajudei não custa nada Curtir  ou Agradecer😉

Link para o comentário
Compartilhar em outros sites

Same problem 

hace 57 minutos, Albeci Nogueira dijo:

 


Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\painel\includes\itensCons.php on line 17

O unico problema que estou tento é na hora de carregar os itens pra add ao shop (estou usando a rev da aCis)

 

Same

Link para o comentário
Compartilhar em outros sites

Fala Pessoal!
Eu andei meio afastado de games por esses anos, estou meio por fora do que está rolando em Lineage.
Mas vou rodar alguns servidores aqui e reparar esse painel pra galera.
Caso tenham sugestões, podem passar que vou adicionando sempre que tiver um tempinho aqui.
Abraço a todos!

Link para o comentário
Compartilhar em outros sites

  • Registre-se

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






  • Patrocinadores

  • Quem Está Navegando

    • Nenhum usuário registrado visualizando esta página.
  • Posts

    • Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?    
    • muchas gracias muy lindos NPC 🙂
    • relaxa jovem gafanhoto, testa as quests. e posTa os erros indesejaveis.  
    • Se alguém pudesse me ensinar como codificar as missões, eu ficaria feliz em fazer isso sozinho ou pelo menos ajudar. Eu realmente quero jogar em um servidor onde todas as quests funcionem bem e melhor ainda se você puder fazer quests customizadas!
    • mas no interlude, nem todas as quests de class,  vai mostrar onde tem que ir, ate o reborn nao mostrava quando era interlude, só mostrou depois que eles colocaram client classic pra rodar, e ficou melhor ainda quando virou hellbound em diante, mas ha sim alguma chance de modificar isso direto no script para fazer igualmente, só basta te um pouco de paciencia e persistencia exato
    • 408_PathToElvenwizard dá Orion eu tive que mexer tbm, até modifiquei e consegui deixar ela igual do Classic, com a seta e a marcação no mapa. (não retail IL) Dá pra importar py de várias revs, o foda é que não da regular as quest py através do debug em tempo real, pelo menos eu não consegui rsrs
    • Hasta el momento todas las QUESTS son completables si te guias con un tutorial de youtube. El problema es que tienen bugs de locacion y de subquests que no avanzan o no te marcan correctamente a donde ir en el mapa, cosa que en Retail si se ve como corresponde.
    • estranho, mas pelo menos a galera nunca reclamo das quests quando tinha aberto 5x, geral fez class primeira e segunda job, poucos que compraram a class
    • en RUSaCis-3.5 data pack, las Quests estan en formato .java y son diferentes a como estan redactadas en jOrion y jFrozen 1.5 (ProyectX) package net.sf.l2j.gameserver.scripting.quest; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.enums.Paperdoll; import net.sf.l2j.gameserver.enums.QuestStatus; import net.sf.l2j.gameserver.enums.actors.ClassId; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.network.serverpackets.SocialAction; import net.sf.l2j.gameserver.scripting.QuestState; public class Q224_TestOfSagittarius extends SecondClassQuest { private static final String QUEST_NAME = "Q224_TestOfSagittarius"; // Items private static final int BERNARD_INTRODUCTION = 3294; private static final int HAMIL_LETTER_1 = 3295; private static final int HAMIL_LETTER_2 = 3296; private static final int HAMIL_LETTER_3 = 3297; private static final int HUNTER_RUNE_1 = 3298; private static final int HUNTER_RUNE_2 = 3299; private static final int TALISMAN_OF_KADESH = 3300; private static final int TALISMAN_OF_SNAKE = 3301; private static final int MITHRIL_CLIP = 3302; private static final int STAKATO_CHITIN = 3303; private static final int REINFORCED_BOWSTRING = 3304; private static final int MANASHEN_HORN = 3305; private static final int BLOOD_OF_LIZARDMAN = 3306; private static final int CRESCENT_MOON_BOW = 3028; private static final int WOODEN_ARROW = 17; // Rewards private static final int MARK_OF_SAGITTARIUS = 3293; // NPCs private static final int BERNARD = 30702; private static final int HAMIL = 30626; private static final int SIR_ARON_TANFORD = 30653; private static final int VOKIAN = 30514; private static final int GAUEN = 30717; // Monsters private static final int ANT = 20079; private static final int ANT_CAPTAIN = 20080; private static final int ANT_OVERSEER = 20081; private static final int ANT_RECRUIT = 20082; private static final int ANT_PATROL = 20084; private static final int ANT_GUARD = 20086; private static final int NOBLE_ANT = 20089; private static final int NOBLE_ANT_LEADER = 20090; private static final int BREKA_ORC_SHAMAN = 20269; private static final int BREKA_ORC_OVERLORD = 20270; private static final int MARSH_STAKATO_WORKER = 20230; private static final int MARSH_STAKATO_SOLDIER = 20232; private static final int MARSH_STAKATO_DRONE = 20234; private static final int MARSH_SPIDER = 20233; private static final int ROAD_SCAVENGER = 20551; private static final int MANASHEN_GARGOYLE = 20563; private static final int LETO_LIZARDMAN = 20577; private static final int LETO_LIZARDMAN_ARCHER = 20578; private static final int LETO_LIZARDMAN_SOLDIER = 20579; private static final int LETO_LIZARDMAN_WARRIOR = 20580; private static final int LETO_LIZARDMAN_SHAMAN = 20581; private static final int LETO_LIZARDMAN_OVERLORD = 20582; private static final int SERPENT_DEMON_KADESH = 27090; public Q224_TestOfSagittarius() { super(224, "Test Of Sagittarius"); setItemsIds(BERNARD_INTRODUCTION, HAMIL_LETTER_1, HAMIL_LETTER_2, HAMIL_LETTER_3, HUNTER_RUNE_1, HUNTER_RUNE_2, TALISMAN_OF_KADESH, TALISMAN_OF_SNAKE, MITHRIL_CLIP, STAKATO_CHITIN, REINFORCED_BOWSTRING, MANASHEN_HORN, BLOOD_OF_LIZARDMAN, CRESCENT_MOON_BOW); addQuestStart(BERNARD); addTalkId(BERNARD, HAMIL, SIR_ARON_TANFORD, VOKIAN, GAUEN); addMyDying(ANT, ANT_CAPTAIN, ANT_OVERSEER, ANT_RECRUIT, ANT_PATROL, ANT_GUARD, NOBLE_ANT, NOBLE_ANT_LEADER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, MARSH_SPIDER, ROAD_SCAVENGER, MANASHEN_GARGOYLE, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, SERPENT_DEMON_KADESH); } @Override public String onAdvEvent(String event, Npc npc, Player player) { String htmltext = event; QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; // BERNARD if (event.equalsIgnoreCase("30702-04.htm")) { st.setState(QuestStatus.STARTED); st.setCond(1); playSound(player, SOUND_ACCEPT); giveItems(player, BERNARD_INTRODUCTION, 1); if (giveDimensionalDiamonds39(player)) htmltext = "30702-04a.htm"; } // HAMIL else if (event.equalsIgnoreCase("30626-03.htm")) { st.setCond(2); playSound(player, SOUND_MIDDLE); takeItems(player, BERNARD_INTRODUCTION, 1); giveItems(player, HAMIL_LETTER_1, 1); } else if (event.equalsIgnoreCase("30626-07.htm")) { st.setCond(5); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_1, 10); giveItems(player, HAMIL_LETTER_2, 1); } // SIR_ARON_TANFORD else if (event.equalsIgnoreCase("30653-02.htm")) { st.setCond(3); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_1, 1); } // VOKIAN else if (event.equalsIgnoreCase("30514-02.htm")) { st.setCond(6); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_2, 1); } return htmltext; } @Override public String onTalk(Npc npc, Player player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; switch (st.getState()) { case CREATED: if (player.getClassId() != ClassId.ROGUE && player.getClassId() != ClassId.ELVEN_SCOUT && player.getClassId() != ClassId.ASSASSIN) htmltext = "30702-02.htm"; else if (player.getStatus().getLevel() < 39) htmltext = "30702-01.htm"; else htmltext = "30702-03.htm"; break; case STARTED: int cond = st.getCond(); switch (npc.getNpcId()) { case BERNARD: htmltext = "30702-05.htm"; break; case HAMIL: if (cond == 1) htmltext = "30626-01.htm"; else if (cond == 2 || cond == 3) htmltext = "30626-04.htm"; else if (cond == 4) htmltext = "30626-05.htm"; else if (cond > 4 && cond < 8) htmltext = "30626-08.htm"; else if (cond == 8) { htmltext = "30626-09.htm"; st.setCond(9); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_2, 10); giveItems(player, HAMIL_LETTER_3, 1); } else if (cond > 8 && cond < 12) htmltext = "30626-10.htm"; else if (cond == 12) { htmltext = "30626-11.htm"; st.setCond(13); playSound(player, SOUND_MIDDLE); } else if (cond == 13) htmltext = "30626-12.htm"; else if (cond == 14) { htmltext = "30626-13.htm"; takeItems(player, BLOOD_OF_LIZARDMAN, -1); takeItems(player, CRESCENT_MOON_BOW, 1); takeItems(player, TALISMAN_OF_KADESH, 1); giveItems(player, MARK_OF_SAGITTARIUS, 1); rewardExpAndSp(player, 54726, 20250); player.broadcastPacket(new SocialAction(player, 3)); playSound(player, SOUND_FINISH); st.exitQuest(false); } break; case SIR_ARON_TANFORD: if (cond == 2) htmltext = "30653-01.htm"; else if (cond > 2) htmltext = "30653-03.htm"; break; case VOKIAN: if (cond == 5) htmltext = "30514-01.htm"; else if (cond == 6) htmltext = "30514-03.htm"; else if (cond == 7) { htmltext = "30514-04.htm"; st.setCond(8); playSound(player, SOUND_MIDDLE); takeItems(player, TALISMAN_OF_SNAKE, 1); } else if (cond > 7) htmltext = "30514-05.htm"; break; case GAUEN: if (cond == 9) { htmltext = "30717-01.htm"; st.setCond(10); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_3, 1); } else if (cond == 10) htmltext = "30717-03.htm"; else if (cond == 11) { htmltext = "30717-02.htm"; st.setCond(12); playSound(player, SOUND_MIDDLE); takeItems(player, MANASHEN_HORN, 1); takeItems(player, MITHRIL_CLIP, 1); takeItems(player, REINFORCED_BOWSTRING, 1); takeItems(player, STAKATO_CHITIN, 1); giveItems(player, CRESCENT_MOON_BOW, 1); giveItems(player, WOODEN_ARROW, 10); } else if (cond > 11) htmltext = "30717-04.htm"; break; } break; case COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } @Override public void onMyDying(Npc npc, Creature killer) { final Player player = killer.getActingPlayer(); final QuestState st = checkPlayerState(player, npc, QuestStatus.STARTED); if (st == null) return; switch (npc.getNpcId()) { case ANT: case ANT_CAPTAIN: case ANT_OVERSEER: case ANT_RECRUIT: case ANT_PATROL: case ANT_GUARD: case NOBLE_ANT: case NOBLE_ANT_LEADER: if (st.getCond() == 3 && dropItems(player, HUNTER_RUNE_1, 1, 10, 500000)) st.setCond(4); break; case BREKA_ORC_SHAMAN: case BREKA_ORC_OVERLORD: if (st.getCond() == 6 && dropItems(player, HUNTER_RUNE_2, 1, 10, 500000)) { st.setCond(7); giveItems(player, TALISMAN_OF_SNAKE, 1); } break; case MARSH_STAKATO_WORKER: case MARSH_STAKATO_SOLDIER: case MARSH_STAKATO_DRONE: if (st.getCond() == 10 && dropItems(player, STAKATO_CHITIN, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, REINFORCED_BOWSTRING)) st.setCond(11); break; case MARSH_SPIDER: if (st.getCond() == 10 && dropItems(player, REINFORCED_BOWSTRING, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case ROAD_SCAVENGER: if (st.getCond() == 10 && dropItems(player, MITHRIL_CLIP, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, REINFORCED_BOWSTRING, STAKATO_CHITIN)) st.setCond(11); break; case MANASHEN_GARGOYLE: if (st.getCond() == 10 && dropItems(player, MANASHEN_HORN, 1, 1, 100000) && player.getInventory().hasItems(REINFORCED_BOWSTRING, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case LETO_LIZARDMAN: case LETO_LIZARDMAN_ARCHER: case LETO_LIZARDMAN_SOLDIER: case LETO_LIZARDMAN_WARRIOR: case LETO_LIZARDMAN_SHAMAN: case LETO_LIZARDMAN_OVERLORD: if (st.getCond() == 13) { if (((player.getInventory().getItemCount(BLOOD_OF_LIZARDMAN) - 120) * 5) > Rnd.get(100)) { playSound(player, SOUND_BEFORE_BATTLE); takeItems(player, BLOOD_OF_LIZARDMAN, -1); addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } else dropItemsAlways(player, BLOOD_OF_LIZARDMAN, 1, 0); } break; case SERPENT_DEMON_KADESH: if (st.getCond() == 13) { if (player.getInventory().getItemIdFrom(Paperdoll.RHAND) == CRESCENT_MOON_BOW) { st.setCond(14); playSound(player, SOUND_MIDDLE); giveItems(player, TALISMAN_OF_KADESH, 1); } else addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } break; } } }  
×
×
  • 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.