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 12-11-2009, 04:49 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Not counting deaths

I have this script for sword only areas. In the areas where this weapon is added, deaths will not count. Any idea why?

PHP Code:
function onCreated() join("weapon_functions");

//#CLIENTSIDE

function onCreated()
{
  
enableweapons();
  
client.swordOnly true;
  
//s+a, ect disabled in -*System
  
player.ap += 50;
  
player.hearts 6;
  
player.ap -= 50;
  
disablemap(); 
  
disablepause(); 
  
disableselectweapons();
  
disableselectitems();
}

//keep this here, hearts are resetting when player dies
function onPlayerDies()
{
  
player.ap += 50;
  
player.hearts 6;
  
player.ap -= 50;
}

function 
onPlayerEnters()
{
  
player.ap += 50;
  
player.hearts 6;
  
player.ap -= 50;
  
  if (
client.swordOnly)
  {
    
disableweaponselect(); 
    
player.selectedweapon findWeaponIdthis );
  }
  else {
    
//Disabled; trying to fix the enablefeatures mess. I don't think removing this will break anything.
    //enablefeatures(allfeatures);
    
enablemap(); 
    
enablepause(); 
    
enableweapons(); 
    
enableselectweapons();
    
enableselectitems();
    
destroy();
  }

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 12-11-2009, 05:09 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well they are brought back to life right away, so perhaps the death isn't registering.
__________________
Quote:
Reply With Quote
  #3  
Old 12-11-2009, 05:21 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Its not,I've commented that out already, still does it.

This is the only other script part that has to do with the weapon really, it just disables certain things, and is where our enablefeatures stuff is.


PHP Code:
  if (player.level.name in this.levelnamez)
  {
    
//Settings for PK/Sparring/War arenas.
    
    
temp.features allfeatures 0x10 0x20 0x80;
    
    if (
"functions_options" in player.joinedclasses)
    {
      if (
player.getOptionsVariable("hidehearts")) temp.features -= 0x100;
      if (
player.getOptionsVariable("hidenicks")) temp.features -= 0x200;
    }
    
    
enablefeatures(temp.features);
    
    
client.swordOnly true;
    
triggerServer("weapon"this.name"remSwordWep");
  }
  else {
    
//Normal settings, disabling old inventory
    
    
enablefeatures(allfeatures 0x80);
    
    
client.swordOnly false;
    
triggerServer("weapon"this.name"addSwordWep");
  } 

There is an array of levels, and in those levels, this code is activated. It goes hand in hand with the SwordOnly script in the first post. The server trigger is to add or remove SwordOnly.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #4  
Old 12-11-2009, 05:27 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
I'm guessing it's because this script is used in a sparring zone. Deaths don't count in sparring zones.
__________________
Reply With Quote
  #5  
Old 12-11-2009, 05:29 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It's not. I wish it was that easy...

This is in a spar, as well as pk and war arenas as posted in the second code snippet.
The pk and war arenas are not set up as sparring zones.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by sssssssssss; 12-11-2009 at 05:49 AM..
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 08:14 AM.


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