EOSERV Forum > EOSERV > npc vocab code release.
Topic is locked.
Page: << 1 2 3 4 5 >>
npc vocab code release.
Author Message
Post #71026 npc vocab code release.

When i was trying to add npc vocab i couldnt find any released topics. Than finally i found one but than i found out  that it was incomplete so here is the complete release of npc vocab. First of all I dont take anycredits.Thecredits goes to the maker of this code and to ananas for helping me to fix it :] Anyways here is the code: (If you cant find it use CTRL + F)

In world.cpp under:

void world_timed_save(void *world_void)

{

World *world = static_cast<World *>(world_void);


UTIL_PTR_VECTOR_FOREACH(world->characters, Character, character)

{

character->Save();

}


world->guildmanager->SaveAll();

}


add:

http://pastebin.com/2v6spbzG


under:


    event = new TimeEvent(spammer, this, 3600.00, Timer::FOREVER);

    this->timer.Register(event);

    event->Release();


add:


        event = new TimeEvent(world_speak_npcs, this, 15.0, Timer::FOREVER);

this->timer.Register(event);

event->Release();


goto: npc.cpp. and add under:

#undef vd

#undef vv

#undef v


this:

http://pastebin.com/CtYPCcVm

now goto world.hpp and add under:

void FormulaVars(std::tr1::unordered_map<std::string, double> &vars, std::string prefix = "");


this:


void Msg(std::string message);


And now of course the .ini file :) Go back to world.cpp and add under:

this->home_config.Read(this->config["HomeFile"]);

this:

this->npcsay_config.Read(this->config["NpcSpeachFile"]);

and add under:

this->home_config.Read(this->config["HomeFile"]);

this:

this->npcsay_config.Read(this->config["NpcSpeachFile"]);


now goto world.hpp and add under:

Config home_config;

this:

Config npcsay_config;

now goto config.ini and add at ###Files### this:

NpcSpeachFile = ./data/npc.ini

now goto your data folder and make a file called: npc.ini and add in it:


### NPC Speach Sentances ###

#Format: 

#(NpcID).1 = Message

#(NpcID).2 = Message2

#(NpcId).3 = Message3

#Messages are optional, you can do 1, 2, or 3 and it won't hurt anything.


1.1 = How are c00?


That's the end of the release. :D If you want to have all npc says than add this:

http://pastebin.com/xPJigcuc

13 years, 5 weeks ago
Post #71682 Re: npc vocab code release.

Sorry bro lol, what exactly does this do?

13 years, 5 weeks ago
Post #71684 Re: npc vocab code release.

If you fill this in the npc.ini:

7.1 = Nahh..

Than a goat says: Nahh.. after some time.

13 years, 5 weeks ago
Post #73007 Re: npc vocab code release.

Interesting!

The finishing touch to this feauture would be the ability to set how often an NPC says something (eg. 85% of the time), so the adventurer NPC at Tutorial Island tells you more often how to fight a monster than a crow says "Krr!".
Of course it is not hard to code this myself, I'm just making a suggestion here.

---
"If you're going through hell, keep going."
13 years, 3 weeks ago
Post #74142 Re: npc vocab code release.

I finished part npc.ini :D (the original EO one)

### NPC Speach Sentances ###

#Format:

#(NpcID).1 = Message

#(NpcID).2 = Message2

#(NpcId).3 = Message3

#Messages are optional, you can do 1, 2, or 3 and it won't hurt anything.

16.1 = Welcome at the Imperial bank
16.2 = Your gold will be safe with me
16.3 = Don't you try stealing from me!

26.1 = I offer you the best quality jewels.

28.1 = dow youwww ssee*jj thajjjt ellllephant?
28.2 = whooww iss druwnnk *hic* ????
28.3 = bartenndejrrrrr *hic* i *hic* wwish tow orwderrrr

32.1 = I will make you look pretty!
32.2 = Shall i make a wonderfull mohawk for you?

36.1 = Is that a cyclop eye you got there?
36.2 = Yer yer, you got anything for me child?
36.3 = Kazam kazoo kazast, bing me the past

100.1 = Good to see you again.
100.2 = Click n me if you need help :)
100.3 = Hi, i am here to help you

154.1 = Once you have reached LVL 1 you can sail off to the main world!
154.2 = Once you have found clothes go to the incentory and double-click the item to equipe it.
154.3 = You can broadcast messages  by beginning your line with a '~' character.
154.4 = Press F12 to refresh your screen if you are having trouble hitting a monster.
154.5 = You can gain EXP and items by killing monsters on the island.
154.6 = Your first tak should be finding clothes, attack goats with CTRL to obtain clothes.
154.7 = Always respect your fellow players, we want everyone to enjoy Endless.

166.1 = Hellow Stranger

13 years, 2 weeks ago
Post #74161 Re: npc vocab code release.

Sorry ;p I edited my post.

13 years, 2 weeks ago
Post #74163 Re: npc vocab code release.

Lolss, you do realize there is much more NPC speech than just that in game right? There are Undeaths, Reaper, Proto, the Cyto-whatevers, drunk pirates, and several others.

---
May he now rest under aegis of mirage -
As the sands slowly turn to Elysian fields
13 years, 2 weeks ago
Post #74164 Re: npc vocab code release.
Syran posted: (17th Apr 2011 12:35 pm)

Lolss, you do realize there is much more NPC speech than just that in game right? There are Undeaths, Reaper, Proto, the Cyto-whatevers, drunk pirates, and several others.


Oh yes! You're right there was also from reaper: 9 = Im going to kill you! or something.
13 years, 2 weeks ago
Post #74176 Re: npc vocab code release.

I get a error.

..\src\world.hpp|195|error: address of overloaded function with no contextual type information|

13 years, 2 weeks ago
Post #74178 Re: npc vocab code release.

Did you add everything correct? Also under:

void FormulaVars(std::tr1::unordered_map<std::string, double> &vars, std::string prefix = "");

this:

void Msg(std::string message);

13 years, 2 weeks ago
Post #74187 Re: npc vocab code release.
Hollow posted: (17th Apr 2011 03:24 pm)

Did you add everything correct? Also under:

void FormulaVars(std::tr1::unordered_map<std::string, double> &vars, std::string prefix = "");

this:

void Msg(std::string message);


I searched FormulaVars couldnt find it.
13 years, 2 weeks ago
Post #74189 Re: npc vocab code release.
Kaylinz posted: (17th Apr 2011 04:10 pm)

Hollow posted: (17th Apr 2011 03:24 pm)

Did you add everything correct? Also under:

void FormulaVars(std::tr1::unordered_map<std::string, double> &vars, std::string prefix = "");

this:

void Msg(std::string message);


I searched FormulaVars couldnt find it.

try to search this: void Attack(Character *target);

and add 

void Msg(std::string message);

under it.
13 years, 2 weeks ago
Post #74190 Re: npc vocab code release.
Hollow posted: (17th Apr 2011 04:42 pm)

Kaylinz posted: (17th Apr 2011 04:10 pm)

Hollow posted: (17th Apr 2011 03:24 pm)

Did you add everything correct? Also under:

void FormulaVars(std::tr1::unordered_map<std::string, double> &vars, std::string prefix = "");

this:

void Msg(std::string message);


I searched FormulaVars couldnt find it.

try to search this: void Attack(Character *target);

and add 

void Msg(std::string message);

under it.

Void Attack isn't their either.
13 years, 2 weeks ago
Post #74192 Re: npc vocab code release.

This is how it looks for me.


http://pastebin.com/E9DSGF9Y

13 years, 2 weeks ago
Post #102929 Re: npc vocab code release.


not working I got the Hollows Dreamers and It isnt working on the Npc.ini

http://pastebin.com/xNPfRx8T

I dont think there is anything wrong, quite sure!

---
Nice, Get Hacked Bro.
12 years, 34 weeks ago
Page: << 1 2 3 4 5 >>
Topic is locked.
EOSERV Forum > EOSERV > npc vocab code release.