I have no idea whats wrong, i been doing saga system and somehow it stoppd to adding playerstorage, while all is same...
Just look:
Gave only 1st and last one as example
somehow its stops on this one
So as u see it been working fine till 12th, ( w/o npc storage)
Is it possible NPC breaks somehow the storage or something or maybe intvalue?(but i though lua doesnt do nothing to that) ((it been working fine as i said till 13th saga, but 11 was killing monster, 12 was talk to npc which been setting to 13)) Cuz dont see here nothing wrong:
No errors in console, all works fine, but as i said, it somehow stops to adding storage, tried also to do same script and call it saga2, registered etc, but same..... Storage limit on same ID? i dont think so cuz task/saga systems got much more than only 11.....
TFS 0,4 rev 3777, windows and if its important too source compiled by this guide:
And i forgot to mention, even if i add storage manually as admin, the next ones doesnt adds storage too.
/edit
Im also looking for some help how to make it to be table? not sure how to call it, i mean to do all loads it 1 script than making 50~XD
Im fresh so any guide/tips/help will be awesome, or if someone will do ready table will be sweet if add explain how it works/add etc.
Strange thing it does work till that storage 8000,13
Do i need later to add other ones on login.lua? (no global.lua at this rev) but i dont think so, if earlier works fine....so any ideas/what im doing wrong pls?
Thanks
Just look:
Code:
function onKill(cid, target)
if isMonster ( target ) and
getCreatureName ( target ) == 'first saga' and
getPlayerStorageValue ( cid ,stor) == 1 then
setPlayerStorageValue(cid, 8000, 2)
return true
end
if isMonster ( target ) and
getCreatureName ( target ) == 'last saga' and
getPlayerStorageValue ( cid ,stor) == 20 then
setPlayerStorageValue(cid, 8000, 21)
end
return true
end
somehow its stops on this one
Code:
if isMonster ( target ) and
getCreatureName ( target ) == 'special saga' and
getPlayerStorageValue ( cid ,stor) == 13 then
setPlayerStorageValue(cid, 8000, 14)
return true
end
So as u see it been working fine till 12th, ( w/o npc storage)
Is it possible NPC breaks somehow the storage or something or maybe intvalue?(but i though lua doesnt do nothing to that) ((it been working fine as i said till 13th saga, but 11 was killing monster, 12 was talk to npc which been setting to 13)) Cuz dont see here nothing wrong:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if(msgcontains(msg, 'saga')) then
if getPlayerStorageValue(cid, 8000) == 12 then
selfSay('Go and do ur another saga', cid)
setPlayerStorageValue(cid, 8000, 13)
talkState[talkUser] = 1
return true
else
selfSay('You dont have this saga.', cid)
talkState[talkUser] = 0
end
elseif(msgcontains(msg, 'next saga')) then
if getPlayerStorageValue(cid, 8000) == 14 then
selfSay('So ur ready to do next saga!', cid)
setPlayerStorageValue(cid, 8000, 15)
talkState[talkUser] = 1
return true
else
selfSay('You dont have this saga.', cid)
talkState[talkUser] = 0
end
elseif(msgcontains(msg, 'no')) then
selfSay('Bye then', cid)
talkState[talkUser] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
TFS 0,4 rev 3777, windows and if its important too source compiled by this guide:
C++ - How to make monster attack only player with storage
Hi there, I've got problem to solve, idk how to refere to attacker at isTarget method in monster.cpp bool Monster::isTarget(Creature* creature) { if(creature->isSagaMonster()){ return (!creature->isRemoved() && creature->isAttackable() && (creature->isSagaMonster() &&...
otland.net
And i forgot to mention, even if i add storage manually as admin, the next ones doesnt adds storage too.
/edit
Im also looking for some help how to make it to be table? not sure how to call it, i mean to do all loads it 1 script than making 50~XD
Im fresh so any guide/tips/help will be awesome, or if someone will do ready table will be sweet if add explain how it works/add etc.
Strange thing it does work till that storage 8000,13
Do i need later to add other ones on login.lua? (no global.lua at this rev) but i dont think so, if earlier works fine....so any ideas/what im doing wrong pls?
Thanks
Last edited: