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

Super sd.

Lbtg

Intermediate OT User
Joined
Nov 22, 2008
Messages
2,319
Reaction score
136
Hello otlanders how i can make sd rune cant use on people ?

i want make another sd rune with more bigger hits but can't use on people. its posible ?

help me. rep++
 
I want to help you, I'm just noob in lua, but I gave it a try. Here you go, tell me if you get any errors and I'll fix it.

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7)

function onCastSpell(cid, var)
if isCreature(cid) then
	return true
elseif isPlayer(cid) then
doPlayerSendCancel(cid, "Sorry, you cannot attack people with this rune.")
	return doCombat(cid, combat, var)
end
return true
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
  if isPlayer(cid) then
    return false
  end
  return doCombat(cid, combat, var)
end

try this, not sure if it will work

change the numbers to make the SD stronger
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
  if isPlayer(cid) then
    return false
  end
  return doCombat(cid, combat, var)
end

try this, not sure if it will work

change the numbers to make the SD stronger

Oups, if anyone of ours would of work it should of been yours since I added extra code that wasn't necessary xD..
 
both scripts dont work . on tfs dont got any errors . but i can't use this rune just dont work =(
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
local target = getPlayerByNameWildcard
  if isPlayer(target) then
  return false
end
  return doCombat(cid, combat, var)
end

try this 1
 
Last edited:
both scripts dont work . on tfs dont got any errors . but i can't use this rune just dont work =(

Try this my friend, I believe it'll work ;)

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
  if isPlayer(cid) then
    return LUA_ERROR
  end
  return doCombat(cid, combat, var)
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
local target = getPlayerByNameWildcard
  if isPlayer(target) then
  return false
end
  return doCombat(cid, combat, var)
end
 
rune works now . but i can use it on people to =(

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
local target = getPlayerByNameWildcard
  if isPlayer(target) then
  doPlayerSendCancel(cid, "Sorry, you cannot attack people with this rune.")
end
  return doCombat(cid, combat, var)
end

Hope this one works, because I wanna be the one finishing the script for you! :D xD
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
local target = getPlayerByNameWildcard
  if not isPlayer(target) then
  return doCombat(cid, combat, var)
end
end

maybe..
 
omg now i can't use this rune =((

please help me. rep for both for trying help =)
 
Last edited:
yo man, probably because I have no idea how to make it work xD

maybe this will work:

/actions/scripts/blabla.lua

Code:
function onUse (cid, item, fromPosition, itemEx, toPosition)
  if isPlayer(itemEx.uid) then
    return false
  end
end

don't forget to put the itemid of the rune in actions.xml

/spells/scripts/spellname.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7.4, -150, -7.8, 0)

function onCastSpell(cid, var)
  return doCombat(cid, combat, var)
end
 
Back
Top