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

posible ?

Lbtg

Advanced OT User
Joined
Nov 22, 2008
Messages
2,398
Reaction score
165
is posible to make , that player then he killed 50 player doenst care if it was skulled . after 50 kills he recieve 1 item .
and every time then he making 50 kills he recieving that item.
is posible to make this script ?
please help me

sorry for me english
 
Last edited:
LUA:
local storage = 101

function onKill(cid, target, lastHit)
	if isPlayer(target) then
		local k = math.max(0, getCreatureStorage(cid, storage)) + 1
		if k == 50 then
			doCreatureSetStorage(cid, storage)
			doPlayerAddItem(cid, 2345, 1)
		else
			doCreatureSetStorage(cid, storage, k)
		end
	end
	return true
end
 
LUA:
local storage = 101

function onKill(cid, target, lastHit)
	if isPlayer(target) then
		local k = math.max(0, getCreatureStorage(cid, storage)) + 1
		if k == 50 then
			doCreatureSetStorage(cid, storage)
			doPlayerAddItem(cid, 2345, 1)
		else
			doCreatureSetStorage(cid, storage, k)
		end
	end
	return true
end

Hey... Cikotitan... viewing your script, i have some doubts...
LUA:
(0, getCreatureStorage(cid, storage)) + 1
It's my idea or there is missing a or a wrong )
LUA:
doCreatureSetStorage(cid, storage)
Here... i know its good ... no problem, but what will be th value of the storage after that??? -1???

- Other doubt is that the storage will be -1 at the beggin... so he need to kill 51 before he gets the item... i think you can put the script that he needs to register in login.lua.... :D
I'm only a begginer....
 
Oks... and about the
LUA:
doCreatureSetStorage(cid, storage)
With that it sets it to 0 or to -1???
I have the doubt....
Aaaaah
I forgot something...
He needs a onLogin script to set the value of the storage to 0 if its -1.... Because the storage's value is -1 if you don't use them.....

How is my English? I ask because my native language is Spanish... I'm from Chile xD
 
Back
Top