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

Otswe Free Scripting Service (Actions/Movements/Creaturescripts) Open Again!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,782
Solutions
31
Reaction score
2,286
Location
Sweden?
Cyko Free Scripting Service (Actions/Movements/Creaturescripts/Talkactions) ReOpen!

Hello,

I decide to make scripts depending on players request.

Why im doing this?
Ticket to hevean? <- Also helping people and learn the lua language.
Please post below and i will hopefully be able to make the script you desire.

I repon Otswe Free Scripting Service, Ill only accept medium hard scripts. Follow these rules and we are good to go!

Rule number 1: No Spamming!
Rule number 2: Be Patient!
Rule number 3: There is no rule number 3!
Rule number 4: Follow all these rules!

Asfar you can see i accept only Actions/Movements/Creaturescripts/Talkactions/Globalevents! But ill accept npcs to, but depends how hard the request is.
My scripting Corner! Here you will be able to find scripts :D

My Scripts:
Need Special Storage To Enter The Platform!
Open Secret Hole - Timer!
Fire Explosion Into Area!
Remove Swarms From Magical Bushs!
Simple Upgrade Item!
Automatic Cleaning Spefic Area!
Magic Wall With Countdown!
Premium Scroll!
http://otland.net/f81/anti-lure-monster-v-1-otswe-171236/
http://otland.net/f81/advance-tutorial-hints-script-easy-configure-170739/
http://otland.net/f81/house-system-171153/
http://otland.net/f82/update-automatic-currently-health-mana-172129/
Check Points - Advanced!

Older Scripts:
Simple Premium Tile!
Exp Token!
Throw item get teleported!
 
Last edited:
Lopez if i going to understand that you want me too make the script to clear the water spot and the sword?

not otswe, I want to use when the sword and the bottle in griete it, appears the entry and past a time (example 30 sec) disappears, the sword and the entry. You understand?
a greeting:rolleyes:

---------update--------
I wonder if you will have understood?
 
Last edited:
He want secret entrance to nomads cave. I'm not sup if you have to use or drop the scimitar there(it removes the sword and creates unmoveable sword-stuck-in-ground) and then pour the water on it(removes new sword and opens entrance)
 
Okay, what I want is to have an animation play on top of a bush all the time (/z 68, the bug swarm).

After that, I want you to be able to use a potion on the bush that will make the bugs go away for 30 seconds, summons a crab, and it gives you a storage value. When you use the potion on 5 bushs to make the bugs go away, the 6th bush that you remove the bugs from it teleports you to a new location.

Furthermore, I don't want players to get a storage value untill the bugs come back to the bush, so during the 30 seconds they are away, people can't use the potion on it and get the storage value

Your script will be soon done, in few hours i will post it!

- - - Updated - - -

@Sportacus
Im finally done with the script, which took time to figure out.

Info = By using a item, on the bushes with swarms, you will clean the swarms and the bush will turn into a grass tuff and a crab will be summoned, after amout of time you decide how long it will take to the bush grow back then the swarms will come back when the bush is back.

Sorry, but i dont know how i should do with the teleport thing.

First goto globalevents.xml and paste this line:
Code:
<globalevent name="bushs_swarms" interval="0.5" event="script" value="bushs.lua"/>

Now goto globalevents/scripts and create new lua name it "bushs" and paste this code below:
Lua:
local otswe = {
pos_bush1 = {x=1001, y=1002, z=7}, -- Pos of the first bush
pos_bush2 = {x=1001, y=1003, z=7}, -- Pos of the Second bush
pos_bush3 = {x=1001, y=1004, z=7}, -- Pos of the Third bush
pos_bush4 = {x=1001, y=1005, z=7}, -- Pos of the Fourth bush
pos_bush5 = {x=1001, y=1006, z=7}, -- Pos of the Fifth bush
pos_bush6 = {x=1001, y=1007, z=7}, -- Pos of the Sixth bush
bush_id = 2767 -- ID of the bush
}
function onThink(cid, interval)
if getTileItemById(otswe.pos_bush1, otswe.bush_id).uid > 0 then
doSendMagicEffect(otswe.pos_bush1, 68)
else
doSendMagicEffect(otswe.pos_bush1, 255)
end
if getTileItemById(otswe.pos_bush2, otswe.bush_id).uid > 0 then
doSendMagicEffect(otswe.pos_bush2, 68)
else
doSendMagicEffect(otswe.pos_bush2, 255)
end
if getTileItemById(otswe.pos_bush3, otswe.bush_id).uid > 0 then
doSendMagicEffect(otswe.pos_bush3, 68)
else
doSendMagicEffect(otswe.pos_bush3, 255)
end
if getTileItemById(otswe.pos_bush4, otswe.bush_id).uid > 0 then
doSendMagicEffect(otswe.pos_bush4, 68)
else
doSendMagicEffect(otswe.pos_bush4, 255)
end
if getTileItemById(otswe.pos_bush5, otswe.bush_id).uid > 0 then
doSendMagicEffect(otswe.pos_bush5, 68)
else
doSendMagicEffect(otswe.pos_bush5, 255)
end
if getTileItemById(otswe.pos_bush6, otswe.bush_id).uid > 0 then
doSendMagicEffect(otswe.pos_bush6, 68)
else
doSendMagicEffect(otswe.pos_bush6, 255)
end
return true
end

Now goto Actions.xml and paste this line:
Code:
<action itemid="id-of-potion" event="script" value="magicalbush.lua"/>

Now at Actions/scripts make new lua name it "magicalbush" and paste this code below:
Lua:
local otswe = {
create_bush_time = 30, -- How long will it take, until the magical bush will be back
create_grass_tuff_time = 29, -- the should be always 1 second less than the magical bush
summon_monster = "Crab",
bush_id = 2767, -- ID of the magical bush
pos_bush1 = {x=997, y=997, z=7}, -- Pos of bush 1
pos_bush2 = {x=998, y=997, z=7}, -- Pos of bush 2
pos_bush3 = {x=999, y=997, z=7}, -- Pos of bush 3
pos_bush4 = {x=1000, y=997, z=7}, -- Pos of bush 4
pos_bush5 = {x=1001, y=997, z=7}, -- Pos of bush 5
pos_bush6 = {x=1002, y=997, z=7}, -- Pos of bush 6
text_onuse = "Splash", -- Effect onuse the potion, on the bush
text_onclear_swarms = "You have clear the bush from swarms.", -- When you used the potion and the bush is clear
text_onuse_wrong_bush = "Sorry, but you can only use this item only on magical bushes." -- If you are trying to use the potion on something else
}

local function doRemoveItemFromPos(position, itemid, count)
local item = getTileItemById(position, itemid)
if(item.uid ~= 0)then
return doRemoveItem(item.uid, count or -1)
end
return false
end

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if itemEx.itemid == otswe.bush_id then
if getTileItemById(otswe.pos_bush1, otswe.bush_id).uid > 0 or getTileItemById(otswe.pos_bush2, otswe.bush_id).uid > 0 or getTileItemById(otswe.pos_bush3, otswe.bush_id).uid > 0 or getTileItemById(otswe.pos_bush4, otswe.bush_id).uid > 0 or getTileItemById(otswe.pos_bush5, otswe.bush_id).uid > 0 or getTileItemById(otswe.pos_bush6, otswe.bush_id).uid > 0 then
local pos = getThingPos(itemEx.uid)
doCleanTile(toPosition, true)
doSendMagicEffect(toPosition, 1)
doSendMagicEffect(toPosition, 53)
doCreateItem(6216,1,toPosition)
doSendAnimatedText(toPosition,otswe.text_onuse,TEXTCOLOR_BLUE)
doPlayerSendTextMessage(cid, 22, otswe.text_onclear_swarms)
doSummonCreature(otswe.summon_monster, toPosition)
addEvent(doRemoveItemFromPos, otswe.create_grass_tuff_time*1000, toPosition, 6216)
addEvent(doCreateItem, otswe.create_bush_time*1000,2767,1,pos)
addEvent(doCleanTile, otswe.create_grass_tuff_time*1000,pos)
else
doPlayerSendCancel(cid, otswe.text_onuse_wrong_bush)
end
return true
end
return false 
end

Enjoy!
 
Last edited:
i wanna this script ( Rich Set Upgrader )

when use item Rich Set Upgrader id ( 8306 ) on item Rich helmet id ( 2496 )
than add player item Upgrade Rich helmet id ( 2501 )
than remove items Rich Set Upgrader id ( 8306 ) and Rich helmet id ( 2496 )
 
i wanna this script ( Rich Set Upgrader )

when use item Rich Set Upgrader id ( 8306 ) on item Rich helmet id ( 2496 )
than add player item Upgrade Rich helmet id ( 2501 )
than remove items Rich Set Upgrader id ( 8306 ) and Rich helmet id ( 2496 )

Here you go bro!

Info: If i understood right, when you use a item(8306)<- pure energy on a other item with id(2496) <-- horned helmet, the horned helmet will be upgraded to item (2501) <- ceremonial mask! Both the pure energy and horned helmet will be removed! It will send out a nice textcolor effect and a text message!

Lua:
local otswe = {
old_item = 2496, -- This is the old item which will be upgraded to new item
new_item = 2501, -- This is the new item which is upgraded from the old one
text_onuse = "UPGRADE", -- This animated text will come out when you upgrade
text_complete_upgrade = "Congratz, you have upgraded your item" -- This text will come out when the upgrade is done
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == otswe.old_item then
doPlayerAddItem(cid,otswe.new_item,1)
doSendAnimatedText(toPosition,otswe.text_onuse,TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, 21, otswe.text_complete_upgrade)
doRemoveItem(item.uid, 1)
doRemoveItem(itemEx.uid, 1)
return true
end
end
 
Last edited:
No problem.

Warofthetitans will not take over the theard! Request and he will make it to you!
 
Thanks Mooosie :)

- - - Updated - - -



Raid im soon done with the script, it took me time to figure out how to optimze it and how to make it at the best way.
I will edit this post with the script in few hours.

- - - Updated - - -

Finally after struggling with the script, fixed bugs and tested it.

Now its working 100% tested on tfs 0.3.6!

Info: By throwing a item on the special tile, it create fields over the area that you decided and it will get cleaned after the time you configuted on the config. Its 100% configureable, a monkey understand the config and add right pos.

This is the editable area:
Lua:
 local otswe = {
    actionid = 9595, -- the action id of the special tile 
    throw_item = 2160, -- the item which get throwed on the special tile
    create_item = 1487, -- The fields which will be created on the area
    clean_time = 2, -- How long will the fields stay until it clean everything from the floor
    fire_text = "BURN!", -- Text over the whole place
    block_from_spamming_pos = {x=999,y=999,z=7}, -- The pos of the special tile
    item_tile_block_from_spamming = 1285 -- What item will block the special tile to not spamming the fire fields
    } 
    
  local area_create_fields = {
	from = {x=995,y=994,z=7}, -- From top left
	to = {x=1007,y=1006,z=7} -- to bottom right
}

Enjoy! Feedback!

By the way this script wasn't small took me time to figure out :/

Go to movements.xml and paste these two lines:
Code:
<movevent type="AddItem" tileitem="1" actionid="9595" event="script" value="boom_fields.lua" />
<movevent type="StepIn" actionid="9595" event="script" value="boom_fields.lua"/>

Now go to movements/scripts and create new lua name it "boom_fields" and paste this code below!
Lua:
local created_by_otswe = true -- Do not edit, if you touch this line the script will not work propely

function isCreateitemable(pos)
	pos.stackpos = 0
	local tile = getThingfromPos(pos, false)
	if tile ~= 0 and not hasProperty(tile.uid, CONST_PROP_BLOCKSOLID) and not isCreature(getTopCreature(pos).uid) then
		return true
	end
end
    
    local otswe = {
    actionid = 9595, -- the action id of the special tile 
    throw_item = 2160, -- the item which get throwed on the special tile
    create_item = 1487, -- The fields which will be created on the area
    clean_time = 2, -- How long will the fields stay until it clean everything from the floor
    fire_text = "BURN!", -- Text over the whole place
    block_from_spamming_pos = {x=999,y=999,z=7}, -- The pos of the special tile
    item_tile_block_from_spamming = 1285 -- What item will block the special tile to not spamming the fire fields
    } 
    
  local area_create_fields = {
	from = {x=995,y=994,z=7}, -- From top left
	to = {x=1007,y=1006,z=7} -- to bottom right
}
       
function onAddItem(moveitem, item, tileitem, pos, cid)
 for x = area_create_fields.from.x, area_create_fields.to.x do
	for y = area_create_fields.from.y, area_create_fields.to.y do
	local p = {x=x,y=y,z=area_create_fields.from.z}
     if moveitem.itemid == otswe.throw_item then
     if isCreateitemable(p) or created_by_otswe == true then 
        doCreateItem(otswe.create_item, 1, p)
        doSendAnimatedText(p, otswe.fire_text ,TEXTCOLOR_RED) -- if you dont like the text just remove this line
        addEvent(doCleanTile, otswe.clean_time * 1000, p,false)
        doCreateItem(otswe.item_tile_block_from_spamming, 1, otswe.block_from_spamming_pos)
        end
      end
   end
 end
end
 
function onStepIn(cid, item, position, fromPos, fromPosition)
    if item.actionid == otswe.actionid then
	if isPlayer(cid) then
	doTeleportThing(cid, fromPosition, false)
	doPlayerSendTextMessage(cid, 21, "Sorry, you cant step into this magical platform.")
	end
  end
end

Hey mate, i got an error, i'm trying to make it works on Avesta, is looks like an error in functions look it

Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/banditbook.lua:onAddItem

attempt to index a boolean value
stack traceback:
        [C]: in function 'getThingfromPos'
        data/movements/scripts/banditbook.lua:5: in function 'isCreateitemable'
        data/movements/scripts/banditbook.lua:31: in function <data/movements/sc
ripts/banditbook.lua:26>

So what's wrong? is posible to make it work on avesta?
 
i need a script when you go on tile and dont have the storage is needed you get kicked 1 sqm back.
ht3.jpg
jh88.jpg
dh3.jpg
 
I alrdy made that script on first request.

i need a script when you go on tile and dont have the storage is needed you get kicked 1 sqm back.
ht3.jpg
jh88.jpg
dh3.jpg

There you go!

Add this to movement.xml
Code:
<movevent type="StepIn" actionid="100" event="script" value="storagetile.lua"/>

And go to movements/scripts and create new lua named storagetile.lua and paste the script below
Lua:
local this_script_belong_to_otswe = true -- True if you want the script work

local otswe = {
storage = 1000 -- Edit to unused storage
}
function onStepIn(cid, item, position, fromPos, fromPosition)
    if this_script_belong_to_otswe == true then
	if isPlayer(cid) and getPlayerStorageValue(cid, otswe.storage) >= 0 then
		doTeleportThing(cid, fromPosition, true)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
       		 doPlayerSendTextMessage(cid, 27, "Sorry, but you cant enter this tile!.")
end
end
end
 
Why this thread is down? is really usefull mates, otswe i finally make your script works on avesta, thanks haha... but now, is posible to make a script like a quest log? it might be a book showing getting some storage values and then saying to you the progress on that quest depending on teh value, is possible?
 
Bump, The scripting service is opened feel free to request :)

- - - Updated - - -

Added a list to my scripts!

- - - Updated - - -

I will not make old requests, all request should start fresh from page 5!
 
Back
Top