Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   staff block droper not working (https://forums.graalonline.com/forums/showthread.php?t=80497)

foxpawsd 07-15-2008 04:29 PM

staff block droper not working
 
.... it's not working can some one help?

Quote:

// Twinny's sign dropper
function onActionServerSide()
{
if (params[0] == "layblock")
{
temp.npc = putnpc2(params[1], params[2], "join(\"staffsign\");");
temp.npc.owner = player.account;
}
}

//#CLIENTSIDE
function onCreated()
setTimer(0.05);

function onKeyPressed(num1, code, num2)
{
if (code == "b")
this.block = !this.block; //Toggles on and off
}

function onTimeout()
{
if (this.block)
showimg(1, "staffblock.png", mousex, mousey);
else
hideimg(1);
setTimer(0.05);
}

function onMouseDown(mode)
{
if (mode == "left")
{
if (this.block)
triggerserver("gui", this.name, "layblock", mousex, mousey);
}
else if (mode == "double")
triggeraction(mousex, mousey, "SetMsg", player.chat);
else if (mode == "right")
triggeraction(mousex, mousey, "KillSign", "");
}

Imperialistic 07-15-2008 04:43 PM

can u say stol3n plx.
=P
Maybe you should talk to who actually made the script?

And do you have a class that its joining with?

zokemon 07-15-2008 06:34 PM

I have a feeling that he is missing the "staffsign" class. Also, you shouldn't be posting scripts by other people without their permission.

Tigairius 07-15-2008 09:18 PM

Make a class called staffsign and put this script in it:
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
setimg("block.png");
  
setshape(13232);


That'll give you a basic idea.

cbk1994 07-15-2008 09:33 PM

Made you one, try to learn from it. Middle mouse or right click to destroy, double click to set message, b to turn on/off.


Script of weapon -Staff/Block
PHP Code:

function onActionServerSidecmddxdy )
{
  switch ( 
cmd )
  {
    case 
"dropBlock":
    {
      
temp.block putnpc2dxdy"" );
      
block.join"object_block" );
      
savelog2"staff/block.txt"format"%s layed a block at (%s, %s) in %s"player.communitynamedxdyplayer.level.name ) );
    }
  }
}
//#CLIENTSIDE
function onKeyPressedcodekey )
{
  switch ( 
key )
  {
    case 
"b":
    {
      
this.blockOn this.blockOn;
      
      if ( ! 
this.blockOn )
      {
        
hideimg);
      }
      
      
setTimerthis.blockOn .05 );
      break;
    }
  }
}
function 
onTimeOut()
{
  if ( ! 
this.blockOn )
  {
    
hideimg);
    return;
  }
  
  
showimg1"block.png"mousexmousey );
  
changeimgcolors1111.5 );
  
  if ( 
rightmousebutton )
  {
    
triggeractionmousexmousey"killBlock"player.chat );
  }
  
  if ( 
leftmousebutton )
  {
    
triggerserver"gui"name"dropBlock"mousexmousey );
    
    
hideimg);
    
setTimer.1 );
    return;
  }
  
  
setTimer0.05 );
}
function 
onMouseDownbutton )
{
  switch ( 
button )
  {
    case 
"middle":
    case 
"double":
    {
      
triggeractionmousexmousey"setMessage"player.accountplayer.chat );
      break;
    }
  }


Script of class object_block:
PHP Code:

function onCreated()
{
  
this.image "block.png";
  
setshape13232 );
}
function 
onActionSetMessageaccmsg )
{
  
savelog2"staff/block.txt"format"%s changed the message of block (%s, %s) in %s from \"%s\" to \"%s\""findPlayeracc ).communitynamethis.xthis.ythis.level.namethis.chatmsg ) );
  
this.chat msg;
}
function 
onActionKillBlockacc )
{
  
savelog2"staff/block.txt"format"%s destroyed a block at (%s, %s) in %s "findPlayeracc ).communitynamethis.xthis.ythis.level.name ) );
  
destroy();


Fully logged to logs/staff/block.txt

[email protected] 07-15-2008 10:43 PM

v.poor @ chris...

xXziroXx 07-15-2008 10:48 PM

Christ, what the hell is up with this?

PHP Code:

this.blockOn this.blockOn

... that's just poor.

PHP Code:

this.blockOn = !this.blockOn


zokemon 07-15-2008 11:23 PM

Quote:

Originally Posted by xXziroXx (Post 1403390)
Christ, what the hell is up with this?

PHP Code:

this.blockOn this.blockOn

... that's just poor.

PHP Code:

this.blockOn = !this.blockOn


PHP Code:

this.blockOn this.blockOn xor 1


foxpawsd 07-16-2008 12:34 AM

oh sorry this script is old and someone gave it to me but thx people no more posts plz

xXziroXx 07-16-2008 01:53 AM

I just realized I called Chris for Christ again... -.-

cbk1994 07-16-2008 02:40 AM

Quote:

Originally Posted by xXziroXx (Post 1403390)
Christ, what the hell is up with this?

PHP Code:

this.blockOn this.blockOn

... that's just poor.

PHP Code:

this.blockOn = !this.blockOn


I don't know ... I just prefer it.

Doesn't make a difference anyway.

zokemon 07-16-2008 09:41 AM

Quote:

Originally Posted by cbk1994 (Post 1403487)
I don't know ... I just prefer it.

Doesn't make a difference anyway.

It actually does :)

Did anyone even get my post anyways?

PHP Code:

this.blockOn this.blockOn xor 1


Twinny 07-16-2008 12:15 PM

Well it has my name credited at the top of the code and,

http://forums.graalonline.com/forums...ad.php?t=71480

hey look! I released it! Guess he didn't really steal it afterall!

Anyhoo, the full script is there with the class :)

zokemon 07-16-2008 05:42 PM

Quote:

Originally Posted by Twinny (Post 1403548)
Well it has my name credited at the top of the code and,

http://forums.graalonline.com/forums...ad.php?t=71480

hey look! I released it! Guess he didn't really steal it afterall!

Anyhoo, the full script is there with the class :)

If he got the script from that thread, I'm pretty sure he would post his question in that thread.

Twinny 07-17-2008 03:12 PM

Quote:

Originally Posted by zokemon (Post 1403580)
If he got the script from that thread, I'm pretty sure he would post his question in that thread.

He said he got the script from someone else but in his post, it was credited to me + it was in the code gallery. Some of you guys were to quick to jump the 'stolen' gun.

zokemon 07-17-2008 06:17 PM

Quote:

Originally Posted by Twinny (Post 1403710)
He said he got the script from someone else but in his post, it was credited to me + it was in the code gallery. Some of you guys were to quick to jump the 'stolen' gun.

If it was mine name up there, I wouldn't like it. Excuse us for caring. :\
Maybe if he had something your name in his post or something.

xAzerothx 07-17-2008 06:18 PM

Don't post your work if you don't want it stolen.

zokemon 07-17-2008 06:29 PM

Quote:

Originally Posted by xAzerothx (Post 1403772)
Don't post your work if you don't want it stolen.

Hey sure guys, let's just let people steal scripts because apparently those who steal scripts have every right to as the script owner knew their script would be stolen when they posted it.

That's got to be the stupidest comment I've ever heard.

Inverness 07-17-2008 08:19 PM

Quote:

Originally Posted by xAzerothx (Post 1403772)
Don't post your work if you don't want it stolen.

I don't think you'll be getting positive rep anytime soon.

Imperialistic 07-17-2008 09:54 PM

Quote:

Originally Posted by xAzerothx (Post 1403772)
Don't post your work if you don't want it stolen.

l0llolololl0ll0loloooll..

thats like..
"Don't start a thread if you don't want to host an arguement."

xAzerothx 07-17-2008 10:14 PM

If you post your work you cannot ***** about it when someone steals it. Its like leaving out money.

Quote:

Originally Posted by Inverness (Post 1403806)
I don't think you'll be getting positive rep anytime soon.

I've already got a few, I'm not trying to get them though.

I went from -25 points to -14. I was trying to get -50 or so but things don't always turn out how you want.

zokemon 07-17-2008 10:22 PM

Quote:

Originally Posted by xAzerothx (Post 1403843)
If you post your work you cannot ***** about it when someone steals it. Its like leaving out money.



I've already got a few, I'm not trying to get them though.

I went from -25 points to -14. I was trying to get -50 or so but things don't always turn out how you want.

I can help if you want, my negative rep makes you lose like 5 points. :rolleyes:

Anyways, everyone has every right to be upset if your work gets stolen. I mean, if you published a book and someone copied your book and republished it without your permission, you have no right to be upset?

It is in no way like leaving money out. Even though if someone were to take money that you left out, you still have right to get that money back.

foxpawsd 07-21-2008 09:08 PM

People please I'am sorry I didn't know so please stop posting on this forum x_x

LoneAngelIbesu 07-21-2008 09:58 PM

What are you sorry for? You didn't do anything wrong.

xAzerothx 07-21-2008 10:47 PM

Thanks for the negative Dusty. Zero, please do.

Some people aren't going to give what's rightfully yours back. That's life.


All times are GMT +2. The time now is 02:46 AM.

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