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

[CPP] Grumbo'z VIP System

Marko

Enthusiast
not sure if it will work if i paste all that at the end of scriptloader.cpp , since in it i have not a single line like this
#ifdef SCRIPTS
nowhere. Well what to do will paste it and work on it tomorrow, now is getting late here. will post results.
 

slp13at420

Mad Scientist
its just 2 lines :
Code:
[COLOR="#808080"]
[/COLOR]
#ifdef SCRIPTS
/* This is where custom scripts' loading functions should be declared. */
	[COLOR="#DAA520"]void AddSC_Grumboz_VIP_Core();[/COLOR]
#endif

void AddCustomScripts()
{
#ifdef SCRIPTS
    /* This is where custom scripts should be added. */
	[COLOR="#DAA520"]AddSC_Grumboz_VIP_Core();[/COLOR]
#endif
}

you will need to add the conf block to your worldserver.conf file:
Code:
[COLOR="#808080"]
###################################################################################################
# Grumbo'z VIP System
# by slp13at420 of
# EmuDevs.com.
#
# These settings provide a flexibility to the system.
#
# 	
#	VIP.MAX
#		Description: Max VIP Level for VIP System. max Uint32 value.
#		Default:     6
#

VIP.MAX = 6

#	VIP.OFFSET
#		Description: float multiplier for each vip rank.
#		this is used for stat mod's. i.e. mod = VIP rank * offset.
#		Default:     0.05f 5% muliplier used per VIP rank
#

VIP.OFFSET = 0.05

#	VIP.VOTE.ENABE
#		Description: Votes can earn higher vip ranks.
#		Default: 1 . 0 off // 1 on.
#

VIP.VOTE_ENABLE = 1

#
#	VIP.VOTE.COUNT
#		Description: how many Votes to earn each level of VIP.
#		Default: 125 votes per.
#

VIP.VOTE_COUNT = 125

#
#	VIP.COIN
#		Description: an item that is clickable to show a players VIP stats
#		Default: 63020
#


VIP.COIN = 63020

#
#	VIP.STONE
#		Description: an item that is clickable and will increase a players VIP level.
#		Default: 63021
#

VIP.STONE =  63021

#
#	VIP.MAGIC.GOLD
#		Description: just Global custom currency id that can be accessed
#		by another character via the VIP banker deposit/withdrawal
#		Default: 44209
#

VIP.MAGIC_GOLD = 44209

#
#	VIP.TP.BONUS
#		Description: how many extra TP's to award per VIP level.
#		Default: 14 per VIP level.
#

VIP.TP_BONUS = 14

#	VIP.LEVEL_BONUS_ENABE
#		Description: players can reach higher levels per VIP..
#		Default: 1 . 0 off // 1 on.
#

VIP.LEVEL_BONUS_ENABLE = 1

#
#
#	VIP.LEVEL_BONUS
#		Description: how many extra level's a player can gain per VIP level.
#		Default: 1
#

VIP.LEVEL_BONUS = 1

#
###################################################################################################
[/COLOR]
 
Last edited:

Marko

Enthusiast
Got 160errors and 502 warnings :fuckthathshit:
maybe have to add them to custom_scripts_loader.cpp
here:
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()
 

slp13at420

Mad Scientist
Got 160errors and 502 warnings :fuckthathshit:
maybe have to add them to custom_scripts_loader.cpp
here:
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()

Oh Snap !! you got that wierd core where they placed a scriptloader file in the custom script folder.

yea you have to add those 2 lines in that scriptloader file instead of scripting/scriptloader.cpp
 

Marko

Enthusiast
added to custom_script_loader.cpp

well man it is latest wotlktrinitycore with eluna from here: https://github.com/ElunaLuaEngine/ElunaTrinityWotlk
Have also added eluna methods following instructions. but maybe that also causes issues
Again have 162errors and 502 warnings..
Code:
Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol "public: float __cdecl Position::GetAngle(float,float)const " (?GetAngle@Position@@QEBAMMM@Z) referenced in function "public: float __cdecl Position::GetAngle(struct Position const &)const " (?GetAngle@Position@@QEBAMAEBU1@@Z)	game	C:\Users\Admin\Desktop\ElunaTrinityWotlk\build\src\server\game\gamePCH.obj	1	

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol "public: bool __cdecl Unit::HasAuraType(enum AuraType)const " (?HasAuraType@Unit@@QEBA_NW4AuraType@@@Z) referenced in function "public: bool __cdecl Unit::HasInvisibilityAura(void)const " (?HasInvisibilityAura@Unit@@QEBA_NXZ)	game	C:\Users\Admin\Desktop\ElunaTrinityWotlk\build\src\server\game\gamePCH.obj	1	

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1181	cannot open input file '..\scripts\Release\scripts.lib'	worldserver	C:\Users\Admin\Desktop\ElunaTrinityWotlk\build\src\server\worldserver\LINK	1

seems your scripts cant work with this eluna core :eek:kay:

added like this to custom_script_loader.cpp

Code:
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()
void AddSC_Grunboz_Guild_Warz();
void AddSC_Grumboz_VIP_Core();
{
AddSC_Grunboz_Guild_Warz();
AddSC_Grumboz_VIP_Core();
}
and have put both scripts in that Custom scripts folder
 
Last edited:

slp13at420

Mad Scientist
hmmm yea they did that before then dropped the idea of a scriptloader file in the scripts folder. k at the top of the CPP files there are a group of `#include` statememnts. one of them should look like :
Code:
[COLOR="#808080"]
#include "ScriptMgr.h"
[/COLOR]

change that line to look like :
Code:
[COLOR="#808080"]
// #include "ScriptMgr.h"
[/COLOR]

or remove that line completely.

basically its calling for a file that doesn't exist in your core.
 

slp13at420

Mad Scientist
ok I updated this to TDB 335.62 rev-01fd944d2907 2017-01-02. just select the rev folder you need and follow the instructions.

and yea its updated with the new gossip methods.
 

slp13at420

Mad Scientist
oh snap didnt see your comment about installing the eluna methods pack. TbH i havnt kept that up to date ... But i will go ahead and update the Eluna method pack to the latest rev since a Lua Engine is frigin awsome to have \o/
 

slp13at420

Mad Scientist
Ok i have updated the whole VIP Engine to the latest TDB 62 rev 01fd944d2907 2017-01-02.
I have Updated the Eluna Methods pack to the latest TDB and rev also.

just select the folder for your rev and follow the directions.

I also added an Eluna .lua demo file with some of the basic global, player and item methods used.

I also moved the project over to GitHub and made a branch for the latest TDB 335.62 and TDB 335.60
So make sure you select the right branch for your TDB rev when you clone the repo.
 
Last edited:

Marko

Enthusiast
thank you for updating, but something is wrong in your script, each time i type .vip buff, no matter what VIP rank i am, my HP always get modded to just 1hp and even changing the offset in config does not change anything..

maybe it has something to do with this part of ur code
for (uint8 i = 0; i < (((sizeof(VIPBUFFS) / sizeof(*VIPBUFFS)) / max_level) * Pvip); i++)
{
player->AddAura(VIPBUFFS, player);
}
player->SetMaxHealth(1);

but i have no idea..
also would be nice if players could not use .vip scale 10 but only up to scale 3. When Vip coin is used the char gets stuck in spell animation and must press esc to stop it.
 
Top