Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Naruto - Tsukuyomi + Stun System


rafaeru

Rekomendowane odpowiedzi

Opublikowano

Tsukuyomi + Stun System

 

Opis: Fani Naruto pewnie wiedzą co to tsukuyomi, a dla tych co nie wiedzą jest to "hipnoza" osoby która zamyka się w swojej podświadomości i możemy robić z nią co chcemy. W naszym wariancie tibijskim będzie to działało tak, że wysyłamy siebie i naszego przeciwnika ( target ) na 15 sekund do osobnego "wymiaru" ( małego pokoju ) w którym cel stoi nieruchomo. Po powrocie wracamy w te same miejsca z których użyliśmy techniki.

 

W Anime:

XFETuFk.png

 

W Grze:

R6lwgcj.gif

 

Skrypt:

 

data/lib/050-function.lua

Dodajemy na górze:

 

 

 


function doStunPlayer(cid,time)
	setPlayerStorageValue(cid,12001,os.time()+time)
	return true
end 

 

 

 

data/creaturescripts/creaturescripts.xml

Dodajemy:

<event type="think" name="Tsukuyomi" event="script" value="tsukuyomi.lua"/>
<event type="think" name="Stun" event="script" value="stun.lua"/> 

data/creaturescripts/tsukuyomi.lua

Tworzymy plik tsukuyomi.lua

 

 

 


function onThink(cid, interval)
if getPlayerStorageValue(cid,11996) == os.time() and getPlayerStorageValue(cid,12000) == -1 then
setPlayerStorageValue(cid,12000,1)
posx = getPlayerStorageValue(cid,11997)
posy = getPlayerStorageValue(cid,11998)
posz = getPlayerStorageValue(cid,11999)
doTeleportThing(cid, {x=posx, y=posy, z=posz})
doSendMagicEffect({x=posx+2, y=posy+2, z=posz}, 112)
setPlayerStorageValue(cid,12000)
end
return true
end 

 

 

 

data/creaturescripts/stun.lua

Tworzymy plik stun.lua

 

 

 


function onThink(cid, interval)
	if getPlayerStorageValue(cid,12001) >= os.time() then
		doCreatureSetNoMove(cid,true)
		if exhaustion.get(cid,12005) == false then
			exhaustion.set(cid,12005,0.7)
			doSendMagicEffect(getCreaturePosition(cid),117)
		end
	else
		doCreatureSetNoMove(cid,false)
	end
return true
end 

 

 

 

data/creaturescripts/login.lua

Dodajemy

setPlayerStorageValue(cid,11996) -- reset tsukuyomi
setPlayerStorageValue(cid,12000) -- reset tsukuyomi
setPlayerStorageValue(cid,12001) -- reset stuna
registerCreatureEvent(cid, "Tsukuyomi")
registerCreatureEvent(cid, "Stun")

 

data/spells/spells.xml

<instant name="Tsukuyomi" words="tsukuyomi" lvl="200" manapercent="90" prem="0" needtarget="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="tsukiyomi.lua"></instant> 

data/spells/scripts/tsukuyomi.lua

 

 

 


local conditionOutfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(conditionOutfit, CONDITION_PARAM_TICKS, 14000)
addOutfitCondition(conditionOutfit, {lookType = 118, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0})

local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, 27)
function naruto(cid, level, maglevel) 
   local min = -(level * 1.5+ maglevel * 5)
   local max = -(level * 1.5+ maglevel * 5.5)
   return min, max 
end
setCombatCallback(distanceCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "naruto")

local function tsukiyomi(cid)
target = getCreatureTarget(cid)
if getPlayerStorageValue(cid,11996) <= os.time() then
if isPlayer(target) then
fromPosition = getCreaturePosition(cid)
fromPositionE = getCreaturePosition(target)
for i = 17000, 17004 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
exhaustion.set(cid,61170,60)
doSendAnimatedText(getCreaturePosition(cid),"+GENJUTSU+",0)

doAddCondition(target, conditionOutfit)

doSendMagicEffect({ x = getCreaturePosition(target).x, y = getCreaturePosition(target).y-1,  z = getCreaturePosition(target).z }, 114)
doSendMagicEffect({ x = getCreaturePosition(target).x + 2, y = getCreaturePosition(target).y-1,  z = getCreaturePosition(target).z }, 113)

doStunPlayer(target,15)

setPlayerStorageValue(cid,11996,os.time()+15)
setPlayerStorageValue(target,11996,os.time()+15)

setPlayerStorageValue(cid,11997,fromPosition.x)
setPlayerStorageValue(cid,11998,fromPosition.y)
setPlayerStorageValue(cid,11999,fromPosition.z)

setPlayerStorageValue(target,11997,fromPositionE.x)
setPlayerStorageValue(target,11998,fromPositionE.y)
setPlayerStorageValue(target,11999,fromPositionE.z)

doTeleportThing(cid, {x=pos.x, y=pos.y+2, z=pos.z})
doTeleportThing(target, pos)

doSendMagicEffect({ x = getCreaturePosition(cid).x + 2, y = getCreaturePosition(cid).y+2,  z = getCreaturePosition(cid).z }, 112)
return true
end
end
doTeleportThing(cid, fromPosition, true)
doTeleportThing(target, fromPositionE, true)
doCreatureSay(cid, 'All tsukiyomi slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, 2)
doSendMagicEffect(fromPositionE, 2)
end
end
end

function onCastSpell(cid, var)
if exhaustion.get(cid, 61170) == false then
	tsukiyomi(cid)
	doCombat(cid, distanceCombat, var)
	return true
else
	doPlayerSendCancel(cid,"Tsukiyomi: [".. exhaustion.get(cid, 61170) .. "] sec")
end
end 

 

 

 

Jak skonfigurować ?

Tworzymy roomy do zamknięcia w tsukuyomi i na środek dajemy uniqueID ( 17000, 17001, 17002, 17003, 17004 ) Możemy oczywiście dodać ich więcej. 

for i = 17000, 17004 do

Efekty musicie pozmieniać sobie pod siebie, tak samo jak outfit gracza gdy jest zamykany w tsukuyomi.

 

Co do stun systemu to używacie go poprzez wywołanie tej funkcji

doStunPlayer(cid,time)
  • 4 miesiące temu...

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...