Çözüldü Quest die fonksiyonu

  • Konuyu açan Konuyu açan hiqermod
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 9
  • Gösterim Gösterim 1K
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

hiqermod

Üye
Üye
Mesaj
124
Çözümler
14
Beğeni
40
Puan
454
Ticaret Puanı
0
Merhaba arkadaşlar quest fonksiyonlarını öğrenmeye başladım bir kaç örnekten sonra sıra die fonksiyonuna geldi

quest:
Genişlet Daralt Kopyala
quest deneme begin
    state start begin
        

        when die begin
        syschat("Öldün")
        end
        
        when kill begin
        syschat("can aldın")
        end
    end
end

yukarıdaki questi yazdım kill çalışıyor fakat die yi çalıştıramadım object leri temizledim ./qc yaptım /reload qc yaptım reboot attım ama sonuç kesinlikle değişmedi şimdiden herkese teşekkürler iyi forumlar
 
Çözüm
büyük ihtimal syntaxlarım hatalı aşina olmadığım için araştırmaya devam ediyorum

çözümü paylaşıyorum

öncelikle quest.h a giriyoruz

bu satırı aratıyoruz:

QUEST_ITEM_INFORMER_EVENT,

hemen altına ekliyoruz

QUEST_DEAD_EVENT,

daha sonra questmanager.cpp giriyoruz

aratıyoruz:

m_mapEventName.insert(TEventNameMap::value_type("item_informer", QUEST_ITEM_INFORMER_EVENT));

altına ekliyoruz:

m_mapEventName.insert(TEventNameMap::value_type("dead", QUEST_DEAD_EVENT));

ve aynı dosyaya şu fonksiyonu ekliyoruz


C++:
Genişlet Daralt Kopyala
void CQuestManager::Dead(unsigned int pc)

    {
        PC * pPC;

        if ((pPC = GetPC(pc)))
        {
            if (!CheckQuestLoaded(pPC))
                return;

            m_mapNPC[QUEST_NO_NPC].OnDead(*pPC);
        }...
To activate the Quest, you must put the Quest in the appropriate path first
Like:
/ usr / game / share / locale / turkey / quest

and ./qc "Quest Name"

and After That
You must make sure that the Quest will work
Go To Object and state
Like This
/ usr / game / share / locale / turkey / quest / object / state

and You will See Quest Name

And in the game, type
/ reload q
And Try
 
To activate the Quest, you must put the Quest in the appropriate path first
Like:
/ usr / game / share / locale / turkey / quest

and ./qc "Quest Name"

and After That
You must make sure that the Quest will work
Go To Object and state
Like This
/ usr / game / share / locale / turkey / quest / object / state

and You will See Quest Name

And in the game, type
/ reload q
And Try
i did it all but doesnt work :(
 
quest_functions dosyanızı kontrol ettiniz mi? Orda "die" ya da "player_die" fonksiyonu var mı bir bakın isterseniz.
 
quest_functions dosyanızı kontrol ettiniz mi? Orda "die" ya da "player_die" fonksiyonu var mı bir bakın isterseniz.
durumlar birazcık daha farklı bir yöne gitti source dosyalarımdan questmanager.cpp ye baktığımda eventlerin eksik olduğunu farkettim şuan eventleri ekleyip tekrar derledim fakat yinede çalışmadı
questmanager.cpp:
Genişlet Daralt Kopyala
        m_mapEventName.insert(TEventNameMap::value_type("buy", QUEST_BUY_EVENT)); //omer ekledi
        m_mapEventName.insert(TEventNameMap::value_type("die", QUEST_DEAD_EVENT)); //omer ekledi
        m_mapEventName.insert(TEventNameMap::value_type("execute", QUEST_EXECUTE_EVENT)); // omer ekledi

questmanager.cpp
questmanager.h
questnpc.cpp
questnpc.h
quest.h

dosyalarına eklemeler yaptım
 
O zaman bu durumda syserr almış olmanız gerekiyor. Eğer syserr kaydı varsa paylaşabilir misiniz ?
 
O zaman bu durumda syserr almış olmanız gerekiyor. Eğer syserr kaydı varsa paylaşabilir misiniz ?
ch1 syserr:
Genişlet Daralt Kopyala
SYSERR: Dec  6 12:21:00 :: pid_init:
Start of pid: 5902

SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:02 :: SetShopItems: not enough shop window
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: hanma_boss have not motlist.txt vnum(6191) folder(hanma_boss)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: hanma_boss have not motlist.txt vnum(6191) folder(hanma_boss)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: hanma_boss have not motlist.txt vnum(6191) folder(hanma_boss)
SYSERR: Dec  6 12:21:08 :: LoadMotion: cannot find accumulation data in file 'data/monster/lion_white/run.msa'
SYSERR: Dec  6 12:21:08 :: LoadMotion: cannot find accumulation data in file 'data/monster/boar_2/run.msa'
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: dog_god2 have not motlist.txt vnum(20116) folder(dog_god2)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: dog_god2 have not motlist.txt vnum(20116) folder(dog_god2)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: dog_god2 have not motlist.txt vnum(20116) folder(dog_god2)
SYSERR: Dec  6 12:21:08 :: LoadMotion: cannot find accumulation data in file 'data/monster/fire_tiger_2/run.msa'
SYSERR: Dec  6 12:21:08 :: LoadMotion: cannot find accumulation data in file 'data/monster/lion_2/run.msa'
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: leechung have not motlist.txt vnum(20369) folder(leechung)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: leechung have not motlist.txt vnum(20369) folder(leechung)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: leechung have not motlist.txt vnum(20369) folder(leechung)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: spy1 have not motlist.txt vnum(20370) folder(spy1)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: spy1 have not motlist.txt vnum(20370) folder(spy1)
SYSERR: Dec  6 12:21:08 :: GetMotionFileName: Motion: spy1 have not motlist.txt vnum(20370) folder(spy1)
SYSERR: Dec  6 12:21:33 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 5, 417600, 956100, 0, 'LOGIN', '84.51.58.56 6325 1 1 200000', '84.51.58.56') errno: 1406)
SYSERR: Dec  6 12:21:33 :: ChildLoop: AsyncSQL: query failed: Incorrect integer value: 'Y' for column `log`.`loginlog2`.`is_gm` at row 1 (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'Y', NOW(), 1, 2, 5, inet_aton('84.51.58.56'), '') errno: 1366)
SYSERR: Dec  6 12:21:53 :: ChildLoop: AsyncSQL: query failed: Incorrect string value: '\xE7 Ay\xFD' for column `log`.`log`.`hint` at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 5, 418995, 958029, 180, 'DEAD_BY_NPC', 'Aç Ayı', '84.51.58.56') errno: 1366)

syserr kaydım bu şekilde bildiğim kadarıyla burda questle ilgili bişey yok yine bilinmezlerin içerisindeyim :)
 
Burada da aynı konu tartışılmış ve sanırım çözülmüş. Bakmanızda fayda var.
Linkleri görebilmek için giriş yap veya kayıt ol.
bende ona baktım fakat ordada şu kısımda patlıyoruz

questpc.h:
Genişlet Daralt Kopyala
bool NPC::OnDead(PC & pc)
{
if (m_vnum)
return HandleEvent(pc, QUEST_DEAD_EVENT);
else
return HandleReceiveAllEvent(pc, QUEST_DEAD_EVENT);
}

küme parantezi olan kısmı kabul etmiyor malesef
 
büyük ihtimal syntaxlarım hatalı aşina olmadığım için araştırmaya devam ediyorum

çözümü paylaşıyorum

öncelikle quest.h a giriyoruz

bu satırı aratıyoruz:

QUEST_ITEM_INFORMER_EVENT,

hemen altına ekliyoruz

QUEST_DEAD_EVENT,

daha sonra questmanager.cpp giriyoruz

aratıyoruz:

m_mapEventName.insert(TEventNameMap::value_type("item_informer", QUEST_ITEM_INFORMER_EVENT));

altına ekliyoruz:

m_mapEventName.insert(TEventNameMap::value_type("dead", QUEST_DEAD_EVENT));

ve aynı dosyaya şu fonksiyonu ekliyoruz


C++:
Genişlet Daralt Kopyala
void CQuestManager::Dead(unsigned int pc)

    {
        PC * pPC;

        if ((pPC = GetPC(pc)))
        {
            if (!CheckQuestLoaded(pPC))
                return;

            m_mapNPC[QUEST_NO_NPC].OnDead(*pPC);
        }
        else
            sys_err("QUEST no such pc id : %d", pc);
    }

ardından questmanager.h açıyoruz

şunu aratıyoruz:

void Kill(unsigned int pc, unsigned int npc);

ve altına ekliyoruz

void Dead(unsigned int pc);

C++:
Genişlet Daralt Kopyala
bool NPC::OnDead(PC& pc)

    {
        return HandleReceiveAllEvent(pc, QUEST_DEAD_EVENT);
    }

daha sonra questnpc.h a geliyoruz ve aratıyoruz:

bool OnKill(PC& pc);

ve altına şunu ekliyoruz:

bool OnDead(PC& pc);

ve son olarakta char_battle.cpp yi açıyoruz ve aratıyoruz:

Kod:
Genişlet Daralt Kopyala
void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)

ve { parantezden sonrasına ekliyoruz:

quest::CQuestManager::instance().Dead(GetPlayerID());

böylelikle sisteme dead komutunu eklemiş oluyoruz

when dead begin

end

destekler için teşekkürler! Yenicerii ve maradona150
 
Çözüm
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Üst