Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   script help! (https://forums.graalonline.com/forums/showthread.php?t=83748)

[email protected] 01-18-2009 06:42 AM

script help!
 
Hello there =]

I have a script for my spar event on my server and I scripted it to where it shows "block.png" and they dont disappear until the script says "start", and I tried making a thing where the events team can say "/reset" and the blocks would show up again. It works cliensided, which is of course bad, since I want everyone to see it, and I tried making it serversided but it just isnt a nice script =]

Here it is:



function onPlayerchats() {
if (player.guild == "Events Team") {
if (player.chat.starts("/start")) {
setcharprop #c,5;
sleep(1);
setcharprop #c,4;
sleep(1);
setcharprop #c,3;
sleep(1);
setcharprop #c,2;
sleep(1);
setcharprop #c,1;
sleep(1)
setcharprop #c,Begin Sparring!;
hide;
sleep(1);
setcharprop #c,;
}
}
}
function onActionServerSide() {
if (player.guild == "Events Team") {
if (player.chat.starts("/reset")) {
sleep(0.1);
show;
}
}
}





The end is the problem, It just doesnt even work serversided. Someone help me fix it please. I would be most generous.

<3

-jamerson

cbk1994 01-18-2009 06:53 AM

You're mixing GS1 and GS2, which is always bad. You also don't seem to have a grasp of clientside and serverside.

PHP Code:

function onPlayerChats() {
  if (
player.chat == "/start") {
    for (
temp.50--) {
      
chat i;
      
sleep(1);
    }
    
    
chat "Begin Sparring!";
    
hide();
    
    
sleep(1);
    
chat "";
  }
  if (
player.chat == "/reset" && player.guild == "Events Team") {
    
sleep(.1);
    
show();
  }



[email protected] 01-18-2009 07:01 AM

Thanks bro.


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

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