- if( (useitem->itemnum>347 && useitem->itemnum<371) ){
- //I'm using 348-370 slots for both new and old scroll in the list_useitem.stb.. this code should work right?
- //Adventurer Plains Return Scroll
- if( thisclient->Stats->Level < 1 ) //this will check the level of the player before the warp code kicks in?
- {
- SendPM(thisclient,"You do not meet the required level to use this item.");
- return NULL;
- }
- useitem->usescript = 2;
- switch( useitem->itemnum )
- {
- case 350:
- useitem->usetype = 22;
- useitem->usevalue = 56545213;
- break;
- }
- //Zant Return Scroll
- if( thisclient->Stats->Level < 20 )
- {
- SendPM(thisclient,"You do not meet the required level to use this item.");
- return NULL;
- }
- useitem->usescript = 2;
- switch( useitem->itemnum )
- {
- case 351:
- useitem->usetype = 1;
- useitem->usevalue = 52405192;
- break;
- }
- //Junon Return Scroll
- if( thisclient->Stats->Level < 30 )
- {
- SendPM(thisclient,"You do not meet the required level to use this item.");
- return NULL;
- }
- useitem->usescript = 2;
- switch( useitem->itemnum )
- {
- case 352:
- useitem->usetype = 2;
- useitem->usevalue = 56545228;
- break;
- }
- }
It has been very silent for the past months now.
Anyway, I had this idea of requiring minimum levels to use return scrolls. I'm having problems how to code it inside extrafunctions.cpp. And before anything else I would like to remind you I' am not a programmer - not in atleast a few more months and a dozen more trial and errors inside the rev codes.
Well, this code bugs. The level requirement do not work properly, like, I still cannot use a zant scroll even if I'am level 20 or more. Please tell me what is wrong with my code. Thanks