ÇÖZÜLDÜ Lua NpcMsg Mantigi

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Glad

KY Üye
Katılım
10 Ara 2023
Mesajlar
47
Tepkime puanı
2
Puanları
8
Merhaba arkadaslar,

Quest editor yaziyorum ama bir yerde takildim. Simdi ornekten gidelim
Kod:
-- Local variable declaration...
local UserClass;
local QuestNum;
local Ret = 0;
local Class;
local NPC =14301;
local savenum =104;


--Check quest when clicking
if EVENT == 240 then
   QuestNum = SearchQuest(UID, NPC);
if QuestNum == 0 then --When there are 0 quests that can be done to the relevant NPC
SelectMsg(UID, 2, -1, 241, NPC, 10, 241);
Ret = 1;
elseif QuestNum > 1 and QuestNum < 100 then--When there is only 1 quest that can be done to the relevant NPC
          NpcMsg(UID, 242, NPC)
      else --When there is more than one quest that can be done to the relevant NPC
          EVENT = QuestNum
end
end

Simdi burda ogrenmek istedigim NpcMsg, userID, questID 242 olarak atiyor. En son check edip
1703596865144.png

Burdan da questID 242 geri client a atiyor. Buraya kadar tamam.

Sonra client, quest_talk_us.tbl'den su kismi okuyor ( test edildi )
1703596975320.png

Ve gordugunuz gibi oyunda cikan sonuc bu.
1703597036350.png
ve bu buton ise quest_menu_us.tbl den geliyor

1703597070817.png

Bu 10 nerden geliyor? Neye gore buton sayisini NpcMsg kullanarak artirabiliyoruz?

Hepa disinda menisia'da bakin mesela,

1703597417350.png
Bu da quest_guide_us dan aliyor butonlari -> silk spool, bandicooth tooth -> making anfebriles pellets gorevleri ornek veriyorum.

Select_Msg kullanarak rahatca yazabiliyorum, ama npcmsg i cozmek istiyorum. Sorum budur, tesekkur ederim.

Iyi gunler
 
Çözüm
Merhaba arkadaslar,

Quest editor yaziyorum ama bir yerde takildim. Simdi ornekten gidelim
Kod:
-- Local variable declaration...
local UserClass;
local QuestNum;
local Ret = 0;
local Class;
local NPC =14301;
local savenum =104;


--Check quest when clicking
if EVENT == 240 then
   QuestNum = SearchQuest(UID, NPC);
if QuestNum == 0 then --When there are 0 quests that can be done to the relevant NPC
SelectMsg(UID, 2, -1, 241, NPC, 10, 241);
Ret = 1;
elseif QuestNum > 1 and QuestNum < 100 then--When there is only 1 quest that can be done to the relevant NPC
          NpcMsg(UID, 242, NPC)
      else --When there is more than one quest that can be done to the relevant NPC
          EVENT =...

Aakinci

Süper Moderatör
Premium Üye
KY Saygın Üye
KY YardımSever
KY Kod Editörü
Katılım
5 Tem 2021
Mesajlar
506
Çözümler
82
Tepkime puanı
238
Puanları
73
Yaş
32
Merhaba arkadaslar,

Quest editor yaziyorum ama bir yerde takildim. Simdi ornekten gidelim
Kod:
-- Local variable declaration...
local UserClass;
local QuestNum;
local Ret = 0;
local Class;
local NPC =14301;
local savenum =104;


--Check quest when clicking
if EVENT == 240 then
   QuestNum = SearchQuest(UID, NPC);
if QuestNum == 0 then --When there are 0 quests that can be done to the relevant NPC
SelectMsg(UID, 2, -1, 241, NPC, 10, 241);
Ret = 1;
elseif QuestNum > 1 and QuestNum < 100 then--When there is only 1 quest that can be done to the relevant NPC
          NpcMsg(UID, 242, NPC)
      else --When there is more than one quest that can be done to the relevant NPC
          EVENT = QuestNum
end
end

Simdi burda ogrenmek istedigim NpcMsg, userID, questID 242 olarak atiyor. En son check edip
Ekli dosyayı görüntüle 2795

Burdan da questID 242 geri client a atiyor. Buraya kadar tamam.

Sonra client, quest_talk_us.tbl'den su kismi okuyor ( test edildi )
Ekli dosyayı görüntüle 2796

Ve gordugunuz gibi oyunda cikan sonuc bu.
Ekli dosyayı görüntüle 2797
ve bu buton ise quest_menu_us.tbl den geliyor

Ekli dosyayı görüntüle 2798

Bu 10 nerden geliyor? Neye gore buton sayisini NpcMsg kullanarak artirabiliyoruz?

Hepa disinda menisia'da bakin mesela,

Ekli dosyayı görüntüle 2799
Bu da quest_guide_us dan aliyor butonlari -> silk spool, bandicooth tooth -> making anfebriles pellets gorevleri ornek veriyorum.

Select_Msg kullanarak rahatca yazabiliyorum, ama npcmsg i cozmek istiyorum. Sorum budur, tesekkur ederim.

Iyi gunler
hocam npcmsg yi tam çözebilmeniz için elinizde exe ye ait kaynak kodlarının da olması lazım. O yüzden %100 çözmek maalesef mümkün değil ama orada listelenen questleri bağlı olduğu npc ye, level e, ırk a, class a ve exp yüzdesine göre bir formüle katıp bu değerlerin tamamının eşleşmesi ile elde ettiği quest_helper tbl sindeki verileri kullanıcı ekranına aktarıyor. Eğer ki herhangi bir görev verisi bulamaz ise eşleşen sizdeki gibi onay alanı çıkartıp bulunamadığına dair bir yazı gösteriyor.
 
Çözüm
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Reklam