What's new

[8.1] problem z manarune

Status
Not open for further replies.

czarli903

New User
Joined
Apr 9, 2008
Messages
1
Reaction score
0
Mam problem z manarun? na silniku evo.Mianowcie nie dziala exhausted na manarune a na wszyskie inne runy dziala. Wie ktos jak to zmienic?
 

kuba1418

Banned
Joined
Apr 12, 2008
Messages
178
Reaction score
17
ManaRUna

ManaRUna

Te? mam ManaRune na mim OTS pod 8.1 wienc podam ci muj Skrypt.
Robisz plik manarune.lua chyba ze masz to tylko edytujesz plika ma znajdowac sie w data\actions\scripts.
function onUse(cid, item, frompos, item2, topos)

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

-- Exhausted Settings --
local exhausted_seconds = 1 -- How many seconds manarune will be unavailible to use. --
local exhausted_storagevalue = 7000 -- Storage Value to store exhaust. It MUST be unused! --
-- Exhausted Settings END --

-- Mana Formula Settings --
-- You can use "level" and "mlevel" --
local mana_minimum = (level * 1) + (mlevel * 2) - 100
local mana_maximum = (level * 1) + (mlevel * 2)
-- Mana Formula Settings END --

local mana_add = math.random(500, 1000)

-- We check the charges. --
if(item.type > 1) then
-- Exhausted check. --
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
-- Entity is player? --
if(isPlayer(item2.uid) == 1) then
doSendMagicEffect(frompos, CONST_ME_MAGIC_RED)
doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(item2.uid, mana_add)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doChangeTypeItem(item.uid, item.type - 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You can use this rune only on players.")
end
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(item2.uid) == 1) then
doSendMagicEffect(frompos, CONST_ME_MAGIC_RED)
doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
doPlayerAddMana(item2.uid, mana_add)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You can use this rune only on players.")
end
end
end

return 1
end
Potem dodajesz Linijke w data\actions\actions.xml
<action itemid="2270" script="manarune.lua" allowfaruse="1"/>
I runa powin?a dzia?a x100 w runie i bendzie sie konczy? jesli chcesz zrobi? zeby sie nie konczy?a to zamiast w acions prubuj zrobi? tosamo tylko w spells
PS. Pomog?em daj rebutka :D
 
Last edited:

Evaric

New User
Joined
Apr 23, 2008
Messages
7
Reaction score
0
A gdzie mam t? linijke wklei? to jakieg odzia?u?? np. Others, Constructions Kitd itp. gdzie ??? HELP
 

kuba1418

Banned
Joined
Apr 12, 2008
Messages
178
Reaction score
17
Linjaka

Linjaka

masz jom wklei? do action.xml
Za?ocz wyszukiwarke i wpisz actions powin?a znales? folder i plik w tym pliku wlkejasz linijke
 

zmoolek

New User
Joined
Apr 6, 2008
Messages
1
Reaction score
0
masz jom wklei? do action.xml
Za?ocz wyszukiwarke i wpisz actions powin?a znales? folder i plik w tym pliku wlkejasz linijke
te? tego nie czaje mo?na ra?niej?? bo te? chce zrobi? ?eby M-rune dzia?a?o tylko nie wiem w?a?nie jak doda? to w notatnik actions czy tools itp... to nie wiem gdzie wpisa? :/
 

kuba1418

Banned
Joined
Apr 12, 2008
Messages
178
Reaction score
17
Wchodzisz w folder data\actions i masz tam plik o nazwie actions.xml otwierasz go Notatnikiem i wklejasz tom linijke ;p jak nadal nie rozumiesz to daj GG to postaram sie jakos wyjasnic ;p
 

kuba1418

Banned
Joined
Apr 12, 2008
Messages
178
Reaction score
17
W?a?nie tak to bez znaczenia gdzie wkleisz bo itak bendzie dzia??? :cool:
 

Xenix

New User
Joined
May 6, 2008
Messages
9
Reaction score
0
wchodzimy w data/actions/script i robimy plik o nazwie manarune

pozniej wklejamy do niego to ;)

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

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

-- Exhausted Settings --
local exhausted_seconds = 1 -- How many seconds manarune will be unavailible to use. --
local exhausted_storagevalue = 7000 -- Storage Value to store exhaust. It MUST be unused! --
-- Exhausted Settings END --

-- Mana Formula Settings --
-- You can use "level" and "mlevel" --
local mana_minimum = (level * 3) + (mlevel * 5) - 50
local mana_maximum = (level * 3) + (mlevel * 5)
-- Mana Formula Settings END --

local mana_add = math.random(mana_minimum, mana_maximum)

-- We check the charges. --
if(item.type > 1) then
-- Exhausted check. --
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
-- Entity is player? --
if(isPlayer(item2.uid) == 1) then
doSendMagicEffect(topos,28)
doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
doPlayerSay(cid,"Mana UUPP!!!",1)
doPlayerAddMana(item2.uid, mana_add)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doChangeTypeItem(item.uid, item.type - 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You can use this rune only on players.")
end
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(item2.uid) == 1) then
doSendMagicEffect(topos,28)
doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
doPlayerSay(cid,"Mana UUPP!!!",1)
doPlayerAddMana(item2.uid, mana_add)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You can use this rune only on players.")
end
end
end

return 1
end
--------------------------------------------------------------------------

Pozniej w data/actions wopisujemy taka linijk?

<action itemid="2270" script="manarune.lua" />


Scrypt dziala pod wszystkie tibie ;)(otsy)


Agdy chcesz zmienic zeby dwala wiecej to wystarczy dodac lvl i m lvl w manarunie

Np .

Odnajdujemy linijke

local mana_minimum = (level * 3) + (mlevel * 5) - 50
local mana_maximum = (level * 3) + (mlevel * 5)


i zmieniamy na przyk?ad
local mana_minimum = (level * 5) + (mlevel * 5) - 50
local mana_maximum = (level * 5) + (mlevel * 5)

Scrypt sam robilem Pozdrawiam Xenix
 
Last edited:
Status
Not open for further replies.
Top