[T1] powda's waypoint script

Soup4you123
01-20-2003, 12:31 PM
best script ever.


:heart::heart::heart:

glad i tried it, I can't live without it now.


http://sprott.physics.wisc.edu/images/heart.gif

Soup4you123
01-20-2003, 06:35 PM
:clap:

verve
01-20-2003, 06:44 PM
need
working
port
stripped

Ambient7
01-20-2003, 07:42 PM
Originally posted by verve
need
working
port
stripped

I'm
working
on
it
soon;
after
exams.

·liquid·
01-20-2003, 07:59 PM
Originally posted by verve
need
working
port
stripped

This (http://www.tribalwar.com/rdb/index.php?fileid=170) doesn't work?

Ambient7
01-20-2003, 08:31 PM
Originally posted by ·liquid·


This (http://www.tribalwar.com/rdb/index.php?fileid=170) doesn't work?

Let's just say someone who doesn't know Events at all scripted it.

·liquid·
01-20-2003, 10:40 PM
Ok.. here is a Stripped version I threw together in about 5 minutes. I *have not* tested it with Stripped, so it may or may not work. (but it looks like it should...)

// *** Ported to Stripped by liquid ***
// Script: PowPoint.cs
// Author: powdahound
// Website: http://hosted.tribes-universe.com/powdahound
// Email: powdahound@gamer-insight.com
// Date: 11/07/02
// Function: Smart waypointer, here's how it works:
//
// 1. If your mode is "defense"
// 1. If enemy has your flag: waypoint enemy with your flag...
// 2. Otherwise If teammate has flag: waypoint friendly flag carrier...
// 3. Otherwise: waypoint friendly flag stand
// 2. If your mode is "offense"
// 1. If teammate has flag: waypoint friendly flag carrier...
// 2. Otherwise If enemy has your flag: waypoint enemy with your flag...
// 3. Otherwise: waypoint enemy flag stand
// 3. If your mode is "manual"
// 1. If you waypoint friendly:
// 1. If teammate has flag: will waypoint friendly carrier
// 2. Otherwise: will waypoint friendly flag stand
// 2. If you waypoint enemy:
// 1. If enemy has your flag: will waypoint enemy with your flag
// 2. Otherwise: will waypoint enemy flag stand
//
// Credits: THANKS TO z0dd for letting me use his waypointing script
// for flag stand waypointing support. also thanks to
// Superslug for keeping his waypoints current
// Updates:
// [11-7-02]
// Removed extra info in z0dd_waypoints.cs.
// Made manual waypoint functions waypoint stands as well as flaggers.

// load z0dds script for support!!!!!!!!!
//exec("z0dd_waypoints.cs"); nokay :x

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// preferences
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
bindcommand(keyboard0, make, alt, "1", TO, "ppt::togglemode();");
bindcommand(keyboard0, make, alt, "f", TO, "ppt::wptFriendly();");
bindcommand(keyboard0, make, alt, "e", TO, "ppt::wptEnemy();");

// this is the mode the script will start out in
// offense is 0, 1 is defense, and 2 is manual
$ppt::current = 0;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// Script Below
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Event::Attach(eventFlagGr abbed, ppt::setFlagPlayer);
Event::Attach(eventFlagDr opped, ppt::setFlagField);
Event::Attach(eventFlagRe turned, ppt::setFlagHome);
Event::Attach(eventFlagOO BReturn, ppt::setFlagHome);
Event::Attach(eventFlagCa ptured, ppt::setFlagHome);

$ppt::flag[0] = "home";
$ppt::flag[1] = "home";

function ppt::setFlagPlayer(%name, %team) {
$ppt::flag[%team] = %name;
}

function ppt::setFlagField(%name, %team) {
$ppt::flag[%team] = "field";
}

function ppt::setFlagHome(%name, %team) {
$ppt::flag[%team] = "home";
}

function ppt::parse()
{
%friendly = $ppt::flag[$MyTeam];
%enemy = $ppt::flag[!$MyTeam];

// observers get no waypoints
if ($MyTeam == "-1" || $ppt::mode == "manual")
return;

// if we're the carrier of the enemy flag we want to waypoint home!
if (%enemy == $MyName)
ppt::wptFlag("friendly");

else if ($ppt::mode == "defense")
{
if (%friendly != "home" && %friendly != "field") // waypoint enemy carrier if home flag is taken
ppt::wptEnemy();
else if (%enemy != "home" && %enemy != "field") // otherwise help the O and escort the friendly carrier
ppt::wptFriendly();
else
ppt::wptFlag("friendly"); // otherwise waypoint our base
}
else if ($ppt::mode == "offense")
{
if (%enemy != "home" && %enemy != "field") // waypoint our teammate and help him/her!
ppt::wptFriendly();
else if (%friendly != "home" && %friendly != "field") // otherwise kill the foo with your flag
ppt::wptEnemy();
else
ppt::wptFlag("enemy"); // otherwise help us get to the enemy base, because
// we haven't been playing t1 long enough to know already ;)
}
}

function ppt::wptFriendly()
{
%taker = $ppt::flag[!$MyTeam];
%clientId = getClientByName(%taker);

if (%taker == "home" || %taker == "")
ppt::wptFlag("friendly");
else
{
%msg = "ESCORT ---> " @ %taker;// @ "~wescfr";
remoteEval(2048, "IssueTargCommand", 0, %msg, %clientID - 2048, getManagerId());
}
}

function ppt::wptEnemy()
{
%taker = $ppt::flag[$MyTeam];
%clientId = getClientByName(%taker);

if (%clientId == $MyId)
ppt::wptFlag("friendly");
else if (%taker == "home" || %taker == "")
ppt::wptFlag("enemy");
else
{
%msg = "KILL ---> " @ %taker;// @ "~wattway";
remoteEval(2048, "IssueTargCommand", 0, %msg, %clientID - 2048, getManagerId());
}
}

function ppt::wptFlag(%team)
{
// getTeam z0dd
// DS: 1 1
// BE: 0 0
%side = $MyTeam

if (%team == "friendly")
{
%teamStr = "Friendly flag stand.";

if (%side == 1)
%wptid = 2;
else
%wptid = 1;
}
else if (%team == "enemy")
{
%teamStr = "Enemy flag stand.";

if (%side == 1)
%wptid = 1;
else
%wptid = 2;
}

//echo("****** Team: "@%team);
//echo("****** Side: "@%side);
//echo("****** Index: "@%wptid);

// thanks z0dd!!!
remoteEval(2048, "issueCommand", 1, "WP: " @ %teamStr,
$z0ddWPs::data[$servermission, %wptid, x],
$z0ddWPs::data[$servermission, %wptid, y],
getManagerId());
}



// Yes, it looks like MrPoop's code from AutoPoint.
// aren't too many ways to set up a simple task like this :)
$ppt::options[0] = "offense";
$ppt::options[1] = "defense";
$ppt::options[2] = "manual";

$ppt::max = 2;

$ppt::mode = $ppt::options[$ppt::current];

function ppt::togglemode()
{
$ppt::current++;

if($ppt::current > $ppt::max)
$ppt::current = 0;

$ppt::mode = $ppt::options[$ppt::current];

remoteCP(2048, "<L5>PowPoint waypoint mode is: <f2>" @ $ppt::mode, 2);
}

function z0ddWPs::addWP(%mapName, %x, %y, %side, %msgStr)
{
%n = $z0ddWPs::data[%mapName, n]++;
$z0ddWPs::data[%mapName, %n, side] = %side;
$z0ddWPs::data[%mapName, %n, x] = %x;
$z0ddWPs::data[%mapName, %n, y] = %y;
$z0ddWPs::data[%mapName, %n, str] = %msgStr;
}

z0ddWPs::addWP("Acrophobia", 698, 800, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Acrophobia", 327, 225, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("AvalancheMkII", 879, 728, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("AvalancheMkII", 145, 297, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("CanyonCrusade_deluxe", 806, 592, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("CanyonCrusade_deluxe", 205, 572, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("CanyonCrusade_deluxe ", 806, 592, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("CanyonCrusade_deluxe ", 205, 572, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("CloakOfNight", 840, 836, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("CloakOfNight", 184, 188, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("DangerousCrossing", 800, 750, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("DangerousCrossing", 421, 288, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Desert_Of_Death", 389, 196, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Desert_Of_Death", 371, 883, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Domino", 256, 226, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Domino", 768, 797, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("IceRidge", 599, 212, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("IceRidge", 345, 787, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("JaggedClaw", 635, 250, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("JaggedClaw", 297, 756, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("NorthernLights", 483, 260, 0, $z0ddWPs::BaseStr);
z0ddWPs::addWP("NorthernLights", 540, 764, 1, $z0ddWPs::BaseStr);

z0ddWPs::addWP("Obfuscation", 283, 836, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Obfuscation", 752, 241, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("IceDagger", 222, 233, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("IceDagger", 808, 786, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("MidnightMayhem_deluxe", 124, 510, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("MidnightMayhem_deluxe", 886, 491, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("MidnightMayhem_deluxe ", 124, 510, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("MidnightMayhem_deluxe ", 886, 491, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Raindance", 577, 138, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Raindance", 386, 844, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Reliquary", 634, 190, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Reliquary", 391, 834, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Rollercoaster", 488, 902, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Rollercoaster", 382, 168, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("SideWinder", 154, 459, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("SideWinder", 851, 628, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Simoom", 233, 603, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Simoom", 791, 421, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Snowblind", 194, 502, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Snowblind", 862, 607, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("SpinCycle", 505, 853, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("SpinCycle", 508, 203, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Stonehenge", 230, 244, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("Stonehenge", 814, 735, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("StonehengePUB", 230, 244, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("StonehengePUB", 814, 735, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("DeadlyValley", 869, 479, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("DeadlyValley", 211, 465, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("DesertNights", 441, 772, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("DesertNights", 352, 266, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("StoneDust", 403, 498, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("StoneDust", 776, 486, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("MistyLinks", 410, 779, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("MistyLinks", 650, 380, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("AntarcticSpell", 399, 785, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("AntarcticSpell", 253, 256, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("QuickSand", 539, 780, 0, $z0ddWPs::FlagStandStr);
z0ddWPs::addWP("QuickSand", 530, 257, 1, $z0ddWPs::FlagStandStr);

z0ddWPs::addWP("Bastard_Forge", 377, 297, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Bastard_Forge", 606, 718, 1, $z0ddWPS::FlagStandStr);

z0ddWPS::addWP("Control", 808, 750, 0, $z0ddWPS::FlagStandStr);
z0ddWPS::addWP("Control", 162, 203, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("Integration", 847, 353, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Integration", 228, 546, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("Hildebrand", 488, 259, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Hildebrand", 445, 751, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("Runout", 879, 736, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Runout", 134, 289, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("StarFall", 556, 251, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("StarFall", 554, 764, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("Tesseract", 512, 907, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Tesseract", 512, 109, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("Sand_Pits", 341, 299, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Sand_Pits", 758, 714, 1, $z0ddWPS::FlagStandStr);

z0ddWPs::addWP("Bastard_Forge_Day", 376, 298, 0, $z0ddWPS::FlagStandStr);
z0ddWPs::addWP("Bastard_Forge_Day", 606, 718, 1, $z0ddWPS::FlagStandStr);

Ambient7
01-20-2003, 10:44 PM
eventFlagOOBReturn.

·liquid·
01-20-2003, 10:51 PM
Yea, didn't see that last event. :)

PowdaHound
01-21-2003, 07:31 PM
:heart:

I should still clean up the waypoints a bit; rename them and put them in my file. :p Glad some of you like it!

dweeb
01-21-2003, 08:49 PM
I hate it, and I want to die :(

Moss
01-21-2003, 09:35 PM
:o

Mr. Hated
01-22-2003, 06:23 AM
i like it but it pointed to a hill when it was supposed to be popinting to the enemy flag :\ on scarabrae

R@ND0M
01-22-2003, 07:19 AM
a) why do you need to know where the flag is on scara (most overplayed map of '99)
b) why are you playing scara :P

Silhouett3
12-08-2004, 04:16 AM
edit: nm