• 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!

Send spell by name

hesczu

New Member
Joined
Jun 14, 2007
Messages
148
Reaction score
0
i need to send spells by name not by words

Sample:

utevo lux - light

the player write utevo lux and client send light

Thanks in advance
 
Huh, what you mean? You already write utevo lux...

If you mean that you write "light" to get light, just change names of spells in data/spells/spells.xml
 
he want to do it like it is now, I mean, in spells.xml words="utevo lux", but when you say it:
Player [x]: light

The client wont make him say utevo lux, but light.
 
In spells.cpp;
Code:
TalkActionResult_t Spells::playerSaySpell(Player* player, SpeakClasses type, const std::string& words)

Change:
Code:
	if(instantSpell->playerCastInstant(player, param))
		return TALKACTION_BREAK;
	else
		return TALKACTION_FAILED;
to:
Code:
	if(instantSpell->playerCastInstant(player, param))
	{
		g_game.internalCreatureSay(player, SPEAK_MONSTER_SAY, instantSpell->getName());
		return TALKACTION_BREAK;
	}
	else
		return TALKACTION_FAILED;

In game.cpp;
Code:
bool Game::playerSaySpell(Player* player, SpeakClasses type, const std::string& text)

Change:
Code:
	if(result == TALKACTION_BREAK)
		return internalCreatureSay(player, SPEAK_SAY, text);
to:
Code:
	if(result == TALKACTION_BREAK)
		return true;
 
Hey, Talaturen.

What I need to change if I want "animated spells text" like "Aaach" when drinking manafluid instead of normal text when player talking...?
 
Back
Top