Jump to content

Tokenlt

Members
  • Posts

    131
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Tokenlt

  1. http://www.slineage.com/ here you go
  2. Could you give me example of code which adds item to castle warehouse?
  3. Yes i think i can make the task but how to check what clan is owning giran and add to his warehouse an item?
  4. Well I had in mind code which checks every 1 hour if giran castle have owner and if it has that clan gets to his warehouse 5k aa.
  5. So okey everythings alright with imports, but why it writes "no main method in custom.AugmentShop.AugmentShop"? There is a main method
  6. http://maxcheaters.com/forum/index.php?topic=223890.0 ???
  7. http://maxcheaters.com/forum/index.php?topic=223890.0
  8. Looking for interlude low rate server not older than 1 month
  9. Hello, can anyone type a Java code in which clan owning for example giran castle gets 5k aa to it's warehouse every 1 hour.
  10. Still get error ===================================================================-[ Scripts ] start loading Individual AI start loading Group template AI Nobless Trader (66666) Enabled... Clan Manager (66667) Enabled... ---------- 1. ERROR in /AugmentShop.java (at line 1) import sys ^^^ The import sys cannot be resolved ---------- 2. ERROR in /AugmentShop.java (at line 2) from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance ^^^^ Syntax error on token "from", . expected ---------- 3. ERROR in /AugmentShop.java (at line 2) from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance ^^^^^^^^ Syntax error on token "instance", ; expected after this token ---------- 4. ERROR in /AugmentShop.java (at line 2) from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance ^^^^^^^^^^^^^ The import L2NpcInstance cannot be resolved ---------- 5. ERROR in /AugmentShop.java (at line 3) from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance ^^^^ Syntax error on token "from", . expected ---------- 6. ERROR in /AugmentShop.java (at line 3) from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance ^^^^^^^^ Syntax error on token "instance", ; expected after this token ---------- 7. ERROR in /AugmentShop.java (at line 3) from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance ^^^^^^^^^^^^ The import L2PcInstance cannot be resolved ---------- 8. ERROR in /AugmentShop.java (at line 4) from com.l2jfrozen.gameserver.model.quest import Quest ^^^^ Syntax error on token "from", . expected ---------- 9. ERROR in /AugmentShop.java (at line 4) from com.l2jfrozen.gameserver.model.quest import Quest ^^^^^ Syntax error on token "quest", ; expected after this token ---------- 10. ERROR in /AugmentShop.java (at line 4) from com.l2jfrozen.gameserver.model.quest import Quest ^^^^^ The import Quest cannot be resolved ---------- 11. ERROR in /AugmentShop.java (at line 5) from com.l2jfrozen.gameserver.model.quest import QuestState ^^^^ Syntax error on token "from", . expected ---------- 12. ERROR in /AugmentShop.java (at line 5) from com.l2jfrozen.gameserver.model.quest import QuestState ^^^^^ Syntax error on token "quest", ; expected after this token ---------- 13. ERROR in /AugmentShop.java (at line 5) from com.l2jfrozen.gameserver.model.quest import QuestState ^^^^^^^^^^ The import QuestState cannot be resolved ---------- 14. ERROR in /AugmentShop.java (at line 6) from com.l2jfrozen.gameserver.model import Inventory ^^^^ Syntax error on token "from", . expected ---------- 15. ERROR in /AugmentShop.java (at line 6) from com.l2jfrozen.gameserver.model import Inventory ^^^^^ Syntax error on token "model", ; expected after this token ---------- 16. ERROR in /AugmentShop.java (at line 6) from com.l2jfrozen.gameserver.model import Inventory ^^^^^^^^^ The import Inventory cannot be resolved ---------- 17. ERROR in /AugmentShop.java (at line 7) from java.sql import Connection ^^^^ Syntax error on token "from", . expected ---------- 18. ERROR in /AugmentShop.java (at line 7) from java.sql import Connection ^^^ Syntax error on token "sql", ; expected after this token ---------- 19. ERROR in /AugmentShop.java (at line 7) from java.sql import Connection ^^^^^^^^^^ The import Connection cannot be resolved ---------- 20. ERROR in /AugmentShop.java (at line 8) from java.sql import PreparedStatement ^^^^ Syntax error on token "from", . expected ---------- 21. ERROR in /AugmentShop.java (at line 8) from java.sql import PreparedStatement ^^^ Syntax error on token "sql", ; expected after this token ---------- 22. ERROR in /AugmentShop.java (at line 8) from java.sql import PreparedStatement ^^^^^^^^^^^^^^^^^ The import PreparedStatement cannot be resolved ---------- 23. ERROR in /AugmentShop.java (at line 9) from com.l2jfrozen.util.database import L2DatabaseFactory ^^^^ Syntax error on token "from", . expected ---------- 24. ERROR in /AugmentShop.java (at line 9) from com.l2jfrozen.util.database import L2DatabaseFactory ^^^^^^^^ Syntax error on token "database", ; expected after this token ---------- 25. ERROR in /AugmentShop.java (at line 9) from com.l2jfrozen.util.database import L2DatabaseFactory ^^^^^^^^^^^^^^^^^ The import L2DatabaseFactory cannot be resolved ---------- 26. ERROR in /AugmentShop.java (at line 10) from java.util.logging import Level ^^^^ Syntax error on token "from", . expected ---------- 27. ERROR in /AugmentShop.java (at line 10) from java.util.logging import Level ^^^^^^^ Syntax error on token "logging", ; expected after this token ---------- 28. ERROR in /AugmentShop.java (at line 10) from java.util.logging import Level ^^^^^ The import Level cannot be resolved ---------- 29. ERROR in /AugmentShop.java (at line 11) from com.l2jfrozen.gameserver.model.actor.instance import L2ItemInstance ^^^^ Syntax error on token "from", . expected ---------- 30. ERROR in /AugmentShop.java (at line 11) from com.l2jfrozen.gameserver.model.actor.instance import L2ItemInstance ^^^^^^^^ Syntax error on token "instance", ; expected after this token ---------- 31. ERROR in /AugmentShop.java (at line 11) from com.l2jfrozen.gameserver.model.actor.instance import L2ItemInstance ^^^^^^^^^^^^^^ Syntax error on token "L2ItemInstance", ; expected after this token ---------- 32. ERROR in /AugmentShop.java (at line 11) from com.l2jfrozen.gameserver.model.actor.instance import L2ItemInstance ^^^^^^^^^^^^^^ The import L2ItemInstance cannot be resolved ---------- 33. ERROR in /AugmentShop.java (at line 18) public class AugmentShop extends Quest ^^^^^ Quest cannot be resolved to a type ---------- 34. ERROR in /AugmentShop.java (at line 28) addFirstTalkId(NPC); ^^^^^^^^^^^^^^ The method addFirstTalkId(int) is undefined for the type AugmentShop ---------- 35. ERROR in /AugmentShop.java (at line 29) addStartNpc(NPC); ^^^^^^^^^^^ The method addStartNpc(int) is undefined for the type AugmentShop ---------- 36. ERROR in /AugmentShop.java (at line 30) addTalkId(NPC); ^^^^^^^^^ The method addTalkId(int) is undefined for the type AugmentShop ---------- 37. ERROR in /AugmentShop.java (at line 34) public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^^ L2NpcInstance cannot be resolved to a type ---------- 38. ERROR in /AugmentShop.java (at line 34) public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 39. ERROR in /AugmentShop.java (at line 64) public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^^ L2NpcInstance cannot be resolved to a type ---------- 40. ERROR in /AugmentShop.java (at line 64) public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 41. ERROR in /AugmentShop.java (at line 67) QuestState qs = player.getQuestState(qn); ^^^^^^^^^^ QuestState cannot be resolved to a type ---------- 42. ERROR in /AugmentShop.java (at line 80) private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) ^^^^^^^^^^^^ L2PcInstance cannot be resolved to a type ---------- 43. ERROR in /AugmentShop.java (at line 82) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); ^^^^^^^^^^^^^^ L2ItemInstance cannot be resolved to a type ---------- 44. ERROR in /AugmentShop.java (at line 82) L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 45. ERROR in /AugmentShop.java (at line 83) if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 46. ERROR in /AugmentShop.java (at line 90) if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented()) ^^^^^^^^^ Inventory cannot be resolved to a variable ---------- 47. ERROR in /AugmentShop.java (at line 102) Connection con = null; ^^^^^^^^^^ Connection cannot be resolved to a type ---------- 48. ERROR in /AugmentShop.java (at line 106) con = L2DatabaseFactory.getInstance().getConnection(); ^^^^^^^^^^^^^^^^^ L2DatabaseFactory cannot be resolved ---------- 49. ERROR in /AugmentShop.java (at line 107) PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); ^^^^^^^^^^^^^^^^^ PreparedStatement cannot be resolved to a type ---------- 50. ERROR in /AugmentShop.java (at line 121) _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); ^^^^ _log cannot be resolved ---------- 51. ERROR in /AugmentShop.java (at line 121) _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); ^^^^^ Level cannot be resolved to a variable ---------- 51 problems (51 errors)Syntax error on token "from", . expected Syntax error on token "instance", ; expected after this token Syntax error on token "from", . expected Syntax error on token "instance", ; expected after this token Syntax error on token "from", . expected Syntax error on token "quest", ; expected after this token Syntax error on token "from", . expected Syntax error on token "quest", ; expected after this token Syntax error on token "from", . expected Syntax error on token "model", ; expected after this token Syntax error on token "from", . expected Syntax error on token "sql", ; expected after this token Syntax error on token "from", . expected Syntax error on token "sql", ; expected after this token Syntax error on token "from", . expected Syntax error on token "database", ; expected after this token Syntax error on token "from", . expected Syntax error on token "logging", ; expected after this token Syntax error on token "from", . expected Syntax error on token "instance", ; expected after this token Syntax error on token "L2ItemInstance", ; expected after this token Quest cannot be resolved to a type The import sys cannot be resolved The import L2NpcInstance cannot be resolved The import L2PcInstance cannot be resolved The import Quest cannot be resolved The import QuestState cannot be resolved The import Inventory cannot be resolved The import Connection cannot be resolved The import PreparedStatement cannot be resolved The import L2DatabaseFactory cannot be resolved The import Level cannot be resolved The import L2ItemInstance cannot be resolved L2NpcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type L2NpcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type L2PcInstance cannot be resolved to a type The method addFirstTalkId(int) is undefined for the type AugmentShop The method addStartNpc(int) is undefined for the type AugmentShop The method addTalkId(int) is undefined for the type AugmentShop QuestState cannot be resolved to a type L2ItemInstance cannot be resolved to a type Inventory cannot be resolved to a variable Inventory cannot be resolved to a variable Inventory cannot be resolved to a variable Connection cannot be resolved to a type L2DatabaseFactory cannot be resolved PreparedStatement cannot be resolved to a type _log cannot be resolved Level cannot be resolved to a variable Failed executing script: /lproject/L2jFrozen_GameServer/gameserver/data/scripts/custom/AugmentShop/AugmentShop.java. See AugmentShop.java.error.log for details. Replaced: SagasSuperclass with a new version Compiled Scripts Cache is disabled. [FeanorScriptEngine] Loading Packages ... [FeanorScriptEngine] No Packages Loaded ... ===============================================================-[ Game Server ] .../L2jFrozen_GameServer/gameserver/data/scripts/custom/AugmentShop/AugmentShop.java import sys from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance from com.l2jfrozen.gameserver.model.quest import Quest from com.l2jfrozen.gameserver.model.quest import QuestState from com.l2jfrozen.gameserver.model import Inventory from java.sql import Connection from java.sql import PreparedStatement from com.l2jfrozen.util.database import L2DatabaseFactory from java.util.logging import Level from com.l2jfrozen.gameserver.model.actor.instance import L2ItemInstance /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented()) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } } Got even more errors :/
  11. .../L2jFrozen_GameServer/gameserver/data/scripts/custom/AugmentShop/AugmentShop.java.error.log Error on: /lproject/L2jFrozen_GameServer/gameserver/data/scripts/custom/AugmentShop/AugmentShop.java.error.log Line: -1 - Column: -1 no main method in custom.AugmentShop.AugmentShop .../L2jFrozen_GameServer/gameserver/data/scripts/custom/AugmentShop/AugmentShop.java: package custom.AugmentShop; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; import com.l2jfrozen.gameserver.model.Inventory; import java.sql.Connection; import java.sql.PreparedStatement; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.util.logging.Level; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; /** * * @author adapted by Samar 2011 RUSSIA * */ public class AugmentShop extends Quest { private final static int ITEM_ID = 57; private final static int ITEM_COUNT = 1000000; private final static String qn = "AugmentShop"; private final static int NPC = 91000; public AugmentShop(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(NPC); addStartNpc(NPC); addTalkId(NPC); } @Override public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; if (event.equalsIgnoreCase("active")) { htmltext = "active.htm"; } else if (event.equalsIgnoreCase("passive")) { htmltext = "passive.htm"; } else if (event.equalsIgnoreCase("chance")) { htmltext = "chance.htm"; } else { updateAugment(player, Integer.parseInt(event.substring(0,5)), Integer.parseInt(event.substring(6,10)), Integer.parseInt(event.substring(11,13))); } return htmltext; } @Override public String onFirstTalk(L2NpcInstance npc, L2PcInstance player) { String htmltext = ""; QuestState qs = player.getQuestState(qn); if (qs == null) qs = newQuestState(player); htmltext = "main.htm"; return htmltext; } public static void main(String[] args) { new AugmentShop(-1, qn, "AugmentShop"); } private static void updateAugment(L2PcInstance player, int attributes, int skill, int level) { L2ItemInstance item = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { player.sendMessage("You have to equip a weapon."); return; } if (player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).isAugmented()) { player.sendMessage("The weapon is already augmented."); return; } if (player.getInventory().getInventoryItemCount(ITEM_ID, -1) < ITEM_COUNT) { player.sendMessage("You dont have enough item."); return; } Connection con = null; try { player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("REPLACE INTO augmentations VALUES(?,?,?,?)"); statement.setInt(1, item.getObjectId()); statement.setInt(2, attributes*65536+1); statement.setInt(3, skill); statement.setInt(4, level); statement.executeUpdate(); player.sendMessage("Succesfully augmented. You have to relog now."); statement.close(); } catch (Exception e) { _log.log(Level.SEVERE, "Could not augment item: "+item.getObjectId()+" ", e); } finally { try { /*L2DatabaseFactory.close(con);*/ con.close(); } catch (Exception e) { } } } } Maybe someone can help me to solve this error?
  12. Server rox ;) i suggest it to everyone :)
  13. So l2tower is not working in l2.ws now?
  14. There will be some kind of custom NPC buffer?
×
×
  • Create New...