What's new

Co tu jest zle ??

Status
Not open for further replies.

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
function onUse(cid, item, frompos, item2, topos)

local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)

local exhausted_seconds = 1
local exhausted_storagevalue = 7480

local mana_minimum = 50000
local mana_maximum =50000

local mana_add = math.random(mana_minimum, mana_maximum)


if(item.type >= 1) then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
else
doSendMagicEffect(cid, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
else
doSendMagicEffect(cid, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(cid, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"I feel the best",1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
else
doSendMagicEffect(cid, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
end
end

return 1
end





Bo wywala mi blad w konsoli gdy ktos urzyje Fasolki !!!
 

Satellite

Active User
Joined
Aug 30, 2010
Messages
128
Reaction score
7
Odp: Co tu jest zle ??

Po 1, daj to w [code.]

Po 2 podaj jaki b??d wyskakuj? w consoli...

@edit

Nie wiem czy to to, ale

Code:
local mana_minimum = 50000
local mana_maximum =50000

nie mo?e by? takie same, minimum musi by? mniejsze od maximum
np

Code:
local mana_minimum = 48000
local mana_maximum =52000
 

Sokou

Advanced User
Joined
Jun 25, 2010
Messages
379
Reaction score
25
Odp: Co tu jest zle ??

tak jak pan wy?ej

podaj dok?adnie co wywala konsola

aha tak od siebie to popraw b??dy swoje napierw :) u?yje, a nie urzyje xDD
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
JEdnak nic nie dalo ;d
bl?d wywala taki
Code:
attempt to index a number value 
Lua Script Error: [Action Interface] 
data / actions /scripts /senzu.lua:onUse
@Down
To SErver Wodbo .. OMG >>>...
Notka moderatorska:
??cz?
 
Last edited by a moderator:

Szaki

Active User
Joined
Jul 25, 2010
Messages
104
Reaction score
7
Odp: Co tu jest zle ??

setPlayerStorageValue mo?e nie dzia?a? je?li to TFS 0.3.6, wi?c pozmieniaj na doPlayerSetStorageValue. A po za tym to ten b??d z konsoli nic mi nie m?wi :/
 

bialy509

Advanced User
Joined
May 24, 2009
Messages
242
Reaction score
7
Odp: Co tu jest zle ??

```````````````` refresh ``````````````~~
 
Status
Not open for further replies.
Top