• 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 !aol Script By: GM Equardo

knatteengels

Mapper GM Equardo Here
Joined
Jul 22, 2009
Messages
79
Reaction score
1
Here is Aol Script By: GM Equardo

PHP:
function onSay(cid, words, param)
        if doPlayerRemoveMoney(cid, 10000) == TRUE then
doPlayerAddItem(cid, 2173, 1)
                        doSendMagicEffect(getPlayerPosition(cid), 49)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You have bought an amulet of loss!!') 
else
            doPlayerSendCancel(cid, "You need 1 crystal coin to buy a Amulet Of Loss!")
                end
return TRUE
                end

TalkActions.xml

PHP:
	<talkaction words="!aol" script="aol.lua" />
 
100000000000 thread with aol talkaction gz gz gz

script with config;

Code:
local c = {
price = 10000,
}
function onSay(cid, words, param) 
        if doPlayerRemoveMoney(cid, c.price) == TRUE then 
doPlayerAddItem(cid, 2173, 1) 
                        doSendMagicEffect(getPlayerPosition(cid), 49) 
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You have bought an amulet of loss!!')  
else 
            doPlayerSendCancel(cid, "You need " .. ((c.price)/10000) .. " crystal coin to buy a Amulet Of Loss!") 
                end 
return TRUE 
                end
 
I'm getting debugg if im writing !aol with this script help anybody? :S
 
I'm getting debugg if im writing !aol with this script help anybody? :S
What distro are you using? I don't know why is not working for you. It should have worked. Try changing this line:

Lua:
 doSendMagicEffect(getPlayerPosition(cid), 49)
to
Lua:
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
 
I'm getting debugg if im writing !aol with this script help anybody? :S

Lua:
local cost = 10000

function onSay(cid, words, param, channel)
	if doPlayerRemoveMoney(cid, cost) then
		doPlayerAddItem(cid, 2173, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've bought an amulet of loss!")
	else
		doPlayerSendCancel(cid, "You need ".. cost .." gold to buy an AOL.")
	end
	return true
end
 
Back
Top