What's new

Spells Sharingan

Status
Not open for further replies.

Rarzillo De Bonzo

Senior User
Joined
Apr 10, 2009
Messages
726
Reaction score
27
Witam, jako ,?e mam dobry humor to wrzucam tutaj skrypt z mojego serwera naruto. Ten czar mo?esz wy??cza? i w??cza? itd.

Pierw tworzymy w spells/scripts/sharingan.lua za? nast?pnie wklejamy do niego

Code:
local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_EFFECT, 55) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

local condition = createConditionObject(CONDITION_ATTRIBUTES) 
setConditionParam(condition, CONDITION_PARAM_TICKS, 100000) 
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 330) 
setCombatCondition(combat, condition)


function onCastSpell(cid, var) 
if getPlayerStorageValue(cid, 1000) == 0 then
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 1000, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jutsu On")
else
doRemoveCondition(cid, CONDITION_PARAM_SKILL_MELEEPERCENT)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jutsu Off")
setPlayerStorageValue(cid, 1000, 0)
end
end

Za? spos?b zdobycia storage mo?ecie zrobi? sami. Czy dostajesz je przy logowaniu ,czy od npc, zale?y od cb ;d.
Teraz w spells/spells.xml wpisujemy co nam ?ywnie si? podoba od nazwy po numer profesji
np. u mnie
Code:
<instant name="Sharingan" words="sharingan" lvl="1" mana="5" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/sharingan.lua">
		<vocation id="1"/>

Je?eli kto? chce aby ta technika "z?era?a" co okre?lony czas mane/chakre to musi pokombinowa? ;d.

@down
Zwi?ksza nam dmg z ?apy 3,3razy? Oczywi?cie jak kto woli ;d.
 

Infelicity

Why bother...
Joined
Dec 30, 2011
Messages
1,091
Reaction score
59
Odp: Sharingan

A co ten sharingan daje?
bo nie widze nigdzie opisu dzialania.
Sprawia to ze postac mowi sharingan i koniec?
 

Crow1920

Advanced User
Joined
Jun 19, 2012
Messages
391
Reaction score
24
Odp: Sharingan

Dobry skrypcik , dopisac jedynie trzeba zabieranie many i jest dobry : ) Repucik, bo da?es cos od siebie.
 

Rarzillo De Bonzo

Senior User
Joined
Apr 10, 2009
Messages
726
Reaction score
27
Odp: Sharingan

Wystarczy w creaturescript doda? nowy plik
creaturescript/scripts/drain.lua

Code:
local config = 
{
storage = 2000,
timee = 2,
hp1 = -1
}
function onThink(cid, interval) 
if getPlayerStorageValue(cid, 1000) == 1 then
        doPlayerAddMana(cid,config.hp1) 
        exhaustion.set(cid,config.storage,config.timee) 
		setPlayerStorageValue(cid, 1000, 2)
elseif getPlayerStorageValue(cid, 1000) == 2 then
        exhaustion.set(cid,2000,1) 
		setPlayerStorageValue(cid, 1000, 1)
    end
return true
end

W login.lua doda?:

Code:
registerCreatureEvent(cid, "drain")
Za? w Creaturescript.xml
Code:
	<event type="think" name="drain" event="script" value="drain.lua" />
 
Last edited:

margoh

Active User
Joined
Apr 10, 2008
Messages
59
Reaction score
2
Odp: Sharingan

Ten event drain dzia?a, tylko zastanawia mnie jedno, jak ustawi?, by nie wy?wietla?o ile zabiera? Bo pokazuje jakby?my dostawali DMG oraz robi nam BATTLE ;/
 

margoh

Active User
Joined
Apr 10, 2008
Messages
59
Reaction score
2
Odp: Sharingan

Mi nie z?era, bo lekko przerobi?em to. A m?g?by? napisa? co doda?, do kodu spellu, by automatycznie go wy??cza?o, je?eli many poni?ej X?
 
Last edited:

Rarzillo De Bonzo

Senior User
Joined
Apr 10, 2009
Messages
726
Reaction score
27
Odp: Sharingan

@up
Czy m?g?by? udost?pni? ?w skrypt?

To powinno dzia?a?, akurat to jest na hp je?eli kto? chce zmieni? aby mane to funkcje tylko zmieni? trzeba, no i jezeli ktos chce to w 1 skrypcie to usun?? function onThink(cid, interval) i zamiast if da? elseif i wklei? pod skrypt, no i oczywi?cie doda? end na ko?cu.

function onThink(cid, interval)
if getCreatureHealth(cid) > getCreatureMaxHealth(cid) * 0.01 and getPlayerStorageValue(cid, 1000, 1) then
doRemoveCondition(cid, CONDITION_PARAM_SKILL_MELEEPERCENT)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jutsu Off")
setPlayerStorageValue(cid, 1000, 0)
doSendMagicEffect(getPlayerPosition(cid),55)
end
return true
end
 
Last edited:

margoh

Active User
Joined
Apr 10, 2008
Messages
59
Reaction score
2
Odp: Sharingan

Ja zrobi?em to na zasadzie zmiany vocation, by nie zabiera?o many/hp.

PHP:
function onThink(cid, interval)
        if getPlayerVocation(cid) == 5 and exhaustion.get(cid, config.storage) == false then
        doPlayerAddMana(cid,config.mp4)
        exhaustion.set(cid,config.storage,config.timee)
end
return true
end
 

Rarzillo De Bonzo

Senior User
Joined
Apr 10, 2009
Messages
726
Reaction score
27
Odp: Sharingan

Zawarto?? kodu z z?eraniem many edytowana i nie ma ju? poprzedniego b??du z tym,?e z?era zar?wno przy off jak i on.
 
Last edited:
Status
Not open for further replies.
Top