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

[movements] Console Problem!

pugamoline

uint32_t patch_mem(char *
Joined
Nov 15, 2011
Messages
189
Reaction score
19
hi! i have this error in my console

need help for fix this!

PHP:
[9/12/2011 17:0:49] [Error - MoveEvents Interface] 
[9/12/2011 17:0:49] In a timer event called from: 
[9/12/2011 17:0:49] data/movements/scripts/storagereset.lua:onStepIn
[9/12/2011 17:0:49] Description: 
[9/12/2011 17:0:49] (luaGetCreatureName) Creature not found


File: storageset.lua

PHP:
local c = {
					storage = 12012, -- empty storage
 
					remove_time = 3.0, -- minutes interval of time to remove soul
 
					soul_removed = 1, --number of soul point resmover every interval of time
 
					teleport = true, -- i thought this could help you out, if you dont want it just set it to false this tp player to a certain place when his soul finished out.
 
					place = {x=32369,y=32241,z=7}, -- the place player will be tped to when his soul is out
 
					dont_allow = true -- This dont allow player to get into training tile if her dont have enough soul
			}
function removeSoul(cid,value) -- removeing soul
	if getPlayerByNameWildcard(getCreatureName(cid)) ~= nil then
		if getPlayerStorageValue(cid,c.storage) > 0 then
			if getPlayerSoul(cid) > 0 then
				doPlayerAddSoul(cid, - value)
				doPlayerSendTextMessage(cid,27,"Training system : "..c.soul_removed.." soul point removed.")
				addEvent(removeSoul , c.remove_time*60*1000, cid, value)
			else
				if c.teleport == true then
					doTeleportThing(cid,c.place,false)
					doSendMagicEffect(c.place,10)
					doPlayerSendTextMessage(cid,21,"You have been teleported outside training spot as you soul have finished.")
					setPlayerStorageValue(cid,c.storage,-1)
				end
			end
		else
			doPlayerSendTextMessage(cid,27,"You didnt have right storage.")
		end
 
	else
		doPlayerSendTextMessage(cid,27,"Seems your name is not correct ??!!.")
	end
end
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerSoul(cid) > c.soul_removed then
		doPlayerSendTextMessage(cid,25,"Training system started, every "..c.remove_time.." minutes "..c.soul_removed.." soul point will be removed from you, untill your soul end and you will be teleported outside.")
		setPlayerStorageValue(cid,c.storage,1)
		addEvent(removeSoul , c.remove_time*60*1000, cid, c.soul_removed)
	elseif c.dont_allow == true and getPlayerSoul(cid) < 1 then
		doTeleportThing(cid,fromPosition,false)
		doSendMagicEffect(fromPosition,2)
		doPlayerSendTextMessage(cid,27,"You can't train while your soul is less than "..c.soul_removed.." points.")
	end
	return true
end
 
 
function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerStorageValue(cid,c.storage) > 0 then
		setPlayerStorageValue(cid,c.storage,-1)
		doPlayerSendTextMessage(cid,25,"Training system : disactivated.")
	end
	return true
end





THIS ANOTHER COMMENT DONT WORK !

try this
LUA:
local c = {
	storage = 12012, -- empty storage
	remove_time = 3, -- minutes interval of time to remove soul
	soul_removed = 1, --number of soul point resmover every interval of time
	teleport = true, -- i thought this could help you out, if you dont want it just set it to false this tp player to a certain place when his soul finished out.
	place = {x=32369, y=32241, z=7}, -- the place player will be tped to when his soul is out
	dont_allow = true -- This dont allow player to get into training tile if her dont have enough soul
}
function removeSoul(pid, value) -- removeing soul
	if getPlayerByNameWildcard(getCreatureName(pid)) ~= nil then
		if getPlayerStorageValue(pid, c.storage) > 0 then
			if getPlayerSoul(pid) > 0 then
				doPlayerAddSoul(pid, - value)
				doPlayerSendTextMessage(pid, 27, "Training system : "..c.soul_removed.." soul point removed.")
				addEvent(removeSoul, c.remove_time*60*1000, pid, value)
			else
				if c.teleport == true then
					doTeleportThing(pid, c.place, false)
					doSendMagicEffect(c.place, 10)
					doPlayerSendTextMessage(pid, 21, "You have been teleported outside training spot as you soul have finished.")
					setPlayerStorageValue(pid, c.storage, -1)
				end
			end
		else
			doPlayerSendTextMessage(pid, 27, "You didnt have right storage.")
		end
	else
		doPlayerSendTextMessage(pid, 27, "Seems your name is not correct ??!!.")
	end
end

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerSoul(cid) > c.soul_removed then
		doPlayerSendTextMessage(cid,25,"Training system started, every "..c.remove_time.." minutes "..c.soul_removed.." soul point will be removed from you, untill your soul end and you will be teleported outside.")
		setPlayerStorageValue(cid, c.storage, 1)
		addEvent(removeSoul, c.remove_time*60*1000, cid, c.soul_removed)
	elseif c.dont_allow == true and getPlayerSoul(cid) < 1 then
		doTeleportThing(cid, fromPosition, false)
		doSendMagicEffect(fromPosition, 2)
		doPlayerSendTextMessage(cid, 27, "You can't train while your soul is less than "..c.soul_removed.." points.")
	end
	return true
end

function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerStorageValue(cid, c.storage) > 0 then
		setPlayerStorageValue(cid, c.storage,-1)
		doPlayerSendTextMessage(cid, 25, "Training system : disactivated.")
	end
	return true
end
 
Back
Top