Sirion_Mido
Experienced Member
i decided to make that script , might be helpful for some people , this script adding max mana like if i have mana 1000 when i type !addmana it will cost x amount and add x mana you want follow next steps to install it:
Here we are:
in your talkactions folder , open talkactions.xml and post the following code:
and now go to your talkactions/scripts make file name addmana.lua and post the following code:
else if you want me to edit it add health too , or add health only , just reply here and i will make one for your request.
and if you want it to buy more manas pay items reply to me too
and if there any errors reply to me here because i didn't test it
Rep++ If It Helpful For You..
Here we are:
in your talkactions folder , open talkactions.xml and post the following code:
XML:
<talkaction words="!addmana" event="script" value="addmana.lua"/>
and now go to your talkactions/scripts make file name addmana.lua and post the following code:
Lua:
function onSay(cid, words, param)
local cost = 10000 -- how much it cost
local mana = 100 -- how many manas to add
local msg = "You have bought more 100 mana to your maxmana" -- the text which send when buy function onSay(cid, words, param)
local cancel = "To do this action you need 10000 Gold Coin." -- the cancel message if you no have enough mone
local maxmana = 10000 -- if you have more than 10000 mana you can't add more manas
local manacancel = "you can not add more than 10000 manas" -- this cancel message if you have more than 10000 manas
if getPlayerMoney(cid) < cost then
doPlayerSendCancel(cid,cancel)
end
if getPlayerMana(cid) >= maxmana then
doPlayerSendCancel(cid,manacancel)
doSendMagicEffect(getPlayerPosition(cid),2)
else
doPlayerRemoveMoney(cid,cost)
setCreatureMaxMana(cid, mana)
doCreatureAddMana(cid, mana)
doPlayerSendTextMessage(cid,22,msg)
doSendMagicEffect(getPlayerPosition(cid),65)
end
end
return true
end
else if you want me to edit it add health too , or add health only , just reply here and i will make one for your request.
and if you want it to buy more manas pay items reply to me too
and if there any errors reply to me here because i didn't test it
Rep++ If It Helpful For You..
Last edited: