hi everyone
I made acc to ask about something. I have been following this web for long, and I can see that people have knowledge in scripting. I would like to ask for your help guys.
Atm, I am using this talkaction:
My idea is about making this script more advanced, but with different items.
I would like to have script like this one, for buying
* 1 backpack of sd,
* also 100 sd runes, 100 potions.. so on?
is that even possible?
I could not find any guide about doing such script on this website that is why I made this post in here.
If someone could make for me script* !buybpsd - to buy full backpack of sd per 100 in rune
Also I would like to ask for !buysd - to not buy each rune x1 but rune times 100 so when someone says !buysd he gets 100 sd rune for 30k gold.
anybody who knows help plz>
thx in advance
I made acc to ask about something. I have been following this web for long, and I can see that people have knowledge in scripting. I would like to ask for your help guys.
Atm, I am using this talkaction:
Code:
<talkaction words="!rope" script="rope.lua" />
Code:
local config = {
price = 100,
itemId = 2120
}
function onSay(cid, words, param)
local count = 1
if isNumber(param) == TRUE and param < 21 then
count = param
end
if doPlayerRemoveMoney(cid, config.price * count) == TRUE then
for i = 1, count do
doPlayerAddItem(cid, config.itemId, 1)
doSendMagicEffect(getPlayerPosition(cid), 12)
end
else
doPlayerSendCancel(cid, "You need "..count * config.price.." gold to buy "..count.." Rope(s).")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
My idea is about making this script more advanced, but with different items.
I would like to have script like this one, for buying
* 1 backpack of sd,
* also 100 sd runes, 100 potions.. so on?
is that even possible?
I could not find any guide about doing such script on this website that is why I made this post in here.
If someone could make for me script* !buybpsd - to buy full backpack of sd per 100 in rune
Also I would like to ask for !buysd - to not buy each rune x1 but rune times 100 so when someone says !buysd he gets 100 sd rune for 30k gold.
anybody who knows help plz>
thx in advance