What's new

[8.10] Problem z potami

Status
Not open for further replies.

immortal

Active User
Joined
Jul 29, 2008
Messages
79
Reaction score
5
Witam, mam ma?y problem, mam silnik Evo by Wyro i wszystkie potiony nie maj? exhausted, i nie wiem jak i gdzie to mo?na ustawi?.

Pilnie prosz? o pomoc. Z g?ry dzi?kuj?

Pozdrawiam
 

19kapec64

User
Joined
Aug 2, 2008
Messages
17
Reaction score
0
Odp: [8.10] Problem z potami

Tu masz poty wsztkie na ex :]

local greatHealthPot = 7591
local greatManaPot = 7590
local strongHealthPot = 7588
local strongManaPot = 7589
local healthPot = 7618
local manaPot = 7620
local greatEmptyPot = 7635
local strongEmptyPot = 7634
local emptyPot = 7636
local knightsandpaladins = {3, 4, 7, 8}
local druidsandsorcerers = {1, 2, 5, 6}
local druidspaladinssorcerers = {1, 2, 3, 5, 6, 7}
local knights = {4, 8}

function onUse(cid, item, frompos, item2, topos)


time = 1
local time_needed = getPlayerStorageValue(cid, 9550) + time
if(os.time() >= time_needed) then
setPlayerStorageValue(cid, 9550, os.time())


if(item.itemid == healthPot) then
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 80, 200, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doPlayerSay(cid, ' Aaaah... ', 16)
doTransformItem(item.uid, manapotions)
elseif(item.itemid == manaPot) then
if(doTargetCombatMana(0, cid, 80, 150, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doPlayerSay(cid, ' Aaaah... ', 16)
doTransformItem(item.uid, emptyPot)
elseif(item.itemid == strongHealthPot) then
if getPlayerLevel(cid) >= 50 and isInArray(knightsandpaladins, getPlayerVocation(cid)) == TRUE then
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 400, 800, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doPlayerSay(cid, ' Aaaah... ', 16)
doTransformItem(item.uid, strongEmptyPot)
else
doPlayerSay(cid, 'Tylko Paladyn i Rycerz moze pic ten napoj powyzej 50 lvl', 16)
end
elseif(item.itemid == strongManaPot) then
if getPlayerLevel(cid) >= 50 and isInArray(druidspaladinssorcerers, getPlayerVocation(cid)) == TRUE then
if(doTargetCombatMana(0, cid, 150, 250, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doPlayerSay(cid, ' Aaaah... ', 16)
doTransformItem(item.uid, strongEmptyPot)
else
doPlayerSay(cid, 'Tylko DruidzimPaladyni i Magowie moga pic ten napoj powyzej 50 Levela', 16)
end
elseif(item.itemid == greatHealthPot) then
if getPlayerLevel(cid) >= 80 and isInArray(knights, getPlayerVocation(cid)) == TRUE then
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 800, 1250, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doPlayerSay(cid, ' Aaaah... ', 16)
doTransformItem(item.uid, greatEmptyPot)
else
doPlayerSay(cid, 'Tylko Rycerz Mowe Pic Tego Napoju', 16)
end
elseif(item.itemid == greatManaPot) then
if getPlayerLevel(cid) >= 80 and isInArray(druidsandsorcerers, getPlayerVocation(cid)) == TRUE then
if(doTargetCombatMana(0, cid, 300, 450, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doPlayerSay(cid, ' Aaaah... ', 16)
doTransformItem(item.uid, greatEmptyPot)
else
doPlayerSay(cid, 'Tylko Druidzi i Magowie Moga Pic Ten Napoj', 16)
end
end

else
doPlayerSendCancel(cid, "Jestes Zmeczony!")
end

return TRUE
end
 
Status
Not open for further replies.
Top