Hellow, im really new to this scripting world, what i need is when the players finish the grizzly adams task and he tells them "go kill boss now", the teleport lets them into a room that i already have and summons the corresponding boss.
dont know what lua file u guys nee me to put here so i will post the ones i think you need to see.
this is the one i have that i think i need to change something so i can make it work with my tasks
what i have done so far is make 2 teleports,i put the old widows uniqueid 5305 in the entrance teleport and 5316 id on the exit teleport, the entrance teleport tells me you cant enter her, i guess thats a good thing i think i just need it to work together with my task so it will let me in, the exit teleport works fine.
dont know what other lua file you guys need to help me, so tell me and i will post them
dont know what lua file u guys nee me to put here so i will post the ones i think you need to see.
this is the one i have that i think i need to change something so i can make it work with my tasks
PHP:
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 = 3, where_us_tp = {x=1000,y=1000,z=7}},
boss = {name = "Hide", summon_pos = {x=1000,y=1000,z=7}, 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=575,y=638,z=7}},
boss = {name = "The Old Widow", summon_pos = {x=575,y=636,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
[5312] = {storage_value = 3, where_us_tp = {x=1000,y=1000,z=7}}, --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=576,y=631,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
dont know what other lua file you guys need to help me, so tell me and i will post them
Last edited: