ghettobird
LUA newbie
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
now go to talkactions.xml
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" />