ArcEmu: [scripting] Ebon Hold - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[scripting] Ebon Hold

#1 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 23 February 2010 - 10:04 AM

Well i just started to do this zone a lil bit more blizzlike, since no one care about it :)

Big NOTE this is just from phase 1. And you need to have good DB of course.

Included updates:
  • Taxipath down from the acherus is available after completing Q 12670 (also available when u are doing this quest, bcs in this quest you need to go down.)
  • AcherusSoulPrison scripted updated a bit, you dont need to get credits right after you make creature attackable
  • Added support for Q Death's Challenge, end of dueling with npc causing crashes
  • When u start Q Into the realm of shadows, you get spell 52693 casted on you. Also added Lich King voice to the end of this quest, also when u finish this quest by getting acherus charger from any of DKs around (its vehicle so this part doesnt work now) you have in panel (vehicle panel) spell for ending this quest, this spell call up image of Salanar, which tell you about returning to normal world.
  • Added Lich King voices after accepting Q In Service Of Lich King.
  • Added gossip script for Salanar - when you have quest Into The realm of shadows, he offers you returning back into realm of shadow (simple casting spell on you) - this doesnt work because he has also quests and i dont know how to figure out have quest menu + gossip at one time
  • Added CitizenAI, MinerAI, PeasantAI and CanonAI
    • CitizenAI - there is a chance they will not fight you and just cover - a bit broken sometimes they enter combat more than 5 times and than just stay in combat mode, i am not sure what is causing this, maybe it call smsg_AttackStop before smsg_AttackStart ? Anyway i added alot of cool Lich King voices which appears when some citizen start covering
    • MinerAI - most of the work on them is in DB (formation with mine car and waypoints) anyway this script despawn them after reaching last waypoint, and yes this is blizzlike, they respawn after short time back in mine
    • PeasantAI - working fine, when u start attacking them they will start too, but after short time they will send and cool message, start covering and stop attacking you
    • CanonAI - just disabled moving



NOTES: i need t ofigure out how to send areatrigger message and wide screen message just for 1 player, i think its just any kind of chat MSG, dunno i didnt tested it.

Uff... PS Excuse me for my english :P

http://arcemu.pastebin.com/JLLEhjCm

Attached File(s)


Posted Image
2

#2 User is offline   inunes 

  • Newbie
  • Group: Members
  • Posts: 1
  • Joined: 22-November 08
  • Gender:Male

Posted 24 February 2010 - 02:36 PM

Amazing work :P Trying to compile now.
1

#3 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 25 February 2010 - 12:47 AM

thanks atleast for your reply, its amazing that after 16 downloads you re first
Posted Image
0

#4 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 25 February 2010 - 01:42 AM

Well i just patched it in and got to test it.

It aint that when i DL a patch i immediatly go and patch up and give some nonsense comment, anyways..

Dk sounds nice xD, on Quests accept it will sound the Lich, also the gryphons work nicely without interference, when i did the Quest where i get the shadowy realm i'm not sure what i am looking for to return to the normal world since i saw horses and all but no way without clicking the debuff away. That might what you say here:

Quote

Added gossip script for Salanar - when you have quest Into The realm of shadows, he offers you returning back into realm of shadow (simple casting spell on you) - this doesnt work because he has also quests and i dont know how to figure out have quest menu + gossip at one time


Isn't that the npc should have Npcflags 3 and some entry in npc_text ?

Did not get to the mining stuff yet, but this far all seems nice working, thanks for sharing this MesoX.

Please allow some time to really test things xD :P
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#5 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 25 February 2010 - 08:57 AM

in that Q Into The realm of shadows you get buff casted on you, which will modify your phase to 32 so you will see only some wirds knights on their horses and some shades, after killing one of these knights, you will get their horse (as vehicle) and that vehicle has a spell, which will call that image of Salanar, which will tell you you can return to normal buff, than on blizz i just clicked on buff and it returned me to normal phase.

About gossip, that npc allready has npc_text row and works fine without gossip script (he say what he wants to say and than offer you Q) but i want to add gossip item into that menu and i am unsure how


Btw maybe i can make WhyDB test server where are all these changes included and done.
Posted Image
0

#6 User is offline   Garvey 

  • is a cool guy
  • Group: Super Moderator
  • Posts: 331
  • Joined: 23-November 09
  • Gender:Male
  • Location:England
  • Server OS:Windows

Posted 25 February 2010 - 09:31 AM

I've had a go at the Death's Challenge script myself and have managed to get it working ok. Just not sure how blizzlike it is, at the moment the duel stops when the NPC reaches 20% health but there's no duel flag or anything.

Anyway here's the code:

CustomFixes.cpp

// Custom Quest Fixes. 
// Copyright (c) 2010 Garvey
/****************************************************************************
 * This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0
 * License. To view a copy of this license, visit
 * http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons,
 * 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
 *
 * EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU
 * ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
 * ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 *
 */
#include "StdAfx.h"
#include "Setup.h"
#include "../Common/EasyFunctions.h"
////// Death's Challenge - http://www.wowhead.com/?quest=12733

class DKInitiateAI : public CreatureAIScript
{
public:
	ADD_CREATURE_FACTORY_FUNCTION(DKInitiateAI);
	DKInitiateAI(Creature* pCreature) : CreatureAIScript(pCreature) {}

	//void OnDied( Unit* pKiller);
void OnCombatStart(Unit* mTarget)
{
	
	_unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "I'm going to tear your heart out, cupcake!");
	RegisterAIUpdateEvent(1000);
}

void AIUpdate() {

	if(_unit->GetHealthPct() <= 20)
	{
		_unit->GetAIInterface()->WipeTargetList();         
		_unit->GetAIInterface()->WipeHateList();
        _unit->GetAIInterface()->HandleEvent( EVENT_LEAVECOMBAT, _unit, 0);
        _unit->GetAIInterface()->disable_melee = true;
        _unit->GetAIInterface()->SetAllowedToEnterCombat(false);
		_unit->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE , 2084);
		_unit->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
		
	}

}

void OnCombatStop(Unit* mTarget) {
	float SSX = _unit->GetPositionX();
	float SSY = _unit->GetPositionY();
	float SSZ = _unit->GetPositionZ();

	Player* plr = _unit->GetMapMgr()->GetInterface()->GetPlayerNearestCoords(SSX, SSY, SSZ); // Borked
	if(plr != NULL) 
	{
		QuestLogEntry* qle = plr->GetQuestLogForEntry(12733);
		if(qle != NULL)
		{
			uint32 iMobCount = qle->GetMobCount(0);

			qle->SetMobCount(0, (iMobCount + 1));
			qle->SendUpdateAddKill(0);
			qle->UpdatePlayerFields();
		}
	}
	RemoveAIUpdateEvent();
}

void Destroy()
{
	delete this;
}
	
};

void SetupDKInitiate( ScriptMgr* mgr )
{
	mgr->register_creature_script( 28406, &DKInitiateAI::Create );
}


And I added in QuestGossip.cpp:

class DKInitiate : public GossipScript
{
public:
	void GossipHello(Object* pObject, Player* plr, bool AutoSend)
	{
		GossipMenu *Menu;
		if(plr->GetQuestLogForEntry(12733))
		{
			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 13433, plr);
			Menu->AddItem(0, "I Challenge you!", 1);
			Menu->SendTo(plr);
		}
	}

	void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * Code)
	{
		Creature*  pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?(TO_CREATURE(pObject)):NULL;
		if(pObject==NULL)
			return;

		switch(IntId)
		{
		case 0: // Return to start
			GossipHello(pCreature, plr, true);
			break;
		case 1: // Attack
			{
				plr->SendChatMessage(CHAT_MSG_SAY, LANG_UNIVERSAL, "I'm going to tear your heart out, cupcake!");
				pCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE , 14);
				pCreature->GetAIInterface()->SetNextTarget(plr);
				pCreature->GetAIInterface()->AttackReaction(plr, 1, 0);
				pCreature->GetAIInterface()->disable_melee = false;
				pCreature->GetAIInterface()->SetAllowedToEnterCombat(true);
			}
			break;
		}
	}

	void Destroy()
	{
		delete this;
	}
};


Maybe it will be of some use, maybe not :)
But I, being poor, have only my dreams;
I have spread my dreams under your feet;
Tread softly because you tread on my dreams.
0

#7 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 25 February 2010 - 10:08 AM

I tried it on blizz and its a bit different, thats why i am looking for widescreen message, but just for 1 player which is challenging DK, it normals says counting (As 3..2..1.. etc., also dual flag is spawned, but for dual flag spawn we can use those values used for spawn duel flag while 2 players are dueling)
Posted Image
0

#8 User is offline   Darkgroom 

  • Interested
  • Group: Banned
  • Posts: 440
  • Joined: 05-February 09
  • Gender:Male
  • Location:im coming from planet wizzzzz.
  • Interests:VB.net, PHP, C++, C#, girls

Posted 25 February 2010 - 11:07 AM

isnt that widescreen msg flag 41?

CHAT_MSG_RAID_WARNING = 40,
CHAT_MSG_RAID_WARNING_WIDESCREEN = 41,

and then just make someway it only sends to 1 player or maybe it does that already.

#9 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 25 February 2010 - 11:18 AM

Isn't raid warning in red (or orange) color? i need this one:

(screen taken from oficial server)


Posted Image
0

#10 User is offline   Azolex 

  • Member
  • Group: Contributor
  • Posts: 54
  • Joined: 08-August 08
  • Gender:Male
  • Location:Serbia
  • Interests:Music, Computers, School and Girls!

Posted 25 February 2010 - 12:08 PM

That is raid warning :), great job, did you script that quest with floating eye? Thanks for this ill check it soon. Regards.
Posted Image
0

#11 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 25 February 2010 - 01:04 PM

well ok gonna script that Q with death's challenge :)

to azolex: no i didnt tried it yet, i need to modify core for it, at least someone should finally commit my core changes posted in patch submission (or atleast check them and give any error report)


Edit: its not raid warning, but i cant find any correct so i will use it as base, this isnt so much which color message has.
Posted Image
0

#12 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 25 February 2010 - 05:00 PM

Updated with script for dual creatures.

1 Big note, its causing crashes when creature despawn and i dont know why :/

Can somebody help me poiting me what i did wrong? for complete patch check first post.

Now also with core patch needed.

Edit: http://arcemu.pastebin.com/JLLEhjCm crashing on line 328 ( not real here, crashing somewhere in EventMgr, try it yourself and debug )
Posted Image
0

#13 User is offline   alynadulcik 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 29-August 10
  • Gender:Female

Posted 29 August 2010 - 01:02 PM

can anyone help me and tell meh where to put this scripts? plz
0

#14 User is offline   lesone 

  • Enthusiast
  • Group: Retired
  • Posts: 294
  • Joined: 07-June 08
  • Gender:Male
  • Location:Zpain
  • Interests:Programming--
  • Server OS:Windows

Posted 29 August 2010 - 10:59 PM

View Postalynadulcik, on 29 August 2010 - 01:02 PM, said:

can anyone help me and tell meh where to put this scripts? plz


well you should learn how works tortoiseSVN.

Use Apply patch function in your file. (File needs to be located in your arcemu SVN folder).

Later compile it like always.

lesone-
Posted Image
0

#15 User is offline   Sdyess94 

  • Member
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 10-August 08

Posted 30 August 2010 - 04:36 PM

loldelete
0

#16 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 31 August 2010 - 04:17 AM

View PostSdyess94, on 30 August 2010 - 04:36 PM, said:

loldelete


i guess you resolved that issue with the despawning then ?
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users