Citan Admin
Posts : 20 Join date : 2011-02-24 Location : USA, Rhode Island
| Subject: OT scripts Thu Sep 01, 2011 9:31 pm | |
| Mana rune... Works for mages/paladin... NOT Knight for some reason. This code goes in your items file (2272 will be the manarune ID, change it to what you want): - Code:
-
<item id="2272" article="a" name="mana rune"> <attribute key="weight" value="120" /> </item>
Make this file in your scripts folder and name it "mana rune"... - Code:
-
local config = { [{"Sorcerer"}] = {min=250, max=500}, [{"Druid"}] = {min=250, max=500}, [{"Paladin"}] = {min=150, max=350}, [{"Knight"}] = {min=100, max=250}, [{"Master Sorcerer"}] = {min=400, max=500}, [{"Elder Druid"}] = {min=400, max=500}, [{"Royal Paladin"}] = {min=350, max=450}, [{"Elite Knight"}] = {min=150, max=250} }
local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)
function onUse(cid, item, fromPosition, itemEx, toPosition) local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid) local mana_minimum = level * 1 + mlevel * 2.8 local mana_maximum = level * 1.2 + mlevel * 3.8 doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum)) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) if item.type > 1 then doChangeTypeItem(item.uid, item.type - 1) else
end return TRUE end
For command !aol This line of code goes in 'talkactions' file. - Code:
-
<talkaction words="!aol" script="aol.lua" />
This script goes in talkactions folder in a txt file named "aol"... - Code:
-
function onSay(cid, words, param) local cost = 10000 local item = 2173 local quantity = 1 if doPlayerRemoveMoney(cid, cost) == TRUE then doPlayerAddItem(cid, item, quantity) else doPlayerSendCancel(cid, "You don't have enough gold.") end return TRUE end
| |
|