What's new

Manarune

pp108

User
Joined
Mar 16, 2010
Messages
31
Reaction score
0
M?g?by mi kto? napisa? skrypt na manarune i podpowiedzie? jak go wgra? pod 8.54-8.57??
 

Vvex

Banned
Joined
Jun 28, 2009
Messages
460
Reaction score
91
Odp: Manarune

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, xxxx)  ---ile ma dodawac many
return doCombat(cid, combat, var)
end
 

dominikms1

Senior User
Joined
Feb 6, 2010
Messages
696
Reaction score
66
Odp: Manarune

Gdy u?yjesz na sobie daje 100%, gdu u?yjesz na kim? daje mu 50% :)

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local kolor = 35 -- kolor napisu
mana = (math.random(getPlayerLevel(cid) * 4.0 + getPlayerMagLevel(cid) * 16.5,getPlayerLevel(cid) * 4.2 + getPlayerMagLevel(cid) * 18.0))
		doChangeTypeItem(item.uid, -1)
	if itemEx.uid == cid then
		doPlayerAddMana(cid, mana)
		doSendAnimatedText(getPlayerPosition(cid),mana,kolor)
	elseif isPlayer(itemEx.uid) == true then
		doPlayerAddMana(itemEx.uid, math.ceil(mana / 2))
		doSendAnimatedText(getPlayerPosition(itemEx.uid), math.ceil(mana / 2), kolor)
	end
	return true
end
 

pp108

User
Joined
Mar 16, 2010
Messages
31
Reaction score
0
Odp: Manarune

A gdzie je wgra???
(Jestem Troche Zielony w tych sprawach )
 

Bubin

Senior User
Joined
May 13, 2009
Messages
1,113
Reaction score
169
Age
26
Odp: Manarune

Musisz wej?? w data>action>script robisz plik o nazwie manarune.lua i wklejasz do niego:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
doPlayerAddMana(cid, xxxx) ---ile ma dodawac many
return doCombat(cid, combat, var)
end
nast?pnie wchodzisz w data>action>actions.xml otwierasz notatnikiem i wklejasz:
<action itemid="2270" script="manarune.lua" />
My?l?, ?e pomog?em.
 

pp108

User
Joined
Mar 16, 2010
Messages
31
Reaction score
0
Odp: Manarune

Nie dzia?a.
Wyskakuje b??d : [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/manarune.lua)
 

Bubin

Senior User
Joined
May 13, 2009
Messages
1,113
Reaction score
169
Age
26
Odp: Manarune

Nie dzia?a.
Wyskakuje b??d : [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/manarune.lua)
a wpisa?e? w xxx ile ma many dawa???
 
Last edited:

Bubin

Senior User
Joined
May 13, 2009
Messages
1,113
Reaction score
169
Age
26
Odp: Manarune

@up
To nie wiem co mo?e by? przyczyn?. Mo?liwe te?, ?e dopisa?e? z?? ko?c?wk?.
Pozdrawiam
 

andy1995

Senior User
Joined
Apr 12, 2009
Messages
602
Reaction score
100
Odp: Manarune

Yyyy.. Spelle w actions.xml? Poozdro xD
do spells.xml dodaj i uzupelnij
PHP:
<rune name="ManaRune" id="2270" allowfaruse="1" charges="1" lvl="24" maglv="4" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/manarune.lua"/>
i manarune.lua
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
doPlayerAddMana(cid, xxx) ---ile ma dodawac many
return doCombat(cid, combat, var)
end

@down
nic? xD
 
Last edited:
Top