Jump to content
  • 0

Wonder if i can get help "eluna script"


Shaorin

Question

Hi im useing Eluna and i was wonder for some cool things but i cant write eluna so i just wonder if i can get some help to get started.

my first thing was a why to change your class. like you made a human mage but you wanted to be human warrior. 
so what i need help with are the starting of it for i need to set the level to 1 and make a check for the class it was before so i can removed the spells and input the warrior ones. and then kick the player from the server, for they need to relog,

my 2nd one was just for fun. where i want let's say Deadmines if a player are alone at level 16 there stas get like 400% higher. not sure if i will have this but well,
but if the player where 22+ there stats get set the a lower fix version, so let's a freiund need a tank for it and there freind are 60 or 80 then they can join and have fun for it will be like they are 16. i was thinking of setting down there level but unsure if that whould work... for they need to get the level back up and there normal EXP.

maybe these things are to complex things for noob like me. and i know some might say payu me 15$ i will do it. but still that will not help me. in a way to learn. the small things like what instances and stats and so on i do on me own. i just cant write it for i dont know hgow it works. 

if eluina are to hard for sure C++ are ok too i know how to add scripts and so on, but i use Mangos 2.4.3 so thats why i think eluna whould be better and i can use it on other servers aswell like trinitycore eluna if i wanted to.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Quote

my first thing was a why to change your class. like you made a human mage but you wanted to be human warrior.

If you mean that you want to change a player's class after creation, it is not possible with Eluna unless implemented through C++.
Otherwise you may try to kick the player and edit the database or something similar, however that is a hack and should not be done.

Quote

 i need to set the level to 1 

I myself have bad experiences with downleveling in general. The core is designed with upleveling in mind. Your skills and other may get screwed or similar, but Im not quite sure on the specifics.

It seems that you need a lot of methods / functions. You should take a look at the wiki: http://eluna.emudevs.com/
You can search at the top for "level", "spell", "class", "kick" to find functions you seem to need.

For the second thing it is not possible to fiddle with the stats in that way without removing the player's gear and changing his level or similar unless you use some spells/auras on the player that reduce his stats. Im not too familiar with the spell system so I cant tell if Eluna is capable of handling custom points on auras.
Another way could be to try edit the creature's stats instead of player or similar. For example you can use the damage hook to change the damage the player does to the creature.
This way you can edit the damage output of high level players to be small.
Here is a small example:

local function OnDamageTaken(event, creature, attacker, damage)
    return nil, damage*(1/attacker:GetLevel())
end

RegisterCreatureEvent(entry, 9, OnDamageTaken)




Unfortunately at the moment it is not possible to have C++ AI and Lua AI at the same time on a creature, so adding lua hooks to C++ scripted creatures might not be a good idea.

 

I recommend reading this:
https://github.com/ElunaLuaEngine/Eluna/blob/master/docs/USAGE.md

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use