• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

limos npc missions

Nerevr back

Member
Joined
Nov 7, 2014
Messages
269
Reaction score
7
im use limos mission npc everything work oki but when start first mission i took all mission
example when start dragon mission and go kill dragon lord i fount it count :S i want fix it to no count if i don't start mission from npc

i started first mission collect items but when kill dragon
16:49 Task message: 1 of 2 Dragons killed.

sorry for bad english
npc
http://pastebin.com/frSUfSrp

creaturescript
Code:
local config = {
     ['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 1},
     ['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 1}
}
function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]
     if isPlayer(target) or not monster or isSummon(target) then
         return true
     end

     if (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then
         setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Task message: '..(getPlayerStorageValue(cid, monster.storage)+1)..' of '..monster.amount..' '..getCreatureName(target)..'s killed.')
     end
     if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..(getPlayerStorageValue(cid, monster.storage)+1)..' '..getCreatureName(target)..'s and completed the '..getCreatureName(target)..'s mission.')
         setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
     end
     return true
end
 
Last edited:
First u have to pumb every 24 hours
I don't see anything bad in script
Not sure because im use phone no pc
 
Code:
local config = {
['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 1},
['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 1}
}
Your dragon and dragon lord start storages are both the same.
Either you need to change the startstorage, or the startvalue.. whichever is required inside the npc.
 
When change startstorage don't work and startvalue too
Code:
local config = {
['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 1},
['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 1}
}
Your dragon and dragon lord start storages are both the same.
Either you need to change the startstorage, or the startvalue.. whichever is required inside the npc.
 
I don't see dragons inside his NPC only dragon lords and the storage for them is: 21902 not 21901.

Here is the problem though..

Code:
'Task message: '..(getPlayerStorageValue(cid, monster.storage)+1)..' of '..monster.amount..' '..getCreatureName(target)..'s killed.')

Code:
'Task message: '..getPlayerStorageValue(cid, monster.storage)..' of '..monster.amount..' '..getCreatureName(target)..'s killed.')

You need to take the + 1 out.

The reason for that is:
Code:
storage = 0
setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)
now storage = 1
text("player storage"..getPlayerStorageValue(cid, storage)..".")
text = "player storage 1"

Code:
If you put:
text("player storage"..getPlayerStorageValue(cid, storage) + 1..".")
text = "player storage 2"

Just use this if you cant figure it out...

Code:
local config = {
     ['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 1},
     ['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 1}
}
function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]
     if isPlayer(target) or not monster or isSummon(target) then
         return true
     end
    
    if not monster then return true end
    
    pstorage = getPlayerStorageValue(cid, monster.storage)
    pstorage2 = getPlayerStorageValue(cid, monster.startstorage)
    
     if pstorage < monster.amount and pstorage2 >= monster.startstorage then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Task message: "..(pstorage+1).." of "..monster.amount.." "..getCreatureName(target).."('s) killed.")
        setPlayerStorageValue(cid, monster.storage, pstorage + 1)
    elseif pstorage + 1 == monster.amount and pstorage2 >= monster.startstorage
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you have killed "..(pstorage+1)..' '..getCreatureName(target).."('s) and completed the "..getCreatureName(target).."('s) mission.")
        setPlayerStorageValue(cid, monster.storage, pstorage + 1)
    end
     return true
end
 
Last edited by a moderator:
Yes this npc not mine i edite mine but can't writte because more than 1000 words
I will test it i'm out now

not work :S no error but when kill monster don't count :S
I don't see dragons inside his NPC only dragon lords and the storage for them is: 21902 not 21901.

Here is the problem though..

Code:
Just use this if you cant figure it out...

[code]
local config = {
     ['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 1},
     ['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 1}
}
function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]
     if isPlayer(target) or not monster or isSummon(target) then
         return true
     end
   
    if not monster then return true end
   
    pstorage = getPlayerStorageValue(cid, monster.storage)
    pstorage2 = getPlayerStorageValue(cid, monster.startstorage)
   
     if pstorage < monster.amount and pstorage2 >= monster.startstorage then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Task message: "..(pstorage+1).." of "..monster.amount.." "..getCreatureName(target).."('s) killed.")
        setPlayerStorageValue(cid, monster.storage, pstorage + 1)
    elseif pstorage + 1 == monster.amount and pstorage2 >= monster.startstorage
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you have killed "..(pstorage+1)..' '..getCreatureName(target).."('s) and completed the "..getCreatureName(target).."('s) mission.")
        setPlayerStorageValue(cid, monster.storage, pstorage + 1)
    end
     return true
end

anyone can help me please ???

F5
 
Last edited by a moderator:
Code:
local config = {
     ['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 2},
     ['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 4}
}
function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]
     if isPlayer(target) or not monster or isSummon(target) then
         return true
     end

     if (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then
         setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Task message: '..(getPlayerStorageValue(cid, monster.storage)+1)..' of '..monster.amount..' '..getCreatureName(target)..'s killed.')
     end
     if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..(getPlayerStorageValue(cid, monster.storage)+1)..' '..getCreatureName(target)..'s and completed the '..getCreatureName(target)..'s mission.')
         setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
     end
     return true
end
 
Code:
local config = {
     ['dragon'] = {amount = 2, storage = 21900, startstorage = 45551, startvalue = 2},
     ['dragon lord'] = {amount = 3, storage = 21901, startstorage = 45551, startvalue = 4}
}
function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]
     if isPlayer(target) or not monster or isSummon(target) then
         return true
     end

     if (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then
         setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Task message: '..(getPlayerStorageValue(cid, monster.storage)+1)..' of '..monster.amount..' '..getCreatureName(target)..'s killed.')
     end
     if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..(getPlayerStorageValue(cid, monster.storage)+1)..' '..getCreatureName(target)..'s and completed the '..getCreatureName(target)..'s mission.')
         setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
     end
     return true
end

work good but when need to add new mission make startvalue 6 and than 8 and 12 or what ?
 
nKCzB9n.png
 
Back
Top