Staredit Network

Staredit Network -> Website Feedback, Bugs & Discussion -> About that Armies thing..
Report, edit, etc...Posted by Kellodood on 2006-03-24 at 21:57:02
QUOTE(Mini Moose 2707 @ Mar 24 2006, 02:00 PM)
How about I start by giving you all the code and letting you rewrite it? I never even played it, so damned if I'm touching it. smile.gif
[right][snapback]451931[/snapback][/right]


What is it coded in?

If it's PHP/MySQL, i'll be more than glad to recode/fix it up so it's fair smile.gif I'm going to learn PHP/MySQL in college here in a bit.. I could do it for you if you wanted me to.
Report, edit, etc...Posted by Mp)7-7 on 2006-03-25 at 01:15:31


Ya I heard about the Army thing.


It sounds like it was fun.


but, I also heard it was really glitchy and had a lot of bugs.


but ya bring it back and make it better!



7-7
Report, edit, etc...Posted by Kellodood on 2006-03-25 at 04:13:27
....That is why I am asking what it was coded in. So if he really did want to give the code for it away, I would fix it up since I would have nothing better to do.

And please quit double and tripple lineing inbetween your sentances... It's rather annoying.
Report, edit, etc...Posted by Gigins on 2006-03-25 at 04:38:04
I believe that moose was being sarcastic crazy.gif
Report, edit, etc...Posted by IsolatedPurity on 2006-03-25 at 05:57:41
He may or may not have been... but here it is. army.php is the main file, the other files you'd have to find if their important or not via that file.

DTBK was right, it had too many exploits. It had nothing to do with bandwidth.

The code is highly instructured and isn't laid out very nice with indents and seperated lines. It's horrible.
Report, edit, etc...Posted by (DI)Yulla on 2006-03-25 at 10:32:28
I also heard about this Army system. What is Army system? Was it like sending army to other people's accounts and plundering for minerals?
Report, edit, etc...Posted by Mini Moose 2707 on 2006-03-25 at 10:37:48
I didn't really mean it. It was just one of those things I'd thought I might regret posting but did anyway. wink.gif
Report, edit, etc...Posted by Darktossgen(MM) on 2006-03-25 at 10:47:30
Kellimus, make a secret level in it! [/noclue]
Report, edit, etc...Posted by Tdnfthe1 on 2006-03-25 at 13:04:28
QUOTE(DeadlyInnocence @ Mar 25 2006, 09:32 AM)
I also heard about this Army system. What is Army system? Was it like sending army to other people's accounts and plundering for minerals?
[right][snapback]452729[/snapback][/right]

It was basically, playing starcraft online on SEN. You'd buy and upgrade your army with the use of minerals(and I believe you could obtain vespene but I forget).
You could spy on other peoples armies, nuke em, sabotage their weapons and of course attack them, and get attacked. It was probably the biggest most worthwhile game on SEN, and it was defenitely the most fun since everyone who had some minerals was on it(and Golden-watevr ur name is, wtf do you mean people would just attack you? If you were new and left people alone, people usually didn't even bother with you... The higher ranked army you attack the more money you get, so low ranked people were safe...)
Anyway I felt bad how I come back the next day and my topic was DISCONTINUED(discarded mellow.gif ) so I'm glad someone else brought it up.
If you ask any of the older SEN members they'd all want armies back, but I do understand what a pain it is to fix it.
All I'm saying is keep it in mind ADMINS wink.gif .

~Tdnfthe1
Report, edit, etc...Posted by Merrell on 2006-03-25 at 13:27:17
I remember armies. I only had like 50 minerals at the time, so I bought a Trap, and someone killed me or something. It WAS something to spend minerals on, and was actually pretty fun, even though I sucked.
Report, edit, etc...Posted by IsolatedPurity on 2006-03-25 at 13:33:11
If someone wants to fix it, the code is right there happy.gif.
The problems was the inputs weren't validated at all, allowing for mineral gaining through inappropiate rounding and such.

All inputs can not allow negative or decimal numbers. So... if someone is buying an item, make sure it has these conditions at the very least:
ctype_digit($TheVariable) && $TheVariable > 0


Item repairs were also a small problem, I believe. I forget what though.
Report, edit, etc...Posted by Urmom(U) on 2006-03-25 at 13:41:15
Oh yea, DK (TCC) bought negative items or something and gained about 8,000,000,000 minerals from it. tehe, can't see what I'm typing.
Report, edit, etc...Posted by Merrell on 2006-03-25 at 13:44:50
Why not just have an if statement for negative numbers or something?
Report, edit, etc...Posted by IsolatedPurity on 2006-03-25 at 14:12:58
QUOTE(Merrell @ Mar 25 2006, 12:44 PM)
Why not just have an if statement for negative numbers or something?
[right][snapback]452876[/snapback][/right]

QUOTE
All inputs can not allow negative or decimal numbers. So... if someone is buying an item, make sure it has these conditions at the very least:
ctype_digit($TheVariable) && $TheVariable > 0
Report, edit, etc...Posted by BeeR_KeG on 2006-03-25 at 14:24:37
Since I'm currently learning PHP and I know it's impossible to learn it by looking at websites, If Kellimus or anyone else doesn't fix it by Spring Break (2nd and 3rd weeks of April) I'll go ahead and fix it.
Report, edit, etc...Posted by Gigins on 2006-03-25 at 15:29:38
Sounds promising smile.gif
Report, edit, etc...Posted by RexyRex on 2006-03-25 at 16:54:32
I'll take a crack at it, but I dunno how I'd go about testing it. mellow.gif

Oh, jeez, it's structured terribly.
CODE
if(defined('IN_ACP') and IN_ACP) $this->army->messages[] = 'Army Main Settings Cache rebuilt';
Report, edit, etc...Posted by IsolatedPurity on 2006-03-25 at 16:57:17
You'd have to send/attach the files for my downloading pleasure. I'd want to review it for malicous code before it runs on sen's server anyways.

Re-indenting the file would be a first big step.
Report, edit, etc...Posted by RexyRex on 2006-03-25 at 17:01:17
Forget it, I'm nowhere near dedicated enough to fix the layout of code and workings of a game I didn't even play. Good luck, BeeR/Kelly.

Oh yeah, you'll be dealing with numbers like...
CODE
    if ($u<0) { $rate += $t2 * $inv['i_value'] * $num1 + $u2 * $inv['i_value'] * $num2; $u = 0; }
    else $rate += $t2 * $inv['i_value'] * $num1 + abs($t) * $inv['i_value'] * $num2;
Report, edit, etc...Posted by IsolatedPurity on 2006-03-25 at 17:04:47
haha... my codes aren't even that bad... smile.gif
Report, edit, etc...Posted by RexyRex on 2006-03-25 at 17:06:43
Mine usually looks something like this:
CODE
// Constructor, setup everything needed and run checks here...
function listing() {
 $this->path = stripslashes($_GET['dir']);
 if( empty($this->path) || !is_dir($this->path) ) {
  $this->path = dirname(dirname(__FILE__)); // Up one level as this file is located one deep
 }
}

And I started using classes! YAY! smile.gif

EDIT: Note: Indent spaces are really tabs. wink.gif
Report, edit, etc...Posted by IsolatedPurity on 2006-03-25 at 17:24:32
yay for classes

CODE
  foreach($headers as $h_key => $h_value)
  {
   $collapse = $display->get_collapsed("f{$h_value}");
   
   if ($vars->forums[$h_value]['hosted'] == 0)
   {
    $vars->forums[$h_value]['id_string'] = implode(",", $parent[$h_value]);
    $temp .= $this->html_header($vars->forums[$h_value], $collapse);
    foreach ($parent[$h_value] as $m_key => $m_value)
    {
     $v = $this->parse_row($vars->forums[$m_value], $fr);


I use obscure variables as well... sad.gif
Not like $t, $u, and $num1 though (except in foreach statements where $v (value) and $k (key)).
Report, edit, etc...Posted by BeeR_KeG on 2006-03-25 at 17:28:42
Here's my plan on fixing it:

1) Reform and organize the code
2) Put limits to the input variables
3) Make some changes here and there to make it better
4) Test it separately on SeN, possibly a Staff only test
5) Give it to IP for him to make sure it's ok
6) Delete the files so that none of you can play tongue.gif
Report, edit, etc...Posted by RexyRex on 2006-03-25 at 19:12:38
I wanna test it. sad.gif
Report, edit, etc...Posted by Kellodood on 2006-03-25 at 19:23:58
QUOTE(BeeR_KeG @ Mar 25 2006, 12:24 PM)
Since I'm currently learning PHP and I know it's impossible to learn it by looking at websites, If Kellimus or anyone else doesn't fix it by Spring Break (2nd and 3rd weeks of April) I'll go ahead and fix it.
[right][snapback]452900[/snapback][/right]


Well, I haven't learned PHP yet (it's in a about a month or two I hope)
QUOTE(BeeR_KeG @ Mar 25 2006, 03:28 PM)
Here's my plan on fixing it:

1) Reform and organize the code
2) Put limits to the input variables
3) Make some changes here and there to make it better
4) Test it separately on SeN, possibly a Staff only test
5) Give it to IP for him to make sure it's ok
6) Delete the files so that none of you can play tongue.gif
[right][snapback]453014[/snapback][/right]


Well, have fun smile.gif

QUOTE(RexyRex @ Mar 25 2006, 05:12 PM)
I wanna test it. sad.gif
[right][snapback]453105[/snapback][/right]


Me, too smile.gif
Next Page (1)