• 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 Error in movements script

russogracie

New Member
Joined
Sep 9, 2010
Messages
205
Reaction score
2
My task is to script but when I enter the right teleporter would summon the monster but in this case it's only error in the function and sends me the message:

10:06 You can't enter here!

I'll post the script if you need more of the Movements of some please let me know:

local bosses_storage = 10003
local adams = {
[5300] = {
char = {effects = 10, global_storage = 5300, storage_value = 1, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "The Snapper", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5301] = {
char = {effects = 10, global_storage = 5301, storage_value = 1, where_us_tp = {x=32625,y=32774,z=9}},
boss = {name = "Hide", summon_pos = {x=32641,y=32773,z=9}, effect = 10},
},
[5302] = {
char = {effects = 10, global_storage = 5302, storage_value = 5, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "The Bloodtusk", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5303] = {
char = {effects = 10, global_storage = 5303, storage_value = 7, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "Shardhead", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5304] = {
char = {effects = 10, global_storage = 5304, storage_value = 9, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "Esmeralda", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5305] = {
char = {effects = 10, global_storage = 5305, storage_value = 11, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "The Old Widow", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5306] = {
char = {effects = 10, global_storage = 5306, storage_value = 13, where_us_tp = {x=875,y=974,z=10}},
boss = {name = "The Many", summon_pos = {x=876,y=974,z=10}, effect = 10},
},
[5307] = {
char = {effects = 10, global_storage = 5307, storage_value = 15, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "Leviathan", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5308] = {
char = {effects = 10, global_storage = 5308, storage_value = 17, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "Stonecracker", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5309] = {
char = {effects = 10, global_storage = 5309, storage_value = 19, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "The Noxious Spawn", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
},
[5310] = {
char = {effects = 10, global_storage = 5310, storage_value = 21, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "Thul", summon_pos = {x=1000,y=1000,z=7}, effect = 10},
}
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local adam = adams[item.uid]
if adam then
if getPlayerStorageValue(cid, bosses_storage) == adam.char.storage_value then
if getGlobalStorageValue(adam.global_storage) == -1 then
setGlobalStorageValue(adam.global_storage, 1)
doTeleportThing(cid, adam.char.where_us_tp)
doSendMagicEffect(adam.char.where_us_tp, adam.char.effects)
monster = doCreateMonster(adam.boss.name, adam.boss.summon_pos)
doSendMagicEffect(adam.boss.summon_pos, adam.boss.effect)
else
doPlayerSendTextMessage(cid, 22, "Somebody fight with "..adam.boss.name.."!")
doTeleportThing(cid, fromPosition)
end
else
doPlayerSendTextMessage(cid, 22, "You can't enter here!")
doTeleportThing(cid, fromPosition)
end
end

local tp_wyjsciowe = {
[5311] = {storage_value = 1, where_us_tp = {x=1000,y=1000,z=7}}, --the snapper
[5301] = {storage_value = 3, where_us_tp = {x=32641,y=32773,z=9}}, --hide
[5313] = {storage_value = 5, where_us_tp = {x=1000,y=1000,z=7}}, --the bloodtusk
[5314] = {storage_value = 7, where_us_tp = {x=1000,y=1000,z=7}}, --shardhead
[5315] = {storage_value = 11, where_us_tp = {x=1000,y=1000,z=7}}, --esmeralda
[5316] = {storage_value = 13, where_us_tp = {x=1000,y=1000,z=7}}, --the old widow
[5317] = {storage_value = 15, where_us_tp = {x=874,y=974,z=10}}, --the many
[5318] = {storage_value = 17, where_us_tp = {x=1000,y=1000,z=7}}, --leviathan
[5319] = {storage_value = 19, where_us_tp = {x=1000,y=1000,z=7}}, --stonecracker
[5320] = {storage_value = 21, where_us_tp = {x=1000,y=1000,z=7}}, --the noxious spawn
[5321] = {storage_value = 23, where_us_tp = {x=1000,y=1000,z=7}} --thul
}
local exits = tp_wyjsciowe[item.uid]
if exits then
if getPlayerStorageValue(cid, bosses_storage) == exits.storage_value then
doRemoveCreature(monster)
end
setGlobalStorageValue(adams[item.uid-11].global_storage, -1)
doTeleportThing(cid, exits.where_us_tp)
doSendMagicEffect(exits.where_us_tp, 10)
end
return true
end


Error in executable:

3066c596ff.png


Plx help me =)
 
Back
Top