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

TalkAction Otswe Amulet Of Loss & Bless Command!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,782
Solutions
31
Reaction score
2,286
Location
Sweden?
Hello,

I got bored so i going to release a script which i made 5-8min ago, i didnt test it but i hope it works.

Since, i was lazy to fix. Thanks to Limos which corrected the errors.

Talkactions.xml
Code:
<talkaction words="!aol" case-sensitive="no" event="script" value="ab.lua"/>
<talkaction words="!bless" case-sensitive="no" event="script" value="ab.lua"/>

Then make a lua file in talkactions/scripts and name it "ab"
Lua:
	 local aol_otswe = {
		cost = 10000,
		buy_text = "You have bought amulet of loss! if you wear it, you will not lose any kind of items expect if you are red skull.",
		cancel_text = "Sorry but you dont have afford to buy amulet of loss!",
		effect = 49
	}
 
	local bless_otswe = {
		cost = 50000,
		cancel_text = "Sorry, but you are already blessed by the gods!",
		buy_text = "You have been blessed by the gods!",
		effect = CONST_ME_HOLYDAMAGE,
		cancel_text_onbuy = "Sorry, but you dont have afford to buy bless!"
	}
 
function onSay(cid, words, param)
	if words == "!aol" then
		if doPlayerRemoveMoney(cid, aol_otswe.cost) == TRUE then 
			doPlayerAddItem(cid,2173,1)
			doSendMagicEffect(getPlayerPosition(cid), aol_otswe.effect)
			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, aol_otswe.buy_text)
		else 
			doPlayerSendCancel(cid, aol_otswe.cancel_text) 
		end
	end 
 
	if words == "!bless" then
		if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
			return doPlayerSendCancel(cid,bless_otswe.cancel_text)
		end
	end
	if doPlayerRemoveMoney(cid, bless_otswe.cost) == TRUE then
		doPlayerAddBlessing(cid, 1)
		doPlayerAddBlessing(cid, 2)
		doPlayerAddBlessing(cid, 3)
		doPlayerAddBlessing(cid, 4)
		doPlayerAddBlessing(cid, 5)
		doSendMagicEffect(getPlayerPosition(cid), bless_otswe.effect)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,bless_otswe.buy_text)
	else
		doPlayerSendCancel(cid, bless_otswe.cancel_text_onbuy)
	end 
	return true
end

Enjoy!
 
Last edited:
Try now:

Lua:
	local aol_otswe = {
		cost = 10000,
		buy_text = "You have bought amulet of loss! if you wear it, you will not lose any kind of items expect if you are red skull.",
		cancel_text = "Sorry but you dont have afford to buy amulet of loss!",
		effect = 49
	}
 
	local bless_otswe = {
		cost = 50000,
		cancel_text = "Sorry, but you are already blessed by the gods!",
		buy_text = "You have been blessed by the gods!",
		effect = CONST_ME_HOLYDAMAGE,
		cancel_text_onbuy = "Sorry, but you dont have afford to buy bless!"
	}
 
function onSay(cid, words, param)
	if words == "!aol" then
		if doPlayerRemoveMoney(cid, aol_otswe.cost) == TRUE then 
			doPlayerAddItem(cid,2173,1)
			doSendMagicEffect(getPlayerPosition(cid), aol_otswe.effect)
			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, aol_otswe.buy_text)
		else 
			doPlayerSendCancel(cid, aol_otswe.cancel_text) 
		end
	end 
end
 
	if words == "!bless" then
		if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
			doPlayerSendCancel(cid,bless_otswe.cancel_text)
		else
	if doPlayerRemoveMoney(cid, bless_otswe.cost) == TRUE then
		doPlayerAddBlessing(cid, 1)
		doPlayerAddBlessing(cid, 2)
		doPlayerAddBlessing(cid, 3)
		doPlayerAddBlessing(cid, 4)
		doPlayerAddBlessing(cid, 5)
		doSendMagicEffect(getPlayerPosition(cid), bless_otswe.effect)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,bless_otswe.buy_text)
	else
		doPlayerSendCancel(cid, "bless_otswe.cancel_text_onbuy")
		end
	end 
	return true
end
 
The AoL still works, but it's the same issue with !bless :S It doesn't register the actual script, it only writes out !bless normally in the chat
 
Back
Top