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

Request advanced blesser

Xemo

New Member
Joined
May 10, 2008
Messages
6
Reaction score
0
i need a npc that does all blessing in one.... and the blessings separate...


for example:

'all bless'

"would u like to buy all blessings for 50000?"

and then carrying out with the first/second/third/fourth/fifth incase someone didnt have 50k....


distro is ofc tfs, its the latest version... anyone help plx?
 
I can give you a normal bless npc script if you like? I'll take a look at the script and see if theres any easy way to add all blessings
 
i have the normal blesser, but i want a npc that sells all bless and each individual.... for example if u dont have 50k and need some blessing so u dont get owned when u die, u can buy 3 or 4 still.


but if thats too hard i can have 2 npcs, idk, i just need a all blesser :p so u dont have to sit there forever typing blessings every death
 
Try this then:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)	npcHandler:onCreatureSay(cid, type, msg)	end
function onThink()						npcHandler:onThink()						end

function creatureSayCallback(cid, type, msg)
	--- TODO: bless function in modules.lua
	if(npcHandler.focus ~= cid) then
		return FALSE
	end

	if msgcontains(msg, 'blessing') or msgcontains(msg, 'blessings') or msgcontains(msg, 'help') or msgcontains(msg, 'offer') then
		npcHandler:say("I can provide you with "all blessings", just say "all blessings" to buy it.")
		talkState = 0
	elseif msgcontains(msg, 'all blessings') then
		npcHandler:say("Do you want to buy all blessing for 50000 gold?")
		talkState = 1
	elseif talkState > 0 then
		if msgcontains(msg, 'yes') then
			if getPlayerBlessing(cid, talkState) then
				npcHandler:say("A god has already blessed you with all blessings.")
			elseif TRUE == TRUE then
				if doPlayerRemoveMoney(cid, 50000) == TRUE then
					doPlayerAddBlessing(cid, 1)
					doPlayerAddBlessing(cid, 2)
					doPlayerAddBlessing(cid, 3)
					doPlayerAddBlessing(cid, 4)
					doPlayerAddBlessing(cid, 5)
					npcHandler:say("You have been blessed by the five gods!")
				else
					npcHandler:say("You don't have enough money.")
				end
			else
				npcHandler:say("You need a premium account to buy blessings.")
			end
			talkState = 0
		elseif msgcontains(msg, 'no') then
			npcHandler:say("Then not.")
			talkState = 0
		end
	end
	return TRUE
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Hi
blessing
all blessings
yes
 
Last edited:
wont create him and im too new at owning ot's to know what this means... it says



[15/05/2008 00:49:12] Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/allbless.lua
[15/05/2008 00:49:12] data/npc/scripts/allbless.lua:17: ')' expected near 'all'
 
NVM... i figured it out.... u said


npcHandler:say("I can provide you with "all blessings", just say "all blessings" to buy it.")

and i needed it


npcHandler:say("I can provide you with 'all blessings', just say 'all blessings' to buy it.")


MAN TY SO MUCH U REALLY HELPD ALOT

tested and worked..... on lvl 400 sorc i died with this and lost 2.5 lvls and then died without it lost 10 so it works lol ty man
 
Back
Top