View Single Post
  #1  
Old 01-09-2003, 07:59 PM
mByte
Hill Giant
 
Join Date: Feb 2002
Posts: 206
Default 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.
__________________
mByte
Reply With Quote