Witam.!!
Pierwszy problem jest nast?puj?cy, gdy zrobi? raida wed?ug poradnik?w/opis?w w konsoli wyskakuje ci?gle ten sam b??d
Plik Raid wygl?da tak:
Drugi problem polega na tym ?eby kto? m?g? przerobi? NPC od soft?w, gdy? pobiera kase i zabiera softy, lecz nie daje z powrotem nowych?!. plik:
M?g? by Mi kto? wyja?ni? na czym to polega i poprawi? b??d.
Pozdrawiam
Pierwszy problem jest nast?puj?cy, gdy zrobi? raida wed?ug poradnik?w/opis?w w konsoli wyskakuje ci?gle ten sam b??d
"[Error - Raids:arseRaidNode] interval2 tag missing or divided by 0 for raid piraty
Plik Raid wygl?da tak:
<raids>
<raid name="piraty" file="piraty.xml" interval="40" chance="35" margin="0" />
</raids>
Drugi problem polega na tym ?eby kto? m?g? przerobi? NPC od soft?w, gdy? pobiera kase i zabiera softy, lecz nie daje z powrotem nowych?!. plik:
Kod:
function getPlayerMoney(cid)
gold = getPlayerItemCount(cid,2148)
plat = getPlayerItemCount(cid,2152)*100
crys = getPlayerItemCount(cid,2160)*10000
money = gold + plat + crys
return money
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local softItem = 'Sorry, you dont have money or soft boots.' -- Co powie npc jesli nie bedziesz mial wymaganych przez niego itemow
local softGive = 'Here you are my boss.' -- Co powie npc gdy Ci da nowe buty
if msgcontains(msg, 'offer') then
npcHandler:say('I can rapair if u have full used boots or renew if u have some minutes left',cid)
elseif msgcontains(msg, 'help') then
npcHandler:say('I can rapair if u have full used boots or renew if u have some minutes left ',cid)
------------------------------------------------------------------------------------------------
elseif msgcontains(msg, 'soft boots') or msgcontains(msg, 'repair') or msgcontains(msg, 'repair boots') then
if getPlayerItemCount(cid,10021) >= 1 and getPlayerMoney(cid,2148) >= 20000 then
npcHandler:say('Do you want me to repair your soft boots for 20k?', cid)
talkState = 1
else
npcHandler:say((softItem), cid)
end
elseif msgcontains(msg, 'yes') and talkState == 1 then
if getPlayerItemCount(cid,10021) >= 1 and getPlayerMoney(cid,2148) >= 20000 then
if doPlayerTakeItem(cid,10021,1) == 0 and doPlayerRemoveMoney(cid,20000) then
npcHandler:say((softGive), cid)
doPlayerAddItem(cid,6132, 1)
end
else
npcHandler:say((softItem), cid)
end
talkState = 0
elseif msgcontains(msg, 'renew') then
if getPlayerItemCount(cid,6132) >= 1 and getPlayerMoney(cid,2148) >= 20000 then
npcHandler:say('Do you want me to renew your soft boots for 20k?', cid)
talkState = 2
else
npcHandler:say((softItem), cid)
end
elseif msgcontains(msg, 'yes') and talkState == 2 then
if getPlayerItemCount(cid,6132) >= 1 and getPlayerMoney(cid,2148) >= 20000 then
if doPlayerTakeItem(cid,6132,1) == 0 and doPlayerRemoveMoney(cid,20000) then
npcHandler:say((softGive), cid)
doPlayerAddItem(cid,6132, 1)
end
else
npcHandler:say((softItem), cid)
end
talkState = 0
elseif msgcontains(msg, 'no') and talkState >= 1 and talkState <= 2 then
npcHandler:say('Ok than.', cid)
talkState = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
M?g? by Mi kto? wyja?ni? na czym to polega i poprawi? b??d.
Pozdrawiam
arseRaidNode] interval2 tag missing or divided by 0 for raid piraty