This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - penguinimp
Pages:  2
I'm not sure how to loop over multiple maps, does anyone have a solution for this?
I've created a couple Tree Maps, but I'd like to loop over all of them and do the same action on each of them.
in my mind I want something like
This is my crappy solution of 2 loops (which could be even more)
Edit: here is my solution
« on: February 27, 2017, 03:40:54 PM »
I'm not really sure what your issue is but an idea you can try... is to put this statement
Code: Java(TM) 2 Platform Standard Edition 5.0
in to 3 separate if statements, and doing a "t8", "t9", and "t10" see if that might help narrow it down *shrug*
I'm an Excellent Developer been doing fullstack development work for a few years.
I know Java, Php, Perl, Ruby, Python, Bash, Linux, MySQL, HTML, CSS, JS (and many libraries)
I got the idea of starting a new server, but doing it by your self is pretty lame, boring, and tiresome.
I was wondering if there is any old school developers that wanted to build a server using git,
I work at a webhosting company, so I have multiple high end vps servers for beta/live environments and you can develop from your computer using what ever ide your want and I can learn puppet/chief/whatever for deploying your work done in git to the servers.
We'll do code reviews. and use traditional scrum/agile development with 2 week sprints.
You can have as much time off since this is a private server and no plans to make real money.
basically work when ever you want but what ever you commit to in a 2 week period you must get done.
Any old school moparscape users interested in setting something up like this with me?
Thinking we'll do a 317 source but really I'm game for anything.
« on: July 07, 2016, 11:53:14 AM »
o.O what happened to my guide? it's all gone
Hey MoparScape community,
Quick Introduction of myself, I have an advanced knowledge on how Linux works, I am a full time full stack perl developer for a living and some friends and I decided we want to get a PI server up and running 3 developers is a little small so we're looking for a couple more, we'll be using Git for version control if you don't know what that is, I'll teach you, but if you have git experience, it's going to be a huge step.
OS: CentOS 6.6 (Linux)
CPU: 4 x 3.3 GHz
storage: 1TB (Mirrored)
Source: Project Insanity
Client: Revision: 317 Cache: 474
We have 3 positions open,
jr client java developer, specialized in clients specifically custom objects.
jr server java developer,
jr Quality assurance, (a tester)
- Intermediate knowledge with Java
Technologies we will be using
- Web Development, Html, Js, Css
- Alpha / Beta | Live environments, Ideally everyone will have their own alpha environment.
Our Current Team
Steven - Owner / Client developer
Penguinimp - Team Lead Developer / Web Developer
Cracked - Jr Developer
« on: April 28, 2016, 10:21:19 AM »
Why perl?Just what the company I work uses, haha I know other languages, I need to pickup Ruby and Python still at some point.
I have no formal development training, I basically moved up in the company from a technical support position, and when they hired me they said we know you don't have schooling, but you are more qualified then the other people we interviewed.
« on: April 27, 2016, 05:58:52 PM »
This guide is for meant for newer developers to the runescape private server community.
Quick note: About me:
I'm a perl developer so I use snake case instead of camel case, out of habit if you don't like it, change it in your version, I develop a private server that will likely never go live and likely never be released, so I haven't cared to fix it. If i do decide to release it, and it's not hard to write a script to change snake case to camel case.
Alright let's talk politics real quick.
Q: Is this a copy paste guide?
A: No, unfortunately not.
Q: Why would you teach this? What's your goal?
A: My goal is to teach you to use epoch, and stop using custom timers in process() at the same time.
Q: What is Epoch?
A: Epoch is the the amount of seconds since 1970, Jan 1
Q: Why would I ever use it?
A: Epoch is good for keeping time, even when your users are offline, and has a really positive bonus of keeping timers out of
Q: I already have a timer what is epoch good for?
A: Firstly to answer this question you have to consider that your code
is not better, it's highly inaccurate and latency can make your timer turn 500ms in to 518ms, not a huge deal, until it is.
Instead of keep track of a timer you can just keep track of the moment you can perform an action.
Q: Isn't System.currentTimeMillis() more accurate?
A: Yeah, if you need to be millisecond accuracy use System.currentTimeMillis()
But if you are using timer--; in your process() you probably don't care how accurate it is.
Also: I'd like to pose this question. if you aren't doing combat related things, do you really need to be that accurate?
Q: Wait you are using System.currentTimeMillis() to get your Epoch time;
A: Not a question, and oh shoot you caught me, I am cheating technically I am using System.currentTimeMillis() and dividing by 1000;
Q: What's the difference?
A: Epoch is System.currentTimeMillis()/1000, so you can can save character strokes, instead of typing 1000 for 1 second, you use 1, or if you want 60 minutes, 3600, instead of 3600000, in my mind that is easier to manage and keep track.
We live in an age where developer time is more expensive then hardware.
Q: And what's the difference code wise?
Let's get in to the code it's self you don't need to import any libraries this is all core.
1: you'll need 3 new subroutines epoch_now(), date_to_epoch(), epoch_to_date();
often times you will see this
the concept is you can make specific actions only available every so often.
So often times on the old delta servers you would see something like this on objects
you could convert to something like this
as long as you are not constantly needing to display a timer you could do something like this
assuming you set pcNext when the game ends
Instead of keeping track of the timer and constantly update it.
Once you have gotten it figured out a bit more, you can start saving these epochtimers to your character and when you login, do some math and figure out if it's been 5 minutes since you last prayed, teleported, killed a daily boss, or set up an energy system where you restore energy every 25 minutes with a maximum of 5.
While yes it works, there are significant changes you should adapt
I agree with superman,
since this is all the same except for the IF
you can combine it
you could do something like this (not tested, might have a syntax error)
Or you can use a switch
Either have their own advantages, but if/else if/else if/else isn't really a solution even though it's used every where, when you look through your source.
It's used because someone didn't know that, that isn't a solution.
I commend the work you've done, and I'm not looking down on you for writing it, but there are better ways to write the code, and this isn't a tutorial it's more of a snippet.
« on: May 07, 2015, 12:50:04 PM »
I updated my Mac OS to yosemite, and to my surprise I lost java, it didn't have java installed;
So I installed java jdk, and when I run the client I just get a program with a white screen.
Here's the command I ran
Here is what I get back
Welcome to a [INSERT NAME HERE] Client!
the bash script is simply
EDIT: Okay Solution time: The problem was I am using a jdk that is to new
Found this guide.
After installing jdk 1.6.0_65,
modifying ~/.bashrc file
opening a new bash session
Meaning I compiled it in jdk8 at some point, so need to compile it again in jdk6
Works like a charm.
I'm really just trying to create a temporary player who can do all the things a player can do without giving the benefits to a player.
There are a lot of variables on the server i've decided to clean up, such as
and I don't want to award a player kills when he didn't kill that npc
You're recommendations are useful, here is how a Player Class is created,
As for your error: I believe the client class is capitalized, therefore meaning you need to capitalize it in your code.
client is lower case in every place I can find (inconsistencies in all the places...) it's also named client.java
Either that, or you need to add the imports,
I don't see any imports in PlayerHandler.java, and Player.java beyond these
or you're missing a no-args constructor for the Client class.
Oh I think this is probably it,
I believe this is a constructor in the client.java file, in theory I need to create another client method with no arguments,
any recommendations for converting this?
I've thought about it and while I don't have time to test it, I'm thinking this is probably what I want.
tdltr; (I need help creating a new tempoary player object, that I can immediately delete, so that I can give this temporary fake player benefits without affecting real players)
Unfortunately I don't have a full grasp on how to create an object in java, seems simple enough
you do a
then in another part of the code
Here is my desire, When an NPC dies by another npc, and temp comes back as null, we create a npc object that can enact as a player, (renaming player to entity, later) with the variable name of temp (btw who named these variables? why not player? i'll rename later...)
however we aren't doing a new client it's doing a conversion of a number to a (client) (this is the part I don't fully understand)
So as a temporary work around, I am using an existing player object, however, Ideally what I want to do is create a new player object, and then kill that object after one use.
What I want is something like however client.java is a child on Player.java, and that's a bit confusing.
and be able to call player subroutines
I need to be able to use a stillgfx, distranceToPoint methods, and drop equipment for this player then when ready destroy this object.
Pretty simple, any got a few minutes to help me out?
Here's my compiler
« on: April 20, 2015, 12:31:30 PM »
Meh, Someone else grave dug it, I didn't look at the date. My bad.
Appreciated, going to the end of the array and seeing if you have space will usually work, it won't always work if your bank is full and you with draw and item in the middle of the bank (unless you rebuild the array)
Which might be the case in all sources, I'm completely recoding every method I find in the delta source I found because I've realized everything is terrible.
if you do decide to use this method
You don't need to call
you can simply use
One server I first delta server I developed when I picked it up always gave null all the time of clicking it. It's array was wrong, it checked your inventory from 1-29 instead of 0-28, might also be worth while to check.
depending on your methods you could do something like this
Or you can modify your bankItem method and make sure it declines to put it in the bank if you don't have room. Not sure how yours is written.
The more correct method might be to create a new bankItem that will handle an array of arrays one array for each item (itemid, and slot) of the items from your inventory and then you don't need to do a bankHasSpace() for every item, more correct, harder to do, up to you.
Pages:  2