Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Help&Support (http://mangos.ytdb.ru/forumdisplay.php?f=62)
-   -   Support Lua Engine (http://mangos.ytdb.ru/showthread.php?t=6575)

alexluana 01.01.2013 15:27

Support Lua Engine
 
Is there possible that lua engine to stay with sd2 style?

I mean would it be a help or a pain in the down side?

Cause I saw mangos doing some preparation for that engine and I don't know what to think...or how to think!...

A Light in this matter your me nice...

Thank you in advance

schmoozerd 09.01.2013 17:56

lua has often been suggested, and equally often (that is each time) rejected.

alexluana 11.01.2013 11:03

=)) does it have any advandages? or disadvantages?

zergtmn 11.01.2013 18:47

Цитата:

Сообщение от alexluana (Сообщение 30334)
=)) does it have any advandages? or disadvantages?

Advantages over C++ scripting? Lua is much simpler than C++, less error-prone, it has lower barrier to entry and supports hot code replacement while maintaining decent performance.
I personally think it would be great if mangos supported some kind of scripting language (not necessarily Lua) in addition to C++ scripting.

Sid 12.01.2013 07:59

I modified the old lua engine a year ago under mangos-zero (sd2-like writing, hot reload)
If interested, I can get the patch for the mangos-zero for further porting to other branches and development.

Mayss 12.01.2013 15:55

Цитата:

Сообщение от Sid (Сообщение 30336)
I modified the old lua engine a year ago under mangos-zero (sd2-like writing, hot reload)
If interested, I can get the patch for the mangos-zero for further porting to other branches and development.

Было бы интересно увидеть, чем lua лучше?.

alexluana 13.01.2013 00:37

it would be nice to have a simplier language to script as alternative over c++, mangos currently system.

Mayss please keep it english as much as possible...

Thank you

schmoozerd 13.01.2013 07:47

i see no reason to add some additional scripting like language.

alexluana 14.01.2013 00:15

well it's only an opinion and this is only a simple question and subject.

I was thinking to give user an other alternative to script a boss/fight/event in a simplier way. Many ppl don't understand C++. Maybe there is something outthere to be as an alternative to c++

Amaru 14.01.2013 09:09

Цитата:

don't understand C++
it means they don't understand raw logic
how can they write scripts?

Forgotten 14.01.2013 13:32

world doesn't turns around c++

Vladimir 14.01.2013 15:16

For writing basic scripts not need know all c++ power features.
It's possible code base at existed similar examples in existen scripts.
At this level no big difference coding in any language, so i also not see reason adding another scripting language just for avoid people learn basic c++ coding.

alexluana 15.01.2013 01:20

well there is no need ... as you said... there are so many examples that you don't really need to know c++

schmoozerd 15.01.2013 17:20

and we have perfectly fine EventAI and DB scripting for the simple stuff.

So infact Lua would be reasonable for the scripts that are too complicated for EventAI and simple enough for Lua.
1) These are very few!
2) This might draw people from SD2
3) This might draw people from EventAI
4) This would only drain the simple scripts from SD2 away, which will result in SD2 only holding complicated scripts, which will make it even more difficult for newbees to start with SD2 (which we already made more complicated by removing gossip scripts)
5) It will require maintenance in the core
6) Lua scripts itself will require maintenance (overhead like forums etc..)

Yester 21.01.2013 22:18

Цитата:

Сообщение от Mayss (Сообщение 30337)
Было бы интересно увидеть, чем lua лучше?.

тестируйте) salja добавил в 1.12.1 луа энжин
https://github.com/Salja/server/commits/master

Konctantin 03.03.2013 13:38

Возможно у этой темы будет продолжение. Поскольку в кеше клиента появились скрипты сценариев (SceneScript.adt).
Код:

REPLACE INTO scene_script VALUES ('ruRU', 9422, 'Silvermoon 5.1: zto - One Last Grasp - Init', '----------------------
-- Helper Functions --
----------------------

function refugeeStance( actor )
        local emoteArray = {
                Animations.Sleep;
                Animations.Stand;
                Animations.SitGround;
                Animations.KneelLoop;
        }
        local emoteSomething = emoteArray[math.random(#emoteArray)]
        PlayLoopingSplitBodyAnim( actor, emoteSomething )
end

-------------------------
--Scene Points & Paths --
-------------------------
refugeeSpawnPoint = 4923
refugeeSpawnerPoint = 4924

------------
-- Spells --
------------
teleportSpell = 51347

--------------
--Characters--
--------------

refugee1CreatureID = 68613
refugee2CreatureID = 68766
refugee3CreatureID = 68978
silvermoonGuardCreatureID = 51796
--divineBellModelID = \"WORLD\\EXPANSION04\\DOODADS\\MOGU\\Mogu_DivineBell.M2\"
portalModelID = \"World\\Generic\\ActiveDoodads\\SpellPortals\\MagePortal_Dalaran.mdx\"
tableModelID = \"WORLD\\EXPANSION01\\DOODADS\\GENERIC\\BLOODELF\\BENCHES\\BE_Bench01.m2\"
bunnyCreatureID = 62026

lorthemarCreatureID = 68084
halduronCreatureID = 16801
aethasCreatureID = 30116
rommathCreatureID = 16800


--refugeesA = SpawnActorsAtPoints ( refugee1CreatureID, 4923, 1, true )
--guards = SpawnActorsAtPoints ( silvermoonGuardCreatureID, 4925, 1, true )
--refugeesC = SpawnActorsAtPoints ( refugee3CreatureID, 4926, 1, true )
--divineBell = SpawnModelActor ( divineBellModelID, 9833.22, -7267.85, 26.1817, 191.906, 2, true)
portals = SpawnModelActorsAtPoints ( portalModelID, 4924, 1, true )

lorthemar = SmoothPhaseSpawnActor (lorthemarCreatureID, 9820.831055, -7261.232910, 26.175354, 226, 1, true)
halduron = SmoothPhaseSpawnActor (halduronCreatureID, 9817.772461, -7256.824707, 26.178864, 267, 1, true)
aethas = SmoothPhaseSpawnActor (aethasCreatureID, 9815.26, -7267.02, 26.2364, 46.459, 1, true)
rommath = SmoothPhaseSpawnActor (rommathCreatureID, 9815.26, -7267.02, 26.2364, 46.459, 1, true)

table = SpawnModelActor (tableModelID, 9820.66, -7255.25, 26.1533, 214.301, 1, false)

splashBunny = SpawnActor(bunnyCreatureID, 9827.83, -7248.18, 27.1063, 216.325, 1, false)

FadeOut(aethas, 0)
FadeOut(rommath, 0)

--[[Random emotes for refugees
for i=1, #refugeesA do
        refugeeStance( refugeesA[i] )
end

--Set emotes for guards
for i=1, #guards do
        PlayLoopingSplitBodyAnim( guards[i], Animations.Ready1H )
end

--Set Emotes for other Random refugees
for i=1, #refugeesC do
        refugeeStance( refugeesC[i] )
end
]]--

SendTrigger(\"Smooth Phase Complete\")

--------------
--Cue Action--
--------------

Wait(1)
lorthemar:BroadcastTextStereo(BroadcastType.Yell, 69642) -- VO Line 1
PlayOneShotSplitBodyAnim( lorthemar, Animations.EmoteTalkExclamation )
Wait(2)
--lorthemar:WaitBroadcastSoundComplete()
Wait(.5)

aethas:BroadcastTextStereo(BroadcastType.Say, 69643) -- VO Line 2
PlayOneShotSplitBodyAnim( aethas, Animations.EmoteTalk )
Wait(7)
--aethas:WaitBroadcastSoundComplete()
Wait(.5)

lorthemar:BroadcastTextStereo(BroadcastType.Say, 69644) -- VO Line 3
PlayOneShotSplitBodyAnim( lorthemar, Animations.EmoteTalkQuestion )
Wait(5)
--lorthemar:WaitBroadcastSoundComplete()
Wait(.5)

aethas:BroadcastTextStereo(BroadcastType.Say, 69645) -- VO Line 4 - \"Proudmoore, she\'s blah blah blah\"
aethas:PlayOneShotAnimKit( 1530 )
Wait(2)
aethas:PlayOneShotAnimKit( 1530 )
--aethas:WaitBroadcastSoundComplete()
Wait(6)
Wait(1)

--Angry lorthemar
lorthemar:BroadcastTextStereo(BroadcastType.Say, 69646) -- VO Line 5 - Table Flipper
SendTrigger(\"lorthemar - pace\")
PlayOneShotSplitBodyAnim( lorthemar, Animations.EmoteTalk )
Wait(2)
PlayOneShotSplitBodyAnim( lorthemar, Animations.EmoteTalk )
Wait(5)
SendTrigger(\"lorthemar - cross to table\")
--lorthemar:WaitBroadcastSoundComplete()
Wait(3)
Wait(1)

lorthemar:BroadcastTextStereo(BroadcastType.Say, 69647) -- VO Line 6 - \"When will they learn!\"
Wait(6)
', 0, 9435);


Konctantin 14.05.2014 14:49

Вот нашел случайно реализацию скриптов на Lua https://github.com/ElunaLuaEngine.

форки:
WotLK
TBC
Classic

Привязка скриптов: https://github.com/ElunaLuaEngine/Eluna

Сами скрипты: https://github.com/ElunaLuaEngine/Scripts


Текущее время: 12:49. Часовой пояс GMT +3.

ru-mangos.ru - Русское сообщество MaNGOS