Jump to content

Casinomanager,passwordchanger


Recommended Posts

SORRY FOR DUBBLE POST

 

Casino Manager have BUG

 

If you BET -10 ( when you "lose" you take +10 )

If you BET -10 ( when you "win" you do not take something or lose something )

Make it so it won't accept numbers < 0

 

Something like that:

 

If bet.amount <= 0 Then

>throw message

>return

end

 

Not something really hard for people who code in Java

Link to comment
Share on other sites

Make it so it won't accept numbers < 0

 

Something like that:

 

If bet.amount <= 0 Then

>throw message

>return

end

 

Not something really hard for people who code in Java

It's all about HTM.

 

Just add to the box type "numbers". So, the player won't be allowed to type + - = or whatever.

<edit var="count" width=120 height=15 type=number>
Link to comment
Share on other sites

 

It's all about HTM.

 

Just add to the box type "numbers". So, the player won't be allowed to type + - = or whatever.

<edit var="count" width=120 height=15 type=number>

 

 

I just report that for People know.... i made mine with button's :D

Link to comment
Share on other sites

So what facking idiot reworked?Code it's the same oh let me guess they change imports and thats called "rework"

Act like an idiot once again and you want a succed server i don't except smart people there the place are full of wannabe developers.

and any one have promision from ncsoft ? haha dont be radiculus its maxcheaters forum  for ppl which dont care about any autor rights.wakeup

Link to comment
Share on other sites

{

_log.warning("could not update the password of account: " + activeChar.getAccountName());

}

finally

{

try

{

if (con != null)

con.close();

}

catch (SQLException e)

{

_log.warning("Failed to close database connection!");

}

}

return true;

}

}

 

 

My Error: ...

String password = null;
Object _log;
try
{
...
Edited by skoupas
Link to comment
Share on other sites

 

{

_log.warning("could not update the password of account: " + activeChar.getAccountName());

}

finally

{

try

{

if (con != null)

con.close();

}

catch (SQLException e)

{

_log.warning("Failed to close database connection!");

}

}

return true;

}

}

 

 

My Error: ...

String password = null;
Object _log;
try
{
...

 

 

Change it to 

{
LOGGER.warn("could not update the password of account: " + activeChar.getAccountName());
}
finally
{
try
{
if (con != null)
con.close();
}
catch (SQLException e)
{
LOGGER.warn("Failed to close database connection!");
}
}
return true;
}
}
 
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
  • 9 months later...

Casino Manager

 

Work Fine

/*
 * 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.l2jfrozen.gameserver.model.actor.instance;

import com.l2jfrozen.gameserver.ai.CtrlIntention;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jfrozen.gameserver.network.serverpackets.SetupGauge;
import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
import com.l2jfrozen.util.random.Rnd;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
import javolution.text.TextBuilder;

public class L2CasinoInstance extends L2NpcInstance
{
public L2CasinoInstance(int objectId, L2NpcTemplate template)
{
super(objectId, template);
}

public void onBypassFeedback(L2PcInstance player, String command)
{
    int ammount = 0;
if (command.startsWith("play1"))
{
StringTokenizer st = new StringTokenizer(command);
try
{
st.nextToken();
ammount = Integer.parseInt(st.nextToken());
}
catch (NoSuchElementException nse)
{
}
Casino1(player, ammount);
}
}

public static void displayCongrats(L2PcInstance player)
{
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
player.sendMessage("Congratulations You Won!");
}

public static void displayCongrats2(L2PcInstance player)
{
player.sendMessage("You lost!");
}

public void showChatWindow(L2PcInstance player, int val)
{
NpcHtmlMessage msg = new NpcHtmlMessage(getObjectId());
msg.setHtml(casinoWindow(player));
msg.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(msg);
}

private String casinoWindow(L2PcInstance player)
{
TextBuilder tb = new TextBuilder();
tb.append("<html><title>L2 Server Name Casino Manager</title><body>");
tb.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=295 height=32><br><br>");
tb.append("<font color=\"3b8d8d\">Chance to win : 50%</font><br>");
tb.append("<img src=\"L2UI.SquareGray\" width=\"280\" height=\"1\"><br>");
tb.append("<tr><td><font color=\"e0d6b9\">Double or Nothing </font></td></tr><br>");
tb.append("<img src=\"L2UI.SquareGray\" width=\"280\" height=\"1\"></center><br>");
tb.append("<center>");
tb.append("<font color=\"e0d6b9\">Place your bet: Vote Items!</font>");
tb.append("</center>");
tb.append("<center><img src=\"L2UI.SquareGray\" width=\"280\" height=\"1\"></center><br>");
tb.append("<br>");
tb.append("<center>");
tb.append("<tr>");
tb.append("<td align=center><edit var=\"qbox\" width=120 height=15><br></td> <td align=right></td>");
tb.append("<td align=center><button value=\"Bet\" action=\"bypass -h npc_%objectId%_play1 $qbox\" width=204 height=20 back=\"sek.cbui75\" fore=\"sek.cbui75\"></td>");
tb.append("</tr>");
tb.append("</center>");

tb.append("<center><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=295 height=32><br></center>");
tb.append("</body></html>");
return tb.toString();
}

public static void Casino1(L2PcInstance player, int ammount)
{
int unstuckTimer = 100;
player.setTarget(player);
player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
player.disableAllSkills();
SetupGauge sg = new SetupGauge(0, unstuckTimer);
player.sendPacket(sg);

Casino1 ef = new Casino1(player, ammount);
player.setSkillCast(ThreadPoolManager.getInstance().scheduleGeneral(ef, unstuckTimer));
}

static class Casino1 implements Runnable {
private L2PcInstance _player;
private int _ammount;

Casino1(L2PcInstance player, int ammount) 
{
this._ammount = ammount;
this._player = player;
}

public void run() {
if (this._player.isDead())
{
return;
}

this._player.setIsIn7sDungeon(false);
this._player.enableAllSkills();
int chance = Rnd.get(3);

if (this._player.getInventory().getInventoryItemCount(7264, 1) >= this._ammount)
{
if (chance == 0)
{
L2CasinoInstance.displayCongrats(this._player);

this._player.addItem("Gift", 7264, this._ammount, this._player, true);
this._player.broadcastUserInfo();
}

if (chance == 1)
{
L2CasinoInstance.displayCongrats2(this._player);

this._player.destroyItemByItemId("Consume", 7264, this._ammount, this._player, true);
this._player.broadcastUserInfo();
}

if (chance == 2)
{
L2CasinoInstance.displayCongrats2(this._player);

this._player.destroyItemByItemId("Consume", 7264, this._ammount, this._player, true);
this._player.broadcastUserInfo();
}
}
else
{
this._player.sendMessage("You do not have enough Vote Items!");
}
}
}
} 
Edited by FastCow
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

This fix is to select an item for L2CasinoInstance comfortable in my case is the last rev l2jfrozen dp

 

have 2 int 

 

1=  int am-beep-t = 0;

2= private int _am-beep-t;

 

 

fix

 

Rename ints

 

1= int ambeept = 0

2= private int  ambeept1;

 

 

and change name to alls values

 

 

Now other Fix

 

Add the import in L2CasinoInstance

 

+ import com.l2jfrozen.Config;

   import com.l2jfrozen.gameserver.ai.CtrlIntention;
   import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
 
then

 

if (this._player.getInventory().getInventoryItemCount(11001, 0) >= this.ammount

)

 

this._player.destroyItemByItemId("Consume", 11001, this.ammount, this._player, true);

this._player.destroyItemByItemId("Consume", 11001, this.ammount, this._player, true);

 

11001 

to

(config.CASINO_ITEM)

 

 

go to

 

============================================================================================================================

Config.java

============================================================================================================================

+      //=========================================================================================================      
+         public static int CASINO_ITEM;
+      //========================================================================================================= 




+    //==================================================================================================================== 
+    CASINO_ITEM = Integer.parseInt(L2JFrozenSettings.getProperty("CasinoItem", "360"));  
+     //====================================================================================================================     
 
 
go to dp
 
============================================================================================================================
gameserver\config\functions
============================================================================================================================

add this to end of the file l2jfrozen.properties

 

#==================================================================================================================
#                                                                                                 CASINO                                                                                                                   #
#==================================================================================================================
# Casino Item need for Partticipate In Casino Manager
# default = 57
CasinoItem = 57
/no new line

 

 

Regards   8)

Edited by osvaldotl2015
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore1 Welcome to my store :  https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11
    • L2 ArenaWar: Low Rate PvP Server with Free Buffs & Autofarm [PVP]⚔️ [Free]🆓 Classic Interlude with  3x XP rates! Free starter pack(no grade) to kickstart your adventure! Autofarm for convenient grinding! Free buffs to keep you fighting fit! (2 job buffs) No experience loss on death! (Except with Karma) Clear Karma system to keep things fair! ⚖️ Active community of 800-1k players! Join our Discord to learn more! >> Discord <<     Server website: https://l2arenawar.com/en/    
    • This is dedication! 2 years working on a problem. Congratulations!
    • You indeed have to save player position over Enterworld to properly clean it up later (if you don't, even trying to delete packet content would eventually keep it up), that's what we do with debug packet (which is a reusable Map of ExServerPrimitive packets) on aCis.   It doesn't solve the FPS stuttering - more you draw/delete lines, more your client becomes laggy. It's like if client wasn't deleting drawn points/lines properly, but instead simply hide them and redrawn content above.   If you got a solution, I would happy to integrate it.   You should check aCis#Player _debug packet integration, it allows very big amount of lines/points to be drawn, it is also reusable.   https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java?ref_type=heads https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java?ref_type=heads  
    • we sell website templates, make websites to order. Great selection at very good prices. My contacts discord : advert1231 telegram : https://t.me/ggwpins  
  • Topics

×
×
  • Create New...