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

Troll Scripter's Free Script Service.

Troll Scripter

Gesior is my God.
Joined
Jan 29, 2012
Messages
145
Reaction score
4
Request scripts here and I'll make them for you if it's not ALL too much work to be done.

  • I am scripting with the latest TFS 0.4 functions, so it is not recommended to ask for a script if you are using below 0.4.
  • I don't edit existing scripts because I don't want to go trough other people's code. I only go trough my own, so if you make a request I'll make it from scratch.
  • You have to tell me in detail excatly what it is that you want.
  • I don't make spells, NPC's or PHP.

Understand that a script can take minutes or hours to make from the time that you've made a post. It all depends on my activity.

P.S: If you're a scripter, don't create scripts in my thread. This is my thread and I make the scripts here :)
 
Last edited:
I appriciate what u guys doing for me, now I have another error xD

[06/02/2012 16:06:12] [Error - LuaScriptInterface::loadFile] data/actions/scripts/custom/lever transforming.lua:8: 'then' expected near ','
[06/02/2012 16:06:12] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/custom/lever transforming.lua)
[06/02/2012 16:06:12] data/actions/scripts/custom/lever transforming.lua:8: 'then' expected near ','

this is the script
Lua:
local pos = {{x = 1136, y = 1004, z = 7}, {x = 1137, y = 1004, z = 7}, {x = 1138, y = 1004, z = 7}}
local transformItemTile = {x = 1139, y = 1004, z = 7}
local item1, item2, item3 = 2476, 2147, 2160
local newItem = 1614
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		if getThingFromPos(pos[1]).actionid, getThingFromPos(pos[2]).actionid, getThingFromPos(pos[3]).actionid = 9991, 9992, 9993 then
			if getTileItemById(pos[1], item1) and getTileItemById(pos[2], item2) and getTileItemById(pos[3], item3) then
				doTransformItem(item.uid, 1946, 1)
				doPlayerRemoveItem(cid, item1, 1)
				doPlayerRemoveItem(cid, item2, 1)
				doPlayerRemoveItem(cid, item3, 10)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have created an item!.")
				doCreateItem(newItem, 1, transformItemTile)
				doTransformItem(item.uid, 1945, 1)
			else
				doPlayerSendCancel(cid, "The required items have not been placed on the tile.")
			end
		end
	end
	return true
 
Lua:
local t1, t2, t3 = {
	{{x = 100, y = 100, z = 7}, ITEM, 1}, -- POSITION // ITEM_ID // COUNT
	{{x = 100, y = 100, z = 7}, ITEM, 1},
	{{x = 100, y = 100, z = 7}, ITEM, 1}
}

local newItem = {
	{x = 100, y = 100, z = 7}, 2472, 1
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = item.itemid == 1945
	if v then
		local id1, id2, id3 = getTileItemById(t1[1], t1[2]), getTileItemById(t2[1], t2[2]), getTileItemById(t3[1], t3[2])
		if((id1.uid < t1[3] or 1) or (id2.uid < t2[3] or 1) or (id3.uid < t3[3] or 1) then
			return doPlayerSendCancel(cid, "Sorry, not possible.")
		else
			doRemoveItem(id1.uid, t1[3] or 1)
			doRemoveItem(id2.uid, t2[3] or 1)
			doRemoveItem(id3.uid, t3[3] or 1)
			doSendMagicEffect(t1[1], CONST_ME_POFF)
			doSendMagicEffect(t2[1], CONST_ME_POFF)
			doSendMagicEffect(t3[1], CONST_ME_POFF)
			doCreateItem(newItem[2], newItem[3] or 1, newItem[1])
			doSendMagicEffect(newItem[1], CONST_ME_MAGIC_BLUE)
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
i need script
if player have storage xxx then monster no attack him and player cant attack monster
if pleyer have storage yyy then player and monster can attack :)
sorry for my english :X
 
i need script
if player have storage xxx then monster no attack him and player cant attack monster
if pleyer have storage yyy then player and monster can attack :)
sorry for my english :X

Lua:
local playerStorage = 21985

function onAttack(cid, target)
	if isMonster(uid).target and getPlayerStorageValue(cid, playerStorage) then
		doPlayerSendCancel(cid, "You cannot attack this creature.")
	elseif doMonsterSetTarget(cid, isPlayer(cid)) and getPlayerStorageValue(cid, playerStorage) then
		doMonsterChangeTarget(cid)
	end
	return true
end
 
Example: If a player use a Talon (ID 2151), he gets one of X random items. These random items are addon items (dragon leather, they are countable aka stackable items) and (soul stone, they are not countable aka not stackable). The script should have a % function.


for countable aka stackable items {2060,10,50}
-- itemid, count, chance (%)

normal items {2060,50}
-- itemid, chance (%)
 
@up you played thenoobwar? :p

And yh it's a nice function, i also would request this :) ty in advance
 
Example: If a player use a Talon (ID 2151), he gets one of X random items. These random items are addon items (dragon leather, they are countable aka stackable items) and (soul stone, they are not countable aka not stackable). The script should have a % function.


for countable aka stackable items {2060,10,50}
-- itemid, count, chance (%)

normal items {2060,50}
-- itemid, chance (%)

In other words, if have lots of talons: Example - 100 talons and use them, only use one.
If player used the talon (ID 2151) he will get any random addon item (all of them are obtainable) and (if the item is stackable he may get some more: Example - use talon get 6 peglegs) But obviously not TOO high countmax.

Also a % function as some will be rarer than others. (for example - demon essence or demon dusts)
 
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
doCreatureSetNoMove(cid, true)
doSendMagicEffect(getCreaturePosition(cid), 31)
doCreatureSay(cid, "STUNNED!", TALKTYPE_RED_1)
addEvent(doCreatureSetNoMove, 1000*4, cid, false)
doRemoveItem(item.uid)
return true
end


CAN YOU PUT 4 SEGS OF EXHAUSTION TOO MY FRIEND??
I MEAN DONT USE POTS, SPELLS FOR 4 SECS TYYY :d
 
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
doCreatureSetNoMove(cid, true)
doSendMagicEffect(getCreaturePosition(cid), 31)
doCreatureSay(cid, "STUNNED!", TALKTYPE_RED_1)
addEvent(doCreatureSetNoMove, 1000*4, cid, false)
doRemoveItem(item.uid)
return true
end


CAN YOU PUT 4 SEGS OF EXHAUSTION TOO MY FRIEND??
I MEAN DONT USE POTS, SPELLS FOR 4 SECS TYYY :d

Sorry, I can't be bothered. This will be 3 scripts. onUse, onCastSpell and onStepin. It's too much :/
 
Lua:
local rand = math.random(1, 100)
local highChance = 51 --if 51 and above
local middleChance = 21, 50 --if between 21 to 50
local lowChance = 1, 20 --if between 1 to 20
local newItem = {}
local saveChance = {}
local banana = {
	t0 = {itemid = 2006, countMin = 1, countMax = 3, chance = highChance},
	t1 = {itemid = 2010, countMin = 1, countMax = 6, chance = highChance},
	t2 = {itemid = 2012, countMin = 1, countMax = 6, chance = highChance},
	t3 = {itemid = 2013, countMin = 1, countMax = 6, chance = highChance},
	t4 = {itemid = 2014, countMin = 1, countMax = 6, chance = middleChance},
	t5 = {itemid = 2015, countMin = 1, countMax = 6, chance = middleChance},
	t6 = {itemid = 2016, countMin = 1, countMax = 6, chance = middleChance},
	t7 = {itemid = 2017, chance = lowChance},
	t8 = {itemid = 2018, chance = lowChance},
	t9 = {itemid = 2019, chance = lowChance}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
		if rand >= lowChance[1] and rand <= lowChance[2] then
			doPlayerAddItem(cid, math.random(t7.itemid, t9.itemid), 1, false)	
		elseif rand >= middleChance[1] and rand <= middleChance[2] then
			doPlayerAddItem(cid, math.random(t4.itemid, t6.itemid), newItem.countMax, false)
		elseif rand >= highChance then
			doPlayerAddItem(cid, math.random(t0.itemid, t3.itemid), newItem.countMax, false)
		else
		end
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received" .. getPlayerItemCount(cid, newItem.itemid) .. " " .. getItemNameById(newItem.itemid) ..".")
return true
end
 
Last edited:
Back
Top