• 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 Command !softboots [REVSCRIPTSYS]

Hyagosrs

Member
Joined
Mar 10, 2018
Messages
94
Solutions
1
Reaction score
10
this is a command to renew soft boots !softboots.

add this script (soft_boots.lua) in /data/scripts/talkaction/players

Lua:
local aol = TalkAction("!softboots")

function aol.onSay(player, words, param)   
    if player:removeMoneyNpc(10000) and player:removeItem(10021, 1) then
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
        player:addItem(6132, 1) -- id new soft boots   
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You charged a soft boots!")
    else
        player:getPosition():sendMagicEffect(CONST_ME_POFF)
        player:sendCancelMessage("You do not have enough money or a worn soft boots!.")
    end
end

aol:register()
 
1629265463049.png
definitely this is wrong, either of the two can be removed but if it does not meet the two conditions the system scams you
make sure you meet both conditions first and then if you remove the requirements

Lua:
local talkAction = TalkAction("!softboots")

function talkAction.onSay(player, words, param)  
    if player:getItemCount(10021) >= 1 then
        if player:removeMoneyNpc(10000) then
            player:removeItem(10021, 1)
            player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
            player:addItem(6132, 1) -- id new soft boots  
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You charged a soft boots!")
        else
            player:getPosition():sendMagicEffect(CONST_ME_POFF)
            player:sendCancelMessage("You do not have enough money!.")
        end
    else
        player:getPosition():sendMagicEffect(CONST_ME_POFF)
        player:sendCancelMessage("You do not have worn soft boots!.")
    end
    return false
end

talkAction:register()
 
Last edited:
Back
Top