• 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!

TP Kratka

Status
Not open for further replies.

Soul_Bullock

New Member
Joined
May 4, 2011
Messages
53
Reaction score
1
kolega z innego forum ma problem z pewnym skryptem więcv postanowiłem wkleic to tu, może tu mu ktoś pomoże

PHP:
function onStepIn(cid, item, frompos, item2, topos)
local config = {
    [2500] = {level = 200, pos = {x=604, y=2500, z=9}, effect = 15},
    [2501] = {level = 250, pos = {x=604, y=2500, z=9}, effect = 15}
                }
local kratka = config[item.uid]
local tekst = "Twoj poziom doswiadczenia jest za niski. Wymagany poziom to "..kratka.level..""
    if getPlayerLevel(cid) <= kratka.level then
        doPlayerSendTextMessage(cid, 22, tekst)
    else
        doTeleportThing(cid, kratka.pos)
        doSendMagicEffect(kratka.pos, kratka.effect)
end
return true        
end

Proszę o przerobienie go w taki sposób, że jezleli ktoś nie spełnia wymagań (nie ma wymaganego lvl) to dostaje tp w inne miejsce ;p (z góry thx)
 
Numer z kolegą to ja słyszałem w przedszkolu. Mów że potrzebujesz i tyle. Nie sprawdzane
Lua:
local config = 
{
	[2500] = {level = 200, to = {x = 604, y = 2500, z = 9}, from = {x = 604, y = 2500, z = 9}, effect = CONST_ME_POFF}--, 
}

function onStepIn(cid, item, fromPos, itemEx, toPos)
	if (config[item.uid]) then
		if (getPlayerLevel(cid) > config[item.uid].level) then 
			doTeleportThing(cid, config[item.uid].to) 
			doSendMagicEffect(kratka.pos, config[item.uid].effect) 
		else
			doTeleportThing(cid, config[item.uid].from) 
		end
        end
		
	return true
end
 
Last edited:
Własnie mi napisał że otrzymuje taki błąd
PHP:
Error - LuaScriptInterface::loadFile] data/movements/scripts/tpk.lua:16: 'end' expected (to close 'function' at line 6) near '<eof>'
[Warning - Event::loadScript] Cannot load script (data/movements/scripts/tpk.lua)
data/movements/scripts/tpk.lua:16: 'end' expected (to close 'function' at line 6) near '<eof>'
 
@up enda jednego zgubiłeś :)

PHP:
local config = 
{
	[2500] = {level = 200, to = {x = 604, y = 2500, z = 9}, from = {x = 604, y = 2500, z = 9}, effect = CONST_ME_POFF}--, 
}
 
function onStepIn(cid, item, fromPos, itemEx, toPos)
	if (config[item.uid]) then
		if (getPlayerLevel(cid) > config[item.uid].level) then 
			doTeleportThing(cid, config[item.uid].to) 
			doSendMagicEffect(kratka.pos, config[item.uid].effect) 
		else
			doTeleportThing(cid, config[item.uid].from) 
		end
 end
	return true

end

Jeszcze jest jeden brak, a mianowicie kratka.
 
zaraz mu wyslę :p (thx za poprawkę)
Napisał że działa perfekto :) :DD
dziękuje w jego imieniu :)
 
Last edited:
Status
Not open for further replies.
Back
Top