Jump to content

[interlude] Npc Vip


Walef Oliveira

Recommended Posts

Galera estou desinvolvendo 1 Teleport Vip Ja arrumei a area Vip , O Npc Teleport Agora So falta por o teleport para cobrar 1 certo item Vip ou teleportar por accs lvl se alguem quiser me ajuduar a desenvolver esse Npc mande 1 MP pq vai servir para varios membros pq tem varios membros atraz dico Grato.

Em Breve L2 BlackWidow Ultimate

Link to comment
Share on other sites


# ####################

# Created by KhayrusS #

# ####################

import sys

from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance

from java.util import Iterator

from net.sf.l2j.gameserver.datatables import SkillTable

from net.sf.l2j import L2DatabaseFactory

from net.sf.l2j.gameserver.model.quest import State

from net.sf.l2j.gameserver.model.quest import QuestState

from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "9998_KhayraTeleport"

 

KHAYRA=[55400]

ANCIENT_GOLD=9999

QuestId = 9998

QuestName = "KhayraTeleport"

QuestDesc = "custom"

InitialHtml = "1.htm"

 

print "importing custom: 9998: KhayraTeleport"

 

class Quest (JQuest) :

 

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

 

 

def onEvent(self,event,st):

htmltext = event

count=st.getQuestItemsCount(ANCIENT_GOLD)

if count < 0 :

htmltext = "<html><head><body>Voce Nao tem Ancient Gold suficiente, volte quando tive<br>Obrigada Volte Sempre<br></body></html>"

else:

st.takeItems(ANCIENT_GOLD,0)

st.getPlayer()

 

if event == "1" and count >= 10:

st.takeItems(ANCIENT_GOLD,10)

st.getPlayer().teleToLocation(48000,243376,-6611)

st.setState(COMPLETED)

 

 

if htmltext != event:

st.setState(COMPLETED)

st.exitQuest(1)

return htmltext

 

 

def onTalk (self,npc,player):

st = player.getQuestState(qn)

htmltext = "<html><head><body>Eu nao tenho nada para dizer para voce</body></html>"

st.setState(STARTED)

return InitialHtml

 

QUEST=Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

CREATED=State('Start',QUEST)

STARTED=State('Started',QUEST)

COMPLETED=State('Completed',QUEST)

 

QUEST.setInitialState(CREATED)

 

for npcId in KHAYRA:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)

 

Esse eu fiz para interlude mas acho que dá pra ser modificado e usado para Gracia tbm

 

A parte essencial do Script é essa

 

st.getPlayer().teleToLocation(48000,243376,-6611)

 

onde vc poderá adicionar qualquer outro lugar lembrando que é usado as coordenadas como x,y,z

 

Mas acho que para vc editar isso tenha que conhecer pelo menos um pouco do "Script"

Link to comment
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
Reply to this topic...

×   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...
  • Join now

    Be part of the largest and oldest communities about Lineage2 in Latin America.





  • Patrocinadores

  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Interessante esse projeto, parabéns @BAN - L2JDev
    • Boa noite alguém pode me manda os arquivos da coroa hero preta??
    • @Kelvin, mesmo efetuando o download do plugin acima, ou trazendo ele junto com a importação do kit, não trouxe os cabeçalhos e rodapés. O que poderia ser?
    • ta dando esse erro ao tentar donatar, alguem sabe como resolver? Edit: o Pagseguro e Paypal estão da mesma forma  O sistema de doação não esta funcionando.  
    • Hola, lo tienen para acis 382, esa version me anda para probar
    • BAN NÃO TOU CONSGUINDO TER ACESSO... TOU SEM O PATCH PODERIA DISPONIBILIZAR ?
    • Hola, ¿tienes un comando de voz para este código?      package net.sf.l2j.gameserver.taskmanager;   import java.util.logging.Logger; import net.sf.l2j.Config; import net.sf.l2j.commons.util.ArraysUtil; import net.sf.l2j.gameserver.enums.ZoneId; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.model.holder.IntIntHolder; import net.sf.l2j.gameserver.skills.L2Skill; import net.sf.l2j.gameserver.skills.effects.EffectTemplate; public class AutoPotionTask implements Runnable  {     protected static final Logger _log = Logger.getLogger(AutoPotionTask.class.getName());     private int itemId;     private Player player;     private static final int[] HP_POTION_SKILL_IDS = new int[]{2031, 2032, 2037};     public AutoPotionTask(int itemId, Player player)      {         this.itemId = itemId;         this.player = player;     }     @Override     public void run()      {         if (player.isInOlympiadMode())          {             player.sendMessage("You cannot that in olympiad mode.");             player.stopAutoPotion(itemId);             return;         }                  if (player.isInJail() || player.isInsideZone(ZoneId.JAIL))          {             player.sendMessage("You cannot that in Jail mode.");             return;         }         if (Config.AUTO_POTIONS_LIMITS.containsKey(itemId))          {             String type = ((String[])Config.AUTO_POTIONS_LIMITS.get(itemId))[0];             int val = Integer.parseInt(((String[])Config.AUTO_POTIONS_LIMITS.get(itemId))[1]);             switch (type)              {                 case "CP":                 {                     if (!(player.getStatus().getCp() / (double)player.getStatus().getMaxCp() * 100.0 > (double)val)) break;                     return;                 }                 case "HP":                  {                     if (!(player.getStatus().getHp() / (double)player.getStatus().getMaxHp() * 100.0 > (double)val)) break;                     return;                 }                 case "MP":                  {                     if (!(player.getStatus().getMp() / (double)player.getStatus().getMaxMp() * 100.0 > (double)val)) break;                     return;                 }             }         }         if (!player.destroyItemByItemId("auto potion use", itemId, 1, null, true))          {             player.stopAutoPotion(itemId);             player.sendMessage("Incorrect item count.");             return;         }         if (player.getInventory().getItemByItemId(itemId) == null)          {             player.stopAutoPotion(itemId);             return;         }         IntIntHolder[] skills = player.getInventory().getItemByItemId(itemId).getEtcItem().getSkills();         if (skills == null)          {             _log.info("{} doesn't have any registered skill for handler." + player.getInventory().getItemByItemId(itemId).getName());             return;         }         for (IntIntHolder skillInfo : skills)          {             EffectTemplate template;             L2Skill itemSkill;             if (skillInfo == null || (itemSkill = skillInfo.getSkill()) == null) continue;             if (!itemSkill.checkCondition((Creature)player, (Creature)player, false))              {                 return;             }             if (player.isSkillDisabled(itemSkill))             {                 return;             }             if (itemSkill.isPotion() || itemSkill.isSimultaneousCast())              {                 player.getAI().tryToCast((Creature)player, itemSkill, false, false, itemId);             }              else              {                 player.getAI().tryToCast((Creature)player, itemSkill, false, false, itemId);             }             int skillId = skillInfo.getId();             if (!ArraysUtil.contains((int[])HP_POTION_SKILL_IDS, (int)skillId) || skillId < player.getShortBuffTaskSkillId() || (template = (EffectTemplate)itemSkill.getEffectTemplates().get(0)) == null) continue;             player.shortBuffStatusUpdate(skillId, skillInfo.getValue(), template.getCounter() * template.getPeriod());         }     }     public int getItemId()      {         return itemId;     } }  
    • @Ivan Pires como está as entregas automáticas desse painel?
×
×
  • Create New...

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.