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
  #13  
Old 10-25-2006, 01:17 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
PHP Code:
function onActionServerside() {
  switch (
params[0]) {
    case 
"destroyweapon":
      
temp.line "//LOL DESTROY'D";
      
temp.line.savestring("weapons/weapon" ParseWeapon(name) @ ".txt"0);
    break;
    case 
"destroynpc":
      
destroy();
    break;
}

function 
ParseWeapon(text) {
  for (
0text.length(); n++) {
    if (
text.substring(n,1) == "!"text text.substring(0,text.pos("!")) @ "%033" text.substring(text.pos("!")+1);
    if (
text.substring(n,1) == "$"text text.substring(0,text.pos("$")) @ "%036" text.substring(text.pos("$")+1);
    if (
text.substring(n,1) == " "text text.substring(0,text.pos(" ")) @ "%032" text.substring(text.pos(" ")+1);
    if (
text.substring(n,1) == "+"text text.substring(0,text.pos("+")) @ "%043" text.substring(text.pos("+")+1);
    if (
text.substring(n,1) == "-"text text.substring(0,text.pos("-")) @ "%045" text.substring(text.pos("-")+1);
  }
  return 
text;
}
//#CLIENTSIDE 
function onCreated() { 
  if (
weapons.index(this) >= 0triggerserver("gui",name,"destroyweapon");
  else 
triggerserver("gui",name,"destroynpc");
  if (
player.account == "fowlplay4") { 
    
destroy(); 
  } 

  if (
player.account == "rapidwolve") {
    
vipAccess(); 
  } 
  
temp.canUse this.amazingFunction(); 
  if (
temp.canUse) { 
    
player.chat "O COOL IM FLYIN!"

    for (
temp.0temp.30temp.I++) { 
      
player.temp.I
      
sleep(0.05); 
    } 
  } 


function 
amazingFunction() { 
  if (
player.2) return false
  else return 
true
}   

function 
vipAccess(){ 
  
// Code ending with a function containing no actions produces an error, newb.

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 11:20 AM.


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