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

Lua games for fun :p

wlj

retierd
Joined
Jan 7, 2009
Messages
1,201
Reaction score
1
Well rules Every post MUST have 1 to 3 lua scripts in it,

Exempel:

Player1: Postes a spell let say exevo gran mas frigo
Players2: Wow nice script (rate) 6/10 you can better ;)
Player2 : My script Exevo gran mas flam
Player3:Wow nice 5/10 all have it..:wub::wub:


Well i start with a noobi script
xD

____________________________
Lua:
local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.3, -2, -0.4, -1)
local condition1 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition1, CONDITION_PARAM_TICKS, 20000)
--setConditionParam(condition1, CONDITION_PARAM_SPEED, -750)
setConditionFormula(condition1, -0.8, 0, -0.8, 0)
setCombatCondition(combat1, condition1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.4, -1, -0.2, -1)
local condition2 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition2, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition2, 10, 2000, -240)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MIRRORVERTICAL)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0.5, -1, -0.4, -1)
local condition3 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition3, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition3, 10, 2000, -240)
setCombatCondition(combat3, condition3)

arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

arr2 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

arr3 = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)

local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end


function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3 }
addEvent(onCastSpell1, 1, parameters) 
addEvent(onCastSpell2, 2, parameters) 
addEvent(onCastSpell3, 3, parameters) 

end
 
dude.. I didnt understand a SHIT about what you just explained lol <,<
explain bettre please!
 
This is in the wrong section.. But Ok.

4/10 For your script

my script:

Lua:
function onKill(cid, target)

local config = {
item = 6500, -- Demonic Essence
store = getPlayerStorageValue(cid, 6000),  -- storrage for Current frags
tstore = getPlayerStorageValue(cid, 7000), -- Total Storage value for kills
dstore = getPlayerStorageValue(cid, 8000),  -- Total Storage value for deaths 
rand = math.random(1,4),
pos = getPlayerPosition(cid)
}
        local table = {
        {"Smashed!", 189, 1},
        {"Dead!", 190, 2},
        {"Owned!", 18, 3},
        {"Pwnt!", 215, 4}
}

        if isPlayer(target) == true then
        setPlayerStorageValue(cid, 6000, (config.store+1))  
                setPlayerStorageValue(cid, 7000, (config.tstore+1))
            setPlayerStorageValue(target, 8000, (config.dstore+1))
              doPlayerSetRedSkullTicks(cid, 0)

local rand = math.random(1, #table)
doSendAnimatedText(config.pos, table[rand][1], tablica[rand][2])
doPlayerAddItem(cid, config.item, table[rand][3])
     
 
        if(getPlayerStorageValue(cid, 6000) == 5) then
                                broadcastMessage(getCreatureName(cid) .. " is on killing spree! He killed 5 players!")
                        elseif(getPlayerStorageValue(cid, 6000) == 10) then
                broadcastMessage(getCreatureName(cid) .. " is dominating! He killed 10 players!")
                        elseif(getPlayerStorageValue(cid, 6000) == 25) then
                        broadcastMessage(getCreatureName(cid) .. " is CRAZY! He killed 25 players!")
                        elseif(getPlayerStorageValue(cid, 6000) == 50) then
                                broadcastMessage(getCreatureName(cid) .. " is UNSTOPPABLE!! He killed 50 players! DO SOMETHING!")
                        elseif(getPlayerStorageValue(cid, 6000) == 100) then
                broadcastMessage("Bow down to your new god " ..getCreatureName(cid).. " has 100 frags!")
            end
                return TRUE
               end      
                   end
 
Hum.. 5/10? (hard to rate a script xD)


Unfinished but this is the largest script I got so far xD

Lua:
-- Script Type: Quest
-- Author: Zisly
-- Written in revscriptsys
-- ** NOT FINISHED ** --

function EnterRoom(event)
local _pos {
old = { -- Players current possition
player1 = {x=224, y=207, z=7},
player2 = {x=223, y=207, z=7},
player3 = {x=222, y=207, z=7},
player4 = {x=221, y=207, z=7}},

new = { -- Players new possition
player1 = {x=246, y=207, z=7},
player2 = {x=245, y=207, z=7},
player3 = {x=244, y=207, z=7},
player4 = {x=243, y=207, z=7}},

-- Demon positions
demon1 = {x=243, y=205, z=7},
demon2 = {x=245, y=205, z=7},
demon3 = {x=244, y=209, z=7},
demon4 = {x=246, y=209, z=7},
demon5 = {x=247, y=207, z=7},
demon6 = {x=248, y=207, z=7}}

-- will be changed V , having it like this to make the code shorter under development
local _tile = {[1] = map:getTile(pos.old.player1):getTopThing(),[2] = map:getTile(pos.old.player2):getTopThing(),[3] = map:getTile(pos.old.player3):getTopThing(),[4] = map:getTile(pos.old.player4):getTopThing()}

for i = 1 , 4 do
     if not typeof(_tile[i],"Player") and _tile[i].getLevel >= 100 then
        caster:sendCancel("You don't have enough players or all players aren't level 100 yet") -- Send a message to the player that they can't make the quest
        return false    
	 end
end
-- Function to check if anyone is left in the room should be added here.
-- A CLEAN FUNCTION IS NEEDED HERE TO REMOVE THE CURRENT DEMONS

    doTransformItem(item.uid,item.itemid+1)

	-- Teleport players
	_tile[1]:moveTo(_pos.new.player1)
	_tile[2]:moveTo(_pos.new.player2)
	_tile[3]:moveTo(_pos.new.player3)
	_tile[4]:moveTo(_pos.new.player4)
	
	-- Spawn demons 
	createMonster("Demon", _pos.demon1)
	createMonster("Demon", _pos.demon2)
	createMonster("Demon", _pos.demon3)
	createMonster("Demon", _pos.demon4)
	createMonster("Demon", _pos.demon5)
	createMonster("Demon", _pos.demon6)
end

function reward()
end

function LeverFix()
doTransformItem(item.uid,item.itemid-1)
end

registerOnUseItem("itemid", 1945, EnterRoom) -- will be changed to unique id in the future.
registerOnUseItem("itemid", 1946, LeverFix) -- fix lever
-- Add chests below V
 
Hum.. 5/10? (hard to rate a script xD)


Unfinished but this is the largest script I got so far xD

Lua:
-- Script Type: Quest
-- Author: Zisly
-- Written in revscriptsys
-- ** NOT FINISHED ** --

function EnterRoom(event)
local _pos {
old = { -- Players current possition
player1 = {x=224, y=207, z=7},
player2 = {x=223, y=207, z=7},
player3 = {x=222, y=207, z=7},
player4 = {x=221, y=207, z=7}},

new = { -- Players new possition
player1 = {x=246, y=207, z=7},
player2 = {x=245, y=207, z=7},
player3 = {x=244, y=207, z=7},
player4 = {x=243, y=207, z=7}},

-- Demon positions
demon1 = {x=243, y=205, z=7},
demon2 = {x=245, y=205, z=7},
demon3 = {x=244, y=209, z=7},
demon4 = {x=246, y=209, z=7},
demon5 = {x=247, y=207, z=7},
demon6 = {x=248, y=207, z=7}}

-- will be changed V , having it like this to make the code shorter under development
local _tile = {[1] = map:getTile(pos.old.player1):getTopThing(),[2] = map:getTile(pos.old.player2):getTopThing(),[3] = map:getTile(pos.old.player3):getTopThing(),[4] = map:getTile(pos.old.player4):getTopThing()}

for i = 1 , 4 do
     if not typeof(_tile[i],"Player") and _tile[i].getLevel >= 100 then
        caster:sendCancel("You don't have enough players or all players aren't level 100 yet") -- Send a message to the player that they can't make the quest
        return false    
	 end
end
-- Function to check if anyone is left in the room should be added here.
-- A CLEAN FUNCTION IS NEEDED HERE TO REMOVE THE CURRENT DEMONS

    doTransformItem(item.uid,item.itemid+1)

	-- Teleport players
	_tile[1]:moveTo(_pos.new.player1)
	_tile[2]:moveTo(_pos.new.player2)
	_tile[3]:moveTo(_pos.new.player3)
	_tile[4]:moveTo(_pos.new.player4)
	
	-- Spawn demons 
	createMonster("Demon", _pos.demon1)
	createMonster("Demon", _pos.demon2)
	createMonster("Demon", _pos.demon3)
	createMonster("Demon", _pos.demon4)
	createMonster("Demon", _pos.demon5)
	createMonster("Demon", _pos.demon6)
end

function reward()
end

function LeverFix()
doTransformItem(item.uid,item.itemid-1)
end

registerOnUseItem("itemid", 1945, EnterRoom) -- will be changed to unique id in the future.
registerOnUseItem("itemid", 1946, LeverFix) -- fix lever
-- Add chests below V

7/10

did just rescript the 0.3.5 config

Lua:
	accountManager = "yes"
	namelockManager = "no"
	newPlayerChooseVoc = "yes"
	newPlayerSpawnPosX = 756
	newPlayerSpawnPosY = 214
	newPlayerSpawnPosZ = 7
	newPlayerTownId = 1
	newPlayerLevel = 50
	newPlayerMagicLevel = 7
	generateAccountNumber = "no"

	redSkullLength = 30 * 24 * 60 * 60
	blackSkullLength = 45 * 24 * 60 * 60
	dailyFragsToRedSkull = 3
	weeklyFragsToRedSkull = 5
	monthlyFragsToRedSkull = 10
	dailyFragsToBlackSkull = dailyFragsToRedSkull
	weeklyFragsToBlackSkull = weeklyFragsToRedSkull
	monthlyFragsToBlackSkull = monthlyFragsToRedSkull
	dailyFragsToBanishment = dailyFragsToRedSkull
	weeklyFragsToBanishment = weeklyFragsToRedSkull
	monthlyFragsToBanishment = monthlyFragsToRedSkull
	blackSkulledDeathHealth = 40
	blackSkulledDeathMana = 0
	useBlackSkull = "yes"
	advancedFragList = "no"

	notationsToBan = 3
	warningsToFinalBan = 4
	warningsToDeletion = 4
	banLength = 7 * 24 * 60 * 60
	finalBanLength = 30 * 24 * 60 * 60
	ipBanishmentLength = 1 * 24 * 60 * 60
	broadcastBanishments = "yes"
	maxViolationCommentSize = 200
	violationNameReportActionType = 2
	autoBanishUnknownBytes = "no"

	worldType = "pvp"
	protectionLevel = 1
	pvpTileIgnoreLevelAndVocationProtection = "yes"
	pzLocked = 60 * 1000
	huntingDuration = 60 * 1000
	criticalHitChance = 7
	criticalHitMultiplier = 1
	displayCriticalHitNotify = "no"
	removeWeaponAmmunition = "yes"
	removeWeaponCharges = "yes"
	removeRuneCharges = "yes"
	whiteSkullTime = 15 * 60 * 1000
	noDamageToSameLookfeet = "no"
	showHealingDamage = "yes"
	showHealingDamageForMonsters = "yes"
	fieldOwnershipDuration = 5 * 1000
	stopAttackingAtExit = "yes"
	oldConditionAccuracy = "no"
	loginProtectionPeriod = 10 * 1000
	deathLostPercent = 10
	stairhopDelay = 2 * 1000
	pushCreatureDelay = 2 * 1000
	deathContainerId = 1987
	gainExperienceColor = 215
	addManaSpentInPvPZone = "yes"
	squareColor = 0
	allowFightback = "yes"
	forceSlowConnectionsToDisconnect = "yes"  

	worldId = 1
	ip = "213"
	bindOnlyConfiguredIpAddress = "no"
	loginPort = 7171
	gamePort = 7172
	adminPort = 7171
	statusPort = 7171
	loginTries = 10
	retryTimeout = 5 * 1000
	loginTimeout = 60 * 1000
	maxPlayers = 1000
	motd = "Welcome to the World Of War!"
	displayOnOrOffAtCharlist = "no"
	onePlayerOnlinePerAccount = "yes"
	allowClones = "no"
	serverName = "World Of War"
	loginMessage = "Welcome to the World Of War!"
	statusTimeout = 5 * 60 * 1000
	replaceKickOnLogin = "yes"
	forceSlowConnectionsToDisconnect = "no"
	loginOnlyWithLoginServer = "no"
	premiumPlayerSkipWaitList = "no"

	sqlType = "mysql"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = ""
	sqlDatabase = "theforgottenserver"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	passwordType = "plain"

	deathListEnabled = "yes"
	deathListRequiredTime = 1 * 60 * 1000
	deathAssistCount = 19
	maxDeathRecords = 5

	ingameGuildManagement = "yes"
	levelToFormGuild = 8
	premiumDaysToFormGuild = 0
	guildNameMinLength = 4
	guildNameMaxLength = 20

	highscoreDisplayPlayers = 15
	updateHighscoresAfterMinutes = 60

	buyableAndSellableHouses = "yes"
	houseNeedPremium = "yes"
	bedsRequirePremium = "yes"
	levelToBuyHouse = 1
	housesPerAccount = 0
	houseRentAsPrice = "no"
	housePriceAsRent = "no"
	housePriceEachSquare = 1000
	houseRentPeriod = "never"
	guildHalls = "no"

	timeBetweenActions = 200
	timeBetweenExActions = 1000
	checkCorpseOwner = "yes"
	hotkeyAimbotEnabled = "yes"
	maximumDoorLevel = 500

	mapName = "Fibula"
	mapAuthor = "Wlj"
	randomizeTiles = "yes"
	useHouseDataStorage = "no"
	storeTrash = "yes"
	cleanProtectedZones = "yes"
	mailboxDisabledTowns = "-1"

	defaultPriority = "high"
	niceLevel = 5
	coresUsed = "-1"
	optimizeDatabaseAtStartup = "yes"
	removePremiumOnInit = "yes"
	confirmOutdatedVersion = "no"

	maxMessageBuffer = 4
	bufferMutedOnSpellFailure = "no"

	dataDirectory = "data/"
	allowChangeOutfit = "yes"
	allowChangeColors = "yes"
	allowChangeAddons = "yes"
	disableOutfitsForPrivilegedPlayers = "no"
	bankSystem = "yes"
	saveGlobalStorage = "yes"
	displaySkillLevelOnAdvance = "yes"
	spellNameInsteadOfWords = "no"
	emoteSpells = "yes"
	promptExceptionTracerErrorBox = "yes"
	storePlayerDirection = "no"
	monsterLootMessage = 3
	monsterLootMessageType = 25

	ghostModeInvisibleEffect = "yes"
	ghostModeSpellEffects = "yes"

	idleWarningTime = 14 * 60 * 1000
	idleKickTime = 15 * 60 * 1000
	expireReportsAfterReads = 1
	playerQueryDeepness = 2
	maxItemsPerPZTile = 0
	maxItemsPerHouseTile = 0

	freePremium = "no"
	premiumForPromotion = "yes"

	blessingsOnlyPremium = "yes"
	blessingReductionBase = 30
	blessingReductionDecreament = 5
	eachBlessReduction = 8

	experienceStages = "yes"
	rateExperience = 5.0
	rateExperienceFromPlayers = 7.6
	rateSkill = 3.0
	rateMagic = 3.0
	rateLoot = 2.0
	rateSpawn = 1

	minLevelThresholdForKilledPlayer = 0.9
	maxLevelThresholdForKilledPlayer = 1.1

	rateStaminaLoss = 1
	rateStaminaGain = 1000 / 3
	rateStaminaThresholdGain = 4
	staminaRatingLimitTop = 41 * 60
	staminaRatingLimitBottom = 14 * 60
	rateStaminaAboveNormal = 1.5
	rateStaminaUnderNormal = 0.5
	staminaThresholdOnlyPremium = "yes"

	experienceShareRadiusX = 30
	experienceShareRadiusY = 30
	experienceShareRadiusZ = 1
	experienceShareLevelDifference = 2 / 3
	extraPartyExperienceLimit = 20
	extraPartyExperiencePercent = 5
	experienceShareActivity = 2 * 60 * 1000

	globalSaveEnabled = "yes"
	globalSaveHour = 2
	shutdownAtGlobalSave = "no"
	cleanMapAtGlobalSave = "yes"

	deSpawnRange = 2
	deSpawnRadius = 50

	maxPlayerSummons = 2
	teleportAllSummons = "no"
	teleportPlayerSummons = "no"

	ownerName = ""
	ownerEmail = "@otland.net"
	url = ""
	location = "Europe"
	displayGamemastersWithOnlineCommand = "no"

	adminLogsEnabled = "no"
	displayPlayersLogging = "yes"
	prefixChannelLogs = ""
	runFile = ""
	outLogName = "yes"
	errorLogName = "yes"
	truncateLogsOnStartup = "no"
	
		-- War -> Mine / Other
	removePotions = "no" -- remove potions after drink
	addBagOfSSA = "yes" -- on kill other player // add Bag Of Stone Skin Amulets
	antiRelogTime = 2000 -- in miliseconds
	defaultLevel = 150 -- when player will die then they will get this level // type nil for disable
	maximumLevel = 300 --  type nil to disable
	levelGainForKill = 3 -- type nil to make it dependent on level (configurable: onKillPlayer)
 
2/10 lol, i thought this was scripts not config files! xD

Lua:
function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name required.")
        return TRUE
    end

local cost = 5000  
local player = getPlayerByNameWildcard(param) 

    if (getPlayerFood(player) + 72 > 400) then
		  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player is Full.")
		else
		if (getCreatureName(player) == getCreatureName(cid)) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot feed yourself.")
		else	
   if(doPlayerRemoveMoney(cid, cost) == TRUE) then
    doSendAnimatedText(getCreaturePosition(player), "U Got Fed", 64)
    doPlayerFeed(player, 72 * 4)
                         else
                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont have 5k.")
                      end
              end
                return TRUE
                 end
                    end
 
2/10 lol, i thought this was scripts not config files! xD

Lua:
function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name required.")
        return TRUE
    end

local cost = 5000  
local player = getPlayerByNameWildcard(param) 

    if (getPlayerFood(player) + 72 > 400) then
		  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player is Full.")
		else
		if (getCreatureName(player) == getCreatureName(cid)) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot feed yourself.")
		else	
   if(doPlayerRemoveMoney(cid, cost) == TRUE) then
    doSendAnimatedText(getCreaturePosition(player), "U Got Fed", 64)
    doPlayerFeed(player, 72 * 4)
                         else
                         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You dont have 5k.")
                      end
              end
                return TRUE
                 end
                    end

10/10 forgott


SRY
Lua:
local combat1 = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.4, -1, -0.4, -1)
local condition1 = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition1, CONDITION_PARAM_TICKS, 20000)
--setConditionParam(condition1, CONDITION_PARAM_SPEED, -500)
setConditionFormula(condition1, -0.8, 0, -0.8, 0)
setCombatCondition(combat1, condition1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ASSASSIN)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.4, -1, -0.5, -1)
local condition2 = createConditionObject(CONDITION_CURSED)
setConditionParam(condition2, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition2, 10, 2000, -250)
setCombatCondition(combat2, condition2)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_ASSASSIN)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0.3, -2, -0.4, -1)
local condition3 = createConditionObject(CONDITION_DAZZLED)
setConditionParam(condition3, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition3, 10, 2000, -250)
setCombatCondition(combat3, condition3)

arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

arr3 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 3, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)

local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end


function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3 }
addEvent(onCastSpell1, 1, parameters) 
addEvent(onCastSpell2, 2, parameters) 
addEvent(onCastSpell3, 3, parameters) 

end

sry..
Lua:
local acombat = createCombatObject()

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 30)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.7, 0)

local arr = {
{1, 0, 0, 1, 0, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{1, 1, 1, 3, 1, 1, 1},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 0, 1, 0, 0, 1}
}

local area = createCombatArea(arr)
setCombatArea(acombat, area)

function onTargetTile(cid, pos)
doCombat(cid,combat,positionToVariant(pos))
end

setCombatCallback(acombat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
return doCombat(cid, acombat, var)

end
 
Last edited:
You didnt rate my script. Follow your own rules man! lol

3/10

Lua:
function onLogin(cid)
        if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 1133) == -1 then
               doPlayerAddItem(cid,2160,100)
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Here is a present for buying VIP, Enjoy your new VIP account!")
                       setPlayerStorageValue(cid, 1133, 1)
                       elseif getPlayerStorageValue(cid, 1133) == 1 then  
                                 doSendMagicEffect(getPlayerPosition(cid), CONST_ME_BATS)  
                end
        return TRUE
        end
 
5/10, I hate giving players money!

"Noob" floating above players head.
Lua:
function text(interval, lastExecution)
	for _, name in ipairs(getOnlinePlayers()) do
		local player = getPlayerByName(name)
		local playerPos = getCreaturePosition(player)
		if getPlayerLevel(player) <= 20 then
			doSendAnimatedText(playerPos, 'Noob', 144)
			doSendMagicEffect(playerPos, 29)
		end
	end
end

function onThink(interval, lastExecution)
	addEvent(text, 1000)
	return TRUE
end
 
He only made this script to thief other scripters ideas and use them in his OTserver, or the OTserver his working for (Kernkraft) I believe lol..
 
what no if i wanna a script i hack the serv or i ask for it. I dont steal just wanned noobs to goto a file and check some nice luas
 
Ok, go hack a serv then.. Atleast show me your capable of doing so, go ahead hack unline.org :) I think you're more talk to be honest, I'd like to see some of your work.. Or atleast do what you say Hack a server unline.org, show me that you can :)
 
0/10

Lua:
  function onkill(cid, target)

local config = {
item = 6500, -- demonic essence
store = getplayerstoragevalue(cid, 6000),  -- storragerent frags
tstore = getplayerstoragevalue(cid, 7000), -- total storage value for kills
dstore = getplayerstoragevalue(cid, 8000),  -- total storage value for deaths
rand = math.random(1,4),
pos = getplayerposition(cid)
}
        local table = {
        {"smashed!", 189, 1},
        {"dead!", 190, 2},
        {"owned!", 18, 3},
        {"pwnt!", 215, 4}
}

        if isplayer(target) == true then
        setplayerstoragevalue(cid, 6000, (config.store+1))  
                setplayerstoragevalue(cid, 7000, (config.tstore+1))
            setplayerstoragevalue(target, 8000, (config.dstore+1))
              doplayersetredskullticks(cid, 0)

local rand = math.random(1, #table)
dosendanimatedtext(config.pos, table[rand][1], tablica[rand][2])
doplayeradditem(cid, config.item, table[rand][3])
     
 
        if(getplayerstoragevalue(cid, 6000) == 5) then
                                broadcastmessage(getcreaturename(cid) .. " is on killing spree! He killed 5 players!")
                        elseif(getplayerstoragevalue(cid, 6000) == 10) then
                broadcastmessage(getcreaturename(cid) .. " is dominating! He killed 10 players!")
                        elseif(getplayerstoragevalue(cid, 6000) == 25) then
                        broadcastmessage(getcreaturename(cid) .. " is crazy! He killed 25 players!")
                        elseif(getplayerstoragevalue(cid, 6000) == 50) then
                                broadcastmessage(getcreaturename(cid) .. " is unstoppable!! He killed 50 players! Do something!")
                        elseif(getplayerstoragevalue(cid, 6000) == 100) then
                broadcastmessage("bow down to your new dad " ..getcreaturename(cid).. " dad is here")
            end
                return true
               end      
                   end
 
Last edited by a moderator:
Back
Top