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

PET NPC si item satmıyor

Önerilen Mesajlar

merhaba ustadlar, başlıkta belirttiğim gibi bir sorunum var.
KAUL görevini yaptıktan sonra aynı NPC den süt veya farklı bir item almaya çalıştığım zaman satın alınmıyor. LUA tarafına baktım yalnız birşey anlayamadım DB deki item numaraları ile aynı olan bir şey yok.

şimdiden teşekkürler.

Örnek " SÜT " ITEM ID : 389590000


local NPC = 13016;
local Ret = 0;
-----------------------------------------------------
if (EVENT == 500) then
QuestNum = SearchQuest(UID, NPC);
if (QuestNum == 0) then
SelectMsg(UID, 2, -1, 4515, NPC, 10, 153);
elseif (QuestNum > 1 and QuestNum NpcMsg(UID, 4704, NPC)
else
EVENT = QuestNum
end
end
-----------------------------------------------------
if (EVENT == 153) then
Ret = 1;
end
-----------------------------------------------------
if (EVENT == 1010) then
SaveEvent(UID, 5401);
end
-----------------------------------------------------
if (EVENT == 1012) then
MonsterSub = ExistMonsterQuestSub(UID);
if (MonsterSub == 0) then
SelectMsg(UID, 2, 78, 4704, NPC, 3000, 1015,3005,153);
else
SelectMsg(UID, 2, 78, 4706, NPC, 10, 153);
end
end
-----------------------------------------------------
if (EVENT == 1015) then
SelectMsg(UID, 4, 78, 4706, NPC, 22, 1013, 23, 8274);
end
-----------------------------------------------------
if (EVENT == 1013) then
SaveEvent(UID, 5402);
end
-----------------------------------------------------
if (EVENT == 1020) then
SaveEvent(UID, 5404);
end
-----------------------------------------------------
if (EVENT == 1016) then
MonsterCount01 = CountMonsterQuestSub(UID, 78, 1);
MonsterCount02 = CountMonsterQuestSub(UID, 78, 2);
MonsterCount03 = CountMonsterQuestSub(UID, 78, 3);
MonsterCount04 = CountMonsterQuestSub(UID, 78, 4);
if (MonsterCount01 > 9 and MonsterCount02 > 9 and MonsterCount03 > 9 and MonsterCount04 > 9) then
SelectMsg(UID, 4, 78, 4707, NPC, 3006, 1018, 3008, 101);
else
SelectMsg(UID, 2, 78, 4705, NPC, 18, 1017);
end
end
-----------------------------------------------------
if (EVENT == 1017) then
ShowMap(UID, 1);
end
-----------------------------------------------------
if (EVENT == 1018) then
SLOTKONTROL = CheckGiveSlot(UID, 2)
if SLOTKONTROL == false then
SelectMsg(UID,2,-1,8898,NPC,10)
else
RunExchange(UID,534)
SaveEvent(UID, 5403);
end
end
-----------------------------------------------------
if (EVENT == 600) then
SelectMsg(UID, 3, -1, 4834, NPC ,4263, 2100, 4264, 2200, 4265, 2300,4337,2400);
end
-----------------------------------------------------
if (EVENT == 2100) then
SelectMsg(UID, 9, -1,NPC);
end
-----------------------------------------------------
if (EVENT == 2200) then
ITEMA = HowmuchItem(UID, 800090000);
if (ITEMA > 1) then
SelectMsg(UID, 17, -1,NPC);
else
SelectMsg(UID, 2, -1, 4833, NPC, 27, 1005);
end
end
-----------------------------------------------------
if (EVENT == 2300) then
SelectMsg(UID, 14, -1, NPC);
end
-----------------------------------------------------
if (EVENT == 2400) then
SelectMsg(UID, 3, -1, 820, NPC,4344,3000,4345,3001,7551,3002,3019);
end
-----------------------------------------------------
if (EVENT == 3000) then
MagicBag = HowmuchItem(UID, 800440000);
if (MagicBag > 0) then
EVENT = 3007
else
SelectMsg(UID, 2, -1, 823, NPC, 10, -1)
end
end
-----------------------------------------------------
if (EVENT == 3007) then
SLOTKONTROL = CheckGiveSlot(UID, 1)
if SLOTKONTROL == false then
SelectMsg(UID,2,-1,8898,NPC,10)
else
RobItem(UID, 800440000, 1)
GiveItem(UID, 700011001, 1,30)
SelectMsg(UID, 2, -1, 9273, NPC, 10, -1)
end
end
-----------------------------------------------------
if (EVENT == 3001) then
ITEM = HowmuchItem(UID, 800450000);
if (ITEM > 0) then
EVENT = 3010
else
SelectMsg(UID, 2, -1, 824, NPC, 10, -1)
end
end

if (EVENT == 3010) then
SLOTKONTROL = CheckGiveSlot(UID, 1)
if SLOTKONTROL == false then
SelectMsg(UID,2,-1,8898,NPC,10)
else
RobItem(UID, 800450000, 1)
GiveItem(UID, 700012000, 1,30)
SelectMsg(UID, 2, -1, 9273, NPC, 10,-1)
end
end
-----------------------------------------------------
if (EVENT == 3002) then
SelectMsg(UID, 3, -1, 820, NPC,7552,3003,7553,3005);
end
-----------------------------------------------------
if (EVENT == 3003) then
HP = HowmuchItem(UID, 810115000);
if (HP > 0) then
EVENT = 3004
else
SelectMsg(UID, 2, -1, 10365, NPC, 10, -1)
end
end
-----------------------------------------------------
if (EVENT == 3004) then
SLOTKONTROL = CheckGiveSlot(UID, 1)
if SLOTKONTROL == false then
SelectMsg(UID,2,-1,8898,NPC,10)
else
RobItem(UID, 810115000, 1)
GiveItem(UID, 810117000, 1,30)
SelectMsg(UID, 2, -1, 9273, NPC, 10,-1)
end
end
-----------------------------------------------------
if (EVENT == 3005) then
MP = HowmuchItem(UID, 810116000);
if (MP > 0) then
EVENT = 3006
else
SelectMsg(UID, 2, -1, 10366, NPC, 10, -1)
end
end
-----------------------------------------------------
if (EVENT == 3006) then
SLOTKONTROL = CheckGiveSlot(UID, 1)
if SLOTKONTROL == false then
SelectMsg(UID,2,-1,8898,NPC,10)
else
RobItem(UID, 810116000, 1)
GiveItem(UID, 810118000, 1,30)
SelectMsg(UID, 2, -1, 9273, NPC, 10,-1)
end
end

İletiyi paylaş


Link to post
Sitelerde Paylaş
Admin

void CUser::ItemTrade(Packet & pkt)


fonksiyonu içerisinde kontrol mevcut aşağıdaki vereceğim gibi ona Pet Shop NPC bilgilerine SQL üzerinden bak type kaç ise ona göre sende ekleme yap onun üstünden.


(pNpc->GetType() != NPC_MERCHANT && pNpc->GetType() != NPC_TINKER)

İletiyi paylaş


Link to post
Sitelerde Paylaş

teşekkür ederim ustad -- mesaja ek olarak --
Ustad SQL dan baktım.

NPC nin görüntüsü şu şekilde;
hetniz

ayrıca visual deki görüntüsü de şu şekilde;

hetod1

tam olarak nasıl bir kod ile ekleme yapmalıyım ?
çünkü bu paketlerin arasında diğer NPC lerin örneği yok onlara bakıp ekleme yapabilmem için..
-- mesaja ek olarak --
hetod1
-- mesaja ek olarak --
teşekkür ederim sorun çözüldü.

İletiyi paylaş


Link to post
Sitelerde Paylaş

×
×
  • Yeni Oluştur...