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

Solved What's wrong with my script? i'm new :C

Zippow

Member
Joined
Aug 27, 2011
Messages
454
Reaction score
21
Location
Sweden
Code:
if doPlayerSay(cid,"-!amulet-") == TRUE then
doPlayerAddItem(cid, 2268)
 doPlayerSendTextMessage(cid,22,"You Bought A Amulet") 
end
end

What's wrong ;)
 
Last edited:
Try this
Code:
function onSay(cid, words, param)
        if doPlayerRemoveMoney(cid, 0) == TRUE then
doPlayerAddItem(cid, 2173, 1)
                        doSendMagicEffect(getPlayerPosition(cid), 31)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Amulet of loss!') 
end     
return TRUE
                end
(Talkactions)
 
The first line, you can do it like this.
LUA:
local cost = 50000
local item = 2173
local quantity = 1 
 
function onSay(cid, words, param)
    if doPlayerRemoveMoney(cid, cost) == 1 then
        doPlayerAddItem(cid, item, quantity)
    else
        doPlayerSendCancel(cid, "You have not enough gold.")
    end
    return 1
end
Edit: I was slower :p
 
Back
Top