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

[Pr0 h4x0r] OTLand LUAScript forum game!

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Reaction score
14
Location
Poland
Hi there!

Yesterday I had an idea for a brand new forum game :eek:

The rules are simple. You have to extend, optimize or fix script of a person above, so for example I am writing a script, next user fixes my fail bug, misspelling mistake and next user extends script with new cool effect etc.

More rules:
1. ONE post PER FIVE POSTS.
2. You can say that person above fails, JUST WHEN THE PERSON ABOVE REALLY FAILS!
3. Also you can say that the person above rox.
4. You can also post or update the changelog, it will be nicier.
5. You can use script on your OpenTibiaServer.
6. You HAVE to use LUA code tags!
[LUA ][/code]

The script is:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
	return TRUE
end

Have fun!

Regards,
Hermes
 
Last edited:
haha, this idea is brilliant! :D

~~ CHANGELOG ~~
* Added level requirement ;d

Lua:
local config = {
	level = 60
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerLevel(cid) < config.level) then
		doPlayerSendCancel(cid, "Not enought level to use this item.")
		return TRUE
	end

	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
	return TRUE
end
 
Just to refresh :D

~~ CHANGELOG ~~

* added configuration, 1/0 for level and vocation check;

Lua:
local config = {
levelCheck = 1
level = 60,
vocationCheck = 1
vocations = {1,5}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(config.vocationCheck == 1) then
		if(isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
			doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
			return TRUE
		end
	end
	if(config.levelCheck == 1) then
		if(getPlayerLevel(cid) < config.level) then
			doPlayerSendCancel(cid, "Not enough level to use this item.")
			return TRUE
		end
	end
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
	return TRUE
end

idk can I use TRUE/FALSE instead of 1/0 but I think I can :D
 
Lua:
-- A script made solely by KuGaSh1rA, whatever the function is, KuGaSh1rA is not responsible --
local config = {
levelCheck = 1
level = 60,
vocationCheck = 1
vocations = {1,5}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(config.vocationCheck == 1) then
                if(isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
                        doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
                        return TRUE
                end
        end
        if(config.levelCheck == 1) then
                if(getPlayerLevel(cid) < config.level) then
                        doPlayerSendCancel(cid, "Not enough level to use this item.")
                        return TRUE
                end
        end
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
        return TRUE
end

Added a comment line at the beggining :D
 
Changelog:
* modified comment line
* added magic effect

Lua:
--Script made by OTLanders :-)
local config = {
levelCheck = 1
level = 60,
vocationCheck = 1
vocations = {1,5}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(config.vocationCheck == 1) then
                if(isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
                        doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
                        return TRUE
                end
        end
        if(config.levelCheck == 1) then
                if(getPlayerLevel(cid) < config.level) then
                        doPlayerSendCancel(cid, "Not enough level to use this item.")
                        return TRUE
                end
        end
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
		doSendMagicEffect(fromPosition, CONST_ME_STUN)
        return TRUE
end
 
Please use tabs xD

~~ CHANGELOG ~~
* Modified comment
* Tabbed. Please use normal tab instead spaces :)
* To disable checks - level = 0, vocations = {}
* Effect moved to config

Lua:
--[[	~~ README ~~

	Script made by OTLanders :-)
	Peoples who contributed:
	Hermes, slawkens, KuGaSh1rA, McSlaves

	~~ HELP ~~
	level: put 0 to disable
	vocations: put {} to disable
]]--

local config = {
	level = 60,
	vocations = {1, 5},
	effect = CONST_ME_STUN
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(#config.vocations > 0 and isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
		doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
		return TRUE
	end

	if(config.level > 0 and getPlayerLevel(cid) < config.level) then
		doPlayerSendCancel(cid, "Not enough level to use this item.")
		return TRUE
	end

	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
	doSendMagicEffect(fromPosition, config.effect)
	return TRUE
end
 
[LUA ]function onUse(cid, item, frompos, item2, topos)

if item.uid == 1003 then
queststatus = getPlayerStorageValue(cid,7500)
[/code]

please say it r0xs i dont understand this, but its an try
 
[LUA ]function onUse(cid, item, frompos, item2, topos)

if item.uid == 1003 then
queststatus = getPlayerStorageValue(cid,7500)
[/code]

please say it r0xs i dont understand this, but its an try

Ey stop spamming ok, else I need to give u infraction. And you know what happens then -> ban..
 
Lua:
  --[[    ~~ README ~~

        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar

        ~~ HELP ~~
        level: put 0 to disable
        vocations: put {} to disable
]]--

local config = {
        level = 60,
        vocations = {1, 5},
        effect = CONST_ME_STUN
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(#config.vocations > 0 and isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
                doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
                return TRUE
        end

        if(config.level > 0 and getPlayerLevel(cid) < config.level) then
                doPlayerSendCancel(cid, "Not enough level to use this item.")
                return TRUE
        end

        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
        doSendMagicEffect(fromPosition, config.effect)
        return TRUE

        if getPlayerLevel(cid) <= 20 then
	doCreatureSay(cid, "blabla lol", TALKTYPE_ORANGE_1)
	doPlayerAddSkillTry(cid,1,50000)
	doSendMagicEffect(fromPosition, CONST_ME_BLUE)
          doRemoveItem(item.uid)
        return TRUE
           
end
 end



Lol :)
 
~changelog~
  • Changed magic effect.
  • Changed required level from 20 to the config.level.

Lua:
  --[[    ~~ README ~~

        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez

        ~~ HELP ~~
        level: put 0 to disable
        vocations: put {} to disable
]]--

local config = {
        level = 60,
        vocations = {1, 5},
        effect = CONST_ME_STUN
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(#config.vocations > 0 and isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
                doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
                return TRUE
        end

        if(config.level > 0 and getPlayerLevel(cid) < config.level) then
                doPlayerSendCancel(cid, "Not enough level to use this item.")
                return TRUE
        end

        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
        doSendMagicEffect(fromPosition, config.effect)
        return TRUE

        if getPlayerLevel(cid, config.level) then
        doCreatureSay(cid, "blabla lol", TALKTYPE_ORANGE_1)
        doPlayerAddSkillTry(cid,1,50000)
        doSendMagicEffect(fromPosition, CONST_ME_GREEN)
          doRemoveItem(item.uid)
        return TRUE
           
end
 end
 
Someone failed and messed up script.

Changelog:
*tabbed
*using
Code:
 tags now
*added option to add experience to player (with effect ofc!)
*added info to help about addExperience
*removed part of script that was noobish (twice used, and TRUE/FALSE compared with nil)
*removed effect as it's in addExperience

[CODE]--[[    ~~ README ~~

        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez

        ~~ HELP ~~

        level: put 0 to disable
        vocations: put {} to disable
		adding experience to player: put 0 to disable, 
]]--

local config = {
	level = 60,
	vocations = {1, 5},
	addExperience = 0
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(#config.vocations > 0 and isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
		doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
		return TRUE
	end
	if(config.level > 0 and getPlayerLevel(cid) < config.level) then
		doPlayerSendCancel(cid, "Not enough level to use this item.")
		return TRUE
	end
	if(config.experience > 0) then
		doPlayerAddExp(cid, config.addExperience)
		doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
	end
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Hermes ownz!')
	return TRUE        
end
 
I don't have any ideas what more can be added to this script.. and we can't add infinite things to this one ;p So i propose that people will be able to gives proposition about new scripts, and maybe new rule that you can just change only 4/5 lines in 1 post?
 
lol cool game, ill work for the next script :).... or meibi copy it and make an ub3333r br0k33 of kopiright mor make new thread with php skr1pt forum game
 
Changelog.
-- Fixed bug in the comment line...
-- Fixed wrong info in MESSAGE_EVENT_ADVANCE>>

PHP:
--[[    ~~ README ~~

        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez AND CIRTABOY

        ~~ HELP ~~

        level: put 0 to disable
        vocations: put {} to disable
        adding experience to player: put 0 to disable, 
]]--

local config = {
    level = 60,
    vocations = {1, 5},
    addExperience = 0
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(#config.vocations > 0 and isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
        doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
        return TRUE
    end
    if(config.level > 0 and getPlayerLevel(cid) < config.level) then
        doPlayerSendCancel(cid, "Not enough level to use this item.")
        return TRUE
    end
    if(config.experience > 0) then
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'OMG, Cirtaboy ownz!')
    return TRUE        
end
 
We can add more features for sure! Don't give up :D

Changelog:
* moved text on use to config

Ideas:
* to make configurable area effects :p

Code:
--[[    ~~ README ~~
        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez and Cirtaboy

        ~~ HELP ~~
        level: put 0 to disable
        vocations: put {} to disable
        adding experience to player: put 0 to disable
		you can modify text onUse in config
]]--

local config = {
    level = 60,
    vocations = {1, 5},
    addExperience = 0
	textOnUse = 'OTLand ~`\'r0XZs\'`~'
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(#config.vocations > 0 and isInArray(config.vocations, getPlayerVocation(cid)) == TRUE) then
        doPlayerSendCancel(cid, "You do not posses the correct vocation to use this item.")
        return TRUE
    end
    if(config.level > 0 and getPlayerLevel(cid) < config.level) then
        doPlayerSendCancel(cid, "Not enough level to use this item.")
        return TRUE
    end
    if(config.experience > 0) then
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '" .. config.textOnUse .. "')
    return TRUE        
end
 
Back
Top