• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction !buyaol and !bless

natix4

mc
Joined
Nov 8, 2009
Messages
154
Reaction score
1
Location
Poland
Hello! I give you script for aol and bless.

Unpack scripts.rar, put bless.lua and aol.lua to your /talkactions/scripts folder.
Open your talkactions.xml and paste this:
Code:
 <talkaction words="!bless" event="script" value="bless.lua" />
 <talkaction words="!aol" event="script" value="aol.lua" />

If i helped you REP++ ME:ninja:
 

Attachments

lol ?
!aol
Lua:
function onSay(cid, words, param, channel)
local cost = 10000
if doPlayerRemoveMoney(cid, cost) then
doPlayerAddItem(cid, 2173, 1)
else
doPlayerSendCancel(cid, "You dont have enough money.")
end
return true
end
And this script yes it works.
 
Lua:
local shop = {
	-- item, item_id, count, price [if no count, then it will automatically add 1x] --
	["aol"] = {2173, 1, 10000}
}
local fail
function onSay(cid, words, param, channel)
	local v = shop[param]
	if param ~= v then
		fail = true
	elseif getPlayerMoney(cid) < v[3] then
		fail = true
	end
	
	return not fail and doPlayerAddItem(cid, v[1], v[2] or 1) and doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) and doCreatureSay(cid, "You have purchased " .. getItemInfo(v.itemid).name .. "!", TALKTYPE_MONSTER) and doPlayerRemoveMoney(cid, v[3]) or doPlayerSendCancel(cid, "Sorry, not possible.")
end
 
Last edited:
Back
Top