Jump to content
  • Announcements

    • Xmat

      Pravidlo pro postování v TTT

      Do sekce Tipy, triky, tutoriály nepatří žádné dotazy.   Postujte sem vaše návody, tipy a různé další věci jež uznáte za vhodné sdělit zdejšímu osazenstvu, ale veškeré dotazy směřujte do sekce Všeobecná diskuse.
    • Replik

      Seznam návodů a důležitých témat v této sekci

      Pro lepší přehlednost jsem vytvořil tento seznam, který vás, méně zkušené, lépe provede touto sekcí. Věřím, že zde najdete, co hledáte. Vypsané jsou návody, které jsou oficiálně uznané jako návody. Běžné diskuze, které neposkytují postupy a rady zvěřejněny nejsou.   Instalace vlastního MaNGOS Serveru Díky těmto návodům budete (měli by jste být) schopni vytvořit a následně spustit váš vlastní server. Nastavení je pro verze s i bez datadisku.   Instalace MaNGOS Serveru (bez datadisku TBC) - Autor Benny Instalace MaNGOS Serveru (s datadiskem TBC) - Autor Malfik Instalace MaNGOS Serveru v prostředí Linux - Autor charlie Instalace MaNGOS Serveru v prostředí Linux - Autor kupkoid   Chyby a jejich řešení při přihlašování k serveru - Autor Cybe   Zálohování uživatelských dat   Dávkový soubor (BAT soubor) pro vytvoření SQL záloh - Autor Replik   Kompilování - tvoření vlastních release (revizí)   Tvorba kompilací pro Win32 (MangoScript) - Autor bLuma   Ostatní - těžko zařaditelné, ale neznamená to, že nejsou dobré   VIP Systém - Autor charlie Tvorba Webových stránek pro MaNGOS - Autor zahuba Tvorba teleportačních NPC (MangoScript) - Autor Replik Registrační web (původně předělaná SPORA) Funkční pro Antrix i MaNGOS - Autor Replik Nastavení a spuštění Minimanager pro MaNGOS - Autor BlackMartin Nastavení MaNGOS Website - Autor Artorius   Samozřejmě jsou zde i jiné návody, ale tyto jsou nejvíce používané, proto věřím, že vám budou nápomocné. Tuto sekci budeme upravovat podle potřeby. Pokud by jste něco nenašli nebo si nevěděli rady, hledejte na fóru a teprve potom založte vlastní topik. Pokud nějaký autor vytvoří kvalitní návod a chtěl by ho zveřejnit i v tomto seznamu, doporučuji, aby mi napsal zprávu skrze PM.   Díky a přeji hezký den na WoWResource   Replik
    • Aristo

      Příspěvky tam, kde nemají co dělat

      Dodržujte zákaz přispívání do topiků s repaky pokud si to zakladatelé nepřejí!! Opakované psaní příspěvků bude trestáno warnem.
    • Aristo

      Používání spoilerů

      Poslední dobou má většina uživatelů fora zvláštní nutkání postovat extrémně dlouhé texty nebo kódy, které zabírají v nejedenom případu i 80% obsahu celé stránky a hodně tak zvedají nepřehlednost v topiku. Chtěl bych všechny uživatele požádat, aby při postování citací, jakýchkoliv kódů, errorů, atp... delších než 30 řádků používali funkci spoileru.   Funkci vyvoláte příkazem [spoiler] text [/spoiler]   Ukázka:  
Sign in to follow this  
ibanez

Dveře na klíč...

Recommended Posts

Ja jsme to udelal tak ze jsme to dal na nejake misto kde se hrac nedostane a dal jsem tam port! ALE NWM JAK UDELAT TEN PORT ABY TAM MOHLI JEN CLENOVE GUILDY TREBA XXX!! PORADTE!

Share this post


Link to post
Share on other sites
a co to vyresit tak, ze kazdy clen guildy bude mit svitek, ktery bude portovat do GH.

 

tobe se povedlo postavit GH? jak pls :) ?

plz jak udelat ten svitek aby te portoval? jde nejak spojit se scriptama?

 

btw na serveru kde ibi delaval (uz se moc neukazuje) to resime proste ze necim zablokujem pruchod dveri treba gameobjectem dveri (nakej sme nasli) nic moc ale gh tim vznikne ale schazi reseni jak se do nej dostat

Share this post


Link to post
Share on other sites
Ludia plz nemate navod alebo neviete poradit ako stravit HG?????plz ;)

preti si to tu znovu odshora treba ti to dojde

Share this post


Link to post
Share on other sites

O kur** ja si spletl forum lidi prominte ale mam stejne dotaz nevite kde sezenu scriptdevy a mangoscripty ktere funguji ptz vsecky co jsou k revizim sem nejak nepochopil

Edited by Mat0

Share this post


Link to post
Share on other sites

Hele,potreboval bych vedet kompletne,jak utelat ty dvere na nejaky klic pls :D a jeste jak udelat nejaky Item,aby to portlo pri pouziti do gild haus :D pls help.

Share this post


Link to post
Share on other sites

Na jiz existujici klice na mangosu staci vytvorit gameobject a nastavit mu odpovidajici sound1 (tj LockId). Pokud chces vlastni klic, musis si vytvorit pro tento go vlastni skript ve ScriptDev/Mangoscriptu.

 

Item, ktery te portne na guild house je rovnez nutne skriptovat. Teoreticky mozna pokud by jsi si udelal teleportacni spell (kopii z jineho spellu v Spell.DBC) a pridal radek do areatrigger_template tak by to stacilo.

 

edit: lockid je sound1...

Edited by bLuma

Share this post


Link to post
Share on other sites
Na jiz existujici klice na mangosu staci vytvorit gameobject a nastavit mu odpovidajici sound0 (tj LockId). Pokud chces vlastni klic, musis si vytvorit pro tento go vlastni skript ve ScriptDev/Mangoscriptu.

 

Item, ktery te portne na guild house je rovnez nutne skriptovat. Teoreticky mozna pokud by jsi si udelal teleportacni spell (kopii z jineho spellu v Spell.DBC) a pridal radek do areatrigger_template tak by to stacilo.

 

dik za prvni konstruktivni napady

plz kde v mangoscriptu to je ? (zhruba smer) nebo kdyz sem ten script hodis :)

Share this post


Link to post
Share on other sites

tak sem se dival jak by to slo udelat a momentlani problem je ze jadno mangose neni jeste plne pripravene pro skriptovani gameobjectu a bylo by nutne nejenom udelat skript, ale zaroven pridat odkazy na skriptovaci system primo do jadra..

Share this post


Link to post
Share on other sites

HOTOVY FUNKCNI SKRIPT NA DVERE NA KLIC

 

Tak sem neco spatlal :) Otazkou je jak dlouho bude trvat nez mi vladimir nebo jiny developer do toho hrabne a rozbije to :)

Jedna se o univerzalni mnohoobjektovy skript (jeden skript na nekonecno objektu) a lehka modifikace SpellHandler.cpp + GameObject.cpp

Pribalen popis a priklad, klic musi mit stejne entry cislo jako gameobject. Pak je to uz fsecko jedno :)

 

#include "sc_defines.h" // TOTO UPRAVTE PODLE VASICH SKRIPTU ! napr: "../../sc_defines.h"

bool GOHello_door(Player *player, GameObject *_GO )
{
if (player->GetItemCount(_GO->GetGOInfo()->id) > 0) {
       _GO->SetUInt32Value(GAMEOBJECT_FLAGS,33);
       _GO->SetUInt32Value(GAMEOBJECT_STATE,0);        //open
       _GO->SetLootState(GO_CLOSED);
       _GO->SetRespawnTime(15);    
}
return true;
}

void AddSC_door()
{
   Script *newscript;

   newscript = new Script;
   newscript->Name="door";
   newscript->pGOHello              = &GOHello_door;
   m_scripts[nrscripts++] = newscript;
}

 

Klíč je item, který má stejné id (entry) jako gameobject dveří.

Edited by bLuma
upload přímo na stránky

Share this post


Link to post
Share on other sites
HOTOVY FUNKCNI SKRIPT NA DVERE NA KLIC

 

Tak sem neco spatlal :) Otazkou je jak dlouho bude trvat nez mi vladimir nebo jiny developer do toho hrabne a rozbije to :)

Jedna se o univerzalni mnohoobjektovy skript (jeden skript na nekonecno objektu) a lehka modifikace SpellHandler.cpp + GameObject.cpp

Pribalen popis a priklad, klic musi mit stejne entry cislo jako gameobject. Pak je to uz fsecko jedno :)

 

Ke stahnuti zde: http://www.yourfilelink.com/get.php?fid=311990 nebo http://filebeam.com/0ed0c1fcddd8fc45db585790c50e9ac8

 

jo pekny, ale asi si to predelam na nizsi revizi, mam ted 3430 a mam v ni nejake patche..tak to zkusim udelaj aj na nu, jinak good ;)

Share this post


Link to post
Share on other sites

revertovat se me nechce, rucni aplikace je lehci :)

 

SpellHandler.cpp

najdi: void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )

pridej pred: switch(t)

if(Script->GOHello(_player, obj))
        return;

GameObject.cpp

najdi: void GameObject::Update(uint32 p_time)

najdi: case GO_CLOSED:

pridej pred: case GAMEOBJECT_TYPE_TRAP:

case GAMEOBJECT_TYPE_DOOR:
                            SetUInt32Value (GAMEOBJECT_FLAGS, m_flags);
                            SetUInt32Value (GAMEOBJECT_STATE, 1);
                            break;

Share this post


Link to post
Share on other sites
HOTOVY FUNKCNI SKRIPT NA DVERE NA KLIC

 

Tak sem neco spatlal :) Otazkou je jak dlouho bude trvat nez mi vladimir nebo jiny developer do toho hrabne a rozbije to :)

Jedna se o univerzalni mnohoobjektovy skript (jeden skript na nekonecno objektu) a lehka modifikace SpellHandler.cpp + GameObject.cpp

Pribalen popis a priklad, klic musi mit stejne entry cislo jako gameobject. Pak je to uz fsecko jedno :)

 

Ke stahnuti zde: http://www.yourfilelink.com/get.php?fid=311990 nebo http://filebeam.com/0ed0c1fcddd8fc45db585790c50e9ac8

 

naslo by se nejaky hotovy reseni pro lamy co neumej kompilovat? :rolleyes:

bouzel ale nevim jakou mame presne verzi mangosu zkusil sem podle helpu version a pise to: /0.7-SVN (Win32)

 

Share this post


Link to post
Share on other sites

bez pridaneho skriptu to nepujde a lehci prijatelna varianta na volitelne dvere pravdepodobne neexistuje..

Share this post


Link to post
Share on other sites

MOhl by si mi ten ScriptMhr.cpp upravit tak jak ma byt ?? diky

 

pouzivam mangoscript

 

/*         /\/\   __ _ _ __   __ _  ___ / _\ ___ _ __(_)_ __ | |_ 
*        /    \ / _` | '_ \ / _` |/ _ \\ \ / __| '__| | '_ \| __|
*       / /\/\ \ (_| | | | | (_| | (_) |\ \ (__| |  | | |_) | |_ 
*       \/    \/\__,_|_| |_|\__, |\___/\__/\___|_|  |_| .__/ \__|
*                           |___/                     |_|     
*                        A WHOLE NEW WORLD
*         MangoScript - Bringing a whole new world to MaNGOS
*
*      ScriptMgr.cpp - Hooks for the MaNGOS API
*
*      (c) Copyright 2006-2007 By the MangoScript Team <http://www.mangoscript.org>
*
*      This program is free software; you can redistribute it and/or modify
*      it under the terms of the GNU General Public License as published by
*      the Free Software Foundation; either version 2 of the License, or
*      (at your option) any later version.
*  
*      This program is distributed in the hope that it will be useful,
*      but WITHOUT ANY WARRANTY; without even the implied warranty of
*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*      GNU General Public License for more details.
*  
*      You should have received a copy of the GNU General Public License
*      along with this program; if not, write to the Free Software
*      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*      $Id: ScriptMgr.cpp 177 2007-03-31 17:46:38Z derex $
*/

#include "config.h"
#include "ScriptMgr.h"
#include "TargetedMovementGenerator.h"
#include "Player.h"
#include "GameObject.h"
#include "SharedDefines.h"
#include "GossipDef.h"
#include "QuestDef.h"
#include "WorldSession.h"
#include "CreatureAI.h"

#ifdef ENABLE_LUA

#include "luainc.h"
#include "LUA_Engine.h"
#include "LUA_Player.h"
#include "Lua_Unit.h"
#include "Lua_uint64.h"
#include "Lua_Creature.h"
#include "Lua_exports.h"
#include "Lua_AI.h"
#include "Lua_Chat.h"
#include "Lua_Database.h"
#include "LuaScriptMgr.h"
#include "ScriptEventSys.h"

#endif //ENABLE_LUA

#include "CppScriptMgr.h"

#include "ScriptCalls.h"

MANGOS_DLL_EXPORT
void ScriptsFree()
{
MLUA_CODE(
    LuaScriptsFree();    
    ) //MLUA_CODE
    sEventSys.Reset();

    cppScriptsFree();
}

MANGOS_DLL_EXPORT
void ScriptsInit()
{
MLUA_CODE(
LuaScriptsInit();
          ) //MLUA_CODE

cppScriptsInit();

MLUA_CODE(
    if (LUA_CheckStatus(luaL_loadfile(LuaVM, "Masterscript.lua") || lua_pcall(LuaVM, 0, 0, 0)))
        {
        ScriptsFree(); 
        return;
        }
    //going to reload all loaded AI`s if there are any at all
    //this allows you to change Creature AI at runtime
    
    load_AllAIs(); 

    )//MLUA_CODE
}

MANGOS_DLL_EXPORT
void ScriptsUpdate(const time_t& diff) 
{
sEventSys.Update(); 
//  MLUA_CODE( ) //MLUA_CODE
}

MANGOS_DLL_EXPORT
bool GossipHello ( Player * player, Creature *_Creature )
{
ML_TRY
bool retval = false;
if( cppGossipHello ( retval, player, _Creature ) )  return retval;

MLUA_CODE(
if( luaGossipHello ( retval, player, _Creature ) )  return retval;
) //MLUA_CODE

ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 action )
{
ML_TRY
bool retval = false;
if( cppGossipSelect( retval, player, _Creature, sender,action ) )  return retval;

MLUA_CODE(
if( luaGossipSelect( retval, player, _Creature, sender,action ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, char* sCode )
{
ML_TRY
bool retval = false;
if( cppGossipSelectWithCode( retval, player, _Creature, sender, action, sCode ) )  return retval;

MLUA_CODE(
if( luaGossipSelectWithCode( retval, player, _Creature, sender, action, sCode ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
{
ML_TRY
bool retval = false;
if( cppQuestAccept( retval, player, _Creature, _Quest ) )  return retval;

MLUA_CODE(
if( luaQuestAccept( retval, player, _Creature, _Quest ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool QuestSelect( Player *player, Creature *_Creature, Quest *_Quest )
{
ML_TRY
bool retval = false;
if( cppQuestSelect( retval, player, _Creature, _Quest ) )  return retval;

MLUA_CODE(
if( luaQuestSelect( retval, player, _Creature, _Quest ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool QuestComplete( Player *player, Creature *_Creature, Quest *_Quest )
{
ML_TRY
bool retval = false;
if( cppQuestComplete( retval, player, _Creature, _Quest ) )  return retval;

MLUA_CODE(
if( luaQuestComplete( retval, player, _Creature, _Quest ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool ChooseReward( Player *player, Creature *_Creature, Quest *_Quest, uint32 opt )
{
ML_TRY
bool retval = false;
if( cppChooseReward( retval, player, _Creature,_Quest, opt ) )  return retval;

MLUA_CODE(
if( luaChooseReward( retval, player, _Creature,_Quest, opt ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
uint32 NPCDialogStatus( Player *player, Creature *_Creature )
{
ML_TRY
uint32 retval = 100;
if( cppNPCDialogStatus( retval, player, _Creature ) )  return retval;

MLUA_CODE(
if( luaNPCDialogStatus( retval, player, _Creature ) )  return retval;
)//MLUA_CODE
ML_CATCH

return 100;
}

MANGOS_DLL_EXPORT
bool ItemHello( Player *player, Item *_Item, Quest *_Quest )
{
ML_TRY
bool retval = false;
if( cppItemHello( retval, player,_Item, _Quest ) )  return retval;

MLUA_CODE(
if( luaItemHello( retval, player,_Item, _Quest ) )  return retval;
)//MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool ItemQuestAccept( Player *player, Item *_Item, Quest *_Quest )
{
ML_TRY
bool retval = false;
if( cppItemQuestAccept( retval, player, _Item, _Quest ) )  return retval;

MLUA_CODE(
if( luaItemQuestAccept( retval, player, _Item, _Quest ) )  return retval;
)//MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool GOHello( Player *player, GameObject *_GO )
{
ML_TRY
bool retval = false;
if( cppGOHello( retval, player, _GO ) )  return retval;

MLUA_CODE(
if( luaGOHello( retval, player, _GO ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool GOQuestAccept( Player *player, GameObject *_GO, Quest *_Quest )
{
ML_TRY
bool retval = false;
if( cppGOQuestAccept( retval,  player, _GO, _Quest ) )  return retval;

MLUA_CODE(
if( luaGOQuestAccept( retval,  player, _GO, _Quest ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool GOChooseReward( Player *player, GameObject *_GO, Quest *_Quest, uint32 opt )
{
ML_TRY
bool retval = false;
if( cppGOChooseReward( retval, player, _GO, _Quest, opt ) )  return retval;

MLUA_CODE(
if( luaGOChooseReward( retval, player, _GO, _Quest, opt ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool AreaTrigger( Player *player, Quest *_Quest, uint32 triggerID )
{
ML_TRY
//TODO CPP PART
MLUA_CODE(
    player->PlayerTalkClass->ClearMenus();

if(LuaVM)
   return ( luabind::call_function<int>(LuaVM, "AreaTrigger",
                                                               boost::ref<Player>(*player), 
                                                               boost::ref<Quest>(*_Quest),
                                                               triggerID
                                                               ) != -1);
) //MLUA_CODE
ML_CATCH

return false;
}


MANGOS_DLL_EXPORT
bool ReceiveEmote ( Player * player, Creature *_Creature, uint32 emote_id )
{
ML_TRY
bool retval = false;
if( cppReceiveEmote ( retval, player, _Creature, emote_id ) )  return retval;

MLUA_CODE(
if( luaEmoteOnNPC ( retval, player, _Creature, emote_id ) )  return retval;
) //MLUA_CODE
ML_CATCH

return false;
}

MANGOS_DLL_EXPORT
bool OnChatMessage(Player * player, const char* message, uint32 type)
{
    bool result = false;
    MLUA_CODE(
        result = ParseMangoscriptChatCommand(player, message, type);
    ) //MLUA_CODE
    return result;
}

MANGOS_DLL_EXPORT
void OnDeath(Creature* victim , Unit* killer )
{
    ML_TRY
    if(!victim || !killer)
        return;

    if(cppOnDeath(victim, killer))
        return;

    MLUA_CODE(
        if(luaOnDeath(victim, killer)) return;
    ) //MLUA_CODE
    ML_CATCH
}

MANGOS_DLL_EXPORT
CreatureAI* GetAI(Creature *_Creature )
{
CreatureAI* ai = NULL;
ML_TRY

ai = cppGetAI(_Creature);
if(ai) return ai;

MLUA_CODE(

ai = luaGetAI(_Creature);
if(ai) return ai;

) //MLUA_CODE

ML_CATCH
if(ai) delete ai;     //if exception is thrown after allocating ai we will have memory leaks

return NULL;
}

Share this post


Link to post
Share on other sites

Tehle topic uz je trosku starsi... chtel sem se jen zeptat jdu udelat ty dvere na klic jinym zpusoben nez pridanim do mangosu? v DB sem to nikde nenasl :/ editaci DBC by to neslo? popripade jak?

urcite by to pomohlo vice lidem nez me.

Share this post


Link to post
Share on other sites
Tehle topic uz je trosku starsi... chtel sem se jen zeptat jdu udelat ty dvere na klic jinym zpusoben nez pridanim do mangosu? v DB sem to nikde nenasl :/ editaci DBC by to neslo? popripade jak?

urcite by to pomohlo vice lidem nez me.

Dvere na klic : Relic coffer key ID 11078 , Relic coffer door ID 174558 snad ti to pujde :rolleyes:

Share this post


Link to post
Share on other sites
Dvere na klic : Relic coffer key ID 11078 , Relic coffer door ID 174558 snad ti to pujde :rolleyes:

Jak udělat aby se ty dveře zavřeli např po 15s ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×