Thorn
Spriting since 2013
Hello guys, my server is otx 2.52 (tfs 0.3 i think)
and i have this huge and terrible problem with daily mission npc
i beg for help plzzzz i tried but i can't figure to work this out
Also if i remove the tag script at the monster the error stop but the npc doesn't work properly
i am basically using this guy Astra for making several npcs (daily quest killing, daily quest killing pr1, pr5, pr10, pr15 and pr20)
NPC - [FIXED] NPC with daily quests, fully configurable! by andu
i'll post what i have
creaturescripts.xml
login.lua
monster dragon in daily quest killing event
and this is dailyQuestsKilling.lua and dailyQuestsKillingpr1.lua
plz guys someone help me fix this thing
and i have this huge and terrible problem with daily mission npc
i beg for help plzzzz i tried but i can't figure to work this out
Also if i remove the tag script at the monster the error stop but the npc doesn't work properly
i am basically using this guy Astra for making several npcs (daily quest killing, daily quest killing pr1, pr5, pr10, pr15 and pr20)
NPC - [FIXED] NPC with daily quests, fully configurable! by andu
i'll post what i have
creaturescripts.xml
LUA:
<event type="kill" name="Daily quests killing" event="script" value="dailyQuestsKilling.lua"/>
<event type="kill" name="Daily quests killing pr1" event="script" value="dailyQuestsKillingpr1.lua"/>
<event type="kill" name="Daily quests killing pr5" event="script" value="dailyQuestsKillingpr5.lua"/>
<event type="kill" name="Daily quests killing pr10" event="script" value="dailyQuestsKillingpr10.lua"/>
<event type="kill" name="Daily quests killing pr15" event="script" value="dailyQuestsKillingpr15.lua"/>
<event type="kill" name="Daily quests killing pr20" event="script" value="dailyQuestsKillingpr20.lua"/>
login.lua
Code:
registerCreatureEvent(cid, "Daily quests killing")
registerCreatureEvent(cid, "Daily quests killing pr1")
registerCreatureEvent(cid, "Daily quests killing pr5")
registerCreatureEvent(cid, "Daily quests killing pr10")
registerCreatureEvent(cid, "Daily quests killing pr15")
registerCreatureEvent(cid, "Daily quests killing pr20")
monster dragon in daily quest killing event
LUA:
registerCreatureEvent(cid, "Daily quests killing")
registerCreatureEvent(cid, "Daily quests killing pr1")
registerCreatureEvent(cid, "Daily quests killing pr5")
registerCreatureEvent(cid, "Daily quests killing pr10")
registerCreatureEvent(cid, "Daily quests killing pr15")
registerCreatureEvent(cid, "Daily quests killing pr20")
and this is dailyQuestsKilling.lua and dailyQuestsKillingpr1.lua
LUA:
local mobsList = {
["dragon"] = {storage = 345673, raceName = "Dragons"}, -- storage have to be exacly the same as in your npc file!
["demon"] = {storage = 345674, raceName = "Demons"},
["goku"] = {storage = 345675, raceName = "Gokus"},
["ozaru"] = {storage = 345676, raceName = "ozarus"}
}
function onKill(cid, target, lastHit)
local mob = mobsList[getCreatureName(target):lower()]
if isPlayer(cid) then
if mob then
local check = getCreatureStorage(cid, mob.storage)
if check >= 0 and check < 5000 then
doPlayerSetStorageValue(cid, mob.storage, check + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, mob.raceName .. " killed: " .. (check + 1) .. ".")
end
end
end
return true
end
LUA:
local mobsList = {
["Lord of Fire"] = {storage = 345679, raceName = "Lord of Fire"}, -- storage have to be exacly the same as in your npc file!
["rosemarie"] = {storage = 345680, raceName = "rosemarie"},
["dark cucka"] = {storage = 345681, raceName = "dark cucka"},
["alien"] = {storage = 345682, raceName = "alien"},
["alien destructor"] = {storage = 345683, raceName = "alien destructor"}
}
function onKill(cid, target, lastHit)
local mob = mobsList[getCreatureName(target):lower()]
if isPlayer(cid) then
if mob then
local check = getCreatureStorage(cid, mob.storage)
if check >= 0 and check < 5000 then
doPlayerSetStorageValue(cid, mob.storage, check + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, mob.raceName .. " killed: " .. (check + 1) .. ".")
end
end
end
return true
end
plz guys someone help me fix this thing