Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-01-2007, 06:36 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
TNT script not working

Ok so the tnt will only work if you equip it then unequip it and say /tnt
PHP Code:
function onActionServerside()
{
if (
params[1] == "use"){

  if (
clientr.toolcount == NULLclientr.toolcount 0;
  
this.ok 0;

  for (
0clientr.toolcount++) {
    if (
makevar("clientr.tool" i)[1] == "Tools/TNT"this.ok 1;
  }
  if (
this.ok == 0) return;
  if (!
player.level.name.starts("at_mine")) return;
  
serverr.tntlayer player.account;
  
putnpc2(player.xplayer.y"").join("tnt");

  
this.temp = { 1"Tools/TNT""tnt","at_tnt-icon.png"""""1,};
  if (
clientr.toolcount == ""clientr.toolcount 0;
  if (
this.temp[5] == 1) {
    for (
0clientr.toolcount++) {
      if (
makevar("clientr.tool" i)[1] == this.temp[1]) {
        if (
makevar("clientr.tool" i)[4] == this.temp[4]) {
          
makevar("clientr.tool" i)[0] -= 1;
          if (
makevar("clientr.tool" i)[0] <= 0) {
            
makevar("clientr.tool" i) = "";
            for (
i<= clientr.toolcountj++) {
              
makevar("clientr.tool" j) = makevar("clientr.tool" 1);
            }
            
clientr.toolcount--;
          }
        }
      }
    }
  }
}
}

//#CLIENTSIDE
function onCreated() setTimer(.05);

function 
onPlayerChats()
{
  if (
player.chat == "/tnt") {
    if (
this.timer <= 0) {
      
triggeraction(0,0,"serverside",Tools/TNT,"use");
      
this.timer 2;
    } else 
player.chat "You must wait " this.timer "seconds!";
  }
}


function 
onTimeout()
{
  if (
this.timer 0this.timer -=.05;
  else if (
this.timer 0this.timer 0;
  
  
setTimer(.05);

__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
 


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 02:00 PM.


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