[LuaEngine] LuaHypArc
#21
Posted 15 September 2009 - 11:39 PM
#22
Posted 15 September 2009 - 11:52 PM
Now at: Version 1057
Changelog
1022 - 1057 Changelog: ++Hale->Unit:AggroWithInRangeFriends ++Hype->Plyr:GetPrimaryCombatTarget ++Hype->Unit:MoveRandomArea ++Hype->Plyr:SendLootWindow ++Hype->Item:GetGUID ++Hype->Item:GetRawGUID ++Hype->Unit:GetRawGUID ++Hype->Unit:AddLoot ++Hype->GObj:AddLoot ++Hype->Item:AddLoot ++Hype->Unit:SetPacified ++Hype->Unit:GetUnitByRawGUID ++Hype->GObj:GetRawGUID **Hype->GetGameTime is now a global function. You will receive a log warning on using the deprecated functions. ++Hype->Unit:PlaySpellVisualByRawGUID - Experimental - receiving strange results. **Removed Unit-only requirements from many functions. See code for specifics. ++Hype->Unit:SpawnVehicle ++Hype->Plyr:SetVehicle ++Hype->Plyr:GetVehicle ++Hype->Plyr:RemoveFromVehicle ++Hype->Plyr:GetVehicleSeat ++Hype->Unit:IsVehicle ++Hype->Unit:GetPassengerCount ++Hype->Unit:MoveVehicle **Note on vehicle commands - ArcEmu is pretty dodgy at the moment on them so they some don't work correctly. But when ArcEmu update vehicles, these will work.Please see Commands list included with the update for full description. Update instructions are same as installation - extract to \trunk\, run install.bat, it'll overwrite.
I'll put out some notes on GetRawGUID in the main post later if you're confused. But for now enjoy the loot and vehicles ^_^
#23
Posted 16 September 2009 - 12:26 AM
Quote
also, what is 'Type'? --holy, shadow, physical, fire, etc?
#24
Posted 16 September 2009 - 12:27 AM
I also thought it was kinda weird if it wasn't thought of before xD
EDIT
I got another idea, you could implement if you want to as I don't think it is done <_<
You could convert GM commands into Lua commands, or at least some of those that are kinda crucial, like .server reload_table or .ban/kick. ^^
#25
Posted 16 September 2009 - 01:51 AM
Quote
Quote
also, what is 'Type'? --holy, shadow, physical, fire, etc?
Unit:RemoveAurasByMechanic(mechanicID, hostileonly) hostileonly is 1 if you only want to remove hostile auras, 0 for all auras. mechanicID is some sort of ID relating to mechanic type, oh wow as I was typing this message I came across a list of em in the core.
MECHANIC_CHARMED = 1, MECHANIC_DISORIENTED, // 2 MECHANIC_DISARMED, // 3 MECHANIC_DISTRACED, // 4 MECHANIC_FLEEING, // 5 MECHANIC_CLUMSY, // 6 MECHANIC_ROOTED, // 7 MECHANIC_PACIFIED, // 8 MECHANIC_SILENCED, // 9 MECHANIC_ASLEEP, // 10 MECHANIC_ENSNARED, // 11 MECHANIC_STUNNED, // 12 MECHANIC_FROZEN, // 13 MECHANIC_INCAPACIPATED, // 14 MECHANIC_BLEEDING, // 15 MECHANIC_HEALING, // 16 MECHANIC_POLYMORPHED, // 17 MECHANIC_BANISHED, // 18 MECHANIC_SHIELDED, // 19 MECHANIC_SHACKLED, // 20 MECHANIC_MOUNTED, // 21 MECHANIC_SEDUCED, // 22 MECHANIC_TURNED, // 23 MECHANIC_HORRIFIED, // 24 MECHANIC_INVULNARABLE, // 25 MECHANIC_INTERRUPTED, // 26 MECHANIC_DAZED, // 27 MECHANIC_DISCOVERY, // 28 MECHANIC_INVULNERABLE, // 29 MECHANIC_SAPPED, // 30 MECHANIC_ENRAGED, // 31
Unit:RemoveAuraType(typeID) - similiar to mechanicID - I also found a list of these options and typed out by hand and translated their values cause they were in incomprehensible hexadecimal.
SPELL_TYPE_NONE = 0, SPELL_TYPE_SEAL = 1, SPELL_TYPE_ASPECT = 2, SPELL_TYPE_BLESSING = 4, SPELL_TYPE_CURSE = 8, SPELL_TYPE_STING = 16, SPELL_TYPE_ARMOR = 32, SPELL_TYPE_AURA = 64, //hmm these could be named simply incompatible spells. One active at a time SPELL_TYPE_MARK_GIFT = 128, SPELL_TYPE_TRACK = 256, SPELL_TYPE_HUNTER_TRAP = 512, SPELL_TYPE_MAGE_INTEL = 1024, SPELL_TYPE_MAGE_MAGI = 2048, SPELL_TYPE_MAGE_WARDS = 4096, SPELL_TYPE_PRIEST_SH_PPROT = 8192, SPELL_TYPE_SHIELD = 16384, SPELL_TYPE_FORTITUDE = 32768, SPELL_TYPE_SPIRIT = 65536, SPELL_TYPE_MAGE_AMPL_DUMP = 131072, SPELL_TYPE_WARLOCK_IMMOLATE = 262144, //maybe there is a better way to trigger the aura state for immolate spell SPELL_TYPE_ELIXIR_BATTLE = 524288, SPELL_TYPE_ELIXIR_GUARDIAN = 1048576, SPELL_TYPE_ELIXIR_FLASK = 1572864, //weee, this contains both battle and guardian elixirs ;) SPELL_TYPE_HUNTER_MARK = 2097152, SPELL_TYPE_WARRIOR_SHOUT = 4194304, SPELL_TYPE_QUIVER_HASTE = 8388608, SPELL_TYPE_CORRUPTION = 16777216, SPELL_TYPE_HAND = 33554432,
Of course these ones are bitmasks (like phasing) so you can add them together to check two types.
Quote
I also thought it was kinda weird if it wasn't thought of before xD
EDIT
I got another idea, you could implement if you want to as I don't think it is done <_<
You could convert GM commands into Lua commands, or at least some of those that are kinda crucial, like .server reload_table or .ban/kick. ^^
Plyr:KickPlayer(delay) is already in HypArc. You can make a ban command with a database query, PerformCharDBQuery. I'll take a look into reloading tables.
#26
Posted 16 September 2009 - 06:13 AM
I have a challenge for you if you are up to it. The AppArc team and myself attempted implementing server hooks into the Lua Engine. We only got so far with it before we put it off on hold. That might be something to look into for an update. And by server hooks I mean:
ON_KILL_PLAYER
ON_ENTER_WORLD
ON_ENTER_WORLD2
ON_CHARACTER_CREATE
etc. There is a large number of them and I can provide you the info if needed.
#28
Posted 16 September 2009 - 01:20 PM
Quote
On kill player you receive a Token.
On player create an Announcement goes out saying welcome to the server.
On entering the world it says welcome back.
A lot of functionality :P

#29
Posted 16 September 2009 - 03:46 PM
Oh and reload table command was put in, I don't see much use for it though, other than maybe a GM admin item or something. I might also put in ReloadScripts and perhaps Rehash commands.
#30
Posted 16 September 2009 - 04:22 PM
Quote
Quote
On kill player you receive a Token.
On player create an Announcement goes out saying welcome to the server.
On entering the world it says welcome back.
A lot of functionality :P
Aaaah yeah x_x
Totally didn't think about that
@ Hypersniper:
It's handy so you don't have to do Command_overrides.
#31
Posted 16 September 2009 - 06:52 PM
BUT PM IT TO ME! IF YOU POST IN IN THIS THREAD I WILL DELETE IT.
Make sure it is reasonable and I will write it up if I can and give it to hype to implement.
#32
Posted 16 September 2009 - 06:53 PM
Why don't we just ask Hyper?

#33
Posted 16 September 2009 - 07:01 PM
Quote
Why don't we just ask Hyper?
[color=green]Uhhh...cause if you noticed lol I am helping him as well, I am just as capable as he is so why burden one person? Even if he doesn't consider it a burden why ask only one person if another is just as capable and willing to put those skills to use? Also what logical sense does it make to have one person do everything when another can do just as much in order to release commands to make an effective engine. Another reason is with more people working on it quicker releases can come about as well.
#34
Posted 16 September 2009 - 07:04 PM

#35
Posted 16 September 2009 - 08:21 PM
NOTICE
Version 1057 of HypArc currently does not compile under ArcEmu r2892 or above. This will be fixed shortly and a new version will be uploaded.
UPDATE
Now at: Version 1062
Changelog
1057 - 1062 Changelog: **Hype->Modified CastSpellOnTarget to accommodate for r2892 changes. ++Hype->ReloadTable(tablename) - Reloads table tablename. ++Hype->Rehash() - Rehashes server config ++Hype->ReloadLuaEngine() - Reloads the Lua engine & scriptsThis update is for users with ArcEmu 2892+ only.
#36
Posted 16 September 2009 - 09:38 PM
I will write up the command for it if you do not already have it wandering about in the source already. Just let me know.
#37
Posted 16 September 2009 - 10:20 PM

#38
Posted 16 September 2009 - 10:30 PM
#39
Posted 17 September 2009 - 12:44 AM
But why not let the suggestions come here as always?
Then the two of you can discuss who does what, or whatnot.
I suppose it can get chaotic, with all kinds of suggestions in between posts here and there, and it's not organized. However it is nice to have other players input as well, on the functions suggested, so that it might become better or people can think of other functions or even say it's a stupid idea, and why it would be so.
So players get ideas, from other player's ideas and the criticism also gets a part in this :3.
@ Halestorm:
Now I use Lime Green tags :D
EDIT:
I just had another idea that would be kinda cool ^^
Let NPC's or Lua scripts control players, in relation too a few basic actions. Like mounting, and moving to way points in order to reach a certain destination or whatnot :P
Could be:
pUnit:SetPlayerControl()
Then you either set it to 1 or 0.
1 = True
0 = False
So if you need to take temporary control over a player for whatever reason, you set it to 0. Whatever mechanics lies behind this I have no idea, so I hope it can be made possible ^^
It can be followed up with a few additional functions to make it work:
plyr:SetPlayerWaypoint(x,y,z,o,id) pUnit:MovePlayerToWaypoint(id) plyr:SetMount(MountID)
plyr:SetPlayerWaypoint(x,y,z,o,id): This should be obvious of course. It's just player version of the unit SetWaypoint. But you just add "id" to the end, so that the ID is defined. It's like making a local.
pUnit:MovePlayerToWaypoint(id): Here is the trick for the above mentioned function :P The ID you placed in "SetPlayerWaypoint" is the one you set here in "MovePlayerToWaypoint"
plyr:SetMount(MountID) This should be pretty obvious xD
If you want to you can come with additional ideas to these above mentioned ^^
#40
Posted 17 September 2009 - 05:29 PM
or something like that.
As for making a player mount that is possible as well.
As for setting players to waypoints that most likely will not work because you cannot create waypoints for a player as they are a different class of unit and i believe the waypoint command only effects those of a creature type. Plus if it was possible to make a player follow a waypoint what were to happen if the player moves etc. Off the destined path. It is something that can be looked into but i do not think the core itself supports it, but then again i may be wrong.
Similar Topics
![]() |
[Possible Bug?] :GiveXp(amt) - LuaHypArcStarted by Sympathy™, 27 Jun 2011 |
|
|
|
![]() |
[Request] Debug Script via LuaEngineStarted by SmashnCrash, 21 Nov 2010 |
|
|
|
![]() ![]() |
[LuaHypArc]SetCombatCapable missing?Started by Icefreze™, 06 Apr 2010 |
|
|
|
![]() |
[LuaHypArc]About DBCVarsStarted by GasTrox, 24 Feb 2010 |
|
|
|
![]() |
[LuaHypArc] QuestionStarted by Icefreze™, 22 Feb 2010 |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















