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

[FREE] Slave Ots Free Scripting Service

Slave Ots

LUA Newbie™
Joined
Jan 19, 2012
Messages
114
Reaction score
32
Location
/goto Slave Ots
Hello Otlanders
I've Decided To Start This Thread To Help ppl Whom Just Started In Open-Tibia & Need LUA Scripts
If You Need Any Script/Help Just Post In There.....

[Note]:- Spamming or being not patient ill ignore you!

you are allowed to ask about Actions/Movements/Talkactions/Creaturescripts/GlobalEvents/Spells..

---------------------------------------------------------------------------------------------------------


hope to got REP++ when i help you!

kind regards
Slave Ots
 
yes its.. iam working on it now..

- - - Updated - - -




sorry for being late
HTML:
function onStepIn(cid, item, frompos, item2, topos) -- slave [email protected]
 
local playerpos = getPlayerPosition(cid) 

local pos = {
poss = {{x=1000, y=1000, z=7},
{x=860, y=545, z=7},
{x=1000, y=1000, z=4},
{x=1002, y=1010, z=7}}
}
local new_pos = pos.poss[math.random(1, #pos.poss)]
 
if isPlayer(cid) then

doSendMagicEffect(playerpos,10) 
doTeleportThing(cid,new_pos) 
else
return 1
end 
return true
end
hopr to rep me
it works 100% just edit positions.

THANK YOU, lol i mean i thought it would be a little common amoung all the scripts but i couldnt find it anywhere and all the ways (still learning lua) i tried to edit and rewrite the script i couldnt get it to work :/ but thanks so much! ill make sure to use this thread for anything i need :D
 
heya,

can you make me a script?

it should be like this:

When you Get XXX- or higher lvl

you can pass an door ( i will make this ).
There should be an npc "who can make you back lvl 8 but for return you get an item and to stats you have been rebirth X time"
max rebirth time should be 4
 
A script that when until you get -X- lvl don't lose nothing only exp if you die. But if you atack any one you lose stuff like normal ppl.
 
Slave OTS REP++!!!! hes awesome

ty, buy actually you didn't rep++ me :p

- - - Updated - - -

heya,

can you make me a script?

it should be like this:

When you Get XXX- or higher lvl

you can pass an door ( i will make this ).
There should be an npc "who can make you back lvl 8 but for return you get an item and to stats you have been rebirth X time"
max rebirth time should be 4

would you explain more??
when player reach xx level or higher. he can pass a door
in there, there are an NPC that return him back to level 8
shall the player have an item to get return back to level 8.... or when player return back to level 8 he got xx item
please explain

- - - Updated - - -

A script that when until you get -X- lvl don't lose nothing only exp if you die. But if you atack any one you lose stuff like normal ppl.
hope to rep++ me
here you are
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller, killer)
local slave_ots = (isPlayer(killer) == TRUE)
 if slave_ots then 
 	if getCreatureSkullType(killer) > 3 and getCreatureSkullType(cid) < 1 and not isPlayerPzLocked(cid) then 
	-- if the killer have got white or red or black skull and the other player haven'y any skull
doCreatureSetDropLoot(cid, false)             
return true
end
end
return true
end
 
[Request] Im Using TFS 0.3.6 V7 And i was woundering how to make potions unlimited and change the player atk speed because it is very high and i want it to be normal can anyone help?
 
[Request] Im Using TFS 0.3.6 V7 And i was woundering how to make potions unlimited and change the player atk speed because it is very high and i want it to be normal can anyone help?

The attack speed is found in the vocations xml file. just have to scroll over a bit and the standard is 2000
 
Last edited:
[Request] Im Using TFS 0.3.6 V7 And i was woundering how to make potions unlimited and change the player atk speed because it is very high and i want it to be normal can anyone help?

for editing attack speed: goto data / XML / vocations.xml and edit the attack speed for any vocation
to make potions unlimited: open data / actions / scripts / liquids / {and open the potion script you wand}
in this script if you find removeOnUse = " " set to 'no' if you didn't find this you will find this code
Code:
doTransformItem(item.uid, EMPTY_POTION)
just remove it and it wont remove potions again

anything else??
 
this is what my potions.lua looks like iv tried puttin no and it still uses the pot and its not unlimited

local config = {
removeOnUse = "no",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
range = -1,
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 2.0
}

config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)

local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion
}

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

function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return false
end

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end

if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end

doDecayItem(doCreateItem(2016, potion.splash, toPosition))
doRemoveItem(item.uid, 1)

doPlayerAddItem(cid, potion.empty, 1)
return true
end

if(hasCondition(cid, CONDITION_EXHAUST)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return true
end

if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then
return false
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(not config.realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end

doAddCondition(cid, exhaust)
doRemoveItem(item.uid, 1)
if(not potion.empty or config.removeOnUse) then
return true
end

doPlayerAddItem(cid, potion.empty, 1)
return true
end
 
use this one
Code:
local config = {

usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
range = -1,
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 2.0
}


config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)

local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion
}

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

function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return 1
end

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end

if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end

return true
end

if(hasCondition(cid, CONDITION_EXHAUST)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return true
end

if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then
return false
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(not config.realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end

doAddCondition(cid, exhaust)

return true
end
 
awesome man it worked repp++ for u also why do monsters atk fast aslo any idea?
use this one
Code:
local config = {

usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
range = -1,
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 2.0
}


config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)

local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion
}

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

function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return 1
end

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end

if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end

return true
end

if(hasCondition(cid, CONDITION_EXHAUST)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return true
end

if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then
return false
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(not config.realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end

doAddCondition(cid, exhaust)

return true
end
 
Okay I would like to be able to make a creature stand on the same tile as the summoner and if the creature is not on the same tile it gets teleported back onto him. I saw in config "teleportPlayerSummons = true" but i want the range to be like 1sqm or 0sqm so its always on the persons. I know this is possible i just do not have the knowledge to do so. In addition is there a way i can make it so a Players Summon does no harm the summoner? but hurts other players if attacked.

Thanks, Mujica

P.S Like something along the lines of
IfSummon more than 1SQM Teleport to the player


Repost idk why i didnt get any help ;(
 
ty, buy actually you didn't rep++ me :p

- - - Updated - - -



would you explain more??
when player reach xx level or higher. he can pass a door
in there, there are an NPC that return him back to level 8
or when player return back to level 8 he got xx item
please explain

exactly
 
here you are
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller, killer)
local slave_ots = (isPlayer(killer) == TRUE)
 if slave_ots then 
 	if getCreatureSkullType(killer) > 3 and getCreatureSkullType(cid) < 1 and not isPlayerPzLocked(cid) then 
	-- if the killer have got white or red or black skull and the other player haven'y any skull
doCreatureSetDropLoot(cid, false)             
return true
end
end
return true
end
Thanks and reped in advance!
BUT Where to put the max level for this?
 
Back
Top