What's new

Amulet of Loss nie spada po ?mierci HELP!

Nazzgul

Active User
Joined
May 20, 2009
Messages
90
Reaction score
9
Witam, u?ywam silnika TFS 0.3.4~. Aol na moim serwerze po ?mierci nie spada;(... mo?na pada? ile si? chce a aol nadal jest na swoim miejscu. Czy wie kto? w kt?rym miejscu to zmieni??
 

Tollak

Advanced User
Joined
Jan 21, 2009
Messages
219
Reaction score
17
Odp: Amulet of Loss nie spada po ?mierci HELP!

Witam, u?ywam silnika TFS 0.3.4~. Aol na moim serwerze po ?mierci nie spada... mo?na pada? ile si? chce a aol nadal jest na swoim miejscu. Czy wie kto? w kt?rym miejscu to zmieni??
Podaj mi zawarto?? tego aola to ci zaraz szybciutko pomog?:)
 

Nazzgul

Active User
Joined
May 20, 2009
Messages
90
Reaction score
9
Odp: Amulet of Loss nie spada po ?mierci HELP!

Podaj mi zawarto?? tego aola to ci zaraz szybciutko pomog?:)
Je?li chodzi o skrypt to nigdzie go nie ma(w 2 innych silnikach r?wnie? nie by?o a dzia?a? normalnie). Jedyne co jest to linijki w movements.xml:
Code:
	<movevent type="Equip" itemid="2173" slot="necklace" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2173" slot="necklace" event="function" value="onDeEquipItem"/>
oraz w items.xml:
Code:
	<item id="2173" article="an" name="amulet of loss">
		<attribute key="weight" value="420"/>
		<attribute key="slotType" value="necklace"/>
		<attribute key="charges" value="1"/>
		<attribute key="preventDrop" value="1"/>
	</item>
 

margonem1211

Active User
Joined
Nov 20, 2008
Messages
66
Reaction score
1
Odp: Amulet of Loss nie spada po ?mierci HELP!

jakby to by?o pod tibie 7.6 - 8.11 to bym pom?g?, nie znam si? za dobrze na 8.42 ale je?li jest tam data/actions/scripts/ no to we? znajdz tam aol i z innego silnika skopiuj (z silnika na kt?rym dzia?a) sory za spam je?eli nie pomog?em i nie ma za co je?li dzi?kujesz za pomoc
 

Nazzgul

Active User
Joined
May 20, 2009
Messages
90
Reaction score
9
Odp: Amulet of Loss nie spada po ?mierci HELP!

jakby to by?o pod tibie 7.6 - 8.11 to bym pom?g?, nie znam si? za dobrze na 8.42 ale je?li jest tam data/actions/scripts/ no to we? znajdz tam aol i z innego silnika skopiuj (z silnika na kt?rym dzia?a) sory za spam je?eli nie pomog?em i nie ma za co je?li dzi?kujesz za pomoc
Napisa?em na samej g?rze, ?e nie mam skryptu na aol w silniku...
 

sputerkarol

Advanced User
Joined
Oct 25, 2008
Messages
479
Reaction score
29
Odp: Amulet of Loss nie spada po ?mierci HELP!

Ja u siebie mam takie co? :
</item>
<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
</item>
Mo?e spr?buj tak.
 

sputerkarol

Advanced User
Joined
Oct 25, 2008
Messages
479
Reaction score
29
Odp: Amulet of Loss nie spada po ?mierci HELP!

Mo?e masz pvp enfo na otsie? te? tak mia?em jak da?em enfo.
 

Nazzgul

Active User
Joined
May 20, 2009
Messages
90
Reaction score
9
Odp: Amulet of Loss nie spada po ?mierci HELP!

Mo?e masz pvp enfo na otsie? te? tak mia?em jak da?em enfo.
NIE! Nie nabijaj post?w... na enfo aol nie dzia?a(spada backpack itp po dedzie) U MNIE AOL DZIA?A ALE SI? NIE KO?CZY!:curse:
 

Sinres

Active User
Joined
Apr 15, 2008
Messages
130
Reaction score
6
Odp: Amulet of Loss nie spada po ?mierci HELP!

To powinno pom?c :)
Code:
local config = {
	deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')),
	sqlType = getConfigInfo('sqlType'),
	maxDeathRecords = getConfigInfo('maxDeathRecords')
}
config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
	if(config.deathListEnabled ~= TRUE) then
		return
	end
	local hitKillerName = "field item"
	local damageKillerName = ""
	if(lastHitKiller ~= FALSE) then
		if(isPlayer(lastHitKiller) == TRUE) then
			hitKillerName = getPlayerGUID(lastHitKiller)
		else
			hitKillerName = getCreatureName(lastHitKiller)
		end
		if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
			if(isPlayer(mostDamageKiller) == TRUE) then
				damageKillerName = getPlayerGUID(mostDamageKiller)
			else
				damageKillerName = getCreatureName(mostDamageKiller)
			end
		end
	end
	db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
	local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
	if(rows:getID() ~= -1) then
		local amount = rows:getRows(true) - config.maxDeathRecords
		if(amount > 0) then
			if(config.sqlType == DATABASE_ENGINE_SQLITE) then
				for i = 1, amount do
					db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
				end
			else
				db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
			end
		end
	end
end

Edit:
To jednak nie pomaga ale znalaz?em temat wi?c pomoge :)
Trzeba doda? w creaturescripts.xml
Code:
<event type="death" name="Aol" event="script" value="aol.lua"/>
I w data/creaturescripts/scripts/
utworzy? aol.lua
w tre?ci:
Code:
function onDeath(cid, corpse, killer)
	local aol = getPlayerSlotItem(cid, 2)
	if (aol.itemid == 2173) then
		doRemoveItem(aol.uid, 1)
	end
end
I w data/creaturescripts/scripts/login.lua
doda?:
Code:
registerCreatureEvent(cid, "Aol")
Mam nadzieje ?e pomog?em.
Pozdrawiam :)
 
Last edited:

Nazzgul

Active User
Joined
May 20, 2009
Messages
90
Reaction score
9
Odp: Amulet of Loss nie spada po ?mierci HELP!

@up
DZI?KI. Skrypt dzia?a :) Wielki reput dla ciebie ;)
PROBLEM ROZWI?ZANY, TEMAT DO ZAMKNI?CIA
 
Top