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

Action How to add server save!

As I read the print function doesn't work with an GUI?
If it is like this, is there any other command like print :O?
 
You should use "debugPrint" if you are using GUI
 
Last edited:
Sorry for bumping such an old thread, but I warn everyone not to use it.
global.lua is parsed EVERYTIME any script is called - can you imagine how many saving threads does it make?...
 
Sorry for bumping such an old thread, but I warn everyone not to use it.
global.lua is parsed EVERYTIME any script is called - can you imagine how many saving threads does it make?...

If you don't understand the code then don't say a word ;<
 
Thank you for this script, i was wondering if this saves houses too? Because it only says "players saved"
 
@UP:Yes, it does.

The script is working and everything, but everytime it saves the server I get this error:
[30/06/2008 19:49:35] Lua Script Error: [Weapon Interface]
[30/06/2008 19:49:35] in a timer event called from:
[30/06/2008 19:49:35] data/weapons/scripts/earth arrow.lua

[30/06/2008 19:49:35] luaDebugPrint(). Server saved, 1 players online.

And, here's my earth_arrow.lua:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STONES)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTHARROW)

function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)
	local level = getPlayerLevel(cid)
	local attack = 25
	local skill = getPlayerSkill(cid, CONST_SKILL_DISTANCE)
	
	local min = -((attack/20*skill+attack+skill+level/10)/10*(attackStrength/10))/3
	local max = -(attack/20*skill+attack+skill+level/10)/10*(attackStrength/10)

	return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")

function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end


The next server save showed this:
[30/06/2008 19:54:55] Lua Script Error: [Npc interface]
[30/06/2008 19:54:55] in a timer event called from:
[30/06/2008 19:54:55] data/npc/scripts/Monk.lua

Also, what is the global storage for?...
I mean, if they are stored in the database now, they still are delted when you reset the server?
 
Last edited:
Back
Top