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
  #12  
Old 01-06-2011, 09:12 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
This is what I did for Classic iPhone stealth (removed some other parts to provide this),

Weapon: -Staff/Stealth
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.attr[22] = "unstealth.gani";
}

function 
ChatBar.onAction() {
  if (
ChatBar.text == "/stealth") {
    
toggleStealth();
    
ChatBar.text "";
  }
}

function 
toggleStealth() {
  
this.stealth = !this.stealth;
  if (
this.stealth)
    
player.attr[22] = "stealth.gani";
  else
    
player.attr[22] = "unstealth.gani";

in the gani,
PHP Code:
function onPlayerEnters() {
  if (
clientr.isStaff)
    
player.alpha 0.4;
  else
    
player.alpha 0;

So, all staff can see the stealthed person at half alpha while no-one else can see them.
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 06:47 PM.


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