• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[8.54][NPC] Rozgłos NPC

Erevius

It Was A Good Day
Joined
Feb 12, 2010
Messages
157
Reaction score
7
Location
Poland/Olsztyn
Proszę o pomoc. Chciałbym, aby każdy mój NPC w kółko powtarzał jakąś wiadomość np: "Chodźcie, kupujcie, tanie itemy..." itp co np 3 minuty. Co dostawić do skrytpów? RePP
 
Last edited by a moderator:
W nazwa_npc.xml przed </npc> dodajesz:

XML:
<voices>
<voice text="Chodzcie, kupujcie, tanie itemy..." interval="100" margin="1" yell="yes"/>
</voices>
 
W nazwa_npc.xml przed </npc> dodajesz:

XML:
<voices>
<voice text="Chodzcie, kupujcie, tanie itemy..." interval="100" margin="1" yell="yes"/>
</voices>

idk czemu ale w npc.cpp jest interval2, a nie interval ;p.

Code:
		else if(xmlStrcmp(p->name, (const xmlChar*)"voices") == 0)
		{
			for(xmlNodePtr q = p->children; q != NULL; q = q->next)
			{
				if(xmlStrcmp(q->name, (const xmlChar*)"voice") == 0)
				{
					if(!readXMLString(q, "text", strValue))
						continue;

					Voice voice;
					voice.text = strValue;
					if(readXMLInteger(q, "interval2", intValue))
						voice.interval = intValue;
					else
						voice.interval = 60;

					if(readXMLInteger(q, "margin", intValue))
						voice.margin = intValue;
					else
						voice.margin = 0;

					voice.type = SPEAK_SAY;
					if(readXMLInteger(q, "type", intValue))
						voice.type = (SpeakClasses)intValue;
					else if(readXMLString(q, "yell", strValue) && booleanString(strValue))
						voice.type = SPEAK_YELL;

					if(readXMLString(q, "randomspectator", strValue) || readXMLString(q, "randomSpectator", strValue))
						voice.randomSpectator = booleanString(strValue);
					else
						voice.randomSpectator = false;

					voiceList.push_back(voice);
				}
			}
		}
 
Back
Top