Menu

#2 A spy script.

open-accepted
nobody
None
1
2003-10-29
2003-09-15
Zhamel
No

Basicly you need to add a new row in sql table players
called spy: `spy` double(11,3) NOT NULL default '1.000',
be nice and give them at least one point :P

You'll also need to add a link like this: "a href=spy.php?
showme=$view[id]>Spy a" to the bottom of view.php
right after the Attack link (or where ever you want).

Hmm. If you want, which I suggest, you can also change
up ap.php so they can spend AP points to increase their
skill. Also you could add an option to facility.php so your
players can train it, but this is also up to you.

If you have any questions feel free to ask. Oh, if
someone can figure out an easy way to have a failed
spy attempt start a fight please let me know.

Discussion

  • Zhamel

    Zhamel - 2003-09-15
     
  • Liam Bull

    Liam Bull - 2003-09-15

    Logged In: YES
    user_id=851002

    ok installed it, works good thanx, Apart from no i dont know
    the attack back.

     
  • Matt Evans

    Matt Evans - 2003-10-29
    • priority: 5 --> 1
    • status: open --> open-accepted
     
  • Nobody/Anonymous

    Logged In: NO

    add this to view.php near the battle.php <a href=spy.php?
    spy=$view[id]>Spy</a>
    here is a spy script too maybe a different type

    <?php $title = "Spy Vs. Spy"; include("header.php"); ?>

    <?php
    $spy = mysql_fetch_array(mysql_query("select * from players where
    id=$spy"));
    if (empty ($spy[id])) {
    print "No such player.";
    include("footer.php");
    exit;
    }
    print "Spy section give info about any user. So spy now and you'll find
    out few things about your opponent.<BR><BR><center>Do 'not' spy on
    Admins..</center><BR><BR>";
    if (!$spy) {
    $spy = ($stat[spy]);
    } else {
    if ($stat[energy] < 5) {
    print "You don't have enough energy to spy. you Need 5 energy to spy";
    include("footer.php");
    exit;
    }
    mysql_query("update players set energy=energy-5 where id=$stat[id]");
    print "<center><b><u>$spy[user]</b></u> ($spy[id])</
    center><br>";
    if($spy[rank] == Admin) {
    print "Admin cant be spied upon<br>";
    print "haha, waste of energy...<br>";
    }
    else{
    print "Rank: $spy[rank]<br>";
    print "Last Seen: $spy[page]<br>";
    print "Age: $spy[age]<br><br>";
    print "Level: $spy[level]<br>";
    print "Strength: $spy[strength]<br>";
    print "Agility: $spy[agility]<br>";
    print "Credits: $spy[credits]<br>";
    print "Platinum: $spy[platinum]<br>";

    if ($spy[hp] > 0) {
    print "Status: Alive<br>";
    } else {
    print "Status: <b>Dead</b><br>";
    }
    print "Max HP: $spy[max_hp]<br><br>";
    print "Last Killed: $spy[lastkilled]<br>";
    }
    print "<br><a href=city.php>Go Back</a> to the city.";
    }
    ?>

    <?php include("footer.php"); ?>

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.