SuperNovaX Posted January 9, 2008 Share Posted January 9, 2008 This is what i get, when its supposed to be buff selection :((( heres the code, there was buffs avaible if char is 40lvl or more i changed to 40lvl or less, but i guess something went wrong? if some1 could tell me what ??? 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_NPCBuffer" NPC=[40005] ADENA_ID=57 QuestId = 9998 QuestName = "NPCBuffer" QuestDesc = "custom" InitialHtml = "1.htm" print "importing custom: 9998: NPCBuffer" 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(ADENA_ID) if count < 150000 or st.getPlayer().getLevel() > 40 : htmltext = "<html><head><body>You dont have enough Adena,<br> or your level is too low. You must be 40 or lower.</body></html>" else: st.takeItems(ADENA_ID,0) st.getPlayer().setTarget(st.getPlayer()) if event == "2": st.takeItems(ADENA_ID,16000000) st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4360,3),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4359,3),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4358,3),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4357,2),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4354,4),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4353,6),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4350,4),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4347,6),False,False) st.getPlayer().restoreHPMP() return "4.htm" st.setState(COMPLETED) if event == "3": st.takeItems(ADENA_ID,8000000) st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4352,2),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4351,6),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4355,3),False,False) st.getPlayer().restoreHPMP() st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4356,3),False,False) st.getPlayer().restoreHPMP() return "4.htm" 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>I have nothing to say to you</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 NPC: QUEST.addStartNpc(npcId) QUEST.addTalkId(npcId) Link to comment Share on other sites More sharing options...
DrenepiaWorld Posted January 9, 2008 Share Posted January 9, 2008 if count < 150000 or st.getPlayer().getLevel() < 1 : try this one...it works for me like that :P Link to comment Share on other sites More sharing options...
SuperNovaX Posted January 9, 2008 Author Share Posted January 9, 2008 ah,,, the buffer is for players with 40lvl or lower, not for 1lvl and lower O_O Link to comment Share on other sites More sharing options...
eKo Posted January 9, 2008 Share Posted January 9, 2008 look at your html strings. Link to comment Share on other sites More sharing options...
Candy Posted January 9, 2008 Share Posted January 9, 2008 i know a C5 code, but if it works or not is another thing, try it: if count < 150000 or st.getPlayer().getLevel() > 1/40 : Link to comment Share on other sites More sharing options...
Sunrise-networkz.com Posted January 9, 2008 Share Posted January 9, 2008 or just remove that line and dont have any problems left? no wait, you should stop running a server! Link to comment Share on other sites More sharing options...
Anghel Posted January 9, 2008 Share Posted January 9, 2008 or just remove that line and dont have any problems left? no wait, you should stop running a server! Shut up... we are no pro only community ...take ur damn words stricktly... none said that to run a server u must be the best of the best.... if it was so only official would exist..... Be polite with the others and btw do u have a server? i cab see that ur server is the perfect one ,...tell me how to join plz...if u are so cool and proffesional ..than i wanna join ,... really.... idiot.... By anghel... PS.oxi maxtor den thelw flame section..kai sorry pou to kana edw alla tou aksizi tou typou!!! palio pseftomaga norvige na poume..... Link to comment Share on other sites More sharing options...
Anghel Posted January 9, 2008 Share Posted January 9, 2008 if count < 150000 or st.getPlayer().getLevel() < 1 : try this one...it works for me like that :P for me too..it works ok... EDIT: ox ekana vlakia plz a moderator merge my replies and remove one post from me.... thank you Link to comment Share on other sites More sharing options...
nazghoul Posted January 9, 2008 Share Posted January 9, 2008 Anghel COOOOOOOOOOOOOL the next one of these kind is -1karma.. problem solved topic locked if SuperNovaX wants me to unlock the topic for any reason pm me .. Link to comment Share on other sites More sharing options...
Recommended Posts