Jump to content
  • 0

Question

Posted

hello, I have a question.... I have a NPC on my server , that you get clan Points and Clan lvl 8...

But the problem is you can get only one time Clan points to one Clan.

How I can make it , that you can get how much times you want Clan points`?

 

Here is the _init_

 

  Quote
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.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "6667_ClanManager"

 

NPC=[66667]

REQUESTED_ITEM=9883

REQUESTED_AMOUNT=2000

NEW_REP_SCORE=5000

QuestId     = 6667

QuestName   = "ClanManager"

QuestDesc   = "custom"

InitialHtml = "66667-1.htm"

 

print "Clan Manager (66667) Enabled..."

 

class Quest (JQuest) :

 

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

 

def onEvent(self,event,st):

              htmltext = "<html><head><body>I have nothing to say you</body></html>"

              count=st.getQuestItemsCount(REQUESTED_ITEM)

              if event == "66667-clanOk.htm" :

                  if st.getPlayer().isClanLeader() and st.getPlayer().getClan().getLevel()<8:

                      if st.getPlayer().isNoble() and count >= REQUESTED_AMOUNT:

                           htmltext=event

                           st.getPlayer().getClan().changeLevel(8)

                           st.playSound("ItemSound.quest_finish")

                           st.takeItems(REQUESTED_ITEM,REQUESTED_AMOUNT)

                      else :

                           htmltext="66667-no_clan.htm"

                           st.exitQuest(1)

                  else :

                      htmltext="66667-no_clan.htm"

                      st.exitQuest(1)

              elif event == "66667-repOk.htm" :

                  if st.getPlayer().isClanLeader() and st.getPlayer().getClan().getLevel() >= 5 and st.getPlayer().getClan().getReputationScore() < NEW_REP_SCORE :

                      if st.getPlayer().isNoble() and count > REQUESTED_AMOUNT:

                           htmltext=event

                           st.getPlayer().getClan().setReputationScore(NEW_REP_SCORE, 1);

                           st.playSound("ItemSound.quest_finish")

                           st.takeItems(REQUESTED_ITEM,REQUESTED_AMOUNT)

                      else :

                           htmltext="66667-no_points.htm"

                           st.exitQuest(1)

                  else :

                      htmltext="66667-no_points.htm"

                      st.exitQuest(1)

              return htmltext

 

def onTalk (self,npc,player):

  htmltext = "<html><head><body>I have nothing to say you</body></html>"

          st = player.getQuestState(qn)

          if not st : return htmltext

          npcId = npc.getNpcId()

          id = st.getState()

          if id == CREATED :

              htmltext="66667-1.htm"

          elif id == COMPLETED :

              htmltext = "<html><head><body>This quest have already been completed.</body></html>"

          else :

              st.exitQuest(1)

          return htmltext

 

 

QUEST = Quest(6667,qn,"custom")

CREATED     = State('Start', QUEST)

STARTING    = State('Starting', QUEST)

STARTED     = State('Started', QUEST)

COMPLETED   = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

 

for npcId in NPC:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)

 

 

 

I hope some one have better knewlege on scrips then Im, and can help me :) Thanks

4 answers to this question

Recommended Posts

  • 0
Posted

In your script, when trying to add rep points, this is the first check it gotta pass  before add points

 

if st.getPlayer().isClanLeader() and st.getPlayer().getClan().getLevel() >= 5 and st.getPlayer().getClan().getReputationScore() < NEW_REP_SCORE :

 

It checks that the clan is level 5 or below and your clan rep points are below 5000 points.

Just erase the clan level and clan points check or just the points check, which is:

and st.getPlayer().getClan().getReputationScore() < NEW_REP_SCORE

  • 0
Posted

hmm maybe you not understand me... The problem is not the Clan lvl... , I mean ; If I do this one time .. I can't do it again.

1 Clan = 1x Clan Points

but I want ,

1 Clan = 99999999x Clan Point (how much you want)

 

anyway I have try it with your code, but I can't make it more then 1x :/

 

Thanks, for your answer

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.



  • Posts

    • Added: Promo Code System An admin can add promo codes from the admin panel. Promo code example: VIPBONUS777 Item ID and quantity, multiple gifts can be added Total number of promo codes issued (0 = unlimited) Promo code start date Promo code expiration date User verification and IP check   View demo: Demo  
    • SocNet is looking for new suppliers! — Snapchat accounts  — Reddit accounts with karma  — LinkedIn accounts with real connections Message us or contact support — let’s discuss terms! We’re also open to other partnership opportunities. Our Online Store Offers: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers SMM Panel Services: ➡ Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off) Get $1 trial balance for the SMM Panel: Submit a ticket titled “Get Trial Bonus” via our website (Support) ➡ Go to the SMM Panel (clickable) or contact us through the bot Our Key Products: ➡ Online Store: Click ➡ Telegram Shop Bot: Click ➡ SMM Panel: Click Payments accepted: Bank cards · Crypto · Other popular methods Returning buyers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss bulk orders — Form partnerships (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your digital goods & subscription store
    • SocNet is looking for new suppliers! — Snapchat accounts  — Reddit accounts with karma  — LinkedIn accounts with real connections Message us or contact support — let’s discuss terms! We’re also open to other partnership opportunities. Our Online Store Offers: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers SMM Panel Services: ➡ Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off) Get $1 trial balance for the SMM Panel: Submit a ticket titled “Get Trial Bonus” via our website (Support) ➡ Go to the SMM Panel (clickable) or contact us through the bot Our Key Products: ➡ Online Store: Click ➡ Telegram Shop Bot: Click ➡ SMM Panel: Click Payments accepted: Bank cards · Crypto · Other popular methods Returning buyers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss bulk orders — Form partnerships (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your digital goods & subscription store
    • SocNet is looking for new suppliers! — Snapchat accounts  — Reddit accounts with karma  — LinkedIn accounts with real connections Message us or contact support — let’s discuss terms! We’re also open to other partnership opportunities. Our Online Store Offers: ➡ Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads ➡ Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass ➡ Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers SMM Panel Services: ➡ Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off) Get $1 trial balance for the SMM Panel: Submit a ticket titled “Get Trial Bonus” via our website (Support) ➡ Go to the SMM Panel (clickable) or contact us through the bot Our Key Products: ➡ Online Store: Click ➡ Telegram Shop Bot: Click ➡ SMM Panel: Click Payments accepted: Bank cards · Crypto · Other popular methods Returning buyers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Discuss bulk orders — Form partnerships (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your digital goods & subscription store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock