Welcome to LudiGames Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Does anyone ACTUALLY know how to code java?

+3
aDirtyFishTank
tyeabc
LudicrousYoshi
7 posters

Page 2 of 2 Previous  1, 2

Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Fri Apr 20, 2012 10:00 pm

gawd the clantag is a rather large amount of code lol

Code:
tempPerson.getClanColors().get(0)
+ "["
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(0,1)
+ tempPerson.getClanColors().get(2)
+ tempPerson.getClanTag().substring(1,2)
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(2)
+ tempPerson.getClanColors().get(0)
+ "]"
+ ChatColor.WHITE

Sad part is, i cant really assign that to any type of variable(to my knowledge) so i gotta copy that code wherever the clantag is used -_-
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  swimmerboy1196 Fri Apr 20, 2012 10:19 pm

LudicrousYoshi wrote:gawd the clantag is a rather large amount of code lol

Code:
tempPerson.getClanColors().get(0)
+ "["
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(0,1)
+ tempPerson.getClanColors().get(2)
+ tempPerson.getClanTag().substring(1,2)
+ tempPerson.getClanColors().get(1)
+ tempPerson.getClanTag().substring(2)
+ tempPerson.getClanColors().get(0)
+ "]"
+ ChatColor.WHITE


Sad part is, i cant really assign that to any type of variable(to my knowledge) so i gotta copy that code wherever the clantag is used -_-

Ludi you are my hero
swimmerboy1196
swimmerboy1196

Posts : 403
Join date : 2011-04-04
Location : Under a bed

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Sat Apr 21, 2012 6:25 pm

figured out how to make that long ass statement into a method so yay for me!

Also configured all the normal player commands and stats except for /follow and /recruit

Still need to find a way to make persistent data tho...
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Sat Jun 02, 2012 9:47 pm

I'll have you know I'm ACTUALLY workin on it and have already made a few changes today.

The follow and recruit stuff is actually turning out to be tougher than I thought tho...
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Sun Jun 03, 2012 7:45 pm

Seemingly finished the /recruit and /follow commands! Very Happy

I need to do some more smaller commands that wont be too complicated to do.

Also gonna be finally implementing the colorful chat tags YAY

To give you an idea of "smaller" vs. "larger" commands -coding wise-

Small:
Code:
          if(args[0].equals("when"))
          {
             sender.sendMessage(ChatColor.LIGHT_PURPLE + "Current prestige per hour: " + ChatColor.WHITE + hpSender.getPrestigeGain());
             sender.sendMessage(ChatColor.LIGHT_PURPLE + "Prestige needed for next level: " + ChatColor.WHITE + hpSender.getNextLevelReq());
             sender.sendMessage(ChatColor.LIGHT_PURPLE + "Minutes until next prestige gain: " + ChatColor.WHITE + hpSender.getMinsMore());
             return true;
          }
Large:
Code:
if(args[0].equals("recruit") || args[0].equals("follow"))
          {
            if(tempPerson == hpSender)
            {
               sender.sendMessage(ChatColor.RED + "You did not choose a valid person");
               return true;
            }
             if(args[0].equals("recruit"))
             {
                if(tempPerson.getLord() != null)
                {
                   sender.sendMessage(ChatColor.RED + tempPerson.getName() + " Already has a Lord!");
                   return true;
                }
                if(hpSender.getDirectVassals().size() >= hpSender.getMaxDVassals())
                {
                   sender.sendMessage(ChatColor.RED + "You already have enough direct vassals!");
                   return true;
                }
                if(hpSender.getLevel() < tempPerson.getLevel())
                {
                   sender.sendMessage(ChatColor.RED + "You can't recruit somebody with a higher level than you.");
                   return true;
                }
                hpSender.setNewVassal(tempPerson);
                if(tempPerson.getNewLord() != null && tempPerson.getNewLord().equals(hpSender))
                {
                   tempPerson.setLord(hpSender);
                   hpSender.addDirectVassal(tempPerson);
                   hpSender.setNewVassal(null);
                   tempPerson.setNewLord(null);
                   sender.sendMessage(ChatColor.GREEN + args[1] + " Is your new vassal!");
                }
                else
                {
                   sender.sendMessage(ChatColor.GREEN + args[1] + " Has been requested as a new vassal.");
                }
             }
             if(args[0].equals("follow"))
             {
                if(hpSender.getLord() != null)
                {
                   sender.sendMessage(ChatColor.RED + "You already have a Lord!");
                   return true;
                }
                if(tempPerson.getDirectVassals().size() >= tempPerson.getMaxDVassals())
                {
                   sender.sendMessage(ChatColor.RED + tempPerson.getName() + " Already has enough direct vassals!");
                   return true;
                }
                if(hpSender.getLevel() > tempPerson.getLevel())
                {
                   sender.sendMessage(ChatColor.RED + "You can't follow somebody with a lower level than you.");
                   return true;
                }
                hpSender.setNewLord(tempPerson);
                if(tempPerson.getNewVassal() != null && tempPerson.getNewVassal().equals(hpSender))
                {
                   hpSender.setLord(tempPerson);
                   tempPerson.addDirectVassal(hpSender);
                   tempPerson.setNewVassal(null);
                   hpSender.setNewLord(null);
                   sender.sendMessage(ChatColor.GREEN + args[1] + " Is your new lord!");
                }
                else
                {
                   sender.sendMessage(ChatColor.GREEN + args[1] + " Has been requested as a new lord.");
                }
             }
             return true;
          }

I did the large one this weekend just fyi

*The code is much more organized in the coding program I use*
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Sun Jun 03, 2012 10:27 pm

I've finished all of the main features of the plugin! Very Happy
I haven't done the whole "prevent afk" stuffs tho

All I have to do now is figure out how to store an ArrayList on a text file...

Aside from that - IT'S READY

I think...
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  aDirtyFishTank Mon Jun 04, 2012 4:02 pm

woot !
aDirtyFishTank
aDirtyFishTank

Posts : 1008
Join date : 2010-12-10
Age : 27

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  swimmerboy1196 Mon Jun 04, 2012 7:53 pm

shoop the woop!
swimmerboy1196
swimmerboy1196

Posts : 403
Join date : 2011-04-04
Location : Under a bed

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  ferentinofighter Mon Jun 04, 2012 8:59 pm

woopdy doopdy shoopdy floop!
ferentinofighter
ferentinofighter

Posts : 301
Join date : 2011-04-30
Location : Like hell if i told you where i was!

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  aDirtyFishTank Tue Jun 05, 2012 4:23 pm

woopity doopity shoopity woop the woopity shoopity doopity boopity
aDirtyFishTank
aDirtyFishTank

Posts : 1008
Join date : 2010-12-10
Age : 27

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Tue Jun 05, 2012 5:20 pm

Apparently to time for serialization learning how do

If ya know what I mean and you probably dont Razz
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  ferentinofighter Tue Jun 05, 2012 6:00 pm

LudicrousYoshi wrote:Apparently to time for serialization learning how do

If ya know what I mean and you probably dont Razz

No one ever knows what your talking about Ludi
ferentinofighter
ferentinofighter

Posts : 301
Join date : 2011-04-30
Location : Like hell if i told you where i was!

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Tue Jun 05, 2012 6:26 pm

My best friend, the ArrayList, just became my worst enemy Razz

Fahk me...

Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.

Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!

I could continue, yes it keeps going, but I think you have the idea Very Happy
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  swimmerboy1196 Tue Jun 05, 2012 7:40 pm

LudicrousYoshi wrote:My best friend, the ArrayList, just became my worst enemy Razz

Fahk me...

Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.

Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!

I could continue, yes it keeps going, but I think you have the idea Very Happy

dafuq
swimmerboy1196
swimmerboy1196

Posts : 403
Join date : 2011-04-04
Location : Under a bed

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  ferentinofighter Tue Jun 05, 2012 9:52 pm

swimmerboy1196 wrote:
LudicrousYoshi wrote:My best friend, the ArrayList, just became my worst enemy Razz

Fahk me...

Serializing something is when you make a static string of data of an object that can be printed on a file. Then you would subsequently re-read what you wrote to reload your object.

Problem is:
I use an "un-serialiazable" object, ArrayList, that holds a list of objects.
Also, each object I made in that "un-serialiazable" ArrayList is "un-serialiazable".
Did I mention that each "un-serialiazable" object in that "un-serialiazable" ArrayList has "un-serialiazable" ArrayLists in them?
I almost forgot... each "un-serialiazable" object in that "un-serialiazable" ArrayList with "un-serialiazable" ArrayLists in them are filled with "un-serialiazable" objects!

I could continue, yes it keeps going, but I think you have the idea Very Happy


dafuq


Word Razz
ferentinofighter
ferentinofighter

Posts : 301
Join date : 2011-04-30
Location : Like hell if i told you where i was!

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  aDirtyFishTank Wed Jun 06, 2012 4:21 pm

yeah, still no one knows what your talking about
aDirtyFishTank
aDirtyFishTank

Posts : 1008
Join date : 2010-12-10
Age : 27

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  swimmerboy1196 Mon Jun 11, 2012 9:43 am

Progress?
swimmerboy1196
swimmerboy1196

Posts : 403
Join date : 2011-04-04
Location : Under a bed

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  LudicrousYoshi Mon Jun 11, 2012 1:38 pm

swimmerboy1196 wrote:Progress?

I got it to save the data, but I am still frustratingly trying to find out how to load the saved data :/

I'm literally on the final step before it's usable!
LudicrousYoshi
LudicrousYoshi
Admin

Posts : 1337
Join date : 2010-12-05
Location : Virginer

https://ludigames.forumotion.com

Back to top Go down

Does anyone ACTUALLY know how to code java? - Page 2 Empty Re: Does anyone ACTUALLY know how to code java?

Post  Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum