• 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 !
Im wanna a script, when you use a item, give you 20% max mana/hp, item lost, and you cant use this and any heal spell in 2sec.

Lua:
local storage = 1000 -- Replace with unused storage.

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureHealth(cid) < getCreatureMaxHealth(cid) and getCreatureMana(cid) < getCreatureMaxMana(cid) then
		if doPlayerRemoveItem(cid, item.itemid, 1) then
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid) * 0.2)
			doCreatureAddMana(cid, getCreatureMaxMana(cid) * 0.2)
			exhaustion.set(cid, storage, 2000)
		elseif exhaustion.get(cid, storage) then
			doPlayerSendCancel(cid, "You've already used this spell in the last 2 seconds.")
			doSendMagicEffect(getThingPos(cid), CONST_ME_POOF)
		end
	return true	
end
Don't know if it'll work.
 
No + Im sorry but i dont accept more script request. Because im bussy. :(
 
Lua:
local storage = 1000 -- Replace with unused storage.

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureHealth(cid) < getCreatureMaxHealth(cid) and getCreatureMana(cid) < getCreatureMaxMana(cid) then
		if doPlayerRemoveItem(cid, item.itemid, 1) then
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid) * 0.2)
			doCreatureAddMana(cid, getCreatureMaxMana(cid) * 0.2)
			exhaustion.set(cid, storage, 2000)
		elseif exhaustion.get(cid, storage) then
			doPlayerSendCancel(cid, "You've already used this spell in the last 2 seconds.")
			doSendMagicEffect(getThingPos(cid), CONST_ME_POOF)
		end
	return true	
end
Don't know if it'll work.

[31/07/2012 17:42:19] [Error - LuaScriptInterface::loadFile] data/actions/scripts/heal.lua:14: 'end' expected (to close 'function' at line 3) near '<eof>'
[31/07/2012 17:42:19] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/heal.lua)
[31/07/2012 17:42:19] data/actions/scripts/heal.lua:14: 'end' expected (to close 'function' at line 3) near '<eof>'

:/
 
[31/07/2012 17:42:19] [Error - LuaScriptInterface::loadFile] data/actions/scripts/heal.lua:14: 'end' expected (to close 'function' at line 3) near '<eof>'
[31/07/2012 17:42:19] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/heal.lua)
[31/07/2012 17:42:19] data/actions/scripts/heal.lua:14: 'end' expected (to close 'function' at line 3) near '<eof>'

:/

Lua:
local storage = 1000 -- Replace with unused storage.

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureHealth(cid) < getCreatureMaxHealth(cid) and getCreatureMana(cid) < getCreatureMaxMana(cid) then
		if doPlayerRemoveItem(cid, item.itemid, 1) then
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid) * 0.2)
			doCreatureAddMana(cid, getCreatureMaxMana(cid) * 0.2)
			exhaustion.set(cid, storage, 2000)
		elseif exhaustion.get(cid, storage) then
			doPlayerSendCancel(cid, "You've already used this spell in the last 2 seconds.")
			doSendMagicEffect(getThingPos(cid), CONST_ME_POOF)
		end
	return true
	end
end
Knew I forgot something haha.
 
I need a script that draws from several storage id and shows the selected text (for example: storage id 1 = text: Congratulations you won xxx) and that there was no repetition in choosing. Sorry for my bad english and please help me !
 
Hello otswe!
I need monster spell + hmm... creaturescript script or something like that. Let me introduce what i want:
Informations:
- Monster have spell to drop bomb. When monster drop bomb (item, id="13050"), bomb have 5 second to explode (countdown will show up as event 1,2,3,4,5 doSendAnimatedText). After 5 seconds cooldown, message (doSendAnimatedText) - Boom! display and it deal damage on area (area is like exori 3x3) and bomb is removed. It deal 100-250 damage on each square of area when is player on this area.

I wish you know how i want dear, otswe.
I'll be waiting for your script :D
Regards,
Fresh.
 
@fresh
I will do my best. I will come home in 1h. I will work right away.


@TM
Thank you for the rep :)

- - - Updated - - -

Sorry fresh but i dont know how to make this script :/ Ive managed to fix the spell with creating the bomb and now i dont know how to make the item to get removed from that place. Im not good on spells :/

Maybe someone can help me out.
 
I need one script for make impossible to drop some itens.. only possible make trade

Something along the lines of..?

Lua:
function onEquip(cid, item, slot)
	getPlayerItemById(cid, deepSearch, itemId[, subType = -1])
	if getPlayerItemId ="XXX" --Item ID of the undroppable item.
		then doPlayerSendCancel(cid, "Sorry, you cannot drop that item.")
	return 0
end
 
No i dont think you can prevent someone to throw something with onDeEquip :S
 
This is a hard request: Checkpoint System

when a player walk in a especial title inside in cave, the player get a storage value, in the city the player can go to a especial room and when walk in a especial title too, the player pop-up the channel window like a selectable windows, with the name of the cave (or more caves, depend of collected storage values) an can teleport selecting the channel

it can be done with lua function:
Lua:
doPlayerSendChannels(cid, channels)
and the creature event:
Lua:
onChannelRequest(cid, channel, custom)
 
Need Updat
need add to see when look at yourself
real post http://otland.net/f82/kills-deaths-look-166381/

PHP:
function onLook(cid, thing, position, lookDistance)
function getDeathsAndKills(cid, type) -- by vodka
	local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0
		if (query:getID() ~= -1) then 
			repeat
				d = d+1
			until not query:next()
			query:free()
		end
	return d  
end
if isPlayer(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times")
end
return true
end
 
@otswe:

To remove an item from tile:
Lua:
function deleteItem(id, pos)
  local uid = getTileItemById(pos, id).uid
  return uid > 0 and doRemoveItem(uid)
end

That to lib...
And in script:
Lua:
addEvent(deleteItem, secondstoact, itemid, positionoftheitem)

That's it...

@exedion: good idea! you gave me an idea to make selectable menu on popup...

@otswe: about exedion's idea, i think you would do it fast...

@ADM LosT:

Lua:
function onLook(cid, thing, position, lookDistance)
function getDeathsAndKills(cid, type) -- by vodka
    local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0
        if (query:getID() ~= -1) then 
            repeat
                d = d+1
            until not query:next()
            query:free()
        end
    return d  
end
if isPlayer(thing.uid) then
if cid ~= thing.uid then
doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times")
else
doPlayerSetSpecialDescription(cid.uid, "\nYou have killed: ["..getDeathsAndKills(cid, "kill").."] Players.\nYou have died: ["..getDeathsAndKills(cid, "death").."] Times")
end
end

Hope it works ^^
 
Back
Top