• 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
 
Slave~ Can you help me?

Code:
function onThink(cid, interval)
	if isCreature(cid) then
		local summons = getCreatureSummons(cid)
		if(summons) then
			for i = 1, #summons do
				if (getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(summons[i])) >= 1) then
					doTeleportThing(summons[i], getCreaturePosition(cid))
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
				end
			end
		end
	end
	return true
end

I want it to make my summon teleport on the sqm the summoners is on so its always on the player... i cant seem to get this to work. should i put this in globalevents?
 
Last edited:
Im Constantly ignored

iam not ignoring you
but can you till me if you summoned demon skeleton and attacking a player that away from you by 2 sqm
this script will freeze your summon, so it wont atk you target. it will be just in pos you are
i done it as you requested... here it is

Code:
Slave_Ots
Code:
function onThink(cid, interval)-- slave ots
local summons = getCreatureSummons(cid)
local new_pos = getPlayerPosition(cid)
local Slave_Ots = (table.maxn(summons) > 0)
if Slave_Ots then 
for _, pid in ipairs(summons) do
doTeleportThing(pid, new_pos, TRUE)
doSendMagicEffect(new_pos, 10)
return true
end
end
return true
end
regards

- - - Updated - - -

this is a better one. but as i told you
when you summon a monster it will be always in the sqm you are
and your summon will atk targets who are in 1x1 sqm from you position :p
dont forget REP++
 
Okay and should i set this in Global Event or something? i cant get it to work
Repped++

So where should i set this?
 
Last edited:
open data / creaturescripts / scripts and add this script
then in creaturescripts.xml add
Code:
<event type="think" name="creatureteleport" event="script" value="new.lua"/>
and open data / creaturescripts / script / login.lua and before the last line {return true} add this
Code:
registerCreatureEvent(cid, "creatureteleport")
 
guys i know this not support forum but iv posted ont here and no ones helped...

does anyone know how i can make items custom for example: make plate armor have +30health or skills or even magic lvl?
 
Items.xml
XML:
<attribute key="maxhitpoints" value="30"/>
<attribute key="skillSword" value="1" />
<attribute key="magiclevelpoints" value="1" />

Also add them in movements if they are not added yet.
 
does anyone know how to make it so when a player creats a character it gives them XX m lvl? for example i dont want knights and mages and pallis to have same m lvl so how do i fix this?

i am using tfs 0.3.6 v7 with the ingame account creator
 
Here We Are :)
Lua:
-- START CONFIG
local sorcerer = 80 -- sorcerer magic level
local druid = 80 -- druid magic level
local paladin = 30 -- paladin magic level
local knight = 10  -- knight magic level
-- END CONFIG
local vocsorc = {1,5}
local vocdruid = {2,6}
local vocpaladin = {3,7}
local vocknight = {4,8}

function onLogin(cid)
-- SORCERER
	if isInArray(vocsorc,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, sorcerer)
		doSendMagicEffect(v,65)
-- DRUID
	elseif isInArray(vocdruid,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, druid)
		doSendMagicEffect(v,65)
-- PALADIN 
	elseif isInArray(vocpaladin,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, paladin)
		doSendMagicEffect(v,65)
-- KNIGHT
	elseif isInArray(vocknight,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, knight)
		doSendMagicEffect(v,65)
	end
	return true
end
{Not Tested , so report back if it works or not}

Rep++ If It Helpful For You :)
 
no one help me with my script :(
what you need.. how i can help you?

- - - Updated - - -

Here We Are :)
Lua:
-- START CONFIG
local sorcerer = 80 -- sorcerer magic level
local druid = 80 -- druid magic level
local paladin = 30 -- paladin magic level
local knight = 10  -- knight magic level
-- END CONFIG
local vocsorc = {1,5}
local vocdruid = {2,6}
local vocpaladin = {3,7}
local vocknight = {4,8}

function onLogin(cid)
-- SORCERER
	if isInArray(vocsorc,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, sorcerer)
		doSendMagicEffect(v,65)
-- DRUID
	elseif isInArray(vocdruid,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, druid)
		doSendMagicEffect(v,65)
-- PALADIN 
	elseif isInArray(vocpaladin,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, paladin)
		doSendMagicEffect(v,65)
-- KNIGHT
	elseif isInArray(vocknight,getPlayerVocation(cid)) then
        doPlayerAddMagLevel(cid, knight)
		doSendMagicEffect(v,65)
	end
	return true
end
{Not Tested , so report back if it works or not}

Rep++ If It Helpful For You :)
hahaha
this will add xx magic levels each time when players login.. players can get magic level 800000000 :D
so this one is much better (as you script but with some edits)

Code:
local sorcerer = 80 -- sorcerer magic level
local druid = 80 -- druid magic level
local paladin = 30 -- paladin magic level
local knight = 10 -- knight magic level
local vocsorc = 1 -- sorcerer vocation id just as in vocations.xml
local vocdruid = 2  -- druid vocation id just as in vocations.xml
local vocpaladin = 3  -- paladin vocation id just as in vocations.xml
local vocknight = 4  -- knight vocation id just as in vocations.xml
local pos = getPlayerPosition(cid)
local storage = 12525  --- put empty storage
 
function onLogin(cid)
if getCreatureStorage(cid, storage) > 0 then
return 1
end
-- SORCERER
	if getPlayerVocation(cid) == vocsorc and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, sorcerer)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
		elseif getPlayerVocation(cid) == vocdruid and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, vocdruid)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
		elseif getPlayerVocation(cid) == vocpaladin and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, vocpaladin)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
		elseif getPlayerVocation(cid) == vocknight and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, vocknight)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
	end
	return true
end
this is what blazzinn needs
REP++ me :p
 
RacePvP

Greets!

I got a few for ya that would make my Race Wars server perfect. ;)
Lets start with one that is greatly important.

The server will be based on different Races, so its important that Humans as for example can't attack other Humans but still works normaly on attacking Elfs.
This will be important to prevent wars in your own race and focus on the others.

So in other words:
getPlayerVocation(cid) (lets say 1 and 2) can't attack vocation 1 and 2 as they are Humans. Vocation 3 and 4 canno't attack eachother but still vocation 1 and 2.

My problem is that im using TFS 0.2 (Mystic Spirit) and it doesn't seem to have the functin: - function onCombat(cid, target)
So is it even possible to create a working script for 0.2 in one way or another without Source Editing?

I always release my servers once they are done, hosted, tested, bugfixed and will therefor keep em as clean as possible.

Its great that you are helping people even if this can be solved or not.
You will be in my credits if you manage to fix it, just so you know. :)

Kind Regards,
Eldin.
 
ok so where does this go and what i name it as?
what you need.. how i can help you?

- - - Updated - - -


hahaha
this will add xx magic levels each time when players login.. players can get magic level 800000000 :D
so this one is much better (as you script but with some edits)

Code:
local sorcerer = 80 -- sorcerer magic level
local druid = 80 -- druid magic level
local paladin = 30 -- paladin magic level
local knight = 10 -- knight magic level
local vocsorc = 1 -- sorcerer vocation id just as in vocations.xml
local vocdruid = 2  -- druid vocation id just as in vocations.xml
local vocpaladin = 3  -- paladin vocation id just as in vocations.xml
local vocknight = 4  -- knight vocation id just as in vocations.xml
local pos = getPlayerPosition(cid)
local storage = 12525  --- put empty storage
 
function onLogin(cid)
if getCreatureStorage(cid, storage) > 0 then
return 1
end
-- SORCERER
	if getPlayerVocation(cid) == vocsorc and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, sorcerer)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
		elseif getPlayerVocation(cid) == vocdruid and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, vocdruid)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
		elseif getPlayerVocation(cid) == vocpaladin and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, vocpaladin)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
		elseif getPlayerVocation(cid) == vocknight and getCreatureStorage(cid, storage) < 0 then
	  doPlayerAddMagLevel(cid, vocknight)
		doSendMagicEffect(pos,65)
		doCreatureSetStorage(cid, storage, 1)
		return true
	end
	return true
end
this is what blazzinn needs
REP++ me :p
 
in your creaturescrpits/scripts make file name vocmagic.lua

and paste the script then in creaturescripts/data/login.lua post
after
Lua:
	registerCreatureEvent(cid, "GuildMotd")

paste
Lua:
	registerCreatureEvent(cid, "vocmagic")

then in your creaturescripts/creaturescripts.xml paste this
XML:
	<event type="login" name="vocmagic" event="script" value="vocmagic.lua"/>
 
Back
Top