arthuraio
Member
- Joined
- Apr 9, 2015
- Messages
- 123
- Reaction score
- 13
I'm using the global project 10.76/10.77 server
I have an annoying problem with this arena, wasted my whole saturday trying to fix it to not avail.
here is the thing, everything goes fine from talking to the NPC to entering the first teleport. NOW that we are in the first pit, the "frostfur" is summoned, after killing it, nothing happens.... Yeah that's it, nothing. Forcing you to cancel the arena leaving through the "give up" teleport and be turned into a chicken.
The blue pillar should be turned into the teleport to the next room, but as I said, nothing happens. everything is fine at the .XML part, I think something is wrong with this script in particular... I can't really understand it, i hate when people write a script like that with alot of locals. Makes it unreadable for me. Anyone with more experience is able to help me...?
REP++
I have an annoying problem with this arena, wasted my whole saturday trying to fix it to not avail.
here is the thing, everything goes fine from talking to the NPC to entering the first teleport. NOW that we are in the first pit, the "frostfur" is summoned, after killing it, nothing happens.... Yeah that's it, nothing. Forcing you to cancel the arena leaving through the "give up" teleport and be turned into a chicken.
The blue pillar should be turned into the teleport to the next room, but as I said, nothing happens. everything is fine at the .XML part, I think something is wrong with this script in particular... I can't really understand it, i hate when people write a script like that with alot of locals. Makes it unreadable for me. Anyone with more experience is able to help me...?
Code:
function onKill(cid, target)
local targetMonster = Monster(target)
if not targetMonster then
return
end
local player = Player(cid)
local pit = player:getStorageValue(Storage.SvargrondArena.Pit)
if pit < 1 or pit > 10 then
return
end
local arena = player:getStorageValue(Storage.SvargrondArena.Arena)
if arena < 1 then
return
end
if not isInArray(ARENA[arena].creatures, targetMonster:getName():lower()) then
return
end
-- Remove pillar and create teleport
local pillarTile = Tile(PITS[pit].pillar)
if pillarTile then
local pillarItem = pillarTile:getItemById(SvargrondArena.itemPillar)
if pillarItem then
pillarItem:remove()
local teleportItem = Game.createItem(SvargrondArena.itemTeleport, 1, PITS[pit].tp)
if teleportItem then
teleportItem:setActionId(25200)
end
SvargrondArena.sendPillarEffect(pit)
end
end
player:setStorageValue(Storage.SvargrondArena.Pit, pit + 1)
player:say('Victory! Head through the new teleporter into the next room.', TALKTYPE_MONSTER_SAY)
return true
end
REP++
Last edited: