Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-15-2008, 04:29 PM
foxpawsd foxpawsd is offline
Registered User
foxpawsd's Avatar
Join Date: Dec 2006
Posts: 14
foxpawsd is on a distinguished road
Exclamation 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", "");
}
Reply With Quote
  #2  
Old 07-15-2008, 04:43 PM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
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?
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
  #3  
Old 07-15-2008, 06:34 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
I have a feeling that he is missing the "staffsign" class. Also, you shouldn't be posting scripts by other people without their permission.
__________________
Do it with a DON!
Reply With Quote
  #4  
Old 07-15-2008, 09:18 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
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.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 07-15-2008, 09:33 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
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
__________________
Reply With Quote
  #6  
Old 07-15-2008, 10:43 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
v.poor @ chris...
Reply With Quote
  #7  
Old 07-15-2008, 10:48 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
Christ, what the hell is up with this?

PHP Code:
this.blockOn this.blockOn
... that's just poor.

PHP Code:
this.blockOn = !this.blockOn
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 07-15-2008, 11:23 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by xXziroXx View Post
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
__________________
Do it with a DON!
Reply With Quote
  #9  
Old 07-16-2008, 12:34 AM
foxpawsd foxpawsd is offline
Registered User
foxpawsd's Avatar
Join Date: Dec 2006
Posts: 14
foxpawsd is on a distinguished road
Unhappy

oh sorry this script is old and someone gave it to me but thx people no more posts plz
Reply With Quote
  #10  
Old 07-16-2008, 01:53 AM
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
I just realized I called Chris for Christ again... -.-
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #11  
Old 07-16-2008, 02:40 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 xXziroXx View Post
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.
__________________
Reply With Quote
  #12  
Old 07-16-2008, 09:41 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by cbk1994 View Post
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
__________________
Do it with a DON!
Reply With Quote
  #13  
Old 07-16-2008, 12:15 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
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
Reply With Quote
  #14  
Old 07-16-2008, 05:42 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Twinny View Post
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.
__________________
Do it with a DON!
Reply With Quote
  #15  
Old 07-17-2008, 03:12 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by zokemon View Post
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.
Reply With Quote
  #16  
Old 07-17-2008, 06:17 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Twinny View Post
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.
__________________
Do it with a DON!
Reply With Quote
  #17  
Old 07-17-2008, 06:18 PM
xAzerothx xAzerothx is offline
Banned
Join Date: Aug 2006
Location: Gurnee, Illinois
Posts: 2,615
xAzerothx has a little shameless behaviour in the past
Send a message via AIM to xAzerothx Send a message via MSN to xAzerothx Send a message via Yahoo to xAzerothx
Don't post your work if you don't want it stolen.
Reply With Quote
  #18  
Old 07-17-2008, 06:29 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by xAzerothx View Post
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.
__________________
Do it with a DON!
Reply With Quote
  #19  
Old 07-17-2008, 08:19 PM
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
Quote:
Originally Posted by xAzerothx View Post
Don't post your work if you don't want it stolen.
I don't think you'll be getting positive rep anytime soon.
__________________
Reply With Quote
  #20  
Old 07-17-2008, 09:54 PM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
Quote:
Originally Posted by xAzerothx View Post
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."
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
  #21  
Old 07-17-2008, 10:14 PM
xAzerothx xAzerothx is offline
Banned
Join Date: Aug 2006
Location: Gurnee, Illinois
Posts: 2,615
xAzerothx has a little shameless behaviour in the past
Send a message via AIM to xAzerothx Send a message via MSN to xAzerothx Send a message via Yahoo to xAzerothx
If you post your work you cannot ***** about it when someone steals it. Its like leaving out money.

Quote:
Originally Posted by Inverness View Post
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.
Reply With Quote
  #22  
Old 07-17-2008, 10:22 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by xAzerothx View Post
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.

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.
__________________
Do it with a DON!
Reply With Quote
  #23  
Old 07-21-2008, 09:08 PM
foxpawsd foxpawsd is offline
Registered User
foxpawsd's Avatar
Join Date: Dec 2006
Posts: 14
foxpawsd is on a distinguished road
Angry

People please I'am sorry I didn't know so please stop posting on this forum
Reply With Quote
  #24  
Old 07-21-2008, 09:58 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
What are you sorry for? You didn't do anything wrong.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #25  
Old 07-21-2008, 10:47 PM
xAzerothx xAzerothx is offline
Banned
Join Date: Aug 2006
Location: Gurnee, Illinois
Posts: 2,615
xAzerothx has a little shameless behaviour in the past
Send a message via AIM to xAzerothx Send a message via MSN to xAzerothx Send a message via Yahoo to xAzerothx
Thanks for the negative Dusty. Zero, please do.

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


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 07:08 AM.


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