[0.03a] RForge - Intuitive & Instanced PI - Extremely Stable - Release

Guardian

Banned
May 3, 2017
1,551
459
0
8s8dJkz.png


It is a fresh release among the released PI's in history. Believe me or not, this version of Project Insanity will help you create a server from scratch without requirements.
This package is perfect for beginner programmers as well as for advanced ones. RForge is an extremely stable design of files, classes and rules so you will not be disappointed with the performance of your individual configuration.
Enjoy :) I do not intend to update this package. However, if there are people who are willing, we can transform the project as open-source on github.





FHuUHKX.png


Well, why not?

Original Project Insanity has much things to offer. RForge has much more, they are well used from the predecessor and were developed it to final stage.
Check the features below.



s3Fii3H.png
Original Project Insanity:


  • Amazing combat
  • Fairly accurate accuracy formulas (tweaked a lot)
  • Fully functional clan chat
  • 3/4 godwar bosses
  • Amazing npc drop system
  • Fight Pits
  • Pest Control
  • Barrows
  • Fight Caves (360 onwards, easy to add all ways, just build on the array)
  • Quite a few skills (some half-assed)
  • All 474 items (loaded through cache)
  • Most pots work, very easy to add more
  • Most food work, very east to add more
  • 100% Potion dose mixing
  • Base for skill menus
  • Piety + chivalry
  • Perfect prayer draining
  • Custom infinity/mage book minigame
  • Working obelisks
  • Perfect prayer draining and protection prayer delay in pvp


s3Fii3H.png
RForge 0.03a:


  • A lot of Dupe Fixed (ones released with Jacks source, there is like 3-4 more)
  • Cycle-Based EventManager
  • Boat Sailing
  • Gnome Glider
  • Crystal Chest
  • Current Weapon Speeds
  • Far Casting (Magic/Ranged)
  • Cow Milking
  • Flax Milking
  • Mute/Banning + Timers
  • Server-Sided Clipped Following
  • ItemOnPlayer Packet Handling
  • Single+ Double Door handler
  • Greatly Improved Item Handler
  • A Shit Load of Combat Improvements (Bug Wise)
  • Current Weapon Speeds
  • Correct Ranged Max-Hit Formulae
  • Better Drop System (easier to add new drops)
  • God Book Making + Preaching
  • Fixed 15 Bugs
  • Character Appearance Interface on Start-up (thought it was a decent edition :luke132:)
  • Better Commands Handler
  • 6 Player Rights (all configured)
  • NPC Facing (Check NPC Spawn.cfg for more info)
  • Removed all of the Pointless cfg files and renamed them better
  • Cleaned-up All classes, Electronically and Manually
  • Tweaked a lot of timers!
  • Players Save on a individual basis (might want to re-add to config class)
  • No Errors in eclipse
  • Fixed as many Warnings as I could
  • Re-Did packaging, classes can be found easily and it isn't a maze of BS now
  • Home is in lumbridge


npTFVLQ.png


s3Fii3H.png
The package itself does not have a compiler
s3Fii3H.png

Make one yourself or try this one:

https://www.jetbrains.com/idea/


zQdZiMy.png


Each project has its drawbacks, which are noticeable only in the post-production.
However, I noticed that I have some time so I will help you now.
Spoiler for 0.03 fixes:
----------------------------------------
objectHandler:

under public boolean loadDoorConfig

find
Code:
        try {
            line = objectFile.readLine();
        } catch(final IOException ioexception) {
            Misc.println(fileName+": error loading file.");
            return false;
    }

and simply remove the return false


under loadGlobalObjects find

Code:
    try {
            line = objectFile.readLine();
        } catch(final IOException ioexception) {
            Misc.println(fileName+": error loading file.");
            return false;
        }


and remove the return false

----------------------------------------

ItemHandler:

under loadItemList
find
Code:
    try {
        line = characterfile.readLine();
    } catch(final IOException ioexception) {
        Misc.println(FileName+": error loading file.");
        return false;
    }
and remove return false

----------------------------------------

NpcHandler:

under loadAutoSpawn

find
Code:
        try {
            line = characterfile.readLine();
        } catch(final IOException ioexception) {
            Misc.println(FileName+": error loading file.");
            return false;
        }
and remove the return false


under loadNpcList
find
Code:
        try {
            line = characterfile.readLine();
        } catch(final IOException ioexception) {
            Misc.println(FileName+": error loading file.");
            return false;
        }
and remove the return false

----------------------------------------

ShopHandler

under loadShops
find
Code:
        try {
            line = characterfile.readLine();
        } catch(final IOException ioexception) {
            Misc.println(FileName+": error loading file.");
            return false;
        }
and remove the return false

----------------------------------------

Class I

under containsKey
find
Code:
                try {
            s = bufferedreader.readLine();
        } catch(final IOException ioexception){
            ioexception.printStackTrace();
            return;
        }
and remove return

----------------------------------------


Spoiler for 0.03 fixes 2:
----------------------------------------
PlayerHandler.java
Replace your updatePlayer method with this code
Code:
public void updatePlayer(final Player plr, final Stream str) {
        updateBlock.currentOffset = 0;
        if (PlayerHandler.updateRunning && !PlayerHandler.updateAnnounced) {
            str.createFrame(114);
            str.writeWordBigEndian(PlayerHandler.updateSeconds * 50 / 30);
        }
        plr.updateThisPlayerMovement(str);
        final boolean saveChatTextUpdate = plr.isChatTextUpdateRequired();
        plr.setChatTextUpdateRequired(false);
        plr.appendPlayerUpdateBlock(updateBlock);
        plr.setChatTextUpdateRequired(saveChatTextUpdate);
        str.writeBits(8, plr.playerListSize);
        final int size = plr.playerListSize;
        plr.playerListSize = 0;
        for (int i = 0; i < size; i++) {
            if (!plr.didTeleport && !plr.playerList[i].didTeleport
                    && plr.withinDistance(plr.playerList[i])) {
                plr.playerList[i].updatePlayerMovement(str);
                plr.playerList[i].appendPlayerUpdateBlock(updateBlock);
                plr.playerList[plr.playerListSize++] = plr.playerList[i];
            } else {
                final int id = plr.playerList[i].playerId;
                plr.playerInListBitmap[id >> 3] &= ~(1 << (id & 7));
                str.writeBits(1, 1);
                str.writeBits(2, 3);
            }
        }
        int j = 0;
        for (int i = 0; i < Config.MAX_PLAYERS; i++) {
            if (plr.playerListSize >= 254) {
                break;
            }
            if (updateBlock.currentOffset + str.currentOffset >= 4900) {
                break;
            }
            if (PlayerHandler.players[i] == null
                    || !PlayerHandler.players[i].isActive
                    || PlayerHandler.players[i] == plr) {
                continue;
            }
            final int id = PlayerHandler.players[i].playerId;
            if ((plr.playerInListBitmap[id >> 3] & 1 << (id & 7)) != 0) {
                continue;
            }
            if (j >= 10) {
                break;
            }
            if (!plr.withinDistance(PlayerHandler.players[i])) {
                continue;
            }
            plr.addNewPlayer(PlayerHandler.players[i], str, updateBlock);
            j++;
        }

        if (updateBlock.currentOffset > 0) {
            str.writeBits(11, 2047);
            str.finishBitAccess();

            str.writeBytes(updateBlock.buffer, updateBlock.currentOffset, 0);
        } else {
            str.finishBitAccess();
        }

        str.endFrameVarSizeWord();

    }

Then in player.java replace your withinDistance method (the player one) with this:
Code:
public boolean withinDistance(Player otherPlr) {
        if(heightLevel != otherPlr.heightLevel) return false;
        int deltaX = otherPlr.absX-absX, deltaY = otherPlr.absY-absY;
        return deltaX <= 15 && deltaX >= -16 && deltaY <= 15 && deltaY >= -16;
    }

Spoiler for 0.03 firstClickObject fix:
----------------------------------------
This fixes firstClickObject for the actionHandler class
Navigate to the ClickObject class
find:
Code:
if (client.goodDistance(client.objectX + client.objectXOffset, client.objectY + client.objectYOffset, client.getX(), client.getY(), client.objectDistance)) {
and add this right under it:
Code:
client.getActions().firstClickObject(client.objectId, client.objectX, client.objectY);

Spoiler for 0.03 fixes combat/total:
----------------------------------------
Total level fix
Navigate to the PlayerAssistant class and under
public void setSkillLevel
this method ^, add this method:
Code:
public void totallevelsupdate() {
            int totalLevel = (getLevelForXP(c.playerXP[0]) + getLevelForXP(c.playerXP[1]) + getLevelForXP(c.playerXP[2]) + getLevelForXP(c.playerXP[3]) + getLevelForXP(c.playerXP[4]) + getLevelForXP(c.playerXP[5]) + getLevelForXP(c.playerXP[6]) + getLevelForXP(c.playerXP[7]) + getLevelForXP(c.playerXP[8]) + getLevelForXP(c.playerXP[9]) + getLevelForXP(c.playerXP[10]) + getLevelForXP(c.playerXP[11]) + getLevelForXP(c.playerXP[12]) + getLevelForXP(c.playerXP[13]) + getLevelForXP(c.playerXP[14]) + getLevelForXP(c.playerXP[15]) + getLevelForXP(c.playerXP[16]) + getLevelForXP(c.playerXP[17]) + getLevelForXP(c.playerXP[18]) + getLevelForXP(c.playerXP[19]) + getLevelForXP(c.playerXP[20]));
            sendFrame126("Levels: "+totalLevel, 13983);
            }
Navigate to the Client class and in the
Code:
public void initialize() {
method, add this:
Code:
getPA().totallevelsupdate();
----------------------------------------
Combat level fix
Navigate to the Client class and add this method towards the very top but under:
Code:
public client (blah blah blah crap blah) {

add this

Code:
    public int getCombatLevel() {
        int mag = (int) ((getLevelForXP(playerXP[6])) * 1.5);
        int ran = (int) ((getLevelForXP(playerXP[4])) * 1.5);
        int attstr = (int) ((double) (getLevelForXP(playerXP[0])) + (double) (getLevelForXP(playerXP[2])));
            if (ran > attstr) {
                combatLevel = (int) (((getLevelForXP(playerXP[1])) * 0.25)
                        + ((getLevelForXP(playerXP[3])) * 0.25)
                        + ((getLevelForXP(playerXP[5])) * 0.125) + ((getLevelForXP(playerXP[4])) * 0.4875));
            } else if (mag > attstr) {
                combatLevel = (int) (((getLevelForXP(playerXP[1])) * 0.25)
                        + ((getLevelForXP(playerXP[3])) * 0.25)
                        + ((getLevelForXP(playerXP[5])) * 0.125) + ((getLevelForXP(playerXP[6])) * 0.4875));
            } else {
                combatLevel = (int) (((getLevelForXP(playerXP[1])) * 0.25)
                        + ((getLevelForXP(playerXP[3])) * 0.25)
                        + ((getLevelForXP(playerXP[5])) * 0.125)
                        + ((getLevelForXP(playerXP[0])) * 0.325) + ((getLevelForXP(playerXP[2])) * 0.325));
            }
            return combatLevel;
    }

now add this:
Code:
getPA().sendFrame126("Combat Level: "+getCombatLevel(), 3983);

in the
Code:
public void initialize() {
method.


Spoiler for 0.03 fixes chat:
----------------------------------------
Cannot see text in chat? Here we go:

Navigate to the Chat class and change this:
Code:
if (System.currentTimeMillis() < c.muteEnd) {
            c.sendMessage("You are muted, know one can hear you.");
            return;
        } else {
            c.muteEnd = 0;
        }
    }

}

to this:

Code:
if (System.currentTimeMillis() < c.muteEnd) {
            c.sendMessage("You are muted, know one can hear you.");
            return;
        } else {
            c.setChatTextUpdateRequired(true);
            c.muteEnd = 0;
        }
    }

}

Spoiler for 0.03 fix idle logout packet:
----------------------------------------
IDLE LOG-OUT FIX
Code:
package engine.packet;

import game.*;

/*
 * RForge - Instanced PI @Caelum
 * IdleLogout.java
 */

public class IdleLogout implements PacketType {
    
    @Override
    public void processPacket(final Client c, final int packetType, final int packetSize) {
        if (Config.IDLE_LOGOUT == true) {
            switch (packetType) {
            case 202:
                if ((c.underAttackBy > 0) || (c.underAttackBy2 > 0)) {
                    return;
                } else {
                    c.logout();
                }
                break;
            }
        }
    }
    
}

Spoiler for 0.03 run fix:
----------------------------------------
Run fix
This is the protectionist fix for running when you first log-in (should be walking?)

Player classchange this:
Code:
public boolean isRunning2 = true;

to this:
Code:
public boolean isRunning2 = false;


Spoiler for 0.03 itemreplace fix:
----------------------------------------
ItemReplace Fix

Under

Code:
public void handleCharacter(final File f) {

Find and Remove

Code:
s = new Scanner(f);


atdOxaa.png


QbtCb9F.gif


RForge0.03a-RELEASE.zip
(19,3MB)
Code:
https://github.com/uxuii/rfreleases/raw/master/RForge0.03a-RELEASE.zip

y not? pi is the best base out there m8!

-

pics for those that are interested lol:

Screenshot_373.png

Screenshot_374.png
 
PI still a thing? Let's not start 2019 with this.

ot: i'm sure someone may find this useful.
 
Thanks for the Contribution
And btw what does PI mean... Sorry might be a stupid question :D
 
Thanks for the Contribution
And btw what does PI mean... Sorry might be a stupid question :D

Project Insanity - Known as PI, it was created by a member known as Sanity and gained immense popularity due to how it's code was written. It's very easy to adapt to for beginners in programming, but as a drawback of this simplicity the first version had loads of bugs, exploits, dupes and other problems which meant it could only manage to hold around ~40 players depending on computer host specs before major lag problems occured.

There have been improvements to PI which replace old systems with new ones to fix dupes, bugs and lag problems while keeping the old code style so newbies could still learn and use it with ease.
 
Project Insanity - Known as PI, it was created by a member known as Sanity and gained immense popularity due to how it's code was written. It's very easy to adapt to for beginners in programming, but as a drawback of this simplicity the first version had loads of bugs, exploits, dupes and other problems which meant it could only manage to hold around ~40 players depending on computer host specs before major lag problems occured.

There have been improvements to PI which replace old systems with new ones to fix dupes, bugs and lag problems while keeping the old code style so newbies could still learn and use it with ease.

Okay. Thanks!
 
how is this more stable..


I'll have u know i'm a veteran of the US Keyboard Warriors and Coding Association! I will inform you that PI is the most stable base there is to use as a catalyst to other servers that're raised up to be shitstains of the RSPS community! I would also like you to know that deathlypvpz was by far the best server ever! SoulSplit never came close, haha! You kiddies now'a'days don't even know about the OG of PI called RiotScape! AGAIN! Best base to ever make it onto everyones computers in the early 2000's! HOW DARE YOU DISGRACE ITS NAME BY QUESTIONING ITS INTEGRITY! I will have you in court by December 9th, 2091 for SLANDER with this behavior! That being said.. PUT SOME RESPEK ON PI'S NAME!
Court adjourned.
 
Project Insanity - Known as PI, it was created by a member known as Sanity and gained immense popularity due to how it's code was written. It's very easy to adapt to for beginners in programming, but as a drawback of this simplicity the first version had loads of bugs, exploits, dupes and other problems which meant it could only manage to hold around ~40 players depending on computer host specs before major lag problems occured.

There have been improvements to PI which replace old systems with new ones to fix dupes, bugs and lag problems while keeping the old code style so newbies could still learn and use it with ease.

Mate back in 2009 this was one of the few servers that were packaged frameworks. 2009. It's 2019. 10 years later it's still fucking shit. Move on.

So what did you actually do? Doesn't seem like you done much and most of it is irrelevant and the same shit "trying to fix pi" bs. Cool effort on thread.

y not? pi is the best base out there m8!

PI the best out there? You are confused mate
 
IF WE REALLY WANNA BRING BACK SOMETHING GREAT CAN WE ALL USE SOME CZAR SERVERS? OR FRUGOO-SCAPE. THOSE WERE THE HITS.

OT: Good release I guess?
 
Looks pretty nice, amazing work btw.
I like it, take it; already had netty framework, this is nice server base and framework to build off,
decent post and server for someone whos wanting to start fresh, looks pretty nice.

Over all, nice work.

Won't use though, but it's up there for someone who's starting.
Thanks for the contribution.
 

Users who are viewing this thread (total: 1, members: 0, guests: 1)