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

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 = 150,
    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

Hehe im not scripter but I changed level requirement :D
 
Lua:
--[[    ~~ 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 = 150,
    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
        doCreatureSay(cid, "Noob",19)
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '" .. config.textOnUse .. "')
    return TRUE        
end

doCreatureSay(cid, "Noob",19)

added that xD
 
up noob spammer

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

        ~~ 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 = 150,
    vocations = {1, 5},
    addExperience = 1337
        textOnUse = 'OTLand ~`\'I pwn\'`~'
}

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
        doCreatureSay(cid, "Noob",19)
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '" .. config.textOnUse .. "')
doPlayerAddItem(cid ,1337)
    return TRUE        
end
 
Lua:
  --[[    ~~ README ~~
        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez , Cirtaboy and husam and Cazar again

        ~~ 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 = 150,
    vocations = {1, 5},
    addExperience = 1337
        textOnUse = 'OTLand ~`\'I pwn\'`~'
}

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
        doCreatureSay(cid, "Noob",19)
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '" .. config.textOnUse .. "')
doPlayerAddItem(cid ,1337)
        
  if getPlayerSex(cid) == 0 then
  doPlayerSetSex(cid, 1)
    else
  doPlayerSetSex(cid, 0)
    end
 
      return TRUE
end

Added : Change sex

//Cazar
 
Changelog:
* Added promotion
Lua:
  --[[    ~~ README ~~
        Script made by OTLanders :-)
        Peoples who contributed:
        Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez , Cirtaboy and husam and Cazar again

        ~~ 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 = 150,
    vocations = {1, 5},
    addExperience = 1337
        textOnUse = 'OTLand ~`\'I pwn\'`~'
}

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
        doCreatureSay(cid, "Noob",19)
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '" .. config.textOnUse .. "')
doPlayerAddItem(cid ,1337)
       
  if getPlayerSex(cid) == 0 then
  doPlayerSetSex(cid, 1)
    else
  doPlayerSetSex(cid, 0)
    end
 setPlayerPromotionLevel(cid, 1)
      return TRUE
end
 
Fixed:
PHP:
INFO: Starting OTScript Debug.lua
ERROR: untitled.lua:17: '}' expected (to close '{' at line 13) near 'textOnUse'
INFO: Stopping OTScript Debug.lua

Added:
PHP:
~Sends animated Text when become certian Sex (Words configurable in config)
~Words said when gain Exp now configurable in the Config.

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

        ~~ 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 = 150,
    vocations = {1, 5},
    addExperience = 1337,
    textOnUse = 'OTLand ~`\'I pwn\'`~',
    GainExpText = 'Noob',
    BecomeGirlText = 'Girl!',
    BecomeBoyText = 'Boy!'
    }

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
        doCreatureSay(cid, '" .. config.GainExpText .. "',19)
        doPlayerAddExp(cid, config.addExperience)
        doSendAnimatedText(fromPosition, '" .. config.AddExperience .. "', TEXTCOLOR_WHITE_EXP)
    end
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, '" .. config.textOnUse .. "')
      doPlayerAddItem(cid ,1337)
         if getPlayerSex(cid) == 0 then
  doPlayerSetSex(cid, 1)
    doSendAnimatedText(fromPosition, '" .. config.BecomeBoyText .. "', TEXTCOLOR_WHITE_EXP)                   
    else
       doPlayerSetSex(cid, 0)
         doSendAnimatedText(fromPosition, '" .. config.BecomeGirlText .. "', TEXTCOLOR_WHITE_EXP)       
    end
 setPlayerPromotionLevel(cid, 1)
      return TRUE
end

Btw nice forum game its sweet xD
 
Last edited:
# fixed strings,
# fixed tabbing,
# added NOTES,
# fixed configurable names (strings),
# added small tips into notes

Lua:
--[[~~ README ~~
	# Script made by OTLanders :-)
	# Peoples who contributed:
	# Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez , Cirtaboy,
		husam and Sync.

	~~ 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, aswell as onGainExperienceText,
		becomeMaleText and becomeFemaleText
		
	~~ NOTES ~~
	# you mustn't use " .. string/integer .. " if you are using only that string/integer,
		here you are, some examples:
		text = "lol"
		doPlayerSendCancel(cid, text)
			--cancel message: "lol"
		doPlayerSendCancel(cid, "I love OTLand " .. text)
			--cancel message: "I love OTLand lol"
		doPlayerSendCancel(cid, "I love OTLand " .. text .. " xD!")
			--cancel message: "I love OTLand lol xD!"
		doPlayerSendCancel(cid, text .. " I love OTLand xD!")
			--cancel message: "lol I love OTLand xD!"
		doPlayerSendCancel(cid, text .. " I love OTLand " .. text)
			--cancel message: "lol I love OTLand lol"
	# do not be stupid, if you made new function, then make configurable to it!
	# always CHECK script if it won't cause any errors
	# always TAB script properly, and use correct syntax in README, HELP or NOTES,
		so it will be clear and really clever :-)
]]--
local config = {
	level = 150,
	vocations = {1, 5},
	addExperience = 1337,
	textOnUse = "OTLand ~`'I pwn'`~!",
	onGainExperienceText = "Noob",
	becomeFemaleText = "Girl!",
	becomeMaleText = "Boy!"
	}

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
		doCreatureSay(cid, config.onGainExperienceText,19)
		doPlayerAddExp(cid, config.addExperience)
		doSendAnimatedText(fromPosition, config.AddExperience, TEXTCOLOR_WHITE_EXP)
	end
	
	if getPlayerSex(cid) == PLAYERSEX_FEMALE then
		doPlayerSetSex(cid, PLAYERSEX_MALE)
		doSendAnimatedText(fromPosition, config.becomeMaleText, TEXTCOLOR_WHITE_EXP)				  
	else
		doPlayerSetSex(cid, PLAYERSEX_FEMALE)
		doSendAnimatedText(fromPosition, config.becomeFemaleText, TEXTCOLOR_WHITE_EXP)	  
	end
	
	if(getPlayerPromotionLevel(cid) < 1) then
		setPlayerPromotionLevel(cid, 1)
	end
	
	doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.textOnUse)
	return TRUE
end
 
Changelog:
Code:
* Added animated texts.
* Added magic effects.
Notes:
Code:
* Code is untested.
The code itself:
Lua:
  --[[~~ README ~~
        # Script made by OTLanders :-)
        # Peoples who contributed:
        # Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez , Cirtaboy,
                husam and Sync, Chojrak.

        ~~ 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, aswell as onGainExperienceText,
                becomeMaleText and becomeFemaleText,
    # you can edit animated texts and effects by editing animatedTextZones and magicffectZones tables in config.
               
        ~~ NOTES ~~
        # you mustn't use " .. string/integer .. " if you are using only that string/integer,
                here you are, some examples:
                text = "lol"
                doPlayerSendCancel(cid, text)
                        --cancel message: "lol"
                doPlayerSendCancel(cid, "I love OTLand " .. text)
                        --cancel message: "I love OTLand lol"
                doPlayerSendCancel(cid, "I love OTLand " .. text .. " xD!")
                        --cancel message: "I love OTLand lol xD!"
                doPlayerSendCancel(cid, text .. " I love OTLand xD!")
                        --cancel message: "lol I love OTLand xD!"
                doPlayerSendCancel(cid, text .. " I love OTLand " .. text)
                        --cancel message: "lol I love OTLand lol"
        # do not be stupid, if you made new function, then make configurable to it!
        # always CHECK script if it won't cause any errors
        # always TAB script properly, and use correct syntax in README, HELP or NOTES,
                so it will be clear and really clever :-)
]]--
local config = {
    level = 150,
    vocations = {1, 5},
    addExperience = 1337,
    textOnUse = "OTLand ~`'I pwn'`~!",
    onGainExperienceText = "Noob",
        becomeFemaleText = "Girl!",
        becomeMaleText = "Boy!"
    animatedTextZones = {
        ["OTLAND"] = {position = {x = 100, y = 100, z = 7}, color = TEXTCOLOR_WHITE},
        ["OWNZ!"] = {position = {x = 101, y = 100, z = 7}, color = TEXTCOLOR_RED}
    }
    magicEffectZones = {
        {effect = CONST_ME_STUN, position = {x = 100, y = 100, z = 7},
        {effect = CONST_ME_MAGIC_GREE, position = {x = 100, y = 100, z = 7}
    }
}

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
                doCreatureSay(cid, config.onGainExperienceText,19)
                doPlayerAddExp(cid, config.addExperience)
                doSendAnimatedText(fromPosition, config.AddExperience, TEXTCOLOR_WHITE_EXP)
        end
       
        if getPlayerSex(cid) == PLAYERSEX_FEMALE then
                doPlayerSetSex(cid, PLAYERSEX_MALE)
                doSendAnimatedText(fromPosition, config.becomeMaleText, TEXTCOLOR_WHITE_EXP)                             
        else
                doPlayerSetSex(cid, PLAYERSEX_FEMALE)
                doSendAnimatedText(fromPosition, config.becomeFemaleText, TEXTCOLOR_WHITE_EXP)   
        end
       
        if(getPlayerPromotionLevel(cid) < 1) then
                setPlayerPromotionLevel(cid, 1)
        end

    local aZones = config.animatedTextZones
    if (#aZones > 0) then
        for _, zone in ipairs(aZones) do
            doSendAnimatedText(zone.position, zone, zone.color)
        end
    end

    local mZones = config.magicEffectZones
    if (#mZones > 0) then
        for i = 1, #mZones do
            dosendAnimatedText(mZones[i].position, mZones[i].effect)
        end
    end

        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.textOnUse)
        return TRUE
end
 
Last edited by a moderator:
Added:
-POFF effect.
Lua:
--[[~~ README ~~
        # Script made by OTLanders :-)
        # Peoples who contributed:
        # Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez , Cirtaboy,
                husam and Sync, Chojrak.

        ~~ 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, aswell as onGainExperienceText,
                becomeMaleText and becomeFemaleText,
    # you can edit animated texts and effects by editing animatedTextZones and magicffectZones tables in config.
               
        ~~ NOTES ~~
        # you mustn't use " .. string/integer .. " if you are using only that string/integer,
                here you are, some examples:
                text = "lol"
                doPlayerSendCancel(cid, text)
                        --cancel message: "lol"
                doPlayerSendCancel(cid, "I love OTLand " .. text)
                        --cancel message: "I love OTLand lol"
                doPlayerSendCancel(cid, "I love OTLand " .. text .. " xD!")
                        --cancel message: "I love OTLand lol xD!"
                doPlayerSendCancel(cid, text .. " I love OTLand xD!")
                        --cancel message: "lol I love OTLand xD!"
                doPlayerSendCancel(cid, text .. " I love OTLand " .. text)
                        --cancel message: "lol I love OTLand lol"
        # do not be stupid, if you made new function, then make configurable to it!
        # always CHECK script if it won't cause any errors
        # always TAB script properly, and use correct syntax in README, HELP or NOTES,
                so it will be clear and really clever :-)
]]--
local config = {
    level = 150,
    vocations = {1, 5},
    addExperience = 1337,
    textOnUse = "OTLand ~`'I pwn'`~!",
    onGainExperienceText = "Noob",
        becomeFemaleText = "Girl!",
        becomeMaleText = "Boy!"
    animatedTextZones = {
        ["OTLAND"] = {position = {x = 100, y = 100, z = 7}, color = TEXTCOLOR_WHITE},
        ["OWNZ!"] = {position = {x = 101, y = 100, z = 7}, color = TEXTCOLOR_RED}
    }
    magicEffectZones = {
        {effect = CONST_ME_STUN, position = {x = 100, y = 100, z = 7},
        {effect = CONST_ME_MAGIC_GREE, position = {x = 100, y = 100, z = 7}
    }
}

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.")
                doSendAnimatedText(fromPosition, CONST_ME_POFF)
                return TRUE
        end
       
        if(config.level > 0 and getPlayerLevel(cid) < config.level) then
                doPlayerSendCancel(cid, "Not enough level to use this item.")
                doSendAnimatedText(fromPosition, CONST_ME_POFF)
                return TRUE
        end
       
        if(config.experience > 0) then
                doCreatureSay(cid, config.onGainExperienceText,19)
                doPlayerAddExp(cid, config.addExperience)
                doSendAnimatedText(fromPosition, config.AddExperience, TEXTCOLOR_WHITE_EXP)
        end
       
        if getPlayerSex(cid) == PLAYERSEX_FEMALE then
                doPlayerSetSex(cid, PLAYERSEX_MALE)
                doSendAnimatedText(fromPosition, config.becomeMaleText, TEXTCOLOR_WHITE_EXP)                             
        else
                doPlayerSetSex(cid, PLAYERSEX_FEMALE)
                doSendAnimatedText(fromPosition, config.becomeFemaleText, TEXTCOLOR_WHITE_EXP)   
        end
       
        if(getPlayerPromotionLevel(cid) < 1) then
                setPlayerPromotionLevel(cid, 1)
        end

    local aZones = config.animatedTextZones
    if (#aZones > 0) then
        for _, zone in ipairs(aZones) do
            doSendAnimatedText(zone.position, zone, zone.color)
        end
    end

    local mZones = config.magicEffectZones
    if (#mZones > 0) then
        for i = 1, #mZones do
            dosendAnimatedText(mZones[i].position, mZones[i].effect)
        end
    end

        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.textOnUse)
        return TRUE
end
 
Lua:
--[[~~ README ~~
        # Script made by OTLanders :-)
        # Peoples who contributed:
        # Hermes, slawkens, KuGaSh1rA, McSlaves, Cazar, Archez , Cirtaboy,
                husam and Sync, Chojrak, Rachaw The Best.

        ~~ 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, aswell as onGainExperienceText,
                becomeMaleText and becomeFemaleText,
    # you can edit animated texts and effects by editing animatedTextZones and magicffectZones tables in config.
               
        ~~ NOTES ~~
        # you mustn't use " .. string/integer .. " if you are using only that string/integer,
                here you are, some examples:
                text = "lol"
                doPlayerSendCancel(cid, text)
                        cancel message: "lol"
                doPlayerSendCancel(cid, "I love OTLand " .. text)
                        cancel message: "I love OTLand lol"
                doPlayerSendCancel(cid, "I love OTLand " .. text .. " xD!")
                        cancel message: "I love OTLand lol xD!"
                doPlayerSendCancel(cid, text .. " I love OTLand xD!")
                        cancel message: "lol I love OTLand xD!"
                doPlayerSendCancel(cid, text .. " I love OTLand " .. text)
                        cancel message: "lol I love OTLand lol"
        # do not be stupid, if you made new function, then make configurable to it!
        # always CHECK script if it won't cause any errors
        # always TAB script properly, and use correct syntax in README, HELP or NOTES,
                so it will be clear and really clever :-)
]]--
local config = {
    text = I Love OTLand And i deserv an Banishment.,
    level = 150,
    vocations = {1, 5},
    addExperience = 1337,
    textOnUse = "OTLand ~`'I pwn'`~!",
    onGainExperienceText = "Noob",
        becomeFemaleText = "Girl!",
        becomeMaleText = "Boy!"
    animatedTextZones = {
        ["OTLAND"] = {position = {x = 100, y = 100, z = 7}, color = TEXTCOLOR_WHITE},
        ["OWNZ!"] = {position = {x = 101, y = 100, z = 7}, color = TEXTCOLOR_RED}
    }
    magicEffectZones = {
        {effect = CONST_ME_STUN, position = {x = 100, y = 100, z = 7},
        {effect = CONST_ME_MAGIC_GREE, position = {x = 100, y = 100, z = 7}
    }
}

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.")
                doSendAnimatedText(fromPosition, CONST_ME_POFF)
                return TRUE
        end
       
        if(config.level > 0 and getPlayerLevel(cid) < config.level) then
                doPlayerSendCancel(cid, "Not enough level to use this item.")
                doSendAnimatedText(fromPosition, CONST_ME_POFF)
                return TRUE
        end
       
        if(config.experience > 0) then
                doCreatureSay(cid, config.onGainExperienceText,19)
                doPlayerAddExp(cid, config.addExperience)
                doSendAnimatedText(fromPosition, config.AddExperience, TEXTCOLOR_WHITE_EXP)
        end
       
        if getPlayerSex(cid) == PLAYERSEX_FEMALE then
                doPlayerSetSex(cid, PLAYERSEX_MALE)
                doSendAnimatedText(fromPosition, config.becomeMaleText, TEXTCOLOR_WHITE_EXP)                             
        else
                doPlayerSetSex(cid, PLAYERSEX_FEMALE)
                doSendAnimatedText(fromPosition, config.becomeFemaleText, TEXTCOLOR_WHITE_EXP)   
        end
       
        if(getPlayerPromotionLevel(cid) < 1) then
                setPlayerPromotionLevel(cid, 1)
        end

    local aZones = config.animatedTextZones
    if (#aZones > 0) then
        for _, zone in ipairs(aZones) do
            doSendAnimatedText(zone.position, zone, zone.color)
        end
    end

    local mZones = config.magicEffectZones
    if (#mZones > 0) then
        for i = 1, #mZones do
            dosendAnimatedText(mZones[i].position, mZones[i].effect)
        end
    end

        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, config.textOnUse)
	   end
	end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerVocation(cid) == 11 then
		doPlayerSetVocation(cid, 12)
		doCreatureSay(cid, "You are now a Donator!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 12 then
		doPlayerSetVocation(cid, 11)
		doCreatureSay(cid, "You are now a Modator!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 11 then
		doPlayerSetVocation(cid, 10)
		doCreatureSay(cid, "You are now a Global Modator!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 10 then
		doPlayerSetVocation(cid, 9)
		doCreatureSay(cid, "You are now a Administrator! Go Kill Deavz, You have 60 seconds or you lose administrator.", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	else
		doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
			elseif
		                doPlayerSendCancel(cid, text .. " I love OTFans xD!")
                        cancel message: "lol I love OTFans xD!"
                doPlayerSendCancel(cid, ..text..)
                        cancel message: "..text.."
		elseif cancelMessageAppere then
			doPlayerAddBanishment (cid, 31, OTFans suxs my ass otland ownes my ass :))
		end
		   end


added new promotion mod, global mod, admin, donator, added otfans suxs with banishment and that otland ownez
 
Rachaw you darn pl n0b why you have to ruin everything
 
Back
Top