| Message |
This is semi-pseudo code, so you may need to change a word or two.
if( !str_cmp( arg2, "level" ) )
{
if( !can_omodify( ch, obj ) )
return;
if (xIS_SET(obj->flags, ITEM_PROTOTYPE))
obj->pIndexData->level = value;
else
obj->level = value;
return;
}
The problem with this, is all objects will be like this, i'll go look at my code and check how it is done, been a while since I had to mess with this.
--------EDIT---------
int
generate_itemlevel (AREA_DATA * pArea, OBJ_INDEX_DATA * pObjIndex)
{
int olevel;
int min = UMAX (pArea->low_soft_range, 1);
int max = UMIN (pArea->hi_soft_range, min + 15);
if (pObjIndex->level > 0)
olevel = UMIN (pObjIndex->level, MAX_LEVEL);
I believe if you change that pointer to OBJ_INDEX_DATA to OBJ_DATA and than have it check the obj->level than UMIN(obj->level, MAX_LEVEL), than change the other parts to obj->pIndexData that need to point to it, it should generate fine. |
Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.
-Txzeenath
telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!
Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a) | top |
|