Thread: MUDlib
View Single Post
  #22  
Old 01-16-2007, 05:14 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Twinny View Post
The mud library vars on Theed can get pretty hectic. Especially for armor. Short format example:

clientr.muditem_16=itemname=Twinny's Test Sword, equiptype= WEAPON_SWORD,weight=2

and so on.

It's done this way so you can load make object with vars from it. Eg.
PHP Code:
temp.mud = new TStaticVar();
temp.mud.loadvarsfromarray(clientr.muditem_16);
echo(
temp.mud.itemname); 
The system does have unique identifiers for each number but instead of being stored as a serverr flag, it is stored as a var in a DBNPC npc called 'mudlib'. The mudlib also has functions as well relating to speed/efficiency. Thanks to Kuji, this system is incredibly fast and versatile. But no secrets to give away .

Mud commands can be done via a player class. Eg. player.Mud_CreateItem("sword3", 1); being mudname then quantity.
Is your mudlib based on the one I wrote for thamhic? Same var and function names, and methods of storing data, by the looks of it.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote