• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need a Script? Then I'm here to help!

Tibiamakers:
LUA:
function onUse(cid, item, frompos, item2, topos)  
        if item2.itemid == 8895 then 
                if math.random(100) <= 25 then
                        doRemoveItem(item.uid, 1)  
                        doPlayerAddItem(cid, 2160, 1) 
                        doPlayerSendTextMessage(cid, 9, "Congratulations!") 
                else 
                        doPlayerSendTextMessage(cid,9,"Try again!")  
                end  
        end 
end

Try & comment. ;)

doesnt work to me ;( You cannot use this object.
 
PHP:
function onUse(cid, item, frompos, item2, topos)  
        if item2.itemid == 8895 then 
                if math.random(100) <= 25 then
                        doRemoveItem(item.uid, 2157)  
                        doPlayerAddItem(cid, 2160, 1) 
                        doPlayerSendTextMessage(cid, 9, "Congratulations!") 
                else 
                        doPlayerSendTextMessage(cid,9,"Try again!")  
                end  
        end 
return true
end

?:$


@edit only i need that remove id 2157
 
Last edited:
I need a script!
I need the !online script to only show 3/4 online players. It will look like this...

!online
Code:
John [200], James [150], Test [120], ... See the rest at "www.yourwebsite.com."
 
I need a script!
I need the !online script to only show 3/4 online players. It will look like this...

!online
Code:
John [200], James [150], Test [120], ... See the rest at "www.yourwebsite.com."

I'ma try doing this script editing the online script once I wake up, just got back home from a partey and Im kinda gone.. brb gdnight :)
 
Nop, this tibiamakers:
LUA:
function onUse(cid, item, frompos, item2, topos)   
        if item2.itemid == 8895 then  
                if math.random(100) <= 25 then 
                        doRemoveItem(item.uid,1)   
                        doPlayerAddItem(cid, 2160, 1)  
                        doPlayerSendTextMessage(cid, 9, "Congratulations!")  
                else  
                        doPlayerSendTextMessage(cid,9,"Try again!")   
                end   
        end  
return true 
end
 
whole chess system based on movements :D

Is there chess objects in tibia?


I need a script!
I need the !online script to only show 3/4 online players. It will look like this...

!online
Code:
John [200], James [150], Test [120], ... See the rest at "www.yourwebsite.com."

This :
LUA:
local config = {
	showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
function onSay(cid, words, param, channel)
	local str = ""
	local t = getPlayersOnline() 
	local len = {}
		for i = 1, math.floor(#t*0.75) do
			if((config.showGamemasters or getPlayerCustomFlagValue(t[i], PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(t[i], PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(t[i]) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(t[i]))) then
				if #len < 1 then
					str = str..""..getCreatureName(t[i]).."["..getPlayerLevel(t[i]).."]"
					table.insert(len,1)
				else
					str = str..", "..getCreatureName(t[i]).."["..getPlayerLevel(t[i]).."]"
				end
			end
	end
	if #t > 1 then
		doPlayerSendTextMessage(cid, 27, "[".. #t .."] player" .. (#t ~= 1 and 's') .." online : \n"..str..", .......      \n-->To see the rest visit www.online.com<--   ")
	else
		doPlayerSendTextMessage(cid, 27,"1 player online :\n "..getCreatureName(cid).."["..getPlayerLevel(cid).."].")
	end
	return true
end
 
Last edited:
@Post
It will be nice if you wrote the request then link to your work .

Make the !online command to show up in a Text Dialog popup

Like this?
LUA:
local config = {
	showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
function onSay(cid, words, param, channel)
	local str = ""
	local t = getPlayersOnline() 
	for _,pid in ipairs(t) do
			if((config.showGamemasters or getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
					str = str.."• "..getCreatureName(pid).."["..getPlayerLevel(pid).."]\n"
			end
	end
	doShowTextDialog(cid, 6533, "¤ ["..#t.."] player".. (#t ~= 1 and 's') .." online : \n\n"..str.."")
	return true
end
 
Last edited:
Nop, this tibiamakers:
LUA:
function onUse(cid, item, frompos, item2, topos)   
        if item2.itemid == 8895 then  
                if math.random(100) <= 25 then 
                        doRemoveItem(item.uid,1)   
                        doPlayerAddItem(cid, 2160, 1)  
                        doPlayerSendTextMessage(cid, 9, "Congratulations!")  
                else  
                        doPlayerSendTextMessage(cid,9,"Try again!")   
                end   
        end  
return true 
end

why you put a 1 here? doRemoveItem(item.uid,1)
 
LUA:
function onUse(cid, item, frompos, item2, topos)  
        if item2.itemid == 8895 then 
                if math.random(1,100) <= 25 then 
                        doPlayerAddItem(cid, 2160, 1) 
                        doPlayerSendTextMessage(cid, 9, "Congratulations!") 
                else 
                        doPlayerSendTextMessage(cid,9,"Try again!")  
                end 
        doRemoveItem(item.uid, 1) 
        end 
end
 
but i want that the script removes 1 of the id 2157 and if math.random(1,100) <= 25 then gives you 1 of the id 2160 and doPlayerSendTextMessage(cid, 9, "Congratulations!") ELSE doPlayerSendTextMessage(cid,9,"Try again!")

i dont know if you understand me :huh:
 
Back
Top