`Rοmeο Posted December 14, 2012 Posted December 14, 2012 Γεια σας, σκέφτομαι ότι είναι καιρός να γίνει και ένα event για να δώσουμε ευκαιρίες σε πολλούς να μάθουν κάτι παραπάνω ή να συμμετέχουν σε κάτι. Λοιπόν ας αρχίσω, με βάση τον οδηγό που έκανα (βλέπε Κεφάλαιο 3) πρέπει να φτιάξετε ένα voiced command μόνοι σας. Κανόνες : - ο κώδικας πρέπει να είναι 100% δικός σας. - πρέπει να είναι tested. Πληροφορίες : - οι κώδικες πρέπει να είναι σε μορφή patch και θα τους κάνετε post είτε εδώ είτε στο pastebin.com - μόνο 1 κώδικας θα πάρει βραβείο Πως μπορείτε να πάρετε μέρος στο event? Είναι απλό, όπως ανέφερα παραπάνω κάνετε post τον κώδικα είτε εδώ είτε στο pastebin και ΠΡΕΠΕΙ να είναι σε μορφή patch. Το post που θα κάνετε πρέπει να περιέχει περιγραφή, κώδικα και video (προαιρετικό). Το event θα τελειώσει στις 31 Δεκεμβρίου 2012. Reward : L2 Award Icon για 1 μήνα!
Napster321 Posted December 14, 2012 Posted December 14, 2012 Description -Teleports the player to a custom location that you can have it decorated with christmas objects. -Announce that text Player Name:Merry Christmas everybody , type .xmas to come to that magic place and join me :D. -Send that message to the char that types the command Message: Merry Christmas. -Gives the player hero aura untill player restart. Video Download the patch from Mediafire or use Pastebin
`Rοmeο Posted December 14, 2012 Author Posted December 14, 2012 πολύ καλή δουλειά φιλε μου περιμένω και άλλους και στο τέλος θα βγάλω τον νικητή.
Boorinio Posted December 15, 2012 Posted December 15, 2012 Gia!! oriste kai o dikos m kodikas: o paiktis grafei .better kai ena html petagete kai t dixnei mia lista me tis epiloges p exei na ginei kaliteros dld: Gia na ginei hero grafei .hero gia na paei 80 level .level gia na ginei nob .nobless kai ola einai energopoiisima kai mi meso configs... Index: E:/l2jdev/l2rebellion/workspace/L2jHellasC/config/Mods/L2JHellas.ini =================================================================== --- E:/l2jdev/l2rebellion/workspace/L2jHellasC/config/Mods/L2JHellas.ini (revision 104) +++ E:/l2jdev/l2rebellion/workspace/L2jHellasC/config/Mods/L2JHellas.ini (working copy) @@ -1,6 +1,12 @@ #==============================================================================# # Gm Stuff/Protection # #==============================================================================# +#Better System +Allowbetter = True +AllowNob = True +Allowlevel = True +Allowhero = True + # Show the GM's name behind an announcement made by him # example: "Announce: Hi All [inspector]" Index: E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/Config.java =================================================================== --- E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/Config.java (revision 104) +++ E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/Config.java (working copy) @@ -637,6 +637,10 @@ /** Check for bad ID ? */ // l2jhellas_CONFIG_FILE + public static boolean ALLOW_BETTER; + public static boolean ALLOW_NOB_COM; + public static boolean ALLOW_LEVEL_COM; + public static boolean ALLOW_HERO_COM; public static boolean SHOW_NPC_CREST; public static String EMAIL_USER; public static String EMAIL_PASS; @@ -2050,6 +2054,12 @@ EMAIL_USER = L2JHellasSettings.getProperty("EmailUsername", "null"); EMAIL_PASS = L2JHellasSettings.getProperty("EmailPassword", "null"); + ALLOW_BETTER = Boolean.parseBoolean(L2JHellasSettings.getProperty("Allowbetter", "True")); + ALLOW_NOB_COM = Boolean.parseBoolean(L2JHellasSettings.getProperty("AllowNob", "True")); + ALLOW_LEVEL_COM = Boolean.parseBoolean(L2JHellasSettings.getProperty("Allowlevel", "True")); + ALLOW_HERO_COM = Boolean.parseBoolean(L2JHellasSettings.getProperty("Allowhero", "True")); + + CHAMPION_PASSIVE = Boolean.parseBoolean(L2JHellasSettings.getProperty("ChampionPassive", "False")); CHAMPION_TITLE = L2JHellasSettings.getProperty("ChampionTitle", "Champion").trim(); CHAMPION_ENABLE = Boolean.parseBoolean(L2JHellasSettings.getProperty("ChampionEnable", "False")); Index: E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/gameserver/handler/VoicedCommandHandler.java =================================================================== --- E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/gameserver/handler/VoicedCommandHandler.java (revision 104) +++ E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/gameserver/handler/VoicedCommandHandler.java (working copy) @@ -28,6 +28,7 @@ import com.l2jhellas.gameserver.handler.voicedcommandhandlers.ServerRestartVote; import com.l2jhellas.gameserver.handler.voicedcommandhandlers.VipTeleport; import com.l2jhellas.gameserver.handler.voicedcommandhandlers.VoiceInfo; +import com.l2jhellas.gameserver.handler.voicedcommandhandlers.Better; import com.l2jhellas.gameserver.handler.voicedcommandhandlers.Wedding; import com.l2jhellas.gameserver.handler.voicedcommandhandlers.pmoff; import com.l2jhellas.gameserver.handler.voicedcommandhandlers.stat; @@ -88,6 +89,8 @@ if (ExternalConfig.RANK_PVP_INFO_COMMAND_ENABLED) registerVoicedCommandHandler(new RankPvpSystemCmd()); registerVoicedCommandHandler(new Premium()); + if(Config.ALLOW_BETTER) + registerVoicedCommandHandler(new Better()); _log.config("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers."); } Index: E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/gameserver/handler/voicedcommandhandlers/Better.java =================================================================== --- E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/gameserver/handler/voicedcommandhandlers/Better.java (revision 0) +++ E:/l2jdev/l2rebellion/workspace/L2jHellasC/java/com/l2jhellas/gameserver/handler/voicedcommandhandlers/Better.java (revision 0) @@ -0,0 +1,81 @@ +/* + * 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 com.l2jhellas.gameserver.handler.voicedcommandhandlers; + +import com.l2jhellas.Config; +import com.l2jhellas.gameserver.cache.HtmCache; +import com.l2jhellas.gameserver.handler.IVoicedCommandHandler; +import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance; +import com.l2jhellas.gameserver.model.base.Experience; +import com.l2jhellas.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jhellas.gameserver.network.serverpackets.SocialAction; + +/** + * @author Boorinio for romeo's event + */ +public class Better implements IVoicedCommandHandler +{ + private static String[] VOICED_COMMANDS = + { + "becomebetter","nobless","maxlevel","hero" + }; + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + String htmFile = "data/html/mods/BecomeBetter.htm"; + String htmContent = HtmCache.getInstance().getHtm(htmFile); + if (command.startsWith("nobless")&& (Config.ALLOW_NOB_COM)) + { + if(activeChar.isNoble()) + { + activeChar.sendMessage("You Are Already A Noblesse!."); + } + else + { + + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16)); + activeChar.setNoble(true); + activeChar.sendMessage("You Are Now a Noble,You Are Granted With Noblesse Status , And Noblesse Skills."); + activeChar.broadcastUserInfo(); + activeChar.getInventory().addItem("Tiara", 7694, 1, activeChar, null); + } + } + if (command.startsWith("maxlevel")&& Config.ALLOW_LEVEL_COM) + { + activeChar.getStat().addExp(Experience.LEVEL[80]); + activeChar.sendMessage("You are now max level!"); + } + if (command.startsWith("hero")&& Config.ALLOW_HERO_COM) + { + + activeChar.setHero(true); + activeChar.broadcastUserInfo(); + activeChar.sendMessage("You are now granted with hero status!"); + } + if (htmContent != null) + { + NpcHtmlMessage infoHtml = new NpcHtmlMessage(1); + infoHtml.setHtml(htmContent); + activeChar.sendPacket(infoHtml); + } + else + { + activeChar.sendMessage("Check you html files. " + htmFile + " cannot be found!"); + } + return true; + } + + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} Index: E:/l2jdev/l2rebellion/workspace/L2JHellasD/data/html/mods/Better.htm =================================================================== --- E:/l2jdev/l2rebellion/workspace/L2JHellasD/data/html/mods/Better.htm (revision 0) +++ E:/l2jdev/l2rebellion/workspace/L2JHellasD/data/html/mods/Better.htm (revision 0) @@ -0,0 +1,15 @@ +<html><title>Better Mod</title><body> +<center><font color="LEVEL">Welcome.</font><br> +Here are all the listed commands you can use!<br1> +<br> +In order to become a nobless char write ".nobless"<br1> +<br1> +In order to get maxlevel write ".maxlevel" <br1> +<br> +In order to become a hero write ".hero"<br><br> +</center> +<br><br> +<center><font color="LEVEL">By Boorinio</center></font> +<Br> +<center>Ho ho ho Hold the fuck up!</center> +</body></html> \ No newline at end of file
`Rοmeο Posted December 15, 2012 Author Posted December 15, 2012 πολύ καλή δουλειά περιμένουμε και αλλα άτομα να δούμε την δουλειά τους :happyforever:
Dεbian Posted December 29, 2012 Posted December 29, 2012 2 άτομα μόνο μπήκαν στον διαγωνισμό. αύριο θα βγει ο νικητής μεταξύ σας. Edit : όποιος θέλει, μπορεί να μπει στον διαγωνισμό! τελευταία μέρα αύριο..
Recommended Posts