• 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!

NPC Collecting items and monster missions

I mean in the monster storage in the NPC, so in the local missions table.
You need to change it both in the npc and in the creatirescript if you want to change the storage numbers.
Look i will explain to you what is happening with me, i changed all storage on NPC and creature script
And they are
NPC
{name = "Rat", count = 20, storage = 31200},
{name = "Rotworm", count = 26, storage = 31202}
{name = "Dragon Lords", count = 2, storage = 31204}

local storage = 45555

And Creaturescript
['rat'] = {amount = 20, storage = 31200, startstorage = 45555, startvalue = 2},
['rotworm'] = {amount = 26, storage = 31202, startstorage = 45555, startvalue = 2},
['dragon lord'] = {amount = 2, storage = 31204, startstorage = 45555, startvalue = 4}
It is good till now ? It's working good with first time only i mean when i changed my storage to 31200-31204 was working good and he asked me for monsters and i killed them but when i restarted my server and changed my date to start new day and start to message the npc again and he asked for items and it is working good with items but with monsters i can skip it without kill any! :S that's my issue
 
You also have to reset the monster storages, same as the npc storage.
 
You also have to reset the monster storages, same as the npc storage.
F*CK this script gonna make me crazy! that's how i made it and still skipping my mission of monsters
Code:
local config = {
     ['rat'] = {amount = 20, storage = 31200, startstorage = 45555, startvalue = 2},
     ['rotworm'] = {amount = 26, storage = 31202, startstorage = 45555, startvalue = 2},
     ['dragon lord'] = {amount = 2, storage = 31204, startstorage = 45555, startvalue = 4}

}
function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]
     if isPlayer(target) or not monster or isSummon(target) then
      if not exhaustion.check(cid, 45690) and getPlayerStorageValue(cid, storage) > 0 then
        setPlayerStorageValue(cid, storage, -1)
    xstorage = getPlayerStorageValue(cid, storage)
         return true
         end
     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.')
                                                exhaustion.set(cid, 45690, 86400)

     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)
                                                         exhaustion.set(cid, 45690, 86400)

     end
     return true
end
 
In the NPC, not in the creaturescript, same place where you reset the NPC storage.
 
Just set the storages used for the monsters to -1, same place as where you set the NPC storage to -1.
 
Just set the storages used for the monsters to -1, same place as where you set the NPC storage to -1.
Look i can't make anything more cuz i think the script already destroyed so check this code and fix it please to make it work and sorry cuz i didn't understand you , just tell me what did you make after then i will check it and learn from it but i can't make it without show me what will you make :S this is error with this lua
Code:
[29/03/2015 23:57:04] [Error - LuaScriptInterface::loadFile] data/npc/scripts/norma.lua:31: '}' expected near ')'
[29/03/2015 23:57:04] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/norma.lua
[29/03/2015 23:57:04] data/npc/scripts/norma.lua:31: '}' expected near ')'
npc.Lua
Code:
https://gist.github.com/UchihaClan/e84825ec6a4ab8864241
 
Line 31: {name = "Rotworm", count = 26, storage = 31202)
) should be }
ahhaah , Thanks man but i think i can't make it :( thanks for your time , i wanted to make it but i couldn't and really i wanted it but no way :S
2zityir.jpg
 
Did you tested it with a god character or a player? If you used a god character, test it with a player since the exhaustion.check won't work for gods.
 
Did you tested it with a god character or a player? If you used a god character, test it with a player since the exhaustion.check won't work for gods.
I tested it with normal char :( i know that exhaustion.check not working with gods :S
 
https://gist.github.com/UchihaClan/e84825ec6a4ab8864241#file-i-m-suck-now-L139
Remove this line, atm it sets it to storage value 1 and right under that to -1.
removed it and found this error when i tried to reload it :(
Code:
[30/03/2015 18:11:54] [Error - LuaScriptInterface::loadFile] data/npc/scripts/norma.lua:28: '}' expected near ')'
[30/03/2015 18:11:54] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/norma.lua
[30/03/2015 18:11:54] data/npc/scripts/norma.lua:28: '}' expected near ')'

[30/03/2015 18:11:54] [Error - Npc interface]
[30/03/2015 18:11:54] (Unknown script file)
[30/03/2015 18:11:55] Description:

[30/03/2015 18:11:55] attempt to call a nil value
[30/03/2015 18:11:55] stack traceback:

[30/03/2015 18:11:55] [Error - Npc interface]
[30/03/2015 18:11:55] (Unknown script file)
[30/03/2015 18:11:55] Description:
[30/03/2015 18:11:55] Stack size changed!
[30/03/2015 18:11:55] Reloaded npcs.
[30/03/2015 18:11:55] [Error - Npc interface]
[30/03/2015 18:11:55] (Unknown script file)
[30/03/2015 18:11:56] Description:
[30/03/2015 18:11:56] attempt to call a nil value
[30/03/2015 18:11:56] stack traceback:
I think you need to reedit it :S there are too many cods on this script and i can't understand it and i tried to edit your main script and made it like this
https://gist.github.com/UchihaClan/0f4b48c1ef6463e5a96e
but i found some errors with it its skip monsters again ;S
I've got another idea, If you have another task monster and working with tfs 0.3.6, post it please
 
If you have errors, just look at the errors, read then, look at the line, look what is wrong there.
Btw there are no errors in the script you just posted: http://codepad.org/gPWcrRYH
Yea sorry but i'm reading them and i do all my best and now the problem with this npc is that i can't msg him! Btw don't forget to remove these replies, they are useless and made clutter on your script page :S
 
Haha, that's ok :p

Well all you need to do is add it exactly like you did in the npc mitrox, 100% the same, don't add other things or remove things or anything.
And reset the monster storage, same way as you did with the npc, so set it to -1.
 
Haha, that's ok, no one else seems to comment on it anyway :p

Well all you need to do is add it exactly like you did in the npc mitrox, 100% the same, don't add other things or remove things or anything.
And reset the monster storage, same way as you did with the npc, so set it to -1.
Do you think that I didn't try? i tried like 100 times but i failed lol!
 
Ok, use the original script, add the same change you did to the npx mitrox (100% the same), then set the monster storages to -1 at the same place where you set the npc storage to -1 so under exhaustion.check.
If you still have problems after that, explain with all details what the problems are and post the script.
 
Ok, use the original script, add the same change you did to the npx mitrox (100% the same), then set the monster storages to -1 at the same place where you set the npc storage to -1 so under exhaustion.check.
If you still have problems after that, explain with all details what the problems are and post the script.
May you pm me please? i have another thing i need to talk with you about it :D
 
Tried to add this to my server. It works for the items, but when it comes to killing monsters nothing happens. No errors or anything.
TFS 1.1.
 
Back
Top