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

Searing fire script

godoyxd

Noob
Joined
Mar 6, 2008
Messages
196
Reaction score
39
Location
Brazil
Hello I'm doing a poi like in rl map and i need script to the searing fire works only with one vocation.
Here I have the id i will use for eache vocation.
7469 knight
7468 druids
7467 paladin
7466 sorcerer

please someone help me?
REP++
 
please help
i have no idea how i can do it..:(

i am not going to write the script for you, but make movement scripts with actionids or use just itemids, check the vocation when the player steps on the tile, if its the right vocation only do 300 damage, if its not, do 300 damage + for the rest of the flames so they'll die, like isDruid(cid), isSorcerer(cid), isPaladin(cid), isKnight(cid), and u can use the fromposition and toPositions in the onStepin / onStepout functions
 
i am not going to write the script for you, but make movement scripts with actionids or use just itemids, check the vocation when the player steps on the tile, if its the right vocation only do 300 damage, if its not, do 300 damage + for the rest of the flames so they'll die, like isDruid(cid), isSorcerer(cid), isPaladin(cid), isKnight(cid), and u can use the fromposition and toPositions in the onStepin / onStepout functions

thx you give me an ideia i will try to do i post here if i have erros and you cant help me with the erros?
 
i found a scrip but it doesn't works
here:
PHP:
function onStepIn(cid, item, pos)
---Action by Jovial---

--Config--
voc = 4    --0 = no vocation, 1 = sorcerer, 2 = druida, 3 = paladin, 4 = knight--
voc2 = 1   --5 = master sorcerer, 6 = elder druid, 7 = royal paladin, 8 = elite knight--
voc3 = 3 
voc5 = 5 
voc7 = 7 
voc8 = 8 

dano = 19999 --quanto ira tirar de vida
danoo = 19999 --quanto ira tirar de vida
cor = 180 --cor da letra do hit 5=azul, 180=red, etc
efeito = 3  --numero do efeito desejado
--End Config--

hp = getPlayerHealth(cid)
mp = getPlayerMana(cid)
topos = getPlayerPosition(cid)
pvoc = getPlayerVocation(cid)
pvoc3 = getPlayerVocation(cid)
pvoc2 = getPlayerVocation(cid)
pvoc5 = getPlayerVocation(cid)
pvoc7 = getPlayerVocation(cid)
pvoc8 = getPlayerVocation(cid)

if voc == pvoc or voc2 == pvoc or voc3 == pvoc or voc5 == pvoc or voc7 == pvoc or voc8 == pvoc then
if getPlayerHealth(cid) >= dano then
doPlayerAddMana(cid, -danoo)
doPlayerAddHealth(cid, -dano)
doSendAnimatedText(topos, dano, cor)
  doSendMagicEffect(topos, efeito)
else
doPlayerAddMana(cid, -mp)
doPlayerAddHealth(cid, -hp)
doSendAnimatedText(topos, hp, cor)
  doSendMagicEffect(topos, efeito)
end
end
return 1
end

and
PHP:
function onStepIn(cid, item, pos)
---Action by Jovial---

--Config--
voc = 4    --0 = no vocation, 1 = sorcerer, 2 = druid, 3 = paladin, 4 = knight--
voc2 = 1   --5 = master sorcerer, 6 = elder druid, 7 = royal paladin, 8 = elite knight--
voc3 = 3
voc5 = 5 
voc7 = 7 
voc8 = 8 

dano = 300 --quanto ira tirar de vida
cor = 180 --cor da letra do hit 5=azul, 180=red, etc
efeito = 3  --numero do efeito desejado
--End Config--

hp = getPlayerHealth(cid)
topos = getPlayerPosition(cid)
pvoc = getPlayerVocation(cid)
pvoc3 = getPlayerVocation(cid)
pvoc2 = getPlayerVocation(cid)
pvoc5 = getPlayerVocation(cid)
pvoc7 = getPlayerVocation(cid)
pvoc8 = getPlayerVocation(cid)

if voc == pvoc or voc2 == pvoc or voc3 == pvoc or voc5 == pvoc or voc7 == pvoc or voc8 == pvoc then
if getPlayerHealth(cid) >= dano then
doPlayerAddHealth(cid, -dano)
doSendAnimatedText(topos, dano, cor)
  doSendMagicEffect(topos, efeito)
else
doPlayerAddHealth(cid, -hp)
doSendAnimatedText(topos, hp, cor)
  doSendMagicEffect(topos, efeito)
end
end
return 1
end

its too big i wil atach...
 

Attachments

I dont know much about scripting but ... dont you need "function onStepOut", too?

here the error
[07/03/2009 21:31:30] Lua Script Error: [MoveEvents Interface]
[07/03/2009 21:31:30] data/movements/scripts/poi/FireDruidNorthEast1.lua:eek:nStepIn

[07/03/2009 21:31:30] data/movements/scripts/poi/FireDruidNorthEast1.lua:17: attempt to call global 'getPlayerHealth' (a nil value)
[07/03/2009 21:31:30] stack traceback:
[07/03/2009 21:31:30] data/movements/scripts/poi/FireDruidNorthEast1.lua:17: in function <data/movements/scripts/poi/FireDruidNorthEast1.lua:1>
 
Back
Top