Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-29-2009, 06:14 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
blocks

at first, thats not mine but I dont want to play round with it and destroy

but this is just glitched like hell!
if I put the block out of the level(out of the 64x64, means in the black) I just cant delet I CANT, I cant by uploading level, I cant delet level and reupload, NOTHING WORKS!
maybe someone can give me a better working script?

thats the class:
PHP Code:
function onCreated()
{
  
setimg"block.png");
  
setshape13232);
}
function 
onPlayerChats()
{
  
this.freedom false// Everyone can kill blocks?
  
if ( player.chat == "/destroy")
  if ( 
clientr.isStaff || clientr.blockKiller || ( clientr.staff != NULL && clientr.staff != "") || this.freedomthis.destroy();
  
//If the player tries to clear, and is staff, or is block killer authorized, or has staff tag and is not blank, or is free server
}
//#CLIENTSIDE
function onCreated()
{
  
setimg"block.png");
  
setshape13232);
 
chat this.owner.chat;
  } 
thats the weapon:

PHP Code:
function onActionServerSide()
{
  switch (
params[0])
  {
    case 
"npc":
    {
      
temp.putnpc2intparams[1]), intparams[2]), "");
      
temp.n.join"shared_blocks");
      break;
    }
  }
}
//#CLIENTSIDE
function onKeyPressedcodekey)
{
  if ( 
key == "h")  triggerserver"gui"this.name"npc"mousexmousey);
}

function 
onTimeout()
{
  if ( 
keydown271true))
  {
    
temp.showimg500"block.png"00);
    
i.intmousex);
    
i.intmousey);
    
i.alpha .5;
    
timeout .05;
    
message player.account;
  }else 
hideimg500);

__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
  #2  
Old 03-29-2009, 06:17 PM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud of
If you place ANYTHING outside of a level's boundaries (Except NPCs within the level itself), the ONLY way to fix that is to go on RC and type in

PHP Code:
/clearnpcs levelname.nw 
Scripts will not reach beyond the limits of the level's edges.
__________________
TSAdmin (Forum Moderator)
Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #3  
Old 03-29-2009, 06:20 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
ohh thanks
just silly, thats the only way
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
  #4  
Old 03-29-2009, 06:22 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by TSAdmin View Post
If you place ANYTHING outside of a level's boundaries (Except NPCs within the level itself), the ONLY way to fix that is to go on RC and type in

PHP Code:
/clearnpcs levelname.nw 
Scripts will not reach beyond the limits of the level's edges.
it's not the ONLY way
you can go to npcs/ folder in filebrowser and find the level npc to delete that npc text file.. (not recommended anyway)
(i haven't tested it with a npc outside a level... so i could be wrong)
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #5  
Old 03-29-2009, 06:22 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
http://forums.graalonline.com/forums...34&postcount=5

There's one here.

My suggestion is to add this to the script (look for the top two lines, then replace those with this).

PHP Code:
    case "dropBlock":
    { 
      if (! (
dx in |064| && dy in |064|)) {
        break;
      } 
__________________
Reply With Quote
  #6  
Old 03-29-2009, 06:26 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road

thanks
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
  #7  
Old 03-30-2009, 01:01 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 Deas_Voice View Post
it's not the ONLY way
you can go to npcs/ folder in filebrowser and find the level npc to delete that npc text file.. (not recommended anyway)
(i haven't tested it with a npc outside a level... so i could be wrong)
Yes that works, I've have had to do that before
__________________
Deep into the Darkness peering...
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:41 PM.


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