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

how do i fix this script

cooldodo

New Member
Joined
Jan 17, 2014
Messages
297
Reaction score
4
Code:
[29/11/2014 18:31:37] [Error - LuaScriptInterface::loadFile] data/spells/scripts/attack/spear.lua:51: unexpected symbol near ')'
[29/11/2014 18:31:37] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/attack/spear.lua)
 
Last edited by a moderator:
You also failed to explain what is "wrong" with the script that you want to fix.
I don't see any error code or anything.

Edit:
Well now you edited your main post but the Error Code is there without the script.
 
Read the post I linked, it explains exactly how to use code tags.
What TFS version are you using? Do you get an error in console? What is not working as supposed to?
 
[29/11/2014 18:31:35] The Forgotten Server - Edited By Cyko V8, version 0.3.6 - Edited By Cyko V8 (Crying Damson - Edited By Cyko V8)
Read the post I linked, it explains exactly how to use code tags.
What TFS version are you using? Do you get an error in console? What is not working as supposed to?
upload_2014-11-29_18-40-22.png
 
[29/11/2014 18:31:35] The Forgotten Server - Edited By Cyko V8, version 0.3.6 - Edited By Cyko V8 (Crying Damson - Edited By Cyko V8)

View attachment 27755
None of those errors are related to the script you posted before, which you have now removed by the way.

Edit: I'm on my phone but look at line 51 of your script. If you post the script again I'm sure someone will help you.
 
We need you to post the script with error code as well.

First time you posted the script without error, now you've posted the error without the script.
If you can post the script again the maybe we can help you solve the error.
 
We need you to post the script with error code as well.
i dont know how to write it in code i dont understand the rules
First time you posted the script without error, now you've posted the error without the script.
If you can post the script again the maybe we can help you solve the error.
Code:
local config =
{
    --Spell made by me special for OTLand.net
    --If you have some question or you are interested in buying v2 where enchanted arrows, burst's AoE, spears and trowning stars are supported feel free to PM
    --You can use and edit this spell for your OTS, but you can't publish it somewhere without my permission
    --You can't remove author line from script.
        author = "andu",
    --All rights to andu: "otland.net/members/andu/"; "facebook.com/olrios", olrios is my 2nd nickname


    ----------------- CONFIGURATION ----------------
    removeAmmo = false, -- set true to remove one ammo per each shot. true is better for more RPG (remember to add , after "true" or "false")
    alwaysHits = false, -- set true to make this spell always hits, otherwise hits will be afected by your distance
    damageMultipiler = 1.2, -- 0.75 mean 75% of you normal damage will be apiled per each shot (1.0 = 100%, 2.0 = 200% ...)
    shots =
    {
        perLevel = true, -- set false to make spell shooting everytime the same amount of arrows, otherwise it will shoot more if your level is higher
        multipiler = 80, -- (if perLevel is false - leave this alone) shoots "level/multipiler" arrows at once. ex. level 300 will shot 10 arrows at once (300/30=10) Multipiler CANT BE LESS THEN 1!
        amount = 0, -- here is the amount of arrows shooted if perLevel is set to false
        time = 120, -- time between shoots (120 is good number there)
    },

    criticals =
    {
        enable = true, -- set to make spell unable to do critical strikes
        chance = 5, -- in percents
        multipiler = 1.45, -- 2.0 mean: criticals will be 2 times much stronger, (1.0 mean same as non crits)
        info =
        {
            enable = true, -- set true to make enable "critical info"
            color = 180, -- check your data/lib/constant.lua for more avaible colors (can be a number between 0 and 255)
            onTarget = true -- set false to do "critical strike info" on you, otherwise it will be shown on target. for me onTarget looks much better
        }
    },
    ------------------------------------------------
    --- DO NOT TOUCHING ANYTHING BELOW THIS LINE ---
    ------------------------------------------------
    arrowsIds = {2544, 2545, 2546, 7364, 7365, 7838, 7840, 7839, 7850},
    boltsIds = {2543, 2547, 7629, 7363},

    effects = {
        [7366] = CONST_ANI_GREENSTAR,
        [2410] = CONST_ANI_THROWINGKNIFE,
        [10531] = CONST_ANI_DEATH,
        [4848] = CONST_ANI_SMALLICE,
    }
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, )
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, )

local function crit()
    return math.random(100)
end

function onGetFormulaValues(cid, level, maglevel)
    local pos = getCreaturePosition(cid)
    local tos = getCreaturePosition(getCreatureTarget(cid))
    local distance = getPlayerSkillLevel(cid, 4, )
    local max = -(5*level^(1/1.5)+distance*1.5+25*2*distance/40-30)*config.damageMultipiler
    if config.alwaysHits == true then
        min = max
    else
        min = math.floor(max / 2)
    end
    if config.criticals.enable and crit() <= config.criticals.chance then
        min = min * config.criticals.multipiler
        max = max * config.criticals.multipiler
        if(config.criticals.info.onTarget == true) then
            pos = tos
        end
        doSendAnimatedText(pos, "CRITICAL", config.criticals.info.color) 
    end
    return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local function shot(param)
    if config.criticals.enable ==  then
        config.criticals.info.enable =     end
    if(isCreature(getCreatureTarget(param.cid)) and (getCreatureHealth(getCreatureTarget(param.cid)) > 0)) then
        local tos = getCreaturePosition(getCreatureTarget(param.cid))
        local pos = getCreaturePosition(param.cid)
        local ammo = getPlayerSlotItem(param.cid, CONST_SLOT_AMMO)
        local weapon = getPlayerWeapon(param.cid)
        if(config.removeAmmo == true) then
            if((isInArray(config.arrowsIds, ammo.itemid) and(weapon.ammoType == arrow)) or(isInArray(config.boltsIds, ammo.itemid) and(weapon.ammoType == bolt))) then
                if(doPlayerRemoveItem(param.cid, ammo.itemid, 1) == true) then
                    doCombat(param.cid, combat, param.var)
                    doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
                else
                    doSendMagicEffect(pos, CONST_ME_POFF)
                end
            else
                doSendMagicEffect(pos, CONST_ME_POFF)
            end
        else
            doCombat(param.cid, combat, param.var)
            doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
        end
    end
    return true
end

function onCastSpell(cid, var)
    local weapon = getPlayerWeapon(cid)

    if((weapon.weaponType == distance) and ((weapon.ammoType == arrow) or (weapon.ammoType == bolt))) then
        local value = getPlayerLevel(cid) / config.shots.multipiler
        if(config.shots.perLevel == ) then
            value = config.shots.amount
        end
        for s = 1, value do
            addEvent(shot, s * config.shots.time, {cid = cid, var = var})
        end
    else
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    end
    return true
end
 
Last edited by a moderator:
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, )
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, )

Remove the last commas.

Edit:
Here too, around line 60.

local distance = getPlayerSkillLevel(cid, 4,)
 
Oh sorry @forgee I didn't see you just posted.

Try this:

Code:
local config =
{
--Spell made by me special for OTLand.net
--If you have some question or you are interested in buying v2 where enchanted arrows, burst's AoE, spears and trowning stars are supported feel free to PM
--You can use and edit this spell for your OTS, but you can't publish it somewhere without my permission
--You can't remove author line from script.
author = "andu",
--All rights to andu: "otland.net/members/andu/"; "facebook.com/olrios", olrios is my 2nd nickname


----------------- CONFIGURATION ----------------
removeAmmo = false, -- set true to remove one ammo per each shot. true is better for more RPG (remember to add , after "true" or "false")
alwaysHits = false, -- set true to make this spell always hits, otherwise hits will be afected by your distance
damageMultipiler = 1.2, -- 0.75 mean 75% of you normal damage will be apiled per each shot (1.0 = 100%, 2.0 = 200% ...)
shots =
{
perLevel = true, -- set false to make spell shooting everytime the same amount of arrows, otherwise it will shoot more if your level is higher
multipiler = 80, -- (if perLevel is false - leave this alone) shoots "level/multipiler" arrows at once. ex. level 300 will shot 10 arrows at once (300/30=10) Multipiler CANT BE LESS THEN 1!
amount = 0, -- here is the amount of arrows shooted if perLevel is set to false
time = 120, -- time between shoots (120 is good number there)
},

criticals =
{
enable = true, -- set to make spell unable to do critical strikes
chance = 5, -- in percents
multipiler = 1.45, -- 2.0 mean: criticals will be 2 times much stronger, (1.0 mean same as non crits)
info =
{
enable = true, -- set true to make enable "critical info"
color = 180, -- check your data/lib/constant.lua for more avaible colors (can be a number between 0 and 255)
onTarget = true -- set false to do "critical strike info" on you, otherwise it will be shown on target. for me onTarget looks much better
}
},
------------------------------------------------
--- DO NOT TOUCHING ANYTHING BELOW THIS LINE ---
------------------------------------------------
arrowsIds = {2544, 2545, 2546, 7364, 7365, 7838, 7840, 7839, 7850},
boltsIds = {2543, 2547, 7629, 7363},

effects = {
[7366] = CONST_ANI_GREENSTAR,
[2410] = CONST_ANI_THROWINGKNIFE,
[10531] = CONST_ANI_DEATH,
[4848] = CONST_ANI_SMALLICE,
}
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)

local function crit()
return math.random(100)
end

function onGetFormulaValues(cid, level, maglevel)
local pos = getCreaturePosition(cid)
local tos = getCreaturePosition(getCreatureTarget(cid))
local distance = getPlayerSkillLevel(cid, 4, )
local max = -(5*level^(1/1.5)+distance*1.5+25*2*distance/40-30)*config.damageMultipiler
if config.alwaysHits == true then
min = max
else
min = math.floor(max / 2)
end
if config.criticals.enable and crit() <= config.criticals.chance then
min = min * config.criticals.multipiler
max = max * config.criticals.multipiler
if(config.criticals.info.onTarget == true) then
pos = tos
end
doSendAnimatedText(pos, "CRITICAL", config.criticals.info.color)
end
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local function shot(param)
if config.criticals.enable == then
config.criticals.info.enable = end
if(isCreature(getCreatureTarget(param.cid)) and (getCreatureHealth(getCreatureTarget(param.cid)) > 0)) then
local tos = getCreaturePosition(getCreatureTarget(param.cid))
local pos = getCreaturePosition(param.cid)
local ammo = getPlayerSlotItem(param.cid, CONST_SLOT_AMMO)
local weapon = getPlayerWeapon(param.cid)
if(config.removeAmmo == true) then
if((isInArray(config.arrowsIds, ammo.itemid) and(weapon.ammoType == arrow)) or(isInArray(config.boltsIds, ammo.itemid) and(weapon.ammoType == bolt))) then
if(doPlayerRemoveItem(param.cid, ammo.itemid, 1) == true) then
doCombat(param.cid, combat, param.var)
doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
else
doSendMagicEffect(pos, CONST_ME_POFF)
end
else
doSendMagicEffect(pos, CONST_ME_POFF)
end
else
doCombat(param.cid, combat, param.var)
doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
end
end
return true
end

function onCastSpell(cid, var)
local weapon = getPlayerWeapon(cid)

if((weapon.weaponType == distance) and ((weapon.ammoType == arrow) or (weapon.ammoType == bolt))) then
local value = getPlayerLevel(cid) / config.shots.multipiler
if(config.shots.perLevel == ) then
value = config.shots.amount
end
for s = 1, value do
addEvent(shot, s * config.shots.time, {cid = cid, var = var})
end
else
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end
 
--Edit--
We all posted at the same time haha.
--


Code:
 setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, )
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, )

Why is the first CombatParam with 3 parameters (combat, type, physicaldamage) and the other 2 only have 2 parameters?

Try to change that code to this:
Code:
 setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PARAM_BLOCKARMOR)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PARAM_BLOCKSHIELD)

or to this:
Code:
 setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1 )
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1 )

or this:
Code:
 setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD)

No idea if that will work, just try it.
 
@imkingran No problem, I got it wrong anyway. That's what I get for doing this stuff on the phone. :p
Fixed "local distance = getPlayerSkillLevel(cid, 4, )" and "if(config.shots.perLevel == ) then":
Code:
local config =
{
--Spell made by me special for OTLand.net
--If you have some question or you are interested in buying v2 where enchanted arrows, burst's AoE, spears and trowning stars are supported feel free to PM
--You can use and edit this spell for your OTS, but you can't publish it somewhere without my permission
--You can't remove author line from script.
author = "andu",
--All rights to andu: "otland.net/members/andu/"; "facebook.com/olrios", olrios is my 2nd nickname


----------------- CONFIGURATION ----------------
removeAmmo = false, -- set true to remove one ammo per each shot. true is better for more RPG (remember to add , after "true" or "false")
alwaysHits = false, -- set true to make this spell always hits, otherwise hits will be afected by your distance
damageMultipiler = 1.2, -- 0.75 mean 75% of you normal damage will be apiled per each shot (1.0 = 100%, 2.0 = 200% ...)
shots =
{
perLevel = true, -- set false to make spell shooting everytime the same amount of arrows, otherwise it will shoot more if your level is higher
multipiler = 80, -- (if perLevel is false - leave this alone) shoots "level/multipiler" arrows at once. ex. level 300 will shot 10 arrows at once (300/30=10) Multipiler CANT BE LESS THEN 1!
amount = 0, -- here is the amount of arrows shooted if perLevel is set to false
time = 120, -- time between shoots (120 is good number there)
},

criticals =
{
enable = true, -- set to make spell unable to do critical strikes
chance = 5, -- in percents
multipiler = 1.45, -- 2.0 mean: criticals will be 2 times much stronger, (1.0 mean same as non crits)
info =
{
enable = true, -- set true to make enable "critical info"
color = 180, -- check your data/lib/constant.lua for more avaible colors (can be a number between 0 and 255)
onTarget = true -- set false to do "critical strike info" on you, otherwise it will be shown on target. for me onTarget looks much better
}
},
------------------------------------------------
--- DO NOT TOUCHING ANYTHING BELOW THIS LINE ---
------------------------------------------------
arrowsIds = {2544, 2545, 2546, 7364, 7365, 7838, 7840, 7839, 7850},
boltsIds = {2543, 2547, 7629, 7363},

effects = {
[7366] = CONST_ANI_GREENSTAR,
[2410] = CONST_ANI_THROWINGKNIFE,
[10531] = CONST_ANI_DEATH,
[4848] = CONST_ANI_SMALLICE,
}
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)

local function crit()
return math.random(100)
end

function onGetFormulaValues(cid, level, maglevel)
local pos = getCreaturePosition(cid)
local tos = getCreaturePosition(getCreatureTarget(cid))
local distance = getPlayerSkillLevel(cid, 4)
local max = -(5*level^(1/1.5)+distance*1.5+25*2*distance/40-30)*config.damageMultipiler
if config.alwaysHits == true then
min = max
else
min = math.floor(max / 2)
end
if config.criticals.enable and crit() <= config.criticals.chance then
min = min * config.criticals.multipiler
max = max * config.criticals.multipiler
if(config.criticals.info.onTarget == true) then
pos = tos
end
doSendAnimatedText(pos, "CRITICAL", config.criticals.info.color)
end
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local function shot(param)
if config.criticals.enable == then
config.criticals.info.enable = end
if(isCreature(getCreatureTarget(param.cid)) and (getCreatureHealth(getCreatureTarget(param.cid)) > 0)) then
local tos = getCreaturePosition(getCreatureTarget(param.cid))
local pos = getCreaturePosition(param.cid)
local ammo = getPlayerSlotItem(param.cid, CONST_SLOT_AMMO)
local weapon = getPlayerWeapon(param.cid)
if(config.removeAmmo == true) then
if((isInArray(config.arrowsIds, ammo.itemid) and(weapon.ammoType == arrow)) or(isInArray(config.boltsIds, ammo.itemid) and(weapon.ammoType == bolt))) then
if(doPlayerRemoveItem(param.cid, ammo.itemid, 1) == true) then
doCombat(param.cid, combat, param.var)
doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
else
doSendMagicEffect(pos, CONST_ME_POFF)
end
else
doSendMagicEffect(pos, CONST_ME_POFF)
end
else
doCombat(param.cid, combat, param.var)
doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
end
end
return true
end

function onCastSpell(cid, var)
local weapon = getPlayerWeapon(cid)

if((weapon.weaponType == distance) and ((weapon.ammoType == arrow) or (weapon.ammoType == bolt))) then
local value = getPlayerLevel(cid) / config.shots.multipiler
if(config.shots.perLevel == true) then
value = config.shots.amount
end
for s = 1, value do
addEvent(shot, s * config.shots.time, {cid = cid, var = var})
end
else
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end
 
@imkingran No problem, I got it wrong anyway. That's what I get for doing this stuff on the phone. :p
Fixed "local distance = getPlayerSkillLevel(cid, 4, )" and "if(config.shots.perLevel == ) then":
Code:
local config =
{
--Spell made by me special for OTLand.net
--If you have some question or you are interested in buying v2 where enchanted arrows, burst's AoE, spears and trowning stars are supported feel free to PM
--You can use and edit this spell for your OTS, but you can't publish it somewhere without my permission
--You can't remove author line from script.
author = "andu",
--All rights to andu: "otland.net/members/andu/"; "facebook.com/olrios", olrios is my 2nd nickname


----------------- CONFIGURATION ----------------
removeAmmo = false, -- set true to remove one ammo per each shot. true is better for more RPG (remember to add , after "true" or "false")
alwaysHits = false, -- set true to make this spell always hits, otherwise hits will be afected by your distance
damageMultipiler = 1.2, -- 0.75 mean 75% of you normal damage will be apiled per each shot (1.0 = 100%, 2.0 = 200% ...)
shots =
{
perLevel = true, -- set false to make spell shooting everytime the same amount of arrows, otherwise it will shoot more if your level is higher
multipiler = 80, -- (if perLevel is false - leave this alone) shoots "level/multipiler" arrows at once. ex. level 300 will shot 10 arrows at once (300/30=10) Multipiler CANT BE LESS THEN 1!
amount = 0, -- here is the amount of arrows shooted if perLevel is set to false
time = 120, -- time between shoots (120 is good number there)
},

criticals =
{
enable = true, -- set to make spell unable to do critical strikes
chance = 5, -- in percents
multipiler = 1.45, -- 2.0 mean: criticals will be 2 times much stronger, (1.0 mean same as non crits)
info =
{
enable = true, -- set true to make enable "critical info"
color = 180, -- check your data/lib/constant.lua for more avaible colors (can be a number between 0 and 255)
onTarget = true -- set false to do "critical strike info" on you, otherwise it will be shown on target. for me onTarget looks much better
}
},
------------------------------------------------
--- DO NOT TOUCHING ANYTHING BELOW THIS LINE ---
------------------------------------------------
arrowsIds = {2544, 2545, 2546, 7364, 7365, 7838, 7840, 7839, 7850},
boltsIds = {2543, 2547, 7629, 7363},

effects = {
[7366] = CONST_ANI_GREENSTAR,
[2410] = CONST_ANI_THROWINGKNIFE,
[10531] = CONST_ANI_DEATH,
[4848] = CONST_ANI_SMALLICE,
}
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)

local function crit()
return math.random(100)
end

function onGetFormulaValues(cid, level, maglevel)
local pos = getCreaturePosition(cid)
local tos = getCreaturePosition(getCreatureTarget(cid))
local distance = getPlayerSkillLevel(cid, 4)
local max = -(5*level^(1/1.5)+distance*1.5+25*2*distance/40-30)*config.damageMultipiler
if config.alwaysHits == true then
min = max
else
min = math.floor(max / 2)
end
if config.criticals.enable and crit() <= config.criticals.chance then
min = min * config.criticals.multipiler
max = max * config.criticals.multipiler
if(config.criticals.info.onTarget == true) then
pos = tos
end
doSendAnimatedText(pos, "CRITICAL", config.criticals.info.color)
end
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local function shot(param)
if config.criticals.enable == then
config.criticals.info.enable = end
if(isCreature(getCreatureTarget(param.cid)) and (getCreatureHealth(getCreatureTarget(param.cid)) > 0)) then
local tos = getCreaturePosition(getCreatureTarget(param.cid))
local pos = getCreaturePosition(param.cid)
local ammo = getPlayerSlotItem(param.cid, CONST_SLOT_AMMO)
local weapon = getPlayerWeapon(param.cid)
if(config.removeAmmo == true) then
if((isInArray(config.arrowsIds, ammo.itemid) and(weapon.ammoType == arrow)) or(isInArray(config.boltsIds, ammo.itemid) and(weapon.ammoType == bolt))) then
if(doPlayerRemoveItem(param.cid, ammo.itemid, 1) == true) then
doCombat(param.cid, combat, param.var)
doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
else
doSendMagicEffect(pos, CONST_ME_POFF)
end
else
doSendMagicEffect(pos, CONST_ME_POFF)
end
else
doCombat(param.cid, combat, param.var)
doSendDistanceShoot(pos, tos, config.effects[weapon.itemid])
end
end
return true
end

function onCastSpell(cid, var)
local weapon = getPlayerWeapon(cid)

if((weapon.weaponType == distance) and ((weapon.ammoType == arrow) or (weapon.ammoType == bolt))) then
local value = getPlayerLevel(cid) / config.shots.multipiler
if(config.shots.perLevel == true) then
value = config.shots.amount
end
for s = 1, value do
addEvent(shot, s * config.shots.time, {cid = cid, var = var})
end
else
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end

how can i fix this error in my remre


ok upload_2014-11-29_19-46-17.png
 
To use the code tags do the following:
1: Press here:
FZ8Unne.png


2. Paste script here:
VcTnuRy.png


3. Press insert and you will see "[ code]" tags wrapped around your script.

s6nYtxU.png


4. Your post will look like this:
t34x6ii.png


This is your final warning, next time I'll delete anything that does not follow the rules. If you have any more questions about the rules let me know.
 
Go to Sven and Tank in remere, click the NPC and change the Spawn Interval.
2crsegy.png



Or go to your Spawn.xml file (in the world folder) and edit it there. It's the same.
 
Back
Top