-
Posts
2,656 -
Joined
-
Last visited
-
Days Won
26 -
Feedback
100%
Content Type
Articles
Profiles
Forums
Store
Everything posted by An4rchy
-
[L2J]L2Sapphire - Unique Features ! (No customs)
An4rchy replied to La2War's topic in Private Servers
MAN REALLY THANKS, SERVER IS GREAT NOW -
[Preview][Dragon Age 2][PS3, XBOX 360, PC]
An4rchy replied to `|SeeN|`'s topic in Consoles General Discussion
+1. it's awesome. but still it hasn't be released yet, they may make more changes -
freya [l2j]l2vitality.eu Complex of servers!
An4rchy replied to Paul_Greatest's topic in Private Servers
then it's failed. pff anyway -
freya [l2j]l2vitality.eu Complex of servers!
An4rchy replied to Paul_Greatest's topic in Private Servers
/failed. anyway i will give a try to multiskill, i haven't played multiskill servers for like 3-4 months :P (l2mafia) -
WTS [WTS] Account on L2Java x5000
An4rchy replied to Demon152's topic in Marketplace [Items & Chars]
subclasses? also add a minimum money offer..... or i bet you will get pms like: 5 euros, give me armor for 10 euros etc... -
[L2OFFL2Hydra - Interlude - Retail Like - Starting March 2011
An4rchy replied to esperanza's topic in Private Servers
l2j or l2off? if it is l2j it will fail. if l2off, it can succes -
lol it's preview yeah when is it opening? just set the date, not 100%, what month for example :P
-
[Preview][Dragon Age 2][PS3, XBOX 360, PC]
An4rchy replied to `|SeeN|`'s topic in Consoles General Discussion
oh it's nice but i don't like skill bar.... it's like cartoon games skill bar. but still, the gameplay is awesome. -
WTS [WTS] RPG-CLUB IG (1x/5x/15x/1000x) WORKING BOT
An4rchy replied to Lain's topic in Marketplace [L2Packs & Files]
what about price? -
[Guide]Optimizing l2j server for online 600+
An4rchy replied to vmlinuz's topic in Server Development Discussion [L2J]
hmm is this the right place to post this? thanks, nice guide. -
[Preview][Dragon Age 2][PS3, XBOX 360, PC]
An4rchy replied to `|SeeN|`'s topic in Consoles General Discussion
/respect. i loved it. i hope gameplay will be as realistic as trailer :) -
WTS [WTS] AIO Item for interlude
An4rchy replied to B1ggBoss's topic in Marketplace [L2Packs & Files]
GJ B1ggBoss. What about... - Gatekeeper - Subclass Manager - Boss respawn info - Olympiad Manager - Pvp & Pk Top Also you don't accept psc? -
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?
-
sickness don't double post :S but it is already posted man...
-
red label, black label? wtf? make johnny walker, [gr] tsipouro, tsikoudia[/gr] gl anyway...
-
LMAO DONATION DIRECTLY? NO THANKS!!!!! //close
-
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...
-
[Share - L2JFrozen]Server Name On Server Time On Start!
An4rchy replied to sτrίkε-'s topic in Server Shares & Files [L2J]
so is it so difficult to do this? useless anyway... thanks... -
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?
-
afou kathe 5 mins klinei gt ton ksananoigeis? min barethei na ton klinei? :S
-
lew kai gw dn tha kanei reply coyote...... les? tespa dn thelw na sizitisw.. to exw ksanadei
-
? ?? ???
-
me mmocore ftiaxneis kana ddos opos noobish error kai mlkies, ala gia sobara ddos thes firewall. sinithos omos sto deticated dn piannoun ddos...
-
attack re ddos. dn eipa etc. lol
