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

[Help me!] Searing Fire

Trixon

New Member
Joined
Nov 9, 2008
Messages
39
Reaction score
0
Code:
local vocs = 4, 8, 12
local words = "Sweet I aint dead!"
local health = -10000
local mana = -10000

function onStepIn(cid, item, position, fromPosition)
	if getPlayerVocation(cid) == vocs then
		doCreatureSay(cid, words, 3)
	else
		doCreatureAddHealth(cid, health)
		doPlayerAddMana(cid, mana)
	end
end

I've saved this in movements under "poi_knight_fire.lua"


I've added the following to movements.xml
Code:
	<movement event="StepIn" uniqueid="3505" script="poi_knight_fire.lua"/>

I've tested this on my server but nothing happens when walking over the searing fire with uid 3505.

Can anyone see where I'm going wrong? thanks
 
I've tested the new codes, however when I go over the right path i.e Knight on knight path he yells and says "sweet i aint dead" like he's supposed to, but when i go over the wrong path nothing happens.

Code:
[09/12/2008 10:47:43] Lua Script Error: [MoveEvents Interface] 
[09/12/2008 10:47:43] data/movements/scripts/poi_pally_fire.lua:onStepIn

[09/12/2008 10:47:43] data/movements/scripts/poi_pally_fire.lua:14: attempt to call global 'doPlayerAddHealth' (a nil value)
[09/12/2008 10:47:43] stack traceback:
[09/12/2008 10:47:43] 	data/movements/scripts/poi_pally_fire.lua:14: in function <data/movements/scripts/poi_pally_fire.lua:9>
 
Try removing the minus character where you add health (the version server you are using may not be compitable with negative values).
 
Code:
[09/12/2008 11:17:02] Lua Script Error: [MoveEvents Interface] 
[09/12/2008 11:17:02] data/movements/scripts/poi_pally_fire.lua:onStepIn

[09/12/2008 11:17:02] data/movements/scripts/poi_pally_fire.lua:14: attempt to call global 'doPlayerAddHealth' (a nil value)
[09/12/2008 11:17:02] stack traceback:
[09/12/2008 11:17:02] 	data/movements/scripts/poi_pally_fire.lua:14: in function <data/movements/scripts/poi_pally_fire.lua:9>

removed the - but still got the same error
 
Try this.
PHP:
local vocs = {4, 8, 12},
local words = "Sweet I aint dead!",
local health = 10000,
local mana = 10000

function onStepIn(cid, item, pos)
    if isInArray ( vocs , getPlayerVocation ( cid ) ) == TRUE then
        doCreatureSay ( cid , words , TALKTYPE_YELL )
    else
        doPlayerAddHealth ( cid , health)
        doPlayerAddMana ( cid , mana)
    end
end
 
[09/12/2008 11:23:49] Warning: [Event::loadScript] Can not load script. data/movements/scripts/poi_druid_fire.lua
[09/12/2008 11:23:49] data/movements/scripts/poi_druid_fire.lua:2: unexpected symbol near 'local'
 
Code:
[09/12/2008 12:01:58] Lua Script Error: [MoveEvents Interface] 
[09/12/2008 12:01:58] data/movements/scripts/poi_druid_fire.lua:onStepIn

[09/12/2008 12:01:58] data/movements/scripts/poi_druid_fire.lua:10: attempt to call global 'doPlayerAddHealth' (a nil value)
[09/12/2008 12:01:58] stack traceback:
[09/12/2008 12:01:58] 	data/movements/scripts/poi_druid_fire.lua:10: in function <data/movements/scripts/poi_druid_fire.lua:6>

same error again =/ i got nno effin clue whats goin wrong lol
 
Back
Top Bottom