• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Rules/Info System on Login

Kaev

Super Moderator
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.
 
Last edited:

Salja

Respected Member
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
 
Last edited:

kolakocide

Super Baked
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

Illustrious Member
Really Cool been looking at trying to get players to read the rules..since alot dont lol...gonna use this!
 

PrestonParsons

BETA Tester
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

Moderator / Eluna Dev
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)
 

kusanagy

Respected Member
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

Moderator / Eluna Dev
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

Enthusiast
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

Moderator / Eluna Dev
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.
 
Top