• 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!

Action Drink from wall fountain and recive mana

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:
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"/>
Change the red text into what fits your server.

And here's a litte screenshot:
2gv8t8n.png


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:
like church xD! Nice :)! Its Magical Watter O:! LoL! Qeep It Up ;D!
 
O:! Now What? You Give Me Script Of Mana Potion [Forgottenl] I Will Edit :D! And Health Too [Edit Too XD!]
Its Realy Easy Editing You Give Me The Base :D!
 
Thanks guys for your replies.
Maybe I will make a cooler one next time :thumbup: or atleast try..
 
you should move
Lua:
local mana = math.random(200, 500)
inside the function, else it won't be random every time :p
 
I think that its a good script. Too is funny, but u must put where should put de archive.lua and the code xml. For Noobies !! :D Everybody dont know how do it. I know, but so much ppl not :/
 
I think that its a good script. Too is funny, but u must put where should put de archive.lua and the code xml. For Noobies !! :D Everybody dont know how do it. I know, but so much ppl not :/

Ohh didn't think of it :D
I will add it now..
 
AwesoME' Script SpOOKIe, I know i'm slow beacuse this was 1 year ago, But Anyway! :D...
 
Back
Top