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

help with script

Keiro

New Member
Joined
Jun 24, 2009
Messages
285
Reaction score
0
TFS 0.3.6pl1 , cant load the script :/ why,

[20/09/2010 21:05:17] [Error - LuaScriptInterface::loadFile] cannot open data/talkactions/scripts/Blessings.lua: No such file or directory
[20/09/2010 21:05:17] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/Blessings.lua)
[20/09/2010 21:05:17] cannot open data/talkactions/scripts/Blessings.lua: No such file or directory

PHP:
local levelNeeded = 30
local basePrice = 2000
local blessLeveled = true
local bless = {}
local t = 0
 
function onSay(cid, words, param, channel)
 
	local level = getPlayerLevel(cid)
	local v = (blessLeveled and ((level > 30 and level < 120) and ((level - 30) * 200 + basePrice) or level > 120 and 20000 or level < 30 and basePrice) or 10000)
	for i = 1, 5 do
		if not getPlayerBlessing(cid, i) then
			table.insert(bless, i)
			t = t + 1
		end
	end
 
	if level >= levelNeeded then
		local price = v
		if doPlayerRemoveMoney(cid, price * t) then
			for i = 1, 5 do
				if not getPlayerBlessing(cid, i) then doPlayerAddBlessing(cid, i) end
			end
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, (price * t > 0 and "You bought " .. t .. " blessings for " .. price * t .. " gold coins." or "You already have all blessings."))
			doSendMagicEffect(getCreaturePosition(cid), (price * t > 0 and CONST_ME_MAGIC_RED or CONST_ME_POFF))
			price = 0
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You do not have enough money.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need level " .. levelNeeded .. " or higher to buy blessings.")
		return true
	end
end
 
i knew that....i checked it like 10 times and i always read the same, and now that u say that, i look again, and i see the "s" wasmissing o nthe file =P what a retarded im, thanks you:)
 
Bless script right?

Try this
<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />

-- [( Script edited by: XouruS )] --
function onSay(cid, words, param)
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,'You have already got one or more blessings!')
else
if doPlayerRemoveMoney(cid, 50000) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), 28)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!')
else
doPlayerSendCancel(cid, "You need 50.000 gold coins to get blessed!")
end
end
return TRUE
end
 
Why are so many people having problems with blessings?
This was someone naming a file wrong, not a problem with blessings
whats your problem?
tryn to help someone..

I'd tell you what my problem is but it would hurt your feelings and I would get infracted for it. You spamming scripts you found somewhere else that slightly relate to a problem the person might have doesn't help anyone
 
haha the probleem was not with blessing but with the file he puted like:
<talkaction words="!bless" script="/Blessings.lua" />

but the file he created in talkactions name is Blessing.lua.

so just a typo mistake.
 
Back
Top