--[[~~ 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