Hello dudes how do i set the coordinates to tp_bossy.lua? Cuz I don't understand how I do.
I have to make teleports right? and then build one room for each teleport so you comes to the boss monster? and when you killed the boss monster then a teleport apear? Lets say if they need 20 points to enter a teleport if they got 20 points they can enter, or els they can't enter? or is level?
aww, help me dude and please help me understand the script!
tp_bossy.lua
Code:local storage = 10001 local adams = { [5300] = { char = {effects = 10, global_storage = 5300, storage_value = 5, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "The Snapper", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5301] = { char = {effects = 10, global_storage = 5301, storage_value = 9, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "Hide", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5302] = { char = {effects = 10, global_storage = 5302, storage_value = 15, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "The Bloodtusk", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5303] = { char = {effects = 10, global_storage = 5303, storage_value = 18, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "Shardhead", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5304] = { char = {effects = 10, global_storage = 5304, storage_value = 24, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "Thul", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5305] = { char = {effects = 10, global_storage = 5305, storage_value = 36, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "Esmeralda", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5306] = { char = {effects = 10, global_storage = 5306, storage_value = 40, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "The Old Widow", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5307] = { char = {effects = 10, global_storage = 5307, storage_value = 44, gdzie_nas_tp = {x = 890, y = 839, z = 7}}, [0] = {name = "The Many", pos_summona = {x = 894, y = 839, z = 7}, effect = 10}, }, [5308] = { char = {effects = 10, global_storage = 5308, storage_value = 48, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "Leviathan", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5309] = { char = {effects = 10, global_storage = 5309, storage_value = 52, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "Stonecracker", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, }, [5310] = { char = {effects = 10, global_storage = 5310, storage_value = 56, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [0] = {name = "The Noxious Spawn", pos_summona = {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, storage) == adam.char.storage_value then if getGlobalStorageValue(adam.global_storage) == -1 then setGlobalStorageValue(adam.global_storage, 1) doTeleportThing(cid, adam.char.gdzie_nas_tp) doSendMagicEffect(position, adam.char.effects) for i = 0, #adam do doCreateMonster(adam[i].name, adam[i].pos_summona) doSendMagicEffect(adam[i].gdzie_nas_tp, adam[i].effect) end else doPlayerSendTextMessage(cid, 22, "Ktos aktualnie walczy z "..adam[0].name.."!") doTeleportThing(cid, fromPosition) end else doPlayerSendTextMessage(cid, 22, "Nie masz prawa tutaj wejsc!") doTeleportThing(cid, fromPosition) end end local tp_wyjsciowe = { [5311] = {global_storage = 5300, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5312] = {global_storage = 5301, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5313] = {global_storage = 5302, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5314] = {global_storage = 5303, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5315] = {global_storage = 5304, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5316] = {global_storage = 5305, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5317] = {global_storage = 5306, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5318] = {global_storage = 5307, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5319] = {global_storage = 5308, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5320] = {global_storage = 5309, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [5321] = {global_storage = 5310, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}} } local exits = tp_wyjsciowe[item.uid] if exits then doTeleportThing(cid, exits.gdzie_nas_tp) doSendMagicEffect(exits.gdzie_nas_tp, 10) setGlobalStorageValue(exits.global_storage, -1) end return true end
global_storage = 5306, storage_value = 40, [ Global_storage 5306? is that ID on the teleport?
gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [ Is that where the teleport is? ]
pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, [ this coordinates is where the teleporter shall spawn after the monster is dead?]
help me dudes!
[5307] = {
char = {effects = 10, global_storage = 5307, storage_value = 44, gdzie_nas_tp = {x = 32233, y = 31748, z = 7}},
[0] = {name = "The Many", pos_summona = {x = 32241, y = 31752, z = 7}, effect = 10},
},
["the many"] = {name = "The Many", storage = 9972, begin_storage_value = 44, finished_storage_value = 45, count = 1},
["hydra"] = {storage = 9985, begin_storage_value = 42, finished_storage_value = 43, count = 800},
[11] = {name = "hydras", storage = 9985, finish_storage_value = 43, begin_storage_value = 42, boss = "yes", after_kill_boss = 45, before_kill_boss = 44, talkstate = 12},
local storage = 10001
local adams = {
[5300] = {
char = {effects = 10, global_storage = 5300, storage_value = 5, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "The Snapper", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5301] = {
char = {effects = 10, global_storage = 5301, storage_value = 9, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "Hide", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5302] = {
char = {effects = 10, global_storage = 5302, storage_value = 15, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "The Bloodtusk", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5303] = {
char = {effects = 10, global_storage = 5303, storage_value = 18, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "Shardhead", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5304] = {
char = {effects = 10, global_storage = 5304, storage_value = 24, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "Thul", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5305] = {
char = {effects = 10, global_storage = 5305, storage_value = 36, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "Esmeralda", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5306] = {
char = {effects = 10, global_storage = 5306, storage_value = 40, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "The Old Widow", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5307] = {
char = {effects = 10, global_storage = 5307, storage_value = 44, gdzie_nas_tp = {x = 890, y = 839, z = 7}},
[0] = {name = "The Many", pos_summona = {x = 894, y = 839, z = 7}, effect = 10},
},
[5308] = {
char = {effects = 10, global_storage = 5308, storage_value = 48, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "Leviathan", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5309] = {
char = {effects = 10, global_storage = 5309, storage_value = 52, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "Stonecracker", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
},
[5310] = {
char = {effects = 10, global_storage = 5310, storage_value = 56, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[0] = {name = "The Noxious Spawn", pos_summona = {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, storage) == adam.char.storage_value then
if getGlobalStorageValue(adam.global_storage) == 1 then
setGlobalStorageValue(adam.global_storage, 1)
doTeleportThing(cid, adam.char.gdzie_nas_tp)
doSendMagicEffect(position, adam.char.effects)
for i = 0, #adam do
doCreateMonster(adam[i].name, adam[i].pos_summona)
doSendMagicEffect(adam[i].gdzie_nas_tp, adam[i].effect)
end
else
doPlayerSendTextMessage(cid, 22, "Ktos aktualnie walczy z "..adam[0].name.."!")
doTeleportThing(cid, fromPosition)
end
else
doPlayerSendTextMessage(cid, 22, "Nie masz prawa tutaj wejsc!")
doTeleportThing(cid, fromPosition)
end
end
local tp_wyjsciowe = {
[5311] = {global_storage = 5300, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5312] = {global_storage = 5301, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5313] = {global_storage = 5302, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5314] = {global_storage = 5303, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5315] = {global_storage = 5304, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5316] = {global_storage = 5305, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5317] = {global_storage = 5306, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5318] = {global_storage = 5307, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5319] = {global_storage = 5308, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5320] = {global_storage = 5309, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
[5321] = {global_storage = 5310, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}
}
local exits = tp_wyjsciowe[item.uid]
if exits then
doTeleportThing(cid, exits.gdzie_nas_tp)
doSendMagicEffect(exits.gdzie_nas_tp, 10)
setGlobalStorageValue(exits.global_storage, -1)
end
return true
end
["troll"] = {storage = 9998, begin_storage_value = 3, finished_storage_value = 4, count = 100},
["troll champion"] = {storage = 9998, begin_storage_value = 3, finished_storage_value = 4, count = 100},
["frost troll"] = {storage = 9998, begin_storage_value = 3, finished_storage_value = 4, count = 100},
[1] = {name = "trolls", storage = 9998, expe = "yes", how_many = 100000, finish_storage_value = 4, begin_storage_value = 3, talkstate = 4},
elseif tasks[i].name == "trolls" then
selfSay("Argh! Estes malditos trolls infestaram os bueiros da cidade. Mate {100 "..tasks[i].name.."} e lhe darei uma bela recompensa. Interessado?", cid)
[12/10/2010 05:33:16] [Error - MoveEvents Interface]
[12/10/2010 05:33:16] data/movements/scripts/tp_bossy.luanStepIn
[12/10/2010 05:33:16] Description:
[12/10/2010 05:33:16] attempt to index a nil value
[12/10/2010 05:33:16] stack traceback:
[12/10/2010 05:33:16] [C]: in function 'doSendMagicEffect'
[12/10/2010 05:33:16] data/movements/scripts/tp_bossy.lua:58: in function <data/movements/scripts/tp_bossy.lua:48>