• 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:
Hello,

Befor continue i just scripting: (Actions/Movements/Creaturescripts)

I decide to make scripts depending on players request.

Why im doing this?
Ticket to hevean :) <- Also helping new people and i will learing durin scripting.
Please post below and i will hopefully be able to make the script you desire.

Just follow this rules and we all are good to go:
Rule number
1. JUST SMALL SCRIPTIS!
Rule number
2. No spamming!
Rule number
3. There isnt rule number 3!
Rule number
4. Follw Rule 1 & 2!

i need a forging npc.

how it works, very simple u bring 2 armors, example magic plate armor + golden armor u get a xxx armor but with chance % succesing
can u make that npc??
 
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
 
A little explanation what ive done:
The script is based on what you say, that it will remove a item and add new item on the pos which item got removed. But i thougt hmm i should make like a timer so the item should go back to place and everything is normal. If i going to understand right on your pics that place is secret xD

Tested on tfs 0.3.6 100% working!

So Enjoy :)

Just edit this on the local otswe:
Code:
remove_item = 2767, -- id of the item which going to be removed
create_item = 2768, -- id of the item which going to be created
pos = {x=1045, y=1058, z=7}, -- pos of the item which will be removed and also created
remove_time = 30, -- how long should the item be removed
create_removed_time = 31, -- always put 1 sec after the remove time

At actions.xml add this line:
Code:
<action actionid="7500" event="script" value="otswe_switch.lua"/>

Now go to actions/scripts make new lua and name it "otswe_switch.lua" and paste the script below

Lua:
local otswe = {
	remove_item = 2767, -- id of the item which going to be removed
	create_item = 2768, -- id of the item which going to be created
	pos = {x=1045, y=1058, z=7}, -- pos of the item which will be removed and also created
	remove_time = 30, -- how long should the item be removed
	create_removed_time = 31, -- always put 1 sec after the remove time
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		if getTileItemById(otswe.pos, otswe.remove_item).uid > 0 then
			doRemoveItem(getTileItemById(otswe.pos, otswe.remove_item).uid)
			doCreatureSay(cid, 'Something has been moved for '..otswe.remove_time..' seconds, please explore', TALKTYPE_MONSTER)
			addEvent(doCreateItem, 1 * 1000, otswe.create_item, 1, otswe.pos) -- no edit
			addEvent(doCleanTile, otswe.remove_time * 1000,otswe.pos,false)
			addEvent(doCreateItem, otswe.create_removed_time * 1000, otswe.remove_item, 1, otswe.pos)
			
		else
			doPlayerSendCancel(cid, 'The lever is already used.')
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Lua:
local this_script_belong_to_otswe = true -- True if you want the script work
        if this_script_belong_to_otswe == true then

Hahaha this is nice ^^
 
Thank you guys :)
I going to rest, if someone request I will make it tomorrow.
 
I don't know if it is so hard... a script like this, you use a firefield on X item id, and then change others id in the area and get a storage value, is some kind of put fire on the gasoline and the entire room will burn on fire, but after like 2 min, it will get back to the normal state again, is posible?
 
Thanks Mooosie :)

- - - Updated - - -

I don't know if it is so hard... a script like this, you use a firefield on X item id, and then change others id in the area and get a storage value, is some kind of put fire on the gasoline and the entire room will burn on fire, but after like 2 min, it will get back to the normal state again, is posible?

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
 
Last edited:
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
 
action by items

Hi otswe :p
this script that I ask now maybe is a little more complicated, but you are very good and is that the haras;), the idea as seen in the pictures it is obvious, it is an action of tibia rl, which creates an entry down, of course, as in the previous script I did using this cimatarra and a bottle of water you put also a time that the sword and the entry is cleared. I hope you have understood the idea and do me it. Thanks in advance friend. :w00t:

ayuda 3.jpg ---------------------- ayuda 4.jpg
 
Last edited:
Lopez if i going to understand that you want me too make the script to clear the water spot and the sword?
 

Similar threads

Back
Top