Author Topic: Horses/Scouts  (Read 4366 times)

0 Members and 1 Guest are viewing this topic.

Nitelthrome-X

  • Orc Thrasher
  • ***
  • Posts: 131
  • Reputation: +0/-0
Horses/Scouts
« on: November 15, 2003 04:55 pm CST »
Now, before I start, I'd like to say I'm sure this has been posted somewhere, sometime, before, but I've searched and haven't found it...

How would I go about, if possible, adding scouts to RPG? Not scouts, but a grav bike. It wouldn't be airborne. And the model for it would be horse.dis. And is it possible to walk up to an NPC, pay for a horse, then have one spawn next to you?

Please don't just supply a block of text, I'm newer to this. Any help, whether it's a tutorial or re-direction to another thread, is appreciated!

-Nitelthrome-X
« Last Edit: December 31, 1969 06:00 pm CST by Nitelthrome-X »
<img src="http://hostpics.pcrpg.org/sig_nitel.jpg" width=400 height=80>

My PK Palace Server Web Page:
http://www.PK-Palace.cjb.net
My Avalon OF Old Server Web Page:
http://www.AvalonOFOld.cjb.net
My Time OF Old Server Web Page:
http://www.TimeOFOld.cjb.net

Hersh

  • Elvin Legion
  • *****
  • Posts: 413
  • Reputation: +0/-0
(No subject)
« Reply #1 on: November 15, 2003 09:10 pm CST »
Ever play Annhilation mod? It has Suicide Drones and Survey Probes. Basically cameras that a player can control, simialr to a scout. I'm sure the same idea could be used for this, only I'm not sure if it will let you use a .dis, I think it needs .dts.

Hersh
« Last Edit: December 31, 1969 06:00 pm CST by Hersh »

I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.

BlAcK-IcE

  • Centurian Lord
  • ********
  • Posts: 2,643
  • Reputation: +0/-0
(No subject)
« Reply #2 on: November 15, 2003 10:49 pm CST »
There were horses in RedDwarfRPG long time ago. They were funny, as you could ride them and usually get stuck. Cool idea about the bikes. Probably wont happen though.  :roll:
« Last Edit: December 31, 1969 06:00 pm CST by BlAcK-IcE »

Nitelthrome-X

  • Orc Thrasher
  • ***
  • Posts: 131
  • Reputation: +0/-0
(No subject)
« Reply #3 on: November 16, 2003 07:55 am CST »
Nevermind, someone sent me a horse script, got it all figured out. Thanks!
« Last Edit: December 31, 1969 06:00 pm CST by Nitelthrome-X »
<img src="http://hostpics.pcrpg.org/sig_nitel.jpg" width=400 height=80>

My PK Palace Server Web Page:
http://www.PK-Palace.cjb.net
My Avalon OF Old Server Web Page:
http://www.AvalonOFOld.cjb.net
My Time OF Old Server Web Page:
http://www.TimeOFOld.cjb.net

Silvanoshei

  • Centurian Lord
  • ********
  • Posts: 1,804
  • Reputation: +0/-0
(No subject)
« Reply #4 on: November 16, 2003 10:43 am CST »
Yeah. Check out Panda's Red Dwarf. Horses are included in that mod.
« Last Edit: December 31, 1969 06:00 pm CST by Silvanoshei »

The DoDoDo.

Your opinion is worthless unless you can support it.
We are not responsible for your stupidity.
I don't take sides. I take action.

Currently Playing:  Warcraft III [PC]

Nitelthrome-X

  • Orc Thrasher
  • ***
  • Posts: 131
  • Reputation: +0/-0
(No subject)
« Reply #5 on: November 16, 2003 11:22 am CST »
Ok, this is what I have...

Code: [Select]
$horses=1;
$horse_times_per_second=6;//times a second the horses are updated
$max_horses=10;//total number of horses allowed

function init_horses()
{
if($horses==1&&$horse_times_per_second>0)
{
horses();
}
}

function horses()
{
for(%i=1;%i<=$max_horses;%i++)
{
if($horse[%i]>0)
{
if($horsepid[%i]>0&&$horsebot[%i]>0&&!Player::isDead($horsepid[%i])&&!Player::isDead($horsebot[%i]))
{
//move horse and player by BOT since BOT is controled by the client
%pos=GameBase::getPosition($horsebot[%i]);
%rot=GameBase::getRotation($horsebot[%i]);
//%pos=GetWord(%pos,0)+2 @ " " @ GetWord(%pos,1)+2 @ " " @ GetWord(%pos,2);
//%pos=GetWord(%pos,0) @ " " @ GetWord(%pos,1) @ " " @ GetWord(%pos,2)+1;
%pos=GetWord(%pos,0) @ " " @ GetWord(%pos,1) @ " " @ GetWord(%pos,2)+5;
GameBase::setPosition($horse[%i],%pos);
GameBase::setRotation($horse[%i],%rot);
//GameBase::setPosition($horsepid[%i],GetWord(%pos,0) @ " " @ GetWord(%pos,1) @ " " @ GetWord(%pos,2)+1);//z+=1
GameBase::setPosition($horsepid[%i],%pos);
GameBase::setRotation($horsepid[%i],%rot);
}
else
{
//for all cids -- check distance
%pos=GameBase::getPosition($horse[%i]);
%found=false;
for(%id=Client::getFirst();%id!=-1;%id=Client::getNext(%id))
{
//for all cids -- check distance
%dist=Vector::getDistance(GameBase::getPosition(%id),%pos);
if(%dist<100)
{
%found=true;
break;
}
}
//or delete it if distance to nearest client is >100 m
if(%found==false)
{
delete_horse(%i);
}
}
}
}
if($horses==1&&$horse_times_per_second>0)
{
schedule("horses();",1/$horse_times_per_second);
}
}

function make_horse(%pos)
{
for(%i=1;%i<=$max_horses;%i++)
{
if($horse[%i]<=0)
{
//make horse
$horse[%i]=newObject("Horse","InteriorShape","horse.dis",true);
//$horse[%i]=newObject("Horse","StaticShape","PoweredElectricalBeam",true);
if($horse[%i])
{
addToSet("MissionCleanup",$horse[%i]);
GameBase::setPosition($horse[%i],%pos);
//make bot--need an invis NULL texture skin for the bot...
//$horsebot[%i]=newObject("HorseBot","Player",malehumanarmor10,true);
$horsebot[%i]=newObject("HorseBot","Player",Armor22,true);
if($horsebot[%i])
{
addToSet("MissionCleanup",$horsebot[%i]);
GameBase::startFadeOut($horsebot[%i]);
GameBase::setPosition($horsebot[%i],%pos);
//try and mount it
//for all cids -- check distance
for(%id=Client::getFirst();%id!=-1;%id=Client::getNext(%id))
{
//for all cids -- check distance
%dist=Vector::getDistance(GameBase::getPosition(%id),%pos);
if(%dist<4)
{
mount_horse(%i,Client::getOwnedObject(%id));
}
}
}
else
{
deleteObject($horse[%i]);
$horse[%i]=0;
}
}
break;
}
}
}

function delete_horse(%i)
{
//unmount horse
unmount_horse(%i);
//delete horse
if(isObject($horse[%i]))
{
deleteObject($horse[%i]);
}
$horse[%i]=0;
//delete bot
if(isObject($horsebot[%i]))
{
deleteObject($horsebot[%i]);
}
$horsebot[%i]=0;
}

function mount_horse(%i,%pid)
{
if(isObject($horse[%i])&&isObject($horsebot[%i])&&$horsepid[%i]<=0)
{
$horsepid[%i]=%pid;
$horsecid[%i]=Player::getClient(%pid);
if($horsecid[%i]>0)
{
Client::setControlObject($horsecid[%i],$horsebot[%i]);
}
}
}

function unmount_horse(%i)
{
if($horsecid[%i]>0&&$horsepid[%i]>0)
{
Client::setControlObject($horsecid[%i],$horsepid[%i]);
//Player::applyImpulse($horsepid[%i],"0 0 100");
}
$horsepid[%i]=0;
$horsecid[%i]=0;
GameBase::setPosition($horse[%i],GameBase::getPosition($horsebot[%i]));
}

function mount_player(%pid)
{
for(%i=1;%i<=$max_horses;%i++)
{
if(isObject($horse[%i])&&isObject($horsebot[%i])&&$horsepid[%i]<=0)
{
//try and mount it
%pos=GameBase::getPosition($horse[%i]);
%dist=Vector::getDistance(GameBase::getPosition(%pid),%pos);
if(%dist<4)
{
mount_horse(%i,%pid);
break;
}
}
}
}

function unmount_player(%pid)
{
for(%i=1;%i<=$max_horses;%i++)
{
if($horsepid[%i]==%pid)
{
%pos=GameBase::getPosition(%pid);
GameBase::setPosition(%pid,GetWord(%pos,0) @ " " @ GetWord(%pos,1) @ " " @ GetWord(%pos,2)+2);//z+=1
unmount_horse(%i);
break;
}
}


How would I apply this to RPG and make a bot that spawned one for X coins?
« Last Edit: December 31, 1969 06:00 pm CST by Nitelthrome-X »
<img src="http://hostpics.pcrpg.org/sig_nitel.jpg" width=400 height=80>

My PK Palace Server Web Page:
http://www.PK-Palace.cjb.net
My Avalon OF Old Server Web Page:
http://www.AvalonOFOld.cjb.net
My Time OF Old Server Web Page:
http://www.TimeOFOld.cjb.net