PDA

View Full Version : Rules/Info System on Login



Salja
03-25-2015, 02:48 PM
Rules/Info System on Login



https://www.youtube.com/watch?v=Vi6AVE-IwP4

https://www.youtube.com/watch?v=Aggi4_bJwpc

SQL: https://github.com/CoronaCore/LuaScripts/blob/master/sql/character_rules.sql
Base File: https://github.com/CoronaCore/LuaScripts/blob/master/lua_scripts/base/sc_default.lua
Main File: https://github.com/CoronaCore/LuaScripts/blob/master/lua_scripts/custom/server_rules.lua

Vitrex
03-25-2015, 02:50 PM
Not tested by myself, but i really LIKE the idea ! :)

slp13at420
03-25-2015, 05:24 PM
:RpS_thumbsup: nice job.

Kaev
03-26-2015, 06:38 AM
Very nice!
Looks like a small AIO window.. but without AIO.. :D


EDIT: Instead of using an SQL entry, you could use the OnFirstLogin hook or however it is called. They could just relog instead of accepting the rules, but i don't think that this would make a difference.

Salja
03-26-2015, 06:53 AM
well i save in sql so i can check player have already accept the rules and with a command #rules reset you can reset rules for all player and with rules reset player name you can reset only for one player.
with OnFirstLogin Hook you cant make this

kolakocide
03-28-2015, 01:00 AM
Very nice system I must say. It looks like it has space to give out a lot more information than just the rules. Which that's 100 :P :party:

mcraider
04-01-2015, 07:16 AM
Really Cool been looking at trying to get players to read the rules..since alot dont lol...gonna use this!

TheMoneyHater
04-05-2015, 06:01 PM
This looks really sweat! mind making it to 3.3.5? :D

Rochet2
04-05-2015, 06:56 PM
This looks really sweat! mind making it to 3.3.5? :D

I think it should already work on 3.3.5
Did you test?

TheMoneyHater
04-05-2015, 09:28 PM
I'm sorry for my comment, I have modded my Eluna Core a lot and I got it to work now. Really nice job! Keep it up!

PrestonParsons
07-24-2016, 12:10 AM
Seems crashed whole server, when you accept the rules though :)

Tommy
07-24-2016, 03:00 AM
Seems crashed whole server, when you accept the rules though :)

And it appears that Salja has been inactive since September of last year too. :/

Rochet2
07-24-2016, 06:39 AM
Seems crashed whole server, when you accept the rules though :)

Do you have the character_rules database table?

PrestonParsons
07-24-2016, 02:33 PM
Yes I have,

Errors I have
Lua_scripts/custom/server_rules.lua:77; attempt to call method 'PlaySoundToPlayer' (a nil value)

And when you accept the rules

Whole server crashed, This error

server/game/scripting/Scriptmgr.cpp:1587 in ScriptMgr:;OnGossipSelect ASSERTION FAILED: Item

Rochet2
07-24-2016, 03:04 PM
Good news: the crash has been fixed.
Bad news: you need to pull latest code (for trinity eluna) and compile your core again.

Other news: To fix the sound error you have to use some method found here: http://eluna.emudevs.com/?search=sound
Maybe try the player:PlayDirectSound(1509, player)

PrestonParsons
07-25-2016, 08:55 PM
okay, thank checking out now

kusanagy
08-18-2016, 11:57 PM
hello,
you need modify the source,

go to:
Source\src\server\game\LuaEngine
LuaFunctions.cpp

look,

{ "Resurrect Player", & Lua Player :: Resurrect Player},
in the line . 656
below this, paste :

{ "PlaySoundToPlayer", &LuaPlayer::PlaySoundToPlayer },
done. save now.

step.2
now in the file. PlayerMethods.h
below t

int GossipClearMenu(Eluna* /*E*/, lua_State* /*L*/, Player* player)
{
player->PlayerTalkClass->ClearMenus();
return 0;
}

just below this, enter the following.

int PlaySoundToPlayer(Eluna* /*E*/, lua_State* L, Player* player)
{
uint32 soundId = Eluna::CHECKVAL<uint32>(L, 2);
SoundEntriesEntry const* soundEntry = sSoundEntriesStore.LookupEntry(soundId);
if (!soundEntry)
return 0;

player->PlayDirectSound(soundId, player);
return 0;
}

ready, proceed with the compilation.

Rochet2
08-19-2016, 02:51 PM
hello,
you need modify the source,

go to:
Source\src\server\game\LuaEngine
LuaFunctions.cpp

look,

in the line . 656
below this, paste :

done. save now.

step.2
now in the file. PlayerMethods.h
below t


just below this, enter the following.


ready, proceed with the compilation.

rather use the existing sound functions.

revowow
08-19-2016, 08:42 PM
Any Idea why when I added this script most things worked, but i had to get rid of the Freeze, as a new player It never showed me rules upon creating a character, all i would do is enter game, and be rooted to the floor. Any idea why it dont show the rules when creating new character?

Rochet2
08-19-2016, 10:32 PM
Any Idea why when I added this script most things worked, but i had to get rid of the Freeze, as a new player It never showed me rules upon creating a character, all i would do is enter game, and be rooted to the floor. Any idea why it dont show the rules when creating new character?

check your error logs. They should tell you that you probably have a lua error on line 77 in server_rules.lua
Or maybe there is some other error, but anyways there should be an error somewhere there.

Shaorin
08-20-2016, 06:00 AM
hi all i tryed to add this. but i get these error's, anyone know where and what i should get to fic this,

http://puu.sh/qHJc9/fde91615e9.png

Rochet2
08-20-2016, 07:44 AM
hi all i tryed to add this. but i get these error's, anyone know where and what i should get to fic this,

http://puu.sh/qHJc9/fde91615e9.png

In the script change require "base/sc_default"
to
require("sc_default")

Shaorin
08-20-2016, 08:10 AM
oo ok... i just make the core where do i find this files? for its soemthing that i dont have. and i did not know they where needed,

Rochet2
08-20-2016, 08:27 AM
oo ok... i just make the core where do i find this files? for its soemthing that i dont have. and i did not know they where needed,

You need all the files in the main post of this topic.
I am talking about editing one of those files. More specifically you should edit server_rules.lua
The sc_default.lua and character_rules.sql should work fine by default - not that I tested.

Shaorin
08-20-2016, 09:09 AM
i said i dont know where to find these files- i only have:

http://puu.sh/qHQbD/7fb9ac3d86.png

http://puu.sh/qHQcd/a34345fbae.png

http://puu.sh/qHQcY/afa1fa2487.png

so i dont ahve thoese files. the one that posed about this dont link this extra files. i dont know if i need to go into the source folder into eluna or something like that to get them. so HOW do i get these files that i dont know have? where should i look.

Rochet2
08-20-2016, 09:43 AM
i said i dont know where to find these files- i only have:

http://puu.sh/qHQbD/7fb9ac3d86.png

http://puu.sh/qHQcd/a34345fbae.png

http://puu.sh/qHQcY/afa1fa2487.png

so i dont ahve thoese files. the one that posed about this dont link this extra files. i dont know if i need to go into the source folder into eluna or something like that to get them. so HOW do i get these files that i dont know have? where should i look.

The error says that the file that causes the error is in the root of lua_scripts folder.
So you are either looking at the wrong directory or the file might be hidden. Or then you deleted the script before taking the pictures.

The file is not there by default so you have put it there yourself. So where did you put it?

Shaorin
08-20-2016, 09:51 AM
ia hve not delted anything and im admin on the pc.... but i dont get why its hidden. those are all files i have

Rochet2
08-20-2016, 03:23 PM
ia hve not delted anything and im admin on the pc.... but i dont get why its hidden. those are all files i have

Can you describe everything you have done related to this script in the main post?

Shaorin
08-21-2016, 07:03 AM
well itd you that dont understand. i all i ask for are what whats wrong. where is the files. i went into the github but its no files there. the rest of the files if they are a part of eluna then i should have them.
it seems that you think i mess around with the script i ahve not. i only downlaed sqp, main and base files. that what he linked me mian post and that what i thought i needed. if he knew i needed more files that why not tell and give a link. i mean he give a link to a githube repo, so sure the files should be there.

so i dont have the files. and im asking kindl after them. i cant see how hard it can be to understand^^

Rochet2
08-21-2016, 07:23 AM
i only downlaed sqp, main and base files

These are the only files you need.
These are the files you should modify because they do not work by default.
More specifically I am talking about editing the main file, because it seems it produced an error seen in your images you linked.

ps. in case you didnt know you need to name the main file server_rules.lua and the base file sc_default.lua

Shaorin
08-21-2016, 12:11 PM
ooo i see why did you not explain that from the from the start. i did not understand you meant i needed to ahve specific name for the files. will try that,

Rochet2
08-21-2016, 01:09 PM
i did not understand you meant i needed to ahve specific name for the files. will try that,

Also do note that I told you to change
require "base/sc_default"
to
require("sc_default")
in the main file.

Because if you do not do this, it requires you to have a specific folder structure as well. (sc_default.lua needs to be in "base" folder)

Salja
12-26-2016, 07:20 PM
The script is now up to date check first post

titkata
01-02-2017, 01:03 PM
Nice script I really enjoy it! :)
I have some questions:
1. Can I use this script for my future project?
2. Is it possible to edit the time?