![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jun 2009
Posts: 3
OS: WinXP32bit
|
LuA Code
Code:
-----------------Necromancer-Type Boss------------------
-----------------WoWEmu LuA-----------------------------
----------Credits go to: UnholyOne Of AC-Web------------
--------------------------------------------------------
function NecromancerBoss_OnCombat (pUnit, Event)
local AgroSayChoice = math.random(1, 4)
if AgroSayChoice==1 then
pUnit:SendChatMessage(12, 0, "And so you have sealed your fates...")
pUnit:RegisterEvent("NBoss_Phase1", 1000, 1)
end
if AgroSayChoice==2 then
pUnit:SendChatMessage(12, 0, "Why do you even try?")
pUnit:RegisterEvent("NBoss_Phase1", 1000, 1)
end
if AgroSayChoice==3 then
pUnit:SendChatMessage(14, 0, "Fools!")
pUnit:RegisterEvent("NBoss_Phase1", 1000, 1)
end
if AgroSayChoice==4 then
pUnit:SendChatMessage(14, 0, "You will perish!")
pUnit:RegisterEvent("NBoss_Phase1", 1000, 1)
end
else
end
end
-------------------------------------------------------------
------------------------Phase 1:Summon Help------------------
-------------------------------------------------------------
function NBoss_Phase1 (pUnit, Event)
local SpawnAdd1Timing = math.random(5000, 10000)
local SpawnAdd2Timing = math.random(15000, 20000)
local SpawnAdd3Timing = math.random(25000, 30000)
local Phase1SayTiming = math.random(15000, 45000)
pUnit:RemoveEvents ()
pUnit:RegisterEvent("NBoss_SpawnAdd1", SpawnAdd1Timing, 0)
pUnit:RegisterEvent("NBoss_SpawnAdd2", SpawnAdd2Timing, 0)
pUnit:RegisterEvent("NBoss_SpawnAdd3", SpawnAdd3Timing, 0)
pUnit:RegisterEvent("NBoss_Phase1Say", Phase1SayTiming, 0)
pUnit:RegisterEvent("NBoss_Phase2", 1000, 0)
end
--------------------------------------------------------------
-------------------------Phase 1:Add Summons------------------
--------------------------------------------------------------
function NBoss_SpawnAdd1 (pUnit, Event)
local x = pUnit:GetX()
local y = pUnit:GetY()
local z = pUnit:GetZ()
local o = pUnit:GetO()
if pUnit:GetHealthPct > 80 then
pUnit:SpawnCreature(60001, x, y, z, o, 14, 15)
end
else
end
end
function NBoss_SpawnAdd2 (pUnit, Event)
local x = pUnit:GetX()
local y = pUnit:GetY()
local z = pUnit:GetZ()
local o = pUnit:GetO()
if pUnit:GetHealthPct > 80 then
pUnit:SpawnCreature(60002, x, y, z, o, 14, 0)
end
else
end
end
function NBoss_SpawnAdd3 (pUnit, Event)
local x = pUnit:GetX()
local y = pUnit:GetY()
local z = pUnit:GetZ()
local o = pUnit:GetO()
if pUnit:GetHealthPct > 80 then
pUnit:SpawnCreature(60003, x, y, z, o, 14, 0)
end
else
end
end
---------------------------------------------------------------
--------------------------Phase 1:Random Chat------------------
---------------------------------------------------------------
function NBoss_Phase1Say (pUnit, Event)
local Phase1SayChoice = math.random(1, 4)
if Phase1SayChoice==1 then
pUnit:SendChatMessage(14, 0, "Destroy Them my minions!")
end
if Phase1SayChoice==2 then
pUnit:SendChatMessage(12, 0, "How am I losing...?")
end
if Phase1SayChoice==3 then
pUnit:SendChatMessage(14, 0, "Kill Them ALL!")
end
if Phase1SayChoice==4 then
pUnit:SendChatMessage(14, 0, "Aid me Spirits of the Nether!")
end
else
end
end
-------------------------------------------------------------------
-----------------------Phase 1: End; Phase 2: Begin----------------
-------------------------------------------------------------------
function NBoss_Phase2 (pUnit, Event)
local Phase2Ready = pUnit:GetHealthPct ()
local FrostboltTiming = math.random(15000, 25000)
local ShadowboltTiming = math.random(8500, 13000)
local FireballTiming = math.random(25000, 35000)
local Phase2SayTiming = math.random(15000, 45000)
if Phase2Ready <= 80 then
pUnit:RemoveEvents ()
pUnit:PlaySoundToSet(8554)
pUnit:RegisterEvent("NBoss_Frostbolt", FrostboltTiming, 0)
pUnit:RegisterEvent("NBoss_Shadowbolt", ShadowboltTiming, 0)
pUnit:RegisterEvent("NBoss_Fireball", FireballTiming, 0)
pUnit:RegisterEvent("NBoss_Phase2Say", Phase2SayTiming, 0)
pUnit:RegisterEvent("NBoss_Phase3", 1000, 0)
end
else
end
end
--------------------------------------------------------------------
-------------------------Phase 2:Spells-----------------------------
--------------------------------------------------------------------
function NBoss_Frostbolt (pUnit, Event)
local plr = pUnit:GetMainTank()
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(FrostboltID, plr)
end
else
end
end
function NBoss_Shadowbolt (pUnit, Event)
local plr = pUnit:GetMainTank()
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(ShadowboltID, plr)
end
else
end
end
function NBoss_Fireball (pUnit, Event)
local plr = pUnit:GetMainTank()
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(FireballID, plr)
end
else
end
end
---------------------------------------------------------------------
--------------------------Phase 2:Random Chat------------------------
---------------------------------------------------------------------
function NBoss_Phase2Say (pUnit, Event)
local Phase2SayChoice = math.random(1, 4)
if Phase2SayChoice==1 then
pUnit:SendChatMessage(12, 0, "How will you fair against the elements?")
end
if Phase2SayChoice==2 then
pUnit:SendChatMessage(14, 0, "DIE!")
end
if Phase2SayChoice==3 then
pUnit:SendChatMessage(14, 0, "I will Freeze the blood in your veins!")
end
if Phase2SayChoice==4 then
pUnit:SendChatMessage(14, 0, "When all is lost, there is only shadow!")
end
else
end
end
---------------------------------------------------------------------
-------------------------Phase 2:End; Phase 3:Begin------------------
---------------------------------------------------------------------
function NBoss_Phase3 (pUnit, Event)
local Phase3Ready = pUnit:GetHealthPct ()
local RandomKillTiming = math.random(3000, 60000)
local Phase3SayTiming = math.random(15000, 45000)
if Phase3ready <= 40 then
pUnit:RemoveEvents ()
pUnit:RegisterEvent("NBoss_SpawnAdd4", 1000, 1)
pUnit:RegisterEvent("NBoss_SpawnAdd5", 1000, 1)
pUnit:RegisterEvent("NBoss_RandomKill", RandomKillTiming, 0)
pUnit:RegisterEvent("NBoss_Phase3Say", Phase3SayTiming, 0)
end
else
end
end
--------------------------------------------------------------------------
------------------------Phase 3:Summoning Adds----------------------------
--------------------------------------------------------------------------
function NBoss_SpawnAdd4 (pUnit, Event)
local x = pUnit:GetX()
local y = pUnit:GetY()
local z = pUnit:GetZ()
local o = pUnit:GetO()
pUnit:SpawnCreature(60004, x, y, z, o, 14, 0)
end
else
end
end
function NBoss_SpawnAdd5 (pUnit, Event)
local x = pUnit:GetX()
local y = pUnit:GetY()
local z = pUnit:GetZ()
local o = pUnit:GetO()
pUnit:SpawnCreature(60005, x, y, z, o, 14, 0)
end
else
end
end
--------------------------------------------------------------------------
--------------------------------Phase 3:InstaKill-------------------------
--------------------------------------------------------------------------
function NBoss_RandomKill (pUnit, Event)
local plr = pUnit:GetRandomPlayer (0)
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(7, plr)
end
else
end
end
--------------------------------------------------------------------------
------------------------------Phase 3:Random Chat-------------------------
--------------------------------------------------------------------------
function NBoss_Phase3Say (pUnit, Event)
local Phase3SayChoice = math.random(1, 4)
if PhaseSayChoice==1 then
pUnit:SendChatMessage(14, 0, "Embrace your own destruction!")
end
if Phase3SayChoice==2 then
pUnit:SendChatMessage(12, 0, "There is no escape")
end
if Phase3SayChoice==3 then
pUnit:SendChatMessage(14, 0, "None may survive the ancients!")
end
if Phase3SayChoice==4 then
pUnit:SendChatMessage(14, 0, "The End is near! Aid me, Spirits!")
end
else
end
end
---------------------------------------------------------------------------
---------------------------------------Misc.-------------------------------
---------------------------------------------------------------------------
function NBoss_OnLeaveCombat (pUnit, Event)
pUnit:RemoveEvents ()
end
function NBoss_OnDeath (pUnit, Event)
pUnit:RemoveEvents ()
pUnit:SendChatMessage(12, 0, "")
end
function NBoss_OnKilledTarget (pUnit, Event)
local OKT = math.random(1, 2)
if OKT==1 then
pUnit:SendChatMessage(14, 0, "You will rot in the ground!")
end
else
end
end
RegisterUnitEvent(60000, 1, "NecromancerBoss_OnCombat")
RegisterUnitEvent(60000, 2, "NBoss_OnLeaveCombat")
RegisterUnitEvent(60000, 3, "NBoss_OnKilledTarget")
RegisterUnitEvent(60000, 4, "NBoss_OnDeath")
--------------------------------------------------------------------
--------------------------Add 1:Self-Destruct-----------------------
--------------------------------------------------------------------
function Add1_OnCombat (pUnit, Event)
pUnit:RegisterEvent("Add1_Say10", 1000, 1)
pUnit:RegisterEvent("Add1_Say9", 2000, 1)
pUnit:RegisterEvent("Add1_Say8", 3000, 1)
pUnit:RegisterEvent("Add1_Say7", 4000, 1)
pUnit:RegisterEvent("Add1_Say6", 5000, 1)
pUnit:RegisterEvent("Add1_Say5", 6000, 1)
pUnit:RegisterEvent("Add1_Say4", 7000, 1)
pUnit:RegisterEvent("Add1_Say3", 8000, 1)
pUnit:RegisterEvent("Add1_Say2", 9000, 1)
pUnit:RegisterEvent("Add1_Say1", 10000, 1)
end
end
function Add1_Say10 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "10...")
end
function Add1_Say9 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "9...")
end
function Add1_Say8 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "8...")
end
function Add1_Say7 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "7...")
end
function Add1_Say6 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "6...")
end
function Add1_Say5 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "5...")
end
function Add1_Say4 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "4...")
end
function Add1_Say3 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "3...")
end
function Add1_Say2 (pUnit, Event)
pUnit:SendChatMessage(12, 0, "2...")
end
function Add1_Say1 (pUnit, Event)
pUnit:SendChatMessage(14, 0, "1!")
pUnit:FullCastSpell(AoEDamage)
end
function Add1_OnLeaveCombat (pUnit, Event)
pUnit:RemoveEvents ()
end
function Add1_OnDeath (pUnit, Event)
pUnit:RemoveEvents ()
end
RegisterUnitEvent(60001, 1, "Add1_OnCombat")
RegisterUnitEvent(60001, 2, "Add1_OnLeaveCombat")
RegisterUnitEvent(60001, 4, "Add1_OnDeath")
------------------------------------------------------------
--------------------Add 2:Reduce Tank Healing---------------
------------------------------------------------------------
function Add2_OnCombat (pUnit, Event)
pUnit:RegisterEvent("Add2_MS", 4500, 0)
end
function Add2_MS (pUnit, Event)
local plr = pUnit:GetMainTank()
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(MortalStrikeID, plr)
end
else
end
end
function Add2_OnLeaveCombat (pUnit, Event)
pUnit:RemoveEvents ()
end
function Add2_OnDeath (pUnit, Event)
pUnit:RemoveEvents ()
end
RegisterUnitEvent(60002, 1, "Add2_OnCombat")
RegisterUnitEvent(60002, 2, "Add2_OnLeaveCombat")
RegisterUnitEvent(60002, 4, "Add2_OnDeath")
-------------------------------------------------------------
--------------------Add 3:Heals Main Boss--------------------
-------------------------------------------------------------
function Add3_OnCombat (pUnit, Event)
pUnit:RegisterEvent("Add3_Heal", 2000, 0)
end
function Add3_Heal (pUnit, Event)
local Healtarg = pUnit:GetRandomFriendly()
if (Healtarg ~= nil) then
pUnit:FullCastSpellOnTarget(GreaterHeal, Healtarg)
end
else
end
end
function Add3_OnLeaveCombat (pUnit, Event)
pUnit:RemoveEvents ()
end
function Add3_OnDeath (pUnit, Event)
pUnit:RemoveEvents ()
end
RegisterUnitEvent(60003, 1, "Add3_OnCombat")
RegisterUnitEvent(60003, 2, "Add3_OnLeaveCombat")
RegisterUnitEvent(60003, 4, "Add3_OnDeath")
------------------------------------------------------
--------------Adds 4 and 5 do ONLY Melee DPS----------
------------------------------------------------------
------------------------------------------------------
-----------------------Mob Stats----------------------
------------------------------------------------------
----------------------
-Necromancer -
-10m HP -
-9.5m Mana -
-6k-8k Melee DMG -
-1.5s Attack Speed -
-40 to all Resistance-
----------------------
----------------------
-Add1 -
-10k HP -
-5k Mana -
-300-500 Melee DMG -
-1.0s Attack Speed -
-15 to all Resistance-
----------------------
----------------------
-Add2 -
-120k HP -
-30k Mana -
-1000-2000 Melee DMG -
-1.25 Attack Speed -
-20 to all Resistance-
----------------------
----------------------
-Add3 -
-360k HP -
-600k Mana -
-200-400 Melee DMG -
-3.0 Attack Speed -
-30 to all Resistance-
----------------------
----------------------
-Add4 -
-2.5m HP -
-1m Mana -
-4000-6000 Melee DMG -
-1.4 Attack Speed -
-Immune to Frost -
----------------------
----------------------
-Add5 -
-2.5m HP -
-1m Mana -
-4000-6000 Melee DMG -
-1.4 Attack Speed -
-Immune to Shadow -
----------------------
----------------------------------------------------------
-----------------------Fight Tactics----------------------
----------------------------------------------------------
-During Phase 1 the boss will Constantly be summoning adds,-
-The adds MUST be killed as fast as possible.-
-The first add has the capability of wiping out half the raid if it isnt killed within ten seconds-
-The second add reduces all healing to the tank by 75% as long as it is alive-
-And the Third add will Heal the Boss.-
-When Phase 2 Comes around Just keep the main tank always at full HP and he must have above 40k hp or-
-he can get killed in one hit. DPS but don't pull agro.-
-In the last Phase the boss will summon 2 adds, both hitting for above 5k damage. These must be Tanked by 2 off-tanks-
-or They will tear the raid apart.-
---------------------------------------------------------
------------------Recommended Setup----------------------
---------------------------------------------------------
-5 Healers-
-One Main Tank-
-Two Off Tanks-
-12 DPS-
-5 Your Choice (Healers Recommended)-
---------------------------------------
Feedback/Comments appreciated |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: Jun 2009
Posts: 3
OS: WinXP32bit
|
Re: LuA Code
I also Wrote this C++ code to search for files on your computer, and tell you where on your hard disk the file is located.
It is compatible only with windows. Code:
//This will Search your hard disk for the document specified, and tells you where it is
//located
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define s_buffer 80
char *flush(char *);
int main(int argc, char *argv[])
**
char
string_to_lookfor[s_buffer],
string_searching[s_buffer],
filename[s_buffer],
temp_string[s_buffer];
long unsigned int
search_number=0,
for_i,
for_j, //special variables for the for loop
for_k;
FILE *search_file;
printf("What File Would You Like To Search?\n:");
fgets(filename, s_buffer, stdin);
if(strlen(filename) == 0 || strcmp(filename, "\n") == 0)
**
printf("You did not Enter a string, Program exitting.\n");
exit(0);
}
strcpy(filename, flush(filename));
search_file = fopen(filename, "r");
if(search_file == NULL)
**
perror(search_file);
exit(0);
}
printf("\nWhat are you searching for?\n:");
fgets(string_to_lookfor, s_buffer, stdin);
if(strlen(string_to_lookfor) == 0 || strcmp(string_to_lookfor, "\n") == 0)
**
printf("You did not Enter a string, Program exitting.\n");
exit(0);
}
strcpy(string_to_lookfor, flush(string_to_lookfor)); \n
search_number = strlen(string_to_lookfor);
for(for_i=0; !feof(search_file); for_i++)
**
fgets(string_searching, s_buffer, search_file);
if(strlen(string_searching) == 0 || strcmp(string_searching, "\n") == 0)
**
continue;
}
strcpy(string_searching, flush(string_searching));
for(for_j = 0; for_j < strlen(string_searching); for_j++)
**
for(for_k = 0; for_k < search_number; for_k++)
**
temp_string[for_k] = string_searching[for_k+for_j];
}
temp_string[for_k] = '\0';
if((strcmp(string_to_lookfor, temp_string)) == 0)
**
printf("Match Found For %s! It's On Line:%lu At Character:%lu\n",string_to_lookfor, for_i+1, for_j+1);
}
}
}
fclose(search_file);
return 0;
}
char *flush(char *string_flush)
**
if(string_flush[strlen(string_flush) - 1] == '\n')
**
string_flush[strlen(string_flush) - 1] = '\0'; \0
}
return string_flush;
}
|
|
|
|
![]() |
| Thread Tools | |
|
|