Hey, don't know if this exists alredy in this forum but im going to post here, a quest that let's you bet yang on guild war's.
Quest works in this way:
You can only bet if you have a ticket ( can be edited to the item you want )
You can do how many bet's you want depending on the number of tickets you have 1ticket = 1 bet.
You can't bet in war's that involve your guild.
you get 2x what you bet if you win.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
game/src/questlua_guild.cpp
Search:
Under all that code, add:
- int guild_sistema_apostas(lua_State* L)
- {
- FBuildLuaGuildWarList f(L);
- CGuildManager::instance().for_each_war(f);
- return 1;
- }
- int guild_dar_recompensa(lua_State* L)
- {
- LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
- CGuild* pGuild = ch->GetGuild();
- lua_pushnumber(L, (pGuild!=NULL)?pGuild->GetGuildWarWinCount():0);
- return 1;
- }
Search:
Add under:
Now you just need to compile, but don't forget to add this on quest_functions:
Now here is the quest with comments to explain what each code does ( Don't forget to translate because it's in portuguese ) And im assuming you know how to build a quest.
Download:
VT