Jump to content
Araştır
  • Diğer seçenekler ...
Sonuçları bul ...
Sonuçları bul ...
KODevelopers

19xx Worm Kesince Rescuing Sid [YARDIM]

Önerilen Mesajlar

Worm kesince Rescuing sid save alınmıyor. Hataları bakdım log falan birşey gelmiyor.

8NPLVW.jpg

DyB5Qm.jpg

mJ4NQZ.jpg



bool CUser::QuestV2RunEvent(_QUEST_HELPER * pQuestHelper, uint32 nEventID, int8 bSelectedReward)
{
// Lookup the corresponding NPC.
if (pQuestHelper->strLuaFilename == "01_main.lua")
{
m_sEventNid = 10000;
}

CNpc * pNpc = g_pMain->GetNpcPtr(m_sEventNid, GetZoneID());
bool result = false;

m_nQuestHelperID = pQuestHelper->nIndex;
result = g_pMain->GetLuaEngine()->ExecuteScript(this, pNpc, nEventID, bSelectedReward,
pQuestHelper->strLuaFilename.c_str());

return result;
}


01_main.lua


local NATION = 0;
local NPC = 0;

if (EVENT == 500) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5000, NPC, 5000, 501);
else
SelectMsg(UID, 6, 500, 5001, NPC, 5000, 501);
end
end

if (EVENT == 501) then
NATION = CheckNation(UID);
if (NATION == 1) then
UpdateEvent(UID, 5001);
else
UpdateEvent(UID, 5004);
end
end

if (EVENT == 502) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5002, NPC, 5001, 503);
else
SelectMsg(UID, 6, 500, 5003, NPC, 5004, 503);
end
end

if (EVENT == 503) then
NATION = CheckNation(UID);
if (NATION == 1) then
UpdateEvent(UID, 5002);
else
UpdateEvent(UID, 5005);
end
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5004, NPC, 5002, 504);
else
SelectMsg(UID, 1, 500, 5005, NPC, 5005, 504);
end
end

if (EVENT == 504) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5006, NPC, 5003, 505);
else
SelectMsg(UID, 1, 500, 5007, NPC, 5003, 505);
end
end

if (EVENT == 505) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5008, NPC, 5004, 506);
else
SelectMsg(UID, 1, 500, 5009, NPC, 5004, 506);
end
end

if (EVENT == 506) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5010, NPC, 5005, 507);
else
SelectMsg(UID, 1, 500, 5011, NPC, 5005, 507);
end
end

if (EVENT == 507) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5012, NPC, 5006, 508);
else
SelectMsg(UID, 1, 500, 5013, NPC, 5006, 508);
end
end

if (EVENT == 508) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5014, NPC, 6002, 509);
else
SelectMsg(UID, 6, 500, 5015, NPC, 6002, 509);
end
end

if (EVENT == 509) then
Ret = 1;
end


UPDATE_USER_DATA Bakdım eksigi yoktur..

İletiyi paylaş


Link to post
Sitelerde Paylaş
5005 ve 5002

Eskisi de SexyKo


if (GetProtoID() == 700 || GetProtoID() == 750)
{
if (pUser->CheckExistEvent(STARTER_SEED_QUEST, 1))
g_pMain->GetLuaEngine()->ExecuteScript(pUser, nullptr, 502, -1, "0_main.lua");
}


Bunla ekledim..


if (GetProtoID() == 700 || GetProtoID() == 750 || GetProtoID() == 701 || GetProtoID() == 751)
{
if (pUser->V3_CheckExistEvent(STARTER_SEED_QUEST, 1))
{
_QUEST_HELPER * pQuestHelper ;
if (pUser->GetNation() == ELMORAD)
pQuestHelper = g_pMain->m_QuestHelperArray.GetData(5005);
else
pQuestHelper = g_pMain->m_QuestHelperArray.GetData(5002);

pUser->V3_QuestRunEvent(pQuestHelper,pQuestHelper->nEventTriggerIndex);
}
}


@ IndianaPOLIS bunla var

İletiyi paylaş


Link to post
Sitelerde Paylaş

Eğer save yapmıyorsa Lua dosyasını kontrol et main.lua dosyasının içindeki saveevent yada updatevent ibareleri eğer source ile uymuyorsa save yapmaz

İletiyi paylaş


Link to post
Sitelerde Paylaş

birde böyle dene ozaman
local NATION = 0;
local NPC = 0;

if (EVENT == 500) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5000, NPC, 5000, 501);
else
SelectMsg(UID, 6, 500, 5001, NPC, 5000, 501);
end
end

if (EVENT == 501) then
NATION = CheckNation(UID);
if (NATION == 1) then
SaveEvent(UID, 5001);
else
SaveEvent(UID, 5004);
end
end

if (EVENT == 502) then
NATION = CheckNation(UID);
if (NATION == 1) then
Warrior = isWarrior(UID);
Rogue = isRogue(UID);
Mage = isMage(UID);
Priest = isPriest(UID);
if (Warrior) then
SelectMsg(UID, 6, 500, 5002, NPC, 5001, 503);
GiveItem(UID, 511573471, 1,3)--warrior defence pathos
GiveItem(UID, 511573471, 1,3)--warrior defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
elseif (Rogue) then
SelectMsg(UID, 6, 500, 5002, NPC, 5001, 503);
GiveItem(UID, 512573472, 1,3)--rogue defence pathos
GiveItem(UID, 512573472, 1,3)--rogue defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
elseif (Mage) then
SelectMsg(UID, 6, 500, 5002, NPC, 5001, 503);
GiveItem(UID, 513573473, 1,3)--Mage defence pathos
GiveItem(UID, 513573473, 1,3)--Mage defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
elseif (Priest) then
SelectMsg(UID, 6, 500, 5002, NPC, 5001, 503);
GiveItem(UID, 514573474, 1,3)--Priest defence pathos
GiveItem(UID, 514573474, 1,3)--Priest defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
end
else
NATION = CheckNation(UID);
if (NATION == 2) then
Warrior = isWarrior(UID);
Rogue = isRogue(UID);
Mage = isMage(UID);
Priest = isPriest(UID);
if (Warrior) then
SelectMsg(UID, 6, 500, 5003, NPC, 5004, 503);
GiveItem(UID, 511573471, 1,3)--warrior defence pathos
GiveItem(UID, 511573471, 1,3)--warrior defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
elseif (Rogue) then
SelectMsg(UID, 6, 500, 5003, NPC, 5004, 503);
GiveItem(UID, 512573472, 1,3)--rogue defence pathos
GiveItem(UID, 512573472, 1,3)--rogue defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
SaveEvent(UID, 5002);
elseif (Mage) then
SelectMsg(UID, 6, 500, 5003, NPC, 5004, 503);
GiveItem(UID, 513573473, 1,3)--Mage defence pathos
GiveItem(UID, 513573473, 1,3)--Mage defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
SaveEvent(UID, 5002);
elseif (Priest) then
SelectMsg(UID, 6, 500, 5003, NPC, 5004, 503);
GiveItem(UID, 514573474, 1,3)--Priest defence pathos
GiveItem(UID, 514573474, 1,3)--Priest defence pathos
GiveItem(UID, 508051467, 1,3)--Bahamut Armor Defence
GiveItem(UID, 508053467, 1,3)--Bahamut HELMET Defence
end
end
end
end



if (EVENT == 503) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 15, -1, -1, NPC);
SaveEvent(UID, 5002);
else
SelectMsg(UID, 15, -1, -1, NPC);
SaveEvent(UID, 5005);
end
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5004, NPC, 5002, 504);
else
SelectMsg(UID, 1, 500, 5005, NPC, 5005, 504);
end
end



if (EVENT == 504) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5006, NPC, 5003, 505);
else
SelectMsg(UID, 1, 500, 5007, NPC, 5003, 505);
end
end

if (EVENT == 505) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5008, NPC, 5004, 506);
else
SelectMsg(UID, 1, 500, 5009, NPC, 5004, 506);
end
end

if (EVENT == 506) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5010, NPC, 5005, 507);
else
SelectMsg(UID, 1, 500, 5011, NPC, 5005, 507);
end
end

if (EVENT == 507) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5012, NPC, 5006, 508);
else
SelectMsg(UID, 1, 500, 5013, NPC, 5006, 508);
end
end

if (EVENT == 508) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5014, NPC, 6002, 509);
else
SelectMsg(UID, 6, 500, 5015, NPC, 6002, 509);
end
end

if (EVENT == 509) then
Ret = 1;
end
-- mesaja ek olarak --
SaveEvent(UID, 5001);
else
SaveEvent(UID, 5004);
end
end

İletiyi paylaş


Link to post
Sitelerde Paylaş
Alıntı
Eğer save yapmıyorsa Lua dosyasını kontrol et main.lua dosyasının içindeki saveevent yada updatevent ibareleri eğer source ile uymuyorsa save yapmaz


UpdateEvent kullanıyoruz.

Öyle yaptım.. GameServer printf Den birşey gelmiyor. olsa gelsek de.
-- mesaja ek olarak --
Alıntı
birde böyle dene ozaman


item verme bunla ?? "Onun demiyorumki :v" :)

İletiyi paylaş


Link to post
Sitelerde Paylaş
Alıntı
Nasıl oluyor ne demek istegini anlamadım.

Lua attı Baslangıc class itemleri verme değil mi oo ? :rolleyes:

01_main.lua Bahediyoruz..


01_main.lua içerisinde Eventları hangi şekilde update yada save ettiğine bir bak önce UpdateEvent mi SaveEvent mi hangisi olduğunu tespit et daha sonra source içerisinde LUA_FUNCTION_METHOD diye aratıp SaveEvent yada UpdateEvent var mı yok mu fonksiyon olarak ona bak yoksa eğer eklemesini yapman gerek ama şayet varsa 01_main.lua'yı kontrol et bütün UpdateEvent olanları SaveEvent yap dene yada SaveEvent olanları UpdateEvent yap dene çözüme ulaşacağından eminim..

İletiyi paylaş


Link to post
Sitelerde Paylaş
Alıntı
01_main.lua içerisinde Eventları hangi şekilde update yada save ettiğine bir bak önce UpdateEvent mi SaveEvent mi hangisi olduğunu tespit et daha sonra source içerisinde LUA_FUNCTION_METHOD diye aratıp SaveEvent yada UpdateEvent var mı yok mu fonksiyon olarak ona bak yoksa eğer eklemesini yapman gerek ama şayet varsa 01_main.lua'yı kontrol et bütün UpdateEvent olanları SaveEvent yap dene yada SaveEvent olanları UpdateEvent yap dene çözüme ulaşacağından eminim..


UpdateEvent yazmıştım. Sourcede bakmışdım sanki

İletiyi paylaş


Link to post
Sitelerde Paylaş

Nedense tek tek kontrol etmek yerine hazır önüme verilse modunda birileri sanki.
User.h içerisinde QuestSaveEvent şeklinde bir fonksiyon Lualardan "SaveEvent" ve ya "UpdateEvent" komutları ile çağırılıyor. Kontrol etmen gereken yer burası. O fonksiyona tanınmış olan komut her neyse o komutu Lua'da kullanman gerekecek.

İletiyi paylaş


Link to post
Sitelerde Paylaş
Alıntı
UpdateEvent dedim ya sourcesi de bakdım UpdateEvent den yazıyor niye anlamadın helalde ?? :v

@ TheChucky


Hala aynı kafada olman üzücü. Tekrar ediyorum altını çizerek hatta kalın harflerle.

User.h içerisinde QuestSaveEvent şeklinde bir fonksiyon Lualardan "SaveEvent" ve ya "UpdateEvent" komutları ile çağırılıyor. Kontrol etmen gereken yer burası. O fonksiyona tanınmış olan komut her neyse o komutu Lua'da kullanman gerekecek.

İletiyi paylaş


Link to post
Sitelerde Paylaş
Alıntı
UpdateEvent yazmıştım. Sourcede bakmışdım sanki


İhtimallerle hareket etmemeni tavsiye ederim.

Projende LUA_FUNCTION_METHOD olarak arama yaptır ve SaveEvent ve UpdateEvent fonksiyonlarına göz at hangisi ekliyse onun üzerinden git

İletiyi paylaş


Link to post
Sitelerde Paylaş

http://prntscr.com/gzfnt6

@ SnaypeR
@ TheChucky

buyrun kardeş.


local NATION = 0;
local NPC = 0;

if (EVENT == 500) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5000, NPC, 5000, 501);
else
SelectMsg(UID, 6, 500, 5001, NPC, 5000, 501);
end
end

if (EVENT == 501) then
NATION = CheckNation(UID);
if (NATION == 1) then
SaveEvent(UID, 5001);
else
SaveEvent(UID, 5004);
end
end

if (EVENT == 502) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5002, NPC, 5001, 503);
else
SelectMsg(UID, 6, 500, 5003, NPC, 5004, 503);
end
end

if (EVENT == 503) then
NATION = CheckNation(UID);
if (NATION == 1) then
SaveEvent(UID, 5002);
else
SaveEvent(UID, 5005);
end
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5004, NPC, 5002, 504);
else
SelectMsg(UID, 1, 500, 5005, NPC, 5005, 504);
end
end

if (EVENT == 504) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5006, NPC, 5003, 505);
else
SelectMsg(UID, 1, 500, 5007, NPC, 5003, 505);
end
end

if (EVENT == 505) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5008, NPC, 5004, 506);
else
SelectMsg(UID, 1, 500, 5009, NPC, 5004, 506);
end
end

if (EVENT == 506) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5010, NPC, 5005, 507);
else
SelectMsg(UID, 1, 500, 5011, NPC, 5005, 507);
end
end

if (EVENT == 507) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 1, 500, 5012, NPC, 5006, 508);
else
SelectMsg(UID, 1, 500, 5013, NPC, 5006, 508);
end
end

if (EVENT == 508) then
NATION = CheckNation(UID);
if (NATION == 1) then
SelectMsg(UID, 6, 500, 5014, NPC, 6002, 509);
else
SelectMsg(UID, 6, 500, 5015, NPC, 6002, 509);
end
end

if (EVENT == 509) then
Ret = 1;
end

İletiyi paylaş


Link to post
Sitelerde Paylaş
Misafir
Bu konu kapalıdır ama konuya cevap yazmaya yetkiniz var görünüyor.

×
×
  • Yeni Oluştur...