Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-29-2007, 05:24 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Grabbing of floor?

is there a way to do add items (guns, items, etc.) that are lying on the ground? would i have to make it like this? and so it dissapears.
PHP Code:
//#CLIENTSIDE
function onActionGrab() {
  
clientr.weapon.? = 1;
  
destroy;

__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #2  
Old 12-29-2007, 05:35 AM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by Knightmare1 View Post
is there a way to do add items (guns, items, etc.) that are lying on the ground? would i have to make it like this? and so it dissapears.
PHP Code:
//#CLIENTSIDE
function onActionGrab() {
  
clientr.weapon.? = 1;
  
destroy;

You'd need to make your own Grab trigger. Also, clientr. flags can't be set clientside.
Reply With Quote
  #3  
Old 12-29-2007, 06:41 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
PHP Code:
function onKeyPressedcodekey)
{

  switch ( 
temp.code)
  {
  
    case 
"65"//a
      
Grab();
    break;
    
  }
}

function 
Grab()
{

  
frontPosition = { player.1.5 vecx(player.dir) * 2player.1.5 vecy(player.dir) * 2};
  
  
canGrab = ( testplayer(frontPosition[0], frontPosition[1]) || testnpc(frontPosition[0], frontPosition[1]));

  if ( 
canGrab)
    
triggerAction(frontPosition[0], frontPosition[1], "Grabbed"player.accountplayer.guild);


Here what I use, forgot where I got it though. :/
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 12-29-2007, 06:59 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Codein View Post
You'd need to make your own Grab trigger. Also, clientr. flags can't be set clientside.
Not...ENTIRELY true...
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #5  
Old 12-29-2007, 07:09 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by coreys View Post
Not...ENTIRELY true...
please do explain, I know client.vars can be set both and I thought clientr.vars could only be set serverside, for security. :/
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 12-29-2007, 07:28 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
You can...sort of set clientr vars clientside
but I think it it acts more like a public variable (a.k.a. without a heading like this. or temp.) that happens to start with "clientr," therefore effectively replacing a real one that may exist.

Anyways, it really is best to use triggeractions for this...
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #7  
Old 12-29-2007, 04:15 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by coreys View Post
You can...sort of set clientr vars clientside
but I think it it acts more like a public variable (a.k.a. without a heading like this. or temp.) that happens to start with "clientr," therefore effectively replacing a real one that may exist.

Anyways, it really is best to use triggeractions for this...
In the way that he's using clientr. variables, I think he'd want to set them serverside. Either way, even if you can or can't, it'd just be best for him to set them serverside.
Reply With Quote
  #8  
Old 12-29-2007, 04:36 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
destroy() not destroy;
__________________
Reply With Quote
  #9  
Old 12-29-2007, 06:31 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Angel_Light View Post
PHP Code:
function onKeyPressedcodekey)
{

  switch ( 
temp.code)
  {
  
    case 
"65"//a
      
Grab();
    break;
    
  }
}

function 
Grab()
{

  
frontPosition = { player.1.5 vecx(player.dir) * 2player.1.5 vecy(player.dir) * 2};
  
  
canGrab = ( testplayer(frontPosition[0], frontPosition[1]) || testnpc(frontPosition[0], frontPosition[1]));

  if ( 
canGrab)
    
triggerAction(frontPosition[0], frontPosition[1], "Grabbed"player.accountplayer.guild);


Here what I use, forgot where I got it though. :/
would that be for the system script? or the item script?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #10  
Old 12-29-2007, 06:56 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
If that's what you're gonna use, it should be clientsided in a system NPC.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #11  
Old 12-29-2007, 07:00 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Codein View Post
In the way that he's using clientr. variables, I think he'd want to set them serverside. Either way, even if you can or can't, it'd just be best for him to set them serverside.
Oh, well yeah, I know.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #12  
Old 12-29-2007, 08:04 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I thought clientr. variables had to be set serverside? Or am I totally wrong?

Either way, I would set something like that serverside.
__________________
Reply With Quote
  #13  
Old 12-29-2007, 10:05 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
and in that script that angel made, what would i edit to make it show an icon?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #14  
Old 12-29-2007, 10:25 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
well thats part of a system weapon. For Instance you add this to a weapon.

PHP Code:
//#CLIENTSIDE
function onKeyPressedcodekey)
{

  switch ( 
temp.code)
  {
  
    case 
"65"//a
      
Grab();
    break;
    
  }
}

function 
Grab()
{

  
frontPosition = { player.1.5 vecx(player.dir) * 2player.1.5 vecy(player.dir) * 2};
  
  
canGrab = ( testplayer(frontPosition[0], frontPosition[1]) || testnpc(frontPosition[0], frontPosition[1]));

  if ( 
canGrab)
    
triggerAction(frontPosition[0], frontPosition[1], "Grabbed"player.accountplayer.guild);


then in a level NPC on the ground you would add this.

PHP Code:

function onCreated()
{

  
setImgimage);
  
setShape116*216*2);

}

function 
onActionGrabbed()
{

  
findPlayerparams0]).addWeaponweapon);

  
destroy();


__________________
Deep into the Darkness peering...
Reply With Quote
  #15  
Old 12-30-2007, 02:18 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
PHP Code:
function onCreated()
{

  
setImg(this.image);
  
setShape116*216*2);

}

function 
onActionGrabbed()
{

  
findPlayerparams0]).addWeaponweapon);

  
destroy();


could i make the image this.image = "image" in the NPC? im using classes.
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #16  
Old 12-30-2007, 02:49 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
That script needs some work (I would add logging, etc, and checks to make sure it hasn't already been picked up but not destroyed for some reason.

However, I would do something like

setImg( this.img );

and then

PHP Code:
temp.putnpc2temp.dxtemp.dy"" );
with temp.)
{
  
join"object_dropitem" );
  
this.img "block.png";
  
this.weapon "Staff/Abuse/Major/Bloo/Tool"// shout-out to Bloo

__________________
Reply With Quote
  #17  
Old 12-30-2007, 04:48 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by cbkbud View Post
That script needs some work (I would add logging, etc, and checks to make sure it hasn't already been picked up but not destroyed for some reason.

However, I would do something like

setImg( this.img );

and then

PHP Code:
temp.putnpc2temp.dxtemp.dy"" );
with temp.)
{
  
join"object_dropitem" );
  
this.img "block.png";
  
this.weapon "Staff/Abuse/Major/Bloo/Tool"// shout-out to Bloo

PHP Code:
temp.putnpc2temp.dxtemp.dy"" );
with temp.)
{
  
join"object_flooritem" );
  
this.img "final_ak47-icon.gif";
  
this.weapon "Guns/AK47";

would that work?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #18  
Old 12-30-2007, 05:35 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Knightmare1 View Post
PHP Code:
temp.putnpc2temp.dxtemp.dy"" );
with temp.)
{
  
join"object_flooritem" );
  
this.img "final_ak47-icon.gif";
  
this.weapon "Guns/AK47";

would that work?
Yes, the code you posted earlier had addweapon( weapon ); just change that to addweapon( this.weapon );
__________________
Reply With Quote
  #19  
Old 12-30-2007, 07:30 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by cbkbud View Post
Yes, the code you posted earlier had addweapon( weapon ); just change that to addweapon( this.weapon );
dam chris, you've done it again.
and is there a way to randomize spawn points once picked up? like
PHP Code:
setlevel2"final_gmap.gmap"randomize(1,200), randomize(1,200) ); 
would this work?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #20  
Old 12-30-2007, 05:21 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I would get rid of the destroy() and add a hide, then sleep, then warp it, and show it.

As for warping it, this.x = random( 0, 200 ) and the same for y. I'll give an example when I get home, hard to script on a phone.
__________________
Reply With Quote
  #21  
Old 12-30-2007, 05:46 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Knightmare1 View Post
dam chris, you've done it again.
and is there a way to randomize spawn points once picked up? like
PHP Code:
setlevel2"final_gmap.gmap"randomize(1,200), randomize(1,200) ); 
would this work?
PHP Code:
temp.spawnpoints={{1,5},{8,2},{9,1},{12,62},{12,6},{15,73},{51,52}};
temp.random=int(random(0,temp.spawnpoints.size());
setlevel2("final_gmap.gmap",temp.spawnpoints[temp.random][0],temp.spawnpoints[temp.random][1]); 

Last edited by DustyPorViva; 12-30-2007 at 06:14 PM..
Reply With Quote
  #22  
Old 12-30-2007, 06:05 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Actually, Dusty, temp.random should just be int(random(0,temp.spawnpoints.size()));
shouldn't it? o.0
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #23  
Old 12-30-2007, 06:12 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
PHP Code:
function onCreated()
{

  
setImgthis.img );
  
setShape116*216*);
  
temp.spawnpoints={{ 1,},{ 8,},{ 9,},{ 12,62 },{ 12,},{ 15,73 },{ 51,52 }}; 
  
temp.random=int(random(0,temp.spawnpoints.size()+1);

}

function 
onActionGrabbed()
{

  
findPlayerparams0] ).addWeaponthis.weapon );
  
hide;
  
sleep(540);
  
setlevel2("final_gmap.gmap",temp.spawnpoints[temp.random][0],temp.spawnpoints[temp.random][1]);
  
show;

would this work?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #24  
Old 12-30-2007, 06:14 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
That it should be... I think... my mind isn't processing so I'm having a hard time double checking if it's right or wrong. I'll go ahead and say you're right.

And no, that won't work. temp. is only accessible in the function it's called in. You're gonna have to change that temp. to a this.
Reply With Quote
  #25  
Old 12-30-2007, 06:17 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
PHP Code:
function onCreated()
{

  
setImgthis.img );
  
setShape116*216*);
  
this.spawnpoints={{ 1,},{ 8,},{ 9,},{ 12,62 },{ 12,},{ 15,73 },{ 51,52 }}; 
  
this.random=int(random(0,this.spawnpoints.size()+1));

}

function 
onActionGrabbed()
{

  
findPlayerparams0] ).addWeaponthis.weapon );
  
hide;
  
sleep(540);
  
setlevel2("final_gmap.gmap",this.spawnpoints[this.random][0],this.spawnpoints[this.random][1]);
  
show;
}

/*The script for NPC.

temp.n = putnpc2( temp.dx, temp.dy, "" ); 
with ( temp.n ) 


  join( "flooritem" ); 
  this.img = "icon.type"; 
  this.weapon = "Weapon/Name"; 

}

*/ 
this works?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #26  
Old 12-30-2007, 08:26 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
no. setlevel2 is for warping players. Use this.x and this.y
__________________
Reply With Quote
  #27  
Old 12-30-2007, 08:28 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by cbkbud View Post
no. setlevel2 is for warping players. Use this.x and this.y
what about setting the level?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #28  
Old 12-30-2007, 09:04 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Hmm, I...think you can do that with setting this.level. I'm not entirely sure, though. I've never really tried it.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #29  
Old 12-30-2007, 11:42 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by coreys View Post
Hmm, I...think you can do that with setting this.level. I'm not entirely sure, though. I've never really tried it.
Nope. setlevel( name ); for npcs. Still need to set x and y.
__________________
Reply With Quote
  #30  
Old 12-31-2007, 03:54 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
To warp an npc you would use warpto(levelname, x, y);
__________________
Reply With Quote
  #31  
Old 01-05-2008, 06:58 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
PHP Code:
function onCreated()
{

  
setImgthis.img );
  
setShape116*216*);
  
this.spawnpoints={{ 1,},{ 8,},{ 9,},{ 12,62 },{ 12,},{ 15,73 },{ 51,52 }}; 
  
this.random=int(random(0,this.spawnpoints.size()+1));

}

function 
onActionGrabbed()
{

  
findPlayerparams0] ).addWeaponthis.weapon );
  
hide;
  
sleep(540);
  
warpto("final_gmap.gmap",this.spawnpoints[this.random][0],this.spawnpoints[this.random][1]);
  
show;

so this?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #32  
Old 01-05-2008, 08:46 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
have you tried it?
__________________
Reply With Quote
  #33  
Old 01-05-2008, 08:53 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Chompy View Post
have you tried it?
nope, because i have no graphics yet.
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #34  
Old 01-05-2008, 09:28 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Knightmare1 View Post
nope, because i have no graphics yet.
use "block.png"
__________________
Reply With Quote
  #35  
Old 01-07-2008, 02:01 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Chompy View Post
use "block.png"
i did, it wont work.
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #36  
Old 01-07-2008, 10:54 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Knightmare1 View Post
i did, it wont work.
what didn't work? adding the weapon? we-appearing some where on a gmap?
__________________
Reply With Quote
  #37  
Old 01-07-2008, 11:03 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Chompy View Post
what didn't work? adding the weapon? we-appearing some where on a gmap?
LOL i tried to use it on my OSL.
__________________
I am the devil, I am here to do to devils work.
Reply With Quote
  #38  
Old 01-07-2008, 11:15 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Knightmare1 View Post
LOL i tried to use it on my OSL.
What the ..? You didn't state that anywhere did you? Because of what you said, it seems that you aren't using the script that you posted some posts earlier..

And you don't give info at all, do you? Sorry, can't help you.
__________________
Reply With Quote
  #39  
Old 01-07-2008, 11:48 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Quote:
Originally Posted by Knightmare1 View Post
PHP Code:
function onCreated()
{

  
setImgthis.img );
  
setShape116*216*);
  
this.spawnpoints={{ 1,},{ 8,},{ 9,},{ 12,62 },{ 12,},{ 15,73 },{ 51,52 }}; 
  
this.random=int(random(0,this.spawnpoints.size()+1));

}

function 
onActionGrabbed()
{

  
findPlayerparams0] ).addWeaponthis.weapon );
  
hide;
  
sleep(540);
  
warpto("final_gmap.gmap",this.spawnpoints[this.random][0],this.spawnpoints[this.random][1]);
  
show;

so this?
uh well, either its an npc(warpto()) or its a weapon( addWeapon( this.weapon ) ); or what you set @ this.weapon? xD
__________________
Reply With Quote
  #40  
Old 01-08-2008, 12:57 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Night, I'll help you with this whenever we're both on if you like.

Post your code.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.