Inne skrypt z exp ringiem REPypt na

Status
Zamknięty.

dragon1155

Advanced User
Zarejestrowany
Dołączył
Wrzesień 22, 2009
Posty
297
Liczba reakcji
1
witam, mam taki problem, ze mam skrypt na exp ringa i dziala on na pierwszy rzut oka poprawnie... tylko, ze gracz po zdj?ciu exp ringa nie dostaje do?wiadczenia za zabite potwory... dopiero po przelogowaniu mo?e expi? bez exp ringa.. tu daje skrypt


local Inforate = getConfigInfo('rateExperience')
local lvlmin = 500 --lvl minimum by uzyc
local lvlmax = 400000 --lvl max by uzyc
local exprate = 1.6 --jak ma zmieniac exp rate... 1.2 = exprate z configu + 20%
local newrate = exprate*Inforate
local effect = math.random(27, 32)
function onEquip(cid, item, slot)
playerlvl = getPlayerLevel(cid)
playerpos = getPlayerPosition(cid)
if playerlvl >= lvlmin then
if playerlvl <= lvlmax then
doPlayerSetExperienceRate(cid, exprate)
doPlayerSendTextMessage(cid,22,"Your Exp Stage is Bigger(rate: "..newrate..")!")
doSendMagicEffect(playerpos, effect)
else
doPlayerSendTextMessage(cid,22,"Your lvl is too big!")
end
else
doPlayerSendTextMessage(cid,22,"Your lvl is too low!")
end
return true
end
function onDeEquip(cid, item, slot)
if playerlvl >= lvlmin then
doPlayerSetExperienceRate(cid, normal)
doPlayerSendTextMessage(cid,22,"Your exp rate now is normal(rate: "..getConfigInfo('rateExperience')..")!")
doSendMagicEffect(playerpos, effect)
end
return true
end

a tu b??dy w konsoli, kt?re czasem si? pojawiaj?

[03/04/2012 20:15:29] [Error - MoveEvents Interface]
[03/04/2012 20:15:29] data/movements/scripts/ring.lua:onDeEquip
[03/04/2012 20:15:29] Description:
[03/04/2012 20:15:29] data/movements/scripts/ring.lua:25: attempt to compare number with nil
[03/04/2012 20:15:29] stack traceback:
[03/04/2012 20:15:29] data/movements/scripts/ring.lua:25: in function <data/movements/scripts/ring.lua:24>

za pomoc rep
 
Odp: skrypt z exp ringiem REPypt na

PHP:
local Inforate = getConfigInfo('rateExperience')
local lvlmin = 500 --lvl minimum by uzyc
local lvlmax = 400000 --lvl max by uzyc
local exprate = 1.6 --jak ma zmieniac exp rate... 1.2 = exprate z configu + 20%
local newrate = exprate*Inforate
local effect = math.random(27, 32)
local playerlvl = getPlayerLevel(cid)
local playerpos = getPlayerPosition(cid)

function onEquip(cid, item, slot)
if playerlvl >= lvlmin then
if playerlvl <= lvlmax then
doPlayerSetExperienceRate(cid, exprate)
doPlayerSendTextMessage(cid,22,"Your Exp Stage is Bigger(rate: "..newrate..")!")
doSendMagicEffect(playerpos, effect)
else
doPlayerSendTextMessage(cid,22,"Your lvl is too big!")
end
else
doPlayerSendTextMessage(cid,22,"Your lvl is too low!")
end
return true
end

function onDeEquip(cid, item, slot)
if playerlvl >= lvlmin then
doPlayerSetExperienceRate(cid, Inforate)
doPlayerSendTextMessage(cid,22,"Your exp rate now is normal(rate: "..Inforate..")!")
doSendMagicEffect(playerpos, effect)
end
return true
end

Hm?
 
Odp: skrypt z exp ringiem REPypt na

@up: chyba serwer nie polubil tego skryptu :s


[03/04/2012 20:54:41] [Error - MoveEvents Interface]
[03/04/2012 20:54:41] data/movements/scripts/ring.lua
[03/04/2012 20:54:41] Description:
[03/04/2012 20:54:41] (internalGetPlayerInfo) Player not found when requesting player info #3

[03/04/2012 20:54:41] [Error - MoveEvents Interface]
[03/04/2012 20:54:41] data/movements/scripts/ring.lua
[03/04/2012 20:54:41] Description:
[03/04/2012 20:54:41] (luaGetThingPosition) Thing not found

[03/04/2012 20:54:41] [Error - MoveEvents Interface]
[03/04/2012 20:54:41] data/movements/scripts/ring.lua
[03/04/2012 20:54:41] Description:
[03/04/2012 20:54:41] (internalGetPlayerInfo) Player not found when requesting player info #3

[03/04/2012 20:54:42] [Error - MoveEvents Interface]
[03/04/2012 20:54:42] data/movements/scripts/ring.lua
[03/04/2012 20:54:42] Description:
[03/04/2012 20:54:42] (luaGetThingPosition) Thing not found
[03/04/2012 20:54:42] Reloaded movements.

[03/04/2012 20:54:49] [Error - MoveEvents Interface]
[03/04/2012 20:54:49] data/movements/scripts/ring.lua:onEquip
[03/04/2012 20:54:49] Description:
[03/04/2012 20:54:49] data/movements/scripts/ring.lua:12: attempt to compare number with boolean
[03/04/2012 20:54:49] stack traceback:
[03/04/2012 20:54:49] data/movements/scripts/ring.lua:12: in function <data/movements/scripts/ring.lua:11>

[03/04/2012 20:54:52] [Error - MoveEvents Interface]
[03/04/2012 20:54:52] data/movements/scripts/ring.lua:onEquip
[03/04/2012 20:54:52] Description:
[03/04/2012 20:54:52] data/movements/scripts/ring.lua:12: attempt to compare number with boolean
[03/04/2012 20:54:52] stack traceback:
[03/04/2012 20:54:52] data/movements/scripts/ring.lua:12: in function <data/movements/scripts/ring.lua:11>
 
Odp: skrypt z exp ringiem REPypt na

PHP:
local Inforate = getConfigInfo('rateExperience')
local lvlmin = 500 --lvl minimum by uzyc
local lvlmax = 400000 --lvl max by uzyc
local exprate = 1.6 --jak ma zmieniac exp rate... 1.2 = exprate z configu + 20%
local newrate = exprate*Inforate
local effect = math.random(27, 32)

function onEquip(cid, item, slot)
if getPlayerLevel(cid) >= lvlmin and getPlayerLevel(cid) <= lvlmax then
	doPlayerSetExperienceRate(cid, exprate)
	doPlayerSendTextMessage(cid,22,"Your Exp Stage is Bigger(rate: "..newrate..")!")
	doSendMagicEffect(getPlayerPosition(cid), effect)
else
	doPlayerSendTextMessage(cid, 22, "Minimum level: "..lvlmin..". Maximum level: "..lvlmax.." !")
end
return true
end

function onDeEquip(cid, item, slot)
if (getPlayerLevel(cid) >= lvlmin) then
	doPlayerSetExperienceRate(cid, Inforate)
	doPlayerSendTextMessage(cid, 22, "Your exp rate now is normal(rate: "..Inforate..")!")
	doSendMagicEffect(getPlayerPosition(cid), effect)
end
return true
end

Bo tamto to by?a tylko moja g?upota ;D

PS. Zauwa?, ?e jak kto? wbije 400000 z ringiem za?o?onym to i tak b?dzie mia? zwi?kszony exp :)
 
Odp: skrypt z exp ringiem REPypt na

@up:

dzia?a tylko, ?e daje 840 lvli za wiecej expa niz powinien dostac bez exp ringu ;D ten 400000 napisalem tylko po to zeby exp ring "nie konczyl sie" tzn zeby kazdy lvl mogl go uzyc
 
Odp: skrypt z exp ringiem REPypt na

Jak ma ka?dy lvl u?ywa? to mo?esz te warunki z lvlem usun?? ...
 
Odp: skrypt z exp ringiem REPypt na

no dobrze, a czemu jak zdejmiesz exp ring to dostajesz 840 lvli zamiast 3 bez ringa i 6 z ringiem ? ;D
 
Odp: skrypt z exp ringiem REPypt na

PHP:
local Inforate = getConfigInfo('rateExperience')
local lvlmin = 500 --lvl minimum by uzyc
local lvlmax = 400000 --lvl max by uzyc
local exprate = 1.6
local newrate = exprate*Inforate
local effect = math.random(27, 32)

function onEquip(cid, item, slot)
if getPlayerLevel(cid) >= lvlmin and getPlayerLevel(cid) <= lvlmax then
    doPlayerSetExperienceRate(cid, exprate)
    doPlayerSendTextMessage(cid,22,"Your Exp Stage is Bigger(rate: "..newrate..")!")
    doSendMagicEffect(getPlayerPosition(cid), effect)
else
    doPlayerSendTextMessage(cid, 22, "Minimum level: "..lvlmin..". Maximum level: "..lvlmax.." !")
end
return true
end

function onDeEquip(cid, item, slot)
if (getPlayerLevel(cid) >= lvlmin) then
    doPlayerSetExperienceRate(cid, 1)
    doPlayerSendTextMessage(cid, 22, "Your exp rate now is normal(rate: "..Inforate..")!")
    doSendMagicEffect(getPlayerPosition(cid), effect)
end
return true
end

Mo?e tak? Kombinuj :)
 
Odp: skrypt z exp ringiem REPypt na

@up:

wszystko dziala, dzieki, reput ;D
 
Status
Zamknięty.
Back
Do góry