• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Svargrond Arena(by Gesior)...PROBLEM!

Status
Zamknięty.
Dołączył
Luty 26, 2009
Posty
11
Liczba reakcji
0
Witam. Mam problem z Svargrond aren? :/...gadam z npc,przechodz? przez drzwi i jest dobrze dop?ki nie dochodz? do tp kt?re maja mnie przenie?? do 1 pokoju z potworkiem.. i jak w?a?? na tp to stoi na nim i taki b??d wyskakuje w silniku:

[25/04/2009 00:35:15] Lua Script Error: [MoveEvents Interface]
[25/04/2009 00:35:15] data/movements/scripts/arenaroom.lua:onStepIn

[25/04/2009 00:35:15] luaGetThingPos(). Thing not found

[25/04/2009 00:35:15] Lua Script Error: [MoveEvents Interface]
[25/04/2009 00:35:15] data/movements/scripts/arenaroom.lua:onStepIn

[25/04/2009 00:35:15] luaDoSummonCreature(). Can not summon monster: frostfur

A potem jak jeszcze raz prubuje wejsc w tp to pisze:
00:38 Chaszysz jest teraz w tym pokuj. Zaczekaj chwile.

O co chodzi:/?? Prosz? o jak najszybsz? pomoc :P
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

moze wspolrzedne ci sie nie zgadaja takie jak masz w pliku arenaroom.lua a inne masz moze w map edytorze sprawdz wspolrzedne gdzie ma cie tp i popraw to
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

Podaj skrypt arena.lua i jak napisa?e? w movements.xml to ci poprawie skrypt.

Pozdrawiam Javimax
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

movements.xml:
<!--arena svagrond-->
<movevent event="StepIn" actionid="42360" script="arenagoblet.lua"/>
<movevent event="StepIn" actionid="42370" script="arenagoblet.lua"/>
<movevent event="StepIn" actionid="42380" script="arenagoblet.lua"/>
<movevent event="StepOut" actionid="42360" script="arenagoblet.lua"/>
<movevent event="StepOut" actionid="42370" script="arenagoblet.lua"/>
<movevent event="StepOut" actionid="42380" script="arenagoblet.lua"/>
<movevent event="StepIn" actionid="42300" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42301" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42302" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42303" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42304" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42305" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42306" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42307" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42308" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42309" script="arenaroom.lua"/>
<movevent event="StepIn" actionid="42310" script="didarenalevel.lua"/>
<movevent event="StepIn" actionid="42321" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42322" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42323" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42324" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42325" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42326" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42327" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42328" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42329" script="leavearena.lua"/>
<movevent event="StepIn" actionid="42330" script="leavearena.lua"/>

data\npc\scripts\arena.lua :
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end

function enterArena(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
local cost = 0
local levelname = ''
if getPlayerStorageValue(cid, 42355) < 1 then
cost = 1000
levelname = 'greenshore'
levelneeded = 30
elseif getPlayerStorageValue(cid, 42355) == 1 then
cost = 5000
levelname = 'scrapper'
levelneeded = 50
elseif getPlayerStorageValue(cid, 42355) == 2 then
cost = 10000
levelname = 'warlord'
levelneeded = 80
end
if string.lower(keywords[1]) == 'yes' and parameters.prepare ~= 1 then
if(getPlayerLevel(cid) >= levelneeded) then
if(getPlayerMoney(cid) >= cost) then
npcHandler:say('Now you can go to test.', cid)
setPlayerStorageValue(cid, 42351, 1)
else
npcHandler:say('You don\'t have ' .. cost .. ' gp! Come back when you will be ready!', cid)
end
else
npcHandler:say('You don\'t have ' .. levelneeded .. ' level! Come back when you will be ready!', cid)
end
npcHandler:resetNpc()
elseif string.lower(keywords[1]) == 'no' then
npcHandler:say('Come back later then!', cid)
npcHandler:resetNpc()
else
if getPlayerStorageValue(cid, 42355) < 3 then
npcHandler:say('You test will be ' .. levelname .. ' level. If you want enter you must pay ' .. cost .. ' gp and have ' .. levelneeded .. ' level. Wanna try?', cid)
else
npcHandler:say('You did all arena levels.',cid)
end
end
return true
end

npcHandler:setMessage(MESSAGE_GREET, 'Hello |PLAYERNAME|! Do you want to make arena?')

local yesNode = KeywordNode:new({'yes'}, enterArena, {})
local noNode = KeywordNode:new({'no'}, enterArena, {})

local node1 = keywordHandler:addKeyword({'arena'}, enterArena, {prepare=1})
node1:addChildKeywordNode(yesNode)
node1:addChildKeywordNode(noNode)

local node1 = keywordHandler:addKeyword({'fight'}, enterArena, {prepare=1})
node1:addChildKeywordNode(yesNode)
node1:addChildKeywordNode(noNode)
local node1 = keywordHandler:addKeyword({'yes'}, enterArena, {prepare=1})
node1:addChildKeywordNode(yesNode)
node1:addChildKeywordNode(noNode)
npcHandler:addModule(FocusModule:new())

data\movements\scripts\arenaroom.lua:
function onStepIn(cid, item, position, fromPosition)
if InitArenaScript == 0 then
InitArenaScript = 1
checkArenaRooms({})
end
local arena_room = item.actionid
local player_arena = getPlayerStorageValue(cid, 42355)
if getPlayerStorageValue(cid, arena_room+getPlayerStorageValue(cid, 42355)*10-1) == 1 or arena_room+getPlayerStorageValue(cid, 42355)*10-1 == 42299 then
if getGlobalStorageValue(cid, arena_room) == 0 then
local monster_uid = getGlobalStorageValue(arena_room+100)
if monster_uid > 0 then
if isCreature(monster_uid) == TRUE then
doRemoveCreature(monster_uid)
end
end
local spawn_pos = getThingPos(arena_room)
local monster = doSummonCreature(arena_monsters[arena_room+getPlayerStorageValue(cid, 42355)*10], {x=spawn_pos.x-1,y=spawn_pos.y-1,z=spawn_pos.z})
setGlobalStorageValue(arena_room+100, monster)
doTeleportThing(cid, spawn_pos, TRUE)
setGlobalStorageValue(arena_room, cid)
setGlobalStorageValue(arena_room-1, 0)
setPlayerStorageValue(cid, 42350, os.time()+arena_room_max_time)
else
doTeleportThing(cid, fromPosition, TRUE)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(getGlobalStorageValue(cid, arena_room))..' jest teraz w tym pokuj. Zaczekaj chwile.')
end
else
doTeleportThing(cid, fromPosition, TRUE)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,'Najpierw zabij potwora!')
end
if arena_room == 42300 then
setPlayerStorageValue(cid, 42351, 0)
setPlayerStorageValue(cid, 42352, 1)
end
return TRUE
end

function checkArenaRooms(param)
addEvent(checkArenaRooms, 1000, {})
for i = 42300, 42309 do
local player = getGlobalStorageValue(i)
if isPlayer(player) == TRUE then
local player_storage = getPlayerStorageValue(player, 42350)
if player_storage <= os.time() then
doTeleportThing(player, arenaKickPosition, TRUE)
setPlayerStorageValue(player, 42350, 0)
setGlobalStorageValue(i, 0)
doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'Zostales wyrzucony z areny!')
elseif player_storage - 10 <= os.time() then
doPlayerSendTextMessage(player,MESSAGE_EVENT_DEFAULT,'Masz ' .. player_storage - os.time() .. ' sekund, zeby przejsc do kolejnego pokoju!')
end
else
setGlobalStorageValue(i, 0)
end
end
end


Aha i silnik mam The Forgotten Server 0.2 Armonii :P
 
Ostatnia edycja:
Odp: Svargrond Arena(by Gesior)...PROBLEM!

Jest cos popsute na mapce chyba z uniq id na kratke na ktora stajesz lub poprostu ten skrypt jest pod nowsza ver. TFS i trzeba by troche pozmieniac: onStepIn nie moze znalezc :o i nie moze przywolac potworka jakis blad resp ustawienia chyba.
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

no du?o pomog?e? xD... kurde kto? potrafi temu zaradzi?? plx help ;d
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

Proste. Nie masz takiego potworka Frost Fur
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

W?a?nie mam takiego potworka jak Frostfur :P....kurde plx help ;/
 
Odp: Svargrond Arena(by Gesior)...PROBLEM!

Poczekaj az wyjdzie najnowszy silnik TFS 0.3.4 lub sproboj odtworzyc na 0.3.2 :) pod mystic nie sprawdzalem.
 
Status
Zamknięty.
Do góry