What's new

Poty

jopeq

User
Joined
Feb 6, 2010
Messages
14
Reaction score
0
Jak mam zrobi? aby potiony na moim ots sql 8.54 si? nie ko?czy?y? Z g?ry thx :D
 

Interior

Active User
Joined
May 21, 2010
Messages
127
Reaction score
23
Odp: Poty

W potions.lua usu? wszystkie ?w linijki:
doTransformItem(item.uid, 7488)
Lub usu? ca?? zawarto?? potions.lua i wklej to:

Code:
local ultimateHealthPot = 8473
local greatHealthPot = 7591
local greatManaPot = 7590
local greatSpiritPot = 8472
local strongHealthPot = 7588
local strongManaPot = 7589
local healthPot = 7618
local royalspiritpotion = 7253
local ultrahealthpot = 7734
local masterminadmana = 7488
local manaPot = 7620
local smallHealthPot = 8610
local antidotePot = 8378
local greatEmptyPot = 7635
local strongEmptyPot = 7634
local emptyPot = 7636
local antidote = createCombatObject()
setCombatParam(antidote, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(antidote, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(antidote, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(antidote, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(antidote, COMBAT_PARAM_DISPEL, CONDITION_POISON)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.uid ~= cid or itemEx.itemid ~= 1) then
return TRUE
end
if(getCreatureCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if(item.itemid == antidotePot) then
if(doCombat(cid, antidote, numberToVariant(cid)) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == smallHealthPot) then
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 50, 100, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == healthPot) then
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 90, 150, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == manaPot) then
if(doTargetCombatMana(0, cid, 70, 130, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == strongHealthPot) then
if(not(isKnight(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by paladins and knights of level 50 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == strongManaPot) then
if(not(isSorcerer(cid) or isDruid(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by sorcerers, druids and paladins of level 50 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatMana(0, cid, 110, 190, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == greatSpiritPot) then
if(not(isPaladin(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by paladins of level 80 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE) == LUA_ERROR or doTargetCombatMana(0, cid, 110, 190, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == greatHealthPot) then
if(not(isKnight(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by knights of level 80 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 500, 700, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == royalspiritpotion) then
if(not(isPaladin(cid)) or (getPlayerLevel(cid) < 150)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by paladins of level 150 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 600, CONST_ME_MAGIC_BLUE) == LUA_ERROR or doTargetCombatMana(0, cid, 150, 320, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == ultrahealthpot) then
if(not(isKnight(cid)) or (getPlayerLevel(cid) < 150)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by knights of level 150 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 800, 1300, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == masterminadmana) then
if(not(isSorcerer(cid) or isDruid(cid)) or (getPlayerLevel(cid) < 150)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by sorcerers and druids of level 150 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatMana(0, cid, 300, 600, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == greatManaPot) then
if(not(isSorcerer(cid) or isDruid(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by sorcerers and druids of level 80 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatMana(0, cid, 200, 300, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doRemoveCondition(cid, CONDITION_PARALYZE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
elseif(item.itemid == ultimateHealthPot) then
if(not(isKnight(cid)) or (getPlayerLevel(cid) < 130)) and not(getPlayerGroupId(cid) >= 2) then
doCreatureSay(cid, "This potion can only be consumed by knights of level 130 or higher.", TALKTYPE_ORANGE_1)
return TRUE
end
if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 800, 1000, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 8473)
end
return TRUE
end
Je?eli nie zadzia?a wklej sw?j potions.lua
 
Last edited:
Top