-
Posts
566 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by aris96
-
i tryied to add st.giveItems(57,82000) to another quest which already gives xp/sp but again i get the same error.
-
i checked another quest that gives exp/sp and it is the same
-
same error again: Error on: C:\Users\User01\Desktop\server test\gameserver\data\scripts\quests\640_TheZeroHour\__init__.py.error.LOGGER Line: -1 - Column: -1 Traceback (innermost last): (no code object) at line 0 SyntaxError: ('invalid syntax', ('__init__.py', 43, 25, '\t\t\tst.AddExpAndSp(3463463,2324)'))
-
in which part you suggest me to add this?
-
here it is where i added it: http://postimg.org/image/4vqpq8ykr/full/ and thats the error i get now : Error on: C:\Users\User01\Desktop\server test\gameserver\data\scripts\quests\640_TheZeroHour\__init__.py.error.LOGGER Line: -1 - Column: -1 Traceback (innermost last): (no code object) at line 0 SyntaxError: ('invalid syntax', ('__init__.py', 43, 25, '\t\t\tst.addExpAndSp(50,0)'))
-
i am trying to make after this quest completed player get exp/sp as a reward too but always throws me an error. in which part of the quest i must put st.addExpAndSp(0,0) or should i put something else? quest: # Made by Kerberos v1.0 on 2009/05/08 # this script is part of the Official L2J Datapack Project. # Visit http://www.l2jdp.com/forum for more details. import sys from com.l2jfrozen import Config 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 = "640_TheZeroHour" #NPC Kahman = 31554 #MONSTERS MONSTERS = range(22105,22112)+range(22113,22120)+[22121] #ITEMS Fang = 57 REWARDS={ "1":[500 ,7575, 1], "2":[500 ,6579, 1], } class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.questItemIds = [Fang] def onAdvEvent (self,event,npc, player) : htmltext = event st = player.getQuestState(qn) if not st : return if event == "31554-02.htm" : st.set("cond","1") st.setState(STARTED) st.playSound("ItemSound.quest_accept") elif event == "31554-08.htm" : st.playSound("ItemSound.quest_finish") st.exitQuest(True) elif event in REWARDS.keys() : cost,item,amount = REWARDS[event] if st.getQuestItemsCount(Fang)>=cost : st.takeItems(Fang,cost) st.giveItems(item, amount) htmltext = "31554-09.htm" else : htmltext = "31554-06.htm" return htmltext def onTalk (self, npc, player) : htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>" st = player.getQuestState(qn) if not st : return htmltext id = st.getState() if id == CREATED : if player.getLevel() <= 8 : htmltext = "31554-01.htm" elif st.getQuestItemsCount(Fang) >= 1 : htmltext = "31554-04.htm" else : htmltext = "31554-03.htm" return htmltext def onKill(self, npc, player, isPet) : st = player.getQuestState(qn) if not st : return st.giveItems(Fang,int(Config.RATE_DROP_QUEST)) st.playSound("ItemSound.quest_itemget") return QUEST = Quest(640,qn,"The Zero Hour") CREATED = State('Start', QUEST) STARTED = State('Started', QUEST) COMPLETED = State('Completed', QUEST) QUEST.setInitialState(CREATED) QUEST.addStartNpc(Kahman) QUEST.addTalkId(Kahman) for i in MONSTERS : QUEST.addKillId(i)
-
i addapt a quest but i cant understand what i must edit so it works properly: # -*- coding: cp1251 -*- import sys from com.l2jfrozen import Config 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 = "50000_NewbieZone" #NPC ID Starter = 30549 class Quest (JQuest): def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onKill (self,npc,player,isPet): npcId = npc.getNpcId() st = player.getQuestState(qn) if npc.getNpcId() in [Monsters] : if st.getEnchantLevel(int(st.getItemEquipped(4))) >= 7575: return else: if st.getRandom(100) == 100: st.giveItems(136,1) elif st.getRandom(100) == 98 or st.getRandom(100) == 95 : st.giveItems(6577,2) elif st.getRandom(100) == 95 or st.getRandom(100) == 90 or st.getRandom(100) == 85 : st.giveItems(6578,3) elif st.getRandom(1) == 1 : st.giveItems(57,100000) else : return def onTalk (self,npc,player): if st: npcId = npc.getNpcId() id = st.getState() cond = st.getInt("cond") #item id can not be used if st.getEnchantLevel(int(st.getItemEquipped(10))) >= 10 : htmltext = "2.htm" else : if st.getRandom(2) == 0 : st.getPlayer().teleToLocation(15516,251107,-1967) if st.getRandom(2) == 1 : st.getPlayer().teleToLocation(20912,253588,-2018) if st.getRandom(2) == 2 : st.getPlayer().teleToLocation(20334,250761,-2017) return htmltext def onAttack (self,npc,player,damage,isPet): st = player.getQuestState(qn) npcId = npc.getNpcId() if not st : return #Monsters will participate in event if npcId == 27191: if st.getEnchantLevel(int(st.getItemEquipped(9))) >= 7575 : st.getPlayer().teleToLocation(154336,121232,-3809) #How much karm will be added when you dont have requirements st.getPlayer().setKarma(st.getPlayer().getKarma() +444) htmltext = "4.htm" return QUEST = Quest(50000, qn, "NewbieZone") QUEST.addStartNpc(Starter) QUEST.addTalkId(Starter) #Монстры которые участвует в квесте, указать ИД. #Таблица монстров, пример вноса ИД в таблицу: #[1234, 33345, 3435] for Monsters in [27191]: QUEST.addKillId(Monsters) QUEST.addAttackId(27191)
-
i added grandboss status code i added my custom rb id in code then i created npc in custom_npc table after that i added boss in grandboss_data table.i also changed respawn time in there and when i kill raiboss respawn time isnt what i put but rb status npc works properly... custom rb not...when i saw this didnt work i changed type of custom rb to L2RaidBoss and i added in raidboss_spawnlist table.Custom rb respawn was working properly but now rb status npc didnt show respawn time.
-
Help Grandboss Info Errors
aris96 replied to aris96's question in Request Server Development Help [L2J]
lock it ty for help again -
Help Grandboss Info Errors
aris96 replied to aris96's question in Request Server Development Help [L2J]
i am not planning to open a server to near feature i am just a newbie who needs to learn ... so dont comment if you dont want to help me fcking idiot! -
1: http://postimg.org/image/6mn768de7/full/ 2: http://postimg.org/image/5oyyr0jlh/full/
-
Help Can Someone Help Me About Npc Title Color ?
aris96 replied to Ravin3~'s topic in [Request] Client Dev Help
create a grp line for custom npcs -
when i try to build this error appears : http://postimg.org/image/leuta90s5/full/
-
Help Auto Pvp Flag Zone
aris96 replied to Nikoalvares's question in Request Server Development Help [L2J]
its not about java.check here http://www.maxcheaters.com/topic/188679-how-to-check-remove-and-add-zone/ i hope i helped you. -
i try to add this code :http://www.maxcheaters.com/topic/179044-enchant-config-for-acis-blessedcrystal-scrolls/ and i get this error:http://postimg.org/image/h7ya4z98r/full/
-
i try to addapt this code: /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package handlers.voicedcommandhandlers; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Logger; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; /** * <B><U>User Character .repair voicecommand - SL2 L2JEmu</U></B><BR><BR> * * * <U>NOTICE:</U> Voice command .repair that when used, allows player to * try to repair any of characters on his account, by setting spawn * to Floran, removing all shortcuts and moving everything equipped to * that char warehouse.<BR><BR> * * * (solving client crashes on character entering world)<BR><BR> * * * @author szponiasty * @version $Revision: 0.17.2.95.2.9 $ $Date: 2010/03/03 9:07:11 $ */ public class Repair implements IVoicedCommandHandler { static final Logger _log = Logger.getLogger(Repair.class.getName()); private static final String[] _voicedCommands = { "repair", "startrepair" }; public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (activeChar==null) return false; String repairChar=null; try { if(target != null) if(target.length() > 1) { String[] cmdParams = target.split(" "); repairChar=cmdParams[0]; } } catch (Exception e) { repairChar = null; } // Send activeChar HTML page if (command.startsWith("repair")) { String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/repair/repair.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); npcHtmlMessage.replace("%acc_chars%", getCharList(activeChar)); activeChar.sendPacket(npcHtmlMessage); return true; } // Command for enter repairFunction from html if (command.startsWith("startrepair") && (repairChar != null)) { //_log.warning("Repair Attempt: Character " + repairChar); if (checkAcc(activeChar,repairChar)) { if (checkChar(activeChar,repairChar)) { String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/repair/repair-self.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return false; } else if (checkJail(activeChar,repairChar)) { String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/repair/repair-jail.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return false; } else { repairBadCharacter(repairChar); String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/repair/repair-done.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return true; } } else { String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/repair/repair-error.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return false; } } //_log.warning("Repair Attempt: Failed. "); return false; } private String getCharList(L2PcInstance activeChar) { String result=""; String repCharAcc=activeChar.getAccountName(); Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT char_name FROM characters WHERE account_name=?"); statement.setString(1, repCharAcc); ResultSet rset = statement.executeQuery(); while (rset.next()) { if (activeChar.getName().compareTo(rset.getString(1)) != 0) result += rset.getString(1)+";"; } //_log.warning("Repair Attempt: Output Result for searching characters on account:"+result); rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); return result; } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } return result; } private boolean checkAcc(L2PcInstance activeChar,String repairChar) { boolean result=false; String repCharAcc=""; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT account_name FROM characters WHERE char_name=?"); statement.setString(1, repairChar); ResultSet rset = statement.executeQuery(); if (rset.next()) { repCharAcc = rset.getString(1); } rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); return result; } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } if (activeChar.getAccountName().compareTo(repCharAcc)==0) result=true; return result; } private boolean checkJail(L2PcInstance activeChar,String repairChar) { boolean result=false; int repCharJail = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT punish_level FROM characters WHERE char_name=?"); statement.setString(1, repairChar); ResultSet rset = statement.executeQuery(); if (rset.next()) { repCharJail = rset.getInt(1); } rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); return result; } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } if (repCharJail > 1) // 0 norm, 1 chat ban, 2 jail, 3.... result=true; return result; } private boolean checkChar(L2PcInstance activeChar,String repairChar) { boolean result=false; if (activeChar.getName().compareTo(repairChar)==0) result=true; return result; } private void repairBadCharacter(String charName) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement; statement = con.prepareStatement("SELECT charId FROM characters WHERE char_name=?"); statement.setString(1, charName); ResultSet rset = statement.executeQuery(); int objId = 0; if (rset.next()) { objId = rset.getInt(1); } rset.close(); statement.close(); if (objId == 0) { con.close(); return; } statement = con.prepareStatement("UPDATE characters SET x=17867, y=170259, z=-3503 WHERE charId=?"); statement.setInt(1, objId); statement.execute(); statement.close(); statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE charId=?"); statement.setInt(1, objId); statement.execute(); statement.close(); statement = con.prepareStatement("UPDATE items SET loc=\"WAREHOUSE\" WHERE owner_id=? AND loc=\"PAPERDOLL\""); statement.setInt(1, objId); statement.execute(); statement.close(); } catch (Exception e) { _log.warning("GameServer: could not repair character:" + e); } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } } public String[] getVoicedCommandList() { return _voicedCommands; } } thats what i did until now : /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.handler.usercommandhandlers; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Logger; import net.sf.l2j.gameserver.cache.HtmCache; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.handler.IUserCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; /** * <B><U>User Character .repair voicecommand - SL2 L2JEmu</U></B><BR><BR> * * * <U>NOTICE:</U> Voice command .repair that when used, allows player to * try to repair any of characters on his account, by setting spawn * to Floran, removing all shortcuts and moving everything equipped to * that char warehouse.<BR><BR> * * * (solving client crashes on character entering world)<BR><BR> * * * @author szponiasty * @version $Revision: 0.17.2.95.2.9 $ $Date: 2010/03/03 9:07:11 $ */ public class Repair implements IUserCommandHandler { static final Logger _log = Logger.getLogger(Repair.class.getName()); private static final String[] _userCommands = { "repair", "startrepair" }; public boolean useuserCommand(String command, L2PcInstance activeChar, String target) { if (activeChar==null) return false; String repairChar=null; try { if(target != null) if(target.length() > 1) { String[] cmdParams = target.split(" "); repairChar=cmdParams[0]; } } catch (Exception e) { repairChar = null; } // Send activeChar HTML page if (command.startsWith("repair")) { String htmContent = HtmCache.getInstance().getHtm("data/html/mods/repair/repair.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); npcHtmlMessage.replace("%acc_chars%", getCharList(activeChar)); activeChar.sendPacket(npcHtmlMessage); return true; } // Command for enter repairFunction from html if (command.startsWith("startrepair") && (repairChar != null)) { //_log.warning("Repair Attempt: Character " + repairChar); if (checkAcc(activeChar,repairChar)) { if (checkChar(activeChar,repairChar)) { String htmContent = HtmCache.getInstance().getHtm("data/html/mods/repair/repair-self.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return false; } else if (checkJail(activeChar,repairChar)) { String htmContent = HtmCache.getInstance().getHtm("data/html/mods/repair/repair-jail.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return false; } else { repairBadCharacter(repairChar); String htmContent = HtmCache.getInstance().getHtm("data/html/mods/repair/repair-done.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return true; } } String htmContent = HtmCache.getInstance().getHtm("data/html/mods/repair/repair-error.htm"); NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(5); npcHtmlMessage.setHtml(htmContent); activeChar.sendPacket(npcHtmlMessage); return false; } //_log.warning("Repair Attempt: Failed. "); return false; } private static String getCharList(L2PcInstance activeChar) { String result=""; String repCharAcc=activeChar.getAccountName(); Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT char_name FROM characters WHERE account_name=?"); statement.setString(1, repCharAcc); ResultSet rset = statement.executeQuery(); while (rset.next()) { if (activeChar.getName().compareTo(rset.getString(1)) != 0) result += rset.getString(1)+";"; } //_log.warning("Repair Attempt: Output Result for searching characters on account:"+result); rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); return result; } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } return result; } private static boolean checkAcc(L2PcInstance activeChar,String repairChar) { boolean result=false; String repCharAcc=""; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT account_name FROM characters WHERE char_name=?"); statement.setString(1, repairChar); ResultSet rset = statement.executeQuery(); if (rset.next()) { repCharAcc = rset.getString(1); } rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); return result; } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } if (activeChar.getAccountName().compareTo(repCharAcc)==0) result=true; return result; } private static boolean checkJail(L2PcInstance activeChar,String repairChar) { boolean result=false; int repCharJail = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT punish_level FROM characters WHERE char_name=?"); statement.setString(1, repairChar); ResultSet rset = statement.executeQuery(); if (rset.next()) { repCharJail = rset.getInt(1); } rset.close(); statement.close(); } catch (SQLException e) { e.printStackTrace(); return result; } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } if (repCharJail > 1) // 0 norm, 1 chat ban, 2 jail, 3.... result=true; return result; } private static boolean checkChar(L2PcInstance activeChar,String repairChar) { boolean result=false; if (activeChar.getName().compareTo(repairChar)==0) result=true; return result; } private static void repairBadCharacter(String charName) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement; statement = con.prepareStatement("SELECT charId FROM characters WHERE char_name=?"); statement.setString(1, charName); ResultSet rset = statement.executeQuery(); int objId = 0; if (rset.next()) { objId = rset.getInt(1); } rset.close(); statement.close(); if (objId == 0) { con.close(); return; } statement = con.prepareStatement("UPDATE characters SET x=17867, y=170259, z=-3503 WHERE charId=?"); statement.setInt(1, objId); statement.execute(); statement.close(); statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE charId=?"); statement.setInt(1, objId); statement.execute(); statement.close(); statement = con.prepareStatement("UPDATE items SET loc=\"WAREHOUSE\" WHERE owner_id=? AND loc=\"PAPERDOLL\""); statement.setInt(1, objId); statement.execute(); statement.close(); } catch (Exception e) { _log.warning("GameServer: could not repair character:" + e); } finally { try { if (con != null) con.close(); } catch (SQLException e) { e.printStackTrace(); } } } public String[] getuserCommandList() { return _userCommands; } } and i get this error:http://postimg.org/image/khkzhw1j5/full/ i tryied recommended solutions and in one i had error on gameserver and on other i couldnt register the command.
-
i got those errors: http://postimg.org/image/51c8ulx6f/full/ http://postimg.org/image/wfzs0eozx/full/
-
Guide Making An Animated Logo From Scratch
aris96 replied to ◄√i®uS►'s topic in Client Development Discussion
great guide!thank you!keep up making guides! -
Guide Editing Textures (Updated For 2015)
aris96 replied to DONALD TRUMP 2016's topic in Client Development Discussion
thank you for share!it would be great if you could make more guides about client editing! -
if someone addapt it to acis would be great
-
i tryied to join but cant
-
dont use shared packs
- 7 replies
-
- Custom skils
- full pvp
-
(and 4 more)
Tagged with: