Jump to content
  • 0
Sign in to follow this  
Luan.silva-

Modificar Script L2jDream

Question

Ola, seria possível modificar esse script para que ele entregue as arma hero já enchantada? se alguém poder me ajudar ficarei muito grato. 

# Made by DrLecter
import sys
from com.dream.game.model.quest        import State
from com.dream.game.model.quest        import QuestState
from com.dream.game.model.quest.jython import QuestJython as JQuest
from com.dream.game.datatables.sql     import ItemTable

qn = "7000_HeroItems"

MONUMENTS = [31690]+range(31769,31773)

HERO_ITEMS={
6611:["weapon_the_sword_of_hero_i00","Infinity Blade","During a critical attack, decreases one's P. Def and increases de-buff casting ability, damage shield effect, Max HP, Max MP, Max CP, and shield defense power. Also enhances damage to target during PvP.","379/169","Sword"],
6612:["weapon_the_two_handed_sword_of_hero_i00","Infinity Cleaver","Increases Max HP, Max CP, critical power and critical chance. Inflicts extra damage when a critical attack occurs and has possibility of reflecting the skill back on the player. Also enhances damage to target during PvP.","461/169","Double Handed Sword"],
6613:["weapon_the_axe_of_hero_i00","Infinity Axe","During a critical attack, it bestows one the ability to cause internal conflict to one's opponent. Damage shield function, Max HP, Max MP, Max CP as well as one's shield defense rate are increased. It also enhances damage to one's opponent during PvP.","379/169","Blunt"],
6614:["weapon_the_mace_of_hero_i00","Infinity Rod","When good magic is casted upon a target, increases MaxMP, MaxCP, Casting Spd, and MP regeneration rate. Also recovers HP 100% and enhances damage to target during PvP.","303/226","Blunt"],
6615:["weapon_the_hammer_of_hero_i00","Infinity Crusher","Increases MaxHP, MaxCP, and Atk. Spd. Stuns a target when a critical attack occurs and has possibility of reflecting the skill back on the player. Also enhances damage to target during PvP.","461/169","Blunt"],
6616:["weapon_the_staff_of_hero_i00","Infinity Scepter","When casting good magic, it can recover HP by 100% at a certain rate, increases MAX MP, MaxCP, M. Atk., lower MP Consumption, increases the Magic Critical rate, and reduce the Magic Cancel. Enhances damage to target during PvP.","369/226","Blunt"],
6617:["weapon_the_dagger_of_hero_i00","Infinity Stinger","Increases MaxMP, MaxCP, Atk. Spd., MP regen rate, and the success rate of Mortal and Deadly Blow from the back of the target. Silences the target when a critical attack occurs and has Vampiric Rage effect. Also enhances damage to target during PvP.","332/169","Dagger"],
6618:["weapon_the_fist_of_hero_i00","Infinity Fang","Increases MaxHP, MaxMP, MaxCP and evasion. Stuns a target when a critical attack occurs and has possibility of reflecting the skill back on the player at a certain probability rate. Also enhances damage to target during PvP.","461/169","Dual Fist"],
6619:["weapon_the_bow_of_hero_i00","Infinity Bow","Increases MaxMP/MaxCP and decreases re-use delay of a bow. Slows target when a critical attack occurs and has Cheap Shot effect. Also enhances damage to target during PvP.","707/169","Bow"],
6620:["weapon_the_dualsword_of_hero_i00","Infinity Wing","When a critical attack occurs, increases MaxHP, MaxMP, MaxCP and critical chance. Silences the target and has possibility of reflecting the skill back on the target. Also enhances damage to target during PvP.","461/169","Dual Sword"],
6621:["weapon_the_pole_of_hero_i00","Infinity Spear","During a critical attack, increases MaxHP, Max CP, Atk. Spd. and Accuracy. Casts dispel on a target and has possibility of reflecting the skill back on the target. Also enhances damage to target during PvP.","379/169","Pole"]
}

def render_list(mode,item) :
  html = "<html><body><font color=\"LEVEL\">List of Hero Items:</font><table border=0 width=300>"
  if mode == "list" :
    for i in HERO_ITEMS.keys() :
      html += "<tr><td width=35 height=45><img src=icon."+HERO_ITEMS[i][0]+" width=32 height=32 align=left></td><td valign=top><a action=\"bypass -h Quest 7000_HeroItems "+str(i)+"\"><font color=\"FFFFFF\">"+HERO_ITEMS[i][1]+"</font></a></td></tr>"
  else :
    html += "<tr><td align=left><font color=\"LEVEL\">Item Information</font></td><td align=right>\
<button value=Back action=\"bypass -h Quest 7000_HeroItems buy\" width=80 height=27 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normal>\
</td><td width=5><br></td></tr></table><table border=0 bgcolor=\"000000\" width=500 height=160><tr><td valign=top>\
<table border=0><tr><td valign=top width=35><img src=icon."+HERO_ITEMS[item][0]+" width=32 height=32 align=left></td>\
<td valign=top width=400><table border=0 width=100%><tr><td><font color=\"FFFFFF\">"+HERO_ITEMS[item][1]+"</font></td>\
</tr></table></td></tr></table><br><font color=\"LEVEL\">Item info:</font>\
<table border=0 bgcolor=\"000000\" width=290 height=220><tr><td valign=top><font color=\"B09878\">"+HERO_ITEMS[item][2]+"</font>\
</td></tr><tr><td><br>Type: "+HERO_ITEMS[item][4]+"<br><br>Patk/Matk: "+HERO_ITEMS[item][3]+"<br><br>\
<table border=0 width=300><tr><td align=center><button value=Obtain action=\"bypass -h Quest 7000_HeroItems _"+str(item)+"\" width=80 height=27 back=L2UI_ch3.Btn1_normalOn fore=L2UI_ch3.Btn1_normal></td></tr></table></td></tr></table></td></tr>"
  html += "</table></body></html>"
  return html

class Quest (JQuest) :

 def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 def onEvent (self,event,st) :
   if st.getPlayer().isHero() :
     if event == "buy" :
       htmltext = render_list("list",0)
     elif event.isdigit() and int(event) in HERO_ITEMS.keys() :
       htmltext = render_list("item",int(event))
     elif event.startswith("_") :
       item = int(event.split("_")[1])
       for i in range(6611,6622) :
         if st.getQuestItemsCount(i) :
           st.exitQuest(1)
           return "You already have an "+HERO_ITEMS[i][1]
       st.giveItems(item,1)
       htmltext = "Enjoy your "+HERO_ITEMS[item][1]
       st.playSound("ItemSound.quest_fanfare_2")
       st.exitQuest(1)
   return htmltext

 def onTalk (Self,npc,player) :
   st = player.getQuestState(qn)
   htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
   if player.isHero() :
     htmltext = render_list("list",0)
   else :
     html = "<html><body>Monument of Heroes:<br>You do not meet the requirements. You must become a Hero first!<br><a action=\"bypass -h npc_%objectId%_Chat 0\">Back</a></body></html>"
     htmltext = html.replace("%objectId%",str(npc.getObjectId()))
     st.exitQuest(1)
   return htmltext

QUEST       = Quest(7000,qn,"Hero Items")

for i in MONUMENTS:
    QUEST.addStartNpc(i)
    QUEST.addTalkId(i)

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

a linha 

st.giveItems(item,1)

A linha que entrega o item, vc tera que checar se na sua source exiets um metodo " giveItems(int ...,int ..., int...) se existe essa linha ai deve virar exemplo se quer que o item seja entregue +16 

st.giveItems(item,1, 16)  sendo     (iddoItem, quantidade, enchat)

se nao houver vc tem que escrever. Fiz isos a muitos anos no peniel

  • Thanks 1

" 100 Flexões, 100 Abdominais, 100 Agachamentos e 10 Quilômetros de Corrida !!! " - Todos os dias.

L2Peniel

Share this post


Link to post
Share on other 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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  




     



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • opa pega no Cliente C6 do interlude normal?
    • Post Atualizado com varias correções e foi implementado o Elemental Spirits. 
    • sim, sai atualizacoes diariamente, o open source deles 'e a cada sei la quantos meses =p
    • Uma duvida, tu paga por essa pack ? A Mobius tem source open até onde eu sabia Oo 
    • Tem que ser o JAVA que ta no post sim, pode ser o navicat esse msm, agora o Editor da System tem que ver, e sim funciona em Windows 10
    • Boa noite, sou leigo, pego rev e fico editando a meu gosto e brincando um pouco mudando algumas coisas, gostaria de ver essa rev, eu uso esse  javaque está no post e o navicat 8.0 ? qual editor pra system? ? Valeu pela postagem, não sou profissional, não tenho muito tempo, mas gosto de brincar um pouco!  EDIT: será que funciona no win 10?
    • Post Atualizado com a versão mais recente da REV. Teve diversos updates em trilhões de arquivos... Sobre mobs invisiveis, acredito que possa ser a system que nao esteja completa, testa essa aqui System!  É a system do Kharyus talvez funcione, nao sei...
    • Hola amigos ami me esta dando errores al querer logear una cuenta 😪 C:\xampp\htdocs\Full Web\classes\banco.class.php:24 Stack trace: #0 C:\xampp\htdocs\Full Web\classes\banco.class.php(16): banco->conecta() #1 C:\xampp\htdocs\Full Web\classes\accounts.class.php(6): banco->__construct() #2 C:\xampp\htdocs\Full Web\modulos\usuarios.php(16): accounts->__construct() #3 C:\xampp\htdocs\Full Web\funcoes.php(47): include_once('C:\\xampp\\htdocs...') #4 C:\xampp\htdocs\Full Web\index.php(531): loadmodulo('usuarios', 'login') #5 {main} thrown in C:\xampp\htdocs\Full Web\classes\banco.class.php on line 24
    • Bug: Forgotten Temple - Mobs Death Fire e Fire Archer ( MOBS INVISÍVEIS E AGRESSIVOS QUE TE ATACAM E VC NAO CONSEGUE PEGAR TARGET PARA MATA-LOS ENTÃO VC MORRE) o ID do Fire Archer é 20750 porém não consegui encontrar o arquivo do spawn dele. talvez o bug possa estar aqui:     <npc id="20749" level="32" type="Monster" name="Death Fire">     <npc id="20750" level="29" type="Monster" name="Fire Archer"> aqui no meu pack eu deletei os minions do death fire ai parou meu problema de morrer pro mob invisivel. DELETE ISSO AQUI:             <minions name="Privates">                 <npc id="20750" count="2" respawnTime="0" weightPoint="1" />             </minions> Os mobs Roxide's Follower tbm está invisível.  Outro mob invisível: Swamp Warrior em Aligator Island ( lembro que tem um mob invisivel em ant nest tbm mais nao lembro o nome agora. ) ( eu deletei eles aqui no meu sv. pelo menos nao vai ter mais mob invisivel ) Outro erro: Joia zaken está dando uma skill com o nome Orfen, e essa skill é bugada, quando tenta usar ela da erro no servidor inteiro. ( e so vc remover essa skill la no item no arquivo do zaken earring ) Outro erro: ( e so trocar as skills, isso se tiver adicionado no sv, ainda nao deu tempo de eu ver isso ) as jóias tops do baium e queen ant se não me engano estão dando a skill passiva do damaged baium que é aquele baium que nem presta... resumindo o baium só ta dando +1 de bleed. ( vou tentar arrumar isso aqui agora...) Só contando pra vcs os erros que tem.. quem quiser anota ai!!!
×
×
  • Create New...