SpO0KIe
:)
- Joined
- Feb 28, 2010
- Messages
- 192
- Solutions
- 1
- Reaction score
- 5
Hello guys!
This is my first script I've made and I am pretty happy with the result. OK, I won't lie to you, I did it all exept the adding time thing. ^_^
What it does is when you click on the wall fountain your character says: "Ahhh..." and you receive an amount of mana, between 200- 500.
Here's the script:
action.xml
Change the red text into what fits your server.
And here's a litte screenshot:
It works just fine and it's tested on TFS 0.4, but I guess it should work on the other TFS too:thumbup:
This is my first script I've made and I am pretty happy with the result. OK, I won't lie to you, I did it all exept the adding time thing. ^_^
What it does is when you click on the wall fountain your character says: "Ahhh..." and you receive an amount of mana, between 200- 500.
Here's the script:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local mana = math.random(200, 500)
if(item.itemid == 1156) and getGlobalStorageValue(53433) <= os.time() then
doPlayerAddMana(cid, mana)
doSendMagicEffect(getCreaturePosition(cid), 12)
doCreatureSay(cid, "Ahhh...", TALKTYPE_ORANGE_1)
setGlobalStorageValue(53433, os.time() + 60)
doSendAnimatedText(getPlayerPosition(cid), mana, 23)
else
doPlayerSendCancel(cid,"You cannot use this yet.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return TRUE
end
action.xml
Code:
<action actionid="[COLOR="red"]XXXX[/COLOR]" event="script" value="[COLOR="red"]NAMEHERE[/COLOR].lua"/>
And here's a litte screenshot:
It works just fine and it's tested on TFS 0.4, but I guess it should work on the other TFS too:thumbup:
Last edited: