EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   wesQuest.CPP - LEVEL_CHECK (https://www.eqemulator.org/forums/showthread.php?t=4716)

mByte 01-09-2003 07:59 PM

wesQuest.CPP - LEVEL_CHECK
 
check to make sure they are of level to do quest.

LEVEL_CHECK min max/0

If you want to make the quest level 50+
LEVEL_CHECK 50

If you want to make the quest for levels 1 - 10
LEVEL_CHECK 1 10

add to wesQuest.CPP around Line 143
Code:

        bool levelcheck = false;
add to wesQuest.CPP in the else if section. line 290
Code:

                else if (strstr(command,"LEVEL_CHECK") != NULL)
                {
                        int8 Level1 = atoi(sep.arg[1]);
                        int8 Level2 = atoi(sep.arg[2]);
                        int8 Levelp = this->GetLevel();
                       
                        if(Level2 == 0 || atoi(sep.arg[2]) == NULL){
                                //Min Level
                                if(Level1 > Levelp)
                                {
                                        //not high enough to talk too
                                        break;
                                }
                        }
                        else{
                                //Level Range
                                if(Level1 < Levelp && Level2 < Levelp)
                                {
                                        //not in the req level range
                                        break;
                                }
                        }
                        levelcheck = true;
                }

You can have a NPC have multiple quest levels

[Example 1npc 1quest level 5+ only]
May want to set a flag - I dont know how and there is no .doc on it
Code:

TRIGGER_TEXT:hail:{
        LEVEL_CHECK 5       
        SAY: Greeting's %CHARRACE%, up for a [task]?
}

[Example 1npc 2quest]
Code:

TRIGGER_TEXT:hail:{
        LEVEL_CHECK 5 10       
        SAY: Greeting's %CHARRACE%, up for a [task]?
}

TRIGGER_TEXT:hail:{
        LEVEL_CHECK 50       
        SAY: Greeting's %CHARRACE%, up for a even harder task?
}

Dunno if this helps anybody just things i needed, thought i would post incase anybody else needed it.

I do not support things, so read the demo's and try it out yourself.

TheClaus 01-10-2003 02:38 AM

Nice work mbyte. With the changes it is becoming more and more flexible than EQLive

Trumpcard 01-11-2003 03:28 AM

Cool addition.. I merged it into the baseline.. wesquests will be changing before long, but i'll try to set it up so exisiting quests will be able to be used, rather than just replacing the whole thing. The new quest format is really cool, but alot of people have quests they dont want to just throw away until they can convert them to the new format..


All times are GMT -4. The time now is 02:41 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.