[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » World of Warcraft » Сервер » СКРИПТЫ (test)
СКРИПТЫ
magi4kaДата: Четверг, 28.02.2008, 11:17:21 | Сообщение # 1
Рядовой
Сообщений: 6
Награды: 0
Да я вот замутил эту тему не зря =)
прошу добовлять ваши подлеки, а товсеть скрипты =)

Спс за внимание happy

Добавлено (28.02.2008, 11:16:46)
---------------------------------------------
Отображает цифровые часы на вашей странице. Использует свои изображения для часов и не требует никаких библиотек

<?php
// En: Begin PHP Code / Fr: Debut code PHP
/******************************************************************************\
* Digital Access Counter Version 1.0 *
* Copyright 2000 Frederic TYNDIUK (FTLS) All Rights Reserved. *
* E-Mail: tyndiuk@ftls.org Script License: GPL *
* Created 02/28/2000 Last Modified 02/28/2000 *
* Scripts Archive at: http://www.ftls.org/php/ *
*******************************************************************************/
// Necessary Variables:

$IMG_DIR_URL = "./digits/";
// En: URL Directory of digits (0.gif ... 9.gif).
// Fr: URL du repertoire des images (0.gif ... 9.gif).

// End Necessary Variables section
/******************************************************************************/

function txt2digits ($txt) {
global $IMG_DIR_URL;

$digits = preg_split("//", $txt);

while (list($key, $val) = each($digits)) {
if ($val != "") {
if ($val == "-") $val = "dash";
if ($val == ":") $val = "colon";
$html_result .= "<IMG SRC=\"$IMG_DIR_URL$val.gif\">";
}
}
return $html_result;
}

$date = txt2digits(date("d-m-Y"));
$time = txt2digits(date("H:i:s"));

// En: End PHP Code
// Fr: Fin code PHP
?>

<HTML><HEAD><TITLE>Clock</TITLE></HEAD>
<BODY BGCOLOR="white">
<BR><BR><P ALIGN="Center"><FONT FACE="Arial, helvetica" SIZE="+2" COLOR="#336699"><STRONG><EM>Sample / Examples</EM></STRONG></FONT></P><BR>

<CENTER>
<?php echo $date ?>
<P>
<?php echo $time ?>
</CENTER>

<CENTER><BR><BR>
<FONT FACE="Arial" SIZE=-2>
<EM>© Copyright 2000 <A HREF="http://www.ftls.org/ftls.shtml">FTLS</A> (Tyndiuk Frédéric). All rights reserved.
<BR>FTLS's PHP Scripts Archive : <A HREF="http://www.ftls.org/php/">http://www.ftls.org/php/</A></EM></FONT>
</CENTER></BODY></HTML>

Скрипт PHP

Добавлено (28.02.2008, 11:17:21)
---------------------------------------------
123


Ля - ля - ля
 
Jedi23Дата: Четверг, 28.02.2008, 14:52:39 | Сообщение # 2
Майор
Сообщений: 139
Награды: 0
Скриптик на Илидана.Работает почти близ лайк,хотя неисправности имеются:

Index: src/bindings/universal/Makefile
================================================== =================
--- src/bindings/universal/Makefile (revision 106)
+++ src/bindings/universal/Makefile (working copy)
@@ -82,7 +82,7 @@
sc_marshal_mcbride.lo sc_silas_darkmoon.lo \
sc_silva_filnaveth.lo sc_skorn_whitecloud.lo \
sc_battlemaster.lo sc_guildmaster.lo sc_travelmaster.lo \
- sc_default.lo sc_defines.lo
+ sc_default.lo sc_defines.lo sc_boss_illidan.lo sc_flame_of_azzinoth.lo
libMaNGOSScript_la_OBJECTS = $(am_libMaNGOSScript_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -258,6 +258,8 @@
ScriptMgr.cpp \
scripts/boss/sc_boss_onyxia.cpp \
scripts/custom/sc_custom_example.cpp \
+ scripts/custom/sc_boss_illidan.cpp \
+ scripts/custom/sc_flame_of_azzinoth.cpp \
scripts/creature/sc_generic_caster.cpp \
scripts/creature/sc_generic_melee.cpp \
scripts/creature/sc_kobold.cpp \
@@ -359,6 +361,8 @@
include ./$(DEPDIR)/sc_battlemaster.Plo
include ./$(DEPDIR)/sc_boss_onyxia.Plo
include ./$(DEPDIR)/sc_custom_example.Plo
+include ./$(DEPDIR)/sc_boss_illidan.Plo
+include ./$(DEPDIR)/sc_flame_of_azzinoth.Plo
include ./$(DEPDIR)/sc_default.Plo
include ./$(DEPDIR)/sc_defines.Plo
include ./$(DEPDIR)/sc_generic_caster.Plo
@@ -421,6 +425,20 @@
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sc_custom_example.lo `test -f 'scripts/custom/sc_custom_example.cpp' || echo '$(srcdir)/'`scripts/custom/sc_custom_example.cpp

+sc_boss_illidan.lo: scripts/custom/sc_boss_illidan.cpp
+ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sc_boss_illidan.lo -MD -MP -MF "$(DEPDIR)/sc_boss_illidan.Tpo" -c -o sc_boss_illidan.lo `test -f 'scripts/custom/sc_boss_illidan.cpp' || echo '$(srcdir)/'`scripts/custom/sc_boss_illidan.cpp; \
+ then mv -f "$(DEPDIR)/sc_boss_illidan.Tpo" "$(DEPDIR)/sc_boss_illidan.Plo"; else rm -f "$(DEPDIR)/sc_boss_illidan.Tpo"; exit 1; fi
+# source='scripts/custom/sc_boss_illidan.cpp' object='sc_boss_illidan.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sc_boss_illidan.lo `test -f 'scripts/custom/sc_boss_illidan.cpp' || echo '$(srcdir)/'`scripts/custom/sc_boss_illidan.cpp
+
+sc_flame_of_azzinoth.lo: scripts/custom/sc_flame_of_azzinoth.cpp
+ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sc_flame_of_azzinoth.lo -MD -MP -MF "$(DEPDIR)/sc_flame_of_azzinoth.Tpo" -c -o sc_flame_of_azzinoth.lo `test -f 'scripts/custom/sc_flame_of_azzinoth.cpp' || echo '$(srcdir)/'`scripts/custom/sc_flame_of_azzinoth.cpp; \
+ then mv -f "$(DEPDIR)/sc_flame_of_azzinoth.Tpo" "$(DEPDIR)/sc_flame_of_azzinoth.Plo"; else rm -f "$(DEPDIR)/sc_flame_of_azzinoth.Tpo"; exit 1; fi
+# source='scripts/custom/sc_flame_of_azzinoth.cpp' object='sc_flame_of_azzinoth.lo' libtool=yes \
+# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+# $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sc_flame_of_azzinoth.lo `test -f 'scripts/custom/sc_flame_of_azzinoth.cpp' || echo '$(srcdir)/'`scripts/custom/sc_flame_of_azzinoth.cpp
+
sc_generic_caster.lo: scripts/creature/sc_generic_caster.cpp
if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sc_generic_caster.lo -MD -MP -MF "$(DEPDIR)/sc_generic_caster.Tpo" -c -o sc_generic_caster.lo `test -f 'scripts/creature/sc_generic_caster.cpp' || echo '$(srcdir)/'`scripts/creature/sc_generic_caster.cpp; \
then mv -f "$(DEPDIR)/sc_generic_caster.Tpo" "$(DEPDIR)/sc_generic_caster.Plo"; else rm -f "$(DEPDIR)/sc_generic_caster.Tpo"; exit 1; fi
Index: src/bindings/universal/Makefile.am
================================================== =================
--- src/bindings/universal/Makefile.am (revision 106)
+++ src/bindings/universal/Makefile.am (working copy)
@@ -42,6 +42,8 @@
scripts/creature/simple_ai.cpp \
scripts/creature/simple_ai.h \
scripts/custom/custom_example.cpp \
+scripts/custom/boss_illidan.cpp \
+scripts/custom/flame_of_azzinoth.cpp \
scripts/custom/test.cpp \
scripts/go/go_orb_of_command.cpp \
scripts/go/go_teleporter.cpp \
Index: src/bindings/universal/Makefile.in
================================================== =================
--- src/bindings/universal/Makefile.in (revision 106)
+++ src/bindings/universal/Makefile.in (working copy)
@@ -111,7 +111,7 @@
sc_yauj.lo sc_arlokk.lo sc_gahzranka.lo sc_grilek.lo \
sc_hakkar.lo sc_hazzarah.lo sc_jeklik.lo sc_jindo.lo \
sc_mandokir.lo sc_marli.lo sc_renataki.lo sc_thekal.lo \
- sc_venoxis.lo sc_wushoolay.lo system.lo
+ sc_venoxis.lo sc_wushoolay.lo system.lo sc_boss_illidan.lo sc_flame_of_azzinoth.lo
libmangosscript_la_OBJECTS = $(am_libmangosscript_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -275,6 +275,8 @@
scripts/creature/sc_lumberjack.cpp \
scripts/creature/sc_miner.cpp \
scripts/custom/sc_custom_example.cpp \
+ scripts/custom/sc_boss_illidan.cpp \
+ scripts/custom/sc_flame_of_azzinoth.cpp \
scripts/guard/sc_guard_ai.h \
scripts/guard/sc_guard_bluffwatcher.cpp \
scripts/guard/sc_guard_contested.cpp \
@@ -507,6 +509,8 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_chromaggus.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_cthun.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_custom_example.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_boss_illidan.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_flame_of_azzinoth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_defias.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_defines.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sc_ebonroc.Plo@am__quote@
@@ -652,6 +656,20 @@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sc_custom_example.lo `test -f 'scripts/custom/sc_custom_example.cpp' || echo '$(srcdir)/'`scripts/custom/sc_custom_example.cpp

+sc_boss_illidan.lo: scripts/custom/sc_boss_illidan.cpp
+@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sc_boss_illidan.lo -MD -MP -MF "$(DEPDIR)/sc_boss_illidan.Tpo" -c -o sc_boss_illidan.lo `test -f 'scripts/custom/sc_boss_illidan.cpp' || echo '$(srcdir)/'`scripts/custom/sc_boss_illidan.cpp; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/sc_boss_illidan.Tpo" "$(DEPDIR)/sc_boss_illidan.Plo"; else rm -f "$(DEPDIR)/sc_boss_illidan.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scripts/custom/sc_boss_illidan.cpp' object='sc_boss_illidan.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sc_boss_illidan.lo `test -f 'scripts/custom/sc_boss_illidan.cpp' || echo '$(srcdir)/'`scripts/custom/sc_boss_illidan.cpp
+
+sc_flame_of_azzinoth.lo: scripts/custom/sc_flame_of_azzinoth.cpp
+@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sc_flame_of_azzinoth.lo -MD -MP -MF "$(DEPDIR)/sc_flame_of_azzinoth.Tpo" -c -o sc_flame_of_azzinoth.lo `test -f 'scripts/custom/sc_flame_of_azzinoth.cpp' || echo '$(srcdir)/'`scripts/custom/sc_flame_of_azzinoth.cpp; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/sc_flame_of_azzinoth.Tpo" "$(DEPDIR)/sc_flame_of_azzinoth.Plo"; else rm -f "$(DEPDIR)/sc_flame_of_azzinoth.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scripts/custom/sc_flame_of_azzinoth.cpp' object='sc_flame_of_azzinoth.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sc_flame_of_azzinoth.lo `test -f 'scripts/custom/sc_flame_of_azzinoth.cpp' || echo '$(srcdir)/'`scripts/custom/sc_flame_of_azzinoth.cpp
+
sc_guard_bluffwatcher.lo: scripts/guard/sc_guard_bluffwatcher.cpp
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sc_guard_bluffwatcher.lo -MD -MP -MF "$(DEPDIR)/sc_guard_bluffwatcher.Tpo" -c -o sc_guard_bluffwatcher.lo `test -f 'scripts/guard/sc_guard_bluffwatcher.cpp' || echo '$(srcdir)/'`scripts/guard/sc_guard_bluffwatcher.cpp; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/sc_guard_bluffwatcher.Tpo" "$(DEPDIR)/sc_guard_bluffwatcher.Plo"; else rm -f "$(DEPDIR)/sc_guard_bluffwatcher.Tpo"; exit 1; fi

Index: src/bindings/universal/ScriptMgr.cpp
================================================== =================
--- src/bindings/universal/ScriptMgr.cpp (revision 106)
+++ src/bindings/universal/ScriptMgr.cpp (working copy)
@@ -51,6 +51,8 @@
// -- Custom --
extern void AddSC_custom_example();
extern void AddSC_test();
+extern void AddSC_boss_illidan();
+extern void AddSC_flame_of_azzinoth();

// -- GO --
extern void AddSC_go_teleporter();
@@ -447,6 +449,8 @@
// -- Custom --
AddSC_custom_example();
AddSC_test();
+ AddSC_boss_illidan();
+ AddSC_flame_of_azzinoth();

// -- GO --
AddSC_go_teleporter();
Index: scripts/custom/boss_illidan.cpp
================================================== =================
--- src/bindings/universal/scripts/custom/boss_illidan.cpp (revision 0)
+++ src/bindings/universal/scripts/custom/boss_illidan.cpp (revision 0)
@@ -0,0 +1,361 @@
+#include "../sc_defines.h"
+
+
+
+#define SPELL_SOULDRAIN 41303
+#define SPELL_FLAMEBREATH 18435
+#define SPELL_CLEAVE 26350
+#define SPELL_FIREBALL 20692
+#define SPELL_DEEPBREATH 18596
+#define SPELL_FLAMECRASH 40836
+
+#define SOUND_LIFT_OFF_ILLIDAN 11551
+#define SOUND_UNPREPARED_ILLIDAN 11466
+#define SOUND_MINIONS_ILLIDAN 11465
+#define SOUND_TOOEASY_ILLIDAN 11472
+#define SOUND_NEXT_ILLIDAN 11473
+#define SOUND_TIME_ILLIDAN 11474
+#define SOUND_DEATH_ILLIDAN 11478
+#define SOUND_EYES_ILLIDAN 11481
+#define SOUND_FLAMES_ILLIDAN 11480
+#define SOUND_LAND_ILLIDAN 11550
+
+//These spells below arn't supported in the core yet
+#define SPELL_SUMMONMINION 17646
+#define SPELL_SUMMON_MULTI_MINIONS 20171
+
+#define SAY_AGGRO "You are not prepared!"
+#define SAY_KILL "Who shall be next to taste my blades?!"
+#define SAY_KILL_2 "This is too easy!"
+#define SAY_PHASE_2_TRANS "Behold the flames of Azzinoth!"
+#define SAY_PHASE_3_TRANS "You've wasted too much time mortals, now you shall fall!"
+
+struct MANGOS_DLL_DECL boss_illidanAI : public ScriptedAI
+{
+ boss_illidanAI(Creature *c) : ScriptedAI© {EnterEvadeMode();}
+
+ uint32 swingcounter;
+ uint32 flamebreath_timer;
+ uint32 cleave_timer;
+ uint32 tailsweep_timer;
+ uint32 movement_timer;
+ uint32 fireball_timer;
+ uint32 whelpspawn_timer;
+ uint32 flamecrash_timer;
+ uint32 reset_timer;
+ uint32 phase;
+ bool Summoned;
+ bool inCombat;
+ Creature *Minion1;
+ Creature *Minion2;
+
+ void EnterEvadeMode()
+ {
+ swingcounter = 0;
+ flamebreath_timer = 20000;
+ cleave_timer = 15000;
+ tailsweep_timer = 10000;
+ movement_timer = 10000;
+ fireball_timer = 5000;
+ whelpspawn_timer = 45000;
+ flamecrash_timer = 0;
+ phase = 1;
+ inCombat = false;
+ Summoned = false;
+
+ m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
+ m_creature->SetHover(false);
+ (*m_creature)->Clear(false);
+ m_creature->RemoveAllAuras();
+ m_creature->DeleteThreatList();
+ m_creature->CombatStop();
+ DoGoHome();
+ }
+
+ void KilledUnit(Unit* victim)
+ {
+ if (rand()%5)
+ return;
+
+ DoYell(SAY_KILL,LANG_UNIVERSAL,NULL);
+ DoPlaySoundToSet(m_creature,SOUND_NEXT_ILLIDAN);
+ }
+
+ void AttackStart(Unit *who)
+ {
+ if (!who)
+ return;
+
+ if (who->isTargetableForAttack() && who != m_creature)
+ {
+ //Begin attack
+ DoStartMeleeAttack(who);
+
+ if (!inCombat)
+ {
+
+ //Initial aggro speach
+ DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL);
+ DoPlaySoundToSet(m_creature,SOUND_UNPREPARED_ILLID AN);
+ inCombat = true;
+ }
+ }
+ }
+
+ void MoveInLineOfSight(Unit *who)
+ {
+ if (!who || m_creature->getVictim())
+ return;
+
+ if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ {
+ float attackRadius = m_creature->GetAttackDistance(who);
+ if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who))
+ {
+ if(who->HasStealthAura())
+ who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
+
+ //Begin attack
+ DoStartMeleeAttack(who);
+
+
+ if (!inCombat)
+ {
+
+ //Initial aggro speach
+ DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL);
+ DoPlaySoundToSet(m_creature,SOUND_UNPREPARED_ILLID AN);
+ inCombat = true;
+ }
+ }
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ //Return since we have no target
+ if (!m_creature->SelectHostilTarget())
+ return;
+
+ //Check if we have a current target
+ if( m_creature->getVictim() && m_creature->isAlive())
+ {
+ //Cast phase 1 spells in phase 1 and phase 3
+ if (phase == 1 || phase == 3)
+ {
+ //Flamebreath every 15 seconds
+ if (flamebreath_timer < diff)
+ {
+ DoCast(m_creature->getVictim(),SPELL_FLAMEBREATH);
+ flamebreath_timer = 15000;
+
+ }else flamebreath_timer -= diff;
+
+ //Cleave every 20 seconds
+ if (cleave_timer < diff)
+ {
+ DoCast(m_creature->getVictim(),SPELL_CLEAVE);
+ cleave_timer = 20000;
+
+ }else cleave_timer -= diff;
+
+ }
+
+ //Phase 2 only spells
+ if (phase == 2)
+ {
+ //Replay the take off animation if we arn't hovering
+ if (!m_creature->isHover())
+ {
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ m_creature->SetHover(true);
+ }
+
+ //Random movement every 10 seconds
+ if (movement_timer < diff)
+ {
+ //Inturrupt whatever we are casting then move to random position
+ m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
+ uint32 position = rand()%10;
+
+ switch (position)
+ {
+
+ case 0:
+ SpecialMove(720.4780,307.580,352.9960,5000);
+ m_creature->Relocate(720,308,353,0);
+ break;
+
+ case 1:
+ SpecialMove(680.2620,262.2810,352.9961,5000);
+ m_creature->Relocate(680,262,353,0);
+ break;
+
+ case 2:
+ SpecialMove(679.4058,350.0266,352.9962,5000);
+ m_creature->Relocate(679,350,353,0);
+ break;
+
+ case 3:
+ SpecialMove(662.0708,306.3464,354.0381,5000);
+ m_creature->Relocate(662,306,354,0);
+ break;
+
+ case 4:
+ SpecialMove(695.253,327.1915,353.8207,5000);
+ m_creature->Relocate(695,327,354,0);
+ break;
+
+ case 5:
+ SpecialMove(698.2879,281.578,353.6456,5000);
+ m_creature->Relocate(698,282,354,0);
+ break;
+
+ case 6:
+ SpecialMove(696.0041,305.4435,354.2822,5000);
+ m_creature->Relocate(696,305,354,0);
+ break;
+
+ case 7:
+ SpecialMove(676.5214,305.2098,353.1921,5000);
+ m_creature->Relocate(677,305,353,0);
+ break;
+
+ case 8:
+ //1 in 10 chance that we cast flamecrash instead of moving
+ DoTextEmote("gets a green aura around his eyes...",NULL);
+ DoYell("Stare into the eyes of the Betrayer!", LANG_UNIVERSAL,NULL);
+ DoPlaySoundToSet(m_creature,SOUND_EYES_ILLIDAN);
+ break;
+
+ case 9:
+ //1 in 10 chance that we summon minions instead of moving
+ //Spawn some NPC's
+ if ( !Summoned)
+
+ {
+
+ Unit* target = NULL;
+ target = SelectUnit(SELECT_TARGET_RANDOM,0);
+
+ //Cast
+ Minion1 = m_creature->SummonCreature(22997,676,330,354,4,TEMPSUMMON_TIME D_OR_CORPSE_DESPAWN,300000);
+ ((CreatureAI*)Minion1->AI())->AttackStart(target);
+ Minion2 = m_creature->SummonCreature(22997,676,279,354,2,TEMPSUMMON_TIME D_OR_CORPSE_DESPAWN,300000);
+ ((CreatureAI*)Minion2->AI())->AttackStart(target);
+ Summoned = true;
+ }
+ break;
+
+
+ }
+
+ DoCast(m_creature,11010);//hover?
+ movement_timer = 10000;
+ }else movement_timer -= diff;
+
+ //Random fireball every 5 seconds
+ if (fireball_timer < diff)
+ {
+ //Should be a random target but since we don't really have a hatelist just do it on current target
+ DoCast(m_creature->getVictim(),SPELL_FIREBALL);
+ fireball_timer = 50000;
+ }else fireball_timer -= diff;
+
+
+ }
+
+ //Phase 3 only spells
+ if (phase == 3)
+ {
+ //Flame Crash - Not supported by core, but do cool animation. 10-30 seconds in phase 3
+ if (flamecrash_timer < diff && phase == 3)
+ {
+ DoCast(m_creature->getVictim(),SPELL_FLAMECRASH);
+ flamecrash_timer = 10000 + rand()%20000;
+ }else flamecrash_timer -= diff;
+ }
+
+ //Phase 1 to Phase 2 transition at 60%
+ if ( phase == 1 && (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 60)
+ {
+ phase = 2;
+ m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ (*m_creature)->Clear(false);
+ (*m_creature)->Idle();
+ DoCast(m_creature,11010);//hover?
+ m_creature->SetHover(true);
+ DoYell(SAY_PHASE_2_TRANS,LANG_UNIVERSAL,NULL);
+ DoPlaySoundToSet(m_creature,SOUND_FLAMES_ILLIDAN);
+ }
+
+ //Phase 2 to Phase 3 transition at 40%
+ if ( phase == 2 && (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40)
+ {
+ phase = 3;
+ m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
+ //m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_STATE_STA ND);
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
+ m_creature->SetHover(false);
+ (*m_creature)->Clear(false);
+ (*m_creature)->Mutate(new TargetedMovementGenerator(*m_creature->getVictim()));
+ DoYell(SAY_PHASE_3_TRANS,LANG_UNIVERSAL,NULL);
+ DoPlaySoundToSet(m_creature,SOUND_TIME_ILLIDAN);
+ }
+
+ //If we are within range melee the target and not in phase 2
+ if( phase!=2 && m_creature->getVictim() && m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
+ {
+ if( m_creature->isAttackReady() )
+ {
+ m_creature->AttackerStateUpdate(m_creature->getVictim());
+ m_creature->resetAttackTimer();
+
+ //Do a soul drain once every 12 attacks (Phase1&3)
+ if (swingcounter > 12 && m_creature->getVictim())
+ {
+ DoCast(m_creature->getVictim(),SPELL_SOULDRAIN);
+ swingcounter = 0;
+ }else swingcounter++;
+ }
+ }
+ }
+ }
+
+ void SpecialMove(float X, float Y, float Z, uint32 Time)
+ {
+ WorldPacket data( SMSG_MONSTER_MOVE, (41+m_creature->GetPackGUID().size()) );
+ data.append(m_creature->GetPackGUID());
+
+ data << m_creature->GetPositionX() << m_creature->GetPositionY() << m_creature->GetPositionZ();
+ // unknown field - unrelated to orientation
+ // seems to increment about 1000 for every 1.7 seconds
+ // for now, we'll just use mstime
+ data << getMSTime();
+
+ data << uint8(0); // walkback when walking from A to B
+ data << uint32(0x0200); // flags
+ /* Flags:
+ 512: Floating, moving without walking/running
+ */
+ data << Time; // Time in between points
+ data << uint32(1); // 1 single waypoint
+ data << X << Y << Z; // the single waypoint Point B
+ m_creature->SendMessageToSet( &data, true );
+ }
+};
+CreatureAI* GetAI_boss_illidanAI(Creature *_Creature)
+{
+ return new boss_illidanAI (_Creature);
+}
+
+
+void AddSC_boss_illidan()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name="boss_illidan";
+ newscript->GetAI = GetAI_boss_illidanAI;
+ m_scripts[nrscripts++] = newscript;
+}
Index: src/bindings/universal/scripts/custom/flame_of_azzinoth.cpp
================================================== =================
--- src/bindings/universal/scripts/custom/flame_of_azzinoth.cpp (revision 0)
+++ src/bindings/universal/scripts/custom/flame_of_azzinoth.cpp (revision 0)
@@ -0,0 +1,111 @@
+/* Copyright © 2006,2007 universal <https://universal.svn.sourceforge.net/>
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include "../sc_defines.h"
+
+#define SPELL_FIRES1 40598
+
+
+struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI
+{
+ flame_of_azzinothAI(Creature *c) : ScriptedAI© {EnterEvadeMode();}
+
+ uint32 Fire_Timer;
+ bool InCombat;
+
+ void EnterEvadeMode()
+ {
+ Fire_Timer = 5000;
+ InCombat = false;
+
+ m_creature->RemoveAllAuras();
+ m_creature->DeleteThreatList();
+ m_creature->CombatStop();
+ DoGoHome();
+ }
+
+ void AttackStart(Unit *who)
+ {
+ if (!who)
+ return;
+
+ if (who->isTargetableForAttack() && who!= m_creature)
+ {
+ //Begin melee attack if we are within range
+ DoStartMeleeAttack(who);
+ InCombat = true;
+ }
+ }
+
+ void MoveInLineOfSight(Unit *who)
+ {
+ if (!who || m_creature->getVictim())
+ return;
+
+ if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ {
+ float attackRadius = m_creature->GetAttackDistance(who);
+ if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who))
+ {
+ if(who->HasStealthAura())
+ who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
+
+ DoStartMeleeAttack(who);
+ InCombat = true;
+
+ }
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ //Return since we have no target
+ if (!m_creature->SelectHostilTarget())
+ return;
+
+ //Check if we have a current target
+ if( m_creature->getVictim() && m_creature->isAlive())
+ {
+
+ //Fire_Timer
+ if (Fire_Timer < diff)
+ {
+ //Cast
+ DoCast(m_creature->getVictim(),SPELL_FIRES1);
+
+ //30 seconds
+ Fire_Timer = 10000;
+ }else Fire_Timer -= diff;
+
+ //If we are within range melee the target
+ DoMeleeAttackIfReady();
+ }
+ }
+};
+CreatureAI* GetAI_flame_of_azzinoth(Creature *_Creature)
+{
+ return new flame_of_azzinothAI (_Creature);
+}
+
+
+void AddSC_flame_of_azzinoth()
+{
+ Script *newscript;
+ newscript = new Script;
+ newscript->Name="flame_of_azzinoth";
+ newscript->GetAI = GetAI_flame_of_azzinoth;
+ m_scripts[nrscripts++] = newscript;
+}


не забываем говорить спасибо!
тех поддержка по серверам WoW 464-379-838
 
XxMARSxXДата: Пятница, 29.02.2008, 10:18:13 | Сообщение # 3
Вечно злой админ
Сообщений: 706
Награды: 16
давайте разберемся что мы тут будем выкладывать, скрипты на WoW, макросы для WoW, патчи для WoW, просто скрипты?
 
magi4kaДата: Пятница, 29.02.2008, 13:03:21 | Сообщение # 4
Рядовой
Сообщений: 6
Награды: 0
скрипты на WoW, макросы для WoW думаю вот так лутьше будет happy

Добавлено (29.02.2008, 13:03:21)
---------------------------------------------
Народ а кстати как боссов редидактировать через какие проги или в каком файле?


Ля - ля - ля
 
XxMARSxXДата: Пятница, 29.02.2008, 18:36:42 | Сообщение # 5
Вечно злой админ
Сообщений: 706
Награды: 16
Quote (magi4ka)
скрипты на WoW

а толку?
не все скрипты рабоатют сдруг с другом, или с определенной базой а так же ядром... могу отдельно выкладывать скрипты карателя (ну или которые каратель использует в своих сборках)
 
Jedi23Дата: Понедельник, 03.03.2008, 16:10:20 | Сообщение # 6
Майор
Сообщений: 139
Награды: 0
Это скорее патч для ядра на ScripDev2.

не забываем говорить спасибо!
тех поддержка по серверам WoW 464-379-838
 
Форум » World of Warcraft » Сервер » СКРИПТЫ (test)
  • Страница 1 из 1
  • 1
Поиск: