Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Poprawa]Sytem energi


Rekomendowane odpowiedzi

Opublikowano

Witam wgralem questa na system energi

 

i mam pewien problem wyskakuje blad w syser ch1 i sie nie odpala serwer!

 

quest

 

http://wklej.to/L0rl1

 

syser ch1

 

SYSERR: Oct 15 11:58:58 :: InitializeLua: LOAD_QUESTLIB_FAILURE(locale/poland/quest/questlib.lua)
SYSERR: Oct 15 12:01:19 :: ForAttrRegionFreeAngle: SECTREE_MANAGER::ForAttrRegion - Unhandled exception. MapIndex: 41
SYSERR: Oct 15 12:01:24 :: heart_idle: losing 70 seconds. (lag occured)

 

questlib

 

http://wklej.to/DaqnV

 

 

--** Ritorna se l'Expérience del pet č bloccata
function PetSystem.IsExpBlocked()
return (pc.getqf(PetSystem.ExpFlag) == 1)
end

--**
--** Stampa a colori
--**

function say_light_yellow(str)
say(color256(255,255,128)..str..color256(196, 196, 196))
end

function say_yellow(str)
say(color256(255,255,53)..str..color256(196, 196, 196))
end

function say_orange(str)
say(color256(255,191,24)..str..color256(196, 196, 196))
end

function say_light_blue(str)
say(color256(130, 192, 255)..str..color256(196, 196, 196))
end

function say_bonus(str)
say(color256(167, 255, 212)..str..color256(196, 196, 196))
end

function setenergy(typ,value,timez)
pc.setqf("energy_value", value)
pc.setqf("energy_date", get_time() + timez)
pc.setqf("energy_typ", typ)
end
function setenergytime(timez)
pc.setqf("energy_date", timez)
end
function getenergytyp()
return pc.getqf("energy_typ")
end
function getenergyvalue()
return pc.getqf("energy_value")
end
function getenergytime()
return pc.getqf("energy_date")
end
function split(str, delim, maxNb)
if str == nil then return str end
if string.find(str, delim) == nil then return { str } end
if maxNb == nil or maxNb < 1 then maxNb = 0 end
local result = {}
local pat = "(.-)" .. delim .. "()"
local nb = 0
local lastPos
for part, pos in string.gfind(str, pat) do
     nb = nb + 1
     result[nb] = part
     lastPos = pos
     if nb == maxNb then break end
end
if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end
return result
end
mysql_query = function(query)
local rt = io.open('CONFIG','r'):read('*all')
local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
math.randomseed(os.time())
local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
for i = 2, table.getn(t) do table.foreach(t[i],function(a,<img src='http://www.mpcforum.pl/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' />
     out[i-1]     = out[i-1] or {}
     out[i-1][a]     = b
     out[t[1][a]] = out[t[1][a]] or {}
     out[t[1][a]][i-1] = b
end) end
return out
end
-- Entferne Leerzeichen vor und nach dem String
function string.trim(str)
return (string.gsub(str, "^%s*(.-)%s*$", "%1"))
end
-- String zu Array über Seperator
function string.explode(str, sep)
if sep == "" or str == "" then
     error("Fehlende Parameter")
end
local pos, t = 1, {}
for s, e in function() return string.find(str, sep, pos) end do
     table.insert(t, string.trim(string.sub(str, pos, s-1)))
     pos = e+1
end
table.insert(t, string.trim(string.sub(str, pos)))
return t
end

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...