Witam. Jest mo?liwo?? na?o?enia exhaustu na d?wignie powiedzmy 5 sekund na ten skrypt ? TFS 0.4
[LUA]local uid =
{
[1253] = {id = 7620, count = 1, cost = 5000}, -- mana potion
[1254] = {id = 7589, count = 1, cost = 8000}, -- strong mana potion
[1255] = {id = 7590, count = 1, cost = 12000}, -- great mana potion
[1248] = {id = 7618, count = 1, cost = 4500}, -- health potion
[1249] = {id = 7588, count = 1, cost = 10000}, -- strong health potion
[1250] = {id = 7591, count = 1, cost = 19000}, -- great health potion
[1251] = {id = 8473, count = 1, cost = 31000}, -- ultimate health potion
[1252] = {id = 8472, count = 1, cost = 19000}, -- great spirit potion
[1256] = {id = 2268, count = 1, cost = 9500}, -- sudden death rune
[1257] = {id = 2293, count = 1, cost = 35000}, -- magic wall rune
[1258] = {id = 2278, count = 1, cost = 20000}, -- paralyze rune
[1259] = {id = 2269, count = 1, cost = 20000}, -- grav
[1260] = {id = 2273, count = 1, cost = 20000}, -- uh
[1261] = {id = 2305, count = 1, cost = 20000}, -- fire bomb
[1262] = {id = 2304, count = 1, cost = 20000}, -- gfb
[1263] = {id = 2274, count = 1, cost = 20000}, -- ava
-- [uid] = {id = id_rune/potion, count = count, cost = cost (gp) --
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = uid[item.uid]
if t then
if (getPlayerFreeCap(cid) >= getItemWeightById(t.id, t.count)) then
if doPlayerRemoveMoney(cid, t.cost) then
doPlayerAddItem(cid, t.id, t.count)
doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Purchased! "..t.count.." "..getItemInfo(t.id).name.."s for "..t.cost.." gold coins")
else
doPlayerSendCancel(cid, "You need money")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You need cap")
doSendMagicEffect(getCreaturePosition(cid), 3)
end
if item.itemid == 1945 then
doTransformItem(item.uid, item.itemid+1)
else
doTransformItem(item.uid, item.itemid-1)
end
end
return true
end[/LUA]
Je?eli jest to mo?liwe m?g?by kto? zmieni? ten skrypt i wyja?ni? w miar? mo?liwo?ci jak na?o?y? ten exhaust w kodzie ? wtedy stara?bym si? sam nak?ada? na inne skrypty
z g?ry dzi?ki
[LUA]local uid =
{
[1253] = {id = 7620, count = 1, cost = 5000}, -- mana potion
[1254] = {id = 7589, count = 1, cost = 8000}, -- strong mana potion
[1255] = {id = 7590, count = 1, cost = 12000}, -- great mana potion
[1248] = {id = 7618, count = 1, cost = 4500}, -- health potion
[1249] = {id = 7588, count = 1, cost = 10000}, -- strong health potion
[1250] = {id = 7591, count = 1, cost = 19000}, -- great health potion
[1251] = {id = 8473, count = 1, cost = 31000}, -- ultimate health potion
[1252] = {id = 8472, count = 1, cost = 19000}, -- great spirit potion
[1256] = {id = 2268, count = 1, cost = 9500}, -- sudden death rune
[1257] = {id = 2293, count = 1, cost = 35000}, -- magic wall rune
[1258] = {id = 2278, count = 1, cost = 20000}, -- paralyze rune
[1259] = {id = 2269, count = 1, cost = 20000}, -- grav
[1260] = {id = 2273, count = 1, cost = 20000}, -- uh
[1261] = {id = 2305, count = 1, cost = 20000}, -- fire bomb
[1262] = {id = 2304, count = 1, cost = 20000}, -- gfb
[1263] = {id = 2274, count = 1, cost = 20000}, -- ava
-- [uid] = {id = id_rune/potion, count = count, cost = cost (gp) --
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = uid[item.uid]
if t then
if (getPlayerFreeCap(cid) >= getItemWeightById(t.id, t.count)) then
if doPlayerRemoveMoney(cid, t.cost) then
doPlayerAddItem(cid, t.id, t.count)
doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Purchased! "..t.count.." "..getItemInfo(t.id).name.."s for "..t.cost.." gold coins")
else
doPlayerSendCancel(cid, "You need money")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You need cap")
doSendMagicEffect(getCreaturePosition(cid), 3)
end
if item.itemid == 1945 then
doTransformItem(item.uid, item.itemid+1)
else
doTransformItem(item.uid, item.itemid-1)
end
end
return true
end[/LUA]
Je?eli jest to mo?liwe m?g?by kto? zmieni? ten skrypt i wyja?ni? w miar? mo?liwo?ci jak na?o?y? ten exhaust w kodzie ? wtedy stara?bym si? sam nak?ada? na inne skrypty
z g?ry dzi?ki