• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

For Sorcs&Druid For Knight&Pally = Script need read V

Lpe95

https://soundcloud.com/saintdmusic/sail-remix
Joined
Mar 3, 2013
Messages
308
Reaction score
12
Location
Music preformer.
Hey i want a script that's for only sorcs&Druid i have a don mr script but i want it only for druid&sorcs not for knight&Pally

here Donate mr script.


PHP:
local MIN = 1350
local MAX = 1510
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) == FALSE then
		return FALSE
	end

	if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end

	if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
		return FALSE
	end

	doAddCondition(cid, exhaust)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
	doCreatureSay(itemEx.uid, "ohh DON...", TALKTYPE_ORANGE_1)

	return TRUE
end

But i don´t have a Donate Uh script i need that i want it to able only to Knight&Paladin

:D
 
LUA:
if isInArray({3, 4, 7, 8}, getPlayerVocation(cid)) then
        return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "Only druids and sorcerers can use this.")
    end
 
LUA:
if isInArray({3, 4, 7, 8}, getPlayerVocation(cid)) then
        return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "Only druids and sorcerers can use this.")
    end

wher shall i put this copy my text upp script and put there and give me whole ;p please
 
LUA:
local MAX = 1510
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isPlayer(itemEx.uid) == FALSE then
        return FALSE
    end
  if isInArray({3, 4, 7, 8}, getPlayerVocation(cid)) then
        return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "Only druids and sorcerers can use this.")
    end

    if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
        return TRUE
    end

    if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
        return FALSE
    end

    doAddCondition(cid, exhaust)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
    doCreatureSay(itemEx.uid, "ohh DON...", TALKTYPE_ORANGE_1)

    return TRUE
end

next time use LUA tags

- - - Updated - - -

i knew you were going to ask for that.that's why i did it :p
 
LUA:
local MAX = 1510
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isPlayer(itemEx.uid) == FALSE then
        return FALSE
    end
  if isInArray({3, 4, 7, 8}, getPlayerVocation(cid)) then
        return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "Only druids and sorcerers can use this.")
    end

    if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
        return TRUE
    end

    if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
        return FALSE
    end

    doAddCondition(cid, exhaust)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
    doCreatureSay(itemEx.uid, "ohh DON...", TALKTYPE_ORANGE_1)

    return TRUE
end

next time use LUA tags

- - - Updated - - -

i knew you were going to ask for that.that's why i did it :p

Well thank you rep++ for you if you can fix a don uh script i want only it works for knight&paladins
 
just copy this part
LUA:
if isInArray({1, 2, 5, 6}, getPlayerVocation(cid)) then
        return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, "Only Knights and Paladins can use this.")
    end

put it after any end
 
You can use this one :)

All in one ! dont remeber where I got this script but I have not made it.

Code:
amount = {
-- [vocation] = {minmp, maxmp, minhp, maxhp}, (it will be multiplied by player level)
	[1] = {3, 3.5, 0, 0}, 
	[2] = {3, 3.5, 0, 0},
	[3] = {1,1.2, 2, 2.2},
	[4] = {0, 0, 5, 7},
	[5] = {3, 3.5, 0, 0},
	[6] = {3, 3.5, 0, 0},
	[7] = {1,1.2, 2, 2.2},
	[8] = {0, 0, 5, 7}
}

function onUse(cid, item, itemEx)
local lv = getPlayerLevel(cid)
local conf = {
	v = amount[getPlayerVocation(cid)],
	voc = getPlayerVocation(cid),
	level = 7 -- min level
}

	if getPlayerLevel(cid) >= conf.level then
			doCreatureAddMana(cid, math.random((lv*conf.v[1]),(lv*conf.v[2])))
			doCreatureAddHealth(cid, math.random((lv*conf.v[3]),(lv*conf.v[4])))
			doCreatureSay(cid, "Aaaah... ", TALKTYPE_ORANGE_1)
			doSendMagicEffect(getPlayerPosition(cid), 12)
	else
		doPlayerSendTextMessage(cid, 22, "Only players above " .. conf.level .. " level can drink this potion.")
	end
end

Rep if it I help you :)
 
Back
Top