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

TheForgottenServer (8.0) Please read this..

torjaly

New Member
Joined
Oct 16, 2007
Messages
25
Reaction score
0
Hiya!



Welcome to this thread.

I'll keep it short and simple.

Problem: (I have the newest TheForgottenServer (Deadbug - 8.0 version.) I wanted to make it pvp enforced. I did it so. Now players lose items. Even they wear aols or get blessed.
I tried to search in google. I heard that it is disable ( Like in real tibia ). Now I tried to find scripts everything. I couldn't find fix the problem. I just want that players doesn't lose items.
Please help me. How can I fix it? Is there any scripts for not losing items? Or anything that can help me? Cause this problem makes me sick. I would appreciatie your help, And when I do pvp with exp. Players get soon rs. I also figured that in config.lua Still no help. Is there anothers server that is less bugger? Or is this one this best? I like this one. But I want to fix this.

Thank you for reading this. Please help me..
 
make a onPrepareDeath script in creatureevents, im not 100% sure on how it is but i think its something like
LUA:
setPlayerLossItems(false)

im pretty sure its not that but look in Lua_functions in doc for something like that :P

add me on msn: [email protected] and i can help you soon
 
I added you man.

If it works. I would you as my scripter If you like..


(Edited)

[18/12/2011 19:09:56] Lua Script Error: [CreatureScript Interface]
[18/12/2011 19:09:56] data/creaturescripts/scripts/playerdeath.lua:onDeath

[18/12/2011 19:09:56] data/creaturescripts/scripts/playerdeath.lua:2: attempt to call global 'setPlayerLossItems' (a nil value)
 
LUA:
function onPrepareDeath(im not sure on whats in here)
doSetCreatureDropLoot(cid, false)
return true
end

PM me ur msn, i didnt get ur invitation
 
function onDeath(cid, corpse, killer)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are dead.")
dofile("./config.lua")
if deathListEnabled == "yes" then
if sqlType == "mysql" then
env = assert(luasql.mysql())
con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
else -- sqlite
env = assert(luasql.sqlite3())
con = assert(env:connect(sqliteDatabase))
end
local byPlayer = FALSE
local killerName = escapeString(getCreatureName(killer))
if isPlayer(killer) == TRUE then
byPlayer = TRUE
elseif isPlayer(killer) ~= FALSE then
killerName = "field item"
end
query = assert(con:execute("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`) VALUES (" .. getPlayerGUIDByName(getCreatureName(cid)) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", '" .. killerName .. "', " .. byPlayer .. ");"))
local cursor = assert(con:execute("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUIDByName(getCreatureName(cid)) .. ";"))
local deathRecords = cursor:numrows()
while deathRecords > maxDeathRecords do
delete = assert(con:execute("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUIDByName(getCreatureName(cid)) .. " ORDER BY `time` LIMIT 1;"))
deathRecords = deathRecords - 1
end
con:close()
env:close()
end
end

my whole playerdeath scripts..

Sorry If I'm spamming you otland!
 
No, not onDeath, onPrepareDeath.. create a new lua with this:

LUA:
function onPrepareDeath(cid, deathList)
		doCreatureSetDropLoot(cid, false)
	return true
end
should problably work xD
 
I get now this error..

[19/12/2011 18:50:28] Error: [CreatureEvent::configureEvent] No valid type for creature event.deathlist
 
Add this in creaurescripts.
XML:
<event type="preparedeath" name="PrepareOnDeath" script="deathlist.lua" />
then it should work.

[20/12/2011 16:21:58] Lua Script Error: [CreatureScript Interface]
[20/12/2011 16:21:58] data/creaturescripts/scripts/deathlist.lua:onPrepareDeath

[20/12/2011 16:21:58] data/creaturescripts/scripts/deathlist.lua:2: attempt to call global 'doCreatureSetDropLoot' (a nil value)

Now I get this bug....


Edited : This is mine script

function onPrepareDeath(cid, deathList)
doCreatureSetDropLoot(cid, false)
return true
end
 
Back
Top