Jump to content
metin2dev
daradevil124

[GF-Servers] Channel ID Reminder

Recommended Posts

Flaggenicon-UK.png

quest channel_id begin
	state start begin
		when login begin
		chat("You are connected to channel "..pc.get_channel_id()..".")
		end
	end
end

8M3PDW.png

 

32px-Turkey-flag-icon.png

quest channel_id begin
	state start begin
		when login begin
		chat("Kanal "..pc.get_channel_id().." ile bağlısın.")
		end
	end
end

 

 

  • Like 2
  • Confused 1

Share this post


Link to post
Share on other sites

input_login.cpp CInputLogin::Entergame()

ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You're connected to channel %d."), g_bChannel);

 

don't miss the locale_string part

Share this post


Link to post
Share on other sites
Am 9.8.2018 um 14:53 schrieb ragem0re:

input_login.cpp CInputLogin::Entergame()


ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You're connected to channel %d."), g_bChannel);

 

don't miss the locale_string part

better like this:

 

#ifdef __WEBZEN_CHANNEL_REMINDER__
	if (ch->IsPC())
	{
		if (g_bChannel >= 1 && g_bChannel <= 8)
		{
			ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SAITO_CHANNEL_REMINDER %d"), g_bChannel);
		}
		else
		{
			ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SAITO_CHANNEL_REMINDER_GAME99"));
		}
	}
#endif

 

  • Thanks 1

Share this post


Link to post
Share on other sites
On 10/27/2018 at 6:33 AM, Saito said:

better like this:

Spoiler


#ifdef __WEBZEN_CHANNEL_REMINDER__
	if (ch->IsPC())
	{
		if (g_bChannel >= 1 && g_bChannel <= 8)
		{
			ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SAITO_CHANNEL_REMINDER %d"), g_bChannel);
		}
		else
		{
			ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("SAITO_CHANNEL_REMINDER_GAME99"));
		}
	}
#endif

 

 

On 4/23/2017 at 5:05 PM, daradevil124 said:
Spoiler


quest channel_id begin
	state start begin
		when login begin
		chat("You are connected to channel "..pc.get_channel_id()..".")
		end
	end
end

 

 

If I'm not mistaken, that's how it should work.

  • LUA
-- gameforge.channel_reminder = {}
-- gameforge.channel_reminder._010_syschat = "You're connected to channel %d."

quest channel_reminder begin
    state start begin
        when login begin
            local channelID = pc.get_channel_id()
            syschat(string.format(gameforge.channel_reminder._010_syschat, (channelID == 99 and 0 or channelID)))
        end
    end
end
  • Source
// "CHANNEL_REMINDER_SYSCHAT";
// "You're connected to channel %d.";

ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("CHANNEL_REMINDER_SYSCHAT"), g_bChannel == 99 ? 0 : g_bChannel);

 

  • Like 2

Share this post


Link to post
Share on other sites
Am 27.10.2018 um 12:54 schrieb metin2team:

"SAITO_

I like that. :)

I make this with all LC_TEXT i made because i dont like to do it in english as lc_text and translate it to german in locale_string. The "saito" does not belong to the whole string it doesnt mean that i make the system (at this point, i write the code by myself.. xd), its only a thing i made on all lc_text wich i add to the game by myself to know on this position, that i write it there and if theres a problem, i know its my fault then xd, im sorry :D

 

 

 

 

I think its better to do it only in source. It makes no sense to do it in lua or python + lua + source. But ymir never make sense... so...

  • Sad 1

Share this post


Link to post
Share on other sites
34 minutes ago, Saito said:

I make this with all LC_TEXT i made because i dont like to do it in english as lc_text and translate it to german in locale_string. The "saito" does not belong to the whole string it doesnt mean that i make the system (at this point, i write the code by myself.. xd), its only a thing i made on all lc_text wich i add to the game by myself to know on this position, that i write it there and if theres a problem, i know its my fault then xd, im sorry :D 

#VCS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×