Cykotitan
Experienced G'
- Joined
- Nov 4, 2008
- Messages
- 16,892
- Solutions
- 5
- Reaction score
- 849
not sure, but you don't have the dllspermiss.png picture by CyrePanda - Photobucket
it says i dont have permission to run the forgotten server.exe
not sure, but you don't have the dllspermiss.png picture by CyrePanda - Photobucket
it says i dont have permission to run the forgotten server.exe
items.xml on data/items folder.
but you can create them with the name..
like: /i plate armor
or with count like. /i crystal coin, 20
items.xml on data/items folder.
but you can create them with the name..
like: /i plate armor
or with count like. /i crystal coin, 20
what is a .7z file?
nop, lol.
Update your actioms.xml/potions.lua to the latest one.
local config = {
removeOnUse = true,
usableOnTarget = true,
realAnimation = true,
healthMultiplier = 1.0,
manaMultiplier = 1.0
}
local POTIONS = {
[8704] = {empty = 7636, health = {60, 85}}, -- small health potion
[7618] = {empty = 7636, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = 'knights and paladins'}, -- strong health potion
[7591] = {empty = 7635, health = {400, 600}, level = 80, vocations = {4, 8}, vocStr = 'knights'}, -- great health potion
[8473] = {empty = 7635, health = {700, 800}, level = 130, vocations = {4, 8}, vocStr = 'knights'}, -- ultimate health potion
[7620] = {empty = 7636, mana = {75, 125}}, -- mana potion
[7589] = {empty = 7634, mana = {115, 185}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = 'sorcerers, druids and paladins'}, -- strong mana potion
[7590] = {empty = 7635, mana = {150, 250}, level = 80, vocations = {1, 2, 5, 6}, vocStr = 'sorcerers and druids'}, -- great mana potion
[8472] = {empty = 7635, health = {200, 400}, mana = {100, 200}, level = 80, vocations = {3, 7}, vocStr = 'paladins'} -- great spirit potion
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if not potion then
return false
end
if cid == itemEx.uid or (config.usableOnTarget and isPlayer(itemEx.uid)) then
if (potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid))) then
doCreatureSay(cid, 'Only ' .. potion.vocStr .. (potion.level and (' of level ' .. potion.level) or '') .. ' or above may drink this fluid.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
return true
end
local health = potion.health
if health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier)) then
return false
end
local mana = potion.mana
if mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier)) then
return false
end
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
if realAnimation then
local p = getThingPos(itemEx.uid)
for _, pid in ipairs(getSpectators(p, 1, 1, false) or {}) do
if isPlayer(pid) then
doCreatureSay(itemEx.uid, 'Aaaah...', TALKTYPE_ORANGE_1, false, pid, p)
end
end
else
doCreatureSay(itemEx.uid, 'Aaaah...', TALKTYPE_ORANGE_1)
end
if not potion.empty or config.removeOnUse then
doChangeTypeItem(item.uid, item.type - 1)
else
doTransformItem(item.uid, potion.empty)
end
end
return true
end
Lua:local config = { removeOnUse = true, usableOnTarget = true, realAnimation = true, healthMultiplier = 1.0, manaMultiplier = 1.0 } local POTIONS = { [8704] = {empty = 7636, health = {60, 85}}, -- small health potion [7618] = {empty = 7636, health = {100, 200}}, -- health potion [7588] = {empty = 7634, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = 'knights and paladins'}, -- strong health potion [7591] = {empty = 7635, health = {400, 600}, level = 80, vocations = {4, 8}, vocStr = 'knights'}, -- great health potion [8473] = {empty = 7635, health = {700, 800}, level = 130, vocations = {4, 8}, vocStr = 'knights'}, -- ultimate health potion [7620] = {empty = 7636, mana = {75, 125}}, -- mana potion [7589] = {empty = 7634, mana = {115, 185}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = 'sorcerers, druids and paladins'}, -- strong mana potion [7590] = {empty = 7635, mana = {150, 250}, level = 80, vocations = {1, 2, 5, 6}, vocStr = 'sorcerers and druids'}, -- great mana potion [8472] = {empty = 7635, health = {200, 400}, mana = {100, 200}, level = 80, vocations = {3, 7}, vocStr = 'paladins'} -- great spirit potion } function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if not potion then return false end if cid == itemEx.uid or (config.usableOnTarget and isPlayer(itemEx.uid)) then if (potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid))) then doCreatureSay(cid, 'Only ' .. potion.vocStr .. (potion.level and (' of level ' .. potion.level) or '') .. ' or above may drink this fluid.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid)) return true end local health = potion.health if health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier)) then return false end local mana = potion.mana if mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier)) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if realAnimation then local p = getThingPos(itemEx.uid) for _, pid in ipairs(getSpectators(p, 1, 1, false) or {}) do if isPlayer(pid) then doCreatureSay(itemEx.uid, 'Aaaah...', TALKTYPE_ORANGE_1, false, pid, p) end end else doCreatureSay(itemEx.uid, 'Aaaah...', TALKTYPE_ORANGE_1) end if not potion.empty or config.removeOnUse then doChangeTypeItem(item.uid, item.type - 1) else doTransformItem(item.uid, potion.empty) end end return true end