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 08-02-2011, 06:04 PM
Equinox Equinox is offline
Registered User
Equinox's Avatar
Join Date: Jan 2011
Posts: 13
Equinox is on a distinguished road
Smile Script Help

Hi, I'm not very good at scripting just wondering if somebody could take a look at this and see if it has any problems. Thanks!


//#CLIENTSIDE
function onCreated()
{
this.image = "block.png";
}

function onPlayerChats()
if (player.chat == "Start") && if (player.guild == "Events Team")
{
message "3";
sleep(1);
message "2";
sleep(1)
message "1";
sleep(1)
message;
}
else
if (player.chat == "Stop") && if (player.guild == "Events Team")
show();
Reply With Quote
  #2  
Old 08-02-2011, 06:28 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
First off you should style the script to get a better look on it.

I also think you cant use:
PHP Code:
if (player.chat == "Start") && if (player.guild == "Events Team"
You can use two different ways:
PHP Code:
//first way:
if (player.chat == "Start") {
  if (
player.guild == "Events Team") {
    
//stuff
  
}
}

//seccond way:
if (player.chat == "Start" && player.guild == "Events Team") {
  
//stuff

also the command
PHP Code:
message "bla" 
is GS1. In GS2 it is
PHP Code:
this.chat "bla" 
Also at the part
PHP Code:
function onPlayerChats()
if (
player.chat == "Start") && if (player.guild == "Events Team")

it should be
PHP Code:
function onPlayerChats() {
if (
player.chat == "Start") && if (player.guild == "Events Team")

Here it´s a fixed version of yours:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.image "block.png";
}

function 
onPlayerChats() {
  if (
player.guild == "Events Team") {
    if (
player.chat == "Start") {
      
this.chat "3";
      
sleep(1);
      
this.chat "2";
      
sleep(1)
      
this.chat "1";
      
sleep(1)
      
this.chat "";
      
hide();
    }
    else
    if (
player.chat == "Stop") {
      
this.chat "";
      
show();
    }
  }

__________________
MEEP!
Reply With Quote
  #3  
Old 08-02-2011, 06:35 PM
Equinox Equinox is offline
Registered User
Equinox's Avatar
Join Date: Jan 2011
Posts: 13
Equinox is on a distinguished road
Thanks Callimuc
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 09:54 AM.


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