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

[Game] Scripters Battle

Hyker

Alter Ego
Joined
May 7, 2014
Messages
26
Reaction score
2
Hello everyone,
I was thinking that it could be interesting to have something like a Scripters battle.
We've got many good scripters that can make incredible things, so why not make such a game?

Here are the 'rules':
Someone must start from the simplest script possible, like sending an animated text for example.
Then we try to add or improve the script, until we eventually get something amazing.
We can repeat this process as many times as we can, so it can't get boring!
If you think that a script is good enough you can just write stop, and then begin another or let someone begin another.
But anyone can continue even after the stop, until someone posts another 'simple' script.

Let's see what you're capable off!

Few tags:
@Printer @Limos @Codinablack @artofwork
@Vanderlay @EvilSkillz @Summ @ghettobird
@Xikini @HalfAway @Red @xKrazyx @Junpa
 
Last edited:
Il start I suppose.

Code:
function onKill(cid, target, lastHit)
doPlayerSendTextMessage(cid,22,"It has begun!")
return true
end
 
Il start I suppose.

Code:
function onKill(cid, target, lastHit)
doPlayerSendTextMessage(cid,22,"It has begun!")
return true
end

What about make it TFS 1.0? ;) (Idk if it works :D )

Code:
local killstorage = 1000
function onKill(player, target, lastHit)
    player:sendTextMessage(4, "It has begun!")
    player:setStorageValue(killstorage , 1)
    return true
end
 
Haha sorry been coding in old distros for the past 3 months.. Havent looked into any of the newer stuff, Il look at the functions and get back to here xD
 
Code:
local killstorage = 1000

function onKill(player, target, lastHit)
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "It has begun!")
    player:setStorageValue(killstorage, player:getStorageValue(killstorage) + 1)
    return true
end

Red
 
Code:
local killstorage = 1000

function onKill(player, target, lastHit)
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "It has begun!")
    player:setStorageValue(killstorage, player:getStorageValue(killstorage) + 1)
    return true
end

Red

Dat is genius

EDIT: PHP allowed? (A)
 
Code:
local killstorage = 1000
local otlandforum = {x=otland, y=otland, z=otland}
function onKill(player, target, lastHit)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "It has begun!")
player:setStorageValue(killstorage, player:getStorageValue(killstorage) + 1)
doSummonCreature("Demon", otlandforum)
    return true
end


Nice idea! :p
 
Code:
local config = {
    killstorage = 1000,
    monsterName = "Demon"
}

function onKill(player, target)
    if not target:isPlayer() then -- Let's make sure that we are killing a player
        return true
    end
 
    local monster = Game.createMonster(config.monsterName, player:getPosition(), false, true)
    if monster then -- Let's also make sure the monster got summoned exsist
        monster:say("REVENGE!", TALKTYPE_MONSTER_SAY)
    end
 
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have killed ".. target:getName() ..".")
    player:setStorageValue(config.killstorage, math.max(0, player:getStorageValue(config.killstorage)) + 1) -- Let's also make sure to add the value 1 even tho we don't have the storage!
    return true
end
 
Last edited by a moderator:
Code:
local config = {
    killstorage = 1000,
    monsterName = "Demon"
}

function onKill(player, target)
    if not target:isPlayer() then -- Let's make sure that we are killing a player
        return true
    end
  
    local monster = Game.createMonster(config.monsterName, creature:getPosition(), false, true)
    if monster then -- Let's also make sure the monster got summoned exsist
        monster:say("REVENGE!", TALKTYPE_MONSTER_SAY)
    end
  
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have killed ".. target:getName() ..".")
    player:setStorageValue(config.killstorage, math.max(1, player:getStorageValue(killstorage)) + 1) -- Let's also make sure to add the value 1 even tho we don't have the storage!
    return true
end

Good until now, what's next? :p
 
You guys, come up with something. I'm just here to show too hopefully show the best ways and explain :p
 
Is it against the rules to continue with the old distro type of scripting? I haven't tried scripting at 1.0+ yet :'(
 
Is it against the rules to continue with the old distro type of scripting? I haven't tried scripting at 1.0+ yet :'(
^ plx

Il start again. change the parameters of onStepIn if needed :p
Code:
local text = "You are stuck"
function onStepIn(cid, item, position, fromPosition)
    doPlayerSetNoMove(cid, 1)
    doPlayerSendTextMessage(cid, 22, text)
    return TRUE
end
 
Code:
local text = "You are stuck."
function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) then -- Make sure that it's a player who step into the tile
        return true
    end
   
    doPlayerSetNoMove(cid, true)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text)
    return true
end
 
Code:
local function releasePlayer(cid)
    if not isPlayer(cid) then
        return true
    end

    doPlayerSetNoMove(cid, false)
end

function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) or getCreatureName(cid):lower() ~= "printer" then -- Make sure that it's a player who step into the tile
        return true
    end

    doPlayerSetNoMove(cid, true)
    addEvent(releasePlayer, 5000, cid)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are stuck.")
    return true
end
 
Code:
local function releasePlayer(cid)
    if not isPlayer(cid) then
        return true
    end

    doPlayerSetNoMove(cid, false)
end

local function itsGettingHot(cid, item, position, fromPosition)--SHORTEN THIS PLX? 1487==firefield
    doCreateItem(1487,1,{position.x+1, position.y, position.z})
    doCreateItem(1487,1,{position.x+1, position.y+1, position.z})
    doCreateItem(1487,1,{position.x+1, position.y-1, position.z})
    doCreateItem(1487,1,{position.x, position.y+1, position.z})
    doCreateItem(1487,1,{position.x, position.y-1, position.z})
    doCreateItem(1487,1,{position.x-1, position.y, position.z})
    doCreateItem(1487,1,{position.x-1, position.y+1, position.z})
    doCreateItem(1487,1,{position.x-1, position.y-1, position.z})
    return true
end

function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) or getCreatureName(cid):lower() ~= "printer" then -- Make sure that it's a player who step into the tile
        return true
    end

    doPlayerSetNoMove(cid, true)
    addEvent(itsGettingHot, 1000, cid, position, fromPosition)
    addEvent(releasePlayer, 5000, cid)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are stuck.")
    return true
end
 
Code:
local function releasePlayer(cid)
    if not isPlayer(cid) then
        return true
    end

    doPlayerSetNoMove(cid, false)
end

local function itsGettingHot(position)--SHORTEN THIS PLX?
    for x = -1, 1 do
        for y = -1, 1 do
            doCreateItem(1487, 1, {x = position.x + x, y = position.y + y, z = position.z})
        end
    end
end

function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) or getCreatureName(cid):lower() ~= "printer" then -- Make sure that it's a player who step into the tile
        return true
    end

    doPlayerSetNoMove(cid, true)
    addEvent(itsGettingHot, 1000, position)
    addEvent(releasePlayer, 5000, cid)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are stuck.")
    return true
end
 
Code:
    for x = -1, 1 do
        for y = -1, 1 do
            doCreateItem(1487, 1, {x = position.x + x, y = position.y + y, z = position.z})
        end
    end


And now half my scripts get 500 lines shorter............ Ty xDDDDDDD
 
Nice idea, I like it!
And people could actually learn something here unlike on other threads.
Watching :p
 
Back
Top