Jump to content

  • 0

Adaptar Script



Bom dia, boa tarde e boa noite!

(a depender do período do dia que você veja o post)

Tenho tentado sem sucesso fazer com que este script que concede Donator Status enquanto o player estiver online passe a conceder por dias.

Visto que esse MOD vem de base em todas as Frozen, seria uma mão na roda para aqueles que não tem o MOD VIP em sua revisão e não sabe como compilar (assim como eu)

Agradeço desde já a ajuda.

Abaixo segue o Script, contém a autoria e foi retirado de um projeto do Onã aqui mesmo do fórum.



#Created By Cheed!!!

import sys
from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance
from java.util import Iterator
from com.l2jfrozen.util.database import L2DatabaseFactory
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen import Config
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest
from com.l2jfrozen.gameserver.datatables import SkillTable
from com.l2jfrozen.gameserver.network.serverpackets import SocialAction
from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

qn = "50029_DonatorSeller"


#ID Item
#QTD Item

QuestId     = 50029
QuestName   = "DonatorSeller"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "INFO  DonatorSeller==> ON"

class Quest (JQuest) :

 def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
 def onAdvEvent (self,event,npc,player) :
    htmltext = event
    st = player.getQuestState(qn)
    if not st: return

    def doDonator(player,days) :

    if event == "1" :
     if st.getPlayer().isDonator():
      return "no.htm"
     else :
        if st.getQuestItemsCount(ITEM_ID) >= ITEM_QTD :
                  st.player.sendMessage("Parabens Voce ganhou Status Donator!")
                  return "1.htm"
         st.player.sendMessage("Voce Nao Tem Itens Suficiente!")
         return "1.htm"
    return htmltext        
 def onTalk (self,npc,player):
        htmltext = "<html><head><body>You can't buy while you are</body></html>"
        st = player.getQuestState(qn)
        if not st : return htmltext
        npcId = npc.getNpcId()        
        if st.player.getPvpFlag() > 0 :#Player Flag
            htmltext = "<html><head><body>You can't buy while you are <font color=\"800080\">flagged!</font><br>Wait some time and try again!</body></html>"
        elif st.player.getKarma() > 0 :#Player com Karma
            htmltext = "<html><head><body>You have too much <font color=\"FF0000\">karma!</font><br>Come back,<br>when you don't have any karma!</body></html>"
        elif st.player.isInCombat() :#Player modo de Combate
            htmltext = "<html><head><body>You can't buy while you are attacking!<br>Stop your fight and try again!</body></html>"
            return InitialHtml
        return htmltext

QUEST = Quest(50029,qn,"custom")
CREATED     = State('Start', QUEST)
STARTING    = State('Starting', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)

for npcId in NPC:


Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.

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.

  • Join now

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

  • 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.