Jump to content
  • 0

Flying Damage High Five Problem


Question

Posted

Hi people. I am trying to do some damage on the screen with only a text in the xdat. But I have a problem that when displaying the message the text goes up until it is no longer visible on the screen, it is seen twice but then it disappears. This is the code I added.

 

 

variables
---------

const RECOVERY_MESSAGE_OFFSET = 100;
const MAX_RECOVERY_MESSAGE = 2;
var TextBoxHandle txtRecovery[MAX_RECOVERY_MESSAGE]; 


OnLoad
------

function OnLoad ()
{	
	local int temp;
	
	Me = GetWindowHandle("OnScreenDmg");
	
	for (temp = 0; temp < 2; temp++)
	{
		txtRecovery[temp] = GetTextBoxHandle("OnScreenDmg.txtRecovery" $ temp);
	}
}
                            
Timer
-------
                            
                            
function OnTimer(int TimerID){
    switch (TimerID)
	{	
		case 101:
			txtRecovery[0].SetText("");
			Me.KillTimer(TimerID);
			sysDebug(string(TimerID));
			break;
     }
                            
HandleSystemMessage
-------------------

                            
function HandleSystemMessage (string a_Param)
{
	local int summonDamage;
	local int playerDamage;
	local int SystemMsgIndex;
	local int Restore;
  
	ParseInt(a_Param,"Index",SystemMsgIndex);

  sysDebug(string(SystemMsgIndex));
	
	
	switch (SystemMsgIndex)
	{

			if (SystemMsgIndex == 2261 || SystemMsgIndex == 2281 || SystemMsgIndex == 1280 || SystemMsgIndex == 2266 || SystemMsgIndex == 1066)
				{
					ParseInt(a_Param,"Param3", playerDamage);
					ParseInt(a_Param,"Param1",Restore);
				}
			
			if (SystemMsgIndex == 1066)
			{
				targetCount++;
				if (targetCount < 5)
				{
					messagePosition++;
					if (messagePosition > 3) messagePosition = 0;
					
					switch (SystemMsgIndex)
					{
						case 1066: //+hp
								txtRecovery[0].GetText() == ""; 
								txtRecovery[0].SetAlpha(255); 
								txtRecovery[0].SetText(string(Restore));
								txtRecovery[0].SetAnchor( "OnScreenMessageExWnd", "BottomCenter", "BottomCenter", -200 + Rand(150), Rand(60) ); 
								txtRecovery[0].ClearAnchor(); 
								txtRecovery[0].Move(0, -1500, 8f);   
								txtRecovery[0].SetAlpha( 0, 2.8f );
								Me.KillTimer(101);
								Me.SetTimer(101, 300); 
								break;
						}
                    }
				}


                            
                            
                            

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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


  • Posts

    • ⚔️ LINEAGE II KHADIA ⚔️ Interlude PTS (L2OFF) • Mid Rate PvP • Custom Endgame Experience 🔥 NOT JUST ANOTHER SERVER — A REAL BATTLEFIELD 🔥 Welcome to L2Khadia, where classic Interlude meets competitive PvP and custom progression. No fake numbers, no empty promises — only action, economy, war and long-term gameplay. ━━━━━━━━━━━━━━━━━━━━━━ 📊 SERVER RATES EXP: x100 SP: x150 Adena: x300 Spoil: x15 ━━━━━━━━━━━━━━━━━━━━━━ ⚔️ WHY KHADIA? ✔ Original Interlude Mechanics & Formulas ✔ Mid Rate PvP Balance ✔ Real Clan Wars / Sieges / Olympiad ✔ Stable & Fair Economy ✔ Active Staff Team ✔ Long-Term Project Vision ━━━━━━━━━━━━━━━━━━━━━━ 🗡️ KHADIA CUSTOM CONTENT 🔥 Khadia Weapons – Unique power & visuals 🛡 Khadia Armor – Raid Boss drops & crafting 🧥 Khadia Cloaks – Endgame progression items 💎 Designed for competitive PvP ━━━━━━━━━━━━━━━━━━━━━━ 🎁 REWARD SYSTEMS 🏆 PvP / PK Reward System 📦 Daily PvP Reward Package 👑 Raid Package from Boss Extract Rewards 🗳 Vote Reward System 📈 Rankings: PvP / PK / Clans / Castles ━━━━━━━━━━━━━━━━━━━━━━ 💎 VIP FEATURES ✔ VIP Buff Coin ✔ Nick / Title Colors ✔ Special VIP Chat ( ^ Key ) ✔ Exclusive VIP Benefits ━━━━━━━━━━━━━━━━━━━━━━ 🎮 QUALITY OF LIFE ✔ Auto Loot for Farm ✔ Auto Loot Disabled for Raid Boss ✔ Offline Shop System ✔ Remote Buff Coin ✔ RaidBoss Status NPC ✔ PvP / PK Ranking NPC ━━━━━━━━━━━━━━━━━━━━━━ 🌍 FARM ZONES • Elven Fortress [80] – Medium • Cave of Trials [80+] – Party Hard • Monastery of Silence [80] – Medium • PvP Zones Around Raid Bosses ━━━━━━━━━━━━━━━━━━━━━━ 🏰 CLAN & SIEGE SYSTEM ✔ Full Interlude Clan System ✔ Max Clan Level 8 + Clan Skills ✔ Max 3 Clans per Alliance ✔ No Kick / Leave Penalty ✔ Weekly Castle Sieges ━━━━━━━━━━━━━━━━━━━━━━ 🚀 JOIN NOW – START YOUR LEGEND 🚀 🌐 Website: www.l2khadia.com 💬 Discord: https://discord.gg/DnZrgWn77n ━━━━━━━━━━━━━━━━━━━━━━ No Pay To Win • Fair Gameplay • Real PvP • Custom Endgame Content       We Wish you the best game ! 
    • First of all, he doesn’t even know English. He needs to learn it first.
    • Which copies are you talking about? Hahaha, stop crying, everyone knows you're a copy-paste, you can't even program "hello world".
    • Imagine if gustavo cuts cocaine and skylord stops flaming him and this two motherfuckers work together, they can do very good stuff... But.. yeah
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..