• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Skrypty do PvPe...

Martin93

~WebDesign
Joined
Nov 11, 2008
Messages
194
Reaction score
0
Location
Poland
Robię serwer enfo i potrzebuję 2 skryptów.

1. Gracz po śmierci odradza się w losowej świątyni.
2. Stan postaci po śmierci wraca do takiego stanu jak zaraz po założeniu jej.
 
Robię serwer enfo i potrzebuję 2 skryptów.

1. Gracz po śmierci odradza się w losowej świątyni.
2. Stan postaci po śmierci wraca do takiego stanu jak zaraz po założeniu jej.

1.
data/creaturescripts/scripts/sendToTemple.lua
PHP:
local towns = {1, 2, 4, 7, 12} --towns id
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if isPlayer(cid) == TRUE then
		local oldPosition = getCreaturePosition(cid)
		doTeleportThing(cid, getTownTemplePosition(towns[math.random(#towns)]))
		doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE)
		doSendMagicEffect(getCreaturePosition(cid), 37)
		doSendMagicEffect(oldPosition, 2)
		doRemoveConditions(cid)
		return FALSE
	end
	return TRUE
end

data/creaturescripts/creaturescripts.xml
PHP:
<event type="preparedeath" name="SendToTemple" script="sendToTemple.lua"/>

data/creaturescripts/scripts/login.lua
PHP:
registerCreatureEvent(cid, "SendToTemple")


2. Musisz zmienić w bazie danych (tabela players) save na 0
PHP:
UPDATE `players` SET `save` = '0';
 
Last edited:
oni robi ten silnik latami wiec nikt sie nie podejmie tego bo za duzo roboty jest.
 
Back
Top