• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Czar zabierajacy soul...

Status
Not open for further replies.

pele112

Member
Joined
Aug 9, 2007
Messages
572
Reaction score
8
Location
Wodzisław Śląski
Witam!
Czy mógłby mi ktoś przerobić ten skrypt by zabierał 50 soul'a co jedno użycie :P

local waittime = 30 --Default (30 seconds)
local storage = 50
function onSay(cid, words, param, channel)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end

local pid = getPlayerByNameWildcard(param)
if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
return TRUE
end

if getPlayerLevel(pid) < 50 then
if exhaustion.get(cid, storage) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " has been sent to temple.")
nPos = {x=438, y=502, z=8}
doTeleportThing(pid, nPos)
exhaustion.set(cid, storage, waittime)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is higer then lvl 50.")
end
return TRUE
end
 
Code:
local waittime = 30 --Default (30 seconds)
local storage = 50
function onSay(cid, words, param, channel)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
		return TRUE
	end

	if (getPlayerSoul(cid) < 50) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You haven't enough soul points.")
		return TRUE
	end

	local pid = getPlayerByNameWildcard(param)
	if(pid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " is not currently online.")
		return TRUE
	end

	if getPlayerLevel(pid) < 50 then
		if exhaustion.get(cid, storage) == FALSE then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " has been sent to temple.")
			nPos = {x=438, y=502, z=8}
			doTeleportThing(pid, nPos)
			doPlayerAddSoul(cid, -50)
			exhaustion.set(cid, storage, waittime)
		else
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. exhaustion.get(cid, storage) .. " seconds.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The player is higer then lvl 50.")
	end
	return TRUE
end
 
Status
Not open for further replies.
Back
Top