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

Script do not use storage [Reissued]

zydent

Member
Joined
Mar 4, 2012
Messages
35
Reaction score
7
Location
Medellín, Colombia.
As I can make this script do not use storage:
Code:
local quests =
{
	{ 1111, "Rat", 1, 2160, 10, "Congratulations! You finished a first quest of Rats!" }, -- storage of starts quest, monster, count to kill, gift id, gift count, message on finish
	{ 1112, "Demon", 1, 2400, 1, "Congratulations!" },
	{ 1113, "Rat", 5, 2160, 2, "Congratulations! You finished a second quest of Rats!" }
}
 
function onKill(cid, target, lastHit)
	if (not isMonster(target)) then
		return false
	end
 
	for i=1, #quests do
		if (getCreatureName(target) == quests[i][2] and not (getPlayerStorageValue(cid, quests[i][1]) > quests[i][3])) then
			if (getPlayerStorageValue(cid, quests[i][1]) == -1) then
				doPlayerSetStorageValue(cid, quests[i][1], 0)
			end
			doPlayerSetStorageValue(cid, quests[i][1], (getPlayerStorageValue(cid, quests[i][1])+1))
			if (getPlayerStorageValue(cid, quests[i][1]) == quests[i][3]) then
				doPlayerAddItem(cid, quests[i][4], quests[i][5])
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, quests[i][6])
			end
			return true
		end
	end
	return true
end

Some kind person who can help me is appreciated.

Reissued*
 
Last edited:
Then you posted in wrong board, Requests is where you should have posted, however seems you are new so i'll let you off ;)

There are scripts for this already released
I would search for it but i am at college and don't have too much time, you'll find it among the resources board.

Regards
 
You dont want script to use storage? Isn't that quite bothersome? D:
 
Back
Top