ArcEmu: [lua] Valithria Dreamwalker - 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

[lua] Valithria Dreamwalker Work in Progress

#1 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 03 May 2010 - 01:40 AM

Paroxysm said he wanted some commit-worthy Lua, so here's my attempt. It doesn't work atm, and it probably has errors when the server starts up, but I'm wondering if it is on its way to svn worthyfulness. Hopefully I'll be done with it tomorrow, but I know how everything works in my head and never translates well at run time.

http://gambini.pastebin.com/Pzf98VZM

Yes, lots of it is chicken scratch. Like I said, work in progress; I just type stuff out as I think it.

I'll probably continue to work on this regardless, so if you have any insight as to some mechanics that wouldn't be blatantly obvious, please say something. Or if you have the yells and sound ids for this encounter in a copypastable format, I wouldn't mind that either :P.
0

#2 User is offline   paroxysm 

  • Chatty Cathy
  • Group: Retired
  • Posts: 320
  • Joined: 25-June 08
  • Gender:Male
  • Server OS:Windows

Posted 03 May 2010 - 07:35 PM

The code looks fine except I think you over complicating the timers. Simple timer variables would suffice very well for any timer.
As for how you store the Unit by it's direct userdata, it is kind of unsafe because if someone like a GM or admin was to delete the held creature, that userdata will be valid and you will try to invoke a method from that will still work. However since the actual creature pointer has been deleted, it will crash the server because you will be trying to access a freed memory address. If you must store the unit, you can keep a guid of the DreamWalker unit and retrieve it by GetUnitByGUID method. Other than that, your concept behind your work is well developed. This is my book is commit worthy after that potential vulnerability is fixed.
0

#3 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 03 May 2010 - 09:02 PM

I'll get the GUID thing done, never occurred to me that it could happen.

And about the timers: If I'm not doing/learning something new, then I feel like I am "doing it wrong".

I have been intrigued about classes in Lua for a while, but never found a practical use for them while scripting mobs. It is practical here because most of the timers decrease in time in relation to their original time, which is hard to do without making another variable to say what the original time was. (I assume it is possible with quantum physics, the LHC, and a master's degree in finite mathematics). So, I am learning something new in a practical way.
0

#4 User is offline   paroxysm 

  • Chatty Cathy
  • Group: Retired
  • Posts: 320
  • Joined: 25-June 08
  • Gender:Male
  • Server OS:Windows

Posted 03 May 2010 - 09:14 PM

I like the timer approach concept, it's very clever. However, you allocate some overhead by doing it this way, rather than simply access a data variable in memory and manipulate this data, you end up allocating a table(which are implemented as hash tables C side) and several methods for that table. The more scripts that utilize this timer class will also increase the overhead which can get to add up such as the moon++ base class. To me, it looks your trying to implement C++ practices in Lua which would be great for libraries. However, you have to weigh between efficiency and functionality.
0

#5 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 04 May 2010 - 02:28 AM

Updated the first post.

As usual, a roadblock came up while I was testing this: I can't heal Dreamwalker. Kind of an important part in an encounter where you heal the boss to full instead of kill it, if you ask me. I'm guessing it is a database issue, but I can't pinpoint the differences between the guards in Stormwind and Dreamwalker, but I am able to heal the guards. I wouldn't mind some help on this before I smash my head through my desk :D.

I also can't get Dreamwalker in combat when I engage the mobs around her, though I assume that putting a heal on her while I'm in combat will put her in combat.

There's also something I want to do, though it might not be able to be done: On retail, Dreamwalker is part of your group. She can be beacon-ed, chain healed (and bounce to someone in the raid), and all of the other raid group-dependent heals. Is it possible to stick her in the player's raid group? She also gets health frame, as you can see right under the minimap in http://www.youtube.c...h?v=LEipp3dDR9I . Possible or no?
0

#6 User is offline   Hoedje 

  • Member
  • Pip
  • Group: Members
  • Posts: 24
  • Joined: 01-May 10
  • Gender:Male

Posted 05 May 2010 - 04:56 AM

Its like this, This boss Has to be HEALED at the begin, it starts on 50%^HP Friendley, you guys have to make it 100% HP In order to activate the fight.
during the Healing part she also does some aoes.
she wont be in the Grp shes just friendley :D
0

#7 User is offline   Shadoxfix 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 312
  • Joined: 30-December 09
  • Gender:Male
  • Location:Netherlands

Posted 05 May 2010 - 05:32 AM

View PostHoedje, on 05 May 2010 - 04:56 AM, said:

Its like this, This boss Has to be HEALED at the begin, it starts on 50%^HP Friendley, you guys have to make it 100% HP In order to activate the fight.
during the Healing part she also does some aoes.
she wont be in the Grp shes just friendley :D

Wrong the fight starts as you enter the room the you need to heal the boss to "win" the fight.
0

#8 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 05 May 2010 - 02:14 PM

Ya, except I am unable to cast any healing spells on her at the moment. I can't pinpoint why I can't, so if anyone has any ideas, then please let me know. Playing with stuffs in creature_proto right now.

And, updating original post, though not a large update. The only things left to do are to finish the Archmage script, Start Dreamwalker at 50%, figure out how to get her healed, then I can get working on the portals and whatnot. And then I test and see how badly I messed up.
0

#9 User is offline   paroxysm 

  • Chatty Cathy
  • Group: Retired
  • Posts: 320
  • Joined: 25-June 08
  • Gender:Male
  • Server OS:Windows

Posted 05 May 2010 - 08:54 PM

Perhaps look at the heal spell effects code and find which requirement it fails to meet.
0

#10 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 10 May 2010 - 02:22 PM

I couldn't find anything in any of the spell files, and I've changed pretty much everything in creature_proto and creature_spawns that I understand, and I still can't heal her. Unfortunately, I'm giving up. If someone feels like finding out how to heal her, then I will pick this up again. Until then, I'll go start doing Lady Deathwhisper.

Added latest script to the first post.
0

#11 User is offline   Nature 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 124
  • Joined: 30-November 09
  • Gender:Male
  • Interests:C++, video editing, games

Posted 17 May 2010 - 06:46 AM

She needs to have the same faction as the healer
then she can be healed
0

#12 User is offline   kjanko 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 171
  • Joined: 10-August 09
  • Gender:Male

Posted 05 July 2010 - 07:48 AM

View Postgambini, on 10 May 2010 - 02:22 PM, said:

I couldn't find anything in any of the spell files, and I've changed pretty much everything in creature_proto and creature_spawns that I understand, and I still can't heal her. Unfortunately, I'm giving up. If someone feels like finding out how to heal her, then I will pick this up again. Until then, I'll go start doing Lady Deathwhisper.

Added latest script to the first post.


local plr = Unit:GetRandomPlayer(0))
local faction = plr:GetFaction()
Unit:SetFaction(faction)
Unit:SetHealthPct(50)

This should work. Sorry If I necroposted too much.
Posted Image
0

#13 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 14 July 2010 - 12:07 AM

Okay, after I had long forgotten this, I was flying around and thought, "Hey, maybe I can heal dreamwalker again." Short story: I couldn't.

Here's what I figured out though. I went to SW and healed one of the guards there. Then, I spawned the same guard in ICC, and was unable to heal it. So my conclusion is that you can not heal NPCs in instances. Why?
0

#14 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 15 July 2010 - 07:05 AM

Are you able to heal the boss if you spawn it outside of the instance though? In that case, you could finish the script, and maybe the core devs here would be able to make healing NPC's in instances work.
0

#15 User is offline   gambini 

  • Member
  • Pip
  • Group: Members
  • Posts: 69
  • Joined: 24-October 08

Posted 20 July 2010 - 09:21 PM

Okay I figured it out (thanks to andy on irc). There's a client-side thing that stops you from healing non-pvp flagged units or something to that effect. So, after about 30 minutes, I figured out that
Unit:SetByteValue(UNIT_FIELD_BYTES_2, 1, 0x01)
Would make her healable. Hooray! Script going into development again.
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