• 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 ingame buy command for VIP players only

ghettobird

LUA newbie
Joined
Aug 17, 2013
Messages
679
Reaction score
132
Location
OTland
Hello, so as the title says I am releasing a system that I've been working on lately, however I didn't have any time to test it so please do that for me and post here if there are any bugs & I'll gladly help :)


So now go to talkactions/scripts
Code:
-- scripted by ghettobird for OTland. report if there are any bugs please --
local DonationValue = 666 -- The special storage value a Donator has (Can't be higher than 65.000(65k)).
local AOL = 2173 -- Amulet of loss
local BPH = 2365 -- BackPack of holding
local BOH = 2195 -- Boots of haste
local SBOOTS = 2640 -- Soft Boots
local AOLP = 20000 -- Price of AOL...
local BPHP = 100000 -- Price of Backpack of holding
local BOHP = 50000 -- Price of BOH
local SBOOTSP = 1000000 -- Price of Soft Boots, everything explains itself rly..

function onSay(cid, word, param)

   if getPlayerStorageValue(cid, storagevalueinurvipsystem) == 1 then
   
        if param == "aol" and doPlayerRemoveMoney(cid, AOLP) == TRUE then
            doPlayerAddItem(cid, AOL, 1)
            
        elseif param == "boh" and doPlayerRemoveMoney(cid, BOHP) == TRUE then
            doPlayerAddItem(cid, BOH, 1)
            
        elseif param == "bpholding" and doPlayerRemoveMoney(cid, BPHP) == TRUE then
            doPlayerAddItem(cid, BPH, 1)    
            
        elseif param == "softboots" and doPlayerRemoveMoney(cid, SBOOTSP) == TRUE then
            doPlayerAddItem(cid, SBOOTS, 1)
           
            
          else 
            doPlayerSendTextMessage(cid, 22, "You either put a wrong item or you don't have enough money to buy.") 
        end 
    else      
      doPlayerSendTextMessage(cid, 22, "This function is for VIP players only, buy VIP on the website :)") 
    end 
        end
    end
end


now go to talkactions.xml
Code:
<talkaction words="!buy" script="nameofurscript.lua" />
 
Thanks @Zothion I already did that... But it still doesnt work, it doesn't show any errors in console. Nothing happens in game. Even the command "!buy" appears in yellow, like normal talking. (Yeah, I've added script in talkactions.xml)
Btw did you check my reply in the conjure runes from backpack thread?

Thanks!
 
Back
Top