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

!get Potions

Ceejzor

Murica Born N Raised!
Joined
Jul 5, 2008
Messages
2,293
Reaction score
188
Location
USA - Philippines
IS there anyone who could make a script for example I could say !get gsp or !get uhp and it gives me 50 but they cannot do these talkactions until they are unpzed.
 
XML:
<talkaction words="!get" event="script" value="get.lua"/>
Lua:
local t = {
	['gsp'] = 8472,
	['uhp'] = 8473
}

function onSay(cid, words, param, channel)
	local k = t[param:lower()]
	if k then
		if not isPlayerPzLocked(cid) then
			doPlayerAddItem(cid, k, 50)
		else
			doPlayerSendCancel(cid, 'You cannot use this command while PZLocked.')
		end
	else
		doPlayerSendCancel(cid, 'Invaid param.')
	end
	return true
end
You should consider adding an exhaust or something.
 
I tried !aol but script look's totally different would it still work? Not being lazy just not as bright.
Plus there is so many price variables in there it makes me confused how it get's price from shop.
 
Last edited:
Code:
local es,s = 120,12354 -- exhaust in seconds, storage value
function onSay(cid,words,param)
	if exhaustion.check(cid,s) then
		return doPlayerSendCancel(cid,'You can only use this each '..es..' seconds.') and false
	end
	dostuff
	return true
end
REP+ :)
 
Don't be lazy just copy it off other script >.>

Code:
local es,s = 120,12354 -- exhaust in seconds, storage value
function onSay(cid,words,param)
	if exhaustion.check(cid,s) then
		return doPlayerSendCancel(cid,'You can only use this each '..es..' seconds.') and false
	end
	dostuff
	return true
end
REP+ :)

http://otland.net/f132/useing-toilettes-108753/#post1084093

take your own advice.



also, in case you don't know how to complete the script:
Code:
local es,s = 120,12354 -- exhaust in seconds, storage value
function onSay(cid,words,param)
	if exhaustion.check(cid,s) then
		return doPlayerSendCancel(cid,'You can only use this each '..es..' seconds.') and false
	end
	if k then
		if not isPlayerPzLocked(cid) then
			doPlayerAddItem(cid, k, 50)
		else
			doPlayerSendCancel(cid, 'You cannot use this command while PZLocked.')
		end
	else
		doPlayerSendCancel(cid, 'Invaid param.')
	end
	return true
end
 
Last edited:
Back
Top