- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..
Question
sakisd
hi all exw auto to scriptaki gia na kanoun oi caln leader antalagh festival adena me reputation points
import sys from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jserver.gameserver.network.serverpackets import SystemMessage qn = "9995_ReputationManager" #NPC BRICE = 9995 #ITEMS EUROS = 6673 #HTML HTMLEXPLAIN = "<html><body>Brice:<BR>Wow ! You have some Event Coins for me ? You can exchange them for Clan Reputation points. But be careful, I'll take 3 Coins, 3 for 5000 Clan Reputation Points. Do you really want to continue ?<BR><a action=\"bypass -h Quest 9995_ReputationManager 1\">Yes, I need Clan Reputation points</a></body></html>" HTMLNOLEADER = "<html><body>Brice:<BR>Hey, you're not a clan leader at all. Go away from me, liar !</body></html>" HTMLCLANLVL = "<html><body>Brice:<BR>Hum, it seems your clan is not strong enough to receive my benediction. Come back when your clan level is lv5.</body></html>" HTMLNOGOLD = "<html><body>Brice:<BR>What do you want to do ? Do you want to receive my benediction for free ? Bring me back some Coins, and maybe, I will trade with you.</body></html>" HTMLOK = "<html><body>Brice:<BR>Thanks to you for this present, I give you Clan Reputation Points. Please, come again if you have any Coins to exchange.</body></html>" class Quest (JQuest) : def __init__(self,id,name,descr) : JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : htmltext = "<html><body>I have no task right for you now.</body></html>" if event == "1" : if st.getPlayer().getClan() == None or st.getPlayer().isClanLeader() == 0 : # player is not in clan or is not clan leader htmltext = HTMLNOLEADER st.exitQuest(1) return htmltext else : if st.getPlayer().getClan().getLevel() < 5 : # player's clan is under lv5 htmltext = HTMLCLANLVL st.exitQuest(1) return htmltext else : if st.getQuestItemsCount(EUROS) == 3: # player have some EUROS, the script take all of them st.getPlayer().sendPacket(SystemMessage(1777).addNumber( st.getQuestItemsCount(EUROS)+ 5000 )) st.getPlayer().getClan().setReputationScore( st.getPlayer().getClan().getReputationScore() + st.getQuestItemsCount(EUROS)+ 5000 , True) st.takeItems(EUROS, st.getQuestItemsCount(EUROS)) htmltext = HTMLOK st.exitQuest(1) return htmltext else : # player haven't EUROS htmltext = HTMLNOGOLD st.exitQuest(1) return htmltext return htmltext def onTalk(self,npc,player) : st = player.getQuestState(qn) if not st : return "<html><body>I have nothing to say to you.</body></html>" npcId = npc.getNpcId() if npcId == BRICE : # first click, default script text after the first in /html/default/ folder st.set("cond","0") htmltext = HTMLEXPLAIN return htmltext QUEST = Quest(9995,qn,"ReputationManager") QUEST.addStartNpc(BRICE) QUEST.addTalkId(BRICE)alla otan milaw sto npc exw auto sto gameserver console :
Mporei Kaneis na helparei???
4 answers to this question
Recommended Posts