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

Ban script name change etc for 0.4

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hey i need a ban scripts and namechange script notations etc

any one know how to make this? in the 0.4 it dosent exist any kind of ban or namechange...
 
Last edited by a moderator:
NO PERFECT CHANGE NAME ((NOOB XML))
Code:
<mod name="Commands Mods" version="1.0" enabled="yes">
    <talkaction log="yes" words="/rename" access="3" event="script"><![CDATA[
        function sugested()
        local cons = {'b','c','d','f','g','h','i','j','k','l','m','n','    p','q','r','s','t','v','x','y','z'}
        local vog = {"a",'e','i','o','u'}
        local sibalas = {}
            for i=1,#cons do
                 for e=1,#vog do
                    table.insert(sibalas,1,cons[i]..vog[e])
                 end
            end
        local total = ""
            for i=1,math.random(1,2) do
                local nam = ""
                for i=1,math.random(2,4) do
                    nam = nam..sibalas[math.random(1,#sibalas)]
                end
                if math.random(1,2) == 1 then
                     nam = nam..vog[math.random(1,#vog)]
                elseif math.random(1,2) == 2 then
                     nam = nam..cons[math.random(1,#vog)]
                end
                total = total..(i == 2 and ' ' or '')..nam:sub(1,1):upper()..nam:sub(2,-1)
            end
            return total
        end
        function onSay(cid, words, param, channel)
            if param == 'gen' then
                doCreatureSay(cid,'Suggested name: '..sugested(),1)
                return true
            end
            local param1,param2 = param:match('(.-)[;:,.]%s*(.+)')
            param = param1 or param
            param2 = param2 or sugested()
            if not param then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Use like this: /rename Old name, New name')
                return true
            end
            if param2:len() <= 2 or param2:len() > 20 then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Please 3-20 characters.')
                return true
            end
            if param2:match('[%a%d%s%u%l]+') ~= param2 then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Please only A-Z 0-9')
                return true
            end
            param2 = param2:sub(1,1):upper()..param2:sub(2,-1)

            local p2 = getPlayerByName(param)
            if p2 and isPlayer(p2) then
                local id = getPlayerGUID(p2)
                doPlayerPopupFYI(p2,'Changing your name. Please login aigan on your character list.')
                addEvent(doRemoveCreature,2000,p2)
                addEvent(function(id,param2)
                    db.executeQuery("UPDATE `players` SET `name` =    '"..param2.."' WHERE `id` ="..id)
                end,2100,id,param2)
            else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Player '..param..' not found.')
                return true
            end
            return true
        end
    ]]></talkaction>
</mod>
 
how it works then /rename admin tko? and it will rename me?:) now i need is a ban script! i havent tested it yet but i will post error here if i get one!
 
did not even work i wrote /rename i dint get a wrong message or noting! i also wrote /rename admin tko, test dint work... no error or noting..
 
NO PERFECT CHANGE NAME ((NOOB XML))
Code:
<mod name="Commands Mods" version="1.0" enabled="yes">
    <talkaction log="yes" words="/rename" access="3" event="script"><![CDATA[
        function sugested()
        local cons = {'b','c','d','f','g','h','i','j','k','l','m','n','    p','q','r','s','t','v','x','y','z'}
        local vog = {"a",'e','i','o','u'}
        local sibalas = {}
            for i=1,#cons do
                 for e=1,#vog do
                    table.insert(sibalas,1,cons[i]..vog[e])
                 end
            end
        local total = ""
            for i=1,math.random(1,2) do
                local nam = ""
                for i=1,math.random(2,4) do
                    nam = nam..sibalas[math.random(1,#sibalas)]
                end
                if math.random(1,2) == 1 then
                     nam = nam..vog[math.random(1,#vog)]
                elseif math.random(1,2) == 2 then
                     nam = nam..cons[math.random(1,#vog)]
                end
                total = total..(i == 2 and ' ' or '')..nam:sub(1,1):upper()..nam:sub(2,-1)
            end
            return total
        end
        function onSay(cid, words, param, channel)
            if param == 'gen' then
                doCreatureSay(cid,'Suggested name: '..sugested(),1)
                return true
            end
            local param1,param2 = param:match('(.-)[;:,.]%s*(.+)')
            param = param1 or param
            param2 = param2 or sugested()
            if not param then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Use like this: /rename Old name, New name')
                return true
            end
            if param2:len() <= 2 or param2:len() > 20 then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Please 3-20 characters.')
                return true
            end
            if param2:match('[%a%d%s%u%l]+') ~= param2 then
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Please only A-Z 0-9')
                return true
            end
            param2 = param2:sub(1,1):upper()..param2:sub(2,-1)

            local p2 = getPlayerByName(param)
            if p2 and isPlayer(p2) then
                local id = getPlayerGUID(p2)
                doPlayerPopupFYI(p2,'Changing your name. Please login aigan on your character list.')
                addEvent(doRemoveCreature,2000,p2)
                addEvent(function(id,param2)
                    db.executeQuery("UPDATE `players` SET `name` =    '"..param2.."' WHERE `id` ="..id)
                end,2100,id,param2)
            else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,'Player '..param..' not found.')
                return true
            end
            return true
        end
    ]]></talkaction>
</mod>

Rare.... work for my :S
 
yea i saw! Well it dosnet work for me for some reason....
The ban scripts works!
But your Rename dosent work.. i Want a rename script like real tibia so they login and can change there own name
 
Back
Top