Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Smega Time Limits, Report system tweak, AB messages tweak

Experienced Elementalist
Joined
Apr 2, 2008
Messages
271
Reaction score
24
I'm going to make this my 'lil' release thread, currently this thread includes:
* Smega Time Limits
* Tweaked report system
* AB messages only display to GM's
---------------- Smega Time Limit ----------------


Open MapleClient.java:
Add:
PHP:
        public boolean smegastarted = false;
        public long lastsmega;
        public long lastsmegacompare;
Under:
PHP:
    Private byte greason = 1;
Add:
PHP:
public boolean smegastarted(){
            return smegastarted;
        }
        public long lastsmega(){
            return lastsmega;
        }
        public long lastsmegacompare(){
            return lastsmega;
        }
Under:
PHP:
public ChannelServer getChannelServer() {
        return ChannelServer.getInstance(getChannel());
    }
---
Open CashItemHandler.java:
Add: (I'm sure this can be done easier...)
PHP:
if (c.smegastarted == false){
c.lastsmega = 0;
c.smegastarted = true;
}
Under:
PHP:
MapleInventoryManipulator.removeById(c, MapleInventoryType.CASH, itemId, 1, true, false);
Replace:
PHP:
if (itemType == 507){ 
                int megaType = itemId / 1000 % 10;
                if (megaType == 2) {
                    c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(3, c.getChannel(), c.getPlayer().getName() +
                        " : " + slea.readMapleAsciiString()).getBytes());
                }
With:
PHP:
            if (itemType == 507){ 
                int megaType = itemId / 1000 % 10;
                if (megaType == 2) {
                //SMEGA    

                                    c.lastsmegacompare = System.currentTimeMillis() - c.lastsmega;
                                   
                                    if (c.lastsmegacompare > 5000){
                                    
                                        c.lastsmega = System.currentTimeMillis();
                                    c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(3, c.getChannel(), c.getPlayer().getName() +
                        " : " + slea.readMapleAsciiString()).getBytes());
                                      
                                    } else {
                                   MapleInventoryManipulator.addById(c, itemId, (short)1, "Spam Filter");
                                   new ServernoticeMapleClientMessageCallback(1, c).dropMessage("Smegas are disabled or time limited!");      
                }
                                    
                                }
Replace:
PHP:
} else if (itemType == 539) {
                List<String> lines = new LinkedList<String>();
                for (int i = 0; i < 4; i++) {
                    lines.add(slea.readMapleAsciiString());
                }
                c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.getAvatarMega(c.getPlayer(), c.getChannel(), itemId, lines).getBytes());
With:
PHP:
} else if (itemType == 539) {
                List<String> lines = new LinkedList<String>();
                for (int i = 0; i < 4; i++) {
                    lines.add(slea.readMapleAsciiString());
                }
                                //AVATAR SMEGA TIMERS
                               c.lastsmegacompare = System.currentTimeMillis() - c.lastsmega;
                                
                               if (c.lastsmegacompare > 5000){
                                
                                 c.lastsmega = System.currentTimeMillis();
                c.getChannelServer().getWorldInterface().broadcastMessage(null, MaplePacketCreator.getAvatarMega(c.getPlayer(), c.getChannel(), itemId, lines).getBytes());
                                
                               } else {
                                   MapleInventoryManipulator.addById(c, itemId, (short)1, "Spam Filter");
                                    new ServernoticeMapleClientMessageCallback(1, c).dropMessage("Smegas are disabled or time limited!");  
                               }
Change the time limit in these lines (milliseconds):
PHP:
if (c.lastsmegacompare > 5000){ //5 seconds

------------ Tweaked Report System ------------
Kerelmans - [Release] Smega Time Limits, Report system tweak, AB messages tweak - RaGEZONE Forums

Example: Player reported Haxorname(CHARID) for REASON

In ReportHandler.java
Add:
MapleCharacter victim =
PHP:
c.getChannelServer().getPlayerStorage().getCharacterById(reportedCharId);
Under:
PHP:
Logger logger = LoggerFactory.getLogger(this.getClass());

Replace:
PHP:
logger.info(
                        c.getPlayer().getName() + " reported charid " + reportedCharId
                        );
With:
PHP:
logger.info(
                        c.getPlayer().getName() + " reported charid " + reportedCharId + " aka " + victim.getName()
                        );

Replace:
PHP:
                StringBuilder sb = new StringBuilder();
                sb.append(c.getPlayer().getName());
                sb.append(" reported charid ");
                sb.append(reportedCharId);
                sb.append(" for ");
                sb.append(reasons[reason]);
With:
PHP:
                StringBuilder sb = new StringBuilder();
                sb.append(c.getPlayer().getName());
                sb.append(" reported ");
                sb.append(victim.getName());
                sb.append(" (");
                sb.append(reportedCharId);
                sb.append(") for ");
                sb.append(reasons[reason]);
-------- Autoban messages display to GM's only --------
Open AutobanManager.java:
Replace:
PHP:
try {
					c.getChannelServer().getWorldInterface().broadcastMessage(null, 
						MaplePacketCreator.serverNotice(0, "[Autoban] " + name + " banned by the system (Last reason: " + reason + ")").getBytes());
				} catch (RemoteException e) {
					c.getChannelServer().reconnectWorld();
				}
With:
PHP:
				try {
					c.getChannelServer().getWorldInterface().broadcastGMMessage(null, 
						MaplePacketCreator.serverNotice(0, "[GM Only Message] " + name + " banned by the system (Last reason: " + reason + ")").getBytes());
				} catch (RemoteException e) {
					c.getChannelServer().reconnectWorld();
				}
				log.warn("[h4x] Autobanned player {} (accountid {})", name, acc);
			}
Again, this will reduce lag & gives a 'cleaner' look in the chat window

Sincerely,
Kerelmans
 
Last edited:
Master Summoner
Joined
Jul 28, 2008
Messages
503
Reaction score
0
Re: [Release?/Odin] Smega Time Limits

first post

great release!

Thank You
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
Re: [Release?/Odin] Smega Time Limits

Cool. Nice release.Thanks dude
 
Master Summoner
Joined
Jul 28, 2008
Messages
503
Reaction score
0
Re: [Release?/Odin] Smega Time Limits

Btw why is there a ? in your title?
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
Re: [Release?/Odin] Smega Time Limits

Hmms. It can be either depends on how 1 views it.
 
Experienced Elementalist
Joined
Apr 2, 2008
Messages
271
Reaction score
24
Re: [Release?/Odin] Smega Time Limits

Btw why is there a ? in your title?
Bcause I was on vacation & it may be released by some1 else... I dun wanna leech other's ideas so... that's y
Greetz :D
 
Custom Title Activated
Loyal Member
Joined
Apr 29, 2008
Messages
1,297
Reaction score
509
Re: [Release?/Odin] Smega Time Limits

Nah just make it [Release]
is better
And you dont need to say its for odin in the title
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: [Release?/Odin] Smega Time Limits

Great release but there is also similar to this :X (Smega AB)
 
Experienced Elementalist
Joined
Apr 2, 2008
Messages
271
Reaction score
24
Re: [Release?/Odin] Smega Time Limits

Well, I actually coded this because some people didn't use smega hack, but to reduce lag caused by smegas.
If you wanna make an AB you can just make an if statement :
if (lastsmegacompare < 1000){
BANHAMMER!
}
import AutobanManager.java yourself... & search for the exact AB code (ima to lazy)
 
Master Summoner
Loyal Member
Joined
Jul 22, 2008
Messages
573
Reaction score
0
Re: [Release?/Odin] Smega Time Limits

i prefer this, than auto ban
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Re: [Release?/Odin] Smega Time Limits

Well, I actually coded this because some people didn't use smega hack, but to reduce lag caused by smegas.
If you wanna make an AB you can just make an if statement :
if (lastsmegacompare < 1000){
BANHAMMER!
}
import AutobanManager.java yourself... & search for the exact AB code (ima to lazy)

No, I'm just saying something similar to this has been released already except it's in auto ban form :p
 
Newbie Spellweaver
Joined
Aug 7, 2008
Messages
11
Reaction score
0
Re: [Release?/Odin] Smega Time Limits

nice thanks ^_^
=P
 
Divine Celestial
Loyal Member
Joined
Apr 6, 2008
Messages
858
Reaction score
0
Re: [Release?/Odin] Smega Time Limits

NIce release, these will reduce Smega spam by alot :)
 
Newbie Spellweaver
Joined
Jun 1, 2008
Messages
91
Reaction score
0
Re: [Release] Smega Time Limits

Awesome release. Nice work.
 
Newbie Spellweaver
Joined
Apr 14, 2008
Messages
94
Reaction score
0
Re: [Release] Smega Time Limits

Awesome
Thanks you 100% will use !
 
Newbie Spellweaver
Joined
Jun 7, 2008
Messages
67
Reaction score
0
Re: [Release] Smega Time Limits

==; Let the players smega as much as we want ]:
 
Junior Spellweaver
Joined
Jun 30, 2008
Messages
132
Reaction score
0
Re: [Release] Smega Time Limits

nice release better then the A/B
 
Banned
Banned
Joined
Aug 16, 2008
Messages
102
Reaction score
0
Re: [Release] Smega Time Limits

Nice RElease.... I like spamming you u see...
 
Back
Top