Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Adding items to a MUD database (https://forums.graalonline.com/forums/showthread.php?t=84256)

Tyhm 02-17-2009 01:45 AM

Adding items to a MUD database
 
Once again, the Wiki has let me down.

I know we used to do it all the time on Kingdoms Debug - but how, again? I add a text file to mud/archetypes, and...?

cbk1994 02-17-2009 02:53 AM

GK/Kingdoms Debug is the only server with built-in MUD functions.

Check the scripts you have to find out how it reads them, then create a file in the appropriate director.

Tyhm 02-17-2009 03:04 AM

Yeah, done that bit and it's basically giving me the 404. I think I have to /restart something before it'll find the right file, but that's okay, I'd rather have the player touch an NPC and the NPC sets their strings than the NPC calls a text file to set their string from some magical muddy database I can neither access nor control...
PHP Code:

public function itemExists(temp.id) {
  
temp.item ItemDB.("item_" temp.id);
  if (
temp.item != NULL) return true;
  else return 
false;


And naturally, ItemDB is not defined in this class, nor does this class join to any others...I hate inheriting other peoples' test scripts...

Nor is ItemDB mentioned in any other weapons or classes (except this class's GetItem function, which calls it to return one line thereof, and that's all)...

Nor does the word "join" occur in Any scripts on the server at all...it's all rather frustrating.

cbk1994 02-17-2009 03:42 AM

That's not actually a MUD system. That's reading strings from a database NPC.

Your best bet is to just rescript it.

Tyhm 02-17-2009 03:46 AM

Right, database NPC. No idea what or where or how to edit that. :-D

Yeah, I'm gonna go with my first plan; anything that can give you a shotgun joins the Shotgun_Get class, which knows what strings to set. Anything that wants to know the stats on the shotgun can check their clientr.item_ list. Thanks! :-D


All times are GMT +2. The time now is 10:51 AM.

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