[T1] Request Stripped for VP40

Pages : [1] 2

Foodey
11-24-2002, 01:52 PM
Some stripped scripts I <333

FlagCheck.cs
and KillsPerMinute.cs

Could someone make them work for vp40? <3

Whiplash
11-24-2002, 01:54 PM
flagcheck and a decent packhud would be nice.
3rdpersonInv would be a winner as well.

Moss
11-24-2002, 02:05 PM
Originally posted by Whiplash
3rdpersonInv would be a winner as well.
Aroo!

Event::Attach(eventEnterS tation, ThirdPerson);

$thirdDelay = "0.6";

function ThirdPerson()
{
postAction(2048, IDACTION_VIEW, 1);
schedule("postAction(2048, IDACTION_VIEW, 1);", $thirdDelay);
}

windexy
11-24-2002, 02:13 PM
i went through stripped and viking and they are almost identical the only things viking doesnt have are
packcheck
automessage - says message when power is down etc.
flagcheck
kills per min
life expectancy
mouse mod
weapon binder thing
quickquit/drop

the only ones i would really want would be flagcheck/packcheck/kills per min

there was a way to bind quick quit and drop but i forgot it

Foodey
11-24-2002, 02:13 PM
areeraerav

Moss
11-24-2002, 02:15 PM
wrong thread :D

Foodey
11-24-2002, 02:16 PM
Originally posted by windexy
i went through stripped and viking and they are almost identical the only things viking doesnt have are
packcheck
automessage - says message when power is down etc.
flagcheck
kills per min
life expectancy
mouse mod
weapon binder thing
quickquit/drop

the only ones i would really want would be flagcheck/packcheck/kills per min

there was a way to bind quick quit and drop but i forgot it


function onQuit()
{
quit();
}


and yess FlagCheck+Kills/minute + packcheck is nice :X

Moss
11-24-2002, 02:17 PM
Originally posted by windexy
i went through stripped and viking and they are almost identical
well, kinda, a lot of the events used are similar, either because they were "borrowed" from writers events aggggges ago or because runar took influences from stripped, and why not, it rocks :o

Moss
11-24-2002, 02:21 PM
well, heres a packhud for viking, dunno if it helps :f

$PackHUD::Exist = "False";

Event::Attach(eventLoadPl ayGui, PackHUD::Create);
Event::Attach(eventGuiOpe n, PackHUD::playGuiOpen);
Event::Attach(eventGuiClo se, PackHUD::playGuiClose);
Event::Attach(eventExit, PackHUD::Destroy);

function PackHud::Update()
{
if(getItemCount("Inventory Station") == 1)
control::setValue("PackHud_Text", "<f2>Invent");
else if(getItemCount("Ammo Station") == 1)
control::setValue("PackHud_Text", "<f2>Ammo.s");
else if(getItemCount("Energy Pack") == 1)
control::setValue("PackHud_Text", "<f2>Energy");
else if(getItemCount("Repair Pack") == 1)
control::setValue("PackHud_Text", "<f2>Repair");
else if(getItemCount("Shield Pack") == 1)
control::setValue("PackHud_Text", "<f2>Shield");
else if(getItemCount("Sensor Jammer Pack") == 1)
control::setValue("PackHud_Text", "<f2>Jammer");
else if(getItemCount("Motion Sensor") == 1)
control::setValue("PackHud_Text", "<f2>Motion");
else if(getItemCount("Ammo Pack") == 1)
control::setValue("PackHud_Text", "<f2> Ammo");
else if(getItemCount("Pulse Sensor") == 1)
control::setValue("PackHud_Text", "<f2>Pulse");
else if(getItemCount("Sensor Jammer") == 1)
control::setValue("PackHud_Text", "<f2>Jammer");
else if(getItemCount("Camera") == 1)
control::setValue("PackHud_Text", "<f2>Camera");
else if(getItemCount("Turret") == 1)
control::setValue("PackHud_Text", "<f2>Turret");
else
control::setValue("PackHud_Text", "<f2>Nekkid");

schedule("PackHud::Update();", 1);
}

function PackHUD::Create()
{
if($PackHUD::Exist)
{
PackHUD::Update();
return;
}

PackHUD::Destroy();

$PackHUD::Exist = "True";

%hudContainer=newObject("PackHUD_Container", SimGui::Control, 675, 24, 67, 27);
%PackCheck=newObject("PackHUD_Text", FearGuiFormattedText, 0, 0, 66, 26);
addToSet("PackHUD_Container", %PackCheck);
addToSet(PlayGui, %hudContainer);

PackHUD::Update();

}

function PackHUD::playGuiOpen(%gui )
{
if(%gui == "playGui")
PackHUD::Update();
}

function PackHUD::playGuiClose(%gu i)
{
if(%gui == "playGui")
Schedule::Cancel("PackHUD");
}

function PackHUD::Destroy()
{
HUD::Destroy("PackHUD_");
HUD::Destroy("PackHUD_");
$PackHUD::Exist = "False";
}

windexy
11-24-2002, 02:28 PM
can u make this packhud that tells u when the shield pack is on compatible with vp


function PackHUD::Update()
{
if(getItemCount("Inventory Station") == 1)
control::setValue("PackHud_Text", "<f2>Invy");
else if(getItemCount("PackHUD Station") == 1)
control::setValue("PackHud_Text", "<f2>PackHUD");
else if(getItemCount("Energy Pack") == 1)
control::setValue("PackHud_Text", "<f2>Energy");
else if(getItemCount("Repair Pack") == 1)
control::setValue("PackHud_Text", "<f2>Repair");
else if(getItemCount("Shield Pack") == 1) {
if ($PackHUD::ShieldsOn == "TRUE") {
control::setValue("PackHud_Text", "<f0>Shield");
schedule("PackHUD::Flash1();", 0.33);
schedule("PackHUD::Flash2();", 0.66);
}
else
control::setValue("PackHud_Text", "<f2>Shield");
}
else if(getItemCount("Sensor Jammer Pack") == 1)
control::setValue("PackHud_Text", "<f2>Jammer");
else if(getItemCount("Motion Sensor") == 1)
control::setValue("PackHud_Text", "<f2>Motion");
else if(getItemCount("Ammo Pack") == 1)
control::setValue("PackHud_Text", "<f2>Ammo");
else if(getItemCount("Pulse Sensor") == 1)
control::setValue("PackHud_Text", "<f2>Pulse");
else if(getItemCount("Sensor Jammer") == 1)
control::setValue("PackHud_Text", "<f2>Jammer");
else if(getItemCount("Camera") == 1)
control::setValue("PackHud_Text", "<f2>Camera");
else if(getItemCount("Turret") == 1)
control::setValue("PackHud_Text", "<f2>Turret");
else
control::setValue("PackHud_Text", "<f2>Nekkid");

schedule("PackHud::Update();", 1);
}

function PackHUD::Parse(%cl, %msg) {
if (String::FindSubStr(%msg, "Shield On") != -1) {
$PackHUD::ShieldsOn = "TRUE";
}
else if (String::FindSubStr(%msg, "Shield Off") != -1) {
$PackHUD::ShieldsOn = "FALSE";
}
}

function PackHUD::Flash1() {
control::setValue("PackHud_Text", "<f1>Shield");
}

function PackHUD::Flash2() {
control::setValue("PackHud_Text", "<f2>Shield");
}

function PackHUD::Create()
{
if(!$ConnectedToServer) {
schedule("PackHUD::Create();", 1);
return;}

$PackHud = newObject("PackHUD_Text", FearGuiFormattedText, Stripped::getScreenSizeX( )/2 - 32, Stripped::getScreenSizeY( )/2 + 50, 0, 0);

addToSet(PlayGui, $PackHud);

PackHUD::Update();
}

function PackHUD::Destroy()
{
deleteObject($PackHud);
}

Event::Attach(eventExit, PackHUD::Destroy);
Event::Attach(eventConnec tionAccepted, PackHUD::Destroy);
Event::Attach(eventConnec tionAccepted, PackHUD::Create);
Event::Attach(eventConnec ted, PackHUD::Update);
Event::Attach(EventServer Message, PackHUD::Parse);

Moss
11-24-2002, 02:47 PM
later :o

windexy
11-24-2002, 02:53 PM
:p

Whiplash
11-24-2002, 03:16 PM
thanks dutchy, both the 3rdpersonInv and the packhud are just what the doctor ordered :D

no <3 for the flagcheck?

Moss
11-24-2002, 03:37 PM
ahh, maybe sometime :/

cyclonite
11-25-2002, 01:40 AM
windexy, I was the one who made those alterations to PackHud for the flashing.
The only incompatibility with VP is the following line:
$PackHud = newObject("PackHUD_Text", FearGuiFormattedText, Stripped::getScreenSizeX( )/2 - 32, Stripped::getScreenSizeY( )/2 + 50, 0, 0);

As you see it uses Stripped function to get the screen size.
Just change it to the following:
$PackHud = newObject("PackHUD_Text", FearGuiFormattedText, X, Y, 0, 0);
Where X and Y are the co-ords of the hud. I haven't tested it because I'm too lazy.

Flagcheck...Is that the script which flashes "Enemy Flag" when you are carrying it?
If it is then that script is easy as pie to write/convert.

Whiplash
11-25-2002, 02:05 AM
you got it, flagcheck just flashes when you grab.

now what flavor is that pie? :browsmile


i tried the flash changes to packhud and it did not work, had to go back to the other.

Foodey
11-25-2002, 11:27 AM
Still waiting for someone who is kind enough to edit
FlagCheck.cs
and KillsPerMinute.cs

to make it work with viking-pack 4.0 :)

cyclonite
11-26-2002, 01:45 AM
Okay, here is a Viking 4 compatible PackHud which flashes...

//File: PackHUD_viking.cs

function PackHUD::Update()
{
if(getItemCount("Inventory Station") == 1)
control::setValue("PackHud_Text", "<f1>Invy");
else if(getItemCount("PackHUD Station") == 1)
control::setValue("PackHud_Text", "<f1>PackHUD");
else if(getItemCount("Energy Pack") == 1)
control::setValue("PackHud_Text", "<f1>Energy");
else if(getItemCount("Repair Pack") == 1) {
if ($PackHUD::RepairingOn == "TRUE") {
control::setValue("PackHud_Text", "<f0>Repair");
schedule("PackHUD::Flash1_Repair();", 0.33);
schedule("PackHUD::Flash2_Repair();", 0.67);
}
else
control::setValue("PackHud_Text", "<f1>Repair");
}
else if(getItemCount("Shield Pack") == 1) {
if ($PackHUD::ShieldsOn == "TRUE") {
control::setValue("PackHud_Text", "<f0>Shield");
schedule("PackHUD::Flash1_Shield();", 0.33);
schedule("PackHUD::Flash2_Shield();", 0.67);
}
else
control::setValue("PackHud_Text", "<f1>Shield");
}
else if(getItemCount("Sensor Jammer Pack") == 1)
control::setValue("PackHud_Text", "<f1>Jammer");
else if(getItemCount("Motion Sensor") == 1)
control::setValue("PackHud_Text", "<f1>Motion");
else if(getItemCount("Ammo Pack") == 1)
control::setValue("PackHud_Text", "<f1>Ammo");
else if(getItemCount("Pulse Sensor") == 1)
control::setValue("PackHud_Text", "<f1>Pulse");
else if(getItemCount("Sensor Jammer") == 1)
control::setValue("PackHud_Text", "<f1>Jammer");
else if(getItemCount("Camera") == 1)
control::setValue("PackHud_Text", "<f1>Camera");
else if(getItemCount("Turret") == 1)
control::setValue("PackHud_Text", "<f1>Turret");
else
control::setValue("PackHud_Text", "<f1>Nekkid");

schedule("PackHud::Update();", 1);
}

function PackHUD::Parse(%cl, %msg) {
if (String::FindSubStr(%msg, "Shield On") != -1) {
$PackHUD::ShieldsOn = "TRUE";
}
else if (String::FindSubStr(%msg, "Shield Off") != -1) {
$PackHUD::ShieldsOn = "FALSE";
}
else if (String::FindSubStr(%msg, "Repairing") != -1) {
$PackHUD::RepairingOn = "TRUE";
}
else if (String::FindSubStr(%msg, "Repair Done") != -1) {
$PackHUD::RepairingOn = "FALSE";
}
else if (String::FindSubStr(%msg, "Repair Stopped") != -1) {
$PackHUD::RepairingOn = "FALSE";
}
}

function PackHUD::Flash1_Shield() {
control::setValue("PackHud_Text", "<f1>Shield");
}

function PackHUD::Flash2_Shield() {
control::setValue("PackHud_Text", "<f2>Shield");
}

function PackHUD::Flash1_Repair() {
control::setValue("PackHud_Text", "<f1>Repair");
}

function PackHUD::Flash2_Repair() {
control::setValue("PackHud_Text", "<f2>Repair");
}

function PackHUD::Create()
{
if(!$ConnectedToServer) {
schedule("PackHUD::Create();", 1);
return;}

$PackHud = newObject("PackHUD_Text", FearGuiFormattedText, 739, 27, 0, 0);

addToSet(PlayGui, $PackHud);

PackHUD::Update();
}

function PackHUD::Destroy()
{
deleteObject($PackHud);
}

Event::Attach(eventExit, PackHUD::Destroy);
Event::Attach(eventConnec ted, PackHUD::Destroy);
Event::Attach(eventConnec ted, PackHUD::Create);
Event::Attach(eventConnec ted, PackHUD::Update);
Event::Attach(EventServer Message, PackHUD::Parse);


Okay!
Now for FlagCheck! This was relatively simple, just had to change some functions to support Viking events.
Set your X and Y co-ords at the top of the script.


//Flagcheck
//Checks to see if there is a flag on your back.
//Handy for those times when you need to know fast.
//Ported to Viking by Cyclonite
//File: FlagCheck_viking.cs


$PFCPref::X = 100;
$PFCPref::Y = 300;

Event::Attach(eventExit, PFC::Remove);
Event::Attach(eventFlagTa ken, PFC::Check);
Event::Attach(eventMissio nInfo, PFC::Reset);
Event::Attach(EventConnec ted, PFC::Reset);

function PFC::Check(%flagId, %clientId, %client) {
if(%client == Client::GetName(GetManage rID()))
schedule("PFC::CheckFlag();", 0.3);
}

function PFC::CheckFlag() {
if(GetMountedItem(2) != -1) {
if($PFC::WroteToGui != "TRUE") {
$PFC::Flag = newobject("PFCFLAG", FearGuiFormattedText, 8, 8, 0, 0);
AddtoSet(playGui, $PFC::Flag);
$PFC::WroteToGui = "TRUE";
}
control::SetVisible("PFCFLAG", TRUE);
control::setPosition("PFCFLAG", $PFCPref::X, $PFCPref::Y);

$PFC::Loop = "TRUE";
PFC::ColorLoop();
}
else if($PFC::Flag != "") {
control::SetVisible("PFCFLAG", FALSE);
$PFC::Loop = "";
}
return;
}

function PFC::ColorLoop() {
if(GetMountedItem(2) == -1) {
control::SetVisible("PFCFLAG", FALSE);
$PFC::Loop = "";
}
if($PFC::Loop != "") {
$PFC::Color++;
if($PFC::Color > 2) { $PFC::Color = 0; }
Control::SetValue("PFCFLAG", "<JC><F"@$PFC::Color@">Enemy Flag!");
Schedule("PFC::ColorLoop();", 0.3);
}
}

function PFC::Reset() {
control::SetVisible("PFCFLAG", FALSE);
}

function PFC::Remove() {
removeFromSet("playgui", $PFC::Flag);
deleteObject($PFC::Flag);
}


Have fun guys!

Foodey
11-26-2002, 03:00 AM
AAAAAAAAAawesome :) I'll test/use them when im back home

btw you forgot killsperminute.cs :P

thnx for this man :)

cyclonite
11-26-2002, 03:32 AM
I've got KPM just about done. Just one weird error I can't figure out.