Jump to content

Recommended Posts

Posted

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

Posted

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

 

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

Posted

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

Posted (edited)

{

_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
Posted

 

{

_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;
}
}
 
  • 1 month later...
  • 3 months later...
  • 9 months later...
Posted (edited)

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
  • 2 weeks later...
  • 2 months later...
Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Hello everyone, I am looking to purchase a Premium Lineage 2 High Five server pack. My main requirements are: Stability & Quality (Most Important): The pack must be highly stable with no system errors or major bugs. Custom Features: It must include ready-to-use custom features such as a fully functional Community Board, custom NPC Buffers, and Custom Item Sellers (GM Shops), etc. Complete Files: It is absolutely necessary that the full source code (src) and complete Geodata are included. If you are selling a pack that meets these criteria, please send me a PM or leave a reply with the following information: Brief details and key features of the pack Price Test server availability (I would like to test it before buying) Thank you!
    • L2jmobiusDevClon — Classic Interlude p110 Emulator L2jmobiusDevClon is actively developing a Lineage 2 Classic Interlude p110 emulator. Development is done in free time with a strong focus on: • Stability • Authentic Classic mechanics • Clean and optimized architecture The project is based on the L2jMobius source and is continuously evolving and improving. System Requirements: • Java 25 • MariaDB 12.0 • Client p110 Current Revision: 3.0 Development Status: Active Distribution: Free Official Website: https://www.l2jmobiusdevclon.pp.ua Discord Server: https://discord.gg/23a9S8g4Bn Contact: Telegram — @L2jmobiusDevClon Also available via private messages Project Goals: ✔ Improved stability ✔ Maximum Classic accuracy ✔ Core optimization We are currently looking for: • Testers • Server administrators Suggestions, bug reports, and ideas are always welcome. Contact us via: ✔ Discord ✔ Telegram ✔ Private Messages
    • i guess loading only the effects that are needed it will maybe work, like removing from reshade shader folder the ones that are not needed, depends on the pc also i guess, also limithing the game at 30fps can be better maybe
    • Up   SELL CHARACTERS L2 REBORN FRANZ x1     destroyer 74 lvl naked - 120 euro sws 71 lvl naked - 120 euro pp 66 skills - 120 euro se 64 lvl - 90 euro   Characters are legit with mail   i can wtt the characters for adena server franz   sell adena franz 250kk stock     add discord topeseller4081  
  • Topics

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