Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graal V4 Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=143)
-   -   Suggestion: Clientside Class (https://forums.graalonline.com/forums/showthread.php?t=63343)

Tom 01-10-2006 07:53 PM

Suggestion: Clientside Class
 
Clientside TStaticVar CAN'T join classes. In a former thread it was said it was due to security risk. However, why can't classes be scripted in the Weapon NPC and make the scripts truly class-oriented?

PHP Code:

class item
{
  function 
itemid 0quant // Constructor
  
{
    
this.index id;
    
this.quant quant;
  }
  function 
dropquant )
  {
    if (
quant this.quantquant this.quant;
    if (
quant 1) return false;
    
triggeraction(00"serverside""Items"this.idthis.quant);
  }


Or, even more in depth, more functions to the actual classes:

PHP Code:

class wearableitem : public item
{
  function 
wearableitemid 0quant 1) : item:itemidquant );

  function 
wear()
  {
    if (
this.worn) return true;
 
    
player.wear ++;
    
this.worn true;

    return 
true;
  }
  function 
remove()
  {
    if (!
this.worn) return true;

    
player.wear --;
    
this.worn false;
    return 
true;
  }



Admins 01-11-2006 12:24 AM

The Graal class system is a matter of organization, and actually more dynamic than the C++ class system since you can join and leave at any time. Like I have said in an earlier thead, it would be possible to add support for joining classes on clientside which are listed in some server option, haven't got time for adding that yet though.


All times are GMT +2. The time now is 07:52 PM.

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