Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-08-2007, 06:18 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
player.attr setting.

I use it for quite alot for things, I thought other people might use it too.
HTML Code:
public function onremoveAttr(attrIndexs)
  for (temp.currentAttr: temp.attrIndexs)
    player.attr[temp.currentAttr] = "";

public function assignAttr(attrData)
  for (temp.playerAttr: temp.attrData[0])
    player.attr[temp.playerAttr] = temp.attrData[1][temp.attrData[0].index(temp.playerAttr)];
How it's used:
PHP Code:
 //Sets individual attrs
  
assignAttr({{23},{"ter_statdisplay.gani"clientr.hp @"/"clientr.maxhp}});
  
this.assignAttr({{attrIndex0attrIndex1}, {attrIndex0 valueattrIndex1 value}})
//Would clear both indexes
  
scheduleevent(5"removeAttr", {23}, "");  //Has a timer of five seconds 
  
this.onremoveAttr({attrIndex0attrIndex1}); //Removes indexs straight away 
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 03:53 PM.


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