• 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!

Player death tfs 0.4 rev.3884

Lolek

New Member
Joined
Sep 29, 2008
Messages
298
Reaction score
0
Yo
Mam problem mianowicie posiadam tfs 0.4 rev.3884 i jak ktos padnie to ani nie ma bledu w konsoli ani ciala w tibi :D

Z gory dziekuje jezeli moglby ktos pomoc ;p
 
Uzywasz jakiegos playerdeath.lua czy nie ?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>

	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

	<event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>


	<event type="death" name="PythiusDead" script="pythius_the_rotten.lua" />
	<event type="death" name="monster2" event="script" value="monster2.lua"/>
	<event type="death" name="inquisitionPortals" script="teleports_inquisition.lua"/>
       <event type="login" name="welcome" event="script" value="welcome.lua"/>
	<event type="advance" name="money" event="script" value="moneyAdvance.lua"/>
	<event type="advance" name="money100" event="script" value="moneyAdvance100.lua"/>
	<event type="advance" name="money150" event="script" value="moneyAdvance150.lua"/>
	<event type="advance" name="money200" event="script" value="moneyAdvance200.lua"/>




	<!-- Custom systems -->
	<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
	<event type="kill" name="PlayerKill" event="script" value="arenakill.lua"/>
	<event type="death" name="inquisitionPortals" event="script" value="inquisitionPortals.lua"/>
	<event type="death" name="bluelegs" event="script" value="bluelegs.lua"/>
	<event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/>
	<event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/> 
	<event type="death" name="Azerus" event="script" value="azerus.lua"/>  
	<event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
	<event type="kill" name="TopFrags" event="script" value="topfrags.lua"/>

</creaturescripts>

Moj creaturescripts.xml

Code:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "TopFrags")
	registerCreatureEvent(cid, "GuildMotd")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "Firstitems")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")	
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, 'advance')
registerCreatureEvent(cid, 'inquisitionPortals')
registerCreatureEvent(cid, 'bluelegs')
registerCreatureEvent(cid, 'money')
registerCreatureEvent(cid, 'money100')
registerCreatureEvent(cid, 'money150')
registerCreatureEvent(cid, 'money200')
registerCreatureEvent(cid, 'welcome')

    if (InitArenaScript ~= 0) then
    InitArenaScript = 1

        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end

    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end

    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
        setPlayerStorageValue(cid, 42355, 0)
    end
    setPlayerStorageValue(cid, 42350, 0)
    setPlayerStorageValue(cid, 42352, 0)
return true
end
Login.lua
 
w skryptach dla event type="death" posprawdzaj czy odnosza sie do konkretnych przypadkow i czy masz np:
if isPlayer(cid) then
return true
end
na poczatku skryptu, ktory reagowac ma tylko na moby
 
Code:
local config = {
teleportId = 1387,
bosse = "Pythius The Rotten"
}

local portal_in_pos = {x = 319, y = 841, z = 15}

function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "PythiusDead")
if config.bosse == getCreatureName(cid) then	
local position = portal_in_pos	
teleport = doCreateItem(config.teleportId,1,position)
doSetItemActionId(teleport, 9022)
end
return TRUE
end

Np w takim nie ma tego co poweidziales gdzie konkretnie dodac


Demonoak death

Code:
function onDeath(cid, corpse)
        if getPlayerStorageValue(cid, 36901) > 0 and getPlayerStorageValue(cid, 35700) < 1 then
                doPlayerSetStorageValue(cid, 36901, 0)
        end
        return true
end
inquisition

Code:
local config = {
	message = "You have 45 seconds for back use Death Monster For Teleport You.",
	timeToRemove = 60, -- seconds
	teleportId = 1387,
	bosses = {
		["Ushuriel"] = { x = 172, y = 559, z = 13 },
		["Annihilon"] = { x = 294, y = 681, z = 13},
		["Hellgorak"] = { x = 255, y = 467, z = 13},
		["Madareth"] = { x = 287, y = 365, z = 13},
		["Zugurosh"] = { x = 314,  y = 474, z = 13},
		["Latrivan"] = { x = 408, y = 413, z = 13},
                ["Tirecz"] = { x = 33061, y = 31029, z = 7 }
              
                
	}
}
	
local function removal(position)
	doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return TRUE
end


function onDeath(cid, corpse, killer)
	registerCreatureEvent(cid, "inquisitionPortals")
	local position = getCreaturePosition(cid)
	
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(cid) then
			teleport = doCreateTeleport(config.teleportId, pos, position)
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, position)
			doSendMagicEffect(position,65)
		end
	end
	return TRUE
end
 
a postać pada normalnie tylko nie ma ciała, czy stoi normalnie bez hp, ale tak jakby żyła?
 
Pada normalnie tepa ja do temple tam gdzie jest zajerestrowana zadnego bledu nie ma w konsoli tylko nie ma ciala deda ...
 
on tylko pod spodem opisal to co wstawil powyzej :p

-- edit.. no nie no.. skasowal ktos wczesniejszego posta :D

lolek.. jak by to powiedziec.. syfu troche masz i sie pogubiles.
Nie zapomnij napisac jak znajdziesz blad. Bo ja wlasnie probowalem napisac cos zeby cial nie bylo po dedzie i mi nie dziala.
a u ciebie odwrotnie.

od kiedy to masz?
dodales jakis skrypt nowy i przestalo dzialac?
zmieniles wersje otka?
compilacje sam robiles?
 
Last edited:
To wkoncu powie mi ktos jak to naprawic ;// ? lub nawet skrypt na to czy co kolwiek ^^
 
A potwory jak bijesz są ciała czy stoją one bez hp? czy też wg nie ma ciała?
 
Spróbuj wyłączać skrypty questów takich jak areny bo na to stawiał bym najbardziej chociaż wywalało by Ci błąd w consoli, że się kłócą ale spróbuj
 
A jaki masz CorpseId na ludzkie zwłoki ustawiony? Może w tym tkwi problem.

@down - Nie czytałem całego tematu, ale chciałem napisać - bo ten błąd jest błahy, ale często występuje.
 
Last edited:
Wątpnie żeby chodziło o CorpseId jeżeli mówi, że zamiast deda przenosi go do temple
 
ok.. kto robi za dr.house?
ja stawiam diagnose ze mu brakuje gdzies return true na koncu skryptu :mad:
 
wyłącz wszystkie creaturescripty i zobacz czy będzie ok działać, jak tak, to pokolei włączaj spowrotem i się zorientujesz, który skrypt powoduje błędy.
 
ok.. kto robi za dr.house?
ja stawiam diagnose ze mu brakuje gdzies return true na koncu skryptu :mad:
ja jednak bym się sprzeczał, gdyż postać mu pada, coś tu jest bardziej pogmatwane... :D
stawiam na coś, co usuwa ciało zaraz po śmierci, lub brak ciała ustawione...
a z tego co pamiętam tutaj nie było kiedyś supportu dla 0.4, a na dodatek bez donatora. oOoOOO
 
Back
Top