Jump to content

An4rchy

Legendary Member
  • Posts

    2,656
  • Joined

  • Last visited

  • Days Won

    26
  • Feedback

    100%

Everything posted by An4rchy

  1. MAN REALLY THANKS, SERVER IS GREAT NOW
  2. +1. it's awesome. but still it hasn't be released yet, they may make more changes
  3. then it's failed. pff anyway
  4. it shouldn't be posted here. thanks anyway
  5. /failed. anyway i will give a try to multiskill, i haven't played multiskill servers for like 3-4 months :P (l2mafia)
  6. subclasses? also add a minimum money offer..... or i bet you will get pms like: 5 euros, give me armor for 10 euros etc...
  7. l2j or l2off? if it is l2j it will fail. if l2off, it can succes
  8. lol it's preview yeah when is it opening? just set the date, not 100%, what month for example :P
  9. oh it's nice but i don't like skill bar.... it's like cartoon games skill bar. but still, the gameplay is awesome.
  10. hmm is this the right place to post this? thanks, nice guide.
  11. /respect. i loved it. i hope gameplay will be as realistic as trailer :)
  12. GJ B1ggBoss. What about... - Gatekeeper - Subclass Manager - Boss respawn info - Olympiad Manager - Pvp & Pk Top Also you don't accept psc?
  13. OMG. oxi min anoikseis server me l2jacis akoma, se kana 3mino (kata tin gnomi m) tha einai etoimo gia live server. dn blepeis oti leipoun to 85% twn skills?
  14. sickness don't double post :S but it is already posted man...
  15. red label, black label? wtf? make johnny walker, [gr] tsipouro, tsikoudia[/gr] gl anyway...
  16. LMAO DONATION DIRECTLY? NO THANKS!!!!! //close
  17. Index: java/net/sf/l2j/gameserver/handler/itemhandlers/LuckyCoin.java =================================================================== --- java/net/sf/l2j/gameserver/handler/itemhandlers/LuckyCoin.java (revision 0) +++ java/net/sf/l2j/gameserver/handler/itemhandlers/LuckyCoin.java (revision 0) @@ -0,0 +1,207 @@ +/* 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 2, 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * http://www.gnu.org/copyleft/gpl.html + */ +package net.sf.l2j.gameserver.handler.itemhandlers; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.handler.IItemHandler; +import net.sf.l2j.gameserver.model.L2ItemInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance; +import net.sf.l2j.gameserver.serverpackets.InventoryUpdate; +import net.sf.l2j.gameserver.serverpackets.SocialAction; +import net.sf.l2j.util.Rnd; + +/** + * + * @author FelonBIG + */ +public class LuckyCoin implements IItemHandler +{ + private static final int ITEM_IDS[] = + { + Config.LUCKY_COIN_ID + }; + + public void useItem(L2PlayableInstance playable, L2ItemInstance item) + { + if (!(playable instanceof L2PcInstance)) + { + return; + } + + L2PcInstance activeChar = (L2PcInstance)playable; + + if (activeChar.getKarma() > 0) + + { + activeChar.sendMessage("You cannot use the lucky coin now! Go burn your karma!"); + return; + } + + else if (activeChar.getPvpFlag() > 0) + + { + activeChar.sendMessage("You cannot use Lucky Coin while being flagged!"); + return; + } + + else if (activeChar.isInOlympiadMode()) + + { + activeChar.sendMessage("You cannot use the lucky coin in olympiad"); + return; + } + + else if (activeChar.inObserverMode()) + + { + activeChar.sendMessage("You cannot use lucky coin while observing an olympiad match!"); + return; + } + + else if (activeChar.isFestivalParticipant()) + + { + activeChar.sendMessage("You cannot use lucky coin while participating in a festival"); + return; + } + + else if (activeChar.isCastingNow()) + + { + activeChar.sendMessage("You cannot use the lucky coin while casting"); + return; + } + + else if (activeChar.isStunned()) + + { + activeChar.sendMessage("You cannot use the lucky coin while being stunned"); + return; + } + + else if (activeChar.isSleeping()) + + { + activeChar.sendMessage("You cannot use the lucky coin while sleeping"); + return; + } + + else if (activeChar.atEvent) + + { + activeChar.sendMessage("You cannot use the lucky coin while participating in an event!"); + return; + } + + else if (activeChar.isInJail()) + + { + activeChar.sendMessage("You cannot use the lucky coin while being in jail!"); + } + + else if (activeChar.getInventory().getItemByItemId(57).getCount() < 100000000) + + { + activeChar.sendMessage("You do not have 100kk adena to bet ! I am sorry! Go farm"); + return; + } + + /** Enough with the -beep-ing limits xD */ + + else + + { + InventoryUpdate iu = new InventoryUpdate(); + activeChar.getInventory().destroyItemByItemId("Adena", 57, 100000000, activeChar, activeChar.getTarget()); + + String bet = "You have now bet 100k adena! Let's see the outcome !"; + + switch (Rnd.get(5)) + + { + case 0 : + + activeChar.sendMessage(bet); + activeChar.sendMessage("Oops, you lost your money. You were not lucky!"); + activeChar.getInventory().destroyItemByItemId("Lucky Coin", Config.LUCKY_COIN_ID, 1, activeChar, activeChar.getTarget()); + activeChar.sendPacket(iu); + + break; + + case 1 : + + activeChar.sendMessage(bet); + activeChar.getInventory().addItem("Adena", 57, 100000000, activeChar, null); + activeChar.sendMessage("You either won or loose ! You get your precious adena back!"); + activeChar.getInventory().destroyItemByItemId("Lucky Coin", Config.LUCKY_COIN_ID, 1, activeChar, activeChar.getTarget()); + activeChar.sendPacket(iu); + + break; + + case 2 : + activeChar.sendMessage(bet); + activeChar.getInventory().addItem("Adena", 57, 500000000, activeChar, null); + activeChar.sendMessage("Holy crap! You won 500kk adena!"); + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3)); + activeChar.getInventory().destroyItemByItemId("Lucky Coin", Config.LUCKY_COIN_ID, 1, activeChar, activeChar.getTarget()); + activeChar.sendPacket(iu); + + break; + + case 3 : + + activeChar.sendMessage(bet); + activeChar.getInventory().addItem("Adena", 57, 1000000000, activeChar, null); + activeChar.sendMessage("Holy crap! You won 1kkk adena!"); + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3)); + activeChar.getInventory().destroyItemByItemId("Lucky Coin", Config.LUCKY_COIN_ID, 1, activeChar, activeChar.getTarget()); + activeChar.sendPacket(iu); + + break; + + case 4 : + + activeChar.sendMessage(bet); + activeChar.getInventory().destroyItemByItemId("Adena", 57, 100000000, activeChar, activeChar.getTarget()); + activeChar.sendMessage("Blame your bad luck! You lost another 100kk adena"); + + if (activeChar.getInventory().getItemByItemId(57).getCount() < 100000000) + { + activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 15); + activeChar.sendMessage("Blame your bad luck ! You don't have to pay so you are going to jail for 15 minutes"); + } + + activeChar.getInventory().destroyItemByItemId("Lucky Coin", Config.LUCKY_COIN_ID, 1, activeChar, activeChar.getTarget()); + activeChar.sendPacket(iu); + + break; + + + } + } + } + + public int[] getItemIds() + + { + return ITEM_IDS; + } + +} It may work now, but i didn't really test it...
  18. so is it so difficult to do this? useless anyway... thanks...
  19. xaxaxa ti na min m aresei? o server gamatos einai ala... an pezeis. dn ton katigoro, einai ena mlkismeno p dn exei ali doulia na kanei kai tou klinei ton server, ala dn katalabenw gt ton anoigei sinexia afou klinei meta apo ligo. clever boy?
  20. afou kathe 5 mins klinei gt ton ksananoigeis? min barethei na ton klinei? :S
  21. lew kai gw dn tha kanei reply coyote...... les? tespa dn thelw na sizitisw.. to exw ksanadei
  22. ? ?? ???
  23. me mmocore ftiaxneis kana ddos opos noobish error kai mlkies, ala gia sobara ddos thes firewall. sinithos omos sto deticated dn piannoun ddos...
  24. attack re ddos. dn eipa etc. lol
×
×
  • Create New...

Important Information

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..