Skip to content

Commit

Permalink
Re-add support for non-string based chat conditions (English only)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMUnlimited committed Oct 5, 2024
1 parent a2ea9b2 commit 5ae68db
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 34 deletions.
20 changes: 6 additions & 14 deletions Languages/English/ChatDisabled.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Historic chat messages that are no longer functionings
Greet
{Race!=HUMAN} Thank god I'm not humans again.
What's my name? [Name] What's my name? [Name] WHAT'S MY NAME!
Supposedly [RandomRace] really suck these days... guess we'll find out.
I think I know where [PlayerColor] started
{Race!=HUMAN} Thank god I'm not humans again. race_name[own_race] != quotemeta("HUMAN")
{!RaceChoiceRandom,Race=ORC,1on1} Orcs rule 1 on 1. My [Color] [Race] army is gonna own you.
{Name=Hunter}Let the hunt begin!
{Name=Crazy_Rusher} Rush, Rush, RUSH!!!
Expand All @@ -11,27 +14,16 @@ Have we started yet?
{Name=CyberPro}I am the only pro of this game, pityful human.
{Name=Aaargh}AAARGHAHA!!!!!!
{!RaceChoiceRandom,Race=ORC} Orcs, why did it have to be orcs?
What's my name? [Name] What's my name? [Name] WHAT'S MY NAME!
Supposedly [RandomRace] really suck these days... guess we'll find out.
I think I know where [PlayerColor] started
Gold problem
{OwnGold<200} I've got only [OwnGold] gold. Give me some or I'll have to leave in 10 secs.
{OwnGold<100}I'm outta cash. I need gold in 10 seconds or I have to leave.
{OwnGold<100}In 10 seconds I've gotta leave if I don't get some gold from you.
This sux! Only [OwnGold] gold. I need gold within 10 seconds or I'm out.
If I don't get gold within 10 seconds I'm going to have to leave cause I've only got [OwnGold].

Mega
Wake up [PlayerRace], time to die!
I know all your puny [TargetRace] tactics. They are stored on my harddrive.
Wee another [Race] win on my account. I can see that already.
{1on1} This will be an example of human failure.
I don't care how many [PlayerRace] farms you hide on this map, I will kill you any way.
{FFA}Here I come and I won't show mercy to any of you.
{Race!=HUMAN}Humans suck. Glad I'm [Race:S]
Thanks
{OwnGold<100} Thanks, give me more gold if you got any left.
{OwnGold>=400} Bling-bling!!!
{OwnGold<200} I'll probably need more, but every little bit helps.

Megatarget
Everyone who can attack, go here and let's kill these [TargetColor] [TargetRace] losers!
We will win if we attack [PlayerColor] now!
Expand Down
10 changes: 7 additions & 3 deletions Languages/English/ChatGoldproblem.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
I am in urgent need of gold! Please spare me some or I'll have to leave in 10 seconds!
Donate some money to my cause or I'm leaving in 10 seconds.
You have 10 seconds to pay homage or else I'm outta here.
Need some bling-bling yo! Hook me up or I gotta jet in 10 seconds.
I need money! Give me some within 10 seconds or else I'll have to quit.
Need some gold yo! Hook me up or I gotta jet in 10 seconds.
I need money! Give me some within 10 seconds or else I'll have to quit.
I've got only gold. Give me some or I'll have to leave in 10 secs. GetGold() < 200
I'm outta cash. I need gold in 10 seconds or I have to leave. GetGold() < 100
In 10 seconds I've gotta leave if I don't get some gold from you. GetGold() < 100
This sux! I need gold within 10 seconds or I'm out.
If I don't get gold within 10 seconds I'm going to have to leave.
2 changes: 1 addition & 1 deletion Languages/English/ChatGreet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Greetings, champion. You have been chosen to face me in battle.
Hello, warrior. I hope you brought your best skills and equipment.
Greetings, conqueror. You have come to claim your destiny.
Hello, legend. You have earned the right to face me in combat.
Greetings, friend. I'm just kidding. You are my enemy and I will crush you.
Greetings, friend. I'm just kidding. You are my enemy and I will crush you.
4 changes: 3 additions & 1 deletion Languages/English/ChatMega.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ Prepare to face my wrath. I am launching a massive attack on your base.
Brace yourself for the end. I am unleashing my full power on you.
Say goodbye to your hopes. I am leading a huge army to destroy you.
Get ready for the final showdown. I am bringing my ultimate weapon to annihilate you.
Accept your fate. I am coming for you with everything I have.
Accept your fate. I am coming for you with everything I have.
This will be an example of human failure. game_is_1on1
Here I come and I won't show mercy to any of you. game_is_ffa
17 changes: 10 additions & 7 deletions Languages/English/ChatThanks.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Thanks. I'll rebuild whatever's lost!
Thanks! Don't leave. We can still win right?
Yo! Thanks for the duckets.
Mad props on the cash yo!
Rebuilding as we speak! Thanks!
Thanks for the gold. I think we can pull this out.
Redistribution of wealth. I love it. Thanks!
Thanks. I'll rebuild whatever's lost! GetGold() >= 400
Thanks! Don't leave. We can still win right? GetGold() >= 400
Yo! Thanks for the duckets. GetGold() >= 400
Mad props on the cash yo! GetGold() >= 400
Rebuilding as we speak! Thanks! GetGold() >= 400
Thanks for the gold. I think we can pull this out. GetGold() >= 400
Redistribution of wealth. I love it. Thanks! GetGold() >= 400
Thanks, but I need more if you have any. GetGold() < 100
Bling-bling!!! GetGold() >= 400
Thanks, I'll probably need more, but every little bit helps. GetGold() < 200
17 changes: 9 additions & 8 deletions common.eai
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#INCLUDE <Natives.j>


globals

//============================================================================
Expand Down Expand Up @@ -3012,16 +3011,17 @@ function InitChatArrays%1 takes nothing returns nothing

#INCLUDETABLE <ChatEvents.txt> #EFR
#DEFINE $chatevent$ %1
#INCLUDETABLE <Languages\$lang$\Chat$chatevent$.txt> #ENC:$enc$
set chat_$chatevent$_length = 0
#INCLUDETABLE <Languages\$lang$\Chat$chatevent$.txt> #ENC:$enc$ #COND "%2" ne ""
if %2 then
set chat_$chatevent$[#EVAL{%row-1}] = "%1"
set chat_cond_$chatevent$[#EVAL{%row-1}] = true
#AFTERINCLUDE
set chat_$chatevent$_length = %row
set chat_$chatevent$_length = chat_$chatevent$_length + 1
endif
#ENDINCLUDE
#INCLUDETABLE <Languages\$lang$\Chat$chatevent$.txt> #ENC:$enc$ #COND "%2" ne ""
set chat_cond_$chatevent$[#EVAL{%row-1}] = %2
#INCLUDETABLE <Languages\$lang$\Chat$chatevent$.txt> #ENC:$enc$ #COND "%2" eq ""
set chat_$chatevent$[#EVAL{%row-1}] = "%1"
set chat_$chatevent$_length = chat_$chatevent$_length + 1
#ENDINCLUDE

#ENDINCLUDE

#INCLUDETABLE <Languages\%1\ChatMisc.txt> #ENC:%4
Expand Down Expand Up @@ -3232,6 +3232,7 @@ function Chat takes integer c returns nothing
if not (chatting or chat_important[c]) then
return
endif
call InitChatArrays() // Reset conditions checks to only use chats conditions are valid for
if false then
#INCLUDETABLE <ChatEvents.txt> #EFR
elseif c == C_%1 then
Expand Down

0 comments on commit 5ae68db

Please sign in to comment.